vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Can't get Thread views to show up on widget (https://vborg.vbsupport.ru/showthread.php?t=260579)

popular 03-18-2011 04:33 AM

Can't get Thread views to show up on widget
 
Trying to get thread views to show up on Recent Thread Widget by editing "vbcms_widget_recentthreads_page" and adding this in
Code:

{vb:raw thread.views}
but it does nothing. What am I doing wrong?

Lynne 03-18-2011 04:24 PM

You can't just throw a variable into a template and expect results. You need to actually define the variable if you want something to show up. Have you defined it somewhere?

popular 03-18-2011 04:53 PM

Oh I see, I haven't defined the variable.. Could you tell me how to define it and how do I know if a variable is already defined or not in a template?

Sorry I'm kinda new at this.. I just found {vb:raw thread.views} in the "threadbit" template and assumed it would work =(

Lynne 03-18-2011 05:03 PM

You can find if it is defined by looking to see where the template is rendered. Do a search in your vbulletin files for the template (vbcms_widget_recentthreads_page - it's used in recenthreads.php and recentposts.php) and then look around there and see which variables are defined. In this case, it is CMS stuff and I am not that familiar with coding there.

popular 03-18-2011 07:01 PM

Thanks! I found the recenthreads.php and recentposts.php and I fixed my problem but I'm still not sure how you were able to find the location where the template is rendered could you elaborate a little or is it in the vb manual? Sorry for the trouble!

Lynne 03-18-2011 07:14 PM

I just did a search on the template name in the vbulletin files. That is a function in my text editor - it has nothing to do with vbulletin.


All times are GMT. The time now is 01:14 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.01019 seconds
  • Memory Usage 1,716KB
  • 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
  • (1)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete