Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Details »»

Version: , by TAW (Guest)
Developer Last Online: Jan 1970 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 03-25-2001 Last Update: Never Installs: 0
 
No support by the author.

How do you do this?

I want a PHP file that will go directly to a template

And the template will use stuff from the database like amount of posts and newest member, sessionhash-ed links etc.

The file would do nothing apart from display the thing in the template!

What the PHP code?

I tried one, and it went to the template, but did not display any variable stuff,

eg - it said "Registered Members:
threads in total | posts in total

You last visited: 03-25-2001 02:22 PM.
The time now is 02:22 PM. .
Welcome to our newest member, ."

That was just using this code:

Code:
<?

$templatesused = "newtemplate";
require("./global.php");


eval("dooutput(\"".gettemplate("newtemplate")."\");");

?>

How do I do it???

Thanx in advance

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 03-25-2001, 05:47 PM
Guest
 
Posts: n/a
Default

when you're included php file generates some variables like

$newestmember etc..

Then you can reference to them in the template

So if you have:

<?

$templatesused = "newtemplate";
require("./global.php");

$bla = "123";

eval("dooutput(\"".gettemplate("newtemplate")."\") ;");

?>

Then you can reference to $bla in your template....Or if you have a separate php file which contains $bla and you include this file before evaluating the template you can do exact the same thing...

Evaluate does just evaluating the content of a template as if it was php code...so every $variable in the template is parsed with their corresponding variable...
Reply With Quote
  #3  
Old 03-25-2001, 05:53 PM
Guest
 
Posts: n/a
Default

Thanx for ya help

What I now need to know is how to enter variable details like amount of members and connecting to the database....
Reply With Quote
  #4  
Old 03-25-2001, 05:55 PM
Guest
 
Posts: n/a
Default

if you include global.php you don't need to connect to the database....

use a code like this:

$query = "SELECT <fields> FROM <tables>";

$result = $DB_site->query($query);

while($row = $DB_site->fetch_array($result))
{ doSomeStuff();
}
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 05:09 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.03557 seconds
  • Memory Usage 2,216KB
  • Queries Executed 19 (?)
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)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (4)post_thanks_box
  • (4)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (4)post_thanks_postbit_info
  • (3)postbit
  • (4)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
  • 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