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.

Extension: Discussion Tags

2

Comments

  • yes, it works perfectly now, thanks!
  • edited January 2007
    BUMP

    I still get this error:
    Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result ressource in ../extensions/DiscussionTags/gettags.php on line 31
    ...when I edit tags separated by commas. Anybody encountered this problem?
  • could you please change in the extensions/DiscussionTags/ajax.php
    while ($row = mysql_fetch_row($result)) { if ($Loop > 1) echo ','; $Name = FormatStringForDisplay($row[0], 1); echo $Name; $Loop++; }
    to
    while ($row = mysql_fetch_row($result)) { if ($Loop > 1) echo ','; $Name = FormatStringForDisplay($row[0], 1); echo $Name; $Loop++; } echo mysql_error();
    and tell me what error message is displayed
  • Err, I can't find this part of code in ajax.php...

    What looks like the most is this, at lines 12 to 15:
    while ($row = mysql_fetch_row($result)) { if ($i++ > 0) echo ', '; echo $row[0]; }
  • edited January 2007
    sorry i've meant the gettags.php
  • edited January 2007
    No problem, I should have think about looking here by myself... Okay, here's what it says:
    Illegal mix of collations (latin1_swedish_ci IMPLICIT) and (utf8_general_ci COERCIBLE) for operation 'like'

    Sounds like the old non-latin characters compatibility problem.
  • There are also other informations about this here, if it can help.
  • yes i think this has something to do with the non-latin characters. I think this is no error from the extension, you need to declare the database as utf8
  • Okay, but what should I do in fact? I know phpMyAdmin a bit, but I don't really know how to declare the database as utf8.
  • I think you can change it when you select the database, then click on Operations, then there's a drop down field collation...

    But I think you my need to setup the vanilla tables completely new...
  • What I don't understand is the database is already supposed to be encoded in utf8. I encountered this problem with Vanilla 1.0.1 and fixed it with a patch suggested in the dev forum. I'll have a deeper look at it when I'll get more time.

    Would there be a way to just disable this MySQL warning? I mean, it causes no other harm than displaying an error. The only problem is it confuses my users when it occurs.
  • you can change
    while ($row = mysql_fetch_row($result)) {
    to
    while ($row = @mysql_fetch_row($result)) {
  • It seems to work, no warning anymore :D
    Thanks a lot for the tip!
  • Does anyone know how to get the .htaccess to make the Discussion Tags add-on use the FriendlyURLs? /extension.php?PostBackAction=DiscussionTags should be something like: /extension/DiscussionTags/ and /index.php?TagFilter=7 should be something lke: /tag/7/ Any help would be greatly appreciated.
  • You need the extension do that, not the .htaccess. Any thoughts, houseinprogress?
  • Because of the amount of work involved FriendlyURL compatibality probably isn't something that would happen very soon.
  • dan39dan39 New
    edited January 2007
    I have a question. I decided to changing the number of "Recent Tags" that appear in the Panel. Right now, the default is 30 and I wanted to change it to 10.

    I found the following line of code:

    $result = mysql_query("SELECT count(A.TagID) AS number,B.Tag,B.TagID FROM ".$DatabasePrefix."DiscussionHasTags A INNER JOIN ".$DatabasePrefix."DiscussionTags B ON (A.TagID = B.TagID) WHERE TO_DAYS(NOW()) - TO_DAYS(A.Created) <= 365 GROUP BY A.TagID ORDER BY number DESC LIMIT 0,30",$Context->Database->Connection);

    and I changed the 0,30 at the end of the line to 0,10 and it seemed to reduce the number of items in the panel down to 10 nicely.

    However, the 10 that are displayed aren't the most recent tags. It seems like the tags that are being displayed are only the 10 most popular tags.

    Above, it says that one of the features of this add-on is the "Viewing of recently popular tags." Do newer tags that aren't as popular ever make it onto the list? It doesn't seem so as far as I can tell.

    Unless I'm mistaken — or did something wrong when I changed the setting — the list of tags in the panel are only the "most popular" tags at any given moment (or at least in the 365 days, it seems). Can you confirm?

    Thanks.
  • hello,

    is there a way to regulate the fontsize of the diplayed tags in the panel?
    its actually on somthing like 18-20 px or such .. very mighty at least

    thx
  • for now as non css solution and for those who are interested in:


    around line 250
    else $color = 'your textcolor'; $toreturn .= ' <a style="font-size:XXpx; text-decoration:XX;font-weight:XX;font-stretch:XX; color:'.$color.';" href="index.php?TagFilter='.$Value[2].'">'.$Value[0].'</a> '; } $toreturn .= '<div style="text-align:right; padding-right:5px;"><a style="font-size:XXpx; text-decoration:XX;" href="extension.php?PostBackAction=DiscussionTags">All tags ...</a></div>';

    now im looking for a solution to display those tags in various fontsizes like on bbpress.org... anyone?
  • the fontsizes are actually between 80% and 150%,

    if you add
    $Configuration['CLOUD_COLOR_80'] = '#ff0000'; $Configuration['CLOUD_COLOR_90'] = '#ff0000';
    and so on to conf/settings.php you can change the colors from the different font sizes
This discussion has been closed.