موديل العاب عشوائيه جافا سكربت لسكربت الالعاب onarcade
المبرمج : Hans مبرمج الـ
onarcade ونعم المبرمج
نوع الموديل : يعرض العاب عشوائيه بتقنية الاجاكس
مثال عليه بالصورهـ :
او امثله من هنا
http://www.l3b-bnat.com/
او
http://game.al-jro7.com/
طريقة التركيب install
1- احفظ كل نسخه يتم العمل عليها ’ لكي لايحدث اي خطاء ان شاءالله ’
حمل من المرفقات الموديل
ارفع ملف game_scroller.js
jscripts/game_scroller.js <~ زي هالمسار
بعدها نفتح ملف : index.php
ابحث :
رمز PHP:
<code style="white-space:nowrap"> <code> write_cache('main_'. $session->info['status'], $main); // Write cache file
</code> </code>
اضف بعدها :
رمز PHP:
<code style="white-space:nowrap"> <code>
// get random games
$random_query = mysql_query('SELECT fileid, title, icon, iconlocation FROM '. $tbl_prefix .'files WHERE status = \'1\' ORDER BY RAND() LIMIT 20');
$main['random'] = array();
while ($random_row = mysql_fetch_assoc($random_query)) {
$main['random'][] = array($random_row['title'], fileurl($random_row['fileid'], $random_row['title'], file_image_url($random_row['icon'], $random_row['iconlocation']);
}
$main['random'] = json_encode($main['random']
</code> </code>
واحفظ ..
الان
اذهب الى القوالب + تعديل على القالب template الافتراضي لموقعك
ثم الى : main.template.php
ضيف هذا المتغير
رمز PHP:
<code style="white-space:nowrap"> <code> , $main
</code> </code>
في الـ index
ثم ابحث عن :
رمز PHP:
<code style="white-space:nowrap"> <code> {[load_template:files_index]}
</code> </code>
اضف بعدها :
رمز PHP:
<code style="white-space:nowrap"> <code> <div id="games_scroller"><img src="http://www.forum.ssdaa.com/images/load.gif" /></div>
<script type="text/javascript" src="{[var:$settings['siteurl']]}/jscripts/games_scroller.js"></script>
<script type="text/javascript">
var game_scroller = new game_scroller();
game_scroller.files = {[var:$main['random']]};
game_scroller.width = {[var:$settings['image_width']]} ;
game_scroller.height = {[var:$settings['image_height']] };
game_scroller.init();
</script>
</code> </code>
الان احفظ من الاسفل
اذهب الى style.css
اضف في اخرهـ
رمز PHP:
<code style="white-space:nowrap"> <code> #games_scroller {
position: relative;
border: 1px solid #0099CC;
background: #FFFFFF;
margin-bottom: 4px;
overflow: hidden;
}
#games_scroller img {
margin: 4px;
border: 0;
}
#games_scroller li img {
margin-right: 0px;
}
#games_scroller ul {
display: block;
position: absolute;
width: 1000px;
list-style: none;
padding: 0;
margin: 0;
}
#games_scroller li {
float: left;
display: block;
padding: 0;
margin: 0;
}
#games_scroller .title {
display: none;
position: absolute;
padding: 4px;
background: #000;
color: #FFF;
font-weight: bold;
font-size: 11px;
opacity: 0.75;
filter: alpha(opacity=75);
z-index: 10;
}
</code> </code>
الان نضف الكاش للموقع
الموضوع الاصل من شرح طريقةي
هنا
رجاء ذكر المصدر
http://www.forum.ssdaa.com/ssdaa-130...cade#post64517
مجرب على سكربتات
مرخصه غير مرخص مادري عنه ~
الموديل مضاف افتراضي في النسخه 2.3 للعلم فقط الجديده