Go Back   vb.org Archive > vBulletin 5 Connect Discussion > vB5 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 08-12-2014, 05:00 PM
YankForum's Avatar
YankForum YankForum is offline
 
Join Date: Mar 2010
Location: MY
Posts: 304
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default VBulletin5 THIS_SCRIPT alternative solution?

Hi
in past versions we could use (THIS_SCRIPT === ' index' ) to check if it's main page and show advertisements on main page only.
but in vbulletin 5 THIS_SCRIPT is not working

is there any alternate solutions to this?
Reply With Quote
  #2  
Old 08-12-2014, 05:01 PM
Dead Eddie's Avatar
Dead Eddie Dead Eddie is offline
 
Join Date: Apr 2004
Location: at Home...
Posts: 196
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Where?

If it's in the main content area, you can put an HTML block on the main page through page builder.
Reply With Quote
  #3  
Old 08-12-2014, 05:07 PM
YankForum's Avatar
YankForum YankForum is offline
 
Join Date: Mar 2010
Location: MY
Posts: 304
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nope
i need to paste a piece of code in footer
and that code must be running only if it's the main page of forum (shouldn't be shown if it's showthread or forumdisplay ...)

any ideas?
Reply With Quote
  #4  
Old 08-12-2014, 05:10 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Did you try using the $nodeid ?
Reply With Quote
Благодарность от:
YankForum
  #5  
Old 08-12-2014, 05:33 PM
YankForum's Avatar
YankForum YankForum is offline
 
Join Date: Mar 2010
Location: MY
Posts: 304
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

tnx for the hint
but i cant still get the correct result
i'm not familiar with nodeid in vbulletin but i searched and found many pieces of codes , chosed this one and still cant get the correct output:

Code:
<vb:if condition="in_array($vbulletin->nodeid, array(1,2,3,4,5,6,7,8,9))">
the above if condition is not true? why? the nodeid must be set in somewhere else before checking it? what is it?

these are all empty:
Code:
{vb:raw $node[nodeid]}
{vb:raw $node.nodeid}
{vb:raw node[nodeid]}
{vb:raw node.nodeid}
Reply With Quote
  #6  
Old 08-12-2014, 06:51 PM
Scanu's Avatar
Scanu Scanu is offline
 
Join Date: Nov 2010
Posts: 829
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It should be $page['pageid']
Reply With Quote
Благодарность от:
YankForum
  #7  
Old 08-12-2014, 07:10 PM
YankForum's Avatar
YankForum YankForum is offline
 
Join Date: Mar 2010
Location: MY
Posts: 304
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Scanu View Post
It should be $page['pageid']
great
but what about main page? (we dont have an id there)

--------------- Added [DATE]1407875899[/DATE] at [TIME]1407875899[/TIME] ---------------

allright
tnx to Lynne and Scanu

i guess this is the code i needed:
Code:
<vb:if condition="$page['channelid'] == 1">
seems the channelid 1 is reserved for main page
Reply With Quote
Благодарность от:
Lynne
  #8  
Old 09-12-2014, 07:46 PM
Ivan Beser Ivan Beser is offline
 
Join Date: Feb 2014
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by YankForum View Post
great
but what about main page? (we dont have an id there)

--------------- Added [DATE]1407875899[/DATE] at [TIME]1407875899[/TIME] ---------------

allright
tnx to Lynne and Scanu

i guess this is the code i needed:
Code:
<vb:if condition="$page['channelid'] == 1">
seems the channelid 1 is reserved for main page
and what could I use for register page?
Reply With Quote
  #9  
Old 09-12-2014, 07:52 PM
Scanu's Avatar
Scanu Scanu is offline
 
Join Date: Nov 2010
Posts: 829
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Code:
<vb:if condition="$page['pageid'] == 3">
Shows this only on register page
</vb:if>
Reply With Quote
  #10  
Old 09-19-2014, 06:35 PM
Ivan Beser Ivan Beser is offline
 
Join Date: Feb 2014
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Scanu View Post
Code:
<vb:if condition="$page['pageid'] == 3">
Shows this only on register page
</vb:if>
Hey,

Thank you very much... I ask because your guestwarn was show up at our register page.

A little strange is, that our registerpage have the id 6. I dont know why?
Do you have a idea? We change Navigation but (not that I know) anything at the pages in sitebuilder.
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 06:46 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.11029 seconds
  • Memory Usage 2,265KB
  • Queries Executed 13 (?)
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
  • (6)bbcode_code
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (10)post_thanks_box
  • (3)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (3)post_thanks_postbit
  • (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_postinfo_query
  • fetch_postinfo
  • 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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete