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
  #32  
Old 11-14-2009, 11:00 AM
Ghostt Ghostt is offline
 
Join Date: Oct 2009
Posts: 359
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

if you have to ad the forum IDs one time manualy it is not that big problem.
so you can make a beta with manualy added Forum Ids

Quote:
Originally Posted by KID_1194 View Post
Yup .. and I'm so excited about it ..

but the problem is they way to do it .. I'm a bit lost ..

I have to write a plugin that will gather all the id's of the forums that has the same option number form the database .. and on the top of that .. there should be some manual editing !!

If any has some ideas .. please share it.

I think any of the coders can help .. or any of vBulletin team ..!

Best regards
Reply With Quote
  #33  
Old 11-15-2009, 04:02 AM
KID_1194 KID_1194 is offline
 
Join Date: May 2009
Posts: 47
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Ghostt View Post
if you have to ad the forum IDs one time manualy it is not that big problem.
so you can make a beta with manualy added Forum Ids
Well .. u will see it soon
Reply With Quote
  #34  
Old 11-20-2009, 06:40 AM
KID_1194 KID_1194 is offline
 
Join Date: May 2009
Posts: 47
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

My friend Ghostt ...

check this out ... https://vborg.vbsupport.ru/showthread.php?t=228428

its what you are looking for !!


Best regards
Reply With Quote
  #35  
Old 04-29-2010, 01:31 AM
Jaske's Avatar
Jaske Jaske is offline
 
Join Date: Apr 2010
Location: South Philadelphia
Posts: 51
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I installed as instructed and all icons are showing but when I click the rss icon I'm taken to a blank page....any idea why?
Reply With Quote
  #36  
Old 04-29-2010, 05:43 AM
KID_1194 KID_1194 is offline
 
Join Date: May 2009
Posts: 47
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes .. I think you don't have the RSS feed provider ..!

So go to the Admin CP>External Data Provider and then select YES to Enable RSS Syndication

Best regards
Reply With Quote
  #37  
Old 04-30-2010, 02:43 PM
Jaske's Avatar
Jaske Jaske is offline
 
Join Date: Apr 2010
Location: South Philadelphia
Posts: 51
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

awesome, Thanks for your help! now it works fine.
Reply With Quote
  #38  
Old 04-30-2010, 04:07 PM
KID_1194 KID_1194 is offline
 
Join Date: May 2009
Posts: 47
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Anytime bro ..!
Reply With Quote
  #39  
Old 05-05-2010, 07:46 PM
Rideharder's Avatar
Rideharder Rideharder is offline
 
Join Date: Jan 2008
Location: Florida
Posts: 445
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is very good thank you so much
Reply With Quote
  #40  
Old 05-21-2010, 04:44 PM
KID_1194 KID_1194 is offline
 
Join Date: May 2009
Posts: 47
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You are most welcome (All) ..

Best regards
Reply With Quote
  #41  
Old 04-16-2011, 04:04 PM
Sworm Sworm is offline
 
Join Date: Feb 2008
Posts: 422
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by KID_1194 View Post
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
Not there's a way to add a condition for the group id?

PS
On the level1_post there's a mode to show the image in the same forum title line or over like in the leve2_post? and not under the title? under the title was created a not beautiful gap:
Attached Images
File Type: jpg Cattura.JPG (33.3 KB, 0 views)
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 06:26 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.05131 seconds
  • Memory Usage 2,459KB
  • Queries Executed 27 (?)
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
  • (2)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_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