Kayıt: Mar 26, 2009 Mesajlar: 36 Konum: dünyada bir yer
Tarih: 2010-03-15, 01:05:34 Mesaj konusu: nuke 7.7 patch 3.3 te news modülü sayfa numaralndırma sorunu
selamlar. nuke 7.7 3.3(patc) kullanıyorum. resim eklemeli haber bloğu ekledim ancak sayfa numaralandırma yapamıyorum. forumda aradım. hepsini uyguladım ama olmuyor index dosyam aşağıdadır..
<php>sql_query("SELECT topictext FROM ".$prefix."_topics WHERE topicid='$new_topic'");
$row_a = $db->sql_fetchrow($result_a);
$numrows_a = $db->sql_numrows($result_a);
$topic_title = stripslashes(check_html($row_a['topictext'], "nohtml"));
OpenTable();
if ($numrows_a == 0) {
echo "<center><font>$sitename</font><br><br>"._NOINFO4TOPIC."<br><br>[ <a href="modules.php?name=News\">"._GOTONEWSINDEX."</a> | <a href="modules.php?name=Topics\">"._SELECTNEWTOPIC."</a> ]</center>";
} else {
$db->sql_query("UPDATE ".$prefix."_topics SET counter=counter+1");
echo "<center><font>$sitename: $topic_title</font><br><br>"
."<form action=\"modules.php?name=Search\" method=\"post\">"
."<input>"
.""._SEARCHONTOPIC.": <input> "
."<input>"
."</form>"
."[ <a href="index.php\">"._GOTOHOME."</a> | <a href="modules.php?name=Topics\">"._SELECTNEWTOPIC."</a> ]</center>";
}
CloseTable();
echo "<br>";
}
$result = $db->sql_query("SELECT sid, catid, aid, title, time, hometext, bodytext, resim, comments, counter, topic, informant, notes, acomm, score, ratings FROM ".$prefix."_stories $qdb $querylang ORDER BY sid DESC limit $storynum");
while ($row = $db->sql_fetchrow($result)) {
$s_sid = intval($row['sid']);
$catid = intval($row['catid']);
$aid = stripslashes($row['aid']);
$title = stripslashes(check_html($row['title'], "nohtml"));
$time = $row['time'];
$hometext = stripslashes($row['hometext']);
$bodytext = stripslashes($row['bodytext']);
$resim = ($row['resim']);
$comments = stripslashes($row['comments']);
$counter = intval($row['counter']);
$topic = intval($row['topic']);
$informant = stripslashes($row['informant']);
$notes = stripslashes($row['notes']);
$acomm = intval($row['acomm']);
$score = intval($row['score']);
$ratings = intval($row['ratings']);
if ($catid > 0) {
$row2 = $db->sql_fetchrow($db->sql_query("SELECT title FROM ".$prefix."_stories_cat WHERE catid='$catid'"));
$cattitle = stripslashes(check_html($row2['title'], "nohtml"));
}
getTopics($s_sid);
formatTimestamp($time);
$subject = stripslashes(check_html($subject, "nohtml"));
$introcount = strlen($hometext);
$fullcount = strlen($bodytext);
$totalcount = $introcount + $fullcount;
$c_count = $comments;
$r_options = "";
if (isset($c o o k i e[4])) { $r_options .= "&mode=$c o o k i e[4]"; }
if (isset($c o o k i e[5])) { $r_options .= "&order=$c o o k i e[5]"; }
if (isset($c o o k i e[6])) { $r_options .= "&thold=$c o o k i e[6]"; }
$story_link = "<a href="modules.php?name=News&file=article&sid=$s_sid$r_options\">";
$morelink = "";
if ($fullcount > 0 OR $c_count > 0 OR $articlecomm == 0 OR $acomm == 1) {
$morelink .= "$story_link<b>"._READMORE."</b></a> | ";
} else {
$morelink .= "";
}
if ($fullcount > 0) { $morelink .= "$totalcount "._BYTESMORE." | "; }
if ($articlecomm == 1 AND $acomm == 0) {
if ($c_count == 0) { $morelink .= "$story_link"._COMMENTSQ."</a>"; } elseif ($c_count == 1) { $morelink .= "$story_link$c_count "._COMMENT."</a>"; } elseif ($c_count > 1) { $morelink .= "$story_link$c_count "._COMMENTS."</a>"; }
}
$sid = intval($s_sid);
if ($catid != 0) {
$row3 = $db->sql_fetchrow($db->sql_query("SELECT title FROM ".$prefix."_stories_cat WHERE catid='$catid'"));
$title1 = stripslashes(check_html($row3['title'], "nohtml"));
$title = "<a href="modules.php?name=News&file=categories&op=newindex&catid=$catid\"><font>$title1</font></a>: $title";
$morelink .= " | <a href="modules.php?name=News&file=categories&op=newindex&catid=$catid\">$title1</a>";
}
if ($score != 0) {
$rated = substr($score / $ratings, 0, 4);
} else {
$rated = 0;
}
$morelink .= " | "._SCORE." $rated";
$morelink .= ")";
$morelink = str_replace(" | | ", " | ", $morelink);
themeindex($aid, $informant, $datetime, $title, $counter, $topic, $hometext, $notes, $morelink, $topicname, $topicimage, $topictext, $resim);
}
include("footer.php");
}
function rate_article($sid, $score, $random_num="0", $gfx_check) {
global $prefix, $db, $ratec o o k i e, $sitename, $r_options, $sitekey, $gfx_chk, $module_name;
if (isset($random_num)) {
$datekey = date("F j");
$rcode = hexdec(md5($_SERVER[HTTP_USER_AGENT] . $sitekey . $random_num . $datekey));
$code = substr($rcode, 2, 3);
if (extension_loaded("gd") AND $code != $gfx_check AND $gfx_chk != 0) {
mt_srand ((double)microtime()*1000000);
$maxran = 1000000;
$random_num = mt_rand(0, $maxran);
include("header.php");
title("$sitename: "._ARTICLERATING."");
OpenTable();
$row = $db->sql_fetchrow($db->sql_query("SELECT title FROM ".$prefix."_stories WHERE sid='$sid'"));
echo "<center><a href="modules.php?name=$module_name&file=article&sid=$sid$r_options\"><b>$row[title]</b></a><br>"._ARTICLERATING.": <img src=\"images/articles/stars-$score.gif\" border=\"0\" alt=\"$score/5\" title=\"$score/5\"> ($score/5)<br><br>";
echo ""._TOFINISHRATINGERROR."<br><br>";
echo "<form action=\"modules.php?name=$module_name\" method=\"post\">";
echo ""._SECURITYCODE.":<br><img src='?gfx=gfx_little&random_num=$random_num' border='1' alt='"._SECURITYCODE."' title='"._SECURITYCODE."'><br><br>\n";
echo ""._TYPESECCODE.":<br><input><br>\n";
echo "<input><br>\n";
echo "<input><br>\n";
echo "<input>\n";
echo "<input>";
echo "<input></font></center></form>";
CloseTable();
include("footer.php");
die();
} else {
$score = intval($score);
$sid = intval($sid);
if ($score) {
if ($score > 5) { $score = 5; }
if ($score <1>sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_stories WHERE sid='$sid' AND rating_ip='$ip'"));
if ($num != 0) {
Header("Location: modules.php?name=News&op=rate_complete&sid=$sid&rated=1");
die();
}
if (isset($ratec o o k i e)) {
$rc o o k i e = base64_decode($ratec o o k i e);
$rc o o k i e = addslashes($rc o o k i e);
$r_c o o k i e = explode(":", $rc o o k i e);
}
for ($i=0; $i <sizeof>sql_query("update ".$prefix."_stories set score=score+$score, ratings=ratings+1, rating_ip='$ip' where sid='$sid'");
$info = base64_encode("$rc o o k i e$sid:");
setc o o k i e("ratec o o k i e","$info",time()+86400);
update_points(7);
Header("Location: modules.php?name=News&op=rate_complete&sid=$sid&score=$score");
}
} else {
include("header.php");
title("$sitename: "._ARTICLERATING."");
OpenTable();
echo "<center>"._DIDNTRATE."<br><br>"
.""._GOBACK."</center>";
CloseTable();
include("footer.php");
}
}
} else {
mt_srand ((double)microtime()*1000000);
$maxran = 1000000;
$random_num = mt_rand(0, $maxran);
if (extension_loaded("gd") AND $gfx_chk != 0 ) {
include("header.php");
title("$sitename: "._ARTICLERATING."");
OpenTable();
$row = $db->sql_fetchrow($db->sql_query("SELECT title FROM ".$prefix."_stories WHERE sid='$sid'"));
echo "<center><a href="modules.php?name=$module_name&file=article&sid=$sid$r_options\"><b>$row[title]</b></a><br>"._ARTICLERATING.": <img src=\"images/articles/stars-$score.gif\" border=\"0\" alt=\"$score/5\" title=\"$score/5\"> ($score/5)<br><br>";
echo ""._TOFINISHRATING."<br><br>";
echo "<form action=\"modules.php?name=$module_name\" method=\"post\">";
echo ""._SECURITYCODE.":<br><img src='?gfx=gfx_little&random_num=$random_num' border='1' alt='"._SECURITYCODE."' title='"._SECURITYCODE."'><br><br>\n";
echo ""._TYPESECCODE.":<br><input><br>\n";
echo "<input><br>\n";
echo "<input><br>\n";
echo "<input>\n";
echo "<input>";
echo "<input></font></center></form>";
CloseTable();
include("footer.php");
} else {
$random_num = "$random_num";
$gfx_check = "$code";
Header("Location: modules.php?name=$module_name&op=rate_article&sid=$sid&score=$score&random_num=$random_num");
}
}
}
function rate_complete($sid, $rated=0, $score) {
global $sitename, $user, $c o o k i e, $module_name;
$r_options = "";
if (is_user($user)) {
if (isset($c o o k i e[4])) { $r_options .= "&mode=$c o o k i e[4]"; }
if (isset($c o o k i e[5])) { $r_options .= "&order=$c o o k i e[5]"; }
if (isset($c o o k i e[6])) { $r_options .= "&thold=$c o o k i e[6]"; }
}
include("header.php");
title("$sitename: "._ARTICLERATING."");
OpenTable();
if ($rated == 0) {
$row = $db->sql_fetchrow($db->sql_query("SELECT title FROM ".$prefix."_stories WHERE sid='$sid'"));
echo "<center><a href="modules.php?name=$module_name&file=article&sid=$sid$r_options\"><b>$row[title]</b></a><br>"._YOURATEDARTICLE.": <img src=\"images/articles/stars-$score.gif\" border=\"0\" alt=\"$score/5\" title=\"$score/5\"> ($score/5)<br><br>";
echo "<center>"._THANKSVOTEARTICLE."<br><br>"
."[ <a href="modules.php?name=$module_name&file=article&sid=$sid$r_options\">"._BACKTOARTICLEPAGE."</a> ]</center>";
} elseif ($rated == 1) {
echo "<center>"._ALREADYVOTEDARTICLE."<br><br>"
."[ <a href="modules.php?name=$module_name&file=article&sid=$sid$r_options\">"._BACKTOARTICLEPAGE."</a> ]</center>";
}
CloseTable();
include("footer.php");
}
switch ($op) {
default:
theindex($new_topic);
break;
case "rate_article":
rate_article($sid, $score, $random_num, $gfx_check);
break;
case "rate_complete":
rate_complete($sid, $rated, $score);
break;
Bu forumda yeni başlıklar açamazsınız Bu forumdaki başlıklara cevap veremezsiniz Bu forumdaki mesajlarınızı değiştiremezsiniz Bu forumdaki mesajlarınızı silemezsiniz Bu forumdaki anketlerde oy kullanamazsınız