Help with my website [message #172204] |
Fri, 04 February 2011 00:59 |
Geoldr
Messages: 1 Registered: February 2011
Karma: 0
|
Junior Member |
|
|
Hi, so I am creating a website, but I would like my website to be
skinnable. So for example, if i wanted to display the news, I would
just have to type in get_news(); which the program would get from
another file for the functions. So the main files that display
information wouldnt actually have much code in them. I am having
trouble with this, the only way I found I can do this is if I use
global variables, but that's not very good. I am trying to figure out
a way to use classes. Any help on this would be much appreciated.
|
|
|
Re: Help with my website [message #172207 is a reply to message #172204] |
Fri, 04 February 2011 09:37 |
Rahul Sinha
Messages: 1 Registered: February 2011
Karma: 0
|
Junior Member |
|
|
On Feb 4, 5:59 am, Geoldr <geo...@gmail.com> wrote:
> Hi, so I am creating a website, but I would like my website to be
> skinnable. So for example, if i wanted to display the news, I would
> just have to type in get_news(); which the program would get from
> another file for the functions. So the main files that display
> information wouldnt actually have much code in them. I am having
> trouble with this, the only way I found I can do this is if I use
> global variables, but that's not very good. I am trying to figure out
> a way to use classes. Any help on this would be much appreciated.
Hi there ..
Probably you have to make use of MVC pattern for your web app.
You can make use of any open source fwk or else you have to create
your own.
Regards,
Rahul
|
|
|
Re: Help with my website [message #172212 is a reply to message #172204] |
Fri, 04 February 2011 15:18 |
Michael Fesser
Messages: 215 Registered: September 2010
Karma: 0
|
Senior Member |
|
|
.oO(Geoldr)
> Hi, so I am creating a website, but I would like my website to be
> skinnable. So for example, if i wanted to display the news, I would
> just have to type in get_news(); which the program would get from
> another file for the functions. So the main files that display
> information wouldnt actually have much code in them. I am having
> trouble with this
In what way?
You write your news-polling function, put it in an include file, include
that on the main page and call the function there if necessary. So where
exactly is your problem? What have you tried so far?
Micha
|
|
|