This is a discussion on Help with website - why code like this? within the Coding Help forums, part of the Webmaster Help category; I've been given a site to maintain and after looking through the code it all looks very strange to me. ...
| |||||||
| Register | Forum Rules | FAQ | Donate | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||||
| ok ... to me the Code: $TEXT = ""; Are there any files that get specific things done to the $TEXT ? ... that is returned ? If not it looks like another case of a self taught php scripter
__________________ Forbairt Media | Web Design & Development Galway / Dublin, Ireland - coming soon ... ( vague but descriptive isn't it ) Recent Work: Safari Club African Safari Holidays - Malawi Safaris Other Stuff: FluffyLinkulator Rapid Inclusion Service Tools |
| |||||
| They look like .tpl template files to me or there is a str_replace function somwhere in the code.
__________________ :. Web Design & Development Web Design Ireland :. Search Engines Optimization Search Engines Optimization :. Directory Submission Directory Submission :. News & Press Release Ireland GiveItSocks.com :. Used Cars Ireland, Car Parts & Car Audio Cars For Sale, Car Parts & Accessories :. I Have 2 Find It Directory SEF Directory |
| |||||
| Quote:
Quote:
|
| |||||
| so it is a template and is using str_replace to change the text from the buffer PHP Code: |
| |||||
| Whoever design that website tried to make use of templates to make it easier to update certain part without editing all the pages, but it is way out of date and it is similar to include or required php function. |
| |||||
| Basically ... you have a header and a footer lets say ... Now you want to have custom Meta content in your description / keywords ... but you won't know what that is .. until the main body of your content ... Doing it this way ... You basically create the whole page .. then go back and do a string replace ... It means lets say 1 database query .. instead of a database query at the very start ... then potentially another one further down .. having to fix up custom header / footers and so on That'd be my take on it at any rate I've rarely put this type of thing into operation I'm unaware of the overheads on a bigger site. |
| |||||
| Yeah, when I initially looked at the code I thought it was some way of pulling content from a db or something. But then I noticed they were using php includes, and that all the content was in an 'includes' folder in the root, so I couldn't understand what seemed like duplication to me. Anyhow, if it's an outdated practice I won't worry about trying to get to grips with it Thanks folks! |
| Tags |
| code, website |
| Thread Tools | |
| Display Modes | |
|
|
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to Avoid the Google Sandbox | Cormac | Webmaster Articles | 26 | 18-02-2008 05:38 AM |
| Website now selling with no Shopping Cart? | Lottoplus | Webmaster Discussion | 7 | 08-01-2008 05:52 PM |
| New Google Analytics Code... | davidbehan | Webmaster Discussion | 5 | 02-01-2008 05:18 PM |
| Need help on Autoresponder Script for my website | vckc4ever | Coding Help | 0 | 04-07-2007 12:05 PM |
| recomend IP to Alpha2 and dialing code database | Frodo | Webmaster Discussion | 2 | 27-01-2007 03:40 PM |
| ||||||||
| | ![]() | |||||||