Parašė Mange· 2010 Lie. 13 12:07:53
#4
Yra toks straipsnis šiame susporte taiva aš ji parašysiu čia bet kaip aš naudoju:
Daug buvo temų su klausimais kaip į forumą įdėt reklamą po trečio ar kurio nors kito pranešimo.
Taigi parodysiu kaip tai padarysi vos keliomis eilutėmis.
P.S. Viskas tas pats ir su v7 forumu.
Pirmiausia atsidarome viewthread.php failą.
Susirandame šias eilutes:
Standartiniame fusione tai 106-120 eilutės
if ($rows != 0) {
$result = dbquery(
\"SELECT p.*, fa.attach_id, fa.attach_name, fa.attach_ext, fa.attach_size, u.*, u2.user_name AS edit_name FROM \".$db_prefix.\"posts p
LEFT JOIN \".$db_prefix.\"forum_attachments fa USING(post_id)
LEFT JOIN \".$db_prefix.\"users u ON p.post_author = u.user_id
LEFT JOIN \".$db_prefix.\"users u2 ON p.post_edituser = u2.user_id AND post_edituser > \'0\'
WHERE p.thread_id=\'$thread_id\' ORDER BY post_datestamp LIMIT $rowstart,$posts_per_page\"
);
$numrows = dbrows($result);
while ($data = dbarray($result)) {
$message = $data[\'post_message\'];
if ($data[\'post_showsig\']) { $message = $message.\"\\n\\n<hr>\".$data[\'user_sig\']; }
if ($data[\'post_smileys\']) { $message = parsesmileys($message); }
$message = parseubb($message);
$message = nl2br($message);
Ir keičiame šiomis eilutėmis:
if ($rows != 0) {
$result = dbquery(
"SELECT p.*, fa.attach_id, fa.attach_name, fa.attach_ext, fa.attach_size, u.*, u2.user_name AS edit_name FROM ".$db_prefix."posts p
LEFT JOIN ".$db_prefix."forum_attachments fa USING(post_id)
LEFT JOIN ".$db_prefix."users u ON p.post_author = u.user_id
LEFT JOIN ".$db_prefix."users u2 ON p.post_edituser = u2.user_id AND post_edituser > '0'
WHERE p.thread_id='$thread_id' ORDER BY post_datestamp LIMIT $rowstart,$posts_per_page"
);
$numrows = dbrows($result);
$postai = '0';
while ($data = dbarray($result)) {
if ($postai == '1' OR $postai == '9') {
echo "</td></tr></table>";
//reklamos modas prasideda
?><div style="clear: both; padding: 5px;"><center>
include(INFUSIONS."brotator/brotator.php");
</center></div><?
//reaklamos modas baiges
echo"<table cellpadding='0' cellspacing='1' width='100%' class='tbl-border'>"; }
$postai++;
$message = $data['post_message'];
if ($data['post_showsig']) { $message = $message."<hr>".$data['user_sig']; }
if ($data['post_smileys']) { $message = parsesmileys($message); }
$message = parseubb($message);
$message = nl2br($message);
Beto galėjai išjunkti šypseneles savo pirmam poste :) Dabar gal +10?
Redagavo Mange· 2010 Lie. 13 13:07:40