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

tarantula901

Quote from: vbgamer45 on December 04, 2019, 02:32:12 PM
Sorry was tired change it to
GROUP BY l.ID_TAG, t.tag


Thanks solved the problem

neilbombd

Dying to get this brilliant mod running again. Couple of problems though:

Tag cloud page says this:

QuoteExpression #1 of ORDER BY clause is not in SELECT list, references column 'cookd.l.ID' which is not in SELECT list; this is incompatible with DISTINCT
File: /var/www/cookdandbombd.co.uk/forums/Sources/Tags2.php
Line: 193

And tags with apostrophes are showing as eg

test'

Instead of test'

vbgamer45

For the first error are you on the latest version?
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

neilbombd

Yeah, all updated, we got that one fixed by making a small edit to the script.

Still getting the problem with apostrophes, which I seem to remember being down to the encoding or something used for the database...? Any ideas what exactly needs fixed there?

vbgamer45

I believe we encode with htmlspecialchars on tag input.
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

SMFHacks.com Team

3.0.2
!Fixed a groupby error on SMF 2.0.x for some configurations of MySQL
Disclaimer: SMFHacks.com Team is not affiliated with the SMF Team or the SimpleMachines NPO.
SMFHacks.com -  Paid Modifications for SMF
Latest Mods:
Community Suite
Newsletter Pro SMF Gallery Pro SMF Classifieds SMF Store

Bobby

Thanks SMFHacks team! I've installed mod manually for SMF2.1 RC2, it works perfectly!

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

Bobby

Yes, I did some changes to emulate with 2.1 and it works fine!  ;)
Between, is there still missing ", t.tag" in Tag2.php on your lasted updated mod?
Quote from: vbgamer45 on December 04, 2019, 02:32:12 PM
Sorry was tired change it to
GROUP BY l.ID_TAG, t.tag

vbgamer45

That should have been fixed in
3.0.2
!Fixed a groupby error on SMF 2.0.x for some configurations of MySQL
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

tarantula901

If there is a tag on the deleted topic, those tags are not deleted from the table.

vbgamer45

Yes, That should be fixed at some point.
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

tarantula901

Quote from: vbgamer45 on May 11, 2020, 06:51:26 AM
Yes, That should be fixed at some point.

I hope something is done for this

shadav

slight issue....
installed this onto a heavily modified 2.0.17 with a modified default theme

it mostly works.....one issue though, when editing a post and placing tags into the whatsitwhoisit field box thingie :p
tags do not save
after editing the post I can click underneath on the add tags and it'll add tags

and a side note....any way to make the tags urls work with pretty urls?
so it'd be something like url/tags/TAGNAME

shadav

still haven't fixed the above issue but a few modifications if anyone's interested

on the tags page removed the list of latest tagged threads, you can still click on a tag and see all threads with that tag

in Tags2.template.php

find and remove
  <br />

  <table border="0" cellpadding="0" cellspacing="0" align="center" width="95%">

  <tr>

  <td align="center"  class="catbg">',$txt['smftags_latest'], '



  </td>

  </tr>

  <tr>

  <td align="center" class="windowbg2">

  <table border="0" width="100%" cellspacing="1" cellpadding="4" class="bordercolor">

<tr>

<td class="catbg3">',$txt['smftags_subject'],'</td>

<td class="catbg3" width="11%">',$txt['smftags_topictag'],'</td>

<td class="catbg3" width="11%">',$txt['smftags_startedby'],'</td>

<td class="catbg3" width="4%" align="center">',$txt['smftags_replies'],'</td>

<td class="catbg3" width="4%" align="center">', $txt['smftags_views'], '</td>

</tr>';

foreach ($context['tags_topics'] as $i => $topic)

{

echo '<tr>';

echo '<td class="windowbg2"><a href="' . $scripturl . '?topic=' . $topic['id_topic'] . '.0">' . $topic['subject'] . '</a></td>';

echo '<td class="windowbg2"><a href="' . $scripturl . '?action=tags;tagid=' . $topic['ID_TAG'] . '">' . $topic['tag'] . '</a></td>';

echo '<td class="windowbg"><a href="' . $scripturl . '?action=profile;u=' . $topic['id_member'] . '">' . $topic['poster_name'] . '</a></td>';

echo '<td class="windowbg2">' . $topic['num_replies'] . '</td>';

echo '<td class="windowbg2">' . $topic['num_views'] . '</td>';

echo '</tr>';



}

echo '



  </tr>

  </table>

  </td></tr></table>


remove the popular tags header (as I'm displaying all tags on the page)
find and remove
  <tr>

  <td align="center"  class="catbg">',$txt['smftags_popular'], '



  </td>

  </tr>


since I'm displaying all tags, change the page title from Popular Tags to just Tags
in Tags2.php
find
$context['page_title'] = $mbname . ' - ' . $txt['smftags_popular'];
replace with
$context['page_title'] = $mbname . ' - ' . $txt['smftags_menu'];

and let's add some customization to the tags
still in Tags2.php
find
$context['poptags'] .= '<a href="' . $scripturl . '?action=tags;tagid=' . $tags2[$key] . '" style="font-size: '.$size.'%"';
replace with
$context['poptags'] .= '<a href="' . $scripturl . '?action=tags;tagid=' . $tags2[$key] . '" class="tags" style="font-size: '.$size.'%"';

in index.css
add
.tags {
    list-style-type: none;
    display: inline-block;
    text-align: center;
    background: none;
    border-radius: 5px;
    background-color: #000;
    padding: 5px 15px;
    margin: 5px;
    font-weight: bold;
}
.tags:hover {
    background-color: #fff;
color: #000;
}

play with to however you like

to add the customization to the tags in threads
in Display.template.php
find
echo '<a href="' . $scripturl . '?action=tags;tagid=' . $tag['ID_TAG']  . '">' . $tag['tag'] . '</a>&nbsp;';
replace with
echo '<a href="' . $scripturl . '?action=tags;tagid=' . $tag['ID_TAG']  . '" class="tags">' . $tag['tag'] . '</a>&nbsp;';


now just need to figure out how to display the tags in the topic listing on the messageindex.template.php

vbgamer45

The tagging function for pretty urls is addon part of extras package https://www.smfhacks.com/index.php/topic,9675.0.html
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

shadav


FragaCampos

Hi there.
I use this mod for several years and I did some changes here and there to adjust to my forum.
Although it's an older version than the present one, it works ok, but it has a major problem: guests can add tags, although the permission is set otherwise in the admin panel.

Since I'm very wary about installing the most recent version, can this be solved just by changing some part of the code?

vbgamer45

Yes it could be by using is_not_guest logic
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

FragaCampos

Sorry, I wrote "guests" by I wanted to write "regular users".

Advertisement: