Facebook  Twitter 

SMFHacks.com

+- +-

SMFHacks.com

+- User Information

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+- Forum Stats

Members
Total Members: 12400
Latest: mikel
New This Month: 5
New This Week: 0
New Today: 0
Stats
Total Posts: 40609
Total Topics: 7132
Most Online Today: 121
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 115
Total: 115

Author Topic: [Mod] Tagging System  (Read 123522 times)

0 Members and 1 Guest are viewing this topic.

Offline dazzledark

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: [Mod] Tagging System
« Reply #90 on: May 08, 2010, 03:50:53 pm »
http://www.meydangorusu.com/forum/index.php?action=tags

Invalid use of group function
Dosya: /vhosts/meydangorusu.com/http/forum/Sources/Tags.php
Satır: 106

how can i fix this_?

Hello,

i have same error, what can i do?

Thank you & nice WE

nico
bilgi@meydangorusu.com this is my msn addresse. add me, i will help you.

Offline poorfool

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: [Mod] Tagging System
« Reply #91 on: April 17, 2011, 06:47:32 am »
Hi,
I just installed it but there is no text on the posting page near the form because im not using english as default,
i dont need to translate it.. just how i can see the original english version on another language set?
the problem other that how is if i touch the source ill f*ck up somewhere when installing other mod or such,
any help?

Offline mmarak524

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: [Mod] Tagging System
« Reply #92 on: April 26, 2011, 12:52:07 pm »
I was wondering if you tell me how I can change the cloud to be sort by alpha?  I am not sure what part of the coding controls the displace on the tag link.

 

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 15291
    • View Profile
Re: [Mod] Tagging System
« Reply #93 on: April 26, 2011, 12:55:39 pm »
Would be in Tags.php in the Sources folder
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline mmarak524

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: [Mod] Tagging System
« Reply #94 on: April 26, 2011, 01:27:12 pm »
Wow that was quick.   ;D


Okay I am looking through that, but I am new to php so I don't know all the language yet.   But from what little I have been able to learn, I would be looking at this section of the code right?

Code: [Select]
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 COUNT(l.ID_TAG) DESC, RAND() LIMIT " .  $modSettings['smftags_set_cloud_tags_to_show']);


would this then work to get it to go in alpha order?

Code: [Select]
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_TAG DESC, RAND() LIMIT " .  $modSettings['smftags_set_cloud_tags_to_show']);



Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 15291
    • View Profile
Re: [Mod] Tagging System
« Reply #95 on: April 26, 2011, 01:32:16 pm »
Change
  ORDER BY l.ID_TAG DESC
To
  ORDER BY t.tag ASC
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline mmarak524

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: [Mod] Tagging System
« Reply #96 on: April 26, 2011, 01:35:38 pm »
yea! that worked.  You are so wonderful.  Thank you show much!

Offline 420connect

  • Jr. Member
  • **
  • Posts: 58
    • View Profile
Re: [Mod] Tagging System
« Reply #97 on: January 25, 2015, 08:13:55 am »
Kept getting "database error" when trying to use your action=modtracker feature..

anyway:

Using this for a while now and really like the features it provides, although I do have 2 Ideas/Suggestions for this Mod..

1) Portal Block Integration
(small version of tag cloud)
can be added to portal block by adding {}show_tagcloud to a PHP block or something similar..

.. I'd personally use this in place of having the whole page for tags.

2) #hashtag feature
- any use of #wordhere gets added to the tag cloud

alike the hashtag feature used in popular social media sites..


Kind Regards

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 15291
    • View Profile
Re: [Mod] Tagging System
« Reply #98 on: January 25, 2015, 09:03:40 am »
The modtracker should be retired at this point no longer using it.

Check out this post on a portal block I have one built into ezportal but here is one for tinyportal that may work for others as well
http://www.smfhacks.com/index.php/topic,8601.msg37056.html#msg37056


hashtag would be harder would have to scan the post at creation time but it a nice idea to do one day.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline 420connect

  • Jr. Member
  • **
  • Posts: 58
    • View Profile
Re: [Mod] Tagging System
« Reply #99 on: January 25, 2015, 10:19:27 am »
sure thing, re: modtracker (came from SMF.org support thread)

& thanks for the portal block pointer,
I'll play around with the code and see what I can get showing..

re: hashtag
awesome.. I'd consider having this made as a custom mod if the price was right?  ;D

Offline 420connect

  • Jr. Member
  • **
  • Posts: 58
    • View Profile
Re: [Mod] Tagging System
« Reply #100 on: January 25, 2015, 10:31:09 am »
Hmm, PHP and me don't get on well..  :'(

Could you tweak the below to display the order of most popular rather than A > Z
it also, doesn't seem to have any font size differences on my screen?

Code: [Select]
global $scripturl, $smcFunc;

$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 t.tag LIMIT {int:limit}',
array('limit' => 10)
);

$tags = array();
$tags2 = array();

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

$smcFunc['db_free_result']($result);

if(count($tags2) > 0)
{
// change these font sizes if you will
$max_size = 100; // max font size in %
$min_size = 100; // 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 = 1;
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;id=' . $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 > 1)
{
$poptags .= '<br />';
$row_count =1;
}
}
}
echo  $poptags;

Thank you

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 15291
    • View Profile
Re: [Mod] Tagging System
« Reply #101 on: January 25, 2015, 03:31:58 pm »
These settings in the code affect font size
   $max_size = 100; // max font size in %
   $min_size = 100; // min font size in %

Change
Code: [Select]
ORDER BY t.tag
To
Code: [Select]
Order by quantity
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline 420connect

  • Jr. Member
  • **
  • Posts: 58
    • View Profile
Re: [Mod] Tagging System
« Reply #102 on: January 25, 2015, 03:46:15 pm »
These settings in the code affect font size
   $max_size = 100; // max font size in %
   $min_size = 100; // min font size in %

Change
Code: [Select]
ORDER BY t.tag
To
Code: [Select]
Order by quantity


Hmm


Code: [Select]
global $scripturl, $smcFunc;

$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 quantity LIMIT {int:limit}',
array('limit' => 10)
);

$tags = array();
$tags2 = array();

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

$smcFunc['db_free_result']($result);

if(count($tags2) > 0)
{
// change these font sizes if you will
$max_size = 100; // max font size in %
$min_size = 50; // 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 = 1;
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;id=' . $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 > 1)
{
$poptags .= '<br />';
$row_count =1;
}
}
}
echo  $poptags;

gives this error:

You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY null
LIMIT 10' at line 4
File: /home/connec31/public_html/forum/Sources/PortalBlocks.php(3587) : eval()'d code
Line: 9

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 15291
    • View Profile
Re: [Mod] Tagging System
« Reply #103 on: January 25, 2015, 03:48:22 pm »
Guess that part doesn't work.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline Web Presence Consulting

  • Newbie
  • *
  • Posts: 4
  • (T)ogether (E)veryone (A)chieves (M)ore
    • View Profile
    • Web Presence Consulting
Re: [Mod] Tagging System
« Reply #104 on: February 25, 2017, 09:06:32 am »
Just a general comment about the usefulness of this module, its great, been using it for years and studying spider reactions/activity closely reveals that search engines respond well to adding tags to posts, when you combine this module with the Cumulus Congestus module and also tie it in with the Downloads Module keywords feature well its just gravy, I might add that tying it to the other modules is fairly simple... there's also a great hack I picked up years ago on the SMF Support site that displays the board name in the Tags main menu list
Best Regards,
Bob Perry




"The world is moving so fast these days that the man who says it can't be done is generally interrupted by someone doing it." Elbert Hubbard

 

Related Topics

  Subject / Started by Replies Last post
0 Replies
2919 Views
Last post July 06, 2007, 09:06:45 pm
by GenoDemoN
5 Replies
5327 Views
Last post November 09, 2007, 06:39:44 pm
by cru
1 Replies
2486 Views
Last post February 04, 2013, 02:06:54 pm
by SMFHacks
7 Replies
7328 Views
Last post December 11, 2013, 01:20:36 am
by Zavoolon
2 Replies
3333 Views
Last post October 21, 2013, 12:05:37 pm
by insider

+- Recent Topics

Forum ToolBox by Monocero
January 23, 2021, 11:47:48 am

Gallery Pro v8.0 and PHP 7.4 by SMFHacks
January 20, 2021, 10:21:25 pm

[Mod] Tagging System by SMFHacks
January 13, 2021, 08:43:33 pm

Using Alternate PayPal Address by KKOG
January 13, 2021, 07:24:46 pm

Assigning a BuyNow Button to a product by SMFHacks
January 12, 2021, 04:59:32 pm

SMF Links by Nicole
January 10, 2021, 12:02:39 pm

Error on the latest version by davejo
January 06, 2021, 08:04:05 am

Recent topics on board index by eugen
January 01, 2021, 11:08:16 am

Parser by swayforth
December 31, 2020, 12:24:23 am

Show Gallery in Users Profile by swayforth
December 29, 2020, 10:37:17 pm

Powered by EzPortal