View previous topic :: View next topic |
Author |
Message |
montego webmaster
Joined: Dec 26, 2005 Posts: 254
|
Posted: Sat Oct 27, 2007 9:15 am Post subject: Re: One thing that I think would increase page relevance... |
|
|
I actually am liking this option and will include it in my upcoming 1.1.1 release. Replace all the content lines with this:
Code:
elseif ($name == 'Content') {
global $pa, $cid, $pid;
if ($pa == 'list_pages_categories') {
$sql = 'SELECT title, description FROM ' . $prefix . '_pages_categories WHERE cid=\'' . intval($cid) . '\'';
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$newpagetitle = $row['title'] . $dt_sDelim . $row['description'] . $dt_sDelim . $sitename;
} elseif ($pa == 'showpage') {
$sql = 'SELECT title, cid, subtitle FROM ' . $prefix . '_pages WHERE pid=\'' . intval($pid) . '\'';
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$asDTText['subject'] = $row['title'];
if ($row['subtitle'] != '') {
$asDTText['subject'] .= $dt_sDelim . $row['subtitle'];
}
$sql = 'SELECT title FROM ' . $prefix . '_pages_categories WHERE cid=\'' . intval($row['cid']) . '\'';
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
if ($row['title'] == '') {
$newpagetitle = $asDTText['subject'] . $dt_sDelim . $sitename;
} else {
$newpagetitle = $asDTText['subject'] . $dt_sDelim . $row['title'];
}
}
}
|
Let me know how you like it.
-------------
BTW, kguske, sorry for this thread turning into a Dynamic Titles support post... |
|
Back to top |
|
|
Qlof webmaster
Joined: Sep 30, 2007 Posts: 80
|
Posted: Sat Oct 27, 2007 10:04 am Post subject: Re: One thing that I think would increase page relevance... |
|
|
It adds the subtitle but the category is added after the subtitle without a space in between them. Like this:
Title SubtitleCategory
So there's a space needed.
I would suggest: Category - Title Subtitle
OR rather Sitename Category - Title Subtitle
But that could just be me. My sitename is relevant to all the content on the website.
|
|
Back to top |
|
|
montego
|
Posted: Sat Oct 27, 2007 10:10 am Post subject: Re: One thing that I think would increase page relevance... |
|
|
You really don't want to do that I think. It continues to push off to the right the more relevant content / keywords.
What do you have set for the $dt_sDelim variable because it should place that in-between each of the "nodes". |
|
Back to top |
|
|
Qlof
|
Posted: Sat Oct 27, 2007 10:13 am Post subject: Re: One thing that I think would increase page relevance... |
|
|
Yeah I can see that now.
$dt_delim = '-';
So there should be a - in between those, right? That's weird how it doesnt print that.
edit: I tried replacing the - with something else and it still didn't work. Seems real weird to me. It works for news etc though so it's just in the content. |
|
Back to top |
|
|
Qlof
|
Posted: Sat Oct 27, 2007 10:17 am Post subject: Re: One thing that I think would increase page relevance... |
|
|
I see now. You had put dt_sDelim instead of dt_delim.
It makes the - now but no spaces in between so for example Tittle-subtitle-categori.
If i set dt_delim to "- " it will make an extra space in all other modules aswell.
Maybe I could put content last and re-define it before that?
Last edited by Qlof on Sat Oct 27, 2007 10:19 am; edited 1 time in total |
|
Back to top |
|
|
montego
|
Posted: Sat Oct 27, 2007 10:19 am Post subject: Re: One thing that I think would increase page relevance... |
|
|
That exact code is working perfectly for me. So, not sure why it would not show for you. In my test system I am seeing this:
E-mail Newsletters: The Good and The Bad - by Detra D. Davis - Category 1 |
|
Back to top |
|
|
montego
|
Posted: Sat Oct 27, 2007 10:19 am Post subject: Re: One thing that I think would increase page relevance... |
|
|
the delimiter then should be ' - ' for you? Maybe you got rid of the spaces on each side? |
|
Back to top |
|
|
Qlof
|
Posted: Sat Oct 27, 2007 10:21 am Post subject: Re: One thing that I think would increase page relevance... |
|
|
Actually, it doesn't make any spaces at all for me in the content pages. Only on the ones where the author has added a space behind the title. |
|
Back to top |
|
|
Qlof
|
Posted: Sat Oct 27, 2007 10:23 am Post subject: Re: One thing that I think would increase page relevance... |
|
|
Yeah that works, thanks. And it doesn't add extra spaces for the news titles either. Thanks again . Works perfectly now.
So about what you said about the sitename. Having a long title = not good, or what? |
|
Back to top |
|
|
montego
|
Posted: Sat Oct 27, 2007 10:28 am Post subject: Re: One thing that I think would increase page relevance... |
|
|
Take a look at the search results from a non- TegoNuke DynamicTitles site and you will see that in the results is a bunch of a repeat of the same thing... sitename plus a few extra words... lots of repeat. Even the traditional DT wasn't good enough on this in my opinion.
The end-user is looking for relevant content, so you want them to see as much of the actual DETAIL that might have the keywords they are looking for or phrases. You want them to click YOUR link rather than others.
This, in my opinion, is why you want the detail up front as possible. |
|
Back to top |
|
|
Qlof
|
Posted: Sat Oct 27, 2007 10:30 am Post subject: Re: One thing that I think would increase page relevance... |
|
|
Ok. You're right and I agree. |
|
Back to top |
|
|
montego
|
Posted: Sat Oct 27, 2007 10:32 am Post subject: Re: One thing that I think would increase page relevance... |
|
|
BTW, this thread made me look at this stuff again in more detail. I am going to take another crack at this for a 1.2.0 release sometime this year. I am going to post a thread here regarding the Forums titles. I had gone along with storebuilder's advice on that one, and the more I see how the forums are used, I am now in disagreement with taking the very last post as using that in the title. I still think the first post in a thread has the most relevant content.
Don't respond specifically on this topic here as I am wanting to start a separate topic for this in order to solicit additional feedback. |
|
Back to top |
|
|
cemo Newbie
Joined: Nov 21, 2007 Posts: 1 Location: izmir/Turkey
|
Posted: Wed Nov 21, 2007 2:54 am Post subject: Re: One thing that I think would increase page relevance... |
|
|
Excuse me.
I can not understand this.
How can I make on content module Dynamic title?
Page title will be Content title - Subtitle
Please help me I am looking for this 1 night but I can find only this topic.
Which file Did you change with this codes???
Please tell me about this on basic english.
I am sorry.
Thanx for your helps... _________________ Just Now. |
|
Back to top |
|
|
montego
|
Posted: Wed Nov 21, 2007 6:55 am Post subject: Re: One thing that I think would increase page relevance... |
|
|
cemo,
You can get my TegoNuke DynamicTitles hack from my site as Only registered users can see links on this board! Get registered or login!.
The file is includes\dynamic_titles.php, but it already comes with the Content module supported. |
|
Back to top |
|
|
|