what do you think

View previous topic View next topic Go down

avatar
grimofdoom
Member
Member
Forum Posts : 106
Member Since : 2012-03-06
View user profile

Postgrimofdoom on 5/6/2012, 8:39 pm

For major peices that would be changed every so often(looks/pieces) such as menu, would it be most benificial to use PHP Include? or is there something more easier/better then that?
avatar
Vanilla990
Administrator
Forum Posts : 114
Member Since : 2011-10-30
View user profile

PostVanilla990 on 6/6/2012, 2:27 am

If you only plan on changing the colour and images within sections you could always write a series of Cascading Style Sheets and then swap between them for the different themes.

So write one for the current look of the site, and then making a testing site and start writing the new css and then when you're fully ready, swap over where the webpages get the css file to the newer one.
avatar
LGforum
Moderator
Forum Posts : 77
Member Since : 2011-11-12
View user profile

PostLGforum on 6/6/2012, 6:36 am

Yes. It would.

A PHP Include benefits you for things that are in like nearly all your pages. Such as your menu.

If you didn't use a PHP include, and you had 20 pages, you would have to go through all those 20 pages and change it in each one... With a PHP include, you only need to change the one file (the one you're including). What could be simpler/easier than PHP includes.
avatar
grimofdoom
Member
Member
Forum Posts : 106
Member Since : 2012-03-06
View user profile

Postgrimofdoom on 6/6/2012, 8:41 pm

I mean like if i need to add a link to the menu, i dont want to go to all like the many files to edit them,instead just change 1 file to change them all(like add link0. I always use external CSS style sheets
avatar
LGforum
Moderator
Forum Posts : 77
Member Since : 2011-11-12
View user profile

PostLGforum on 7/6/2012, 12:49 pm

Then you've pretty much described the need for PHP Includes. Or you could try SSI's. But PHP includes would be the simpler choice considering your level.
avatar
grimofdoom
Member
Member
Forum Posts : 106
Member Since : 2012-03-06
View user profile

Postgrimofdoom on 8/6/2012, 8:30 pm

Alright,thanks. I was just trying to make sure if someone uses something else thats easyish and safe.
avatar
LGforum
Moderator
Forum Posts : 77
Member Since : 2011-11-12
View user profile

PostLGforum on 9/6/2012, 5:55 am

Well there are SSI's, and other CGI's which have include equivalent. Its up to you what you think is easiest. If your writing in PHP then, PHP includes is the only option. Unless you decide to use a template engine, and you can use a "template" include, but essentially they are just using PHP includes.
So its really down to what you feel is easiest Smile
Sponsored content

PostSponsored content

View previous topic View next topic Back to top

Create an account or log in to leave a reply

You need to be a member in order to leave a reply.

Create an account

Join our community by creating a new account. It's easy!


Create a new account

Log in

Already have an account? No problem, log in here.


Log in

 
Permissions in this forum:
You cannot reply to topics in this forum