PDA

View Full Version : Tag Cloud on Forumdisplay



admin
03-02-2010, 04:47 PM
This mod was originally written by ThorstenA (http://www.vbulletin.org/forum/member.php?u=68464). The original thread is here (http://www.vbulletin.org/forum/showthread.php?t=186662).

I have permission to release this upgraded version of the mod from the author here (http://www.vbulletin.org/forum/showpost.php?p=1924859&postcount=98):
Originally Posted by ThorstenA http://www.vbulletin.org/forum/images/cstyle/blue/buttons/viewpost.gif (http://www.vbulletin.org/forum/showthread.php?p=1924859#post1924859)
I'd be very glad if you would publish your changed mod in the vb 4 section. (I wrote that this mod is completely free already here (http://www.vbulletin.org/forum/showpost.php?p=1916241&postcount=87)). I am not interested in being named as the author, having the functionality - so that it works with vb4 - is far more important to me http://www.vbulletin.org/forum/images/smilies/biggrin.gif
What does this product do?
It displays a tag cloud of all tags used within actual forums on top of FORUMDISPLAY. If a user clicks on tags, only threads within actual forums are displayed then.

http://img.photo.zing.vn/file_uploads/gallery/1024x768/2010/02/03/04/87261265190407.png

How to install?
Just import product. Done.

How to uninstall?
Just deinstall product. If you did either template edit below, then undo the template edit.


Optional: To also only show threads within actual forums once a user clicks on a tag on showthread:

1) change template tagbit to

<li><a href="tags.php?{vb:raw session.sessionurl}tag={vb:raw tag_url}<vb:if condition="THIS_SCRIPT == 'showthread'">&amp;forumid={vb:raw show.tagforumid}</vb:if>">{vb:raw tag}</a></li>

2) turn ON the plugin labeled "Make showthread tag only show tags in that forum (optional)" (it is off by default)


How to change location of tag cloud box?

1) Find this code from manage plugins > plugin forumdisplay_start (Forum Tags)

$find = '<div id="above_threadlist" class="above_threadlist">';
$vbulletin->templatecache['FORUMDISPLAY'] = str_replace($find,$cloud_html.$find,$vbulletin->templatecache['FORUMDISPLAY']); and replace with this code:

vB_Template::preRegister('FORUMDISPLAY', array('cloud_html' => $cloud_html)); 2) Put {vb:raw cloud_html} in FORUMDISPLAY where you want to show tag cloud.

Details

* no options available yet
* uses standard tag options made in admincp > tags
* Does not add phrases, templates.
* It uses standard tag cloud template, but shows it on FORUMDISPLAY
* Tag cloud is only shown in actual forum when tags were used
* threads tagged within subforums are not shown
* Tag cloud is automatically placed above the threadlist
* Tag links are altered to let tags be searchable by forum
* Tags.php has a new option forumid to only show tags from specific forums
* If you click on a tag, only topics within actual forum are displayed
* Tag size is dependent on how many threads are tagged only within actual forum
* Adds 1 query to forumdisplay

Version history

2009-12-04 - version 0.4 - First release that works with vB4 by Lynne (pre 4.0.1)
2010-01-26 - version 0.5 - Fixed problem with tags having single apostophes in them. Created a new template to display the tag cloud at the top of forumdisplay (looks the same as bottom templates and will collapse). Fixed issue where css is stored as a file. (4.0.1)
2010-10-22 - version 0.6 - Modified template due to changes in 4.0.8 (4.0.8)