- الرئيسية
- ما الجديد !
-
الصفحات▼
الصفحات
أهلا وسهلا بك زائرنا الكريم في منتدى دعم PBBoard الرسمي، لكي تتمكن من المشاركة ومشاهدة جميع أقسام المنتدى وكافة الميزات ، يجب عليك إنشاء حساب جديد بالتسجيل بالضغط هنا أو تسجيل الدخول اضغط هنا إذا كنت عضواً .
استفسار لتعديل البوابة
-
-
استفسار لتعديل البوابة14-07-2015 09:20 صباحاً
-
Mr Kingمعلومات الكاتبعضو
- انضم في :
- 27-11-2012
- رقم العضوية :
- 2642
- المشاركات :
- 3240
- الدولة :
- morocco
- الجنس:
- تاريخ الميلاد :
- 1-1-1987
- الدعوات:
- 6
- قوة السمعة:
- 18910
-
هذا هو التعديل الصحيح لمحتوى القالب
CODE<div class="view-cnt"> <div id="list" class="list"></div> <div id="grid" class="grid"></div> </div> <div class="clear"></div> <div class="show-way pody-cont-list" align="center"> <ul> {Des::while}{LastNews_subjectList} <?php $writer= $PowerBB->_CONF['template']['while']['LastNews_subjectList'][$this->x_loop]['writer']; $Info_writer = $PowerBB->DB->sql_query("SELECT * FROM " . $PowerBB->table['member'] . " WHERE username = '$writer'"); $InfoWriter = @mysql_fetch_array($Info_writer); $avater_path = $InfoWriter['avater_path']; ?> <li class="thead"> <?php $PowerBB->_CONF['template']['while']['LastNews_subjectList'][$this->x_loop]['title'] = $PowerBB->Powerparse->censor_words($PowerBB->_CONF['template']['while']['LastNews_subjectList'][$this->x_loop]['title']);?> <span class="l-left"> <font class="smallfont"> {$lang['SubjectVisitor']}: ({$LastNews_subjectList['visitor']}) {$lang['Comments']}: ({$LastNews_subjectList['reply_number']}) </font> </span> <span class="r-right"> <img border="0" alt="{$LastNews_subjectList['title']}" src="{$LastNews_subjectList['icon']}" /> <a href="index.php?page=topic&show=1&id={$LastNews_subjectList['id']}"> {$LastNews_subjectList['title']} </a> </span> </li> <li class="blocks_info"> <span class="l-left"> <font class="smallfont"> {$LastNews_subjectList['write_date']} </font> </span> <span class="r-right"> <img border="0" src="look/portal/images/news_icon.gif" alt="Writer" /> {$lang['LastsPostsWriter']} <a href="index.php?page=profile&show=1&id=<?php echo $InfoWriter['id']; ?>"> {$LastNews_subjectList['writer']} </a> </span> </li> <li class="blocks_info" valign="top"> <span class="l-left UserPhoto"> <?php if ($avater_path){ ?> <a href='<?php echo $avater_path; ?>' rel="facebox"> <img src='<?php echo $avater_path; ?>' alt="Photo" onload="ResizeAv(this)" /> </a> <?php if ($avater_path ==''){ ?> <a href="{$image_path}/ {$_CONF['info_row']['default_avatar']}" rel="facebox"> <img src="{$image_path}/ {$_CONF['info_row']['default_avatar']}" border="0" alt="Photo" onload="ResizeAv(this)" /> </a> {/if} {else} <a href="{$image_path}/ {$_CONF['info_row']['default_avatar']}" rel="facebox"> <img src="{$image_path}/ {$_CONF['info_row']['default_avatar']}" border="0" onload="ResizeAv(this)" /> </a> {/if} </span> <?php $num = $PowerBB->_CONF['template']['_CONF']['info_row']['portal_news_along']; $text1 = $PowerBB->_CONF['template']['while']['LastNews_subjectList'][$this->x_loop]['text']; $text1 = strip_tags($text1); $text1 = str_replace('<br>',"",$text1); $text1 = str_replace('',"",$text1); $text1 = $PowerBB->Powerparse->censor_words($text1); $text1 = $PowerBB->functions->words_count($text1,$num); echo $text1; ?> ... <span class="r-right"> <a href="index.php?page=topic&show=1&id={$LastNews_subjectList['id']}"> <img border="0" src="look/portal/images/read_more_button.png" alt="readmore"> </a> </span> </li> <li class="smbox"> </li> {/Des::while} </ul> {if {$PagerLastNews}} <ul> <li class="blocks_info"> <span class="r-right"> {$PagerLastNews} </span> </li> </ul> {/if} </div> <?php $t= 0;?> <div class="show-way pody-cont-grid" align="center"> <table border="0" width="100%" cellpadding="0" style="border-collapse: collapse" align="center"><tr> {Des::while}{LastNews_subjectList} <?php if ($PowerBB->_CONF['info_row']['portal_columns'] == '1' ) { $columns_News = "3"; } else { $columns_News = "2"; } if($t== $columns_News){ $t=0; echo "</tr><tr>"; } ?> <td valign="top"> <ul> <li class="LastNews-tabclear" valign="top"> <?php $PowerBB->_CONF['template']['while']['LastNews_subjectList'][$this->x_loop]['title'] = $PowerBB->Powerparse->censor_words($PowerBB->_CONF['template']['while']['LastNews_subjectList'][$this->x_loop]['title']); $title = $PowerBB->_CONF['template']['while']['LastNews_subjectList'][$this->x_loop]['title']; $num = "20"; $title = $PowerBB->functions->words_count($title,$num); ?> <a href="index.php?page=topic&show=1&id={$LastNews_subjectList['id']}" title="<?php echo $title;?>"> <?php echo $title; ?> </a> </li> <li class="rowthumb" valign="top"> <a href="index.php?page=topic&show=1&id={$LastNews_subjectList['id']}" title="<?php echo $title;?>"> <?php $x = 1; $images = array(); $PowerBB->_CONF['template']['while']['LastNews_subjectList'][$this->x_loop]['text'] = stripslashes($PowerBB->_CONF['template']['while']['LastNews_subjectList'][$this->x_loop]['text']); preg_match_all('/src=([\'"])?((?(1).*?|\S+))(?(1)\1)/', $PowerBB->_CONF['template']['while']['LastNews_subjectList'][$this->x_loop]['text'], $images); foreach ($images[2] as $src) { if($src) { echo '<img border="0" width="200" height="200" src="'.$src.'" alt="'.$PowerBB->_CONF['template']['while']['LastNews_subjectList'][$this->x_loop]['title'].'">'; } break; } if(!preg_match_all('/src=([\'"])?((?(1).*?|\S+))(?(1)\1)/', $PowerBB->_CONF['template']['while']['LastNews_subjectList'][$this->x_loop]['text'], $images)) { echo '<img border="0" width="200" height="200" src="look/portal/images/traffic_cone.png" alt="'.$PowerBB->_CONF['template']['while']['LastNews_subjectList'][$this->x_loop]['title'].'">'; } ?> </a> </li> <li class="row1" valign="top"> <?php $num = $PowerBB->_CONF['template']['_CONF']['info_row']['portal_news_along']; $text = $PowerBB->_CONF['template']['while']['LastNews_subjectList'][$this->x_loop]['text']; $text = $PowerBB->functions->words_count_replace_strip_tags_html2bb($text,$num); $text = $PowerBB->Powerparse->html2bb($text); ?> <textarea dir="{$_CONF['info_row']['content_dir']}" class="r-right" readonly="readonly"><?php echo $text; ?></textarea> </li> <li class="theadv" valign="top"> <a href="index.php?page=topic&show=1&id={$LastNews_subjectList['id']}" title="Read More"> <div id="read_more_button"> {$lang['SubjectVisitor']}: ({$LastNews_subjectList['visitor']}) {$lang['usercp_reputations']}: ({$LastNews_subjectList['rating']}) </div> </a> </li> </ul> </td> <?php $t= $t+1;?> {/Des::while} </tr> </table> {if {$PagerLastNews}} <table border="1" width="100%" cellpadding="0" style="border-collapse: collapse"><tr> <tr> <td class="row3"> <span class="r-right"> {$PagerLastNews} </span> </td> </tr> </table> {/if} </div> <div class="show-way pody-cont-example3" align="center"> </div> <div class="show-way pody-cont-example4" align="center"> </div> <div class="show-way pody-cont-example5" align="center"> </div> <div class="show-way pody-cont-example6" align="center"> </div> <div class="show-way pody-cont-example7" align="center"> </div>
وهذا كود الجافاسكربت الخاص بالانتقال من وضع لآخر وكذلك طريقة العرض الافتراضية بالكوكيز
CODE<script type="text/javascript"> function get_list(){ $(".pody-cont-list").show(800); $(".pody-cont-grid").hide(800); $(".pody-cont-example3").hide(800); $(".pody-cont-example4").hide(800); $(".pody-cont-example5").hide(800); $(".pody-cont-example6").hide(800); $(".pody-cont-example7").hide(800); } function get_grid(){ $(".pody-cont-grid").show(800); $(".pody-cont-list").hide(800); $(".pody-cont-example3").hide(800); $(".pody-cont-example4").hide(800); $(".pody-cont-example5").hide(800); $(".pody-cont-example6").hide(800); $(".pody-cont-example7").hide(800); } function get_example3(){ $(".pody-cont-example3").show(800); $(".pody-cont-grid").hide(800); $(".pody-cont-list").hide(800); $(".pody-cont-example4").hide(800); $(".pody-cont-example5").hide(800); $(".pody-cont-example6").hide(800); $(".pody-cont-example7").hide(800); } function get_example4(){ $(".pody-cont-example4").show(800); $(".pody-cont-grid").hide(800); $(".pody-cont-list").hide(800); $(".pody-cont-example3").hide(800); $(".pody-cont-example5").hide(800); $(".pody-cont-example6").hide(800); $(".pody-cont-example7").hide(800); } function get_example5(){ $(".pody-cont-example5").show(800); $(".pody-cont-grid").hide(800); $(".pody-cont-list").hide(800); $(".pody-cont-example3").hide(800); $(".pody-cont-example4").hide(800); $(".pody-cont-example6").hide(800); $(".pody-cont-example7").hide(800); } function get_example6(){ $(".pody-cont-example6").show(800); $(".pody-cont-grid").hide(800); $(".pody-cont-list").hide(800); $(".pody-cont-example3").hide(800); $(".pody-cont-example4").hide(800); $(".pody-cont-example5").hide(800); $(".pody-cont-example7").hide(800); } function get_example7(){ $(".pody-cont-example7").show(800); $(".pody-cont-grid").hide(800); $(".pody-cont-list").hide(800); $(".pody-cont-example3").hide(800); $(".pody-cont-example4").hide(800); $(".pody-cont-example5").hide(800); $(".pody-cont-example6").hide(800); } // choose Default method var cooki = "list" ; //expire cookie var d = new Date(); d.setTime(d.getTime() + (30*24*60*60*1000)); var expires = "expires="+d.toUTCString() ; //check cookie var cookieStart, cookieEnd, cookieValue; if (document.cookie.length > 0){ cookieStart = document.cookie.indexOf("view="); if (cookieStart != -1){ cookieStart = cookieStart + "view=".length; cookieEnd = document.cookie.indexOf(";", cookieStart); if (cookieEnd == -1) cookieEnd = document.cookie.length; cookieValue = document.cookie.substring(cookieStart, cookieEnd); if (cookieValue == "list"){ get_list() ; } else if (cookieValue == "grid"){ get_grid() ; } else if (cookieValue == "example3"){ get_example3() ; } else if (cookieValue == "example4"){ get_example4() ; } else if (cookieValue == "example5"){ get_example5() ; } else if (cookieValue == "example6"){ get_example6() ; } else if (cookieValue == "example7"){ get_example7() ; } } else { document.cookie = "view = " +cooki+ ";" + expires ; document.write('<META http-**="refresh" content="0;URL=http://<?php echo $PowerBB->_SERVER['HTTP_HOST'].$PowerBB->_SERVER['REQUEST_URI'] ?>">'); } } // change method $(".list").click(function(){ get_list(); document.cookie = "view=list;" + expires ; }); $(".grid").click(function(){ get_grid() ; document.cookie = "view=grid;" + expires ; }); $(".example3").click(function(){ get_example3() ; document.cookie = "view=example3;" + expires ; }); $(".example4").click(function(){ get_example4() ; document.cookie = "view=example4;" + expires ; }); $(".example5").click(function(){ get_example5() ; document.cookie = "view=example5;" + expires ; }); $(".example6").click(function(){ get_example6() ; document.cookie = "view=example6;" + expires ; }); $(".example7").click(function(){ get_example7() ; document.cookie = "view=example7;" + expires ; }); </script>
أضف هذا الكلاس مع كلاسات css
CODE<br /> .pody-cont-grid ul{<br /> margin: 0px;<br /> padding: 10px;<br /> }<br /> <br />
واحذف
CODEwidth: 212px;<br />
------------------------------------------------
ملاحظة :
سيلزم تمكين جلب مكتبة الجافاسكربت للزوار لكي تشتغل جميع أكواد الجافاسكربت
الإدارة - الاستايلات و القوالب - التحكم بالقوالب - تحرير القوالب
تحرير (من أمام القالب headinclud)
ابحث عن
CODE<?php if ($PowerBB->_GET['page']== 'register' or $PowerBB->_GET['page']== 'new_topic' or $PowerBB->_GET['page']== 'profile'){ ?> <script type="text/javascript" src="{$ForumAdress}includes/js/jquery.js"></script> <?php }else{ if ($PowerBB->_CONF['member_permission']){ ?> <script type="text/javascript" src="{$ForumAdress}includes/js/jquery.js"></script> <?php } }
استبدله ب
CODE<script type="text/javascript" src="{$ForumAdress}includes/js/jquery.js"></script> <?php
واحفظ القالب
تم تحرير المشاركة بواسطة :Mr King بتاريخ:14-07-2015 05:52 مساءً
الساعة الآن 05:14 AM