
05-17-2007, 09:24 PM
|
|
Just Registered
|
|
Join Date: May 2007
Posts: 4
|
|
I certainly don't have the PHP coding to accomplish what you need, but the Title tags are currently controlled here:
/include/myfunctions.ini.php
Here's the code you'll have to figure out... You might also need to create a field in the DB if you plan to customize each page's Title. It's probably better to create a rule.
PHP Code:
#getBCrumTitle -- return bread crum style for title (recursive)
/* int $id, mysql connection $myconn */
function getBCrumTitle($id,$myconn){
$sql = "select * from categories where id = '" . $id . "'";
$results = mysql_query($sql,$myconn) or die(mysql_error());
while($category = mysql_fetch_assoc($results)){
getBCrumTitle($category['fatherID'],$myconn);
print ' » '.$category['title'];
}//end while
}//end function
#getMetaTags -- print meta tags based on current page location
/* string $curloc */
function getMetaTags($curloc,$myconn){
//fetch settings
$settings = (mysql_fetch_assoc(mysql_query("select * from settings where id = '1'",$myconn)));
switch($curloc){//pending current location
case 'detail':
$title = " information page";
$sql = "select * from pages where id = '" . $_REQUEST['id'] . "'";
break;
case 'subcat':
$title = " " . $settings['title'];
$sql = "select * from categories where id = '" . $_REQUEST['id'] . "'";
break;
default:
$sql = "select * from settings where id = '1'";
break;
}//end switch
$results = mysql_query($sql,$myconn) or die(mysql_error());
$page = mysql_fetch_assoc($results);
if($settings['bcTitle'] == '1' & $curloc == 'subcat'){
print '<title>'.$title.' ';
GetBCrumTitle($page['id'],$myconn);
if ($_REQUEST['pageNum_pages'] > 1) {
print ' » Page '.$_REQUEST['pageNum_pages'];
}
print '</title>';
}
else//print meta tags
print '<title>'.$page['title'].$title.'</title>';
if($page['keywords'] != '')
print '<meta name="keywords" content="'.$page['keywords'].'">';
else
print '<meta name="keywords" content="'.$page['title'].'">';
print '<meta name="description" content="'.$page['description'].'">';
}//end function
If you figure out how to edit all of this effectively, do share 
|