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

Reply
 
Thread Tools Display Modes
  #41  
Old 12-13-2004, 07:07 PM
Oleks Oleks is offline
 
Join Date: Apr 2004
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #42  
Old 12-16-2004, 06:11 AM
traderx's Avatar
traderx traderx is offline
 
Join Date: Jul 2003
Posts: 95
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #43  
Old 12-21-2004, 11:55 AM
Mile-O-Phile Mile-O-Phile is offline
 
Join Date: Nov 2004
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #44  
Old 05-11-2005, 01:17 PM
Oleks Oleks is offline
 
Join Date: Apr 2004
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #45  
Old 07-17-2005, 10:06 AM
Acedeal Acedeal is offline
 
Join Date: Jul 2005
Location: Texas
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #46  
Old 02-09-2006, 03:04 AM
UManiac's Avatar
UManiac UManiac is offline
 
Join Date: May 2002
Location: DC
Posts: 72
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
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 12:31 PM.


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.05453 seconds
  • Memory Usage 2,255KB
  • Queries Executed 13 (?)
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
  • (2)bbcode_code
  • (1)bbcode_html
  • (3)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
  • (2)pagenav_pagelink
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (6)postbit
  • (6)postbit_onlinestatus
  • (6)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_postinfo_query
  • fetch_postinfo
  • 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