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

Farmacija

#860
Quote from: hillrunr on May 04, 2010, 03:47:34 PM
Playing around with the SQL that appears at that line a bit. The issue is with the count in the order by clause, which apparently isn't allowed in MySQL 4.1.22. Looking at the code, initially, I'm not sure of a workaround. Any thoughts?

Here's what I currently have for the code I'm running through phpMyAdmin. If I take the count out of the order by, it works. If I don't, it produces the error in question.

SELECT t.tag AS tag
     , l.id_tag
     , COUNT(l.id_tag) AS quantity
FROM smf_tags as t
   , smf_tags_log as l
WHERE t.id_tag = l.id_tag
GROUP BY t.tag
    , l.id_tag
ORDER BY COUNT(l.id_tag) DESC
       , RAND()
LIMIT 20


UPDATE:

Find:
ORDER BY COUNT(l.id_tag) DESC

Replace with:
ORDER BY quantity

I try to run this query but i get this error again:

Invalid use of group function
File: /home/farmaceu/public_html/forum/Sources/Tags2.php
Line: 118



and once more:
This code :
http://www.simplemachines.org/community/index.php?topic=135761.msg2938361#msg2938361  gives me an error:

Fatal error: Call to undefined function tpdb_query() in /home/farmaceu/public_html/forum/Sources/Load.php(2160) : eval()'d code(114) : eval()'d code on line 7
www.farmaceuti.com
www.farmaceuti.com/tekstovi

live627

tpdb_query() is a function defined in Tiny Portal.

mitbrille

Quote from: ph4ntom on July 06, 2011, 12:55:02 PM
What code I need to use to show 'tag cloud' in board index? (I want to show it in Info Center as last table)

That's a good question. I am interested in.

live627

Doing it cross theme properly can be a pain in the rear end.

twitter

Hi I am getting an error installing this mod. I am on 2.0 and installing the latest version of this mod. Please see the attachment

Farmacija

Quote from: Farmacija on July 06, 2011, 05:07:19 PM
Quote from: hillrunr on May 04, 2010, 03:47:34 PM
Playing around with the SQL that appears at that line a bit. The issue is with the count in the order by clause, which apparently isn't allowed in MySQL 4.1.22. Looking at the code, initially, I'm not sure of a workaround. Any thoughts?

Here's what I currently have for the code I'm running through phpMyAdmin. If I take the count out of the order by, it works. If I don't, it produces the error in question.

SELECT t.tag AS tag
     , l.id_tag
     , COUNT(l.id_tag) AS quantity
FROM smf_tags as t
   , smf_tags_log as l
WHERE t.id_tag = l.id_tag
GROUP BY t.tag
    , l.id_tag
ORDER BY COUNT(l.id_tag) DESC
       , RAND()
LIMIT 20


UPDATE:

Find:
ORDER BY COUNT(l.id_tag) DESC

Replace with:
ORDER BY quantity

I try to run this query but i get this error again:

Invalid use of group function
File: /home/farmaceu/public_html/forum/Sources/Tags2.php
Line: 118

to reply to myself:

Also Sources/Tags2.php should be edited (not just database):

Find:

ORDER BY COUNT(l.id_tag) DESC


Replace with:

ORDER BY quantity

www.farmaceuti.com
www.farmaceuti.com/tekstovi

vbgamer45

Will think about that fix it might work but have to see if it returns the same data.
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

NickCJ7

great mod. I'm using 2.0 final. Was wondering if I could remove the "Tags" link from the main menu and put it in the footer. How would I go about doing this?

vbgamer45

You would need to edit Sources/Subs.php and remove the the tags code then edit index.template.php and include an html link for it.
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

mikser

#869
Useful mod, thanks!

digitalmikey

Is there anyway to call the tag cloud in SSI.php so I can use it on my web pages?

Fisch.666

Hi!

Quote from: digitalmikey on August 03, 2011, 11:34:43 PM
Is there anyway to call the tag cloud in SSI.php so I can use it on my web pages?

You can use this code to use the tag-cloud on your webpage:


<?php
require_once($sourcedir '/Tags2.php');
ViewTags();

if (isset(
$context['poptags']))
echo 
$context['poptags'];
?>



Works fine as a portamx-block.

mikser

Could you please create an option (with new user permission) for users to add/remove new/old tags to the content (any)? "Add Tags to Any Topics" and "Delete Tags From Any Topics" would be so cool!

Because right now only topic creator and moderators/admins can do that (because giving permission to everybody would likely cause a huge problem with tag-deleters, whom cannot be controlled nor punished (the lack of logs)). And, as it usually is, the topic creator forgets tagging the content. But moderators are way too busy to tag every single topic. But if every reader would be able to add tags, most certainly somebody does tagging (and if problem occurs, topic starter or moderators can easily delete incorrect tags).

effex

Mikser's idea is a great one, a permission for non-thread starters to add tags to the thread would be very helpful.

digitalmikey

Tags aren't showing at all in my forum. Installation was successful. I put tags in a thread, save, and come back and they are gone. Also, nothing is showing in the tag cloud.

vbgamer45

What settings do  you have for the tag cloud
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

digitalmikey

Default settings. Now tags are only showing for new topics. If I try to input tags for older topics they won't show. Is this supposed to happen?

Also, tags don't stay in the tag field after you input them on a post and go back to modify it, is this also intended?

Great mod though. Anything to help with SEO is great!

Kimmie

#877
reinstalled the updated mod after I upgraded to SMF 2.0 Gold last week and I am having an issue.

I have it to where folks can only add/remove tags to their own posts (the setting called Moderate Tags is UNchecked).. but I am seeing some people adding tags to other peoples posts. Is there another setting I am missing somewhere?


Thanks :)


Also, is there any way we can get the tags on the tag cloud page to where they can be lined up like in columns instead of being all crammed together? That sure would make them alot easier for folks to see each indivual tag

katmai

quick question. is there any way to automatically set as topic meta tags, the tags that are set for that specific topic?

vbgamer45

Quote from: katmai on October 07, 2011, 12:57:16 PM
quick question. is there any way to automatically set as topic meta tags, the tags that are set for that specific topic?
Not at the moment but you can code it.
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: