vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   How do I put the tag cloud on a custom page? (https://vborg.vbsupport.ru/showthread.php?t=259133)

cbiweb 02-19-2011 05:43 PM

How do I put the tag cloud on a custom page?
 
I've created a vBulletin powered page for the purpose of building a totally customized homepage for a client. He would like the tag cloud to be on that page. I've tried copying all the code from another page that shows the tag cloud, even tried copying an entire template onto the custom page, and got everything but the tag cloud itself. I also tried doing the registering variables thing but I don't totally understand that either, so it's most likely I've got that wrong too. Can anyone help me out on this? Thanks in advance.

Lynne 02-19-2011 07:17 PM

I just took the code from my product - Tag Cloud on Forumdisplay and added it into the page. You have stuff in the products that adds to the $phrasegroup and $globaltemplates. Then add all the code from the forumdisplay_start plugin except get rid of the whole condition around it. Then, make sure to set $foruminfo[forumid] to 0 because or else you will get an error and then get rid of anything that has to do with the $forumid - in the query and when setting the tagtest_urls (two places). Then, in your php page, make sure to register $cloud_html for your template ($templater->register('cloud_html', $cloud_html); ) and enter the variable into the template ({vb:raw cloud_html}). That should work.

cbiweb 02-19-2011 11:53 PM

Thanks, Lynne. And sorry if I seem a bit stunned, but...
Quote:

Originally Posted by Lynne (Post 2164377)
I just took the code from my product - Tag Cloud on Forumdisplay...

Your product has 6 or 7 files of code. Which code did you take? All of it from all the files? Or are you talking about the optional snippets of code shown in your product thread that you linked to?

Quote:

Originally Posted by Lynne (Post 2164377)
...and added it into the page.

The HTML page? PHP page?

Quote:

Originally Posted by Lynne (Post 2164377)
You have stuff in the products that adds to the $phrasegroup and $globaltemplates.

It's good to have stuff. Now what to do with it? ;) :)

Quote:

Originally Posted by Lynne (Post 2164377)
Then add all the code from the forumdisplay_start plugin...

Add it into what? Where?

Lynne 02-20-2011 03:03 AM

I just went through each plugin and grabbed what was needed and put it into the custom page. For instance...
hook location - parse_templates
- This plugin adds the css to the page. Instead, I went to the taglist.css template and just copy/pasted the css into my template in the <head> area with the required <style> tags around it.

hook location - cache_templates
- This plugin caches the templates, so I just added the template names to the $globaltemplates array in the custom page.

hook location - forumdisplay_start
- This plugin has all the needed code. I grabbed it all, removed the condition around it, and removed anything having to do with $forumid in there (three places, as I said) and added at the top the thing about forumid equaling 0.

hook location - init startup
- This plugin adds the phrasegroup, so I added it to the $phrasegroup array.

hook location - tags_list_query_limit
- This hook location is done. I did nothing with the content in this plugin.

So, I basically just went through every plugin and put the contents into the proper place in the custom page.

cbiweb 02-21-2011 10:14 PM

Thanks again, Lynne. I understand now. It may be a couple days before I get to do it, but I'll post back if I have any problems.

cbiweb 03-01-2011 01:43 AM

Thanks to your help I was able to get the cloud on the custom page; however, clicking a tag takes me to a 404 page. :confused: Feel free to PM or email me if you'd rather take it off thread.

Lynne 03-01-2011 01:48 AM

Have you looked at the URL and can you see what is wrong with it? Can you post a link to the page?

cbiweb 03-01-2011 01:56 AM

Actually, right after posting I did some digging and fixed it in the tag_cloud_link template where the URL is relative (and rightly so). I made it absolute. Not the most elegant fix, but one that will get it done.

The cloud is disabled on the new page for now, until I can style a container for it tomorrow.

Lynne 03-01-2011 04:25 PM

Glad you got it figured out. :)

cbiweb 03-04-2011 06:41 PM

ugh... I'm just not getting this. The cloud is there, but two elements of it I don't want: the collapse button and the heading "Tag Cloud". I know it's all put together from various templates, and I've tried using the relevant snippets and pasting them into my custom template, but it's not working. Very frustrating. Here's the page with the cloud, and you can see the result. View in Chrome to see the missing image icon, since it doesn't show up in Firefox. My time is so limited for troubleshooting, it's taking me days to get this done. :(:(:(


All times are GMT. The time now is 11:02 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.01092 seconds
  • Memory Usage 1,739KB
  • 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
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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