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

Janine

12357

Comments

  • Options
    This will give you three new tokens: BlogPostContent, BlogPostBeforeSplit, and BlogPostAfterSplit. The first has the entire text of the blog post, the second has everything before the "more" tag (or everything, if there is no more tag), the third has everything after the "more" tag (or nothing, if there is no more tag).

    Does this help?
    sorry, my millionth post :)
    it would be cool if this pulled the blog excerpt... i don't use the 'more' tag.
  • Options
    I'm working on "Adding a Discussion Link to the Blog" for Mistylook myself.

    Followed step 3 and step 4.

    (FWIW, perhaps the docs could mention to replace the URL in the code with your OWN URL? I didn't read all the code (since I don't understand a lot of PHP anyway) and was surprised to end up at www.yoursite.com! :) )


    Did step five to single post, but I'm having a problem...
  • Options
    Another weird thing I'm noticing..... Sometimes the BlogPostLink token isn't picking up the Post Slug in the URL instead of the default title. I've got a post where the BlogPostLink gives you a 404 because the blog post was using a slug and the token link uses the posts full title in the URL. Why would that be? Why wouldn't it pick up the slug like on just about every other story I've tested so far?
  • Options
    i'm not sure if this is an issue for anyone else, but my blog requires a user to be logged in to do anything except read. if you are logged out and click the 'add comment' link, the post is created in the forum, even though you're not permitted to reply to it. i fixed this by adding the following check in the wordpress template:

    <?php global $user_ID, $user_identity; get_currentuserinfo(); if (!$user_ID): ?> // do something if the user is NOT logged in <?php else: ?> // do this if the user IS logged in <? endif; ?>
  • Options
    Nevermind. Yea, I'm feeling like a php wiz about now...
  • Options
    In addition to the slashes....how do I get my paragraph breaks in the post-content to show up when posted by Janine? My blog posts were written in the rich text editor. Markdown does the breaks just fine, but it doesn't pick up any of the image links or anything like that. Sorry to be a nag, this is just really exciting. I hope my questions help you make the extension even better. Also, style info doesn't show up when I give my paragraphs and links style="xxx:xxxxx;" commands in the conf/setteings.php file. Perhpas this is unavoidable...
  • Options
    idea:
    maybe a new discussion should only be created if a comment is actually added in reply. otherwise users can needlessly create lots of blank discussions.
    i'm being a bit picky now :)
    time for bed!
  • Options
    I'm attempting to add a token to create a link back to the article in the discussion. I'm using the HTML formatter extension on my Vanilla board (which seems to be the same that's used here. Here's what I tried: $Configuration['JanineDiscBody'] = 'Please join us to discuss [%BlogPostTitle%](%BlogPostLink%).'; $Configuration['JanineDiscFormat'] = 'HTML'; The text ends up like this: Please join us to discuss [Test the token](http://blog.mormonmomma.com/wordpress/2007/03/25/test-the-token/). What should I put instead of HTML to get this to work? Tried "Html" in case it was case sensitive. Didn't work either.
  • Options
    the syntax you're using is specifically for "Markdown." Try this instead for HTML. It's worked for me. $Configuration['JanineDiscBody'] = 'Please join to discuss <a href="%BlogPostLink%">%BlogPostTitle%</a>.'; $Configuration['JanineDiscFormat'] = 'HTML';
  • Options
    Thanks bflora. It still didn't work. It added the correct code, but it did NOT set it to HTML. When I look at the post, it's in text format. I can EDIT the post (manually changing the setting to HTML) and it works correctly, but this: $Configuration['JanineDiscFormat'] = 'HTML'; doesn't seem to set it to HTML. Any ideas anyone?
  • Options
    circuit: The "who's online" quirk is probably unavoidable because of how Janine works. If it doesn't bother you then it doesn't bother me. As for modifying Janine to prevent empty discussions, it's a good idea but it would take lots and lots of code. I'm afraid it's beyond the scope of my design for Janine but it you want to give it a shot I'll consider including it in a later release.

    bflora: Please show me an example of broken links in Janine. The post link is created by WordPress using the permalink structure set in the WP options. If your WP permalink works, the link in Janine should work (I think). About quotes, you're absolutely right, they're broken. Grr. I'm on it.

    bflora and circuit: Since it looks like I'll have to make yet another release to fix quote issues, I'll go ahead and include a bunch of new tokens in the WP control.

    Alison: The magic was in you all along.
  • Options
    overnight janine posted 20-30 posts on the forum by itself. the comment links have &rel=nofollow at the end, but it didnt stop it happening. is there anything i can do about this? i'm guessing it was caused by spiders, but the comment links are actually hidden unless you log in, so i'm not sure. maybe there are some spambots registered to our site. perhaps a simple confirmation screen would do the job?

    for now, i'm gonna add a javascript prompt to the link. i'm not sure if that will help.
  • Options
    Apparently last time I tested the lower-case, I still had the Markdown code. The "Html" works with the good code on the token. :) I'm getting to be a very happy camper. :)

    Squirrel, thanks again for all your support for this extension.
  • Options
    is rel=nofollow supposed to be added at the end of the link (as circuit mentioned with the "&" sign) or like this
    <a rel=nofollow href=
    because i did the latter and still have the automatic postings

    alison: you go!
  • Options
    chanzero: You want the latter, but don't forget to put in quotes like this:
    <a rel="nofollow" href="...

    It's not a perfect solution. Google and other search engines say that their spiders honor the "nofollow", but there are others that don't honor it. It only takes one badly behaved spider to suddenly trigger a bunch of Janine discussions.

    It's not hard to add an option to disallow anonymous users from triggering a new Janine discussion. If you turn it on, anonymous users will get bounced to the index if no Janine discussion has been created for that blog post. Only logged-in users will trigger a new Janine discussion. I'll go ahead and add that to 1.1.2.
  • Options
    unfortunately i've had to disable janine due to abother 30 posts appearing on the forum overnight. the plugin is perfect except for that!
  • Options
    circuit, if I understand what you are saying, it is that you have a ton of older blog entries that do NOT have discussions associated with them, and that the discussions are being created by a robot? (Sorry, reminds me of the old Saturday Night Live skit for robot insurance, "because robots are strong and they're made of metal.) Anyway, its seems the only NON-code solution would be to turn off discussions for the old blog entries, or CREATE them all yourself in a reasonable order so that the older ones drop to the bottom. (Another reason it would be great to be able to set the DATE on Vanilla entries like you can on WP entries.) I actually plan to do the latter. But I only have a few hundred articles that will be converted to the blog.
  • Options
    Hey, I have a very specific issue with Janine, so specific that it's probably not going to be worth addressing, but in case it's an easy fix I thought I'd mention it. I'm using it on a blog where most of the posts will be hidden to any user not logged in (using this plugin - http://fortes.com/projects/wordpress/postlevels/). Unfortunately, when posts are hidden from users that aren't logged in, Janine won't create a discussion. The debug tool returns: Some problems were encountered Janine could not find the specified blog post. Janine will not create a discussion for this blog post because the post does not allow comments. (In case it affects a possible solution, Wordpress and Vanilla are set up to share a users table.) Is there any way to make Janine aware of the hidden posts? By the way, even if I have to work around this manually when I make a new post (make it public, follow the discussion link, edit the post to make it private), this plugin's still a fantastic and much appreciated help to the site. Lots and lots of thanks, Squirrel. You rule. All the best, Alan
  • Options
    circuit: I don't think a javascript confirmation will help you out. I'll add code to 1.1.2 that gives you control over whether anonymous users can trigger Janine discussions. Now that I think about it, it also wouldn't be hard to add a "JanineStartDate" option that tells Janine to not create discussions for older posts. I'll add that too.

    alan: Please try this, open Janine.Control.WordPress21.php and find the following lines:
    // Get the most recent blog post $SqlBuilder->Clear(); $SqlBuilder->SetMainTable('JanineBlogPosts', 'bp', $pre); $SqlBuilder->AddSelect(array('BlogPostID', 'BlogPostUserID', 'BlogPostTitle', 'BlogPostComments', 'BlogPostLink'), 'bp'); $SqlBuilder->AddWhere('bp', 'BlogPostStatus', '', 'publish', 'like', 'and', '', '1', '1'); $SqlBuilder->AddWhere('bp', 'BlogPostStatus', '', 'static', 'like', 'or'); $SqlBuilder->EndWhereGroup(); $SqlBuilder->AddOrderBy('BlogPostModified', 'bp', 'desc'); $SqlBuilder->AddLimit(0, 1); if ($BlogPostID) { // If the post ID is specified, require it to match $SqlBuilder->AddWhere('bp', 'BlogPostID', '', ForceInt($BlogPostID, 0), '=', 'and', '', '0'); }
    Replace them with these lines:
    // Get the blog post $SqlBuilder->Clear(); $SqlBuilder->SetMainTable('JanineBlogPosts', 'bp', $pre); $SqlBuilder->AddSelect(array('BlogPostID', 'BlogPostUserID', 'BlogPostTitle', 'BlogPostComments', 'BlogPostLink'), 'bp'); $SqlBuilder->AddLimit(0, 1); if ($BlogPostID) { // If the post ID is specified, require it to match $SqlBuilder->AddWhere('bp', 'BlogPostID', '', ForceInt($BlogPostID, 0), '='); } else { // If no post ID is specified, try to guess the most recent post $SqlBuilder->AddWhere('bp', 'BlogPostStatus', '', 'private', 'not like'); $SqlBuilder->AddOrderBy('BlogPostModified', 'bp', 'desc'); }
    This is probably another change I should put in 1.1.2.

    I promise I haven't forgotten about 1.1.2, but my job is crazy right now. It will be a little while before I can come back to coding and there are several bugs I'm chasing. Thanks for your patience.
  • Options
    That works! Thank you so much, you are completely my hero.
Sign In or Register to comment.