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

Reply
 
Thread Tools Display Modes
  #31  
Old 09-21-2004, 05:21 PM
Allen Mead Allen Mead is offline
 
Join Date: Jul 2004
Location: London
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I take it no-one knows then?
Reply With Quote
  #32  
Old 10-04-2004, 06:58 PM
Allen Mead Allen Mead is offline
 
Join Date: Jul 2004
Location: London
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

--------------------------------------------------------------------------------

Right, that's it, i still can't get it to work!!! I'll pay for someone to do this for me as long as it's not stupid money. If anyone is interested???
Reply With Quote
  #33  
Old 10-13-2004, 07:39 PM
Allen Mead Allen Mead is offline
 
Join Date: Jul 2004
Location: London
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorted!! Thanks to a guy called David Robinson from Freelancers.net

Well chuffed. You can see a test page here if you're interested http://www.astra-mk2.com/untitled.php
Reply With Quote
  #34  
Old 10-13-2004, 09:50 PM
blue_chi blue_chi is offline
 
Join Date: Feb 2004
Location: Oman
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Allen,

I am having the same exact problem with my file. Could you please guide me on how to insert my HTML page into it?
Reply With Quote
  #35  
Old 10-14-2004, 01:41 AM
Allen Mead Allen Mead is offline
 
Join Date: Jul 2004
Location: London
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yep no problem blue chi.

This is what has been done with mine:

create your html pages as normal. Then create a template with vbulletin here:

admincp/styles & Templates/Style Manager/Add New Template

call it what you want, mine is html_poloshirts. Copy all the html code into this template.

eg:

PHP Code:
<!-- saved from url=(0022)http://internet.e-mail -->
<!-- saved from url=(0022)http://internet.e-mail -->
<br><table border="0">
  <
tr>
    <
td colspan="3"><font face="Arial, Helvetica, sans-serif"><b><i><img src="Merchandise/Poloshirts/dealer_stripes.gif" width="32" height="18"><font size="5">Astra-mk2.com</font></i><font size="5">
      
Merchandise</font></b></font></td>
  </
tr>
  <
tr>
    <
td colspan="3" height="24">&nbsp;</td>
  </
tr>
  <
tr>
    <
td colspan="3" height="66">
      <
p align="left"><font face="Arial, Helvetica, sans-serif" size="3">We would
        like you to bare in mind that we are not out to make large profits on
        the goods that are forsale
. As <i>Astra-mk2.com</iis <b>not</ba company
        
and is run in Steve's and Allen's spare timeall profits get put back
        into the website to keep it running
.</font></p>
    </
td>
  </
tr>
  <
tr>
    <
td colspan="3" height="35" valign="bottom">
      <
div align="left"><font face="Arial, Helvetica, sans-serif" size="3">The
        following items are available from Astra
-mk2.com.</font></div>
    </
td>
  </
tr>
  <
tr>
    <
td colspan="3">&nbsp;</td>
  </
tr>
  <
tr>
    <
td width="54%" height="81" valign="top">
      <
div align="left"><font face="Arial, Helvetica, sans-serif" size="3">Polo
        Shirts 
Black with the website logo embroidered on the front left breast
        
(your name underneath is optional). Main website sponsor embrodered on
        the back across the shoulders
.</font></div>
    </
td>
    <
td colspan="2" height="268" rowspan="2">
      <
div align="center"><font face="Arial, Helvetica, sans-serif"></font><font face="Arial, Helvetica, sans-serif"><img src="Merchandise/Poloshirts/Polo_shirt_front.jpg" width="269" height="283"></font></div>
    </
td>
  </
tr>
  <
tr>
    <
td width="54%" height="133" valign="top">
      <
p align="left"><font face="Arial, Helvetica, sans-serif" size="3">Polo
        Shirts are available in the following sizes
:-<br>
        
LXL <b>only.<br>
        <
br>
        &
pound;TBA</b> <br>
        
P+&pound;2.00<b><br>
        </
b>Optional Name under logo on front of shirt<b> <br>
        &
pound;1.76</b></font></p>
      </
td>
  </
tr>
  <
tr>
    <
td width="54%" height="273">&nbsp;</td>
    <
td colspan="2" height="273">
      <
div align="center"><img src="Merchandise/Poloshirts/Polo_shirt_back.jpg" width="267" height="266"></div>
    </
td>
  </
tr>
  <
tr>
    <
td width="54%" height="81">&nbsp;</td>
    <
td colspan="2" height="81">
      <
div align="right"><img src="Merchandise/Poloshirts/logo_front.jpg" width="173" height="80"></div>
    </
td>
  </
tr>
  <
tr>
    <
td width="54%">&nbsp;</td>
    <
td width="3%">&nbsp;</td>
    <
td width="43%">&nbsp;</td>
  </
tr>
</
table>

<
br
Create the php file that will reference this new template you created, eg:

untitled.php

PHP Code:
<?php 

// GO TO FORUM DIR 
chdir('./forum'); 

// STANDARD VBULLETIN STUFF 
define('NO_REGISTER_GLOBALS'1); 
define('THIS_SCRIPT''script_name');
require_once(
'./global.php'); 

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

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

$navbits = array(); 
$navbits[$parent] = 'Meganman'

$navbits construct_navbits($navbits); 
eval(
'$navbar = "' fetch_template('navbar') . '";'); 
eval(
'print_output("' fetch_template('GENERIC_SHELL') . '");');
Don't forget you will need to change your forum root folder if different to mine and obviously the title page.

You can put this file wherever you want really, doesn't make any difference. Oh, don't forget to upload any images referenced in the new template created. Once done, just replicate for the various pages you want.
Reply With Quote
  #36  
Old 10-14-2004, 11:19 PM
blue_chi blue_chi is offline
 
Join Date: Feb 2004
Location: Oman
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks so much allen, I managed to get the file show my HTML content. But I was trying to use the PHP include() function, but it doesn't seem to work. Any ideas of how to fix this?
Reply With Quote
  #37  
Old 10-14-2004, 11:38 PM
blue_chi blue_chi is offline
 
Join Date: Feb 2004
Location: Oman
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OK, I just realised that PHP is not allowed in templates, that's a whole differrent issue then. :S
Reply With Quote
  #38  
Old 11-25-2004, 11:26 AM
Mile-O-Phile Mile-O-Phile is offline
 
Join Date: Nov 2004
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Jakeman
Code:
<?php

// GO TO FORUM DIR
chdir('/full/path/to/forum/directory');

// STANDARD VBULLETIN STUFF
define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', 'script_name');
require_once('./global.php');

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

eval('$HTML = "' . fetch_template('name of template') . '";');

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

?>


I've stripped my version of this code to:

Code:
<?php

// GO TO FORUM DIR
chdir('./forum');

// STANDARD VBULLETIN STUFF
define('NO_REGISTER_GLOBALS', 1);
//define('THIS_SCRIPT', 'script_name');
require_once('./global.php');

// GENERIC_SHELL VARS
$pagetitle = "Talk History Test";
$HTML = ""; // PIECED TOGETHER IN SCRIPT

eval('$HTML = "' . $bbuserinfo[username] . '";');
eval('print_output("' . $bbuserinfo[username]. '");');
?>
This is because I only want to get the username from the forum to display on an independent web page. However, it keeps on creating a new HTML page with the user's name. So, I'd like to be able to convert it into a function (called get_form_user() ) that I can call at any time to insert the name into text within my webpages.

Any ideas?
Reply With Quote
  #39  
Old 11-30-2004, 02:49 PM
Mile-O-Phile Mile-O-Phile is offline
 
Join Date: Nov 2004
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Mile-O-Phile
I've stripped my version of this code to:

Code:
<?php

// GO TO FORUM DIR
chdir('./forum');

// STANDARD VBULLETIN STUFF
define('NO_REGISTER_GLOBALS', 1);
//define('THIS_SCRIPT', 'script_name');
require_once('./global.php');

// GENERIC_SHELL VARS
$pagetitle = "Talk History Test";
$HTML = ""; // PIECED TOGETHER IN SCRIPT

eval('$HTML = "' . $bbuserinfo[username] . '";');
eval('print_output("' . $bbuserinfo[username]. '");');
?>
This is because I only want to get the username from the forum to display on an independent web page. However, it keeps on creating a new HTML page with the user's name. So, I'd like to be able to convert it into a function (called get_form_user() ) that I can call at any time to insert the name into text within my webpages.

Any ideas?
*BUMP*
Reply With Quote
  #40  
Old 11-30-2004, 02:58 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
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:49 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.05703 seconds
  • Memory Usage 2,304KB
  • 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
  • (3)bbcode_code
  • (2)bbcode_php
  • (2)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
  • (3)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