News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Tagging System For Topics

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

Previous topic - Next topic

casp3r

Doesn't show, but then again this seems to be down to TinyPortal. Uninstalled it and some things just don't seem right :(
Aviation forum & gallery
www.niaviation.co.uk

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

casp3r

Nope, no space and index.php?action=tags;sa=admin doesn't seemed to work either. Seems TP has really screwed up my board :(
Aviation forum & gallery
www.niaviation.co.uk

Gourgi

Quote from: casp3r on March 17, 2007, 07:07:56 PM
Nope, no space and index.php?action=tags;sa=admin doesn't seemed to work either. Seems TP has really screwed up my board :(
did you installed TP 0.98 ?
i use SMF1.1.2 + TP 0.98 + lots of mods and this mod works great in the default theme.

BTW vbgarer45 thanks for the mod ;)

i'll come back with feature requests-suggestions :D
Όσο ζώ, μαθαίνω ...

dsanchez

#84
Quote from: v2.web on February 15, 2007, 07:43:20 PM
EDIT:
I changed
//Tagging System
echo '<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="windowbg">
<b>', $txt['smftags_topic'], '</b>';

in display.template.php to
//Tagging System
echo '<b>', $txt['smftags_topic'], '</b>';

I don't know how, but the pages (postings) now pass validation.


Hi guys, I think It would be better to use this:

Quote

<!-- Tagging System -->
<strong>', $txt['smftags_topic'], '</strong>';
foreach ($context['topic_tags'] as $i => $tag)
{
echo '<a href="' . $scripturl . '?action=tags;id=' . $tag['ID_TAG']  . '">' . $tag['tag'] . '</a>&nbsp;';
if(!$context['user']['is_guest'])
echo '<a href="' . $scripturl . '?action=tags;sa=deletetag;id=' . $tag['ID']  . '">
<span style="color:#f00;">[X]</span></a>&nbsp;';
}

if(!$context['user']['is_guest'])
echo '&nbsp;<a href="' . $scripturl . '?action=tags;sa=addtag;topic=',$context['current_topic'], '">' . $txt['smftags_addtag'] . '</a>

<!-- End Tagging System -->


Cause I don't think it's necesary to show the users where the Tagging System starts and finish. By the way I did copy that piece of code right before

<a name="lastPost"></a>';

in the Display.Template.php file.

Also the W3C recommend the use of <strong> over <b> I think.

Cheers

David.

dsanchez

#85
For a future version of this cool mod, it would be nice that we are able to show the popular tags in a box, also in the frontpage, something like this: http://communityserver.org/forums/

:D

Cheers,

David.

dsanchez

Hello there,

I am testing the tagging system, but something seems wrong.

I added the tag "1986" to many topics, meaning this tag is the most popular and, hence, should be shown on the Popular tags page with the biggest size. However, this does not happen:

http://www.curefans.com/index.php?action=tags

There, the biggest is "2005", but if you compare the number of topics that use "1986" you will notice this one should have the biggest letters.

Topics using "2005"
http://www.curefans.com/index.php?action=tags;id=55

Topics using "1986"
http://www.curefans.com/index.php?action=tags;id=23

What's wrong?  :(

Thanks

David.



dsanchez

Actually I've found the problem. It seems the system shows the "Popular tags" BUT among the "Recents tags". The "1986" I did create was one of the firsts ones, hence, it was not shown among all the popular tags.

Temporaly I did change the line:

ORDER BY l.ID DESC LIMIT 50";

to

ORDER BY l.ID DESC LIMIT 80";

in the Sources/Tags.php file.

However this does not really solves the problem...

Any help will be appreciated!

thanks

David.







inet_man

This is a great mod. Here's how I want to use the TAG feature in SMF 1.1.2+:

1) Admin (or Global Moderator) with CREATE TAG permission will add/change/inactivate(not delete) a series of Domain Tags in the TAG DB.
2) The creator (owner) of a Topic (or Admin/Moderator with SELECT/UNSELECT TAG permission) can Select or Unselect one or more existing Domain Tags from the TAG DB via DropDown List or checkBox(s).
3) Members with TAG SEARCH permission will be able to Advanced Search for Topics (Query-by-Example /QBE would be nice) with multiple TAGS and boolean conditions (only viewing results matching their access rights, of course).
4) Most (Recent) Popular Tag feature is not needed.

Any ideas and MOD code to accomplish this will be greatly appreciated.

Keep up the good work!

THX

tsmalmbe

5. The admin could restrict tagging to specific forums. A comme separated list of inclusions OR exclusions would be nice.
..:: http://www.kontrollrummet.com - Studio och musik ::.. RSS?

Asgard

Hi vbgamer, i was looking exactly what your mod does, i installed and got errors in the installation that i was capable of solving, but i'm stuck with this error without apparent reason, maybe you can throw me a light on this...

I get this error:

QuoteYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
File: /var/www/html/foros/Sources/Post.php
Line: 1628

Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 1.1.2, while your database is at version 1.1.1. The above error might possibly go away if you execute the latest version of upgrade.php.

The line pointed by the error message is this one (first uncommented line):


  //Get how many tags there have been for the topic
  $dbresult = db_query("SELECT COUNT(*) as total FROM {$db_prefix}tags_log WHERE ID_TOPIC = " . $topic, __FILE__, __LINE__);
  $row = mysql_fetch_assoc($dbresult);
  $totaltags = $row['total'];
  mysql_free_result($dbresult);


I have executed the line in PhpMyAdmin and got the expected result (replacing the variables) but when running the script, it will always fail pointing to the same line...

I would appreciate any help on this, and great mod, by the way.

Regards

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

Asgard

The code before it is the working post.php before installing the TAGS mod. 

I post the code again, including the lines before:

QuotecreatePost($msgOptions, $topicOptions, $posterOptions);

    //Tagging System
     if(isset($_REQUEST['tags']) && !isset($_REQUEST['num_replies']))
     {
        //Get how many tags there have been for the topic
        $dbresult = db_query("SELECT COUNT(*) as total FROM {$db_prefix}tags_log WHERE ID_TOPIC = " . $topic, __FILE__, __LINE__);
        $row = mysql_fetch_assoc($dbresult);
        $totaltags = $row['total'];
        mysql_free_result($dbresult);

Thanks for your reply.

MrPrise

Nice mod. It took some times to recognize you code the mod to ignore any errors in the language files and that was the reason why I saw nothing instead of the texts ;-)


tL0z

Hello,

My users were asking for tags so I installed this mod. Congrats for the great job! :)

I would like to make some modifications, can you help me?

-I want to have an output of all the tags in the MessageIndex. How can I do it? Like: "Tags: Wii, DS, GC, N64"...
-Is it possible to, when I click on the tag in a specific board MessageIndex, only appear topics from that board?

Thanks! :)

tL0z


fabio

i`ve made a small modification-addition to this mod.

in the way i think of tags the words in the subject should also be counted.

so i added in post.php before

//Check Tag restrictions
$tags = explode(',',htmlspecialchars($_REQUEST['tags'],ENT_QUOTES));


this

if(isset($_REQUEST['subject']) {
$_REQUEST['subject']=str_replace(' ',',',$_REQUEST['subject']);
        $_REQUEST['tags']=$_REQUEST['tags'].','.$_REQUEST['subject'];
}


ps sorry if it`s complete wrong (codingwise) but my php coding knowledge is pretty limited

gerard2003

#97
I experienced this bug :

Erasing a thread do not suppress occurrences of related tags.

For example, I had only one thread with a tag called "fridge".
When erasing this thread, the tag "fridge" have not been removed and now point on no thread.


Except this bug, it works fine and it is a very useful mod.
By the way, I suggest you to had settings in admin panel in order to set behaviors :

  • tags cloud listed by popularity on a specified time range - week/month/all time
  • a way to specify a popularity threshold. For example, display only tags with at least X occurrences
  • (this one is a kind of mix of the two suggestions above) a way to define a tag limit : For example, display only the N tags with most occurrences on a specified time range
  • order the tags cloud alphabetically

Like this it will totally be perfect.. (at least for me   ;) )

Good luck, it is a very nice mod!

rosiem

When I add the same tags to different threads it seems to create duplicates in the tag cloud (instead of adding it to the existing tag)??

dsanchez

Quote from: rosiem on April 22, 2007, 12:32:18 PM
When I add the same tags to different threads it seems to create duplicates in the tag cloud (instead of adding it to the existing tag)??

this happen when you let spaces between commas.

correct:

tag1,tag2,tag3

incorrect:

tag1, tag2, tag3

Advertisement: