PDA

View Full Version : my Tag Clouds is Not Working in all pages.. help?


freedir
11-27-2008, 06:50 PM
my Tag Clouds is Not Working in all pages.. help?

www free-dir net

where is the problem?

it works here with links and categories..
but no the rest..


sergio

shadav
11-27-2008, 10:59 PM
without knowing what mod you are using and knowing the instructions....
my best guess would be that you added the code to index.php instead of init.php

freedir
11-28-2008, 11:41 AM
Hello,
well this is the instructions..

Installation




This installation of this module is very easy and does not require many coding skills. One file needs to be added to the current PHP Link Directory installation and some code needs to be added to one of the core PHP files and to a template file.
Add files




Copy PHP file




Copy the PHP file tagclouds.php to the root folder of your PHP Link Directory installation.


Edit your files




Some files need to be edited in order to have this module available.
Edit index.php




Edit your index.php file and search for following code line (at the end):
//Make outputecho $tpl->fetch('main.tpl', $id); //Include tagclouds filerequire_once 'tagclouds.php';//Initialize tagclouds class$tagcloud = new phpld_tagclouds();//Add array with categories$tagcloud->add_categories($categs);//Add array with links$tagcloud->add_links($links);//Define minimum occurrences of a word to be displayed$tagcloud->mincount(0);//Define maximum number of allowed tags (most important selected, the rest is removed)//zero or NULL means infinite$tagcloud->maxWordsCount(25);//Define minimum length of word to be displayed$tagcloud->minwordlength(2);//Define maximum length of a word to be displayed$tagcloud->maxwordlength(30);//Define minimum font size of a tag to be displayed (in procent)$tagcloud->minfontsize(100);//Define maximum nuber for element class (CSS styling)$tagcloud->styleclass(5);//Sort tags (alphabetical, count, random)$tagcloud->sortmethod('alphabetical');//Define Change search URL variable (for phpLD 3.0.4+ = "search", all the rest = "q")$tagcloud->setsearchvariable('search');//Define a title to be displayed above the tagclouds$tagcloud->title('<h3>Tag Clouds</h3>');//Define words to not be displayed (string with words sepparated by comma or space, or an array with one word per key)$tagcloud->exclude('to,and,if,it,or,about,the,then');//Assign tagclouds to Smarty template variable "tagclouds"$tpl->assign('tagclouds', $tagcloud->get_tagclouds());
Edit footer.tpl




Content visible to registered users only.NoteYou can also add this to whatever other template file.

Edit footer.tpl file located in your current template folder (/templates/YourTemplate/ for phpLD 3.0.5+ and /templates/ for all previous versions) and add following code to desired place:
{* Display TagClouds *}{$tagclouds}

Clean compiled template files




Finally the last step, remove all files located in your /temp/templates/.


Customization




The Tag Clouds output can be fully customized by adding CSS properties.
Customize style




You can easily change properties for fonts, margins, colors or anything else, by adding CSS properties.
The Tag Clouds box is a DIV with class name tagclouds. Style all the rest of the child tags using the parent tagclouds class.
A simple example is:
.tagclouds { margin:0 auto; padding:20px; width:70%; border:1px dotted #9EC2F3; }.tagclouds h3 { font-size:150%; }.tagclouds .cloud-word { /* add you general rules for ALL tags */ } i dont have instructions to init.php!! is it to change?

freedir
11-28-2008, 11:53 AM
Ups..
That was the instructions...
It´s the post.. bellow to my post..

[MOD] Tag Clouds (v1.1)

Cant send the url/post..

I dont have instructions to init.php!! is it to change?