• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Taggly, a tag-cloud library

#31
[eluser]PorkOne[/eluser]
Hi
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:

Code:
$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:
Code:
$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.

#32
[eluser]redwiz[/eluser]
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 ""};

Andrea

#33
[eluser]redwiz[/eluser]
[quote author="redwiz" date="1227911201"]hi Gavin

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

Andrea[/quote]


sorry, a typo, the correct line is:

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

Smile

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

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

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

http://codeigniter.com/wiki/Taggly/

#37
[eluser]introvert[/eluser]
It would be better to make it as a helper since helpers are meant exactly for that.

#38
[eluser]LuckyFella73[/eluser]
Hi,

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


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.