The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Changing from HTML to PHP
Hey there,
I run a gaming website as u know hence my name, and there is hardly any reviews on there because i was thinking what happend if i changed the side menu? i would have to do that to all the cheat pages etc. So is there a way i can get the sidebar into PHP so i just update say 'sidebar.php' and it updates all the sidebar etc. And also the cheats and reviews are like this : (cod4) /review_cod4.html along those lines can i get it like review.php=cod4 or something like that? Thank You |
#2
|
||||
|
||||
Short answer: Of course you can do all that, but it takes a lot of time.
Converting from a static site to a dynamic one can be extremely time consuming. Especially if you aren't sure where to start. If you do it one time ( to make just the sidebar dynamic ) you may as well do it right that one time, and make it all dynamic. Separate the header, navigation, footer, etc. Either way you'll still have to edit every single file on the site to be both php, and include the necessary files. Judging from your questions, you seem pretty novice to any of this stuff. If that is the case, I suggest recreating your site with Drupal, Expression Engine, or (maybe) Wordpress. They're all cms frameworks, and they offer a pretty good jump start to beginners. |
#3
|
|||
|
|||
I dont want to use wordpress or a CMS for that matter because i found this templates on 4templates.com and brought it because it suited every need.
Do you have or know any tutorial which will could aid in me doing this, i know i would have to do the whole thing but in the future it will shorten time.. |
#4
|
||||
|
||||
I guess I'm confused. Converting a template to a cms is very simple.. regardless of where it's from?
To simply change the sidebar as an include, all you really need to know are include() and require(). They're pretty much identical, except for the way they handle errors. Example: PHP Code:
|
#5
|
|||
|
|||
Okay,
Im testing this out on jetgaming.org/indexphp.php Ive got sidebar.php and copied the HTML text and tables from it into there and put include sidebar.php and its working perfect when i edit sidebar..so i know that done. Things to do now: Top nav bar Cheats and reviews like review.php=cod4 (can you do that) (and how) Sidebar 2 (Review) Sidebar 3 (latest cheats) side bar 4 (review list, right) Sidebar 5 (cheat list , right) sidebar 6 (video review, right) Search box ----- Okay ive done a couple now and ive just purely posted the HTML into a PHP file, will i need <html> at the top and / at the bottom? because its working fine now. (without) |
#6
|
||||
|
||||
You're going to need a pretty basic database structure for reviews / cheats / etc.. though for a game site, I imagine you'll want a database table for games, then another table for reviews, and another for cheats (etc). Then join them all together. It's pretty simple stuff when it comes down to it, but there's an obvious learning curve. You'd pretty much be writing your own custom stuff.
Once you have a database, you can pull it all with reviews.php / cheats.php / etc. If you want a full custom system, you should probably look at MVC frameworks. Such as: CodeIgniter, or CakePHP. Those two seem to be the best documented and easy to learn. |
#7
|
|||
|
|||
Erm okay..
I really dont understand Cake and they dont have any tutorials on what im looking for or either im wording it wrong. I have searched google loads but if someone could please find a good tutorial on how to do this: cheats.php?=cod4 (would go to a call of duty 4 cheat page) review.php?=cod4 (would go to a review of call of duty 4) or review.php?game=cod4 etc etc |
#8
|
|||
|
|||
You do not need to add <html> or any body elements to the file, no. PHP includes will take their cue from the body that they're embedded into, put only the markup you need as if it were already part of the main page.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|