Montego Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic
Author Message
warren-the-ape
Newbie
Newbie



Joined: Nov 16, 2007
Posts: 17

PostPosted: Fri Nov 16, 2007 1:30 pm Reply with quote

Heya all and Montego,

After some long intensive searches I finally found this website and amazing script, a big.. i mean, HUGE thnx for that Cool (I almost gave up Wink)

I mainly searched for this cause the forumtitles at my site were bugging me (combination of php-nuke and phpbb).

After installing and some minor adjustments in the dynamic-titles.php its almost close to perfect, accept for 1 little thingie.


My links to a topic look something like this;
www.sitename.com/modules.php?name=Forums&file=viewtopic&t=4632

and an individual link to a post within a topic like this;
www.sitename.com/modules.php?name=Forums&file=viewtopic&p=53090#53090


Now for the 1st post in that topic there are no problems, pretty logical cause the Subject is filled in Very Happy

But... Replies often dont use the Subject line (almost 99% of all replies), because of that, individual 'Post Reply' -links will get a blanco page title.


Is there a way to fix this, or perhaps for replies always use the subject from the Topic (1st reply)?


Thnx for the help
 
View user's profile Send private message
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 1393

PostPosted: Fri Nov 16, 2007 7:21 pm Reply with quote

Well, I am confused. Are you sure that you have the absolute latest version of the script? The reason I ask is that I did exactly as you had mentioned and went back until I could find the last one with a subject line.

However, I am seriously considering changing this up again. The more I experience how forum threads go, the last few posts in the thread are NOT very helpful in SERPs. They usually end with comments like "Thank you" or "Thnx for the help", etc. The original idea was to try and pick up the last post which actually had the resolution.

I am now considering changing it back to its original (long back) approach of just picking up the first post in the thread and using that for the page title. Any thoughts on this?
 
View user's profile Send private message Visit poster's website
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 1393

PostPosted: Fri Nov 16, 2007 7:25 pm Reply with quote

You can actually see it working here now in this thread. The latest version is 1.1.0.
 
View user's profile Send private message Visit poster's website
warren-the-ape
Newbie
Newbie



Joined: Nov 16, 2007
Posts: 17

PostPosted: Sat Nov 17, 2007 7:37 am Reply with quote

Hey Montego thnx for the fast reply Very Happy

Well i noticed that on your forum it is working as it should be, but after some more reading on this site I noticed that you are probably using Shortlinks here?

And because of that all replies within a topic use the same topic link but without those Shortlinks, individual posts use this stupid post prefix.

I used this one;
http://montegoscripts.com/download-file-33.html (version 1.0.0)

And this is my current code which i use for my forums;

Code:
// Forums
if ($name == 'Forums') {
    global $p, $t, $forum, $f;
    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);
        $title = $row['post_subject'];
        $post = $row['post_id'];
        $ptext = $row['post_text'];
        $newpagetitle = $title.' '.$dt_delim.' '.$dt_mod_name.' '.$dt_delim.' '.$sitename;
    } elseif ($t) {
        $t = intval($t);
        $sql = 'SELECT topic_first_post_id  FROM '.$prefix.'_bbtopics WHERE topic_id=\''.$t.'\'';
        $result = $db->sql_query($sql);
        $row = $db->sql_fetchrow($result);
        $tpid = $row['topic_first_post_id'];
        $sql = 'SELECT post_subject, post_id, post_text FROM '.$prefix.'_bbposts_text WHERE post_id=\''.$tpid.'\'';
        $result = $db->sql_query($sql);
        $row = $db->sql_fetchrow($result);
        $title = $row['post_subject'];       
        $post = $row['post_id'];
        $ptext = $row['post_text'];
        $newpagetitle = $title.' '.$dt_delim.' '.$dt_mod_name.' '.$dt_delim.' '.$sitename;
    } elseif ($f) {
        $f = intval($f);
        $sql = 'SELECT forum_name FROM '.$prefix.'_bbforums WHERE forum_id=\''.$f.'\'';
        $result = $db->sql_query($sql);
        $row = $db->sql_fetchrow($result);
        $forum = $row['forum_name'];
        $topics = 'Topics';
        $newpagetitle = $forum.' '.$dt_delim.' '.$topics.' '.$dt_delim.' '.$sitename;
    }
}



I myself dont have a lot of php knowledge (more of a html/css/js kind of guy Wink)

but i guess this is the part for the individual posts right?

Code:
    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);
        $title = $row['post_subject'];
        $post = $row['post_id'];
        $ptext = $row['post_text'];
        $newpagetitle = $title.' '.$dt_delim.' '.$dt_mod_name.' '.$dt_delim.' '.$sitename;


I tried several things but nothing really works.


EDIT:
DAMMIT how stupid can I be Embarassed Embarassed I now see that 1.1.0 as well; http://montegoscripts.com/download-file-36.html

but i couldnt find it here; http://montegoscripts.com/downloads.html
(I now used the search for it Razz)
 
View user's profile Send private message
warren-the-ape
Newbie
Newbie



Joined: Nov 16, 2007
Posts: 17

PostPosted: Sat Nov 17, 2007 8:51 am Reply with quote

Aah great it is working perfect now Cool Laughing
Apologizes for not looking over the script versions Embarassed


But another little question, Is it possible to generate a pagetitle like this;

Topic title/subject - Forum Section - Sitename ?


I tried several things with the old script and newer script already but this PHP noob cant get it to work. I have no idea if its difficult to accomplish?


To come back at your question;

montego wrote:
I am now considering changing it back to its original (long back) approach of just picking up the first post in the thread and using that for the page title. Any thoughts on this?


I myself am not using the post text variable cause i personally think the topictitle is descriptive enough (but a great function nevertheless Wink).

But perhaps its an idea to always use the subject from the 1st post?

Most of the times people leave this field empty, and most phpnuke/phpbb themes ive seen dont include this title either. But there are a few occasions (especially in big threads) were people use this field with a text like; 'Hey' or 'Thanks', which sort of 'destroys' the good topictitle.

Usability wise it can cause weird thoughts for the user as well;
- They click on a topic directly to the last post, look at the title and see a completely different title than the one they actually clicked on.
 
View user's profile Send private message
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 1393

PostPosted: Sat Nov 17, 2007 9:30 am Reply with quote

You can definitely reformat it that way, however, I would like to mention first why the script is the way it is. There are two reasons, IMO, why a dynamic site needs to have dynamically generated page titles:

1. Search Engine Results (SERPs) - helping out the search engines to better rank your pages as Page Titles are an important element in their algorithms, and

2. Click-Through Rate (CTR) - a portion of the Page Title is used in the SERP pages. A human being is on the other end of that search results and what is going to make them choose your site over someone next to you in the results? You want to increase the probability that they will see something useful (that they were looking for) embedded within that very short description.

I caution people from using just forum subjects UNLESS you and your moderators/admins are going to ensure that the titles are well thought out and very CTR relevant. Remember, PHP-Nuke is dynamic and content is being driven by even your end-users, so it can be difficult to control.

Also, think about the number of pages that are going to show up in your SERPs with the same Forum Section and Site name in it? Is that really going to help persuade someone to click through? Isn't that really the end-result we all want? Page rank isn't enough... people need to be drawn to your site and they have very little information in the results to go on.

Just things to think about is all.

Edited: I cleaned up a bunch of typos and grammar issues... sorry.
 
View user's profile Send private message Visit poster's website
warren-the-ape
Newbie
Newbie



Joined: Nov 16, 2007
Posts: 17

PostPosted: Sat Nov 17, 2007 10:37 am Reply with quote

Relevant titles/subjects are important of course, and a good administrator (+ team of moderators) should be able to control that, so i dont think that is the biggest issue.

About the 'forum section' and 'site name', those 2 things can give your links context, especially a well chosen forum section -name, the sitename is debatable since its visible in the link itself as well (most times) of course.

I also wonder if an ever changing page title for the same topic is being appreciated by search engines such as google, havent really done research to that, so ignore if thats not an issue Razz

Quote:
PHP-Nuke is dynamic and content is being driven by even your end-users, so it can be difficult to control.


The same goes for the Post content of course Very Happy
You mentioned the 'thnx' replies earlier but from my experience there are also a lot of 'locked' topics which usually contain a few words like 'locked' or 'end of discussion' or something similar.

The problem you now get is that this will be the final page title for a specific topic, and i can understand that thats not what you want either?


But dont get me wrong, I am not here to piss of this amazing script not at all, just a difference in opinion i think Wink
 
View user's profile Send private message
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 1393

PostPosted: Sat Nov 17, 2007 12:04 pm Reply with quote

warren-the-ape wrote:
Relevant titles/subjects are important of course, and a good administrator (+ team of moderators) should be able to control that, so i dont think that is the biggest issue.


Just keep in mind that it "depends". In your case, and possibly mine, yes. But, take Raven's forums over at ravenphpscripts.com or nukecops.com, just way too many threads to manage.

Quote:
About the 'forum section' and 'site name', those 2 things can give your links context, especially a well chosen forum section -name, the sitename is debatable since its visible in the link itself as well (most times) of course.


Sitename is worthless... trust me. Forum section is a tiny bit better, but think about all the threads that could grow under a given forum topic. Can you see the problem there? So, these definitely need to be at the far right-hand of the page title which will be fine for the crawling and indexing part, but won't interfere with what needs to be shown on the SERPs.

Now take that just one step lower, with the thread subject(title), some threads can get quite long. Each post within a thread has a link and hence, could have an indexed page. Do a search for something in the thread title might just give a whole like of the same thing in terms of what shows on the SERPs.

Quote:
I also wonder if an ever changing page title for the same topic is being appreciated by search engines such as google, havent really done research to that, so ignore if thats not an issue Razz


The initial research I did was from storebuilder, at the time, pretty well-known for his ability to produce high rankings and rather quickly. In addition, one of the "problems" with forums (and blogs) is that there are multiple ways to get to the same content... each post is hyperlinked as well.

Therefore, I struggle with also only taking the first post. If the SE follows the individual links, and they might, then each of those links would look identical, page title-wise, if I only took the last post or the first post, then it even gets worse with the forum subject.

Quote:
The problem you now get is that this will be the final page title for a specific topic, and i can understand that thats not what you want either?


Yup. Other issues as already mentioned above too... hence my "quandary".

Quote:
But dont get me wrong, I am not here to piss of this amazing script not at all, just a difference in opinion i think


I didn't take it like that. I have done my homework (even more recent books) to a good extent and I am confident in what it is I am saying (so I wanted to impart a bit of that knowledge onto you to consider), however, even search algorithms change all the time. Think about it: one day, not too long ago, something like my ShortLinks was almost REQUIRED to get crawled. Now days, most SE's don't get bothered as much by the extended links.
 
View user's profile Send private message Visit poster's website
warren-the-ape
Newbie
Newbie



Joined: Nov 16, 2007
Posts: 17

PostPosted: Sat Nov 17, 2007 12:42 pm Reply with quote

Mjah 1 forum cant be compared with the other of course. I also doubt if its a good strategy to create the huge amount of different sections like on ravenphpscripts (usability wise), but that aside.

And lets not forgot that the pagetitle is only 1 of the many aspects, just looking at the '1997' phpnuke and phpbb coding gives me the chills.. brrr Razz Luckely phpbb3 is already a huge step forward semantic wise.


But would it be hard to incorporate the forum section into a Topic pagetitle?
Like i said, i tried a couple of things but my php programming skills are just close to zero Sad
 
View user's profile Send private message
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 1393

PostPosted: Sat Nov 17, 2007 6:18 pm Reply with quote

Well, I do not have time to do it for you, but here is an example that maybe you can expand upon:

=== FIND CODE ===

Code:

   } elseif ($t) {
      $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'] = $row['post_text'];
      $newpagetitle = $asDTText['subject'] . $dt_sDelim . $asDTText['text'];



=== WITH CODE ===

Code:

   } elseif ($t) {
      $sql = 'SELECT topic_first_post_id, forum_name  FROM ' . $prefix . '_bbtopics a, ' . $prefix . '_bbforums b WHERE topic_id=\'' . intval($t) . '\' AND a.forum_id = b.forum_id';
      $result = $db->sql_query($sql);
      $row = $db->sql_fetchrow($result);
      $asDTText['forum'] = $row['forum_name'];
      $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'] = $row['post_text'];
      $newpagetitle = $asDTText['forum'] . $dt_sDelim . $asDTText['subject'] . $dt_sDelim . $asDTText['text'];
 
View user's profile Send private message Visit poster's website
warren-the-ape
Newbie
Newbie



Joined: Nov 16, 2007
Posts: 17

PostPosted: Sun Nov 18, 2007 8:48 am Reply with quote

Hey thnx Montego, much appreciated, it is working great Very Happy

Im trying to fiddle around with it and see if i can use this for the replies as well.

Btw, have you thought about adding the post content into the meta description rather than the title (or both)? For search results it would keep the links a bit cleaner and have appropriate page descriptions.
 
View user's profile Send private message
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 1393

PostPosted: Sun Nov 18, 2007 8:54 am Reply with quote

I am not looking to modify this too much as Kguske over at http://nukeSEO.com is already going to be providing dynamic titles along with dynamic meta tags in his next version of nukeSEO. He and I will collaborate where we can, as it makes more sense to combine the two IMO.
 
View user's profile Send private message Visit poster's website
warren-the-ape
Newbie
Newbie



Joined: Nov 16, 2007
Posts: 17

PostPosted: Sun Nov 18, 2007 4:27 pm Reply with quote

Aah okay, i will check nukeSEO then Wink
 
View user's profile Send private message
warren-the-ape
Newbie
Newbie



Joined: Nov 16, 2007
Posts: 17

PostPosted: Fri Nov 23, 2007 4:49 pm Reply with quote

Eya Montego,

After a week running this mod I noticed that the Google search results are working pretty fine, but I also noticed that some results become 'tainted' cause some replies included very offtopic subjects, like mentioned earlier in this thread.


I made some attempts trying to change this but they all failed sort of Razz


I know that this is the code that controls that specific part, and more specific starting from the if (empty statement.
Code:
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);
      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'];
      }


I tried to remove the 'empty' line and that works well if another subject is used than in the startpost but everything else becomes messed up afterwards Very Happy


I also tried to include an 'elseif' part but messed up miserably Embarassed
My PHP knowledge is just too low but if you have some time is it posstible to give me a little nudge into the right direction?
 
View user's profile Send private message
montego
Site Admin/Owner
Site Admin/Owner



Joined: Feb 12, 2005
Posts: 1393

PostPosted: Sun Nov 25, 2007 1:31 pm Reply with quote

Unfortunately, that is one of the drawbacks of running a dynamic site. You cannot necessarily control what your end-users are entering. You have two options:

1. Modify the subject of the offending posts, or

2. Pull back only the original thread post subject.

I do not see any other options. Do you? Let me know if 2 is what you are wanting.
 
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic

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


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 4 Hours
 
Forums ©
linear-bunch
linear-bunch