Welcome Guest, Not a member yet? Register   Sign In
Taggly, a tag-cloud library

I tried to disable shuffle feature and I couldn't get it working. Then I took a look at plugin code and found something like this:

$this->shuffleTags = (empty($data['shuffle'])) ? $this->shuffleTags : $data['shuffle'];

The problems (with PHP 5.2.4) are:
1. There is no $data variable but $dataArr (incorrect in the next line too).
2. empty($data['shuffle']) -> empty(FALSE) returns TRUE, so it sets $shuffleTags to TRUE and no matter what you set in config array.

The simpliest solution (but not too artistic ;-) ) is to replace this line with:
$this->shuffleTags = (!array_key_exists('shuffle', $dataArr) || (array_key_exists('shuffle', $dataArr) && $dataArr['shuffle'] == TRUE)) ? $this->shuffleTags : $dataArr['shuffle'];

I downloaded this library from Codeigniter's wiki.

hi Gavin

i'm using your lib
if you pass an empty tag array, it raise an error

i've added this line at the beginning of "cloud" function:

if(empty($tagsArr)) {return ""};


[quote author="redwiz" date="1227911201"]hi Gavin

if(empty($tagsArr)) {return ""};


sorry, a typo, the correct line is:

if(empty($tagsArr)) {return "";}


[eluser]Christopher Harrison[/eluser]
As of 9th June 2010, the domain for this extension is no longer active. No way to obtain source code.

[eluser]Yorick Peterse[/eluser]
Seems pretty obvious if the last reply before redwiz was over 2 years old.

[eluser]Christopher Harrison[/eluser]
For anyone else stumbling across this thread, hope this saves you a few seconds:


It would be better to make it as a helper since helpers are meant exactly for that.


I'm looking for a tag cloud library and found this post.

Looking at the code I can't find the functionality for
"rating" the links. I mean, usually a link becomes bigger
(font size) if it's clicked more often than others.
But to get this to work you would have to store that information
in a db for example. This library don't take care of this or
did I miss something?

Cheers, luckyfella

Theme © iAndrew 2016 - Forum software by © MyBB