vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Additional Options (https://vborg.vbsupport.ru/showthread.php?t=269733)

HMBeaty 09-11-2011 03:26 AM

Quote:

Originally Posted by ykkrox (Post 2244488)
Man I'm on the home stretch!

I'm stuck on doing the final display of a plugin.
Now I'm trying to have it show up on several sections and not others.

I found this VB snippet on another post
https://vborg.vbsupport.ru/showthrea...+certain+pages
Code:

<vb:if condition="in_array(THIS_SCRIPT, array('index', 'vbcms', 'blog'))">
stuff here
</vb:if>

What is in the "THIS_SCRIPT" to detect what page you are on?
Is there another array value that I can access to find out what page I'm on?

Thanks!

Open up the php file ;) For example, open blog.php in a text editor and see where it says:
PHP Code:

if (!defined('THIS_SCRIPT')) { define('THIS_SCRIPT''blog'); } 

The main part you want to look for in that is:
PHP Code:

define('THIS_SCRIPT''blog'); 

And you would enter blog as part of that array :)

ykkrox 09-17-2011 10:50 AM

sweet! thanks peeps!

One last thing I was trying to achieve is to keep the legacy posts with an available thumbnail attachment option available.
But for the new posts, I don't need to view the thumbnail attachments.
I tried this bit of code and it didn't hide the thumbnails in the template postbit.

HTML Code:

<vb:if condition="$show['thumbnailattachment'] && $postinfo['dateline'] < *epoch time* ">
Am I updating the wrong template??



ALSO - I wanted to know if there is any way for an Admin to post Javascript in a post. Is this possible?
I'm trying to use it with BB Code, but Javascript:functionName() is always replaced with javascript<b></b>:functionName()


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

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.02011 seconds
  • Memory Usage 1,724KB
  • 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)bbcode_html_printable
  • (2)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete