PDA

View Full Version : Mini Mods - Tag cloud block for vbdrupal


redraider
06-26-2008, 10:00 PM
This is my first mod to be released in vb org. Its a simple mod which helps you to show vbulletin tags in a vbdrupal (https://vborg.vbsupport.ru/showthread.php?t=153543) block. If you have suggestions to improve, please drop them in here. Please note the vbdrupal 5.7 is compatible with vb3.7.x hence I have released this mod here. here.

What does it do:
This hack is for tagging feature introduced in vb3.7x. It uses vbulletin's tag cloud templates to show a tag cloud on drupal block:

Steps to Install

Backup
- Make sure you have vbdrupal installed and working
- Make sure you have vbulletin 3.7.x installed and working. This mod will not work with vb 3.6.x since tagging was introduced only in vb 3.7
- Make sure you take a backup

Install
1: Drupal admin -> Add block

2: Select input format as phpcode

3: (you can change the CSS part to your liking)


<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>
<?php global $vbulletin;
if ($vbulletin->options['threadtagging'] == 1 AND $vbulletin->options['tagcloud_searchcloud'] == 1)
{
require_once(DIR . '/includes/functions_search.php');
$tcloud = fetch_tagcloud('search');
}
else
{
$tcloud = '';
}
echo $tcloud;
?>



Try the default one first, but you may need to change the BOLD line above to suite you directory structure, t. Make sure php is selected as input format.

4: Save block

5: (Optional to make the box look better), Recommended to use template modification system plugin (https://vborg.vbsupport.ru/showthread.php?t=152931).
Edit template: tag_cloud_box_search

Find and delete:

<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>

redraider
06-27-2008, 02:20 PM
reserved first post.

sinucello
06-28-2008, 09:16 AM
Hello redraider,

thanks for sharing this! Drupal seems to be a great companion for vBulletin. Will this create a bridge to Drupals taxonomy system or will it just display the vB tags somewhere on the Drupal pages and you have to add the same tags again with Drupal taxonomy?

all the best,
Sacha

redraider
06-29-2008, 10:52 AM
This will just display the vb Tags in a drupal blocks/ nodes and is not a bridge

I am looking into combining the two (drupal tags + vbuleltin tags) , but that is more complex.

karlm
07-06-2008, 04:25 PM
Nice work :)

leitel
08-31-2008, 01:18 PM
I am again looking at Drupal/vB/vbSEO. A major attraction is the Drupal tag cloud. I wonder if it is possible to associate Drupal tags to a vB thread. I need a way to show ALL content, Drupal AND/OR vB content based on ONE tag system. Has anyone seen/done this?

redraider
09-05-2008, 02:19 AM
I dont think this has been done.

leitel
09-05-2008, 02:59 AM
In this post http://www.vbdrupal.org/forum/showpost.php?p=8984&postcount=5 I described this need and some ideas on how it could be accomplished. At this point it is a gleam in my eye!! :)

gtcompscientist
09-15-2008, 07:53 PM
I can't seem to get the tag cloud to show up properly... it just shows the code (minus the actual <style> tags).

redraider
10-02-2008, 06:51 PM
It seems to me that you havent put the input format as php code for the block ...that is why all the code is escaped'