Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID Sign In with Twitter
Support for Vanilla Forums Cloud product

In this Discussion

Follow Us


BlogThis

12357

Comments

  • Version number changed from 1.09 to 1.10.
  • Uploaded version 1.10 of BlogThis.
  • Newest version now links straight through to the comments, rather than the beginning of the discussion. It was a little complex (perhaps tedious is the better word), which is why I hadn't done it before. But this is very useful if you have multiple blog posts coming from one discussion - rather frustrating to sent to the beginning of the discussion and you can't find the post you were just reading!
  • Spode has helped me debug an issue because of my web hosting using an older version of mysql (3). Just would like to record this here, in case someone observes this error in future and can use this solution. BlogThis extension showed an error when clicked on "blog" tab: -------------------- Error Message An error occurred while fetching the list of blogs. Affected Elements Blog.GetComments(); The error occurred on or near: You have an error in your SQL syntax near 'OFFSET 0' at line 1 -------------------- The real problem was older version of mysql i.e. 3 does not support use of keyword "OFFSET". it has a different syntax for writing the sql query separated by a comma for limit and offset values (ordering is also different). So following code in "library\Control.BlogThis" file needs to be changed : -------------------- //get the current page of blog posts //naughty me, needs upgrading to using the sql builder $sql = "SELECT User.Name as AuthUsername, User.UserID as AuthUserID, Discussion.Name as DiscussionName, Discussion.FirstCommentID as FirstCommentID, Comment.CommentID as CommentID, Discussion.DiscussionID as DiscussionID, Category.CategoryID as CategoryID, Comment.Deleted as Deleted, Comment.Body as Body, Comment.DateCreated as DateCreated, Discussion.Closed as Closed, Category.Name as CategoryName, Comment.FormatType as FormatType, Discussion.CountComments as CountComments FROM ".$Context->Configuration['DATABASE_TABLE_PREFIX']."Comment as Comment LEFT JOIN ".$Context->Configuration['DATABASE_TABLE_PREFIX']."Discussion as Discussion ON Comment.DiscussionID = Discussion.DiscussionID LEFT JOIN ".$Context->Configuration['DATABASE_TABLE_PREFIX']."User as User ON Comment.AuthUserID = User.UserID LEFT JOIN ".$Context->Configuration['DATABASE_TABLE_PREFIX']."Category as Category ON Discussion.CategoryID = Category.CategoryID WHERE `BlogThis` = \"1\" AND `Deleted` = \"0\" $extrasql ORDER BY Comment.DateCreated DESC LIMIT ".$Context->Configuration['BLOG_PER_PAGE']." OFFSET ".($Context->Configuration['BLOG_PER_PAGE'] * ($this->CurrentPage-1)); -------------------- Above code needs to be replaced by this following corrected code : --------------------- //get the current page of blog posts //naughty me, needs upgrading to using the sql builder $sql = "SELECT User.Name as AuthUsername, User.UserID as AuthUserID, Discussion.Name as DiscussionName, Discussion.FirstCommentID as FirstCommentID, Comment.CommentID as CommentID, Discussion.DiscussionID as DiscussionID, Category.CategoryID as CategoryID, Comment.Deleted as Deleted, Comment.Body as Body, Comment.DateCreated as DateCreated, Discussion.Closed as Closed, Category.Name as CategoryName, Comment.FormatType as FormatType, Discussion.CountComments as CountComments FROM ".$Context->Configuration['DATABASE_TABLE_PREFIX']."Comment as Comment LEFT JOIN ".$Context->Configuration['DATABASE_TABLE_PREFIX']."Discussion as Discussion ON Comment.DiscussionID = Discussion.DiscussionID LEFT JOIN ".$Context->Configuration['DATABASE_TABLE_PREFIX']."User as User ON Comment.AuthUserID = User.UserID LEFT JOIN ".$Context->Configuration['DATABASE_TABLE_PREFIX']."Category as Category ON Discussion.CategoryID = Category.CategoryID WHERE `BlogThis` = \"1\" AND `Deleted` = \"0\" $extrasql ORDER BY Comment.DateCreated DESC LIMIT ".($Context->Configuration['BLOG_PER_PAGE'] * ($this->CurrentPage-1)).", ".$Context->Configuration['BLOG_PER_PAGE']; ---------------------
  • I installed BlogThis Extension. it works with following error.
    =============================================================================================================
    Notice: Undefined variable: Configuration in C:\xampp\htdocs\vanilla\extensions\BlogThis\library\Function.BlogThis.php on line 80

    Notice: Undefined variable: Configuration in C:\xampp\htdocs\vanilla\extensions\BlogThis\library\Function.BlogThis.php on line 80

    Notice: Undefined variable: Configuration in C:\xampp\htdocs\vanilla\extensions\BlogThis\library\Function.BlogThis.php on line 80
    =============================================================================================================
    error repeats for each comment on page.

    any suggestion?
  • resolved by replacing GetUrl($Configuration to GetUrl(&$Configuration.

    someone can explain me, is that the right fix or I have something else to configure/change?

    thx
  • That could well be correct. on my servers I have PHP Notices turned off as they are not critical :) If everything works for you - I'll change the code on the next release.
  • here is the correct fix, thanks to TothAmon

    Line 80 should be
    $CommentList .= '< a h r e f ="'.GetUrl($Context->Configuration, 'comments.php', '', 'DiscussionID', $Comment->DiscussionID, $CurrentPage, 'PostBackAction='.$blogged).'&BlogCommentID='.$Comment->CommentID.'">'. $CommentGrid->Context->GetDefinition($blogged).'< / a >';


    "$Context->Configuration" instead of "$Configuration".
  • rikin - I have put a fix into the new version which will be coming out in the next few days.
  • Version number changed from 1.10 to 1.11.
  • Uploaded version 1.11 of BlogThis.
  • The next feature I will be working on is tagging and tag clouds to go into your profile.
  • Here is my patch to enable MultiRoles support: http://home.in.tum.de/~mutter/BlogThis_1.11_Add_MultiRoles_Support.patch spode: Maybe you can add this to your great extension. I think you only need a little if to check if MultiRoles is installed. I dont know how to check this proper in Vanilla.
  • Hi elm.

    I use Category Roles myself, but I don't see why support couldn't be added with a conditional. Looking at the file the major difference is some extra SQL - correct? So all I'd need is a conditional to see if Multi Roles is installed. If you fancy writing that too - I'm happy to include it :)

    In general - I'm happy for other people to contribute to this project, but I would like to remain the maintainer because the underly fact is I want it to work as I want it to work on the sites I run. I am of course happy to make things as optional as possible so that people can choose how they want it to be - I try and be empathetic to other people's needs!
  • There is a minor bug on the formatting of the freetext profiles. It should be contained in a DIV not a P element. I shall repair this in the next release - but it's fairly easy to adjust yourself by either editing the CSS file, or the functions file.
  • Uploaded version 1.12 of BlogThis.
  • Is there an easy way to change the name of the tab from "blog" to something like "main"? P.S. I am really enjoying this extension, it takes the discussion concept to whole 'nother level.
  • Yes - just go to the "BlogThis Settings" in your settings manager and there is a setting there.
  • Thanks Spode That works, but if I have the page manager extension enabled, it goes back to displaying the default "blog" text. I am also trying trying to get youtube vids and images to show up in blogged posts as they do in discussions. I am using "Make It Simple Text Formatter 1.12" by Gambit which is a very effective extension for this purpose. Is there any way we can apply its functionality to BlogThis posts? Or if it could just accept the "embed" code provided by youtube that would work too...any recommendations?
  • Hi Raize,

    That shouldn't be the case - it should work independently of the Page Manager. I have to fix a couple of bugs later, so I'll double check the code.

    I'll look into the video embedding - it is an issue right now that I know needs working on, but most things I've looked at are not simple solutions.
  • Now here is the final patch for MultiRoles support. It adds to extra sql statements where the comments are queryed and it replaces the comment counting when MultiRoles 2.0+ is installed. I look forward to see this in your extention spode. Thank you. http://home.in.tum.de/~mutter/BlogThis_1.12_Add_MultiRoles_Support.patch Greetings elm PS Can you pleas display the fullname in the blog post if one is entered? PS2 There are two hardcoded strings. Can you add them to the definitions? Function.BlogThis.php: "BlogThis status successfully changed." and "BlogThis status not changed." Sorry for all that requests :) But I like your extension.
  • Hi elm,

    I'll add them to the list. I was going to work on it this weekend, but I'm feeling quite ill. See how I feel tomorrow.

    Problem with your patch - is I was going to convert the SQL to SqlBuilder queries as someone else has sent me them down, so it makes sense. I'll try and decode your patch file to see what is going on!
  • Uploaded version 1.13 of BlogThis.
  • Latest version now uses the CommentManager to request the comments. Therefore any extension that modifies the CommentBuilder SQL queries (which I *hope* is how MultiRoles works) should also work with this.

    Quite a few other changes too - see the ChangeLog for details. Thanks to Alexander Schepp for helping with the testing and pointing out some potential security issues.
  • Yeah spode, you are my hero :) Very nice, as far as I can tell after 2 mins testing it works like charm! Great Work!
  • Awesome. Awesome to the max.
  • Hi spode, I have an other question. I want to use Attachments 2 with Inline Images 1.4. Since BlogThis uses the CommentManager I thougth it would be compatible to Attachments but it isn't. Maybe you can give me a hint where to search to get this to work. Thank you.
  • Hi spode,

    This seems like a great extension, I checked it out on your sites and it seems to integrate really nice. Nice work.

    Having said that, I am having an issue, I get the following error message when I click the "blog" tab:

    ----

    Error Message
    An error occurred while attempting to retrieve the requested comments.
    Affected Elements
    Blog.BlogComments();
    The error occurred on or near: You have an error in your SQL syntax near '.CommentID AS CommentID, m.DiscussionID AS DiscussionID, m.Body AS Body, m.Fo' at line 1
    For additional support documentation, visit the Lussumo Documentation website at:

    ----

    I noticed "scotty" had a similar error msg and posted a fix, I went to try and make that fix but realized you had made some code changes and now that fix doesn't apply. Do you have any idea what this issue could be?

    I am running V. 1.1.5a

    Thanx!

    ----
Sign In or Register to comment.