Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Template Modifications
FAQ Community Calendar Today's Posts Search

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
  #12  
Old 10-30-2009, 08:18 AM
Xceptional Xceptional is offline
 
Join Date: Mar 2008
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Where is the attached image icons that I must upload?
Reply With Quote
  #13  
Old 10-30-2009, 08:40 AM
KID_1194 KID_1194 is offline
 
Join Date: May 2009
Posts: 47
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

you will find 3 icons attached on the top ..

or I will bring them down for you ..


don't forget to click on install to receive any update

best regards
Reply With Quote
  #14  
Old 10-30-2009, 08:43 AM
Xceptional Xceptional is offline
 
Join Date: Mar 2008
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

sweet thanks! missed them there
Reply With Quote
  #15  
Old 10-30-2009, 08:44 AM
KID_1194 KID_1194 is offline
 
Join Date: May 2009
Posts: 47
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Xceptional View Post
sweet thanks! missed them there
you are welcome .. anytime !!

best regards
Reply With Quote
  #16  
Old 10-30-2009, 09:03 AM
Xceptional Xceptional is offline
 
Join Date: Mar 2008
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works like a charm only thing I added in before your code was <if condition="$show['member']"></if>, so that it shows only when a user is logged in. Otherwise when they click on the "New Posts" icon it always says there is none available (since there is no record of posts the person previously looked at while not signed in) :up:
Reply With Quote
  #17  
Old 10-30-2009, 09:43 AM
KID_1194 KID_1194 is offline
 
Join Date: May 2009
Posts: 47
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Xceptional View Post
Works like a charm only thing I added in before your code was <if condition="$show['member']"></if>, so that it shows only when a user is logged in. Otherwise when they click on the "New Posts" icon it always says there is none available (since there is no record of posts the person previously looked at while not signed in) :up:
thats a great add ... thaks a lot

you can also add it for the new thread .. so the code will be like this

PHP Code:
<!--  San3a.Com Mod -->
<if 
condition="!in_array($forumid, array(x,x,x,x))">
<
table align="right" border="0">
    <
tr>
        <if 
condition="$show['member']">
        <
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>
        </if>
        <
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>
<!-- / 
San3a.Com Mod --> 
so you will leave the rss feed for the visitors ..

best regards
Reply With Quote
  #18  
Old 10-31-2009, 01:01 AM
SEOvB's Avatar
SEOvB SEOvB is offline
 
Join Date: May 2007
Location: Indianapolis
Posts: 2,451
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is a great mod. I must say that many members and visitors are looking for an rss feature. Great work!
Reply With Quote
  #19  
Old 10-31-2009, 05:31 AM
KID_1194 KID_1194 is offline
 
Join Date: May 2009
Posts: 47
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by FRDS View Post
This is a great mod. I must say that many members and visitors are looking for an rss feature. Great work!
Thanks a lot .. Its a pleasure for me to see a post from a great coder link you.


Best regards
Reply With Quote
  #20  
Old 10-31-2009, 11:02 PM
CoronasRGood CoronasRGood is offline
 
Join Date: Oct 2009
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Something I have been looking for. Great job, installed and nominated.
Reply With Quote
  #21  
Old 11-03-2009, 05:11 PM
NNJJ NNJJ is offline
 
Join Date: Dec 2001
Posts: 111
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

can i have the pictures as attachment please; its saved as .bmp
Reply With Quote
Reply


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 11:00 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.05886 seconds
  • Memory Usage 2,450KB
  • Queries Executed 29 (?)
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
  • (9)bbcode_php
  • (3)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
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (1)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)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