Buy Sell Discuss UK Domain Names at AcornDomains.co.uk Price Freeze on Business Hosting frm £4.95/month

Today's Drop Dates are: 19-02-2012 or 26-02-2012   All times are GMT. The time now is 01:40:24 PM.
Domain Name Sales Domain Software Calculate UK Domain Drop Dates Domain Registration NameDrive Domain Parking Subscribe to our Domains For Sale newsletter
Go Back   Domain Forum Acorn Domains Buy Sell Auction UK Domains > Website Design and Promotion > Website Design
Connect with Facebook

Website Design Discuss web design

Closed Thread
 
LinkBack Thread Tools Display Modes
Old 28-10-2009, 12:08:45 AM     #11 (permalink)

 
Skinner's Avatar
 
Join Date: Jul 2008
Location: Manchester
Posts: 2,507
Skinner has a reputation beyond reputeSkinner has a reputation beyond reputeSkinner has a reputation beyond reputeSkinner has a reputation beyond reputeSkinner has a reputation beyond reputeSkinner has a reputation beyond reputeSkinner has a reputation beyond reputeSkinner has a reputation beyond reputeSkinner has a reputation beyond reputeSkinner has a reputation beyond reputeSkinner has a reputation beyond repute

Yeah its possible. I do this using SQL for a quick and nasty way, so I slam page into SQL then use an index page that simply pulls the page out of no where.

I also do this with includes using a switch statement.

So you'd have

index.php
-cars.inc.php
-house.inc.php
-etc

Then use a switch based on the URL to include the right include
__________________
Browse:
Skinner is offline  
Old 28-10-2009, 01:39:02 PM     #12 (permalink)

 
Skinner's Avatar
 
Join Date: Jul 2008
Location: Manchester
Posts: 2,507
Skinner has a reputation beyond reputeSkinner has a reputation beyond reputeSkinner has a reputation beyond reputeSkinner has a reputation beyond reputeSkinner has a reputation beyond reputeSkinner has a reputation beyond reputeSkinner has a reputation beyond reputeSkinner has a reputation beyond reputeSkinner has a reputation beyond reputeSkinner has a reputation beyond reputeSkinner has a reputation beyond repute

I scribbled this into notepad earlier, I'm pretty sure the syntax is right. This isn't the best way to do it, but its the easiest without a templating engine and stacks of SQL

PHP Code:
switch($dom $ext) {
    case 
'cars.co.uk':
        include(
'./cars.inc.php')
    break;

    case 
'bikes.co.uk':
        include(
'./bikes.inc.php')
    break;
    
    default:
        include(
'./basic.inc.php')
    break;

__________________
Browse:
Skinner is offline  
Old 28-10-2009, 02:15:54 PM     #13 (permalink)

 
SecNam's Avatar
 
Join Date: Jul 2004
Posts: 4,206
SecNam has a reputation beyond reputeSecNam has a reputation beyond reputeSecNam has a reputation beyond reputeSecNam has a reputation beyond reputeSecNam has a reputation beyond reputeSecNam has a reputation beyond reputeSecNam has a reputation beyond reputeSecNam has a reputation beyond reputeSecNam has a reputation beyond reputeSecNam has a reputation beyond reputeSecNam has a reputation beyond repute
Classified Rating: 100% (1)

cheers guys, im working on it a few ways so will reply if i suss what i want it to do
SecNam is offline  
Old 28-10-2009, 02:42:59 PM     #14 (permalink)

 
Skinner's Avatar
 
Join Date: Jul 2008
Location: Manchester
Posts: 2,507
Skinner has a reputation beyond reputeSkinner has a reputation beyond reputeSkinner has a reputation beyond reputeSkinner has a reputation beyond reputeSkinner has a reputation beyond reputeSkinner has a reputation beyond reputeSkinner has a reputation beyond reputeSkinner has a reputation beyond reputeSkinner has a reputation beyond reputeSkinner has a reputation beyond reputeSkinner has a reputation beyond repute

I was editing some code like this, and it thought maybe worth posting as it allows you some basic SEO all in one file.

PHP Code:
<?php 
switch($dom $ext) {
    case 
'cars.co.uk':
        
$header "";
        
$title "Cars.co.uk - Number 1 Source of Car Information";
        
$keyword "cars, convertibles, saloon, hatchback, hot hatch";
        
$desc "The premiere UK Source for Car Information Blah";
        
$footer "Copyright Cars.co.uk";
        
// you can add any others here
        
include('./cars.inc.php')        
    break;

    case 
'bikes.co.uk':
        
$header "";
        
$title "Bikes.co.uk - Number 1 Source of Bike Information";
        
$keyword "bikes, rally, track, dirt, chopper";
        
$desc "The premiere UK Source for Bike Information Blah";
        
$footer "Copyright Bike.co.uk";
        include(
'./bikes.inc.php')
    break;
    
    default:
        include(
'./basic.inc.php')
    break;
}
?>
Then inside the cars.inc I use <?php echo $header; ?> that way I can customise them as I go all in once place, so its a very very messy, nasty and simple template system that does the job

You can use more includes within the includes but to try and keep it tidy name them like cars.filename.inc.php so all the cars are together

Hard to offer any other advice without knowing more about the project
__________________
Browse:
Skinner is offline  
Closed Thread



Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Domain Name Community Replies Last Post
Advertising my service: I develop mini sites. gameboy Services Wanted 1 27-05-2009 10:13:03 AM
Advertising my service: I develop mini sites. gameboy Mini Sites 0 23-04-2009 08:49:19 PM
Dofollow Links jj1 Search Engine Optimisation 7 30-03-2009 12:17:16 PM

Domain Sponsor 2


All times are GMT. The time now is 01:40:24 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.6.0 RC 2
All content on Acorn Domains is member generated and is not moderated before posting. All content is viewed and used by you at your own risk and AD does not warrant the accuracy or reliability of any of the information. The views expressed are those of the individual contributors and not necessarily those of AD. Please contact us to report any issues or send a PM to "Admin".