المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : فتح وغلق البلوكات mkportal



loulou ange
11-01-2013, بتوقيت غرينيتش 06:49 AM
الهاك product ينشئ ايقونه تقدرون تغيرونها براحتكم على حسب التصميم بمجرد الضغط عليها تغلق قائمة البلوك اللي ضغطتوا عليه فقط باقي البلوكات تكون مفتوحه بشكل افتراضي ...

نتجه لملف الجافا سكربت الموجود بداخل مجلد الاستايل style المستخدم

رمز PHP:

<code style="white-space:nowrap"> <code> /templates/YOURTEMPL/mkp.js



</code> </code>

نضيف له التالي =
رمز Code:
function show(name,s) { var plus = name + &quot;_open&quot;; var minus = name; minus = getObj(minus); plus = getObj(plus); minus.style.display = (s) ? 'block' : 'none'; plus.style.display = (s) ? 'none' : 'block'; }
نفتح ملف الاستايل style

رمز Code:
/templates/YOURTEMPL/tpl_main.ph
ونبحث عن تمبلت البلوكات وسبق تكلمت عنه في دورة التصميم =
رمز Code:
<!-- begin block template --> <tr> <td valign=&quot;top&quot;> <table border=&quot;0&quot; width=&quot;100%&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;> <tr> <td> <table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; width=&quot;100%&quot;> <tr> <td class=&quot;tdmenblock&quot; width=&quot;1%&quot;><img src=&quot;$mklib->images/m_sx.gif&quot; border=&quot;0&quot; class=&quot;tdmenblock&quot; alt=&quot;&quot; /> </td> <td class=&quot;sottotitolo&quot; width=&quot;99%&quot; style=&quot;background-image: url('$mklib->images/m_sf.gif')&quot; valign=&quot;middle&quot; nowrap=&quot;nowrap&quot;>{$title} </td> <td class=&quot;tdmenblock&quot; width=&quot;1%&quot;><img src=&quot;$mklib->images/m_dx.gif&quot; border=&quot;0&quot; class=&quot;tdmenblock&quot; alt=&quot;&quot; /> </td> </tr> </table> </td> </tr> <tr> <td class=&quot;tablemenu&quot; width=&quot;100%&quot;> <table border=&quot;0&quot; width=&quot;100%&quot; cellpadding=&quot;1&quot; cellspacing=&quot;1&quot;> {$content} </table> </td> </tr> <tr> <td> <table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; width=&quot;100%&quot;> <tr> <td class=&quot;tdmenblock&quot; width=&quot;1%&quot; align=&quot;right&quot; valign=&quot;top&quot;><img src=&quot;$mklib->images/m_sx2.gif&quot; class=&quot;tdmenblock&quot; alt=&quot;&quot; /> </td> <td class=&quot;tdmenblock&quot; width=&quot;99%&quot; style=&quot;background-image: url('$mklib->images/m_sf2.gif')&quot;><img src=&quot;$mklib->images/m_sf2.gif&quot; border=&quot;0&quot; class=&quot;tdmenblock&quot; alt=&quot;&quot; /> </td> <td class=&quot;tdmenblock&quot; width=&quot;1%&quot;><img src=&quot;$mklib->images/m_dx2.gif&quot; class=&quot;tdmenblock&quot; alt=&quot;&quot; /> </td> </tr> </table> </td> </tr> </table> </td> </tr> <tr> <td class=&quot;tdspacer&quot;>&nbsp; </td> </tr> <!-- end block template -->
نستبدله بالتالي =
رمز Code:
<!-- begin block template --> <tr> <td class=&quot;tablemenu&quot; valign=&quot;top&quot;> <div id='{$title}_open' style=&quot;display:none&quot;> <table border=&quot;0&quot; width=&quot;100%&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;> <tr> <td> <table class=&quot;sottotitolo&quot; border=&quot;0&quot; cellpadding=&quot;4&quot; cellspacing=&quot;0&quot; width=&quot;100%&quot;> <tr> <td width=&quot;100%&quot; class=&quot;sottotitolo&quot; valign=&quot;middle&quot; nowrap=&quot;nowrap&quot;>{$title}</td> <td width=&quot;*&quot; class=&quot;sottotitolo&quot; valign=&quot;middle&quot; nowrap=&quot;nowrap&quot;><a href=&quot;javascript:show('{$title}', true);&quot;><img src=&quot;$mklib->images/plus.gif&quot; border=&quot;0&quot; alt=&quot;Expand Block&quot;></a></td> </tr> </table> </td> </tr> </table> </div> <div id='{$title}' style=&quot;display:block&quot;> <table border=&quot;0&quot; width=&quot;100%&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;> <tr> <td> <table border=&quot;0&quot; cellpadding=&quot;4&quot; cellspacing=&quot;0&quot; width=&quot;100%&quot;> <tr> <td width=&quot;100%&quot; class=&quot;sottotitolo&quot; valign=&quot;middle&quot; nowrap=&quot;nowrap&quot;>{$title}</td> <td width=&quot;*&quot; class=&quot;sottotitolo&quot; valign=&quot;middle&quot; nowrap=&quot;nowrap&quot;><a href=&quot;javascript:show('{$title}', false);&quot;><img src=&quot;$mklib->images/minus.gif&quot; border=&quot;0&quot; alt=&quot;Collapse Block&quot;></a></td> </tr> </table> </td> </tr> <tr> <td width=&quot;100%&quot;> <table border=&quot;0&quot; width=&quot;100%&quot; cellpadding=&quot;0&quot; cellspacing=&quot;1&quot;> {$content} </table> </td> </tr> </table> </div> </td> </tr> <tr> <td class=&quot;tdspacer&quot;>&nbsp;</td> </tr> <!-- end block template -->
في الكود code السابق مدرج صورتين عند الفتح وعند الغلق ومرفقه هنا

ايضا يوجد صور مثال للي شرح طريقةته لكم مرفقه

قريبا بإذن الله محرر wysiwyg لمركز تحميل mkportal

تحياتي لكم

ابن غياث


الصور المصغرة المرفقة http://www.traidnt.net/vb/attachments/224966d1204727147t-block.jpg (http://www.traidnt.net/vb/attachments/224966d1204727147-block.jpg) http://www.traidnt.net/vb/attachments/224967d1204727147t-block2.jpg (http://www.traidnt.net/vb/attachments/224967d1204727147-block2.jpg)


https://fbcdn-sphotos-d-a.akamaihd.net/hphotos-ak-ash4/482113_236967293114455_1193518507_n.png (http://www.dzbatna.com)
©المشاركات المنشورة تعبر عن وجهة نظر صاحبها فقط، ولا تُعبّر بأي شكل من الأشكال عن وجهة نظر إدارة المنتدى (http://www.dzbatna.com)©

استعمل مربع البحث في الاسفل لمزيد من المواضيع


سريع للبحث عن مواضيع في المنتدى