Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 02-10-2010, 02:10 AM
Satviewers Satviewers is offline
 
Join Date: Oct 2009
Posts: 58
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default How do I ignore the default css

I have this:

vBulletin php file
PHP Code:
<?php

// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);

// #################### DEFINE IMPORTANT CONSTANTS #######################

define('THIS_SCRIPT''osc_shop');
//define('CSRF_PROTECTION', true);  
// change this depending on your filename

// ################### PRE-CACHE TEMPLATES AND DATA ######################
// get special phrase groups
$phrasegroups = array();

// get special data templates from the datastore
$specialtemplates = array();

// pre-cache templates used by all actions
$globaltemplates = array('oscShop',
);

// pre-cache templates used by specific actions
$actiontemplates = array();

// ######################### REQUIRE BACK-END ############################
// if your page is outside of your normal vb forums directory, you should change directories by uncommenting the next line
// chdir ('/path/to/your/forums');
require_once('./global.php');

// #######################################################################
// ######################## START MAIN SCRIPT ############################
// #######################################################################

$navbits construct_navbits(array('' => 'osc Shopping Cart'));
$navbar render_navbar_template($navbits);

// ###### YOUR CUSTOM CODE GOES HERE #####
$pagetitle 'osc Shopping Cart';



// ###### NOW YOUR TEMPLATE IS BEING RENDERED ######


$templater vB_Template::create('oscShop');
$templater->register_page_templates();
$templater->register('navbar'$navbar);
$templater->register('pagetitle'$pagetitle);
$templater->register('includeshopbody'$includeshopbody);
print_output($templater->render());


?>

Plugin Hook Location: global_start
PHP Code:
if (THIS_SCRIPT == 'osc_shop')
{
ob_start();
include(
'./packages/shop/osc_shop.php');
$includeshopbody ob_get_contents();
ob_end_clean();


Template: oscShop
PHP Code:
{vb:stylevar htmldoctype}
<
html xmlns="http://www.w3.org/1999/xhtml" dir="{vb:stylevar textdirection}" lang="{vb:stylevar languagecode}" id="vbulletin_html">
  <
head>
    <
title>{vb:raw vboptions.bbtitle} - {vb:raw pagetitle}</title>
    {
vb:raw headinclude}
  </
head>

  <
body>  
    {
vb:raw header}
    
    {
vb:raw navbar}

    {
vb:raw includeshopbody}

    {
vb:raw footer}
  </
body

</
html
How do I get it use the default css for the {vb:raw header}, {vb:raw navbar} and {vb:raw footer}.

But I want the {vb:raw includeshopbody} to ignore the default css.
Reply With Quote
  #2  
Old 02-10-2010, 07:14 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You can't. Just don't use any of the default css. You don't need to call any of the classes defined. If some default css is getting used anyway, create your own class to apply that does whatever-it-is your own way.
Reply With Quote
  #3  
Old 02-11-2010, 02:45 AM
Satviewers Satviewers is offline
 
Join Date: Oct 2009
Posts: 58
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for pointing me in the right direction.

I have created a template called oscShop_headinclude, and put what is in the template headinclude into it, just to check that it working before I put my css in it.

In the Template: oscShop I changed {vb:raw headinclude} to {vb:raw oscShop_headinclude}
PHP Code:
{vb:stylevar htmldoctype}
<
html xmlns="http://www.w3.org/1999/xhtml" dir="{vb:stylevar textdirection}" lang="{vb:stylevar languagecode}" id="vbulletin_html">
  <
head>
    <
title>{vb:raw vboptions.bbtitle} - {vb:raw pagetitle}</title>
    {
vb:raw oscShop_headinclude}
  </
head>

  <
body>  
    {
vb:raw header}
    
    {
vb:raw navbar}

    {
vb:raw includeshopbody}

    {
vb:raw footer}
  </
body

</
html
Can you tell me please what else I need to do.
Reply With Quote
  #4  
Old 02-11-2010, 08:30 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well, you'd need to render the template you created. And, if it has most of the same stuff as done in the headinclude, you probably want to do that using a hook right where that template is rendered so that the variables are all available for use.
Reply With Quote
  #5  
Old 02-11-2010, 10:27 PM
Satviewers Satviewers is offline
 
Join Date: Oct 2009
Posts: 58
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have changed my

vBulletin php file to:
PHP Code:
<?php

// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);

// #################### DEFINE IMPORTANT CONSTANTS #######################
$_shopfile basename($_SERVER['SCRIPT_FILENAME'], '.php');
if ((
$pos strrpos($_shopfile'.')) !== false) {$_shopfile substr($_shop0$pos);}

define('THIS_SCRIPT''osc_' $_shopfile);
//define('CSRF_PROTECTION', true);  
// change this depending on your filename

// ################### PRE-CACHE TEMPLATES AND DATA ######################
// get special phrase groups
$phrasegroups = array();

// get special data templates from the datastore
$specialtemplates = array();

// pre-cache templates used by all actions
$globaltemplates = array(
    
'oscShop',
    
'oscShop_headinclude'
);

// pre-cache templates used by specific actions
$actiontemplates = array();

// ######################### REQUIRE BACK-END ############################
// if your page is outside of your normal vb forums directory, you should change directories by uncommenting the next line
// chdir ('/path/to/your/forums');
require_once('./global.php');

// #######################################################################
// ######################## START MAIN SCRIPT ############################
// #######################################################################

$navbits construct_navbits(array('' => 'osc Shopping Cart'));
$navbar render_navbar_template($navbits);

// ###### YOUR CUSTOM CODE GOES HERE #####
$pagetitle 'osc Shopping Cart';



// ###### NOW YOUR TEMPLATE IS BEING RENDERED ######


$templater vB_Template::create('oscShop');
$templater->register_page_templates();
$templater->register('navbar'$navbar);
$templater->register('pagetitle'$pagetitle);
$templater->register('includeshopbody'$includeshopbody);
$templater->register('oscShop_headinclude'$oscShop_headinclude);
print_output($templater->render());


?>

I changed in it, the $globaltemplates and $templater->

Is that correct.

Not sure what else to do.
Hope someone can help, please.
Reply With Quote
  #6  
Old 02-11-2010, 11:18 PM
BSMedia BSMedia is offline
 
Join Date: Feb 2009
Posts: 454
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

NVM: It was already suggested
Reply With Quote
  #7  
Old 02-11-2010, 11:50 PM
Satviewers Satviewers is offline
 
Join Date: Oct 2009
Posts: 58
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by BSMedia View Post
NVM: It was already suggested
Yes, but I still need some help with it.

Can't get any further.
Reply With Quote
  #8  
Old 02-12-2010, 01:52 PM
BSMedia BSMedia is offline
 
Join Date: Feb 2009
Posts: 454
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just create a custom css file for the page like page.css

Include this page.css AFTER all the standard vBulletin CSS has been called.

Redefine any definitions in page.css you want to redo.

Alternativly since you just want header, navbar and footer. You could copy and paste the code from vbulletin-chrome.css that pertains to those sections into page.css and not call any additional css files.
Reply With Quote
  #9  
Old 02-12-2010, 02:38 PM
Satviewers Satviewers is offline
 
Join Date: Oct 2009
Posts: 58
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have created a Template called oscShop_headinclude.
It is a copy of headinclude with reset-fonts.css, removed. As that css was causing the problem on my integrated page.

PHP Code:
<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 vboptions.bburl}/" /><!--[if IE]></base><![endif]-->
<
meta name="generator" content="vBulletin {vb:raw vboptions.templateversion}" />

<
vb:if condition="$show['threadinfo']">

<
vb:elseif condition="$show['foruminfo']" />
        <
meta name="keywords" content="{vb:raw foruminfo.title_clean}, {vb:raw vboptions.keywords}" />
        <
meta name="description" content="<vb:if condition="$pagenumber 1">{vb:rawphrase page_x, {vb:raw pagenumber}}-</vb:if>{vb:raw foruminfo.description_clean}" />
<
vb:else />
        <
meta name="keywords" content="{vb:raw vboptions.keywords}" />
        <
meta name="description" content="{vb:raw vboptions.description}" />
</
vb:if>

<
script type="text/javascript" src="{vb:stylevar yuipath}/yuiloader-dom-event/yuiloader-dom-event.js?v={vb:raw vboptions.simpleversion}"></script>
<
script type="text/javascript" src="{vb:stylevar yuipath}/connection/connection-min.js?v={vb:raw vboptions.simpleversion}"></script>
<
script type="text/javascript">
<!--
    var 
SESSIONURL "{vb:raw session.sessionurl_js}";
    var 
SECURITYTOKEN "{vb:raw bbuserinfo.securitytoken}";
    var 
IMGDIR_MISC "{vb:stylevar imgdir_misc}";
    var 
IMGDIR_BUTTON "{vb:stylevar imgdir_button}";
    var 
vb_disable_ajax parseInt("{vb:raw vboptions.disable_ajax}"10);
    var 
SIMPLEVERSION "{vb:raw vboptions.simpleversion}";
    var 
BBURL "{vb:raw vboptions.bburl}";
// -->
</script>
<
script type="text/javascript" src="{vb:raw vboptions.bburl}/clientscript/vbulletin-core.js?v={vb:raw vboptions.simpleversion}"></script>
{
vb:raw template_hook.headinclude_javascript}

<
vb:if condition="$vboptions['externalrss']">
    <
link rel="alternate" type="application/rss+xml" title="{vb:raw vboptions.bbtitle} {vb:rawphrase rss_feed}" href="{vb:raw vboptions.bburl}/external.php?type=RSS2" />
    <
vb:if condition="$show['foruminfo'] OR $show['threadinfo']">
        <
link rel="alternate" type="application/rss+xml" title="{vb:raw vboptions.bbtitle} - {vb:raw foruminfo.title_clean} - {vb:rawphrase rss_feed}" href="{vb:raw vboptions.bburl}/external.php?type=RSS2&amp;forumids={vb:raw foruminfo.forumid}" />
    </
vb:if>
</
vb:if>

<
vb:if condition="$vboptions['storecssasfile']">
    <
link rel="stylesheet" type="text/css" href="{vb:var vbcsspath}main-rollup.css" />
<
vb:else />
    <
link rel="stylesheet" type="text/css" href="{vb:var vbcsspath}bbcode.css,editor.css,popupmenu.css,vbulletin.css,vbulletin-chrome.css,vbulletin-formcontrols.css{vb:raw custom_global_css_reference}" />
</
vb:if>
{
vb:raw template_hook.headinclude_css

How do I get the {vb:raw oscShop_headinclude} to work, that is in the Template: oscShop
PHP Code:
{vb:stylevar htmldoctype}
<
html xmlns="http://www.w3.org/1999/xhtml" dir="{vb:stylevar textdirection}" lang="{vb:stylevar languagecode}" id="vbulletin_html">
  <
head>
    <
title>{vb:raw vboptions.bbtitle} - {vb:raw pagetitle}</title>
    {
vb:raw oscShop_headinclude}
  </
head>

  <
body>  
    {
vb:raw header}
    
    {
vb:raw navbar}

    {
vb:raw includeshopbody}

    {
vb:raw footer}
  </
body

</
html


Not sure if it is rendered correctly in the vBulletin php file.
PHP Code:
<?php

// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);

// #################### DEFINE IMPORTANT CONSTANTS #######################
$_shopfile basename($_SERVER['SCRIPT_FILENAME'], '.php');
if ((
$pos strrpos($_shopfile'.')) !== false) {$_shopfile substr($_shop0$pos);}

define('THIS_SCRIPT''osc_' $_shopfile);
//define('CSRF_PROTECTION', true);  
// change this depending on your filename

// ################### PRE-CACHE TEMPLATES AND DATA ######################
// get special phrase groups
$phrasegroups = array();

// get special data templates from the datastore
$specialtemplates = array();

// pre-cache templates used by all actions
$globaltemplates = array(
    
'oscShop',
    
'oscShop_headinclude'
);

// pre-cache templates used by specific actions
$actiontemplates = array();

// ######################### REQUIRE BACK-END ############################
// if your page is outside of your normal vb forums directory, you should change directories by uncommenting the next line
// chdir ('/path/to/your/forums');
require_once('./global.php');

// #######################################################################
// ######################## START MAIN SCRIPT ############################
// #######################################################################

$navbits construct_navbits(array('' => 'osc Shopping Cart'));
$navbar render_navbar_template($navbits);

// ###### YOUR CUSTOM CODE GOES HERE #####
$pagetitle 'osc Shopping Cart';



// ###### NOW YOUR TEMPLATE IS BEING RENDERED ######


$templater vB_Template::create('oscShop');
$templater->register_page_templates();
$templater->register('navbar'$navbar);
$templater->register('pagetitle'$pagetitle);
$templater->register('includeshopbody'$includeshopbody);
$templater->register('oscShop_headinclude'$oscShop_headinclude);
print_output($templater->render());


?>

Is there a plugin that needs to be created to.
If so, what should be in it.

Thanks.
Reply With Quote
  #10  
Old 02-13-2010, 05:20 PM
Satviewers Satviewers is offline
 
Join Date: Oct 2009
Posts: 58
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Really need someone to help with this please.
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 02:00 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.04477 seconds
  • Memory Usage 2,346KB
  • Queries Executed 11 (?)
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
  • (8)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (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_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
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete