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.
Options

WordPress/Vanilla (plus Janine)

edited September 2007 in Vanilla 1.0 Help
On my new site, I'm integrating a WP blog with my Vanilla board, also using Janine to create a new discussion for each new blog article.

I don't want ENTIRE articles to show up on the home page, I just want an excerpt with a link to the whole article. I figured out how to do that with the tag, BUT when I do that, there is NO link to the Vanilla discussion/comments from the article. There is also no link to the discussion in the archived articles. The ONLY link to the discussion appears on the home page. How do I get the link to the Vanilla discussion to show up on the entire article page and also on the archive index pages?

Also, any way to have the default text

This discussion is for comments about the blog article ArticleName. Thank you for participating.

to read like this automatically:

This discussion is for comments about the blog article ArticleName. Thank you for participating.

In other words, link it back to the article? I could do it manually, of course, but any time I can save is a boon!
«1

Comments

  • Options
    edited March 2007
    In response to your earlier question about how to get rid of the WordPress comments link... Edit the "index.php" template in your WordPress theme and remove WP's comments link. It will look something like this:
    <?php comments_popup_link('No Comments &#187;', '1 Comment &#187;', '% Comments &#187;'); ?>
    Zap that sucker.
    How do I get the link to the Vanilla discussion to show up on the entire article page and also on the archive index pages?
    By editing the "Single Post" and "Archive" templates in your WP theme. Remove all of the WP comment-related code and copy in the same code that you used to get discussion links in "index.php".
    In other words, link it back to the article?
    You can, if you have a string formatter installed that allows you to post a link. If you use Html Formatter, try these settings:
    $Configuration['JanineDiscBody'] = 'This discussion is for comments about the blog article <a href="%BlogPostLink%">%BlogPostTitle%</a>. Thank you for participating.'; $Configuration['JanineDiscFormat'] = 'Html';
    If instead you use Markdown, try these:
    $Configuration['JanineDiscBody'] = 'This discussion is for comments about the blog article [%BlogPostTitle%](%BlogPostLink%). Thank you for participating.'; $Configuration['JanineDiscFormat'] = 'Markdown';

    Sorry for the inconvenience. It's not a trivial task to get Janine integrated smoothly but this is about as good as I can get it without modifying any WP code.
  • Options
    Sincerest thanks for your kind help. I'll be trying these out tomorrow. If all goes well, the site will be converted to the new format!
  • Options
    Put a link to comment #2 into the Janine addon discussion?
  • Options
    Is it possible to use Janine when you have the discussion board on an another domain than the blog?
  • Options
    edited March 2007
    Yes, but Vanilla and WordPress must share the same database. Janine does not yet have the ability to open another data source.
  • Options
    Thank you for your answer. The next question, I have foregin charactares (as å ä ö) that look really crazy when I use Janine. How do I fix that? Thank you.
  • Options
    Wow... that's a good question. Can you give me a link to your forum?
  • Options
    edited March 2007
    I'm having all sorts of headaches with this. It worked originally, but trying to make the links consistent in all parts has resulted in Janine failing to work at all. I don't know what I did. I think I just removed the code as described above, but now when I create a new WP entry, no discussion is created and no link is created. Replaced the original index.php code, but Janine still doesn't work. I also updated to the most recent version of WP. Is that the problem? Auughh!
  • Options
    edited March 2007
    While I'm waiting and hoping for help with my poor, crippled Janine, here are some other questions. >>By editing the "Single Post" and "Archive" templates in your WP theme. Remove all of the WP comment-related code and copy in the same code that you used to get discussion links in "index.php".<< What is the "same code" that needs to be placed in these other places? Since I just used the add-on, I don't know what code needs to be added. I'm also not sure where to put it. I have HTML formatting available on my forum. Could you tell me where to include these settings you mentioned: $Configuration['JanineDiscBody'] = 'This discussion is for comments about the blog article <a href="%BlogPostLink%">%BlogPostTitle%</a>. Thank you for participating.'; $Configuration['JanineDiscFormat'] = 'Html';
  • Options
    edited March 2007
    Sorry, I haven't made this very clear. Let's roll it back to the beginning:
    1. In Vanilla, disable Janine in the extensions menu.
    2. In WordPress, check all of your recent posts and look in the "Custom Fields" section for a field named "VanillaDiscussion". Delete this field wherever you find it.
    This should get you back to where you started from, more or less. Now, to install Janine:
    1. In Vanilla, enable Janine in the extensions menu. Janine should automatically create its own config settings but refresh the page once just to make sure.
    2. Open your Vanilla conf/settings.php file and look for the settings named 'JanineDiscBody' and 'JanineDiscFormat'. Replace these settings with the following settings:
    3. $Configuration['JanineDiscBody'] = 'This discussion is for comments about the blog article <a href="%BlogPostLink%">%BlogPostTitle%</a>. Thank you for participating.';
      $Configuration['JanineDiscFormat'] = 'Html';
    4. In your WordPress administration menu, go to the Theme Editor. You will need to edit the "Main Index Template", the "Archives", and the "Single Post" to add the Vanilla discussion link. In the "WordPress Default 1.6" theme you would do this like so:
      • Open the "Main Index Template" and look for the following PHP block:
      • <?php comments_popup_link('No Comments &#187;', '1 Comment &#187;', '% Comments &#187;'); ?>
      • Replace it with this:
      • <?php if ($vanilla_link = get_post_meta($post->ID, 'VanillaDiscussion', true)) { echo ("<a href=\"{$vanilla_link}\">Discussion &#187;</a>\n"); } ?>
      • Do the same thing in "Archives" and "Single Post"
    5. Finally, in WordPress administration go to "Options" >> "Writing". At the bottom under "Update Services", add the link to your forum's extension.php file, like so:
    6. http://www.mormonmomma.com/board/extension.php
    Now say the Hail Mary a few times and edit one of your WordPress posts. You don't have to change anything, just click the Save button. You should now see a new discussion in your forum, courtesy of Janine. Let me know if this doesn't work and I'll pray harder.
  • Options
    squirrel, thanks for the amazing support. I'll be working on this today and tomorrow (amidst tending to my many sick children) and will follow the steps outlined. I'll let you know how it goes! Thanks again.
  • Options
    hi, i've just successfully integrated a fresh install of Vanilla with Wordpress (2.0.4) so i can log into Vanilla with my WP login, but now I'm having problems configuring Janine (my #1 reason for choosing Vanilla!). i tried a few new test posts but no discussions were created. when i go to www.mysite.com/forum/extension.php?PostBackAction=JanineUpdate i get the following error: Some problems were encountered You do not have permission to perform the requested action. thanks in advance!
  • Options
    chanzero,

    It may be that your Janine is trying to post using a user account that does not have post permission. Could you open your conf/settings.php file and whisper to me the Janine-related settings?
  • Options
    i wonder if it's because i have 2.0.4, since i notice the success stories seem to involve 2.0.9 and higher; i'll try upgrading this weekend if i don't get any other suggested solutions working and report back
  • Options
    D'oh! I know what's happening...

    You must be logged in as a user to trigger the JanineUpdate post back action. A non-logged-in guest can't do it. It's because of how extension.php works.

    Sorry about that.
  • Options
    I was & am logged in, as a WP user as I mentioned -- this user has RoleID of 4 and is the one with which I use to manage all Vanilla extensions. Are you saying I need to be logged in with a Vanilla account? Because I don't seem to be able to do that ever since performing the WP integration.

    But regardless, I thought the JanineUpdate post-back was just letting me know what my error -- are you saying I need to run it for Janine to work?

    Sorry for the questions, just trying to get it to work! :)
  • Options
    Ok, I upgraded WP to 2.0.9 and reinstalled Vanilla with my only extension being Janine. I ran PostBackAction=JanineUpdate and got the "You do not have permission to perform the requested action" msg. Then I integrated WP+Vanilla and logged in with my WP admin account (RoleID=4) and still got the same msg when I ran the JanineUpdate. I tried changing the JanineDiscUserID to a few different WP admin accounts, I tried changing the Janine ping from "www.mysite" to just "mysite" etc -- but no matter what, I keep getting the same error msg. I really don't know what could be unique to my setup that I'm getting this problem =/
  • Options
    My apologies, chanzero. The postback debug method was definitely buggy. I just uploaded Janine 1.0.4 which should fix this.
  • Options
    thanks squirrel!

    i just uploaded it and activated it. i published a test post which didn't show up so i tried the extension.php?PostBackAction=JanineUpdate which gave me a different error message, which i think you referred to earlier:
    Some problems were encountered
    Please log out of Vanilla before using this feature of Janine.
    so then i signed out of Vanilla and did PostBackAction=JanineUpdate again and it told me Janine had posted an article into Vanilla. signing back into the forum, i confirmed that the discussion and comment had been added.

    i then published another WP post which didn't show up until after i ran PostBackAction=JanineUpdate as a logged out user -- basically repeated the previous attempt.

    so now i'm not sure what's preventing the automatic posting, me or the code? i'll whisper my current settings to you
  • Options
    This sounds like what I experienced yesterday (and posted in the Add-ons Janine folder). But I didn't force the "PostBackAction=JanineUpdate" to get it to work. At least I don't think so. How do you do that?

    Logging out and logging back in don't work.
This discussion has been closed.