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.

BlogThis

1457910

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.
  • Thanks spode.
  • 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.
  • RaizeRaize vancouver ✭✭
    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.
Sign In or Register to comment.