السلام عليكم ,,,
نظام المفضلة المتكامل للنسخة 3.5.3
هذا النظام من تعريبىتستطيع من خلال هذا الهاك ان تتيح للاعضاء اضافة مواضيع خاصه بهم الى المفضله وكذالك المشاركات والاعضاء ويمكنك التحكم فى عدد المواضيع التى تحفظ وايقاف وتشغيل الهاك عن طريق لوحة التحكم
ادخل على خيارات المنتدى ثم اختر من القائمة نظام المفضلة
أخى الكريم لاتنسانا من صالح الدعاء
الزمن الذى يستقرقة الهاك 5 دقائق فقط![]()
طريقة التركيب :
اولاً :
ارفع الملف vbfavorites.php الى ملفات المنتدى الرئيسية
ثم ارفع fav.gif الى مجلد الصور images
ثانياً :
قم بتعديل الملفincludes/functions_databuild.php
1/ ابحث عن الكود :
اضف تحتة :كود PHP:$vbulletin->db->query_write("DELETE FROM " . TABLE_PREFIX . "thread WHERE open=10 AND pollid = $threadid");
2/ ابحث عن الكود :كود PHP:$vbulletin->db->query_write("DELETE FROM " . TABLE_PREFIX . "favorites WHERE entry_type = 'thread' AND entry_id = $threadid");
اضف تحتة :كود PHP:$vbulletin->db->query_write("DELETE FROM " . TABLE_PREFIX . "post WHERE postid IN ($postids" . "0)");
3/ ابحث عن الكود :كود PHP:$vbulletin->db->query_write("DELETE FROM " . TABLE_PREFIX . "favorites WHERE entry_type = 'post' AND entry_id IN ($postids" . "0)");
اضف تحتة :كود PHP:$vbulletin->db->query_write("DELETE FROM " . TABLE_PREFIX . "thread WHERE threadid = $threadid");
4/ ابحث عن الكود :كود PHP:$vbulletin->db->query_write("DELETE FROM " . TABLE_PREFIX . "favorites WHERE entry_type = 'thread' AND entry_id = $threadid");
اضف تحتة :كود PHP:$vbulletin->db->query_write("DELETE FROM " . TABLE_PREFIX . "post WHERE postid = $postid");
ثالثاً :كود PHP:$vbulletin->db->query_write("DELETE FROM " . TABLE_PREFIX . "favorites WHERE entry_type = 'post' AND entry_id = $postid");
التعديل على التمبلتات :
1/ افتح التمبلت MEMBERINFO
- ابحث عن
- اضف تحتةكود PHP:<td class="vbmenu_control">
<if condition="$show['addignorelist']">
<a href="profile.php?$session[sessionurl]do=addlist&userlist=ignore&u=$userinfo[userid]"><phrase 1="$userinfo[username]">$vbphrase[add_x_to_ignore_list]</phrase></a>
<else />
<a href="profile.php?$session[sessionurl]do=removelist&userlist=ignore&u=$userinfo[userid]"><phrase 1="$userinfo[username]">$vbphrase[remove_x_from_your_ignorelist]</phrase></a>
</if>
</td>
احفظ التمبلتكود PHP:<if condition="$vboptions['favusers_enabled']">
<td class="vbmenu_control">
<a href="vbfavorites.php?$session[sessionurl]do=addentry&type=user&id=$userinfo[userid]"><phrase 1="$userinfo[username]">$vbphrase[add_user_to_favorites]</phrase></a>
</td>
</if>
2/ افتح التمبلت navbar
- ابحث عن
- اضف تحتةكود PHP:<td class="vbmenu_control"><a href="usercp.php$session[sessionurl_q]">$vbphrase[user_cp]</a></td>
- ابحث عنكود PHP:<if condition="$show['lastfavthreads'] OR $show['lastfavposts'] OR $show['lastfavusers']">
<td class="vbmenu_control" id="favorites"><a href="usercp.php?$session[sessionurl]">$vbphrase[vbfavorites_favorites]</a> <script type="text/javascript"> vbmenu_register("favorites"); </script> </td>
</if>
- اضف تحتهكود PHP:</div>
<!-- / user cp tools menu -->
</if>
احفظ التمبلتكود PHP:<div class="vbmenu_popup" id="favorites_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">
<if condition="$show['lastfavthreads']">
<tr>
<td class="thead"><phrase 1="$vboptions[lastfavthreadlimit]">$vbphrase[last_x_added_favorite_threads]</phrase></td>
</tr>
$lastfavthreadbit
</if>
<if condition="$show['lastfavposts']">
<tr>
<td class="thead"><phrase 1="$vboptions[lastfavpostlimit]">$vbphrase[last_x_added_favorite_posts]</phrase></td>
</tr>
$lastfavpostbit
</if>
<if condition="$show['lastfavusers']">
<tr>
<td class="thead"><phrase 1="$vboptions[lastfavuserlimit]">$vbphrase[last_x_added_favorite_users]</phrase></td>
</tr>
$lastfavuserbit
</if>
<tr><td class="thead"><a href="usercp.php?$session[sessionurl]">$vbphrase[vbfavorites_complete_list]</a></td></tr>
</table>
</div>
3/ افتح التمبلت postbit
- ابحث عن
- اضف قبلةكود PHP:<div>$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon] $post[skypeicon]</div>
</div>
ثم احفظكود PHP:<if condition="$show['reputation']"><div><if condition="$show['reppower']">$vbphrase[reppower]: $post[reppower]</if>$post[reputationdisplay]</div></if> <if condition="$vboptions['favposts_enabled'] AND $show['member'] AND (THIS_SCRIPT == 'showthread' OR THIS_SCRIPT == 'showpost')"> <a href="vbfavorites.php?$session[sessionurl]do=addentry&type=post&id=$post[postid]">
<img border="0" src="images/fav.gif" alt="اضافة الى المفضلة">$vbphrase[add_post_to_favorites]</a></if>
4/ افتح التمبلت postbit_legacy
- ابحث عن
- اضف قبلةكود PHP:<div>$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon] $post[skypeicon]</div>
</div>
ثم احفظكود PHP:<if condition="$show['reputation']"><div><if condition="$show['reppower']">$vbphrase[reppower]: $post[reppower]</if>$post[reputationdisplay]</div></if> <if condition="$vboptions['favposts_enabled'] AND $show['member'] AND (THIS_SCRIPT == 'showthread' OR THIS_SCRIPT == 'showpost')"> <a href="vbfavorites.php?$session[sessionurl]do=addentry&type=post&id=$post[postid]">
<img border="0" src="images/fav.gif" alt="اضافة الى المفضلة">$vbphrase[add_post_to_favorites]</a></if>
5/ افتح التمبلت SHOWTHREAD
- ابحث عن
- اضف تحتةكود PHP:<tr>
<td class="vbmenu_option"><img class="inlineimg" src="$stylevar[imgdir_button]/subscribe.gif" alt="$vbphrase[subscription]" />
<if condition="$show['subscribed']">
<a href="subscription.php?$session[sessionurl]do=removesubscription&t=$threadid">$vbphrase[unsubscribe_from_this_thread]</a>
<else />
<a href="subscription.php?$session[sessionurl]do=addsubscription&t=$threadid">$vbphrase[subscribe_to_this_thread]</a>
</if>
</td>
</tr>
- ابحث عنكود PHP:<if condition="$vboptions['favthreads_enabled']">
<tr>
<td class="vbmenu_option"><img class="inlineimg" src="$stylevar[imgdir_button]/subscribe.gif" alt="$vbphrase[add_thread_to_favorites]" /> <a href="vbfavorites.php?$session[sessionurl]do=addentry&type=thread&id=$threadid">$vbphrase[add_thread_to_favorites]</a></td>
</tr>
</if>
- اضف تحتةكود PHP:<div><img class="inlineimg" src="$stylevar[imgdir_button]/subscribe.gif" alt="$vbphrase[subscription]" vspace="1" />
<if condition="$show['subscribed']">
<a href="subscription.php?$session[sessionurl]do=removesubscription&t=$threadid">$vbphrase[unsubscribe_from_this_thread]</a>
<else />
<a href="subscription.php?$session[sessionurl]do=addsubscription&t=$threadid">$vbphrase[subscribe_to_this_thread]</a>
</if>
</div>
ثم احفظكود PHP:<if condition="$vboptions['favthreads_enabled']">
<div><img class="inlineimg" src="$stylevar[imgdir_button]/subscribe.gif" alt="$vbphrase[add_thread_to_favorites]" /> <a href="vbfavorites.php?$session[sessionurl]do=addentry&type=thread&id=$threadid">$vbphrase[add_thread_to_favorites]</a></div>
</if>
6/ افتح التمبلت USERCP
- ابحث عن
- اضف تحتهكود PHP:<!-- ############## END SUBSCRIBED THREADS ############## -->
ثم احفظكود PHP:<if condition="$show['favoritethreads']">
<form action="usercp.php" method="post">
<input type="hidden" name="entry_type" value="thread" />
<!-- ############## FAVORITE THREADS ############## -->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<thead>
<tr>
<td class="tcat" colspan="2">
$vbphrase[vbfavorites_favthreads]
</td>
</tr>
</thead>
<tbody>
$favoritethreadbits
<tr>
<td class="tcat" colspan="2">
<center><input type="submit" name="deletefavorites" class="button" value="$vbphrase[vbfavorites_deleteselected]" /></center>
</td>
</tr>
</tbody>
</table>
<br />
<!-- ############## END FAVORITE THREADS ############## -->
</form>
</if>
<if condition="$show['favoriteposts']">
<form action="usercp.php" method="post">
<input type="hidden" name="entry_type" value="post" />
<!-- ############## FAVORITE POSTS ############## -->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<thead>
<tr>
<td class="tcat" colspan="2">
$vbphrase[vbfavorites_favposts]
</td>
</tr>
</thead>
<tbody>
$favoritepostbits
<tr>
<td class="tcat" colspan="2">
<center><input type="submit" name="deletefavorites" class="button" value="$vbphrase[vbfavorites_deleteselected]" /></center>
</td>
</tr>
</tbody>
</table>
<br />
<!-- ############## END FAVORITE POSTS ############## -->
</form>
</if>
<if condition="$show['favoriteusers']">
<form action="usercp.php" method="post">
<input type="hidden" name="entry_type" value="user" />
<!-- ############## FAVORITE USERS ############## -->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<thead>
<tr>
<td class="tcat" colspan="2">
$vbphrase[vbfavorites_favusers]
</td>
</tr>
</thead>
<tbody>
$favoriteuserbits
<tr>
<td class="tcat" colspan="2">
<center><input type="submit" name="deletefavorites" class="button" value="$vbphrase[vbfavorites_deleteselected]" /></center>
</td>
</tr>
</tbody>
</table>
<br />
<!-- ############## END FAVORITE USERS ############## -->
</form>
</if>
رابعاً :
قم برفع المنتج عن طريق لوحة التحكم product-vbfavorites_OmeR4eVeR.xml
مثال على الهاك
فى الرد التالى :anger2:
تم بحمد الله تعالى
ومبروك عليكم الهاك
لاتنسونا من صالح الدعاء
أخوكم OmeR4eVeR


تستطيع من خلال هذا الهاك ان تتيح للاعضاء اضافة مواضيع خاصه بهم الى المفضله وكذالك المشاركات والاعضاء ويمكنك التحكم فى عدد المواضيع التى تحفظ وايقاف وتشغيل الهاك عن طريق لوحة التحكم
رد مع اقتباس
..