![]() |
Can someone give me the command to grab a template onto my own PHP page? IE: not a vb Page...it's for a hack I'm working on...
|
This is untested, and possibly not 100% correct, but the theory is there :).
You'll need to do something like this: Code:
<?php That's the best I can do off the top of my head. The code depends on what is it you want to do more than anything else. -jim |
I used this:
require("global.php"); $DB_site->query("SELECT * FROM template"); eval("echo(\"".gettemplate("savethread")."\");"); And got this: Fatal error: Cannot redeclare class db_sql_vb in admin/db_mysql.php on line 6 Any idea whats wrong? I created a "savethread" template and as it turns out the global.php file is in the same directory as my file. |
Okay, I think I know what's wrong.
In global.php up towards the top you'll see a whole bunch of function definitions. Add this somewhere in there (I added mine below "Start dovars" and above "start standarderror": Code:
// ####### Start Save Thread Hack ##### Code:
require("global.php"); What I did was put the second code snippet into a file called savethread.php, and put it in my /forums/ directory. Then I created a simple template called "savethread", and used some of the standard variables. You can see an example here: http://www.bronx-bombers.com/testforum/savethread.php I think that was what you were trying to do, so I hope that helps :) -jim [Edited by JimF on 09-19-2000 at 01:50 PM] |
TWTCommish - Did this work?
|
I'm sorry Jim! I never got around to it - til now.
Works great! Thanks a lot! Hopefully I'll be able to finish my pathetic exscuse for a hack now. :) |
One quick problem: how do I integrate the two together? IE: I have some SQL queries to make here, but I can't just stick em in the template, can I? I don't think the rest of vB is like that...
The problem is whatever I have printed out shows up at the bottom, below the template... |
All times are GMT. The time now is 04:50 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|