---------[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;
}
/////
---------[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>---------[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_post2($row['forum_id']) ,
---------[FIND]---------
?>
---------[BEFORE,ADD] --------------
// Futuresquare.net mod
function get_icon_id_for_post2($forum_id)
{ global $db;
$sql = "SELECT i.icons_url, p.icon_id FROM " . POSTS_TABLE . " AS p
LEFT JOIN " . TOPICS_TABLE . " AS t ON (t.forum_id = '$forum_id')
LEFT JOIN " . ICONS_TABLE . " AS i ON (i.icons_id = p.icon_id)
WHERE p.post_id = t.topic_first_post_id
ORDER BY t.topic_last_post_time DESC" ;
$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;
}
/////
if ($data['icon_id'])
$imm = "<img src=images/icons/" . $data['icons_url'] ." >";
else $imm = "<img src=images/icons/default_image_name"; //devi modificare questa riga
return $imm;
Users browsing this forum: No registered users and 0 guests