vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Popup on cms homepage only (https://vborg.vbsupport.ru/showthread.php?t=264798)

davidallsop 06-06-2011 02:50 PM

Popup on cms homepage only
 
Hi,

I wish to add a popup to only the cms index page and the forum home page.

Tried this by adding the code to forum home but obviously its included in most places so the popup then displays throughout.

Regards,

kh99 06-06-2011 02:57 PM

Try this:

HTML Code:

<vb:if condition="THIS_SCRIPT == 'vbcms' OR THIS_SCRIPT == 'index'">
// popup code
</vb:if>


Brandon Sheley 06-06-2011 02:57 PM

Have you tried using a condition or the CMS templates?

davidallsop 06-06-2011 03:10 PM

That code doesn't work, that was upon adding to headinclude, it displays the popup on every forum page and doesn't display on the CMS.

Lynne 06-06-2011 03:20 PM

Please post the *exact* code you have added along with a couple lines above and below the code so we can see what you did. We cannot help when we can't see your code and a link to the page/site.

davidallsop 06-06-2011 03:25 PM

Ok, which template should this : -

Code:

<vb:if condition="THIS_SCRIPT == 'vbcms' OR THIS_SCRIPT == 'index'">
// popup code
</vb:if>

Be added to?

kh99 06-06-2011 03:29 PM

When I posted it it was a guess. Since then I tried it and it seems to work for the forums (I don't see why you'd get it on every forum - I only got it on the forum home page), but you might need another check in there to see it only on the CMS index page, which I don't know how to do offhand.

BTW I put it in headinclude after I read that's where you had it. I just used this:

HTML Code:

<vb:if condition="THIS_SCRIPT == 'vbcms' OR THIS_SCRIPT == 'index'">
<script type="text/javascript">alert("Here");</script>
</vb:if>


Lynne 06-06-2011 03:29 PM

You said you added it to the headinclude template. So, please post what you did and give us a link to see it.

davidallsop 06-06-2011 03:52 PM

This has been placed above meta on headinclude, and yes it works just on the forum index, but not the cms home.

Code:

<vb:if condition="THIS_SCRIPT == 'vbcms' OR THIS_SCRIPT == 'index'">
<script type="text/javascript">alert("Here");</script>
</vb:if>

<meta http-equiv="Content-Type" content="text/html; charset={vb:stylevar charset}" />
<meta id="e_vb_meta_bburl" name="vb_meta_bburl" content="{vb:raw vboptions.bburl}" />
<base href="{vb:raw basepath}" /><!--[if IE]></base><![endif]-->

Unfortunately I can't post a link as I am running locally.

Lynne 06-06-2011 04:06 PM

Is your CMS using a different style? If so, you need to make sure to add the code to the style being used on the CMS also.


All times are GMT. The time now is 03:32 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.01108 seconds
  • Memory Usage 1,726KB
  • 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
  • (2)bbcode_code_printable
  • (2)bbcode_html_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
  • (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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete