Login  |  Register
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome, Guest. Please login or register.
Did you miss your activation email?

January 28, 2023, 07:20:06 AM

Login with username, password and session length
Members
  • Total Members: 3856
  • Latest: Bixby
Stats
  • Total Posts: 193824
  • Total Topics: 21124
  • Online today: 61
  • Online ever: 3540
  • (September 02, 2022, 06:38:54 PM)
Users Online
Users: 1
Guests: 43
Total: 44

Author Topic: [Reguest] Tag Cloud snippet  (Read 73462 times)

0 Members and 1 Guest are viewing this topic.

JPDeni

  • Guest
Re: [Reguest] Tag Cloud snippet
« Reply #30 on: August 27, 2007, 06:24:56 AM »
I don't think you can do it with the ORDER BY command. You would need to get the information for all the tags, loop through them, putting the most frequent N tags into an array and then loop through again, putting them in alpabetical order. I can try to write the code later, but it's very early in the morning where I am and I've only just woke up.

3nd3r

  • Guest
Re: [Reguest] Tag Cloud snippet
« Reply #31 on: August 27, 2007, 09:18:22 AM »
Ok. Please, take your time and thank you again :)

3nd3r

  • Guest
Re: [Reguest] Tag Cloud snippet
« Reply #32 on: September 05, 2007, 01:23:15 PM »
Hello there... Any idea about this?

Please take your time. I'm not in a hurry, just I want you to remember it.

Thanks in advance for your time  :up:

JPDeni

  • Guest
Re: [Reguest] Tag Cloud snippet
« Reply #33 on: September 05, 2007, 08:07:57 PM »
I can't work it out. Sorry. Maybe someone else has a clue.

3nd3r

  • Guest
Re: [Reguest] Tag Cloud snippet
« Reply #34 on: September 06, 2007, 12:48:55 AM »
Ok, don't worry. Maybe anybody else would be interested in trying to make it.

In addition, I will look for a code that do it and maybe could be adapted to work.

Thanks again for trying :up:

3nd3r

  • Guest
Re: [Reguest] Tag Cloud snippet
« Reply #35 on: September 10, 2007, 02:26:05 PM »
Well, I think this sentence can work...
To remember it, what I want is show the most popular N tags:
Code: [Select]
SELECT * FROM
 (
 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 t.tag DESC
 )
WHERE ROWNUM <= N
But this causes a 'hacking attemp' error...
I think I'm in the way to make it, but I need a little help...

Can anybody figure it out?

catchpen

  • Guest
Re: [Reguest] Tag Cloud snippet
« Reply #36 on: October 06, 2007, 01:00:13 AM »
This block snippet gives me an internal server error.

Does this mean I need to change something in the code to get it to retrieve from MySQL or is this a copy paster snippet? OR do I install the SMF mod then use this block?
« Last Edit: October 06, 2007, 06:39:15 PM by catchpen »

3nd3r

  • Guest
Re: [Reguest] Tag Cloud snippet
« Reply #37 on: October 10, 2007, 01:41:33 AM »
You first have to install Tagging system for topics mod: http://custom.simplemachines.org/mods/index.php?mod=579
And then you can use this snippet.

catchpen

  • Guest
Re: [Reguest] Tag Cloud snippet
« Reply #38 on: October 12, 2007, 09:11:08 PM »
You first have to install Tagging system for topics mod: http://custom.simplemachines.org/mods/index.php?mod=579
And then you can use this snippet.

Thanks I'll try it out when I get a chance. I already have the "googletagged" mod and thought that would be a nice front page center block. I'll have to read up if these 2 mods will conflict each other since they are quite similar

catchpen

  • Guest
Re: [Reguest] Tag Cloud snippet
« Reply #39 on: October 19, 2007, 11:47:32 AM »
Works perfect.  With this snippet I didn't have to manually install any part of the mod with my custom theme. Thanks.