arabwit
24-04-2008, 01:11 AM
الهاك ينشئ ايقونه تقدرون تغيرونها براحتكم على حسب التصميم بمجرد الضغط عليها تغلق قائمة البلوك اللي ضغطتوا عليه فقط باقي البلوكات تكون مفتوحه بشكل افتراضي ...
نتجه لملف الجافا سكربت الموجود بداخل مجلد الاستايل المستخدم
/templates/YOURTEMPL/mkp.js
نضيف له التالي =
function show(name,s)
{
var plus = name + "_open";
var minus = name;
minus = getObj(minus);
plus = getObj(plus);
minus.style.display = (s) ? 'block' : 'none';
plus.style.display = (s) ? 'none' : 'block';
}
نفتح ملف الاستايل
/templates/YOURTEMPL/tpl_main.ph
ونبحث عن تمبلت البلوكات وسبق تكلمت عنه في دورة التصميم =
<!-- begin block template -->
<tr>
<td valign="top">
<table border="0" width="100%" cellpadding="0" cellspacing="0">
<tr>
<td>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td class="tdmenblock" width="1%"><img src="$mklib->images/m_sx.gif" border="0" class="tdmenblock" alt="" />
</td>
<td class="sottotitolo" width="99%" style="background-image: url('$mklib->images/m_sf.gif')" valign="middle" nowrap="nowrap">{$title}
</td>
<td class="tdmenblock" width="1%"><img src="$mklib->images/m_dx.gif" border="0" class="tdmenblock" alt="" />
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="tablemenu" width="100%">
<table border="0" width="100%" cellpadding="1" cellspacing="1">
{$content}
</table>
</td>
</tr>
<tr>
<td>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td class="tdmenblock" width="1%" align="right" valign="top"><img src="$mklib->images/m_sx2.gif" class="tdmenblock" alt="" />
</td>
<td class="tdmenblock" width="99%" style="background-image: url('$mklib->images/m_sf2.gif')"><img src="$mklib->images/m_sf2.gif" border="0" class="tdmenblock" alt="" />
</td>
<td class="tdmenblock" width="1%"><img src="$mklib->images/m_dx2.gif" class="tdmenblock" alt="" />
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="tdspacer">
</td>
</tr>
<!-- end block template -->
نستبدله بالتالي =
<!-- begin block template -->
<tr>
<td class="tablemenu" valign="top">
<div id='{$title}_open' style="display:none">
<table border="0" width="100%" cellpadding="0" cellspacing="0">
<tr>
<td>
<table class="sottotitolo" border="0" cellpadding="4" cellspacing="0" width="100%">
<tr>
<td width="100%" class="sottotitolo" valign="middle" nowrap="nowrap">{$title}</td>
<td width="*" class="sottotitolo" valign="middle" nowrap="nowrap"><a href="javascript:show('{$title}', true);"><img src="$mklib->images/plus.gif" border="0" alt="Expand Block"></a></td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<div id='{$title}' style="display:block">
<table border="0" width="100%" cellpadding="0" cellspacing="0">
<tr>
<td>
<table border="0" cellpadding="4" cellspacing="0" width="100%">
<tr>
<td width="100%" class="sottotitolo" valign="middle" nowrap="nowrap">{$title}</td>
<td width="*" class="sottotitolo" valign="middle" nowrap="nowrap"><a href="javascript:show('{$title}', false);"><img src="$mklib->images/minus.gif" border="0" alt="Collapse Block"></a></td> </tr>
</table>
</td>
</tr>
<tr>
<td width="100%">
<table border="0" width="100%" cellpadding="0" cellspacing="1">
{$content}
</table>
</td>
</tr>
</table>
</div>
</td>
</tr>
<tr>
<td class="tdspacer"> </td>
</tr>
<!-- end block template -->
في الكود السابق مدرج صورتين عند الفتح وعند الغلق ومرفقه هنا
ايضا يوجد صور مثال للي شرحته لكم مرفقه
تحياتي لكم
الموضوع منقول للامنة
نتجه لملف الجافا سكربت الموجود بداخل مجلد الاستايل المستخدم
/templates/YOURTEMPL/mkp.js
نضيف له التالي =
function show(name,s)
{
var plus = name + "_open";
var minus = name;
minus = getObj(minus);
plus = getObj(plus);
minus.style.display = (s) ? 'block' : 'none';
plus.style.display = (s) ? 'none' : 'block';
}
نفتح ملف الاستايل
/templates/YOURTEMPL/tpl_main.ph
ونبحث عن تمبلت البلوكات وسبق تكلمت عنه في دورة التصميم =
<!-- begin block template -->
<tr>
<td valign="top">
<table border="0" width="100%" cellpadding="0" cellspacing="0">
<tr>
<td>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td class="tdmenblock" width="1%"><img src="$mklib->images/m_sx.gif" border="0" class="tdmenblock" alt="" />
</td>
<td class="sottotitolo" width="99%" style="background-image: url('$mklib->images/m_sf.gif')" valign="middle" nowrap="nowrap">{$title}
</td>
<td class="tdmenblock" width="1%"><img src="$mklib->images/m_dx.gif" border="0" class="tdmenblock" alt="" />
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="tablemenu" width="100%">
<table border="0" width="100%" cellpadding="1" cellspacing="1">
{$content}
</table>
</td>
</tr>
<tr>
<td>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td class="tdmenblock" width="1%" align="right" valign="top"><img src="$mklib->images/m_sx2.gif" class="tdmenblock" alt="" />
</td>
<td class="tdmenblock" width="99%" style="background-image: url('$mklib->images/m_sf2.gif')"><img src="$mklib->images/m_sf2.gif" border="0" class="tdmenblock" alt="" />
</td>
<td class="tdmenblock" width="1%"><img src="$mklib->images/m_dx2.gif" class="tdmenblock" alt="" />
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="tdspacer">
</td>
</tr>
<!-- end block template -->
نستبدله بالتالي =
<!-- begin block template -->
<tr>
<td class="tablemenu" valign="top">
<div id='{$title}_open' style="display:none">
<table border="0" width="100%" cellpadding="0" cellspacing="0">
<tr>
<td>
<table class="sottotitolo" border="0" cellpadding="4" cellspacing="0" width="100%">
<tr>
<td width="100%" class="sottotitolo" valign="middle" nowrap="nowrap">{$title}</td>
<td width="*" class="sottotitolo" valign="middle" nowrap="nowrap"><a href="javascript:show('{$title}', true);"><img src="$mklib->images/plus.gif" border="0" alt="Expand Block"></a></td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<div id='{$title}' style="display:block">
<table border="0" width="100%" cellpadding="0" cellspacing="0">
<tr>
<td>
<table border="0" cellpadding="4" cellspacing="0" width="100%">
<tr>
<td width="100%" class="sottotitolo" valign="middle" nowrap="nowrap">{$title}</td>
<td width="*" class="sottotitolo" valign="middle" nowrap="nowrap"><a href="javascript:show('{$title}', false);"><img src="$mklib->images/minus.gif" border="0" alt="Collapse Block"></a></td> </tr>
</table>
</td>
</tr>
<tr>
<td width="100%">
<table border="0" width="100%" cellpadding="0" cellspacing="1">
{$content}
</table>
</td>
</tr>
</table>
</div>
</td>
</tr>
<tr>
<td class="tdspacer"> </td>
</tr>
<!-- end block template -->
في الكود السابق مدرج صورتين عند الفتح وعند الغلق ومرفقه هنا
ايضا يوجد صور مثال للي شرحته لكم مرفقه
تحياتي لكم
الموضوع منقول للامنة