vBulletin Mods

The Official vBulletin Modifications Site
https://www.vbulletin.org/forum/showthread.php?t=190759

Custom Tag Cloud in vbAdvanced, Forum Home & Related Pages
by vbboarder
12 Sep 2008 22:23

5 Attachment(s)
Download the latest version that supports social groups clouds here: 2.5 Version (VB 3.8 required)

Forum VBA Custom Tag Cloud
This mod adds 6 features to VB’s tag cloud:

1. It allows you to display the tag cloud in forum related pages in any location you want. You can display tag clouds in forumhome, forumdisplay, and showthread, and hook it to any $template_hook or HTML comment. Instead of installing 3 different mods to accomplish this, you can install this mod to do all 3. Plus you can specify if you want to not display the tag cloud in certain pages.

2. It allows you to show the tag cloud in your site’s home page in any location you want if you have vbAdvanced installed (optional).

3. When viewing forumdisplay or showthread (pages listing threads or posts), you can specify custom styles for tags that belong to the active forum or thread being viewed so that users will know which tags are relevant to that forum or thread.

4. It allows you to specify preferred tags that you want to have custom styles so that they will be noticed more. For example, if your site just started a forum about cars with tags like “Lexus” “Infinity”, you can specify those tags as preferred to draw attention to the new forum.

5. The tag cloud resides in a collapsible box and has a legend for the custom styles.

6. When viewing a thread (in showthread), this mod will move the thread’s tag box below the tag cloud. The tag box and tag cloud are different: the tag box shows tags specific to its thread, whereas the tag cloud shows tags from all threads. Currently, the tag box is shown at the very bottom of the thread, which can be easily ignored by readers. Moving it next to the tag cloud will make the tag box more visible.

Installation
1. Download the product xml file. Go to Manage Products > Add/Import Product, upload that xml file, set “allow overwrite” to yes, and click Import.

2. Go to VB Options > Forum VBA Tag Clouds to set the locations of the tag cloud (default is below the navbar) and custom tag styles.

3. Optional: to display the tag cloud in vbAdvanced, go to VBA CMPS > Default Settings > Main Options > add to “Portal Output Global Variables”:
Quote:

tag_cloud
.
Update:
Reimport the new product xml file and allow overwrite.
See the 2nd post for a screenshot and template hook selection tips.

Versions:
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Notes:
1. I read all posts for this mod so feel free to post any comments or suggestions.
2. You will be notified by e-mail for future updates if you click “Marked as Installed.” If you find this mod useful, remember to click “Nominate for MOTM.”


vbboarder 12 Sep 2008 23:03

1 Attachment(s)
Things to notice with the new 2.0 tag cloud:
1. Tag cloud is no longer directly below the navbar (you can move it anywhere you want).
2. Button to collapse the tag cloud at the right corner.
3. Legend for the active & preferred tags at the right corner.
4. “Uploaded” is styled red because it’s set as a preferred tag.
5. “Test” & “xml” are styled aqua because they are active/ present in the thread being viewed (for a forum, all tags in its threads will be custom styled).

Template Hook Selection Tips:
1. You can find and place hooks in adv_portal, FORUMHOME, FORUMDISPLAY, & SHOWTHREAD templates. The hook must be $navbar, $template_hook, or a HTML comment (ie: $template_hook[place] or <!-- comment -->).
2. If you set the hook to a nonexistent $template_hook or HTML comment, then the tag cloud will not show. Also, if you don’t specify a hook location then it will not show.
3. If you set the hook to a nonvalid value (ie: $test, test, <td>, etc.), then the tag cloud will show below the navbar by default.
4. If the hook occurs multiple times within the template, then the tag cloud will also appear multiple times.
5. If you’re familiar with the template, you can add your own $template_hook or HTML comment to place the tag cloud where you want.

6. The tag cloud will not show if you choose a hook located within an <if> condition that evaluates to false.
7. Hooks located in a table must be located within a <td> cell, otherwise the table layout may be messed up. Caution: forumhome’s template hooks are not located in <td> cells.
8. Hooking the tag cloud in the middle of a form can potentially disable the form. For example, in SHOWTHREAD if you use <!-- controls above postbits --> as a hook, then the inline moderation & tag editing will not function!

FreshFroot 12 Sep 2008 23:05

nice hack, will try it out :D

thanks ;)

SEOvB 13 Sep 2008 02:22

Um, all the other mods would let you display the tag cloud wherever you'd want to as well.

But nice job none the less, looks good

vbboarder 13 Sep 2008 03:29

2.0.0 New Features: See the 2nd post for a screenshot and template hook selection tips.
Auto templating – allows setting the location of the tag cloud anywhere on the page.
Tag cloud resides in a collapsible box and has a legend for the custom styles.
Tags that belong to the active forum or thread being viewed can have custom styles.
Added option to set preferred tags that will have custom styles to get them noticed more.

This mod does several things that other tag clouds mods don't do:
1. This is the only mod that will move the showthread's tag box next to the tag cloud.
2. This is the only mod that will show the tag cloud in vbAdvanced without requiring template edits or creating vba modules.
3. This is the only mod that will give you the option of showing or not showing the tag cloud on all 3 types of forum pages without requiring template edits.
4. This is the only mod that allows you to custom style active & preferred tags.

redlabour 13 Sep 2008 08:29

Absolutely great! :)

But:

[Bug] Clicking Tabs does not bring you to the Tab related Overview of Topics if you click them at vBadvanced if vBadvanced is not installed in Forumroot. It only makes a refresh of the Portal.

My vBa is installed at / and not at /forum.

Please fix this. ;)

You can see it at http://www.politikstube.de

vbboarder 13 Sep 2008 11:58

Just updated to 1.0.1: fixed tag links for sites with vbAdvanced installed in a NON-forum directory (other sites should not be affected). ;)

ujai 13 Sep 2008 14:39

Hi,

How can I edit the tag to be place at other place besides the top?

Thanks in advance

redlabour 13 Sep 2008 14:48

Quote:

Originally Posted by vbboarder (Post 1621047)
Just updated to 1.0.1: fixed tag links for sites with vbAdvanced installed in a NON-forum directory (other sites should not be affected). ;)

Works perfect! :)

sinucello 13 Sep 2008 20:01

Hi,

thanks for this mod, I like the flexibility of it. Maybe you could add an option that allows to place a custom marker in one or all of the templates e. g. ###tagcloud###. This would be even more flexible.

all the best,
Sacha

vbboarder 13 Sep 2008 20:27

Quote:

Originally Posted by redlabour (Post 1621153)
Works perfect! :)

Glad the update works fine :D

Quote:

Originally Posted by ujai (Post 1621147)
Hi,

How can I edit the tag to be place at other place besides the top?

Thanks in advance

Quote:

Originally Posted by sinucello (Post 1621374)
Hi,

thanks for this mod, I like the flexibility of it. Maybe you could add an option that allows to place a custom marker in one or all of the templates e. g. ###tagcloud###. This would be even more flexible.

all the best,
Sacha

Actually, there's already lots of markers (aka template hooks) in VB templates that can be used to implement customized tag cloud placement.

Ujai, before I tell you how, let me wait and see how many people want the tag cloud in a different place besides below the navbar. If there's a significant # of people wanting that feature, then I'll update this mod for auto-customization so you won't have to do custom coding yourself. ;)
Too bad I can't add a poll to this thread - just post a reply if you want this mod to have an auto-customization placement feature. I take it that so far I have 2 votes for this - Ujai & sinucello.

ujai 15 Sep 2008 04:16

Thank you, if not many people wants it and you decide not to make it auto customize, can you please let me know how to change it?

Alien 15 Sep 2008 17:14

How many queries does this add?

vbboarder 15 Sep 2008 18:56

Quote:

Originally Posted by ujai (Post 1622363)
Thank you, if not many people wants it and you decide not to make it auto customize, can you please let me know how to change it?

Actually, I'll probably implement the auto-customization regardless. However, it could be anytime from 2 weeks to 2 months for me to implement it, depending on my priorities. Right now, it's low priority since only 2 users have requested it. I don't want to start posting customization instructions 'cause this can lead to support overload for me considering the # of possible places to hook the tag clouds to.
Just for my info, why don't you want the tag cloud near the navbar?

vbboarder 15 Sep 2008 20:01

Quote:

Originally Posted by Alien (Post 1622655)
How many queries does this add?

This mod used VB's tag cloud function for fetching & building the tag cloud. Reviewing the code shows 1 db query and not even that if you have caching enabled (ie: APC or memcache) as recommended by VB.


All times are GMT. The time now is 23:38.

Powered by vBulletin® Version 3.8.14
Copyright © 2020, MH Sub I, LLC dba vBulletin. All Rights Reserved. vBulletin® is a registered trademark of MH Sub I, LLC
Copyright ©2001 - , vbulletin.org. All rights reserved.