The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
|
#1
|
|||
|
|||
How to Make a Custom Tag Cloud
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&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&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"> </td> <else /> <td class="thead"> </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 |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|