[RELEASED] Show last topic titles with icon topic
---------------------------------------------
First Post only(new)
It's a new variant - here
---------------------------------------------
MOD Name: Show last topic titles with icon
MOD Version: 0.1
Author: fiorefrank(Admin), contributor by Primy and it is an his idea
MOD Description: Show last topic titles with icons
Works with: phpBB 3.0
Features:
This mod add the last topic titles with icon if there is one and it cut title if too long but make it visible at all if you put the mounse on
Licence: GPL
Installation Level: Easy
Installation Time: some minutes
Demo <-- just look the sample forum on the top
Step 1
Step 2
First Post only(new)
It's a new variant - here
---------------------------------------------
MOD Name: Show last topic titles with icon
MOD Version: 0.1
Author: fiorefrank(Admin), contributor by Primy and it is an his idea
MOD Description: Show last topic titles with icons
Works with: phpBB 3.0
Features:
This mod add the last topic titles with icon if there is one and it cut title if too long but make it visible at all if you put the mounse on
Licence: GPL
Installation Level: Easy
Installation Time: some minutes
Demo <-- just look the sample forum on the top
Step 1
- Code: Select all
---------[OPEN]-------
includes/function_display.php
---------[FIND]---------
$last_post_subject = $row['forum_last_post_subject'];
---------[AFTER,ADD] --------------
$last_post_subject_short=str_split(censor_text($last_post_subject) , 25);
if (strlen($last_post_subject) > 25 ) $last_post_subject_short[0] = $last_post_subject_short[0] . " ...";
---------[FIND]---------
'LAST_POST_SUBJECT' => censor_text($last_post_subject),
---------[AFTER,ADD] --------------
'LAST_POST_SUBJECT_SHORT' => $last_post_subject_short[0],
'LAST_TOPIC_ICON_IMG' => get_icon_id_for_post($row['forum_last_post_id']) ,
---------[FIND]---------
?>
---------[BEFORE,ADD] --------------
// Futuresquare.net mod
function get_icon_id_for_post($forum_post_id)
{ global $db;
$sql = "SELECT icons_url, icon_id FROM " . POSTS_TABLE . " AS p
LEFT JOIN " . ICONS_TABLE . " AS i ON (i.icons_id = p.icon_id)
WHERE post_id = '$forum_post_id'" ;
$result = $db->sql_query($sql);
$data = $db->sql_fetchrow($result);
//$db->sql_freeresult($result);
if ($data['icon_id'])
$imm = "<img src=images/icons/" . $data['icons_url'] ." >";
else $imm = "";
return $imm;
}
/////
Step 2
- Code: Select all
---------[OPEN]-------
styles/prosilver/template/forumlist_body.html
---------[FIND]---------
{L_POST_BY_AUTHOR}
---------[BEFORE,ADD] --------------
<a href="{forumrow.U_LAST_POST}" title="{forumrow.LAST_POST_SUBJECT}">{forumrow.LAST_TOPIC_ICON_IMG}{forumrow.LAST_POST_SUBJECT_SHORT}</a><br>