Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 02-19-2011, 05:43 PM
cbiweb cbiweb is offline
 
Join Date: May 2004
Location: Nova Scotia, Canada
Posts: 238
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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.
Reply With Quote
  #2  
Old 02-19-2011, 07:17 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #3  
Old 02-19-2011, 11:53 PM
cbiweb cbiweb is offline
 
Join Date: May 2004
Location: Nova Scotia, Canada
Posts: 238
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks, Lynne. And sorry if I seem a bit stunned, but...
Quote:
Originally Posted by Lynne View Post
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 View Post
...and added it into the page.
The HTML page? PHP page?

Quote:
Originally Posted by Lynne View Post
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 View Post
Then add all the code from the forumdisplay_start plugin...
Add it into what? Where?
Reply With Quote
  #4  
Old 02-20-2011, 03:03 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #5  
Old 02-21-2011, 10:14 PM
cbiweb cbiweb is offline
 
Join Date: May 2004
Location: Nova Scotia, Canada
Posts: 238
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #6  
Old 03-01-2011, 01:43 AM
cbiweb cbiweb is offline
 
Join Date: May 2004
Location: Nova Scotia, Canada
Posts: 238
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #7  
Old 03-01-2011, 01:48 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Have you looked at the URL and can you see what is wrong with it? Can you post a link to the page?
Reply With Quote
  #8  
Old 03-01-2011, 01:56 AM
cbiweb cbiweb is offline
 
Join Date: May 2004
Location: Nova Scotia, Canada
Posts: 238
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #9  
Old 03-01-2011, 04:25 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Glad you got it figured out.
Reply With Quote
  #10  
Old 03-04-2011, 06:41 PM
cbiweb cbiweb is offline
 
Join Date: May 2004
Location: Nova Scotia, Canada
Posts: 238
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:12 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04121 seconds
  • Memory Usage 2,259KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete