Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Janine
Janine
0
Comments
Known Issues
- Something is screwy with quote characters and/or slash characters, and using these characters in a blog post will make Janine fail to create a discussion. I don't know why yet, but I will. Target: This will be fixed in the next release.
- Right now Janine won't create discussions for private blog entries. A patch can be found here. Target: This patch will be in the next release.
- Consider this carefully before installing Janine on a blog with lots of old archived posts: If any user hits a Janine discussion link and no discussion exists for that post, Janine will create the discussion. The user does not have to leave a comment to trigger the new discussion. In fact, the user doesn't even have to be human, it could be a search engine spidering your site. If you have lots of old blog posts, your forums could be flooded with hundreds of new discussions overnight. I have two ideas to solve this: 1. A config option that disables discussion creation by anonymous users, 2. A config option that sets a "start date" and only creates discussions for blog entries made after that date. Each of these ideas has certain advantages. Target: Both of these solutions will be in the next release.
- There are some strange problems with Unicode characters. Janine might give you headaches if your blog is using non-Latin characters. I am looking into it, but Vanilla itself has some encoding quirks that are not fantastically well understood. Target: Hopefully I can fix this for the next release, but no promises.
- Janine does not open a new database connection to access the blog database. It simply uses the existing database connection opened by Vanilla. This means your Vanilla tables and your blog tables must be in the same database. Target: Sometime in the future. Not the next release.
Items for the Next ReleaseWow, I can't believe I missed this. One of the first requirements I set for Janine was that it should respect the WordPress "allow comments" setting for each post. Looking at my code, I can even see where Janine gets the 'comment_status' field from the WP tables... and then drops it on the floor. I just completely spaced out on hooking that up properly. Man. Wow.
So... Yeah, that's fixed now. Version 1.0.3 is up with my apologies. Thanks for catching this, ideve!
Idea #1: Use the "allow comments" checkbox (which now works properly) to tell Janine which posts should get new discussions.
Idea #2: If you want "allow comments" to always be on (because you're also using WordPress comments maybe? I dunno) then create a blank "VanillaDiscussion" field in every post that should not get a discussion. If this field exists in the post, Janine will assume it already has a discussion and leave it alone.
Hope this helps.
- Broke out lots of code into conditionally loaded include files.
- Fixed several mistakes in the 'DEBUG' (postback) ping method.
- Made warnings into proper dictionary entries (and made them more descriptive).
- Additions and improvements to the documentation (there's more documentation than code now).
If anyone else gets Janine to work on a live site, please let me know because I also have a dancing frog that you might be interested in.The really odd thing is that when I looked at the site or the first time today, there was a discussion in Vanilla for a blog entry I did YESTERDAY. The last time I looked at the board, it was completely empty. Now there is this one discussion. That discussion DOES have the custom field.
Another thing is that I edited all my theme files as per your docs. But I still have the "no comments" link showing up on the new entry (perhaps your instructions don't remove that?). Of course there is also no "discussion" link to the discussion that doesn't exist.
I looked at this site: http://www.ryuuko.cl/ and it has a blog, but the links go to WP comments, not to the board at http://www.ryuuko.cl/comunidad/.
We're going to change our site template soon.... and WP comments won't appear BTW, i followed Squirrel instructions: get the value for the custom field, add the link, and voilà ! It works.
This is the most difficult part of the install because it's the part I can't provide step-by-step instructions for. Everyone's theme is going to be different. I gave instructions for the "WordPress Default" theme because everybody has it so that's the best way to demonstrate the technique you'll need.
In your case, you are using the MistyLook theme. The example for that is slightly different.
In "Main Index Template":
Look for this:
<?php comments_popup_link('(0)', '(1)','(%)')?> | <a href="<?php the_permalink(); ?>" title="Permalink: <?php echo wptexturize(strip_tags(stripslashes($post->post_title), '')); ?>" rel="bookmark">#</a> <?php edit_post_link('(edit)'); ?>
Replace with this:
<?php if (comments_open() && ($vanilla_link = get_post_meta($post->ID, 'VanillaDiscussion', true))) { echo ("<a href=\"{$vanilla_link}\">(D)</a> |"); } ?> <a href="<?php the_permalink(); ?>" title="Permalink: <?php echo wptexturize(strip_tags(stripslashes($post->post_title), '')); ?>" rel="bookmark">#</a> <?php edit_post_link('(edit)'); ?>
Look for this:
<p class="postmetadata">Posted in <?php the_category(', ') ?> | <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p>
Replace with this:
<p class="postmetadata">Posted in <?php the_category(', ') ?><?php if (comments_open() && ($vanilla_link = get_post_meta($post->ID, 'VanillaDiscussion', true))) { echo (" | <a href=\"{$vanilla_link}\">Discussion »</a>"); } ?></p>
The next one is called "Archives". There are actually two of them, and let me send a big thank-you to the theme author for creating two templates with the same name. You want the first "Archives", the one that corresponds to archive.php:
Look for this:
Posted in <?php the_category(', ') ?> on <?php the_time('M jS, Y') ?> <?php edit_post_link('Edit', '', ' | '); ?> <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?> </p>
Replace with this:
Posted in <?php the_category(', ') ?> on <?php the_time('M jS, Y') ?><?php edit_post_link('Edit', ' | ', ''); ?><?php if (comments_open() && ($vanilla_link = get_post_meta($post->ID, 'VanillaDiscussion', true))) { echo (" | <a href=\"{$vanilla_link}\">Discussion »</a>"); } ?></p>
In "Single Post":
Look for this:
<p class="postmetadata">Posted in <?php the_category(', ') ?> | <?php comments_number('No Comments', '1 Comment','% Comments')?></p>
Replace with this:
<p class="postmetadata">Posted in <?php the_category(', ') ?><?php if (comments_open() && ($vanilla_link = get_post_meta($post->ID, 'VanillaDiscussion', true))) { echo (" | <a href=\"{$vanilla_link}\">Discussion »</a>"); } ?></p>
Look for this and delete it:
<?php comments_template(); ?>
Finally, in "functions.php":
Look for this:
There are <?php global $numposts;echo $numposts; ?> Posts and <?php global $numcmnts;echo $numcmnts;?> Comments so far.
Replace with this:
There are <?php global $numposts;echo $numposts; ?> Posts so far.
There might be more but I think that covers it. Here's what the result should look like.
So, I removed Mistylook from the server, and reinstalled a clean copy in case I had messed it up. Then I made the changes you suggested. It still didn't work.
THEN I noticed the LITTLE TEEN UNOBTRUSIVE "If this file were writable you could edit it." So I had been editing the code, but the new code wasn't being saved. (That's really deceptive.) Auughhh! With the new install, forgot to CHMOD so that I could edit it from the Theme Editor.
Made changes directly to the files....now it looks most lovely.
Sheesh.
OK, so, if I understand this correctly, it all seems to be working except that we have to log out and force the postback manually? Right?
There is another way, though.
Janine needs some way to keep track of "did I already create a discussion for this blog post?". Right now I'm doing that by sticking a "VanillaDiscussion" field into WordPress. I chose this method because it meant I didn't have to alter the structure of any database tables. It's a bit more elegant from a coding perspective, but from the users' perspective dealing with the "VanillaDiscussion" field is a huge pain in the ass.
BUT, I could just suck it up and add a `BlogPostID` field to the Vanilla discussion table. Now instead of looking for a special custom field in your blog post, all you have to do is put in a link to extension.php with the ID of your post, for example: http://yoursite.com/path/to/vanilla/extension.php?PostBackAction=JanineUpdate&BlogPostID=14. When a user clicks on this link, the following things would happen:
- Janine searches the discussions table for a record with BlogPostID equal to 14 (or whatever).
- If the discussion doesn't exist, Janine creates it.
- Janine automatically bounces the user to the correct discussion URL.
So now you don't have to hassle with a "VanillaDiscussion" field, you don't even touch the WP database at all (which is nifty), you have a much more reliable way to know if the discussion already exists or not, the discussion isn't even created until someone actually wants to comment, you can use Janine with virtually any blog (not just XML-RPC enabled ones), and you don't have to wonder what's happening behind your back.Yeah, I'm steadily convincing myself that this is a good idea.
There are two big disadvantages: 1. You have to either alter the discussions table or create a new table that maps discussions to blog posts (probably the second is better), and 2. The database is being modified by an HTTP GET request. Number 2 bothers me more because it's not good web programming practice, but I think the overall risk of abuse is low.
So... high upside, low risk, and not too much work to add. I could even keep the XML-RPC functionality, no reason to lose it. Okay, I talked myself into it. Time to start coding Janine 1.1.0.