ط¥ط¶ط§ظپط© ظ…ظ‚طھط·ظپ ظ…ظ† ط§ظ„ظ…ظˆط¶ظˆط¹ + ظˆطµظپ ط§ظ„ظ…ظˆط¶ظˆط¹ ظ…ظ† ظ…ط*طھظˆظ‰ ط§ظ„ظ…ظˆط¶ظˆط¹ ظƒظ…ط§ طھط±ط§ظٹط¯ظ†طھ - ط¨ط¯ظˆظ† VBSEO



السلام عليكم و رحمة الله و بركاته

كيفكم اخباركم عساكم بخير دائماً و دوماً ...

لكثرة الطلبات على هذه الطريقة خلال الاشهر الماضية

اليوم حبيت اني اقدم طريقة الـ VBSEO في جعل وصف الموضوع من محتواه + اضافة الكلمات الاولى من الموضوع بدون الهاك product المذكور

الآن نأتي للشرح طريقة و التركيب install

فقط قم باستبدال الملف المرفق functions.php
في مجلد
includes/

و يمكنك الآن استخدام المتغير

$threadinfo[preview]

لإضافة مقتطف اول اسطر الموضوع ضعه في قالب template الـ showthread

ابحث في القلب عن $navbar

و ضع المتغير اسفله أو

رمز Code:
<!-- Tags --> <div id=&quot;tags&quot;> <h1 align=&quot;center&quot;> <a style=&quot;text-decoration: none&quot; title=&quot;$thread[title]&quot; href=&quot;showthread.php?$session[sessionurl]t=$threadid&quot;>$thread[title]</a></h1> <h2 align=&quot;center&quot;> <a style=&quot;text-decoration: none&quot; title=&quot;$foruminfo[title_clean]&quot; href=&quot;forumdisplay.php?$session[sessionurl]f=$forumid&quot;>$foruminfo[title_clean]</a></h2> <h2 align=&quot;center&quot;> <a style=&quot;text-decoration: none&quot; title=&quot;$thread[title]&quot;>$threadinfo[prefix_plain_html] $threadinfo[preview]</a></h2> </div> <!-- // Tags -->
و لجعل وصف الموضوع من محتوى الموضوع ضع المتغير في headincude

ابحث عن

رمز Code:
<meta name=&quot;description&quot; content=&quot;<if condition=&quot;$pagenumber>1&quot;><phrase 1=&quot;$pagenumber&quot;>$vbphrase[page_x]</phrase>-</if>$threadinfo[prefix_plain_html] $threadinfo[title] $foruminfo[title_clean]&quot; />
و استبدلها بـ

رمز Code:
<meta name=&quot;description&quot; content=&quot;<if condition=&quot;$pagenumber>1&quot;><phrase 1=&quot;$pagenumber&quot;>$vbphrase[page_x]</phrase>-</if>$threadinfo[prefix_plain_html] $threadinfo[title] $threadinfo[preview]&quot; />
و انتهى

و يمكن التحكم في طول و عدد كلمات الوصف او عرض مقتطف من الموضوع




من خيارات المنتدى forum >> خيارات ظهور صفحة عرض الأقسام (forumdisplay)
ثم >>
طول نص مشاهدة الموضوع

و ذلك لأن الطريقة تعتمد على هذه الدالة و تم ادراجها في الفنكشن لتعمل مع قالب template showthread


-----------------------------------------------------
و لمن يريد التعديل على ملف الفنكشن الخاص به ,,

ابحث في ملف الفنكشن

رمز PHP:
<code style="white-space:nowrap"> <code> SELECT IF(visible = 2, 1, 0) AS isdeleted,
</code> </code>

استبدله بـ

رمز PHP:
<code style="white-space:nowrap"> <code> SELECT IF(thread.visible = 2, 1, 0) AS isdeleted,
</code> </code>

ابحث عن

رمز PHP:
<code style="white-space:nowrap"> <code> thread.*
</code> </code>

اضف قبله

رمز PHP:
<code style="white-space:nowrap"> <code> " . iif($vbulletin->options&#91;'threadpreview'&#93; > 0 AND THIS_SCRIPT == 'showthread', 'post.pagetext AS preview, ') . "
</code> </code>

ابحث عن

رمز PHP:
<code style="white-space:nowrap"> <code> $tachyjoin
</code> </code>

اضف قبله

رمز PHP:
<code style="white-space:nowrap"> <code> " . iif($vbulletin->options&#91;'threadpreview'&#93; > 0 AND THIS_SCRIPT == 'showthread', "LEFT JOIN " . TABLE_PREFIX . "post AS post ON(post.postid = thread.firstpostid)") . "
</code> </code>

ابحث عن
رمز PHP:
<code style="white-space:nowrap"> <code> WHERE thread.threadid = $threadid
");
</code> </code>

اضف بعدهُ

رمز PHP:
<code style="white-space:nowrap"> <code> if($vbulletin->options&#91;'threadpreview'&#93; > 0 AND THIS_SCRIPT == 'showthread')
{
$threadcache&#91;"$threadid"&#93;&#91;'preview'&#93; = strip_quotes($threadcache&#91;"$threadid"&#93;&#91;'preview'&#93;
$threadcache&#91;"$threadid"&#93;&#91;'preview'&#93; = preg_replace ('/\n(\s*)/', " ", $threadcache&#91;"$threadid"&#93;&#91;'preview'&#93;
$threadcache&#91;"$threadid"&#93;&#91;'preview'&#93; = preg_replace ('/\r(\s*)/', " ", $threadcache&#91;"$threadid"&#93;&#91;'preview'&#93;
$threadcache&#91;"$threadid"&#93;&#91;'preview'&#93; = str_replace(" ", " ", $threadcache&#91;"$threadid"&#93;&#91;'preview'&#93;
$threadcache&#91;"$threadid"&#93;&#91;'preview'&#93; = htmlspecialchars_uni(fetch_censored_text(fetch_trimmed_title(strip_bbcode($threadcache&#91;"$threadid"&#93;&#91;'preview'&#93;, false, true), $vbulletin->options&#91;'threadpreview'&#93));
}
</code> </code>

و سلامتكم

الشرح طريقة حصري لديزاد باتنة
المصدر : http://www.vbulletin.org/forum/showthread.php?t=208657

تحياتي للجميع

Iraqi Code
أنس الكبيسي .. /

ملحوظه : ملف الفنكشن للنسخ 3.8.7 و لمن يريد أن يدرج هذه الخاصية في النسخ السابقة ما عليه الا ارفاق الملف الخاص بنسخته functions.php و ان شاء الله اضيفها له

تحياتي .. /





التعديل الأخير كان بواسطة Iraqi Code; 15 - 09 - 2014 الساعة 19:35

الملفات المرفقة [TR]
functions.zip (43.2 كيلوبايت, عدد مرات المشاهدة 339 مرة) [/TR]



©المشاركات المنشورة تعبر عن وجهة نظر صاحبها فقط، ولا تُعبّر بأي شكل من الأشكال عن وجهة نظر إدارة المنتدى©