Back to vBulletin 3.8 Template Modifications

Adding RSS and other options to Forum home page.
Mod Version: 1.3, by KID_1194

vB Version: 3.8.4 Rating: (2 votes - 5.00 average) Installs: 31
Released: 26 Oct 2009 Last Update: Never Downloads: 1
Not Supported Template Edits Translations  

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

Spoiler (click to open)


Quote by Xceptional
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)
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

Close


** 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


** إذا اردت إخفاء ايقوة إنشاء موضوع و آخر المشاركات عن الزوار
يرجى مراجعة هذا الرد

Spoiler (click to open)


Quote by Xceptional
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)
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

Close


** 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

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

Download

No files for download.

Supporters / CoAuthors

  • KID_1194

Screenshots

Click image for larger version
Name:	rss.jpg
Views:	1871
Size:	12.1 KB
ID:	105672  

Similar Mods

[release] Options Column Forumhome Variation vBulletin 2.x Template Modifications

vblts.ru supports vBulletin®, 2022-2024