News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Tagging System For Topics

Started by SMFHacks.com Team, December 19, 2006, 10:59:20 AM

Previous topic - Next topic

Mick.

Vb,

I couldnt find the word "things" when hovering the tags in the language file.  Where is this hidden? lol 

I want to change it to "articles".  :P

Ihmeliö

#781
Thanks for this feature, love it.

Is there any way to edit a tag? Some of the tags were added to our forum with CAPS LOCK on, and after that any subsequent tags with that word are also listed with CAPS. This only changes if I delete all of the occurencies of that particular tag.

I'd also like an ability to merge two tags, so that two different wordings of the same thing could be joined as one.

Also, it would be nice to be able to organize the word cloud so that it's in alphabetical order. I personally don't like it being sorted by the frequency, since that's already clear from word size. Maybe also the possibility to sort in random order, so that you don't always end up with the same list - might help in getting people to find new topics.

And then one bug report: When I click the tag listing page open, it lists topic starters by their user names, not their display names. User names are normally not viewable for non-admin users, and it's also a bit confusing, so a fix for this would be nice.


Is there some place for changing the options for this mod?

stefann

Quote from: Ihmeliö on January 10, 2011, 02:05:35 AM
Is there any way to edit a tag? Some of the tags were added to our forum with CAPS LOCK on, and after that any subsequent tags with that word are also listed with CAPS.

I'd also like an ability to merge two tags, so that two different wordings of the same thing could be joined as one.

Also, it would be nice to be able to organize the word cloud so that it's in alphabetical order. I personally don't like it being sorted by the frequency, since that's already clear from word size.

And then one bug report: When I click the tag listing page open, it lists topic starters by their user names, not their display names. User names are normally not viewable for non-admin users, and it's also a bit confusing, so a fix for this would be nice.

Is there some place for changing the options for this mod?

There isn't yet, the next release already has all 4 of these issues addressed (as well as icons similar to those posted by bluedevil) :)

I've given 3 options for tag cloud sorting in the admin panel: alphabetical, tag count, or random - and also the ability to control where the new images appear, if at all

Once I get more things finalised, I'll post some screenshots here
full time lurker on freenode #smf

Ihmeliö

Wonderful, looking forward to that!

Hmm... I noticed that with bigger fonts, there's no clear space between some of the words. This also seems to cause problems with line breaking. Could this be fixed?

Ihmeliö

I noticed that there was duplicate instances of one particular tag. One was in CAPS, one was in smallcase letters. I tried removing both, checked that the tab listing didn't list them any more, and then added a new one with CAPS (since it's an abbreviation - appropriate to be in caps). However, it stays smallcase.

What to do?

sharks

I just need to add a permission setting to this tag mod, and i really hope someone will help me out with this. I am using SMF 1.1.12 with default theme.

I just want to add a permission setting to allow/deny membergroups from being able to see or use the tag system. Meaning, if i deny access to a membergroup (for example, Guests) then the Tags button at top of the forum menu should not appear and if the member has saved the direct link, then it should show an error.

Thanks to anyone who can help me to make the necessary code edits. The next major version is going to take a long time yet to come out, and i really need this new feature now to be able to keep the tagging system on my forum, as i do not want unauthorised membergroups from viewing and using the Tagging system.

mitbrille

#786
Quote from: stefann on January 10, 2011, 02:10:09 AM
Quote from: Ihmeliö on January 10, 2011, 02:05:35 AM
Is there any way to edit a tag? Some of the tags were added to our forum with CAPS LOCK on, and after that any subsequent tags with that word are also listed with CAPS.

I'd also like an ability to merge two tags, so that two different wordings of the same thing could be joined as one.

Also, it would be nice to be able to organize the word cloud so that it's in alphabetical order. I personally don't like it being sorted by the frequency, since that's already clear from word size.

And then one bug report: When I click the tag listing page open, it lists topic starters by their user names, not their display names. User names are normally not viewable for non-admin users, and it's also a bit confusing, so a fix for this would be nice.

Is there some place for changing the options for this mod?

There isn't yet, the next release already has all 4 of these issues addressed (as well as icons similar to those posted by bluedevil) :)

I've given 3 options for tag cloud sorting in the admin panel: alphabetical, tag count, or random - and also the ability to control where the new images appear, if at all

Once I get more things finalised, I'll post some screenshots here

wow... It's going to be the BEST MOD of this year with these options. Have a nice work! Thanks!

ps.: sorry for asking that I have some opinions.
- bigger fonts
- space between the tags
- and the last one: is it possible to select two tags to order the topics? If it would be... I would be more than happy.

Ihmeliö

It would be good if regular users could edit, or at least delete, the tags they have entered themselves. Is this possible?

Also, what about logging who has entered/deleted a particular tag?

vas

Tagging System
By: vbgamer45
http://www.smfhacks.com


QuoteError in Package Installation
At least one error was encountered during a test installation of this package. It is strongly recommended that you do not continue with installation unless you know what you are doing, and have made a backup very recently. This error may be caused by a conflict between the package you're trying to install and another package you have already installed, an error in the package, a package which requires another package that you don't have installed yet, or a package designed for another version of SMF.

Quote
1.    Execute Modification    ./Themes/default/languages/Modifications.english.php    Test successful
      1.    Add Before    ./Themes/default/languages/Modifications.english.php    Test successful
   2.    Execute Modification    ./Themes/default/languages/Modifications.english-utf8.php    Skipping file
*    3.    Execute Modification    ./index.php    Test successful
      1.    Add After    ./index.php    Test successful
*    4.    Execute Modification    ./Themes/default/Post.template.php    Test successful
      1.    Add After    ./Themes/default/Post.template.php    Test successful
*    5.    Execute Modification    ./Sources/ManagePermissions.php    Test successful
      1.    Add After    ./Sources/ManagePermissions.php    Test successful
*    6.    Execute Modification    ./Sources/Subs.php    Test failed
      1.    Replace    ./Sources/Subs.php    Test successful
      2.    Replace    ./Sources/Subs.php    Test failed
*    7.    Execute Modification    ./Sources/Post.php    Test successful
      1.    Replace    ./Sources/Post.php    Test successful
*    8.    Execute Modification    ./Sources/Display.php    Test successful
      1.    Add After    ./Sources/Display.php    Test successful
*    9.    Execute Modification    ./Themes/default/Display.template.php    Test successful
      1.    Replace    ./Themes/default/Display.template.php    Test successful
*    10.    Execute Modification    ./Sources/Admin.php    Test successful
      1.    Add Before    ./Sources/Admin.php    Test successful
*    11.    Execute Modification    ./Sources/RemoveTopic.php    Test successful
      1.    Add Before    ./Sources/RemoveTopic.php    Test successful
*    12.    Execute Modification    ./Sources/Subs-Editor.php    Test successful
      1.    Replace    ./Sources/Subs-Editor.php    Test successful
      2.    Add Before    ./Sources/Subs-Editor.php    Test successful
   13.    Extract File    ./Sources/Tags2.php    
   14.    Extract File    ./Themes/default/Tags2.template.php    
   15.    Extract File    ./Themes/default/languages/Tags.english.php    
   16.    Extract File    ./Themes/default/languages/Tags.english-utf8.php    
   17.    Execute Code    tagsql2.php

Installed Packages

1.    reCAPTCHA for SMF    0.9.8    [ Uninstall ]
2.    Aeva Media    1.4    [ Uninstall ]
3.    SimplePortal    2.3.3    [ Uninstall ]


I am Using

Version Information:
Forum version: SMF 2.0 RC4
Current SMF version: SMF 2.0 RC4
Taggign System Version 2.4.2

Please help to solve the problem. Tahnks.
Tireless striving stretches its arm towards perfection

vbgamer45

Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

vas

Quote from: vbgamer45 on January 28, 2011, 02:21:07 PM
Install then do the failed operations manually.

Thanks for your reply.

2 questions.

Qn1: To make it clear, you want me to modify the subs.php file as per the manual instruction?

Qn2:

Will I be able to auto uninstall if I want at later stage? Or I have to remove manually?

Advance. Thanks.

Tireless striving stretches its arm towards perfection

vas

in subs.php; the code which is to be indicated to be replaced is given as below

'permissions' => array(
'title' => $txt['edit_permissions'],
'href' => $scripturl . '?action=admin;area=permissions',
'show' => allowedTo('manage_permissions'),
'is_last' => true,
),


Where as I found the following code (as simple portal is installed in my forum)

'permissions' => array(
'title' => $txt['edit_permissions'],
'href' => $scripturl . '?action=admin;area=permissions',
'show' => allowedTo('manage_permissions'),
),
'portal' => array(
'title' => $txt['sp-adminCatTitle'],
'href' => $scripturl . '?action=admin;area=portalconfig',
'show' => allowedTo(array('sp_admin', 'sp_manage_settings')),
'is_last' => true,
),


I presume this difference is what makes the install to fail in subs.php, as I stated above,

During uninstall also the same subs.php fails. Is there a remedy that will eliminate this?

Thanks.

I installed in a test forum by manually editing subs.php and it works fine.
Tireless striving stretches its arm towards perfection

vas

Easy. Uninstall Simple Portal. Install Tagging System first and then install Simple Portal. Works without any error.

When U want to uninstall, uninstall Simple Portal and uninstall Tagging System. [Then, if you want, reinstall portal package] ;)
Tireless striving stretches its arm towards perfection

vas

Can anyone lend me simple portal block for tag cloud. The one listed in the Simple Portal site produces only blank block. Thanks.
Tireless striving stretches its arm towards perfection

Mick.

Tag block...


I use this one my TinyPortal site...
global $db_prefix, $scripturl, $txt;
$query = "SELECT t.tag AS tag, l.ID_TAG, COUNT(l.ID_TAG) AS quantity
  FROM {$db_prefix}tags as t, {$db_prefix}tags_log as l WHERE t.ID_TAG = l.ID_TAG
  GROUP BY l.ID_TAG
  ORDER BY RAND() LIMIT 50";

$result = tpdb_query($query, __FILE__, __LINE__);

$tags = array();

$tags2 = array();

while ($row = mysql_fetch_array($result))
{
    $tags[$row['tag']] = $row['quantity'];
    $tags2[$row['tag']] = $row['ID_TAG'];
}

if(count($tags2) > 0)
{
// change these font sizes if you will
$max_size = 250; // max font size in %
$min_size = 95; // min font size in %

// get the largest and smallest array values
$max_qty = max(array_values($tags));
$min_qty = min(array_values($tags));

// find the range of values
$spread = $max_qty - $min_qty;
if (0 == $spread)
{ // we don't want to divide by zero
    $spread = 1;
}

// determine the font-size increment
// this is the increase per tag quantity (times used)
$step = ($max_size - $min_size)/($spread);

// loop through our tag array
$poptags = '';
$row_count = 0;
foreach ($tags as $key => $value)
{
$row_count++;
    // calculate CSS font-size
    // find the $value in excess of $min_qty
    // multiply by the font-size increment ($size)
    // and add the $min_size set above
    $size = $min_size + (($value - $min_qty) * $step);
    // uncomment if you want sizes in whole %:
    // $size = ceil($size);

    // you'll need to put the link destination in place of the #
    // (assuming your tag links to some sort of details page)
    $poptags .= '<a href="' . $scripturl . '?action=tags;tagid=' . $tags2[$key] . '" style="font-size: '.$size.'%"';
    // perhaps adjust this title attribute for the things that are tagged
   $poptags .= ' title="'.$value.' things tagged with '.$key.'"';
   $poptags .= '>'.$key.'</a> ';
   if ($row_count > 6)
   {
    $poptags .= '<br />';
    $row_count =0;
   }
}
}
echo "<center>" . $poptags . "</center></div>";



I use this one on my Simpleportal site...
global $context, $txt, $mbname,$scripturl, $user_info, $smcFunc,  $modSettings;

// Tag cloud
$result = $smcFunc['db_query']('', "
SELECT
t.tag AS tag, l.ID_TAG, COUNT(l.ID_TAG) AS quantity
FROM {db_prefix}tags as t, {db_prefix}tags_log as l WHERE t.ID_TAG = l.ID_TAG
  GROUP BY l.ID_TAG
  ORDER BY l.ID DESC LIMIT " .  $modSettings['smftags_set_cloud_tags_to_show']);

// here we loop through the results and put them into a simple array:
// $tag['thing1'] = 12;
// $tag['thing2'] = 25;
// etc. so we can use all the nifty array functions
// to calculate the font-size of each tag
$tags = array();

$tags2 = array();

while ($row = $smcFunc['db_fetch_assoc']($result))
{
    $tags[$row['tag']] = $row['quantity'];
    $tags2[$row['tag']] = $row['ID_TAG'];
}

if (count($tags2) > 0)
{
// change these font sizes if you will
$max_size = $modSettings['smftags_set_cloud_max_font_size_precent']; // max font size in %
$min_size = $modSettings['smftags_set_cloud_min_font_size_precent']; // min font size in %

// get the largest and smallest array values
$max_qty = max(array_values($tags));
$min_qty = min(array_values($tags));

// find the range of values
$spread = $max_qty - $min_qty;
if (0 == $spread)
{ // we don't want to divide by zero
    $spread = 1;
}

// determine the font-size increment
// this is the increase per tag quantity (times used)
$step = ($max_size - $min_size)/($spread);

// loop through our tag array
$context['poptags'] = '';
$row_count = 0;
foreach ($tags as $key => $value)
{
$row_count++;
    // calculate CSS font-size
    // find the $value in excess of $min_qty
    // multiply by the font-size increment ($size)
    // and add the $min_size set above
    $size = $min_size + (($value - $min_qty) * $step);
    // uncomment if you want sizes in whole %:
    // $size = ceil($size);

    // you'll need to put the link destination in place of the #
    // (assuming your tag links to some sort of details page)
    $context['poptags'] .= '<a href="' . $scripturl . '?action=tags;tagid=' . $tags2[$key] . '" style="font-size: '.$size.'%"';
    // perhaps adjust this title attribute for the things that are tagged
   $context['poptags'] .= ' title="'.$value.' things tagged with '.$key.'"';
   $context['poptags'] .= '>'.$key.'</a> ';
   if ($row_count > ($modSettings['smftags_set_cloud_tags_per_row']-1))
   {
    $context['poptags'] .= '<br />';
    $row_count =0;
   }
    // notice the space at the end of the link
}
}


// Find Results
$dbresult = $smcFunc['db_query']('', "
SELECT DISTINCT l.ID_TOPIC, t.num_replies,t.num_views,m.id_member,m.poster_name,m.subject,m.id_topic,m.poster_time, t.id_board
FROM ({db_prefix}tags_log as l,{db_prefix}boards AS b, {db_prefix}topics as t, {db_prefix}messages as m)
WHERE b.ID_BOARD = t.id_board AND l.ID_TOPIC = t.id_topic AND t.approved = 1 AND t.id_first_msg = m.id_msg AND " . $user_info['query_see_board'] . " ORDER BY l.ID DESC LIMIT 20");

$context['tags_topics'] = array();
while ($row = $smcFunc['db_fetch_assoc']($dbresult))
{
$context['tags_topics'][] = array(
'id_member' => $row['id_member'],
'poster_name' => $row['poster_name'],
'subject' => $row['subject'],
'id_topic' => $row['id_topic'],
'poster_time' => $row['poster_time'],
'num_views' => $row['num_views'],
'num_replies' => $row['num_replies'],
);
}
$smcFunc['db_free_result']($dbresult);
echo'
<div id="intro_blurbss"><div><img src="http://www.bluedevilcustoms.com/Themes/blue/images/custom/populartags.png" title="popular tags" />
<hr>
<br />
<div style="width: 100%;  height: 220px; overflow: auto;"><div align="center">';
if (isset($context['poptags']))
  echo $context['poptags'];
echo'
</div></div></div></div>';

vas

Tireless striving stretches its arm towards perfection

vbgamer45

Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Mick.

Quote from: vbgamer45 on February 04, 2011, 10:34:13 AM
Thanks bluedevel for the portal codes.

No proble bro.   I happened to have these on my sites ;)

totaltutankoll

Hi

Have I understood everything correctly that the simple portal messes up the installation of the tagging system but that I can run around this by uninstalling SP again install the tagging system and then reinstall SP?  :o
Started out with a SMF-forum a couple of years ago went on to Dynamic web (read dynamic crap) and am now back in the land of Simple Machines.

Non, je ne regrette rien!

vbgamer45

Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Advertisement: