![]() |
Help in migrating a site to PHP from HTML
Hey folks,
I did a search on this and couldn't find any relevant threads, and I apologize if this is in the wrong section so feel free to move it. What I need help with basically is in how to go about converting my current static (HTML) website into a more dynamic PHP/MySQL-driven site. My main problem right now is if I want to add anything to the site, for example any links to another site page off the main one, I have to update 20 pages instead of just inserting one line. Basically I need to know how to get started in converting my site over to PHP and how much work is involved in it, along with any good resources you'd want to pass along. Thanks very much for any help! On a side note, I would publish the URL here for people to get an idea of what I'm doing, but I can't right now because we're in the process of switching hosts, so it most likely wouldn't work. |
You need a CMS solution. I'm working on one now. Need more info?
|
Yes, that would rock! Thanks. :)
|
Still looking for more info on this.
|
well if it helps, first divide you site into some main sections ie. left column, header, right column, main. then make the header, left and right column trhee different php pages, and then on index.php include them and wherever you want, then check to see what "action" equals (from the header [ex www.vbulletin.org?action=showthread] you get the idea) and if it equals anything besides "main.php" make it include that page
if this doesn't make sense tell me and i'll try to explain better :) |
I'm trying to use custom vbulletin templates on my forum.
I can go into forum/admin and make the new template, but what is the command to initialize it? For instance, if I use code that has: $demotemplate in it, nothing will show because its just an unnamed variable, right? I need to say something like: $demotemplate = (query or query to database where template is stored) Thats what I'm really looking for, what query do I use to find info from the templates created in the forum/admin? I think this would also solve Crazy Pete's problem, as it sounds like he wants to move his info to templates as well. |
look through the vb code, it'll be something with eval(gemtemplate) etc...it'll have more than that, but it has that and the dooutput() stuff
|
Like this?
Code:
eval( 'dooutput( "' . gettemplate( 'home' ) . '" );' ); Code:
$templatesused = 'home,home_articlebit,home_articlelink,home_welcomeguest,home_welcomeuser,'; Thanks for your input, and I hope this helps Crazy Pete as well. |
Yeah, that would probably help me as well. Thanks, leviw. :)
|
You could also use Logician's webtemplates hack. It's very good for having a site integrated with vBulletin.
Craig |
it's confusing, but you use the gettemplate thing, NOT the doouput to assign a whatever text is in the template to a variable, then when you do a dooutput all those templates you assigned to variables can be used in the final dooutput template
not sure if that makes sense, it is confusing till you get the hang of it |
Thanks for the suggestion, Logician's webtemplates hack is nice but you cant use templates from inside it, which pretty much makes it useless to me.
Sorry for being dense, but I'm still kinda confused on what exactly to use. Is this code correct, if I have a template made in forum/admin called demotemplate? eval( '$demotemplate=( "' . gettemplate( 'demotemplate' ) . '" );' ); I ask because since php doesnt use templates per se, this is really just a creative use of variables and I think there must be some missing piece(s) here. Could you post a full example for clarity, or if you dont know exactly I'll fiddle around with it tonight and see if I get lucky. |
it goes like this
PHP Code:
|
Perfect, worked like a charm! Thanks SO much for your help mr_e!
|
Glad to help :D
|
All times are GMT. The time now is 04:11 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:
|