Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Tag Cloud Details »»
Tag Cloud
Version: 1.00, by microbob microbob is offline
Developer Last Online: Apr 2015 Show Printable Version Email this Page

Category: Miscellaneous Hacks - Version: 3.8.7 Rating:
Released: 03-21-2013 Last Update: Never Installs: 1
 
No support by the author.

I'm working with vBulletin 3.8.7 PL3 and would like to make a custom Tag Cloud.

Right now, in vB's default mode, it's pulling the most-frequently used keyword tags from my forum threads and assembling them into the Tag Cloud.

I currently have my forums set up to cover (6) different states and the Tag Cloud pulls from those (6). However, I'd like to have it pull from EACH STATE vs. ALL SIX and then have state-specific tag clouds put on certain pages of my site.

I'm a beginner, so I don't know what code to change. So...I've copied all of the TAG TEMPLATES below. Can someone help me to determine what parts of the code to change/modify? I'm thinking that I COPY the existing templates, add a suffix to each template file name prior to saving, and then change the code accordingly. I'm thinking that I would wind up with (6) separate sets of customized templates, as that seems the easiest way to do it? I need to keep it as simple as possible.

If you could highlight the code and explain what I need to do, that would be great!

Templates/code is as follows:

TAGBIT

<a href="tags.php?$session[sessionurl]tag=$tag_url">$tag</a>

__________________________________________________ _______________________

TAGBIT_WRAPPER

<if condition="$tag_list">$tag_list<else /><i>$vbphrase[none]</i></if> <img src="$stylevar[imgdir_misc]/11x11progress.gif" id="tag_form_progress" class="inlineimg" style="display:none" alt="" />

__________________________________________________ _______________________

TAG_CLOUD_BOX

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="tcat">
<div class="smallfont" style="float:$stylevar[right]"><phrase 1="$cloud[count]">$vbphrase[these_are_the_x_most_used_thread_tags]</phrase></div>
$vbphrase[tag_cloud]
</td>
</tr>
<tr>
<td class="alt1" style="text-align:justify">$cloud[links]</td>
</tr>
</table>

__________________________________________________ _______________________

TAG_CLOUD_BOX_SEARCH

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="tcat">
<div class="smallfont" style="float:$stylevar[right]"><phrase 1="$cloud[count]">$vbphrase[these_are_the_x_most_searched_thread_tags]</phrase></div>
$vbphrase[search_tag_cloud]
</td>
</tr>
<tr>
<td class="alt1" style="text-align:justify">$cloud[links]</td>
</tr>
</table>

__________________________________________________ _______________________

TAG_CLOUD_HEADINCLUDE

<style type="text/css">
a.tagcloudlink:link, a.tagcloudlink:visited { text-decoration:none; }
a.tagcloudlink:hover, a.tagcloudlink:active { text-decoration:underline; }
a.level1 { font-size: xx-small; }
a.level2 { font-size: small; }
a.level3 { font-size: medium; }
a.level4 { font-size: large; }
a.level5 { font-size: xx-large; }
</style>

__________________________________________________ _______________________

TAG_CLOUD_LINK

<a href="tags.php?$session[sessionurl]tag=$thistag[tagtext_url]" class="tagcloudlink level$thistag[level]">$thistag[tagtext]</a>

__________________________________________________ _______________________

TAG_CLOUD_PAGE

$stylevar[htmldoctype]
<html xmlns="http://www.w3.org/1999/xhtml" dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
$headinclude
<title>$vboptions[bbtitle] - $vbphrase[tags]</title>
<if condition="$show['inlinemod']"><script type="text/javascript" src="clientscript/vbulletin_inlinemod.js?v=$vboptions[simpleversion]"></script></if>
$tag_cloud_headinclude
</head>
<body>
$header
$navbar

<if condition="$tag_cloud">
$tag_cloud<br />
</if>

<form action="tags.php" method="get">
<if condition="$session['sessionhash']">
<input type="hidden" name="s" value="$session[sessionhash]" />
</if>
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center" id="threadslist">
<tr>
<td class="tcat">$vbphrase[search_by_tag]</td>
</tr>
<tr>
<td class="alt1" align="center"><div style="width: $stylevar[formwidth]" align="$stylevar[left]">
<span id="tag_wrapper"><input type="text" id="tag_input" name="tag" size="25" style="width: 80%" class="bginput" /></span>
<input type="submit" class="button" value="$vbphrase[search]" />
</div></td>
</tr>
</table>
</form>

<if condition="$show['popups']">
<div id="tag_wrapper_menu" class="vbmenu_popup" style="display:none"></div>
<script type="text/javascript" src="clientscript/vbulletin_ajax_tagsugg.js?v=$vboptions[simpleversion]"></script>
<script type="text/javascript">
<!--
vbmenu_register('tag_wrapper', true);
tag_comp = new vB_AJAX_TagSuggest('tag_comp', 'tag_input', 'tag_wrapper');
//-->
</script>
</if>

$footer

</body>
</html>

__________________________________________________ _______________________

TAG_EDIT

$stylevar[htmldoctype]
<html xmlns="http://www.w3.org/1999/xhtml" dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
$headinclude
<title>$vboptions[bbtitle] - $threadinfo[title] - $vbphrase[tag_management]</title>
<style type="text/css" id="vbulletin_showthread_css">
<!--
#tag_edit_list { list-style:none; margin:0px; padding:0px; }
#tag_edit_list li { float:$stylevar[left]; display:block; width:200px; }
#tag_edit_list li.mine { font-weight:bold; }
-->
</style>
</head>
<body>
$header
$navbar

<if condition="$show['errors']">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="tcat">$vbphrase[errors]</td>
</tr>
<tr>
<td class="alt1">$errorlist</td>
</tr>
</table>
<br />
</if>

<form action="threadtag.php?do=managetags&amp;t=$threadi nfo[threadid]" method="post">
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
<input type="hidden" name="t" value="$threadinfo[threadid]" />
<input type="hidden" name="do" value="managetags" />
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="tcat">
<span class="smallfont normal" style="float: $stylevar[right]"><b>$vbphrase[thread]</b>: <a href="showthread.php?$session[sessionurl]t=$threadinfo[threadid]">$threadinfo[title]</a></span>
$vbphrase[tag_management]
</td>
</tr>
<tr>
<td class="panelsurround" align="center">
<div class="panel">
<div style="width:$stylevar[formwidth]" align="$stylevar[left]">
<fieldset class="fieldset">
<legend>$vbphrase[tags]</legend>
<div style="padding:$stylevar[formspacer]px">
<if condition="$tag_manage_options">
<div style="padding-bottom:$stylevar[formspacer]px">$vbphrase[uncheck_tag_remove_bold_you]</div>
<ul class="floatcontainer" id="tag_edit_list">
$tag_manage_options
</ul>
<hr size="1" style="color:$stylevar[tborder_bgcolor]; background-color:$stylevar[tborder_bgcolor]" />
</if>

<div style="float: $stylevar[right]">
<if condition="$show['add_option']"><div style="visibility:hidden">text</div></if>
<input type="submit" class="button" value="$vbphrase[save_changes]" accesskey="s" tabindex="302" />
</div>

<if condition="$show['add_option']">
<div>$vbphrase[add_tags] <span class="shade">($vbphrase[separate_tags_using_comma])</span></div>
<div id="tag_add_wrapper"><input type="text" class="bginput" name="taglist" id="tag_add_input" size="50" style="width:300px" tabindex="301" /></div>
<if condition="$show['tag_limit_phrase']">
<if condition="!$tags_remain">
$vbphrase[cannot_add_tags_remove_first]
<else />
<phrase 1="$tags_remain">$vbphrase[you_may_add_x_tags_to_thread]</phrase>
</if>
</if>
$vbphrase[tags_visible_all_users]
</if>
</div>
</fieldset>
</div>
</div>
</td>
</tr>
</table>
</form>

<if condition="$show['popups']">
<div id="tag_add_wrapper_menu" class="vbmenu_popup" style="display:none"></div>
<script type="text/javascript" src="clientscript/vbulletin_ajax_tagsugg.js?v=$vboptions[simpleversion]"></script>
<script type="text/javascript">
<!--
vbmenu_register('tag_add_wrapper', true);
tag_add_comp = new vB_AJAX_TagSuggest('tag_add_comp', 'tag_add_input', 'tag_add_wrapper');
tag_add_comp.allow_multiple = true;
tag_add_comp.set_delimiters('$tag_delimiters');
//-->
</script>
</if>

$footer
</body>
</html>

__________________________________________________ _______________________

TAG_EDIT_AJAX

<form action="threadtag.php?do=managetags&amp;t=$threadi nfo[threadid]" id="tag_edit_form" method="post">
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
<input type="hidden" name="t" value="$threadinfo[threadid]" />
<input type="hidden" name="do" value="managetags" />

<div align="center"><div style="width:$stylevar[formwidth]" align="$stylevar[left]">
<fieldset class="fieldset">
<legend>$vbphrase[tags]</legend>
<div style="padding:$stylevar[formspacer]px">
<if condition="$tag_manage_options">
<div style="padding-bottom:$stylevar[formspacer]px">$vbphrase[uncheck_tag_remove_bold_you]</div>
<ul class="floatcontainer" id="tag_edit_list">
$tag_manage_options
</ul>
<hr size="1" style="color:$stylevar[tborder_bgcolor]; background-color:$stylevar[tborder_bgcolor]" />
</if>

<div style="float: $stylevar[right]">
<if condition="$show['add_option']"><div style="visibility:hidden">text</div></if>
<img src="$stylevar[imgdir_misc]/progress.gif" id="tag_edit_progress" class="inlineimg" style="display:none" alt="" />
<input type="submit" name="tagsubmit" class="button" value="$vbphrase[save_changes]" accesskey="s" tabindex="302" />
<input type="button" class="button" value="$vbphrase[cancel]" id="tag_edit_cancel" accesskey="c" tabindex="303" />
</div>

<if condition="$show['add_option']">
<div>$vbphrase[add_tags] <span class="shade">($vbphrase[separate_tags_using_comma])</span></div>
<div id="tag_add_wrapper"><input type="text" class="bginput" name="taglist" id="tag_add_input" size="50" style="width:300px" tabindex="301" /></div>
<if condition="$show['tag_limit_phrase']">
<if condition="!$tags_remain">
$vbphrase[cannot_add_tags_remove_first]
<else />
<phrase 1="$tags_remain">$vbphrase[you_may_add_x_tags_to_thread]</phrase>
</if>
$vbphrase[tags_visible_all_users]
</if>
</if>
</div>
</fieldset>
</div></div>
</form>

<if condition="$show['popups']">
<div id="tag_add_wrapper_menu" class="vbmenu_popup" style="display:none"></div>
</if>

__________________________________________________ _______________________

TAG_MANAGEBIT

<li class="tag<if condition="$tag['ismine']"> mine</if>"<if condition="$tag['username']"> title="<phrase 1="$tag[username]">$vbphrase[added_by_x]</phrase>"</if>>
<if condition="$show['tag_checkbox']">
<label for="tag_$tag[tagid]"><input type="checkbox" name="tagskept[]" value="$tag[tagid]" id="tag_$tag[tagid]" checked="checked" />$tag[tagtext]</label>
<input type="hidden" name="tagsshown[]" value="$tag[tagid]" />
<else />
<label for="tag_$tag[tagid]"><input type="checkbox" checked="checked" disabled="disabled" id="tag_$tag[tagid]" />$tag[tagtext]</label>
</if>
</li>

__________________________________________________ _______________________

TAG_SEARCH

$stylevar[htmldoctype]
<html xmlns="http://www.w3.org/1999/xhtml" dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
$headinclude
<title>$vboptions[bbtitle] - <phrase 1="$tag[tagtext]">$vbphrase[threads_tagged_with_x_title]</phrase><if condition="$pagenumber>1"> - <phrase 1="$pagenumber">$vbphrase[page_x]</phrase></if></title>
<if condition="$show['inlinemod']"><script type="text/javascript" src="clientscript/vbulletin_inlinemod.js?v=$vboptions[simpleversion]"></script></if>
</head>
<body>
$header
$navbar

<if condition="$pagenav">
<table cellpadding="0" cellspacing="0" border="0" width="100%" style="margin-bottom:3px">
<tr valign="bottom">
<td align="$stylevar[right]">$pagenav</td>
</tr>
</table>
</if>

<form action="inlinemod.php" method="post" id="inlinemodform">
<input type="hidden" name="url" value="$url" />
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center" id="threadslist">
<tr>
<td class="tcat" colspan="$columncount"><phrase 1="$tag[tagtext]">$vbphrase[threads_tagged_with_x]</phrase></td>
</tr>
<tr>
<if condition="$show['threadicons']">
<td class="thead" colspan="2">&nbsp;</td>
<else />
<td class="thead">&nbsp;</td>
</if>
<td class="thead" width="75%">$vbphrase[thread] / $vbphrase[thread_starter]</td>
<td class="thead" width="150" align="center" nowrap="nowrap">$vbphrase[last_post]</td>
<td class="thead" align="center" nowrap="nowrap">$vbphrase[replies]</td>
<td class="thead" align="center" nowrap="nowrap">$vbphrase[views]</td>
<td class="thead" width="25%">$vbphrase[forum]</td>

<if condition="$show['inlinemod']">
<if condition="$show['popups']">
<td class="vbmenu_control" id="imod" align="center" title="$vbphrase[moderation]"> <script type="text/javascript"> vbmenu_register('imod'); </script> </td>
<else />
<td class="thead" align="center">
<input type="checkbox" name="allbox" id="checkall_all" title="$vbphrase[check_uncheck_all]" onclick="inlineMod.check_all()" />
</td>
</if>
</if>
</tr>

$threadbits

</table>

<if condition="$show['ajax_js']">
<script type="text/javascript" src="clientscript/vbulletin_ajax_threadslist.js?v=$vboptions[simpleversion]"></script>
<script type="text/javascript">
<!--
vB_AJAX_Threadlist_Init('threadslist');
var titlemaxchars = parseInt("$vboptions[titlemaxchars]");
//-->
</script>
</if>

<if condition="$pagenav">
<table cellpadding="0" cellspacing="0" border="0" width="100%" style="margin-top:3px">
<tr valign="top">
<if condition="$pagenav"><td align="$stylevar[right]">$pagenav</td></if>
</tr>
</table>
</if>

<if condition="$show['inlinemod']">
<table cellpadding="0" cellspacing="0" border="0" width="100%" style="margin-top:3px">
<tr valign="top">
<td align="$stylevar[right]">
<div class="smallfont" style="text-align:$stylevar[left]; white-space:nowrap; float:$stylevar[right]">
<strong>$vbphrase[moderation]</strong><br />
<select name="do">
<if condition="$show['deletethread'] OR $show['spamctrls'] OR $show['openthread'] OR $show['approvethread'] OR $show['movethread'] OR $template_hook['inlinemod_thread_bottom']">
<optgroup label="$vbphrase[option]">

<if condition="$show['deletethread']">
<option value="deletethread">$vbphrase[delete_threads]</option>
<option value="undeletethread">$vbphrase[undelete_threads]</option>
</if>

<if condition="$show['spamctrls']">
<option value="spamthread">$vbphrase[delete_threads_as_spam]</option>
</if>

<if condition="$show['openthread']">
<option value="open">$vbphrase[open_threads]</option>
<option value="close">$vbphrase[close_threads]</option>
</if>

<if condition="$show['approvethread']">
<option value="approvethread">$vbphrase[approve_threads]</option>
<option value="unapprovethread">$vbphrase[unapprove_threads]</option>
</if>

<if condition="$show['movethread']">
<option value="stick">$vbphrase[stick_threads]</option>
<option value="unstick">$vbphrase[unstick_threads]</option>
<option value="movethread">$vbphrase[move_threads]</option>
<option value="mergethread">$vbphrase[merge_threads]</option>
</if>

$template_hook[inlinemod_thread_bottom]
</optgroup>
</if>
<optgroup label="____________________">
<option value="viewthread">$vbphrase[view_selected_threads]</option>
<option value="clearthread">$vbphrase[clear_thread_list]</option>
</optgroup>
</select><input type="submit" class="button" id="inlinego" value="$vbphrase[go]" />
<script type="text/javascript">
<!--
inlineMod = new vB_Inline_Mod('inlineMod', 'thread', 'inlinemodform', '$vbphrase[go_x]');
//-->
</script>
</div>
</td>
</tr>
</table>
</if>

</form>

<if condition="$show['inlinemod'] AND $show['popups']">
<div class="vbmenu_popup" id="imod_menu" style="display:none" align="$stylevar[left]">
$threadadmin_imod_menu
</div>
</if>

$footer

</body>
</html>

__________________________________________________ _______________________

Thanks for your assistance!

Bob

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 03-23-2013, 10:12 PM
bada_bing's Avatar
bada_bing bada_bing is offline
 
Join Date: Feb 2004
Location: Michigan
Posts: 1,698
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Wow this is all template edits which is not really what most of us want to do anymore, it would be most appreciated if you can create a plugin for this
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:51 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04101 seconds
  • Memory Usage 2,258KB
  • Queries Executed 18 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (2)post_thanks_box
  • (2)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit_info
  • (1)postbit
  • (2)postbit_onlinestatus
  • (2)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete