vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Portal Software - WebTemplates 4.x: VB Integrated CMS (Content Management System) (https://vborg.vbsupport.ru/showthread.php?t=250202)

brycea 08-17-2012 05:27 PM

<a href="http://www.healthcommunity.co/" target="_blank">HealthCommunity.co</a>

I have a number of MODS on our website, which represent a very small amount of the total MODS that I have downloaded. Through trial and error, I have found for the most part, that some MODS just don't work, a few will ruin your website, and to further, in most cases, if in fact the MOD does come with instructions, they are vaguely written.
Being that 4.2 does not come with templates for a privacy policy and terms of use, I thought that I would give this MOD a try. Yes, it does work favorably with my custom skin, and the instructions are immaculate. For one that wants to create additional pages on their website, this MOD is an essential.

ryancooper 09-04-2012 11:27 PM

I am looking to hide ads on my pages... I used
Code:

<vb:if condition="THIS_SCRIPT == view AND $pg == 'hours'">

Dont Show Ad

<vb:else />

Show Ad

</vb:if>

but the code shows everywhere. I am wondering if it is because I am using SEO friendly links os my links look like

.../forums/hours.htm

in stead of

.../forums/view.php?pg=hours

Is this why? Is there a way around this?

Thank

Logician 09-05-2012 07:13 AM

Quote:

Originally Posted by ryancooper (Post 2362726)
I am looking to hide ads on my pages... I used
Code:

<vb:if condition="THIS_SCRIPT == view AND $pg == 'hours'">

Dont Show Ad

<vb:else />

Show Ad

</vb:if>

but the code shows everywhere. I am wondering if it is because I am using SEO friendly links os my links look like

.../forums/hours.htm

in stead of

.../forums/view.php?pg=hours

Is this why? Is there a way around this?

Thank

You are probably putting this code inside header/footer templates but these templates are produced before webtemplates loads. So they are already parsed (and
$pg == 'hours' conditional is always wrong) when your hours page starts. (Hence ads display).

Reparsing them inside phpinclude section of webtemplate might help:
PHP Code:

        $templater->register('footer'$footer);
        
$templater->register('header'$header); 


ryancooper 09-05-2012 11:43 AM

Quote:

Originally Posted by Logician (Post 2362806)
You are probably putting this code inside header/footer templates but these templates are produced before webtemplates loads. So they are already parsed (and
$pg == 'hours' conditional is always wrong) when your hours page starts. (Hence ads display).

Reparsing them inside phpinclude section of webtemplate might help:
PHP Code:

        $templater->register('footer'$footer);
        
$templater->register('header'$header); 




Thank you for your quick response. Can You explain in a little more detail on how to

Quote:

Reparsing them inside phpinclude section of webtemplate might help
Thanks. Send donation to for this amazing mod.

Logician 09-05-2012 01:29 PM

Quote:

Originally Posted by ryancooper (Post 2362853)
Thank you for your quick response. Can You explain in a little more detail on how to

Edit your webtemplate named hours. In the edit page, you'll see a section named "PHP Include". Put this code inside it and save:
PHP Code:

        $templater->register('footer'$footer); 
        
$templater->register('header'$header); 

Let me know if it does not help (and admin access can be handy in that case so that I can look.) :)

ryancooper 09-06-2012 09:30 PM

No go on that. Tried putting the code in header. I will PM you so we can keep this thread on topic. Thanks! Ryan

Logician 09-07-2012 09:02 AM

Quote:

Originally Posted by ryancooper (Post 2363214)
No go on that. Tried putting the code in header. I will PM you so we can keep this thread on topic. Thanks! Ryan

ok now, please check your page.

What I did is:
change navbar template:
Code:

{vb:raw ad_location.ad_navbar_below}
{vb:raw ad_location.global_below_navbar}

as

Code:

<vb:if condition="$pg != 'hours'">
{vb:raw ad_location.ad_navbar_below}
{vb:raw ad_location.global_below_navbar}
</vb:if>

And in hours webtemplate use this phpinclude:
Code:

$templater = vB_Template::create('navbar');

    // Resolve the root segment
    $templater->register('bbmenu', $vbulletin->options['bbmenu']);

    $templater->register('ad_location', $GLOBALS['ad_location']);
    $templater->register('foruminfo', $GLOBALS['foruminfo']);
    $templater->register('navbar_reloadurl', $GLOBALS['navbar_reloadurl']);
    $templater->register('navbits', $navbits);
    $templater->register('notices', $GLOBALS['notices']);
    $templater->register('notifications_menubits', $GLOBALS['notifications_menubits']);
    $templater->register('notifications_total', $GLOBALS['notifications_total']);
    $templater->register('pmbox', $GLOBALS['pmbox']);
    $templater->register('return_link', $GLOBALS['return_link']);
    $templater->register('template_hook', $GLOBALS['template_hook']);
    $templater->register('pg', $pg);
$navbar = $templater->render();


ryancooper 09-07-2012 12:04 PM

You are amazing! Thank you so much! Although you totally lost me :)

ryancooper 09-10-2012 11:10 PM

Does anyone know how to include the latest posts (only found in the post title) of the page your are on?

Example I am browsing a page called Space mountain - I would like to have on that page the last 5 posts that have Space mountain in the title of the post?

I know I can make a web query for just Space Mountain and inclue it but then I would have to have a query for every search term. Is there a way to have it show the $WT_PageName% in the Query?

I did try
Code:

SELECT threadid, title, postusername,postuserid,dateline
FROM " . TABLE_PREFIX . "thread
WHERE taglist LIKE '$WT_PageName%'
ORDER BY dateline DESC
LIMIT 5

and that did not work ;) Thanks!

mathforum 09-11-2012 01:03 AM

Another question about setting "THIS_SCRIPT". I have one tab that is a drop down menu and contains all of my custom template using this mod however when any of those pages are viewed the "Forums" tab is highlighted. I've found out that if I add the appropriate "THIS_SCRIPT" into the navigation manager then I can force a different tab to be highlighted.

How can I make all of the custom webtemplates highlight a certain tab? Do I need to add in define('THIS_SCRIPT', 'scriptname'); somewhere?

EDIT: Actually this is going to be harder than I thought :( I have two pages associated with this mod so can't assign all custom pages to one tab. Really would appreciate any insight still!


All times are GMT. The time now is 11:56 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.02315 seconds
  • Memory Usage 1,760KB
  • 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_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (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