السلام عليكم ورحمة الله
رجاء اذا حد عنده هاك أخر 10 مواضيع يعرض خارج المنتدى يقوم بوضعه
إصدار 3.7
وشكراً للجميع
السلام عليكم ورحمة الله
رجاء اذا حد عنده هاك أخر 10 مواضيع يعرض خارج المنتدى يقوم بوضعه
إصدار 3.7
وشكراً للجميع
__________________
Elostora.com For Advanced Web Solutions
Website : www.elostora.com
Email:info At elostora.com
Mobile :002 0123554952
تفضل هذا
http://www.swalif.net/softs/swalif58/softs210832/
ايضآ انا شرحت طريقه من قبل طلب من عضو هنا في سوالف اذا ماشتغل معاك ولو تريد التي انا عدلت عليه ابحث ليك
بارك الله فيك
ولكن أنا جربت ده قبل كده ولم يعمل .
ياريت لو عندك غيره تفيدنى بيه , أو لو جربته ونفع معاك ياريت تبلغنى انه اشتغل معاك.
أشكرك![]()
__________________
Elostora.com For Advanced Web Solutions
Website : www.elostora.com
Email:info At elostora.com
Mobile :002 0123554952
اولآ اضف الــframe فى اى مكان تريد العرض لأخر 10 مواضيع ويمكنك التحكم بعدد المواضيع من خلال الملف + منع عرض مواضيع اقسام مثل الأدارة والمحذوفات والخ من الزوم
بسم الله
ثانيآ انشاء ملف last10.php وستقوم بعد الانتهاء من وضع الكود هذا فيه يتم رفعه الى مجلد VBكود:<div align="center"><iframe name="last10" src="http://swalif.net/vb/last10.php" frameborder="0" width="50%" height="150"></iframe> </div>
بحيث يكون
http://www.swalif.net/vb/last10.php
طبعآ مع تغير الرابط الى موقعك
الملف
كود PHP:
<?
require("includes/config.php");
$path = "includes"; // مسار ملف config.php في مجلد المنتدى
$url = "http://www.swalif.net"; // مسار موقع المنتدى
$maxthreads = "10"; // العدد الذي تريد عرضه من المواضيع في آخر المشاركات
$ob = "lastpost"; // set to one of the following: replycount , views , lastposter , title , lastpost (lastpost is most popular. it's the thread most recently replied to, then the second-to-last most recent, etc.)
$obdir = "desc"; // المجلد الذي يتم فيه الترتيب which direction to sort? "desc" goes from bottom to top (9 to 1, z to a, etc.). "asc" goes top to bottom (1 to 9, a to z, etc.). if you use lastpost for $ob, leave this set to desc or it will not work correctly!
$lastposter = "1"; // عرض آخر كاتبshow last poster? 1 = yes; 0 = no
$replies = "0"; // عرض إحصاء الرد show reply count? 1 = yes; 0 = no
$lastpostdate = "0"; // عرض تاريخ ووقت آخر رد show last post date and time? 1 = yes; 0 = no
$len = 25 ; // أقصى عدد من الاحرف لعرضها في الموضوع maximum number of characters of the title to show. e.g. if the title is 60 characters and this is set to 25, only the first 25 characters of the title will be shown (followed by ...)
$excludeforums = ""; // if you want to exclude a forum, put it's ID here. more than one, seperate them with commas, NO SPACES! e.g. 1,2,3,4
$includeforums = ""; // إذا تريد تحديد منتدى معين ضع رقمه هنا if you only want to include certain forums, put their ids here. separate more than one with commas, NO SPACES! e.g. 1,2,3,4
$db = mysql_connect($config['MasterServer']['servername'], $config['MasterServer']['username'], $config['MasterServer']['password']) or die("Could not connect");
mysql_select_db($config['Database']['dbname'], $db) or die("غير قادر على الاتصال بقاعدة البيانات");
$hfs = $fs+2;
$fs .= "pt";
$hfs .= "pt";
$wheresql = "WHERE thread.lastposter=user.username AND thread.open!='10'";
// we can't have both the last 24 hours *and* the last 7 days, so error out if needed
if ($last24 == "1" && $last7 == "1") {
print("Error: \$last24 and \$last7 are both set to 1. Please change one of them to 0.");
exit;
}
// otherwise we're gonna find out which one it is
// last 24
if ($last24 == "1") {
$time = time()-86400;
$wheresql .= " AND thread.lastpost>'$time'";
}
// last 7
if ($last7 == "1") {
$time = time()-604800;
$wheresql .= " AND thread.lastpost>'$time'";
}
// are we trying to exclude *and* include forums? if so, error out
if ($excludeforums != "" && $includeforums != "") {
print("Error: \$includeforums and \$excludeforums are both set with numbers. Please remove the numbers from <b>one</b> of these two to proceed.");
exit;
}
if ($includeforums == "" or $includeforums <= "0") {
$quarter = "no";
} else {
$incfid = explode(",",$includeforums); $i = 0; $a = count($incfid);
if ($a > 1) {
$wheresql .= " AND (thread.forumid='$incfid[0]'";
++$i;
while ($i < $a) {
$wheresql .= " OR thread.forumid='$incfid[$i]'"; ++$i;
}
$wheresql .= ")";
} else {
$wheresql .= " AND thread.forumid='$incfid[$i]'";
}
}
if ($excludeforums == "" or $excludeforums <= "0") {
$quarter = "no";
} else {
$excfid = explode(",",$excludeforums); $i = 0; $a = count($excfid);
while ($i < $a) {
$wheresql .= " AND thread.forumid!='$excfid[$i]'"; ++$i;
}
}
$query = "SELECT thread.lastpost,thread.title,thread.lastposter,thread.replycount,thread.views,user.userid,thread.threadid,thread.forumid,thread.iconid FROM thread,user $wheresql ORDER BY thread.$ob $obdir LIMIT $maxthreads";
$tr = mysql_query($query) or die("MySQL reported this error while trying to retreive the info: ".mysql_error());
$dtf = mysql_query("SELECT value FROM setting WHERE varname='dateformat' OR varname='timeformat' OR varname='timeoffset' ORDER BY varname");
$df = mysql_result($dtf,0,0);
$tf = mysql_result($dtf,1,0);
$tof = mysql_result($dtf,2,0);
while ($threads = mysql_fetch_array($tr)) {
echo " <a href=\"$url/showthread.php?=$session[sessionhash]&threadid=$threads[threadid]&goto=newpost\" title=\"$threads[title]\" target=_blank><font color=\"#000000\">$threads[title]</font></a>";
echo "<br/>";
}
?>
الموضوع هذا بيفيدك
http://www.swalif.net/softs/swalif59/softs202046/
مبدعنا احمد
هل يوجد بدون ifream ؟
__________________
سبحان الله ... اللهم اني استغفرك و اتوب الليك
سيرفرات موقعي على ليكود ويب
بارك الله فيك يا أحمد
لكن هذا شريط مواضيع بالطريقة المتحركة المعتاده
عموما قمت بوضعه فى marquee
كالأتى :
كود PHP:
<?
require("includes/config.php");
$path = "includes"; // مسار ملف config.php في مجلد المنتدى
$url = "http://127.0.0.1/vb372"; // مسار موقع المنتدى
$maxthreads = "10"; // العدد الذي تريد عرضه من المواضيع في آخر المشاركات
$ob = "lastpost"; // set to one of the following: replycount , views , lastposter , title , lastpost (lastpost is most popular. it's the thread most recently replied to, then the second-to-last most recent, etc.)
$obdir = "desc"; // المجلد الذي يتم فيه الترتيب which direction to sort? "desc" goes from bottom to top (9 to 1, z to a, etc.). "asc" goes top to bottom (1 to 9, a to z, etc.). if you use lastpost for $ob, leave this set to desc or it will not work correctly!
$lastposter = "1"; // عرض آخر كاتبshow last poster? 1 = yes; 0 = no
$replies = "0"; // عرض إحصاء الرد show reply count? 1 = yes; 0 = no
$lastpostdate = "0"; // عرض تاريخ ووقت آخر رد show last post date and time? 1 = yes; 0 = no
$len = 25 ; // أقصى عدد من الاحرف لعرضها في الموضوع maximum number of characters of the title to show. e.g. if the title is 60 characters and this is set to 25, only the first 25 characters of the title will be shown (followed by ...)
$excludeforums = ""; // if you want to exclude a forum, put it's ID here. more than one, seperate them with commas, NO SPACES! e.g. 1,2,3,4
$includeforums = ""; // إذا تريد تحديد منتدى معين ضع رقمه هنا if you only want to include certain forums, put their ids here. separate more than one with commas, NO SPACES! e.g. 1,2,3,4
$db = mysql_connect($config['MasterServer']['servername'], $config['MasterServer']['username'], $config['MasterServer']['password']) or die("Could not connect");
mysql_select_db($config['Database']['dbname'], $db) or die("غير قادر على الاتصال بقاعدة البيانات");
$hfs = $fs+2;
$fs .= "pt";
$hfs .= "pt";
$wheresql = "WHERE thread.lastposter=user.username AND thread.open!='10'";
// we can't have both the last 24 hours *and* the last 7 days, so error out if needed
if ($last24 == "1" && $last7 == "1") {
print("Error: \$last24 and \$last7 are both set to 1. Please change one of them to 0.");
exit;
}
// otherwise we're gonna find out which one it is
// last 24
if ($last24 == "1") {
$time = time()-86400;
$wheresql .= " AND thread.lastpost>'$time'";
}
// last 7
if ($last7 == "1") {
$time = time()-604800;
$wheresql .= " AND thread.lastpost>'$time'";
}
// are we trying to exclude *and* include forums? if so, error out
if ($excludeforums != "" && $includeforums != "") {
print("Error: \$includeforums and \$excludeforums are both set with numbers. Please remove the numbers from <b>one</b> of these two to proceed.");
exit;
}
if ($includeforums == "" or $includeforums <= "0") {
$quarter = "no";
} else {
$incfid = explode(",",$includeforums); $i = 0; $a = count($incfid);
if ($a > 1) {
$wheresql .= " AND (thread.forumid='$incfid[0]'";
++$i;
while ($i < $a) {
$wheresql .= " OR thread.forumid='$incfid[$i]'"; ++$i;
}
$wheresql .= ")";
} else {
$wheresql .= " AND thread.forumid='$incfid[$i]'";
}
}
if ($excludeforums == "" or $excludeforums <= "0") {
$quarter = "no";
} else {
$excfid = explode(",",$excludeforums); $i = 0; $a = count($excfid);
while ($i < $a) {
$wheresql .= " AND thread.forumid!='$excfid[$i]'"; ++$i;
}
}
$query = "SELECT thread.lastpost,thread.title,thread.lastposter,thread.replycount,thread.views,user.userid,thread.threadid,thread.forumid,thread.iconid FROM thread,user $wheresql ORDER BY thread.$ob $obdir LIMIT $maxthreads";
$tr = mysql_query($query) or die("MySQL reported this error while trying to retreive the info: ".mysql_error());
$dtf = mysql_query("SELECT value FROM setting WHERE varname='dateformat' OR varname='timeformat' OR varname='timeoffset' ORDER BY varname");
$df = mysql_result($dtf,0,0);
$tf = mysql_result($dtf,1,0);
$tof = mysql_result($dtf,2,0);
while ($threads = mysql_fetch_array($tr)) {
echo " <marquee onmouseover=this.stop() onmouseout=this.start() dir=\"rtl\" direction=\"right\" scrolldelay=\"80\" > <a href=\"$url/showthread.php?=$session[sessionhash]&threadid=$threads[threadid]&goto=newpost\" title=\"$threads[title]\" target=_blank><font color=\"#000000\">$threads[title]</font></a></marquee>
";
}
?>
ولكن يعرض المواضيع كل موضوع فى سطر منفصل .
أتمنى ضبطه ليعرضها كالطريقة المعتادة فى المنتديات حيث أنه شريط متحرك . أو وضعه قبل ما تعدله
وشكراً جزيلاً لك .
__________________
Elostora.com For Advanced Web Solutions
Website : www.elostora.com
Email:info At elostora.com
Mobile :002 0123554952
بالتوفيق لكم حبيبي واتمني تكون الفكرة وصلت لكم بوضوح وهذا هي الطريق بحيث تم سد الثغرات فهو من برمجتي ...![]()
أبو حميد , مش هسيبك
أتمنى ترى أخر جزء من ردى السابق , فأنا أريده متحرك وليس ثابت .
شاكر جدا لك
__________________
Elostora.com For Advanced Web Solutions
Website : www.elostora.com
Email:info At elostora.com
Mobile :002 0123554952
ماخذت بالي من الطلب تفضل
كود:<? require("includes/config.php"); /////////////// CONFIG /////////////// // // لا تضع علامة ( / ) عند تحديد المسارات $path = "includes"; // مسار ملف config.php في مجلد المنتدى $url = "http://localhost/vb"; // مسار موقع المنتدى $maxthreads = "10"; // العدد الذي تريد عرضه من المواضيع في آخر المشاركات $ob = "lastpost"; // set to one of the following: replycount , views , lastposter , title , lastpost (lastpost is most popular. it's the thread most recently replied to, then the second-to-last most recent, etc.) $obdir = "desc"; // المجلد الذي يتم فيه الترتيب which direction to sort? "desc" goes from bottom to top (9 to 1, z to a, etc.). "asc" goes top to bottom (1 to 9, a to z, etc.). if you use lastpost for $ob, leave this set to desc or it will not work correctly! $lastthreader = "1"; // عرض آخر كاتبshow last poster? 1 = yes; 0 = no $replies = "0"; // عرض إحصاء الرد show reply count? 1 = yes; 0 = no $lastthreaddate = "0"; // عرض تاريخ ووقت آخر رد show last post date and time? 1 = yes; 0 = no $len = 25 ; // أقصى عدد من الاحرف لعرضها في الموضوع maximum number of characters of the title to show. e.g. if the title is 60 characters and this is set to 25, only the first 25 characters of the title will be shown (followed by ...) $excludeforums = ""; // if you want to exclude a forum, put it's ID here. more than one, seperate them with commas, NO SPACES! e.g. 1,2,3,4 $includeforums = ""; // إذا تريد تحديد منتدى معين ضع رقمه هنا if you only want to include certain forums, put their ids here. separate more than one with commas, NO SPACES! e.g. 1,2,3,4 // /////////////// CONFIG /////////////// echo "<marquee dir=\"rtl\" direction=\"right\" scrolldelay=\"120\" height=30 scrollAmount=5 onmouseover=this.stop() onmouseout=this.start()><FONT SIZE=\"1\" FACE=\"MS Sans Serif\"><font color=\"#FF0000\">آخر مواضيع المنتدى:>>> "; $db = mysql_connect($config['MasterServer']['servername'], $config['MasterServer']['username'], $config['MasterServer']['password']) or die("Could not connect"); mysql_select_db($config['Database']['dbname'], $db) or die("غير قادر على الاتصال بقاعدة البيانات"); $hfs = $fs+2; $fs .= "pt"; $hfs .= "pt"; // the base WHERE statement $wheresql = "WHERE thread.lastposter=user.username AND thread.open!='10'"; // we can't have both the last 24 hours *and* the last 7 days, so error out if needed if ($last24 == "1" && $last7 == "1") { print("Error: \$last24 and \$last7 are both set to 1. Please change one of them to 0."); exit; } // otherwise we're gonna find out which one it is // last 24 if ($last24 == "1") { $time = time()-86400; $wheresql .= " AND thread.lastpost>'$time'"; } // last 7 if ($last7 == "1") { $time = time()-604800; $wheresql .= " AND thread.lastpost>'$time'"; } // are we trying to exclude *and* include forums? if so, error out if ($excludeforums != "" && $includeforums != "") { print("Error: \$includeforums and \$excludeforums are both set with numbers. Please remove the numbers from <b>one</b> of these two to proceed."); exit; } // otherwise figure out which one we're using // include forums if ($includeforums == "" or $includeforums <= "0") { $quarter = "no"; } else { $incfid = explode(",",$includeforums); $i = 0; $a = count($incfid); if ($a > 1) { $wheresql .= " AND (thread.forumid='$incfid[0]'"; ++$i; while ($i < $a) { $wheresql .= " OR thread.forumid='$incfid[$i]'"; ++$i; } $wheresql .= ")"; } else { $wheresql .= " AND thread.forumid='$incfid[$i]'"; } } // or exclude forums if ($excludeforums == "" or $excludeforums <= "0") { $quarter = "no"; } else { $excfid = explode(",",$excludeforums); $i = 0; $a = count($excfid); while ($i < $a) { $wheresql .= " AND thread.forumid!='$excfid[$i]'"; ++$i; } } // ooh a query! $query = "SELECT thread.lastpost,thread.title,thread.lastposter,thread.replycount,thread.views,user.userid,thread.threadid,thread.forumid,thread.iconid FROM thread,user $wheresql ORDER BY thread.$ob $obdir LIMIT $maxthreads"; // let's get the info $tr = mysql_query($query) or die("MySQL reported this error while trying to retreive the info: ".mysql_error()); $dtf = mysql_query("SELECT value FROM setting WHERE varname='dateformat' OR varname='timeformat' OR varname='timeoffset' ORDER BY varname"); $df = mysql_result($dtf,0,0); $tf = mysql_result($dtf,1,0); $tof = mysql_result($dtf,2,0); // let's display the info while ($threads = mysql_fetch_array($tr)) { echo " <font color=\"#58591B\">الموضوع:</font> <a href=\"$url/showthread.php?=$session[sessionhash]&threadid=$threads[threadid]&goto=newpost\" title=\"$threads[title]\" target=_blank><font color=\"#000000\">$threads[title]</font></a> ( أخر رد : $threads[lastposter] )<font color=\"#000000\"> <<::>> </font>"; } // bye ahmed-samara ?>
واوب حميد انا بعداريده من دون ifream هل تقدر ؟
__________________
سبحان الله ... اللهم اني استغفرك و اتوب الليك
سيرفرات موقعي على ليكود ويب
أخي secret ياريت لو توضح اكثر
مشكور جداً , وبارك الله فيك على المساعدة .
__________________
Elostora.com For Advanced Web Solutions
Website : www.elostora.com
Email:info At elostora.com
Mobile :002 0123554952
secret
ووووضح ياغالي ورد علينا عبرنا
الكاهن الأخير
انت تأمر امر يابعدي![]()