Affiliate Marketing
Forum Search

Reply
 
LinkBack Thread Tools Display Modes

  #1 (permalink)  
Old 14-02-06
mattylamb's Avatar
Self taught incompetent
 
Join Date: Nov 2004
Location: North East UK
Posts: 122
Thanks: 0
Thanked 0 Times in 0 Posts
mattylamb is an unknown quantity at this point
  Question dynamic <title> tag

Hi all, sorry but this is probably going to be a stupid question but as a php/design noob its one I'm struggling with.

on my dvd site, i have 2 pages .. searchTitles.php and fetchPrices.php which are passed variables e.g.. searchTitles.php?title=batman

or fetchPrices.php?movie=mfno123546

The issue is that at the moment i have several hundred instances of fetchPrices.php indexed by google, but the title and description of each page is the same. I want to have the dvd movie title in the <title> tag so i can make these pages different based on the content from the feed.

anyone know how I can acheieve this?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 14-02-06
lazy student
 
Join Date: Aug 2003
Posts: 362
Thanks: 0
Thanked 0 Times in 0 Posts
giveasyouget is an unknown quantity at this point
it's quite easy really - in the first case if the title field contains evering you need then edit your 'searchtitles.php'
where it says
Quote:
echo "<title>yoursitename</title>";
you change it to
Quote:
echo "<title>$title - yoursitename</title>";
(if it's not in an echo statement you'll probably need something like:
Quote:
<title><? echo $title ?> yoursitename</title>
for the second one u will need to look up the title in your database based on the movie= code, and then put out the <title> tag after you know what it is.
__________________
vso volunteer - vietnam
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 14-02-06
mattylamb's Avatar
Self taught incompetent
 
Join Date: Nov 2004
Location: North East UK
Posts: 122
Thanks: 0
Thanked 0 Times in 0 Posts
mattylamb is an unknown quantity at this point
thanks mate, will get to work on it. cheers
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 14-02-06
Dark Prince
 
Join Date: Aug 2003
Location: Moving to Windsor Woohoo!
Posts: 1,570
Thanks: 0
Thanked 9 Times in 7 Posts
lowndsy is an unknown quantity at this point
You need to move the html around in fetchprices.php to be displayed after the product title has been extracted from the xml. Then you can just put $dvdTitle in the title tags and it should work.

You need to find something like this

switch ($name) {
case "TITLE":

and put all the header info straight after that, from <html> all the way through to <body> and the basic page template. I'd move it into a seperate file and put it in fetchprices with a PHP include.
It will slow the page down though - nothing will get written to the page until the xml file has beeen parsed.

Last edited by lowndsy; 14-02-06 at 05:54 PM..
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #5 (permalink)  
Old 15-02-06
mattylamb's Avatar
Self taught incompetent
 
Join Date: Nov 2004
Location: North East UK
Posts: 122
Thanks: 0
Thanked 0 Times in 0 Posts
mattylamb is an unknown quantity at this point
with some great help from Lowndsy it is working. thanks all!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 15-02-06
Registered User
 
Join Date: Aug 2003
Location: Limburg - Netherlands
Posts: 169
Thanks: 0
Thanked 0 Times in 0 Posts
DutchRomano is an unknown quantity at this point
Could someone post the lines of code which need to be altered ? Thanks

DutchRomano
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 15-02-06
Dark Prince
 
Join Date: Aug 2003
Location: Moving to Windsor Woohoo!
Posts: 1,570
Thanks: 0
Thanked 9 Times in 7 Posts
lowndsy is an unknown quantity at this point
I did it by editing MattyLambs code directly, and I don't actually use the medifusion dvd feed myself so I don't actually have the code to post here (and I don't want to publish Mattys code for obvious reasons). When I add the same changes to my game sites I'll post my page here.
It's like I said in the post above - the xml is parsed in a big switch statement - with each case housing the action for the different types of data the xml could contain. You need to write the the page title to the screen after the data has been pulled from medifusion rather than having it right at the top of your code where it usually is...
Just find the case statement marked TITLE and put all of your html, from the very first <HTML> all the way through to everything which appears before the products are displayed in there. I'd consolidate it into a seperate file but you don't have to.
There are 2 switch statements - one containing the visual elements (that's the one you're looking for) and another one which just assigns some varibles to the right places - pretty hard to get them mixed up - just pick the one containing HTML.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
ASP dynamic to static pages Leeky Widgets, Coding, AJAX, PHP - Technology & Affiliate Marketing 3 12-09-05 09:23 PM
creating link on dynamic text ukyellowpage Widgets, Coding, AJAX, PHP - Technology & Affiliate Marketing 3 22-02-05 12:28 AM
Do dynamic pages use same bandwidth as static? Elaine Widgets, Coding, AJAX, PHP - Technology & Affiliate Marketing 4 23-08-04 11:52 AM
Dynamic META Description misscarolann Widgets, Coding, AJAX, PHP - Technology & Affiliate Marketing 4 08-08-03 11:29 PM
amazon add dynamic content warncouk Independent Programs 5 26-03-02 02:17 AM


Affiliate Marketing RSS Feeds - Contact Us - Affiliate Marketing - Archive - Privacy Statement - Top

Content Relevant URLs by vBSEO 3.2.0 RC7