PDA

View Full Version : Tag cloud (beta version)


cocodrilo
01-09-2012, 11:21 PM
Hello, I've finished a tag cloud for Subdreamer (currently beta). I share it with others in case someone wants to use it.

Download (http://www.sendspace.com/file/p0teog)

Installation notes:

This plugin collects the tags based on searches of your site, for this reason requires the Search engine plugin installed in your site.

Step 1: Install as normal, with the subdreamer admin panel.

Step 2:

Open file plugins/search_engine/search_engine.php (make a bakup first please).

You can see:

<?php

if(!defined('IN_PRGM'))

Change to:

<?php

include("plugins/tag_cloud/tagCloud.php");

if(!defined('IN_PRGM'))


Change: class SearchEngine TO: class SearchEngine extends tagCloud

Change: function DisplayResults() TO: protected function DisplayResults()

Installation is complete.


¿how to change css in tags?

In admin panel go to the section skins and edit tag_cloud rule to change the default css.

¿how to change layout style?

In the plugin options (admin panel) change the default.php to your desired file.

Variables you can use in this file:

$this->tag_list = array list of tags/times searched. see the default php as example.

$this->total_tags = total tags in the database.

$this->settings = plugin settings.

http://img441.imageshack.us/img441/6734/screenshot2zq.png

PatrickD1985
01-10-2012, 09:38 AM
Nice :) will test it in the upcoming week.
Thanks for the contribution!

Tobias
01-10-2012, 03:46 PM
Cocodrilo: thank you for sharing this.

I took a first glance at your plugin and have some issues with it:
* please do not install CSS items without a plugin id
* your uninstall deletes all CSS items named "tag_cloud" regardless of skin or plugin, which is very bad
* consider renaming the declared functions to at least use a prefix like "tagcloud_" so that there is no problem with potentially existing SD functions or functions in any other plugin install
* settings.php: first line should check with "&&", not "||"; or just check for IN_ADMIN to only allow SD3

Suggestions:
* file include should check for valid filename and use a path
* instead of directly using "mysql_fetch_array()" you should use $DB->fetch_array()
* use full version numbers like "1.0.0", "1.5.0" etc.
* maybe add an index to the "times" and "tag" columns

Regards,
Tobias

cocodrilo
01-10-2012, 04:05 PM
Ok, these problems will be resolved in the next version :). thanks.