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

edited March 2007 in Vanilla 1.0 Help
Janine
«134567

Comments

  • Please let me know if you have any trouble with Janine. Trying to integrate with another piece of software that you can't control is always delicate work, but I will do my best to fix breakages as quickly as possible.

    Known Issues
    1. 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.
    2. 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.
    3. 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.
    4. 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.
    5. 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 Release
    • Problems with quote and slash characters (issue #1 above). Status: Confirmed, but not yet understood.
    • No discussions created for private blog entries (issue #2 above). Status: Fix coded but not tested.
    • Web spiders causing havoc with large archives (issue #3 above). Status: Both fixes coded but not tested.
    • Problems with Unicode (issue #4 above). Status: Can't yet reproduce it myself.
    • Add some more tokens, such as BlogPostContent, BlogPostExcerpt, BlogPostBeforeSplit, BlogPostAfterSplit, BlogPostDate, BlogPostUsername, and anything else I can think of. Tokens for everyone! Status: Various stages of coding.
  • @squirrel: Have you had any experience integrating WP and Vanilla? I have integrated the two and included the Wordpress functions with my forum but have a issue with single and double quotes. It is explained here: http://lussumo.com/community/discussion/4818/wordpressvanilla-intergration-issue-with-single-quote/#Item_0 Just wondering if you have come across this or may know why its happening, I can't figure it out.
  • It would rawk if Vanilla & WP comments synced. I've always wanted a community that was half blog half forum, so that the bloggers were interacting with the existing forum community and v.v. - it's a good way to bring fresh blood into the forum community and keep the community fresh.
  • Hi there Squirrel great job you did here really we needed this extension ('tell Swell get alive at least :( ). i was thinking about doing this but im not php'er ('tell now). here a small suggestion : your great extension will sync every post in the blog to vanilla that good enough but blogs usually have a personals , news ... any kind of post that doesn't need to be discussed for any kind of reasons such a personal posts. so what i was thinking of has two parts : 1-part where you should work with wordpress : to add a "discuss this" button under each post to give the users the option for opening a discussion page @ Vanilla. 2-part where you should work with vanilla : to modify or create plug in handle the post information that comes from part one. to be more specific the button will collect the post information and send them to vanilla. or you can simply just send the post id and let our plug in @ vanilla access the database gather the information and start a new discussion. it seems that your did the second part with a great job :) but having an option not to sync every post every thing to the forums and giving the user the choice to discuss or not will decrease the unwanted (undiscuss able posts) in the forums. also may one of yours community member comes with a great topic @ the forums and you want to blog that post you can reverse the two steps. finally its sad that I'm just talking here no code :( but not familiar with php myself and i don't have the time to be right now ( a full graduation semester :) ) so i hope these ideas was useful for you guys. and thx again Squirrel for the great extension.
  • Uploaded version 1.0.3 of Janine.
  • /me kicks self, buries head in hands...

    Wow, 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!
  • A question from circuit, from an older Janine thread:
    is it possible to only create a forum post when a blog is posted in certain categories? no big deal if not, but it would make my life a bit easier!
    Can Janine do this automatically? Right now, no, and I'm not sure it should. There are some ways to fake this though...

    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.
  • Uploaded version 1.0.4 of Janine.
    • 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.
  • Installed 1.0.4. Went through every line item in the docs. Created two test posts (with "allow comments" on). No discussions were created. These posts also did not have the custom field that is supposed to be created.

    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.

  • 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.
    I use Janine. It works perfectly. I only have one problem but i think it's wordpress fault: when i edit some random old post, Janine gets pinged so it creates a new discussion... of course now i know that using this would avoid that:

    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.
    Thanks for such a great extension :)
  • Detective is using WP 2.1.2, Vanilla 1.1.2. :/

    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/.
  • I need help installing this. I followed the instructions to the letter and double checked everything I can't seem to make this work. The only thing I can think of that is not letting this work together is that they are not sharing the same mysql data base. could that be the problem. HELP! Thanks...
  • never mind i just read something else about another data base. i need to have them on the same database...
  • Ok forget that... I just reinstalled Vanilla onto the same database. (fresh and clean install) and I still can't get it to work. So I still need help. Thank you...

  • Detective is using WP 2.1.2, Vanilla 1.1.2. :/
    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/.
    Check http://www.ryuuko.cl/2007/03/18/previa-de-hokuto-no-ken/ . Right after the article there's a link to "Discusión en la 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.
  • I see, Detective...I think. So you have the link to the forum at the end of the FULL article (along with WP comments), but you have only a link to WP comments on the home page?
    BTW, i followed Squirrel instructions: get the value for the custom field, add the link, and voilà! It works.
    I'm not sure what you mean. What is it that you are making work this way. Are you doing it manually?
  • I believe Detective means that he read the instructions in the "Adding the Discussion Link" section of the README.html and adapted them for the theme he uses on his site.

    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 &#187;', '1 Comment &#187;', '% Comments &#187;'); ?></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 &#187;</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 &#187;', '1 Comment &#187;', '% Comments &#187;'); ?> </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 &#187;</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 &#187;</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.
  • I read the ReadMe, too, and thought I implemented it correctly. :/

    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?
  • You shouldn't have to use the postback, that's the part that's really bothering me. I wish I had this problem on my setup, then at least I could debug it. It makes me fear that there's some quirk in your webserver config that causes the XML-RPC ping from WordPress to be delayed or skipped altogether. There is some precedent for this; I've read that previous versions of WP had problems with the ping, so... yeah. I just don't know how to even start looking for this. >:(

    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:
    1. Janine searches the discussions table for a record with BlogPostID equal to 14 (or whatever).
    2. If the discussion doesn't exist, Janine creates it.
    3. 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.
Sign In or Register to comment.