#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
# Note: there should *not* be a comma after $cash_field, just a space
#
$cash_field
#
以上更正為
找尋:
//
// Go ahead and pull all data for this topic
//
下面數行有
$sql = "SELECT u.*, p.*, pt.post_text, pt.post_subject, pt.bbcode_uid
FROM " . POSTS_TABLE . " p, " . USERS_TABLE . " u, " . POSTS_TEXT_TABLE . " pt
WHERE p.topic_id = $topic_id
$limit_posts_time
AND pt.post_id = p.post_id
AND u.user_id = p.poster_id
ORDER BY p.post_time $post_time_order
LIMIT $start, ".$board_config['posts_per_page'];
在前面嵌入
$cash_data = array();
$cash_field = "";
if ( !$board_config['cash_disable'] )
{
$sql = "SELECT cash_dbfield, cash_name, cash_image, cash_imageurl
FROM " . CASH_TABLE . "
WHERE cash_enabled = 1 AND cash_postdisplay = 1
ORDER BY cash_order ASC";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Could not obtain Cash Mod information.", '', __LINE__, __FILE__, $sql);
}
while ( $row = $db->sql_fetchrow($result) )
{
$cash_data[] = $row;
$cash_field .= $row['cash_dbfield'] . ", ";
}
}
注意二:
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/viewtopic_body.tpl