This is as far as I got with it....
$main is my blurb....
Code:
if ($name == 'Forums') {
global $p, $t, $f, $c;
if ($p) {
$p = intval($p);
$sql = 'SELECT post_subject, post_id, post_text FROM '.$prefix.'_bbposts_text WHERE post_id=\''.$p.'\'';
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$asDTText['subject'] = $row['post_subject'];
$asDTText['text'] = substr($row['post_text'], 0, $text_size);
//Subject
if (empty($asDTText['subject'])) {
$sql = 'SELECT topic_id FROM '.$prefix.'_bbposts WHERE post_id = \''.$p.'\'';
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$sql = 'SELECT post_subject FROM '.$prefix.'_bbposts_text a, '.$prefix.'_bbposts b '
.'WHERE a.post_id = b.post_id AND b.topic_id = \''.intval($row['topic_id']).'\' AND post_subject != \'\' '
.'AND a.post_id < \''.$p.'\' ORDER BY a.post_id DESC LIMIT 1';
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$asDTText['subject'] = $row['post_subject'];
}
$newpagetitle = $main.$dt_delim.$asDTText['subject'];
} elseif ($t) {
//Subject Text
$sql = 'SELECT topic_first_post_id FROM '.$prefix.'_bbtopics WHERE topic_id=\''.intval($t).'\'';
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$sql = 'SELECT post_subject, post_id, post_text FROM '.$prefix.'_bbposts_text WHERE post_id=\''.intval($row['topic_first_post_id']).'\'';
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$asDTText['subject'] = $row['post_subject'];
$asDTText['text'] = substr($row['post_text'], 0, $text_size);
$newpagetitle = $main.$dt_delim.$asDTText['subject'].$dt_delim.$asDTText['text'];
} elseif ($c) {
//Cat Name
$sql = 'SELECT cat_title FROM '.$prefix.'_bbcategories WHERE cat_id=\''.intval($c).'\'';
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$newpagetitle = $main.$dt_delim.$row['cat_title'].$dt_delim.$sitename;
} elseif ($f) {
//Forum Name
$sql = 'SELECT forum_name FROM '.$prefix.'_bbforums WHERE forum_id=\''.intval($f).'\'';
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$newpagetitle = $main.$dt_delim.$row['forum_name'];
}
}
The main forum itself works right....Blurb - Forum
The individual forum works right....Blurb - Forum Name
It is the post thjat I am having trouble with....
What I have is Blurb - Post
What I want is Blurb - Forum Name - Post
Joined: Aug 29, 2004 Posts: 9071 Location: Arizona
Posted:
Thu Jan 03, 2008 8:40 am
BTW, there is a newer version of Dynamic Titles out, but it will also come in the RN 2.20.00 release... I have changed it up quite a bit to where you might want to take the 1.2.0 version instead of what you have as a base, but the code change should be similar in terms of getting the forum_name.
View next topic View previous topic
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum