The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
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.
|
#2
|
||||
|
||||
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.
|
#3
|
|||
|
|||
Thanks, Lynne. And sorry if I seem a bit stunned, but...
Quote:
The HTML page? PHP page? Quote:
Add it into what? Where? |
#4
|
||||
|
||||
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. |
#5
|
|||
|
|||
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.
|
#6
|
|||
|
|||
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. Feel free to PM or email me if you'd rather take it off thread.
|
#7
|
||||
|
||||
Have you looked at the URL and can you see what is wrong with it? Can you post a link to the page?
|
#8
|
|||
|
|||
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. |
#9
|
||||
|
||||
Glad you got it figured out.
|
#10
|
|||
|
|||
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.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|