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
  #22  
Old 11-09-2009, 12:14 PM
merkaz merkaz is offline
 
Join Date: Sep 2008
Posts: 81
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is really nice .

Thank you .
Reply With Quote
  #23  
Old 11-10-2009, 02:20 AM
KID_1194 KID_1194 is offline
 
Join Date: May 2009
Posts: 47
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by CoronasRGood View Post
Something I have been looking for. Great job, installed and nominated.
Thanx a lot. Its a great honour for me ..
Reply With Quote
  #24  
Old 11-10-2009, 02:44 AM
KID_1194 KID_1194 is offline
 
Join Date: May 2009
Posts: 47
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by NNJJ View Post
can i have the pictures as attachment please; its saved as .bmp
These are the icons in BMP format ... but you also have to change the format in the code.

Just search for the img src for each icon
eg:
PHP Code:
<img src="$stylevar[imgdir_misc]/newthread.png" 
and change the format like this
PHP Code:
<img src="$stylevar[imgdir_misc]/newthread.bmp" 
or to make it easy for you just search for
PHP Code:
png 
and replace it with
PHP Code:
bmp 
Best regards
Attached Images
File Type: bmp newposts.bmp (450 Bytes, 12 views)
File Type: bmp newthread.bmp (450 Bytes, 13 views)
File Type: bmp rss_rss.bmp (1.3 KB, 12 views)
Reply With Quote
  #25  
Old 11-10-2009, 02:46 AM
KID_1194 KID_1194 is offline
 
Join Date: May 2009
Posts: 47
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by merkaz View Post
This is really nice .

Thank you .
You are welcome ... anytime !

Don't forget to click on installed ......
Reply With Quote
  #26  
Old 11-11-2009, 12:54 PM
Ghostt Ghostt is offline
 
Join Date: Oct 2009
Posts: 359
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i have an upgrade idea for this mod. if every forum has an rss and so its too mutch!!

how to ad the rss only at the categories?

EXAMPLE:

--------CATEGORIE1--->RSS--
----forum1
----forum2
----forum3

--------CATEGORIE2--->RSS--
----forum1
----forum2
----forum3
----forum4
Reply With Quote
  #27  
Old 11-12-2009, 05:29 AM
KID_1194 KID_1194 is offline
 
Join Date: May 2009
Posts: 47
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Ghostt View Post
i have an upgrade idea for this mod. if every forum has an rss and so its too mutch!!

how to ad the rss only at the categories?


EXAMPLE:

--------CATEGORIE1--->RSS--
----forum1
----forum2
----forum3

--------CATEGORIE2--->RSS--
----forum1
----forum2
----forum3
----forum4

nice idea .. but do u mean creating a category for the rss feed only ..?

Best regards
Reply With Quote
  #28  
Old 11-12-2009, 10:39 AM
Ghostt Ghostt is offline
 
Join Date: Oct 2009
Posts: 359
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

another example:

--------SUPPORT (Category)----- --
----forum1
----forum2
----forum3

--------TALK (Category)-------
----forum1
----forum2
----forum3
----forum4

the category rss =so for the forum 1-4 is an link to the feed like:

HTML Code:
http://www.vbulletin-germany.com/forum/external.php?forumids=119,120,121,117
(you have to input your forum IDs in the link ,to get category rss link)
Reply With Quote
  #29  
Old 11-13-2009, 09:51 AM
KID_1194 KID_1194 is offline
 
Join Date: May 2009
Posts: 47
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok .. I got it ..

I will try to make it .. but I don't think its going to be a code modification ...

Its going to be an add-on ...

Best regards
Reply With Quote
  #30  
Old 11-13-2009, 06:17 PM
Ghostt Ghostt is offline
 
Join Date: Oct 2009
Posts: 359
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

wow i am realy curious to see it in action
This will be a memorable upgrade for this mod!

Quote:
Originally Posted by KID_1194 View Post
ok .. I got it ..

I will try to make it .. but I don't think its going to be a code modification ...

Its going to be an add-on ...


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

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
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 01:35 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.05042 seconds
  • Memory Usage 2,442KB
  • 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
  • (1)bbcode_html
  • (12)bbcode_php
  • (5)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
  • (4)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
  • (4)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