vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB5 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=262)
-   -   VBulletin5 THIS_SCRIPT alternative solution? (https://vborg.vbsupport.ru/showthread.php?t=313645)

YankForum 08-12-2014 05:00 PM

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?

Dead Eddie 08-12-2014 05:01 PM

Where?

If it's in the main content area, you can put an HTML block on the main page through page builder.

YankForum 08-12-2014 05:07 PM

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?

Lynne 08-12-2014 05:10 PM

Did you try using the $nodeid ?

YankForum 08-12-2014 05:33 PM

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}


Scanu 08-12-2014 06:51 PM

It should be $page['pageid']

YankForum 08-12-2014 07:10 PM

Quote:

Originally Posted by Scanu (Post 2510989)
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

Ivan Beser 09-12-2014 07:46 PM

Quote:

Originally Posted by YankForum (Post 2510993)
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?

Scanu 09-12-2014 07:52 PM

Code:

<vb:if condition="$page['pageid'] == 3">
Shows this only on register page
</vb:if>


Ivan Beser 09-19-2014 06:35 PM

Quote:

Originally Posted by Scanu (Post 2514900)
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.


All times are GMT. The time now is 07:00 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.01187 seconds
  • Memory Usage 1,731KB
  • 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
  • (6)bbcode_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete