Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Template Modifications

Reply
 
Thread Tools
Adding RSS and other options to Forum home page. Details »»
Adding RSS and other options to Forum home page.
Version: 1.3, by KID_1194 KID_1194 is offline
Developer Last Online: Nov 2013 Show Printable Version Email this Page

Category: New Posting Features - Version: 3.8.4 Rating:
Released: 10-25-2009 Last Update: Never Installs: 31
Template Edits
Translations  
No support by the author.

Dear everyone,

This modification adds an RSS + New post + Newthread next to each forum shown in the main page "Home".


Now lets see how we can do that ...!


First .. the only template that we are going to edit is "forumhome_forumbit_level2_post" ..

So we open the forumhome_forumbit_level2_post template of the style that we want to add these options to !

We search for this line code
PHP Code:
<if condition="$show['browsers']"><span class="smallfont">(<phrase 1="$forum[browsers]">$vbphrase[x_viewing]</phrase>)</span></if> 
And then we add this code directly under it
PHP Code:
<!--  Amin Mod -->
<
table align="right" border="0">
    <
tr>
        <
td width="15">
            <
a href="newthread.php?$session[sessionurl]f=$forum[forumid]">
                <
img src="$stylevar[imgdir_misc]/newthread.png" border="0" width="14" height="14" hspace="0" alt="New thread" align="left" /></a>
        </
td>
        <
td width="15">
            <
a href="search.php?$session[sessionurl]do=getnew&amp;f=$forum[forumid]">
                <
img src="$stylevar[imgdir_misc]/newposts.png" border="0" width="14" height="14" hspace="0" alt="New posts" align="left" /></a>
        </
td>
        <
td width="15">
        <
a target="_blank" href="external.php?type=RSS2&amp;forumids=$forum[forumid]">
        <
img src="$stylevar[imgdir_misc]/rss_rss.gif" border="0" width="14" height="14" hspace="0" alt="Rss feed" align="left" /></a>
        </
td>
    </
tr>
</
table>
<!-- / 
Amin Mod --> 
If you want to exclude these options in some forums, you can add the code with a condition
PHP Code:
<!--  Amin Mod -->
<if 
condition="!in_array($forumid, array(x,x,x,x))">
<
table align="right" border="0">
    <
tr>
        <
td width="15">
            <
a href="newthread.php?$session[sessionurl]f=$forum[forumid]">
                <
img src="$stylevar[imgdir_misc]/newthread.png" border="0" width="14" height="14" hspace="0" alt="New thread" align="left" /></a>
        </
td>
        <
td width="15">
            <
a href="search.php?$session[sessionurl]do=getnew&amp;f=$forum[forumid]">
                <
img src="$stylevar[imgdir_misc]/newposts.png" border="0" width="14" height="14" hspace="0" alt="New posts" align="left" /></a>
        </
td>
        <
td width="15">
        <
a target="_blank" href="external.php?type=RSS2&amp;forumids=$forum[forumid]">
        <
img src="$stylevar[imgdir_misc]/rss_rss.gif" border="0" width="14" height="14" hspace="0" alt="Rss feed" align="left" /></a>
        </
td>
    </
tr>
</
table>
</if>
<!-- / 
Amin Mod --> 
on the top of the code, instead of x put the number of the forum (forumid).

At the end upload the attached icons to the misc folder which is inside images folder

This is what its going to look like


** To hide the Newthread and New post icons from visitors and leave the Rss feed icon only
check this post https://vborg.vbsupport.ru/showpost....0&postcount=16

** To show these options on the forumdisplay also ..
you have to edit forumhome_forumbit_level1_post tempalte

search for
PHP Code:
            <if condition="$show['subforums']"><div class="smallfont" style="margin-top:$stylevar[cellpadding]px"><strong>$vbphrase[subforums]</strong>: $forum[subforums]</div></if>
            </
td>
        </
tr>
        </
table
then put the code directly under it ..



Updated (27 OCT 2009): "W3" 0 errors


Adding RSS next to forum title

Best regards

----------------------------------------------------------------

السلام عليكم


RSS هذا التعديل هو لإضافة ايقونة الـ
+ آخر المشاركات + إنشاء موضوع لكل قسم والذي سوف تظهر بجانب القسم في الصفحة الرئيسية


الآن .. نبدأ التعديل

أولاً .. القالب الذي سوف نقوم بالتعديل عليه هو قالب
forumhome_forumbit_level2_post
الخاص بالستايل

نقوم بفتح هذا القالب .. ثم نقوم بالبحث عن هذا الكود
PHP Code:
<if condition="$show['browsers']"><span class="smallfont">(<phrase 1="$forum[browsers]">$vbphrase[x_viewing]</phrase>)</span></if> 
بعدها نقوم بإضافة هذا الكود أسفلة مباشرة ..
PHP Code:
<!--  Amin Mod -->
<
table align="left" border="0">
    <
tr>
        <
td width="15">
            <
a href="newthread.php?$session[sessionurl]f=$forum[forumid]">
                <
img src="$stylevar[imgdir_misc]/newthread.png" border="0" width="14" height="14" hspace="0" alt="إضافة موضوع" align="left" /></a>
        </
td>
        <
td width="15">
            <
a href="search.php?$session[sessionurl]do=getnew&amp;f=$forum[forumid]">
                <
img src="$stylevar[imgdir_misc]/newposts.png" border="0" width="14" height="14" hspace="0" alt="آخر المشاركات" align="left" /></a>
        </
td>
        <
td width="15">
        <
a target="_blank" href="external.php?type=RSS2&amp;forumids=$forum[forumid]">
        <
img src="$stylevar[imgdir_misc]/rss_rss.gif" border="0" width="14" height="14" hspace="0" alt="خدمة الـ Rss" align="left" /></a>
        </
td>
    </
tr>
</
table>
<!-- / 
Amin Mod --> 
واذا اردنا ان لا تظهر هذه الأيقونات بجانب بعض الأقسم مثل الأقسام الإدارية
فيمكننا استخدام هذا الكود
PHP Code:
<!--  Amin Mod -->
<if 
condition="!in_array($forumid, array(x,x,x,x))">
<
table align="left" border="0">
    <
tr>
        <
td width="15">
            <
a href="newthread.php?$session[sessionurl]f=$forum[forumid]">
                <
img src="$stylevar[imgdir_misc]/newthread.png" border="0" width="14" height="14" hspace="0" alt="إضافة موضوع" align="left" /></a>
        </
td>
        <
td width="15">
            <
a href="search.php?$session[sessionurl]do=getnew&amp;f=$forum[forumid]">
                <
img src="$stylevar[imgdir_misc]/newposts.png" border="0" width="14" height="14" hspace="0" alt="آخر المشاركات" align="left" /></a>
        </
td>
        <
td width="15">
        <
a target="_blank" href="external.php?type=RSS2&amp;forumids=$forum[forumid]">
        <
img src="$stylevar[imgdir_misc]/rss_rss.gif" border="0" width="14" height="14" hspace="0" alt="خدمة الـ Rss" align="left" /></a>
        </
td>
    </
tr>
</
table>
</if>
<!-- / 
Amin Mod --> 
x من أعلى الكود نقوم بإستبدال علامة الـ
(forumid) بأرفام الأقسام التي لا نريد ان تظهر الأيقونات بجانبها


misc وفي النهاية نقوم برفع الأيقونات الموجودة في الأسفل ووضعها في ملف
الموجود بداخل ملفات الستايل


وهذا هو ما سنحصل عليه في النهاية
This is what its going to look like


** إذا اردت إخفاء ايقوة إنشاء موضوع و آخر المشاركات عن الزوار
يرجى مراجعة هذا الرد
https://vborg.vbsupport.ru/showpost....0&postcount=16

** Forumdisplay إذا اردت ان تظهر هذه الأيقونات أيضاً في
forumhome_forumbit_level1_post قم بفتح قالب
وابحث عن
PHP Code:
            <if condition="$show['subforums']"><div class="smallfont" style="margin-top:$stylevar[cellpadding]px"><strong>$vbphrase[subforums]</strong>: $forum[subforums]</div></if>
            </
td>
        </
tr>
        </
table
وقم بإضافة الكود أسفله مباشرة



Updated (27 OCT 2009): "W3" 0 errors

Adding RSS next to forum title

دمتم في حفظ الرحمن

Screenshots

File Type: jpg rss.jpg (12.1 KB, 0 views)

Supporters / CoAuthors

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #42  
Old 08-26-2011, 09:48 AM
newguy's Avatar
newguy newguy is offline
 
Join Date: Nov 2007
Location: USA
Posts: 185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This problem is not caused by this modification (i think not) but can any one help? I get this when you click on one of the rss feeds.

Quote:
XML Parsing Error: junk after document element
Location: http: //XXX.com/forums/external.php?type=RSS2&forumids=90
Line Number 1, Column 7:<br /><strong>Warning</strong>: Invalid argument supplied for foreach() in <strong>[path]/includes/class_postbit_alt.php(474) : eval()'d code</strong> on line <strong>39</strong><br /><br /><strong>Warning</strong>: Invalid argument supplied for foreach() in <strong>[path]/includes/class_postbit_alt.php(474) : eval()'d code</strong> on line <strong>39</strong><br /><br /><strong>Warning</strong>: Invalid argument supplied for foreach() in <strong>[path]/includes/class_postbit_alt.php(474) : eval()'d code</strong> on line <strong>39</strong><br /><br /><strong>Warning</strong>: Invalid argument supplied for foreach() in <strong>[path]/includes/class_postbit_alt.php(474) : eval()'d code</strong> on line <strong>39</strong><br /><br /><strong>Warning</strong>: Invalid argument supplied for foreach() in <strong>[path]/includes/class_postbit_alt.php(474) : eval()'d code</strong> on line <strong>39</strong><br /><br /><strong>Warning</strong>: Invalid argument supplied for foreach() in <strong>[path]/includes/class_postbit_alt.php(474) : eval()'d code</strong> on line <strong>39</strong><br /><br /><strong>Warning</strong>: Invalid argument supplied for foreach() in <strong>[path]/includes/class_postbit_alt.php(474) : eval()'d code</strong> on line <strong>39</strong><br /><?xml version="1.0" encoding="ISO-8859-1"?>
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:13 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04050 seconds
  • Memory Usage 2,328KB
  • Queries Executed 20 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (8)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (2)post_thanks_box
  • (2)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_attachment
  • (2)postbit_onlinestatus
  • (2)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete