vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   template driven pages (https://vborg.vbsupport.ru/showthread.php?t=63792)

Oleks 12-13-2004 07:07 PM

Hi,
This code works fine on Linux server.
I am trying to use the same code on Windows server and I have an error.

Warning: array_merge() [function.array-merge]: Argument #2 is not an array in C:\Domains\myDomain.net\wwwroot\includes\init.php on line 506

Warning: implode() [function.implode]: Bad arguments. in C:\Domains\myDomain.net\wwwroot\includes\init.php on line 511

Unable to add cookies, header already sent.
File: C:\Domains\myDomain.net\wwwroot\includes\init.php
Line: 506

Do you have an idea why it is different for Windows server and how to solve this problem?

Thank you.

traderx 12-16-2004 06:11 AM

I am not sure if this would work with what I am trying to do.

I found a glossary script from http://glossword.info and I want it to look like the rest of my forum/site at www.4xtraders.com/forum. I plan on using the script at http://www.4xtraders.com/forum/glossary/. If you are to look at my main page and my glossary page, I am not able to have the header and footer (also the left and right columns). I would like to know how and what I need to do to be able to have my glossary script inserted into my header and footer.

This glossary script also uses a header, footer and a index (actually called indexpage.html... all from it's template folder) to display the terms.

Any help would be great as this is the best glossary that I have found unless any one else is using or has seen one better that can be intergrated to use vb's template layout

Thanks to all that reply

Mile-O-Phile 12-21-2004 11:55 AM

Quote:

Originally Posted by KirbyDE
If you just want the username you don't need to load the whole vB backend.
Just check the cookies (bbuserid, bbpassword) and query table user

Yes, but I have no idea how to do that from the code I posted above. All I'd like is a function that I can call or something that will give me the username.

Oleks 05-11-2005 01:17 PM

Hi,
This script works fine on Linux server, but I have a problem with this script on Windows server. Dose somebody knows what is the difference?

Script works on Linux server without
//chdir('/patsh');

What patsh I should setup for chdir for Windows server?

chdir('c:/domain.com/wwwroot');
chdir('c:/domain.com');
chdir('domain.com');

I will appreciate your help.

Acedeal 07-17-2005 10:06 AM

Does anyone have an example of;
calling a template inside another templete

Php code
PHP Code:

<?php
include('includes/common.php');
$page_title 'home';
include(
'featured.php');
include(
'stats.php');

// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);
define('NO_REGISTER_GLOBALS'1);

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


define('THIS_SCRIPT''index');

$globaltemplates = array(
         
'PLAYER_INDEX_BODY',
'PLAYER_FAQ_BODY',
'PLAYER_FEATURED_BODY',
'PLAYER_LIST_BODY',
'PLAYER_LIST_EDIT_BODY',
'PLAYER_PLAY_BODY',
'PLAYER_FETCH'
'PLAYER_STATS',
'PLAYER_VIEW_ART_BODY',
'PLAYER_VIEW_ART_EDIT'
'PLAYER_VIEW_BODY'
'PLAYER_VEIW_EDIT'
'forumhome_moderator'
);

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

//NO CLUE WHAT"S THIS FOR
// what are actiontemplates ?

chdir('../../vb');
require_once(
'global.php');

// ## this calls to print out one main template ##
$pagetitle "$vboptions[bbtitle]PLAYER INDEX";
$navbits[""] = $pagetitle;
$navbits construct_navbits($navbits);
eval(
'$navbar = "' fetch_template('navbar') . '";');
eval(
'$VBPLAYER_STATS = "' fetch_template('PLAYER_STATS') . '";');

eval(
'print_output("' fetch_template('PLAYER_INDEX_BODY') . '");');
?>

That setups up the PHP (which works)

I have a template that does--and displays what I want it to
Code:

$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<html>
<head>
<meta name="description" content="$foruminfo[description]" />
<title>$vboptions[bbtitle] - VB xxxx Index</title>
$headinclude
</head>
<body>
<!-- logo -->
<!--
<a name="top"></a>
-->
$_phpinclude_output
$header
$navbar
<br>
<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
        <tr>
<td align="left"><span class="nav"><a class="nav" href="[bburl]">Forum Index</a>
 -> <a href="{other_INDEX}" class="nav">somewhere Index</a></span></td>
        </tr>
</table>
<table width="100%" cellspacing="1" cellpadding="3" border="0">
  <tr>
        <td valign="top">
          <table class="forumline" width="100%" cellspacing="1" cellpadding="3" border="0">
                <tr>
                  <th class="thead">Welcome to <i>xxxx</i></th>
                </tr>
                <tr>
                  <td class="alt1" width="500"><span class="gen">SOME TEXT HERE.<br />You can learn <a href="{X_FAQ}">more about xxxx</a> in the 'help' section.<br />
<br />What are you waiting for? <a href=".....">Start</a>!</span></td>
                </tr>
          </table>
          <br />

          {XXX_FEATURES}

        </td>
        <td valign="top">
{XXXX_STATS}
        </td>
  </tr>
</table>
$footer

where XXX_FEATURES is in the above template , is where I need to display some sql that is called in antother template same with the place holder called xxx_Stats
what would be the syntax for adding (or pulling the data) from the other template?

the xxx_features template has
Code:

<table class="forumline" width="100%" cellspacing="1" cellpadding="3" border="0">
  <tr>
        <th class="thTop">Features</th>
  </tr>

  <tr>
        <td class="catLeft"><span class="cattitle">Featured</span></td>
  </tr>
  <tr>
        <td class="row1"><span class="genmed">
          <!-- BEGIN feat -->
        * <a class="genmed" href="{feat_xxx.U_VIEWxxxST}">{feat_xxx.XXXX_NAME}</a>
        - <a class="genmed" href="{feat_xxxx.U_VIEWYYY}">{feat_xxx.YYYY_TITLE}</a>&nbsp;&nbsp;
          {feat_xxx.YYYY_DESC}<br/>
          <!-- END feat_s -->
        </span>
        </td>
  </tr>

 

 <tr>
        <th class="thTop">List Features</th>
  </tr>

<tr>
        <td class="catLeft"><span class="cattitle">Featured lists</span></td>
  </tr>
  <tr>
          <td class="row1"><span class="genmed">
          <!-- BEGIN feat_pl -->
          * <a class="genmed" href="{feat_pl.U_VIEWPL}">{feat_pl.PL_TITLE}</a>&nbsp;&nbsp;
          {feat_pl.PL_DESC}<br/>
          <!-- END feat_pl -->
        </span>
        </td>
  </tr>

<tr>
        <td class="catLeft"><span class="cattitle">in play</span></td>
</tr>
 <tr>
        <td class="row1"><span class="genmed">
        <!-- BEGIN upl_YYYs -->
        * <a class="genmed" href="{upl_YYYY.U_VIEWART}">{upl_YYYY.ARTIST_NAME}</a>
        - <span class="genmed" href="{upl_YYYY.U_VIEWYYYY}">{upl_YYYY.YYYY_TITLE}</a><br/>
        <!-- END upl_songs -->
        </span></td>
  </tr>

</table>

which has all the display info for the sql querries.
Trying to port a bunch of old stuff from my phpbb forums
At a lose on how vb pulls data from template to template

Hope you guys can help
Thanks in advance!!
TB

UManiac 02-09-2006 03:04 AM

I'm having some problems as well - can;t get a couple of phrases to show...

This is my php file (ruelsPop.php)

PHP Code:

<?php

// GO TO FORUM DIR
chdir('/home/journal/public_html/forums');

// STANDARD VBULLETIN STUFF
define('NO_REGISTER_GLOBALS'1);
define('THIS_SCRIPT''rulesPop');

$phrasegroups = array( 

); 

require_once(
'./global.php');

// GENERIC_SHELL VARS
$pagetitle "Title of Page";
$HTML ""// PIECED TOGETHER IN SCRIPT

eval('$HTML = "' fetch_template('Forum_Rules') . '";');

eval(
'print_output("' fetch_template('GENERIC_SHELL') . '");');

?>

This is my Forum_Rules template:

HTML Code:

<table class="tborder" cellpadding="6" cellspacing="1" border="0" width="100%" align="center">
        <tr>
                <td class="tcat">$vbphrase[forum_rules]</td>
        </tr>

        <tr>
                <td class="panelsurround" align="center">
                <div class="panel">
                        <div align="left">
                        $vbphrase[forum_rules_description]
                        </div>
                </div>
                </td>
        </tr>
</table>

And this is my generic shell:

PHP Code:

$stylevar[htmldoctype]
<
html dir="$stylevar[textdirection]lang="$stylevar[languagecode]">
<
head>
$headinclude
<title>$vboptions[bbtitle] - $vbphrase[registration]</title>
</
head>
<
body class="article">

$HTML

</body>
</
html

Notice I have no navbar, header, footer - just a very simple page. But I can;t get the phrases to display...

Any ideas?


All times are GMT. The time now is 04:17 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.01175 seconds
  • Memory Usage 1,779KB
  • 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
  • (1)bbcode_html_printable
  • (3)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
  • (6)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