vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=228)
-   -   Miscellaneous Hacks - Global Tag Cloud in Side Bar or Anywhere (https://vborg.vbsupport.ru/showthread.php?t=177429)

lafsunlmtd 04-27-2008 10:00 PM

Global Tag Cloud in Side Bar or Anywhere
 
What this plugin does

This plugin lets you call the tag cloud on any page. We wanted a tag cloud in a side column on our forum, and also the freedom to call it from within any template.

Live Demo

You can view the plugin in action on AdminFusion

Installation Instructions

1. Login in to the AdminCP -> Plugins and Products -> Manage Products
2. Click the Add/Import Product link at the bottom of the page and browse to the plugin's xml file.
3. Add the following variable where ever you want the tag cloud to appear:

Code:

$vbcloud
4. If you want to display just the cloud (i.e. without the category) open up the tag_cloud_search template and replace everything with the code below:

Code:


<if condition="THIS_SCRIPT != tags">
$cloud[links]
<else />
<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>
</if>

Version Information:
1.01 -- Updated to make compatible with Vbulletin Blog
1.02 -- Script rewrite. Fixed time stamp issue, blog issue and other minor problems.
1.03
Now returns the most popular tags as opposed to the most searched for tags.
Some minor optimizations made.
Instructions revised (uses tag_cloud_box template instead of tag_cloud_search)

lafsunlmtd 04-28-2008 07:33 PM

Updated to Version 1.03

Stoebi 04-29-2008 01:08 AM

I found a readme.txt with installation instructions, because I hate to must to go online to read installation instructions.

Thank you very much. *installed*

Regards, Stoebi

kollam003 04-29-2008 07:43 AM

will it work with 3,6.10 ?

Icy 04-29-2008 07:53 AM

Quote:

Originally Posted by kollam003 (Post 1502111)
will it work with 3,6.10 ?

AFAIK vB 3.6 don't have tag features :)

Jasem 04-29-2008 08:42 AM

Thank you

purepothead 04-29-2008 09:47 PM

ah would really love to use this but it conflicts with some mods creating DB errors.

MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' '%c-%e-%Y')

Only happens when this mod is enabled and resolves back to working when its disabled. very strange stuff. Thanks for the effort tho!

Defkalion 05-01-2008 10:21 AM

Is it possible to include also the search tags box in this sidebar?

Julie 05-01-2008 12:40 PM

Thanks, working nicely :)

markbolyard 05-01-2008 01:35 PM

Works great. Thank you.

Alfa1 05-01-2008 02:00 PM

Please add the function to show only forum specific tags are shown. i.e. tags that are used in the forum that the tag cloud is in. That would have a very nice effect on SEO.

soundbarrierpro 05-01-2008 07:02 PM

I already have Ultimate Side Columns implemented. Can I add this code to one of the side column blocks in ACP? Will it still work?

cihangir 05-03-2008 05:16 PM

i have been using this plugin and i like it much, but it is not compatible with the vbulletin-blog add-on.

here is the copy of the error message:

PHP Code:

Database error in vBulletin 3.7.0:

Invalid SQL:

               (
                       
SELECT COUNT(*) AS total,
                       
FROM_UNIXTIME(dateline - , '%c-%e-%Y') AS period
                       FROM blog 
AS blog

                       WHERE state IN
('visible''moderation''deleted') AND dateline >= 1208728800 AND dateline 1209832470
                       GROUP BY period
               
UNION (
                       
SELECT COUNT(*) AS total,
                       
FROM_UNIXTIME(dateline - , '%c-%e-%Y') AS period
                       FROM blog 
AS blog
                       WHERE blog
.userid AND dateline >= 1208728800 AND dateline 1212357600
                       GROUP BY period
               
);

MySQL Error   You have an error in your SQL syntaxcheck the manual that corresponds to your MySQL server version for the right syntax to use near ' '%c-%e-%Y') AS period
                       FROM blog AS blog

                       WHERE state IN('
visible', 'mo' at line 3
Error Number  : 1064
Request Date  : Saturday, May 3rd 2008 @ 06:34:30 PM
Error Date    : Saturday, May 3rd 2008 @ 06:34:30 PM
Script        : http://forum.zoque.net/blog.php
Referrer      : http://forum.zoque.net/
Classname     : vB_Database
MySQL Version : 5.0.51a-0.dotdeb.1-log 


lafsunlmtd 05-04-2008 07:14 AM

am looking into vb-blog compatability

MiahBeSmokin420 05-04-2008 09:53 AM

HERE IS THE FIX FOR VB BLOGS

ok i though i would share this

but for everyone getting the error when you go to view blogs

this is what you need to do to fix that

go to plugin manager

look for Cloud > Global Start

then replace everything with :

HTML Code:


if (THIS_SCRIPT == 'blog' OR THIS_SCRIPT == 'blog_usercp' OR THIS_SCRIPT == 'blog_subscription' OR THIS_SCRIPT == 'blog_search' OR THIS_SCRIPT == 'blog_search' OR THIS_SCRIPT == 'blog_report' OR THIS_SCRIPT == 'blog_post' OR THIS_SCRIPT == 'blog-newattachment' OR THIS_SCRIPT == 'blog_inlinemod' OR THIS_SCRIPT == 'blog_callback' OR THIS_SCRIPT == 'blog_attachment' OR THIS_SCRIPT == 'blog_ajax' OR THIS_SCRIPT == 'blog_external') {     
    } else {
$vbulletin->datastore->fetch(array('tagcloud'));
$vbulletin->templatecache['tag_cloud_box'] = str_replace('$vbphrase[tag_cloud]', 'Tag Cloud', $vbulletin->templatecache['tag_cloud_box']);

require_once(DIR . '/includes/functions_search.php');
$tag_cloud = fetch_tagcloud('usage');
if ($tag_cloud)
{
    eval('$headinclude .= "' . fetch_template('tag_cloud_headinclude') . '";');
}
 }

that should solve all problems with the errors on the blogs page cause it fixed it on mine

remember to make a txt copy of what was there before you change it

although the only thing that i did was added a if command to make it so it wont run the product on the blog page


the creator of this mod should edit the files so that this is built into the mod since you really dont need a cloud in the blogs anyways

hope that helps people enjoy

FLMom 05-04-2008 05:47 PM

Thanks! Installing now :D

FLMom 05-04-2008 06:09 PM

OK I got it to work, but I can't see the text because it is too light of a color. How can I change the color so it's readable?

Thanks!

jeff-- 05-06-2008 02:12 AM

A quick fix would be to make a new class with whichever color you want links to be (presumably the same as your forum links) and just apply a div around the $tag_cloud with that class.

After looking at your forum a better idea would be to follow step number 4 in the mod instructions where you replace tag_cloud_box with that code and make your own sidebar block instead of using the mod's code so that it will follow your css.

lafsunlmtd 05-06-2008 03:23 AM

ok updated with vb blog compatibility. Thanks for the quick code fix

RetroDreams 05-06-2008 01:57 PM

Works as expected.

FLMom 05-06-2008 02:18 PM

Quote:

Originally Posted by jeff-- (Post 1509970)
A quick fix would be to make a new class with whichever color you want links to be (presumably the same as your forum links) and just apply a div around the $tag_cloud with that class.

After looking at your forum a better idea would be to follow step number 4 in the mod instructions where you replace tag_cloud_box with that code and make your own sidebar block instead of using the mod's code so that it will follow your css.

Thank you! I will try that :D

FLMom 05-06-2008 06:11 PM

Tried it and it just doesn't look right :( Looks like I will be uninstalling... :(

Anne Lise 05-06-2008 06:33 PM

I can not get this to work in my right column.

markblair 05-08-2008 03:17 AM

Exactly what I was looking for. :) Thank you very much!

Baldilocks 05-09-2008 05:56 PM

Messes with the post time stamps. Any way around this??

TechGuy 05-12-2008 10:14 PM

I just noticed the same thing while troubleshooting a problem with users selecting their time zone. I was hoping the new version would fix it. :(

MiahBeSmokin420 05-12-2008 10:49 PM

i have come up with a another temp fix untill this guy accually fixed the thing

here is the catch though

tag cloud will not show on the following pages
showthread, forumdisplay, search

i did it on my site here is the fix if you want to do it but i realy hope this guys just fixes the mod cause ya its nice to have every where just blows that it dont work fully

here is the fix though

Go to plugin manager and find:
CLOUD > GLOBAL START

Replace Everything with:

Code:

if (THIS_SCRIPT == 'search' OR THIS_SCRIPT == 'forumdisplay' OR THIS_SCRIPT == 'showthread' OR THIS_SCRIPT == 'blog' OR THIS_SCRIPT == 'blog_usercp' OR THIS_SCRIPT == 'blog_subscription' OR THIS_SCRIPT == 'blog_search' OR THIS_SCRIPT == 'blog_search' OR THIS_SCRIPT == 'blog_report' OR THIS_SCRIPT == 'blog_post' OR THIS_SCRIPT == 'blog-newattachment' OR THIS_SCRIPT == 'blog_inlinemod' OR THIS_SCRIPT == 'blog_callback' OR THIS_SCRIPT == 'blog_attachment' OR THIS_SCRIPT == 'blog_ajax' OR THIS_SCRIPT == 'blog_external') {
       
    } else {
       
$vbulletin->datastore->fetch(array('tagcloud'));
$vbulletin->templatecache['tag_cloud_box'] = str_replace('$vbphrase[tag_cloud]', 'Tag Cloud', $vbulletin->templatecache['tag_cloud_box']);

require_once(DIR . '/includes/functions_search.php');
$tag_cloud = fetch_tagcloud('usage');
if ($tag_cloud)
{
    eval('$headinclude .= "' . fetch_template('tag_cloud_headinclude') . '";');
}

 }

Remember this is a temp fix as was my last one untill this guys fixes these problems

the tag box will be disabled on the pages that show the time well the pages that matter most i should say

but ya just do that and it will be fine untill this guy fixes this crap

MiahBeSmokin420 05-12-2008 11:40 PM

accually im sorry im uninstalling this untill the time crap is fixed cause i cant fix it and i have basically had to disable it on every page of my site to fix the times on all pages
thanks for the idea but im sure the time means more to members then a few words

Baldilocks 05-13-2008 08:58 PM

Yeah, it would be nice to have this fixed. :)

TechGuy 05-14-2008 08:45 PM

Anyone have any clues as to why this breaks the time zone?

Baldilocks 05-14-2008 09:24 PM

It seems to be working fine on their own website.... but not working on anyone else's. I wonder how they have their time and date settings in.

TechGuy 05-15-2008 11:53 AM

Good observation. I looked through the little bit of code there is for this hack, but just can't spot what would break the timezone. I might have to uninstall as well, but I really like using this hack! :(

TechGuy 05-15-2008 12:22 PM

I'm not sure if it's appropriate to upload this, so Mods feel free to delete it if it's not. I cleaned up the code a bit and managed to get the timezones to work. I won't promise that I didn't break something else in the process, and I don't claim to be a vB hack expert. :)

Baldilocks 05-15-2008 07:32 PM

That one works swimingly! :) Thanks

TechGuy 05-15-2008 08:17 PM

Glad to help out. :)

Baldilocks 05-16-2008 03:21 AM

Looks great in a sidebar/header template too!!!

Mum 05-16-2008 06:28 AM

Mike - i installed yours, but i have no idea where to insert
$tag_cloud
to make it look like that on the right side of the forum home - how do i do that?

Baldilocks 05-16-2008 08:02 AM

You can insert it anywhere really. I have mine in my custom HEADER template. (It's not a real side column but it's actually the header.)

In my other skins I just have the tag cloud beneath all of the "What's Happening" stuff at the bottom of FORUMHOME template.

Mum 05-16-2008 10:07 PM

I want it to sit on the left side of teh home page of the forums - what template do i try and add it to for this?

Jase2 05-18-2008 09:07 PM

How do I add this down the right hand side of FORUMHOME ?


All times are GMT. The time now is 06:13 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01316 seconds
  • Memory Usage 1,830KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (1)bbcode_html_printable
  • (1)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete