TinyPortal

Development => Block Codes => Topic started by: soMzE on February 28, 2007, 06:11:07 PM

Title: [Reguest] Tag Cloud snippet
Post by: soMzE on February 28, 2007, 06:11:07 PM
Hello all!

I have recently installed This (http://custom.simplemachines.org/mods/index.php?mod=579) mod from SMF and my members are really enjoying it  :)

Is it possible to add the Tag Cloud in a block snippit?

My coding skills aren't that great ( none lol ) so i thought i'll ask it here with all the master coders  ;D

Title: Re: [Reguest] Tag Cloud snippet
Post by: JPDeni on February 28, 2007, 06:20:37 PM
After a few false starts, this is the code that works. Put the following in a php box:

Code (FOR SMF1.x) Select

global $db_prefix, $scripturl;
$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 l.ID DESC LIMIT 50";

$result = db_query($query, __FILE__, __LINE__);

$tags = array();

$tags2 = array();

while ($row = mysql_fetch_array($result))
{
    $tags[$row['tag']] = $row['quantity'];
    $tags2[$row['tag']] = $row['ID_TAG'];
}

if(count($tags2) > 0)
{
// change these font sizes if you will
$max_size = 250; // 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 = 0;
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 > 5)
   {
    $poptags .= '<br />';
    $row_count =0;
   }
}
}
echo $poptags;


Code (For SMF2) 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 l.ID DESC LIMIT {int:limit}',
array('limit' = 50)
);

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

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

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

if(count($tags2) > 0)
{
// change these font sizes if you will
$max_size = 250; // 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 = 0;
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 > 5)
{
$poptags .= '<br />';
$row_count =0;
}
}
}
echo $poptags;

Title: Re: [Reguest] Tag Cloud snippet
Post by: soMzE on February 28, 2007, 06:22:53 PM
Ahh thank you JPDeni, would be really great if you can do this  ;D
Title: Re: [Reguest] Tag Cloud snippet
Post by: JPDeni on February 28, 2007, 06:28:38 PM
I can't test it out, because I don't have the mod installed, but it looks like you should be able to use the code from the mod in a block.

[bad code removed to prevent confusion]
Title: Re: [Reguest] Tag Cloud snippet
Post by: soMzE on February 28, 2007, 06:36:47 PM
I'm sorry, i tried it in a scriptbox, phpbox and htmlbox and it's not working yet :(

With the phpbox i get a parse error:

Parse error: syntax error, unexpected $end in /home/..............public_html/forum/Sources/Load.php(1753) : eval()'d code(35) : eval()'d code on line 70

and with the scriptbox you see the whole code appearing..
Title: Re: [Reguest] Tag Cloud snippet
Post by: JPDeni on February 28, 2007, 06:52:06 PM
It goes into a php box. (I always forget to mention that. Sorry. :) ) Just about everything that I write goes into a php box.

[bad code removed to prevent confusion]

If this doesn't work, I don't know what to say. I can't test it unless I install the mod, and I don't want to install the mod.
Title: Re: [Reguest] Tag Cloud snippet
Post by: soMzE on February 28, 2007, 07:12:15 PM
I'm sorry, it isn't working, now the block stays empty.. Is there anything i can do so it's easier for you to see what the problem can be?  :)

Title: Re: [Reguest] Tag Cloud snippet
Post by: JPDeni on February 28, 2007, 07:30:52 PM
I suppose you could give me full admin rights to your site. But not today. I'm going to be offline for the rest of the day.
Title: Re: [Reguest] Tag Cloud snippet
Post by: soMzE on February 28, 2007, 10:24:30 PM
Quote from: JPDeni on February 28, 2007, 07:30:52 PM
I suppose you could give me full admin rights to your site. But not today. I'm going to be offline for the rest of the day.

Ofcourse, no problem.. please let me know when you have some time to do this :) Thanks again JPDeni :)
Title: Re: [Reguest] Tag Cloud snippet
Post by: JPDeni on March 01, 2007, 01:24:45 AM
My migraine lifted (thank goodness for drugs!), so if you want to set up an account for me where I can access the blocks and the error log on your site, I'll see if I can figure out what the problem is. Send me a private message with a link to your site and the account info.
Title: Re: [Reguest] Tag Cloud snippet
Post by: JPDeni on March 01, 2007, 02:06:12 PM
Well, now don't I feel like a doofus?  :uglystupid2:

After working on your site for a little bit, I found the problem. There was no command to actually print them out.  :2funny:

I've added the right code to your site and edited it here for others to use.

Blame it on the migraine. Yeah, that's it!!  ::)
Title: Re: [Reguest] Tag Cloud snippet
Post by: soMzE on March 01, 2007, 02:20:38 PM
YOUR AWESOME!!!  ;D It looks really cool!! Me so happy now haha, don't know what to say.. my first request here, it's a special day today LOL

And to bad you have these migraines JPDeni, it's not nice.. but still, you're great!  ;D

If others are to use this code, to reduce the number of populair tags change:

ORDER BY l.ID DESC LIMIT 25";

Can't thank you enough!!  :laugh:



Title: Re: [Reguest] Tag Cloud snippet
Post by: JPDeni on March 01, 2007, 02:27:45 PM
LOL! Well, I'm glad I figured it out and I'm glad you are happy with the results. It does look cool.

The migraines aren't fun, to be sure, but I'm used to them. They just sorta get in the way of thinking sometimes.
Title: Re: [Reguest] Tag Cloud snippet
Post by: soMzE on March 01, 2007, 02:57:15 PM
Yes i'm really happy with the results!  :)

One question, when i reduce the number of tags in the snippit, this also affects the main page of Tag Modification, is there a way to only reduce them in the block?  :)
Title: Re: [Reguest] Tag Cloud snippet
Post by: JPDeni on March 01, 2007, 03:06:16 PM
I think it may be because of the variable used. See if this works:

[code moved to second post in topic]
Title: Re: [Reguest] Tag Cloud snippet
Post by: soMzE on March 01, 2007, 03:12:22 PM
That works great!!  ;D Shall i update the first post with this new code JPDeni?
Title: Re: [Reguest] Tag Cloud snippet
Post by: JPDeni on March 01, 2007, 03:21:31 PM
I'll update my posts with the correct code and clean things up a bit for future reference. I'm sure there will be others who will be interested in using this.
Title: Re: [Reguest] Tag Cloud snippet
Post by: whatever on March 05, 2007, 06:22:02 PM
JPDeni:
The code generates a tag cloud just fine, thanks you  8)
A question, please - it is supposed to produce texts of varying size, because it does not do that for me?
Thanks
Title: Re: [Reguest] Tag Cloud snippet
Post by: JPDeni on March 05, 2007, 06:26:41 PM
Yes, it is, if the members have different numbers of posts. If all of them listed have the same number of posts, then the text would all be the same size.
Title: Re: [Reguest] Tag Cloud snippet
Post by: whatever on March 05, 2007, 08:44:47 PM
Then I have a problem, as the members listed have different numbers of posts, yet the font size remains the same.
I am using the code from the second post:
]global $db_prefix, $scripturl;
$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 l.ID DESC LIMIT 50";

$result = db_query($query, __FILE__, __LINE__);

$tags = array();

$tags2 = array();

while ($row = mysql_fetch_array($result))
{
    $tags[$row['tag']] = $row['quantity'];
    $tags2[$row['tag']] = $row['ID_TAG'];
}

if(count($tags2) > 0)
{
// change these font sizes if you will
$max_size = 250; // 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 = 0;
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 > 5)
   {
    $poptags .= '<br />';
    $row_count =0;
   }
}
}
echo $poptags;
Title: Re: [Reguest] Tag Cloud snippet
Post by: JPDeni on March 06, 2007, 12:59:08 AM
I'm sorry. I was thinking of the Poster Cloud. Too many clouds! :)

Yes, the tags should be different sizes, depending on how many posts there are with each tag. I know that it worked for soMzE, because I saw it on his site. Can I get a link to your site?
Title: Re: [Reguest] Tag Cloud snippet
Post by: bathgate on July 02, 2007, 01:12:12 AM
thanks tiny portal i have been drinking coffee all day working trying to figure this out ..........
thanks alot you guys rock

cheers
Title: Re: [Reguest] Tag Cloud snippet
Post by: forumsbg.net on July 03, 2007, 01:44:04 PM
10x for the code i'll use this for sure
Title: Re: [Reguest] Tag Cloud snippet
Post by: 3nd3r on August 22, 2007, 11:33:37 AM
Thanks for this! It works like a charm!

Congrats JPDeni !!
Title: Re: [Reguest] Tag Cloud snippet
Post by: 3nd3r on August 22, 2007, 11:58:26 AM
Just began to use your fantastic block code, I've have one question:

Is it posssible to show the tags in alphabetical order instead the actual one (new tags first)?

Thanks in advance for your time
Title: Re: [Reguest] Tag Cloud snippet
Post by: JPDeni on August 22, 2007, 02:14:58 PM
You could try changing


ORDER BY l.ID DESC LIMIT 50


to


ORDER BY t.tag LIMIT 50
Title: Re: [Reguest] Tag Cloud snippet
Post by: 3nd3r on August 22, 2007, 02:48:00 PM
Thanks for your quick answer.

It's ok... But the order is reversed... I mean it's Z-A instead of A-Z

Thnak you again for your time
Title: Re: [Reguest] Tag Cloud snippet
Post by: JPDeni on August 22, 2007, 02:51:17 PM
Try


ORDER BY t.tag ASC LIMIT 50
Title: Re: [Reguest] Tag Cloud snippet
Post by: 3nd3r on August 22, 2007, 04:31:55 PM
Simply perfect! :D Thank you very much!
Title: Re: [Reguest] Tag Cloud snippet
Post by: 3nd3r on August 27, 2007, 12:53:45 PM
Excuse me for annoying you with my requestings. I'm not an SQL expert and I'd like to make you another question...  ::)

So, I want to show "N" tags in my block, and I want to show most popular ones and alphabetically...

I was trying this:
ORDER BY l.ID, t.tag ASC LIMIT 50";
and this:
ORDER BY t.tag, l.ID ASC LIMIT 50";

but none of these works like I want...

Sorry for disturbing you with my askings. Take your time for this. I'm not in a hurry.

Thanks in advance for your time JPDeni.
Title: Re: [Reguest] Tag Cloud snippet
Post by: JPDeni on August 27, 2007, 01:24:56 PM
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.
Title: Re: [Reguest] Tag Cloud snippet
Post by: 3nd3r on August 27, 2007, 04:18:22 PM
Ok. Please, take your time and thank you again :)
Title: Re: [Reguest] Tag Cloud snippet
Post by: 3nd3r on September 05, 2007, 08: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:
Title: Re: [Reguest] Tag Cloud snippet
Post by: JPDeni on September 06, 2007, 03:07:57 AM
I can't work it out. Sorry. Maybe someone else has a clue.
Title: Re: [Reguest] Tag Cloud snippet
Post by: 3nd3r on September 06, 2007, 07: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:
Title: Re: [Reguest] Tag Cloud snippet
Post by: 3nd3r on September 10, 2007, 09:26:05 PM
Well, I think this sentence can work...
To remember it, what I want is show the most popular N tags:
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?
Title: Re: [Reguest] Tag Cloud snippet
Post by: catchpen on October 06, 2007, 08: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?
Title: Re: [Reguest] Tag Cloud snippet
Post by: 3nd3r on October 10, 2007, 08: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.
Title: Re: [Reguest] Tag Cloud snippet
Post by: catchpen on October 13, 2007, 04:11:08 AM
Quote from: 3nd3r on October 10, 2007, 08: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.

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
Title: Re: [Reguest] Tag Cloud snippet
Post by: catchpen on October 19, 2007, 06:47:32 PM
Works perfect.  With this snippet I didn't have to manually install any part of the mod with my custom theme. Thanks.
Title: Re: [Reguest] Tag Cloud snippet
Post by: catchpen on October 26, 2007, 03:25:24 PM
OK spoke too soon, Please help -

Does anyone know how to implement a better word wrap on this? I have this on a narrow side panel and it doesn't obey the panel px settings in the TP admin page. The big font (which I did decrease max size to ~200) rolls off the side of the page or older versions of IE it increases the panel size for it to fit.

Thanks ahead,
C.P.
Title: Re: [Reguest] Tag Cloud snippet
Post by: falguni1 on January 09, 2008, 12:34:31 PM
I want to show tags from a single board like tag cloud from single board.
Title: Re: [Reguest] Tag Cloud snippet
Post by: SteveW on January 14, 2008, 10:00:45 PM
Quote from: catchpen on October 26, 2007, 03:25:24 PM
Does anyone know how to implement a better word wrap on this? I have this on a narrow side panel and it doesn't obey the panel px settings in the TP admin page. The big font (which I did decrease max size to ~200) rolls off the side of the page or older versions of IE it increases the panel size for it to fit.

I'd also like to implement this. Is there a way of echoing the output so it is centered and justified?

Many thanks
Title: Re: [Reguest] Tag Cloud snippet
Post by: falguni1 on January 24, 2008, 02:13:50 PM
Quote from: falguni1 on January 09, 2008, 12:34:31 PM
I want to show tags from a single board like tag cloud from single board.

any help.
Title: Re: [Reguest] Tag Cloud snippet
Post by: JPDeni on January 24, 2008, 02:33:45 PM
QuoteI want to show tags from a single board like tag cloud from single board.

I don't know what that means. Could you reword your request? Possibly an example of what you want would help.
Title: Re: [Reguest] Tag Cloud snippet
Post by: falguni1 on January 24, 2008, 06:13:05 PM
means
it shows tags from all boards

I want is there are two boards

both boards have tags.

show tags from only board 1.
Title: Re: [Reguest] Tag Cloud snippet
Post by: falguni1 on January 24, 2008, 06:17:21 PM
like this

http://www.tinyportal.net/index.php?topic=1234.0

where you get topics from certain boards.
Title: Re: [Reguest] Tag Cloud snippet
Post by: JPDeni on January 24, 2008, 06:31:31 PM
It depends on how the mod sets up the tables. I don't remember how things are set up. Does it include which board the tag is from in the database?
Title: Re: [Reguest] Tag Cloud snippet
Post by: falguni1 on January 25, 2008, 06:26:41 AM
will it help if I post the code from the file if you tell me which file you want to see.

I dont understand php much.
Title: Re: [Reguest] Tag Cloud snippet
Post by: falguni1 on January 25, 2008, 06:50:47 AM
tagsql.php


<?php
//SMFHacks.com
//Table SQL

//Create Tags Table
db_query("CREATE TABLE IF NOT EXISTS `{$db_prefix}tags`
(`ID_TAG` mediumint(8) NOT NULL auto_increment,
`tag` tinytext NOT NULL,
approved tinyint(4) NOT NULL default '0',
PRIMARY KEY  (`ID_TAG`))"
__FILE____LINE__);

//Create Tags Log
db_query("CREATE TABLE IF NOT EXISTS `{$db_prefix}tags_log`
(`ID` int(11) NOT NULL auto_increment,
`ID_TAG` mediumint(8) unsigned NOT NULL default '0',
ID_TOPIC mediumint(8) unsigned NOT NULL,
`ID_MEMBER` mediumint(8) unsigned NOT NULL default '0',
PRIMARY KEY  (`ID`))"
__FILE____LINE__);


//Insert the settings
db_query("REPLACE INTO {$db_prefix}settings VALUES ('smftags_set_mintaglength', '3')"__FILE____LINE__);
db_query("REPLACE INTO {$db_prefix}settings VALUES ('smftags_set_maxtaglength', '30')"__FILE____LINE__);
db_query("REPLACE INTO {$db_prefix}settings VALUES ('smftags_set_maxtags', '10')"__FILE____LINE__);


?>
Title: Re: [Reguest] Tag Cloud snippet
Post by: JPDeni on January 25, 2008, 02:25:11 PM
It looks as though the board number is not saved with the tag. Therefore, it would be impossible to list the tags by board.
Title: Re: [Reguest] Tag Cloud snippet
Post by: falguni1 on January 25, 2008, 05:44:46 PM
how to make the board number to save with the tag please help.
Title: Re: [Reguest] Tag Cloud snippet
Post by: JPDeni on January 25, 2008, 06:06:40 PM
I would contact the author of the mod and ask him or her how to alter the code.
Title: Re: [Reguest] Tag Cloud snippet
Post by: falguni1 on January 26, 2008, 04:21:15 AM
I am very glad.

it will be very useful if  we have a prgramming community with boards c programming and html.

c programming will have tags like loop, variables
and html will have tags like tables, borders

so it willl be nice to see tags from c programming only in the c programming board only.
Title: Re: [Reguest] Tag Cloud snippet
Post by: Dragooon on January 26, 2008, 04:38:06 AM
How is C related to TP community?
And almost every language got loops and variables...
Title: Re: [Reguest] Tag Cloud snippet
Post by: falguni1 on January 26, 2008, 08:29:44 AM
Quote from: Dragooon on January 26, 2008, 04:38:06 AM
How is C related to TP community?
And almost every language got loops and variables...

it is an example.
Title: Re: [Reguest] Tag Cloud snippet
Post by: SteveW on January 27, 2008, 11:19:55 AM
Quote from: SteveW on January 14, 2008, 10:00:45 PM
Quote from: catchpen on October 26, 2007, 03:25:24 PM
Does anyone know how to implement a better word wrap on this? I have this on a narrow side panel and it doesn't obey the panel px settings in the TP admin page. The big font (which I did decrease max size to ~200) rolls off the side of the page or older versions of IE it increases the panel size for it to fit.

I'd also like to implement this. Is there a way of echoing the output so it is centered and justified?

Many thanks

Hi guys - I was wondering if anyone has a method of doing this? If you look at my main page (no need to register) under the centre gallery block,  the tags are all aligning to the left. Is there a way of making them centred?

My site is http://www.alienexistence.com

much appreciated
Title: Re: [Reguest] Tag Cloud snippet
Post by: JPDeni on January 27, 2008, 01:36:30 PM
I would think that the way to make them centered would be to add centering tags.

Assuming that you're using the code in the second post of this topic (I haven't looked through to see what else might be there), instead of


echo $poptags;


you would use


echo "<center>" . $poptags . "</center>";


Also, to faguli, you may have misunderstood me. I'm not going to contact the writer of the mod. You will need to do that.
Title: Re: [Reguest] Tag Cloud snippet
Post by: falguni1 on January 27, 2008, 03:13:46 PM
I will contact him at the earliest.  :D.

please tell me wot should I write to him and wot all should I ask him.  :-\.
Title: Re: [Reguest] Tag Cloud snippet
Post by: JPDeni on January 27, 2008, 03:30:38 PM
Tell him you would like to be able to list the tags by board and you need to be able to save the board ID along with the tag. This will require a change in the database table as well as a change in the way data are written to the table.
Title: Re: [Reguest] Tag Cloud snippet
Post by: falguni1 on January 27, 2008, 03:53:54 PM
ok.
Title: Re: [Reguest] Tag Cloud snippet
Post by: SteveW on January 27, 2008, 06:15:26 PM
Thankyou JPDeni, that centre code worked a treat :)
Title: Re: [Reguest] Tag Cloud snippet
Post by: catchpen on February 04, 2008, 07:45:43 PM
Quote from: SteveW on January 27, 2008, 06:15:26 PM
Thankyou JPDeni, that centre code worked a treat :)
after doing that you can also change " if ($row_count > 5)"  to " if ($row_count > 10)" or more or less to fill in the sides of the center block.
Title: Re: [Reguest] Tag Cloud snippet
Post by: kjb0007 on June 15, 2008, 05:23:27 AM
I have read through this topic so if this has already been answered, forgive me if I missed where this was posted.


How can I get the tags to appear like they do in the Poster Cloud? (different sizes depending on how often a tag is used)?

Thanks
Title: Re: [Reguest] Tag Cloud snippet
Post by: JPDeni on June 15, 2008, 03:45:19 PM
http://www.tinyportal.net/index.php?topic=13744.msg115684#msg115684
Title: Re: [Reguest] Tag Cloud snippet
Post by: kjb0007 on June 16, 2008, 02:19:41 AM
I already found it in the code and adjusted it. .Thanks
Title: Re: [Reguest] Tag Cloud snippet
Post by: kjb0007 on June 18, 2008, 08:25:18 AM
Found a glitch and I am not sure if it involves the code for the tag cloud or for the tag mod so I have posted it on the smf site for the mod creator to see, as well has here :)

its not linking the same tag words correctly in the cloud. If the same exact tag word is put on multiple topics, but not in the same order, it creates duplicate tags in the cloud - and also will not pull correctly when the tag is clicked on.

Example: (3 topics)

1st topics tags:   Jokes
2nd topics tags: Comedy, Jokes
3rd Topics tags: Comedy, Jokes

(the "jokes" tag is in the 1st spot on topic 1 and in the 2nd spot on topics 2,3)

There will be 2 seperate tags in the cloud for "jokes". When each tag is clicked on, 1 brings up only 1 topic, the other brings up the other 2 topics. When I changed the order of the tags so that the tag "jokes" was in the 1st spot on all of them, it removed the 2nd tag in the cloud and then when the tag "jokes" was clicked on, all 3 topics then appeared on the list like they are supposed to.

Any ideas as to how this can be fixed? Thanks :)
Title: Re: [Reguest] Tag Cloud snippet
Post by: 3nd3r on June 18, 2008, 08:37:02 AM
I don't know if I would help you, but are you writing the tags separate with commas and no spaces?

I mean,
You wrote:
1st topics tags:   Jokes
2nd topics tags: Comedy, Jokes
3rd Topics tags: Comedy, Jokes

And the right way, as far as I know, must be:
1st topics tags:   Jokes
2nd topics tags: Comedy,Jokes <-- no spaces between, only commas
3rd Topics tags: Comedy,Jokes <-- no spaces between, only commas

Could be these spaces your problem?
Title: Re: [Reguest] Tag Cloud snippet
Post by: kjb0007 on June 18, 2008, 05:06:24 PM
You know, I actually wondered about the whole space thing when I first installed the mod (having not using the cloud yet), and since it doesnt specify "no spaces", I assumed that it was set up just like the box you have when entering multiple names when sending pm's (it doesnt specify either however, spaces are used inbetween those).

I will test your theory and let you know. Thanks for the response :)
Title: Re: [Reguest] Tag Cloud snippet
Post by: panesarv on July 09, 2008, 05:06:23 AM
Great Block bro...Works perfectly...Good for SEO of site as well....Thank you very much...
Title: Re: [Reguest] Tag Cloud snippet
Post by: insanemustang on September 08, 2008, 11:32:36 PM
I love this mod, and by adding the block it could really be a big thing for my site.  I do have 1 question though.

Is there a way to make the font sizes of the tags inside the block random, after all that is the purpose of the "cloud".

I read through the entire thread here, and if I missed it I apologize, but I don't believe I did.

Thanks, great work JPDeni
Title: Re: [Reguest] Tag Cloud snippet
Post by: insanemustang on September 08, 2008, 11:37:35 PM
I apologize, I just realized that when a tag is used twice, the size changes.  This block is complete  O0
Title: Re: [Reguest] Tag Cloud snippet
Post by: sammyto on March 16, 2009, 11:43:23 PM
Hi JPDeni sorry to revive this old post but I wonder if you can do the same with the GoogleTagged (http://custom.simplemachines.org/mods/index.php?mod=1245) Mod... :-\
Title: Re: [Reguest] Tag Cloud snippet
Post by: JPDeni on March 17, 2009, 01:05:55 AM
I don't know. There would be no way for me to test any code that I write even if I installed the mod. People don't use Google to access my test site and I'm not going to install it into my live site.

I don't have a clue about the code that's in this topic, since I haven't looked at it in months. I'll take a look at the code and the mod and see if there's anything the two have in common.

But I wouldn't hold out a lot of hope if I were you.
Title: Re: [Reguest] Tag Cloud snippet
Post by: SteveW on June 01, 2009, 08:38:21 AM
Hi - I have this tag cloud on my website but I cannot get the fonts to change size, they all appear normal size:

my site is http://www.alienexistence.com
Title: Re: [Reguest] Tag Cloud snippet
Post by: JPDeni on June 01, 2009, 02:36:41 PM
For some reason, your font sizes are all the same -- 95%. It could be that all of your tags appear equally on your site. If you want me to debug the code, you'll need to post the code for me to debug.
Title: Re: [Reguest] Tag Cloud snippet
Post by: SteveW on June 01, 2009, 03:42:57 PM
This is the code:

global $db_prefix, $scripturl;
$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 l.ID DESC LIMIT 50";

$result = db_query($query, __FILE__, __LINE__);

$tags = array();

$tags2 = array();

while ($row = mysql_fetch_array($result))
{
    $tags[$row['tag']] = $row['quantity'];
    $tags2[$row['tag']] = $row['ID_TAG'];
}

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


thankyou
Title: Re: [Reguest] Tag Cloud snippet
Post by: JPDeni on June 01, 2009, 03:56:58 PM
Possibly the person who wrote the code will come by (or you could send him/her a PM). I don't have the mod installed, nor a site where I would be able to test various things to debug. It looks like it should work.
Title: Re: [Reguest] Tag Cloud snippet
Post by: SteveW on June 02, 2009, 08:34:41 AM
Hi JPDeni, I have messed about and your right it does work, when I add a similar tag the font increases. The tags obviously haven't got enough tags to increase the font.

Would it be easy enough to pull random tags rather than the latest tags?
Title: Re: [Reguest] Tag Cloud snippet
Post by: JPDeni on June 02, 2009, 01:23:57 PM
It should work if you change


ORDER BY l.ID DESC LIMIT 50";


to


ORDER BY RAND() LIMIT 50";
Title: Re: [Reguest] Tag Cloud snippet
Post by: SteveW on June 02, 2009, 05:27:23 PM
Thankyou works lovely
Title: Re: [Reguest] Tag Cloud snippet
Post by: JPDeni on June 02, 2009, 05:43:04 PM
Cool!  8)

I love the random stuff.
Title: Re: [Reguest] Tag Cloud snippet
Post by: foel on June 14, 2009, 01:18:24 AM
Hi JPDeni.. thanks for the great code..
it work fine for me..  :)

A Question, How to make the tag list show with different color? and is there anyway to set the height size for this block?

Best Regards
Title: Re: [Reguest] Tag Cloud snippet
Post by: WillyP on June 14, 2009, 03:05:27 AM
Make sure you log out and view your forum-posts after installing the SMF tag mod. I did and the layout when I was logged in as administrator looked fine, as any lesser member or guest it was broken. Functionally fine, but didn't play nice with the TP blocks.



This was just with the SMF tag mod, I wasn't feeling it so I just uninstalled it and everything went back to normal.

Maybe if you're going to use this, you need to install the tag mod first, then reinstall TP?
Title: Re: [Reguest] Tag Cloud snippet
Post by: JPDeni on June 14, 2009, 03:27:35 AM
QuoteHow to make the tag list show with different color?

You can add inline css code via div tags. Take a look at the code. I'm sure you'll be able to figure out where it would go.

Quoteis there anyway to set the height size for this block?

Not that I know of.
Title: Re: [Reguest] Tag Cloud snippet
Post by: FragaCampos on August 04, 2009, 05:34:32 PM
This is a great snippet, thanks a lot JPDeni!

Just one question:
How can i make the string "thiungs tagged with" in $poptags .= ' title="'.$value.' things tagged with '.$key.'"'; language selectable?

Thanks in advance.
Title: Re: [Reguest] Tag Cloud snippet
Post by: JPDeni on August 04, 2009, 05:54:09 PM
QuoteHow can i make the string "thiungs tagged with" in $poptags .= ' title="'.$value.' things tagged with '.$key.'"'; language selectable?

Not a clue. What would a link look like? What would it link to? (I'm assuming that by "selectable" you mean a link.)
Title: Re: [Reguest] Tag Cloud snippet
Post by: FragaCampos on August 05, 2009, 07:32:31 PM
When you hover over a tag, it shows the string "X things tagged with <tag>". I would like to change that string with the forum's language. I have three languages in my forum and would like to show that string on each of them.

I know which string to change, but i don't know how  :'(

(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fimg14.imageshack.us%2Fimg14%2F7691%2Fsemttuloioa.jpg&hash=a2906677b7677a45f1044ace18dd7dc4e4c96740)
Title: Re: [Reguest] Tag Cloud snippet
Post by: JPDeni on August 05, 2009, 08:07:30 PM
I'm sorry. I didn't see the word "language" in your previous post.

You need to translate "things tagged with" in those languages, yes? The thing to do would be to open up the Themes/default/languages/index.language.php file. (Substitute language for the languages that you want to define.)

Add a line to each file with the text


$txt['tagcloud'] = 'things tagged with';


In each one, use the same code, but translate the things tagged with part.

In the block code, change


global $db_prefix, $scripturl;


to


global $db_prefix, $scripturl, $txt;


Where it prints out the text use


$poptags .= ' title="'.$value.' ' . $txt['tagcloud'] . ' '. $key . '"';
Title: Re: [Reguest] Tag Cloud snippet
Post by: FragaCampos on August 08, 2009, 12:06:26 AM
Thank you so very much for your help, JPDeny. It worked beautifully.
Even with the tagcloud from the mod itself.

Cheers  ;)
Title: Re: [Reguest] Tag Cloud snippet
Post by: FragaCampos on August 12, 2009, 03:27:11 PM
Here i am once more :)

I noticed that when we click on a tag it doesn't redirect us to the correspondent tagged topics, as it happens with the tagcloud of the original mod.

I noticed that the link for the topics tagged with a certain word is as follows:
http:/mysite/index.php/action,tags/tagid,132.html

And the links from the tagcloud block is:
http:/mysite/index.php/action,tags/id,132.html

I believe this is the problem, any ideas on how to fix this?
Thanks.


Edit: I found the solution. I changed
$poptags .= '<a href="' . $scripturl . '?action=tags;id=' . $tags2[$key] . '" style="font-size: '.$size.'%"';

to

$poptags .= '<a href="' . $scripturl . '?action=tags;tagid=' . $tags2[$key] . '" style="font-size: '.$size.'%"';

It worked  :)
Title: Re: [Reguest] Tag Cloud snippet
Post by: JPDeni on August 12, 2009, 05:15:00 PM
 :up: Good for you for working it out.
Title: Re: [Reguest] Tag Cloud snippet
Post by: FragaCampos on March 01, 2010, 03:26:40 AM
Sorry to dig this up, but i saw something in another blog that i would like to see with this snippet.
Is there any chance to attribute different colours to the tags like in here (http://juramentosembandeira.blogspot.com/)?

Thanks in advance.
Title: Re: [Reguest] Tag Cloud snippet
Post by: Phantom on November 29, 2010, 09:35:49 PM
someone have code for Tag Cloud (from Tagging System http://custom.simplemachines.org/mods/index.php?mod=579 ) to display it in block ?

sorry for my english..
Title: Re: [Reguest] Tag Cloud snippet
Post by: WillyP on November 30, 2010, 05:38:00 PM
Have you tried the code from earlier in this post?
Title: Re: [Reguest] Tag Cloud snippet
Post by: Phantom on November 30, 2010, 07:07:36 PM
yes, i tried this code:

global $db_prefix, $scripturl, $txt;
$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 RAND() LIMIT 50";

$result = db_query($query, __FILE__, __LINE__);

$tags = array();

$tags2 = array();

while ($row = mysql_fetch_array($result))
{
    $tags[$row['tag']] = $row['quantity'];
    $tags2[$row['tag']] = $row['ID_TAG'];
}

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


and it does not work (i use SMF 2.0RC3 and TP 1.0RC1) :/
Title: Re: [Reguest] Tag Cloud snippet
Post by: IchBin on November 30, 2010, 08:51:03 PM
Replace all instances of db_query with tpdb_query
Title: Re: [Reguest] Tag Cloud snippet
Post by: Phantom on November 30, 2010, 08:54:54 PM
Thanks, now it works perfectly ;)
Title: Re: [Reguest] Tag Cloud snippet
Post by: WillyP on November 30, 2010, 09:44:33 PM
Cool, I'll probably add this to my own site!  Should we add this to the snippet index?
Title: Re: [Reguest] Tag Cloud snippet
Post by: IchBin on November 30, 2010, 10:36:11 PM
Feel free to add anything to the snippets index.
Title: Re: [Reguest] Tag Cloud snippet
Post by: saks on September 14, 2011, 05:42:01 AM
This snippet is not work on SMF2 and last TP . How fix it ?
Title: Re: [Reguest] Tag Cloud snippet
Post by: IchBin on September 14, 2011, 03:25:12 PM
Updated the code in the origin post on page to with code for SMF2. Let me know if it doesn't work.
Title: Re: [Reguest] Tag Cloud snippet
Post by: saks on September 17, 2011, 02:41:52 AM
it doesn't work :( Can be because i use Pretty URLs mod? But earlier all was good with Pretty too

I am use this code:
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 l.id DESC LIMIT {int:limit}',
array('limit' => 50)
);

$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 = 250; // 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 = 0;
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 > 5)
{
$poptags .= '<br />';
$row_count =0;
}
}
}
echo $poptags;
Title: Re: [Reguest] Tag Cloud snippet
Post by: IchBin on September 17, 2011, 10:44:27 PM
I do not have the mod installed so I cannot test it. You saying "it doesn't work" does not give me anything to help you with. You need to give me any errors you may have in your SMF or server log. It would also help if you describe what doesn't work. Does it show a blank page? Does it not show anything? I need info if you want help.
Title: Re: [Reguest] Tag Cloud snippet
Post by: saks on September 19, 2011, 05:10:27 AM
Quote from: IchBinâ,,¢ on September 17, 2011, 10:44:27 PM
I do not have the mod installed so I cannot test it. You saying "it doesn't work" does not give me anything to help you with. You need to give me any errors you may have in your SMF or server log. It would also help if you describe what doesn't work. Does it show a blank page? Does it not show anything? I need info if you want help.
Sorry !
In error log i do not have any errors for tags cloud. In main page block shows, but empty:
(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fwww.paraplanoff.net%2FMGalleryItem.php%3Fid%3D15059&hash=65135026f22090cbe4a45c3529f4efc919332661)
I am add in end of block code string echo 'test string'; , but it not shows
Title: Re: [Reguest] Tag Cloud snippet
Post by: saks on September 19, 2011, 06:42:54 AM
Now I am test this block in clean install SMF+TP , and have this error:
(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fwww.paraplanoff.net%2FMGalleryItem.php%3Fid%3D15060&hash=b1f6140c72f7970763bf742a406111f356097bde)
Title: Re: [Reguest] Tag Cloud snippet
Post by: IchBin on September 19, 2011, 04:53:19 PM
In your database, are the tag table rows named the same as in the query?

Is it still "ID_TAG"? Or is it now "id_tag"?
Title: Re: [Reguest] Tag Cloud snippet
Post by: saks on September 19, 2011, 06:23:09 PM
in database on fresh install and in my working database - "id_tag" (small text)
Title: Re: [Reguest] Tag Cloud snippet
Post by: saks on September 22, 2011, 07:34:51 AM
i am rename it in query but it not work ^(
Title: Re: [Reguest] Tag Cloud snippet
Post by: IchBin on September 22, 2011, 05:05:30 PM
You must update all the columns that changed. l.ID is probably l.id now too. And don't forget in the php code there are references to ID_TAG as well. I've changed them all in the code above, see if it works.

Don't respond with "it don't work"... If it's not working you need to post errors from the SMF log or server error_log.
Title: Re: [Reguest] Tag Cloud snippet
Post by: saks on September 23, 2011, 03:39:28 AM
ok, thenk you for help!
i install this code but have a error in block:
Parse error: syntax error, unexpected '=', expecting ')' in /usr/local/www/data-dist/saks/Themes/default/TPsubs.template.php(114) : eval()'d code on line 8
Title: Re: [Reguest] Tag Cloud snippet
Post by: saks on September 23, 2011, 04:33:30 AM
I am tested it on test forum with TP (http://koritssa.ru) , and have error:
Parse error: syntax error, unexpected '=', expecting ')' in /home/saks1/koritssa.ru/docs/Sources/Load.php(2173) : eval()'d code(114) : eval()'d code on line 8
it.s forum with only TP , Tags mode and Aeva...
Grant you the rights of the administrator to this site for test this block?
Title: Re: [Reguest] Tag Cloud snippet
Post by: IchBin on September 23, 2011, 05:26:53 AM
Edited code in this post, try it again.
http://www.tinyportal.net/index.php?topic=13744.msg275015#msg275015
Title: Re: [Reguest] Tag Cloud snippet
Post by: saks on September 23, 2011, 05:58:15 AM
Quote from: IchBinâ,,¢ on September 23, 2011, 05:26:53 AM
Edited code in this post, try it again.
http://www.tinyportal.net/index.php?topic=13744.msg275015#msg275015

I am try it again but have error :
Fatal error: Function name must be a string in /home/saks1/koritssa.ru/docs/Sources/Load.php(2173) : eval()'d code(114) : eval()'d code on line 14

in smf log :
http://koritssa.ru/index.php?

8: Undefined index: db_fetch_array

File: /home/saks1/koritssa.ru/docs/Themes/default/languages/TPShout.english.php (tp_above sub template - eval?)
Line: 14
Title: Re: [Reguest] Tag Cloud snippet
Post by: IchBin on September 23, 2011, 03:19:25 PM
Updated code again.
Title: Re: [Reguest] Tag Cloud snippet
Post by: saks on September 25, 2011, 03:34:40 AM
Quote from: IchBinâ,,¢ on September 23, 2011, 03:19:25 PM
Updated code again.
Now it show error:
Fatal error: Function name must be a string in /home/saks1/koritssa.ru/docs/Sources/Load.php(2173) : eval()'d code(114) : eval()'d code on line 20
Title: Re: [Reguest] Tag Cloud snippet
Post by: IchBin on September 25, 2011, 02:57:26 PM
Grrr.... Should be the last edit. Try again.
Title: Re: [Reguest] Tag Cloud snippet
Post by: saks on September 26, 2011, 02:31:42 AM
Wow!  IchBin, you is guru! Now it work perfect, thank you very match! :)
Title: Re: [Reguest] Tag Cloud snippet
Post by: IchBin on September 27, 2011, 02:58:43 AM
Quote from: saks on September 26, 2011, 02:31:42 AM
Wow!  IchBin, you is guru! Now it work perfect, thank you very match! :)

No problem! Sorry it took so long! lol
Title: Re: [Reguest] Tag Cloud snippet
Post by: iain.sherriff on November 24, 2014, 12:55:47 AM
Hi.
I have the code you posted in a block and it works BUT is there a way to have one tag per line ?
(narrow right hand block)

Thanks
Title: Re: [Reguest] Tag Cloud snippet
Post by: WillyP on November 24, 2014, 04:38:20 PM
That should be doable with some CSS. If you need help with that post a link where I can see your block.
Title: Re: [Reguest] Tag Cloud snippet
Post by: iain.sherriff on November 25, 2014, 02:14:15 PM
Thanks Willy  :)

I noticed some code that allowed me to get one per line (apart from the first line for some reason) with some trial and error.

One other thing is that if I click on any tag in the box it just takes me to the tags page rather than the specific tag.  Is there a wat to change that do you know ?
Title: Re: [Reguest] Tag Cloud snippet
Post by: WillyP on November 25, 2014, 04:00:33 PM
I'm not a php coder, I haven't a clue. But it sounds like a good idea, that's how I would expect a tag cloud to work.