SEO-Board: Free, Fast and Search Engine Optimization Friendly Forum Script
»User: »Password:   Remember Me? 
SEO-Board Forum Software Community / General / Showcase / Webmasterworld themed latest forum posts
Posted:  28 Sep 2005 09:41
Hi All,

We have updated our latest forum posts to the webmasterworld style - it now pulls in the teaser text!

compliments of Singer Design

http://www.computershops.com.au/computerforum ...

Will post the code shortly
Posted:  28 Sep 2005 10:04
The three files that you need to modify are:
- board.php
- mainlastposts.htm (in /skin directory)
- mainlastpostscell.htm (also located in /skin directory)

The last two files mainly deals only with appearance formatting and display for both the whole table and its associated cells.

The tricky bit comes from modifying the board.php to get some data to be displayed in the the last two files.

I added the following code to board.php:

// I figured using a combination of id and time to get the message is enough since there is no way that the same user can post at the same
// time twice. I might be wrong though :P
$temp = mysql_query("SELECT post_text FROM {$dbpref}posts WHERE post_author_id = $lastposter_id AND post_time = $lastposttime");
$temp_result = mysql_fetch_row($temp);
list($post_message) = $temp_result;

This will result in $post_message holding the value of the message just posted and thus all that needs to be done is to include this variable in the mainlastpostscell.htm and perform additional formatting as you wish..
Posted:  29 Sep 2005 09:38
Looks very nice.
Posted:  01 Oct 2005 09:04
I would love to see this format as a standard feature in the next version!!!

Posted:  11 Oct 2005 23:21
Do you know how to display teaser text under the topics in the forums, and not just the mainlastposts?

Also, any idea how you can also list the category of the post with the teaster text in mainlastposts?
Posted:  12 Oct 2005 07:34
Quote:
Do you know how to display teaser text under the topics in the forums, and not just the mainlastposts?
That would require rewriting stuff in php/mysql. The slow way to do it is make a query that pulls the teaser with a join statement between the topics and posts tables. The faster way is to add a teaser row in topics and update the teaser every time someone posts. Then showing the teaser after the query is trivial.

Quote:
Also, any idea how you can also list the category of the post with the teaster text in mainlastposts?
Change the sql pulling statement to a join with the forums table on forum_id and then get the title from there.
Posted:  05 Dec 2005 20:44
I was having trouble implementing this feature. I want to see how it looks and if I like it, but mainly need a little more info.

Where do I add the suggested code in the board.php file? Above or below examples would be nice.

I am also having troubles getting the variable correct in mainlastpostscell. Is there a specific variable location? or anywhere in the file?

Any help would be appreciated! I apologize in advance for my newness to this.

SEOer - Search Engine Optimizer