Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 09-01-2009, 10:56 PM
Sergio68's Avatar
Sergio68 Sergio68 is offline
 
Join Date: Nov 2001
Location: Italy
Posts: 100
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Custom Pages

I'm trying to integrate my E-Commerce engine into vbulletin using customized pages, but I'm doing something wrong with the code.

I can make pages works but for some reason the vbulletin quick men? isn't working

Usually I use my engine e-commerce software by loading an header and a footer to wrap the engine itself, something like here : http://www.musclenutrition.com/carrello.php

Include header
php e-commerce code
include footer

With the vbulletin I did it like that :

Header :
PHP Code:
<?php

error_reporting
(E_ALL & ~E_NOTICE); 
define('NO_REGISTER_GLOBALS'1); 
define('GET_EDIT_TEMPLATES'true); 
define('THIS_SCRIPT''adv_index'); 
// ============================================
// Enter the full path to your forum here
// Example: /home/vbadvanced/public_html/forum
// ============================================

$forumpath '/home/webdir/www/www.bodyweb.com/forums';

// ============================================
// No Further Editing Necessary!
// ============================================

if (!is_dir($forumpath))
{
    echo 
'Invalid forum path specified! Please edit this file and be sure to include the correct path for your $forumpath variable.';
    exit;
}

chdir($forumpath);
$phrasegroups = array();
$globaltemplates = array();
$actiontemplates = array();
$specialtemplates = array();

require_once(
'./includes/vba_cmps_include_template.php');
require_once(
'./global.php');
// $vbulletin->options['homeurl'];
if(!isset($_POST)) {
  
extract($HTTP_POST_VARS);
  
extract($HTTP_GET_VARS);
  
extract($HTTP_COOKIE_VARS);
  
extract($HTTP_ENV_VARS);
  
extract($HTTP_SERVER_VARS);
} else {
  
extract($_POST);
  
extract($_GET);
  
extract($_COOKIE);
  
extract($_ENV);
  
extract($_SERVER);
}      
//$_GET["titolopagina"];
        
$navbits = array(); 
        
$navbits[''] = "$titolopagina"
        
$navbits construct_navbits($navbits); 
         eval(
'$navbar = "' fetch_template('navbar2') . '";'); 
      echo
"$stylevar[htmldoctype]
<html dir='
$stylevar[textdirection]' lang='$stylevar[languagecode]'>
<head>
<title>
$vboptions[bbtitle] -  $titolopagina - </title>
$headinclude
<script type='text/javascript' src='forums/clientscript/vbulletin_global.js'></script>
<script type='text/javascript' src='forums/clientscript/vbulletin_menu.js '></script>
</head>
$header
$navbar
<table width='100%' border='0' cellspacing='1' cellpadding='8'>
  <tr>
    <td align='center'><a href='http://www.bodyweb.com'><strong>SuperStore</strong></a></td>
    <td align='center'><a href='http://www.bodyweb.com/prodotti.php'><strong>Prodotti</strong></a></td>
    <td align='center'><a href='http://www.bodyweb.com/prodotti.php'><strong>Marche</strong></a></td>
    <td align='center'></td>
    <td align='center'><a href='http://www'><strong>Spedizioni</strong></a> - <a href='http://www'><strong>Pagamenti</strong></a> - <a href='http://www.bodyweb.com/tracking.php'><strong>Tracking</strong></a></td>
    <td align='center'><a href='http://www.bodyweb.com/carrello.php'><strong>Carrello</strong></a><a href='http://www.bodyweb.com/carrello.php'> <img src='http://www.bodyweb.com/forums/images/bodyweb/buttons/chart_bw.png' border='0' align='middle' ></a></td>
  </tr>
</table>


<br />
<table class='tborder' cellpadding='6' cellspacing='1' border='0' width='100%' align='center'>
<tr>
<td colspan='2' class='tcat'><div align='center'>
$titolopagina</div></td>
</tr>
<tr valign=top height='5' >
<td width='50%' height='5' align='center' valign='top' class='alt1'>
  <div align='center'>"
;
      
?>
Php e-commerce code

Footer :
PHP Code:
   <?php
 
     
echo" <br /><br />
  </div></td>
</tr>
</table>
$footer
</body>
</html>"
;
      
      
?>
That's the result : http://www.bodyweb.com/carrello.php
Everything is working but not the quick VB menu.

If I built a page like that it's working but I can't include any PHP :
PHP Code:
<?php
// ++=========================================================================++
// || vBadvanced CMPS v3.0.1 (vB 3.6 - vB 3.7) - 173
// || ? 2003-2008 vBadvanced.com - All Rights Reserved
// || This file may not be redistributed in whole or significant part.
// || http://vbadvanced.com
// || Downloaded 10:56, Wed Sep 17th 2008
// || 125950173_405237028456
// ++ ========================================================================++

error_reporting(E_ALL & ~E_NOTICE);
define('THIS_SCRIPT''adv_index');
define('VBA_PORTAL'true);
define('VBA_SCRIPT''CMPS');

// ============================================
// Enter the full path to your forum here
// Example: /home/vbadvanced/public_html/forum
// ============================================

$forumpath '/home/webdir/www/www.bodyweb.com/forums';

// ============================================
// No Further Editing Necessary!
// ============================================

if ($forumpath)
{
    if (!
is_dir($forumpath))
    {
        echo 
'Invalid forum path specified! Please edit this file and be sure to include the correct path for your $forumpath variable.';
        exit;
    }

    
chdir($forumpath);
}

$phrasegroups = array();
$globaltemplates = array();
$actiontemplates = array();
$specialtemplates = array();

require_once(
'./includes/vba_cmps_include_template.php');
require_once(
'./global.php');
   eval(
'$navbar = "' fetch_template('navbar2') . '";'); 
 
// print_portal_output($prodotti);
eval('print_output("' fetch_template('carrello') . '");');
?>
Then in a template called template i insert this code and some example text
PHP Code:
$stylevar[htmldoctype]
<
html dir="$stylevar[textdirection]lang="$stylevar[languagecode]xmlns="http://www.w3.org/1999/xhtml">
<
head>
<if 
condition="$pages['name'] == 'home'">
    <
meta http-equiv="Cache-Control" content="no-cache" />
    <
meta http-equiv="Pragma" content="no-cache" />
    <
meta http-equiv="Expires" content="0" />
</if>

<
title>$vboptions[hometitle] <if condition="$pagetitle">- $pagetitle</if></title>

$headinclude

</head>
<
body>

$header

$navbar


<br /><br /><br /><br />
<
div align="center" >Example Text</div>
<
br /><br /><br /><br />    

$footer

</body>
</
html
What am I doing wrong?

--------------- Added [DATE]1251927233[/DATE] at [TIME]1251927233[/TIME] ---------------

Any idea?
I'll pay to fix this.

https://vborg.vbsupport.ru/showthread.php?t=222250
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 04:29 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03195 seconds
  • Memory Usage 2,268KB
  • 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
  • (4)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)showthread_list
  • (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_threadedmode.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_threaded
  • showthread_threaded_construct_link
  • 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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete