Log in

View Full Version : Move 'Upcoming Events' to the top of your Forum Home


mkdevo
07-16-2005, 10:00 PM
simple, i know.. but it was just requested in mod requests, so i figure i might as well put it here.

in your FORUMHOME template, find and remove:

<if condition="$show['upcomingevents']">
<tbody>
<tr>
<td class="thead" colspan="2">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumhome_events')"><img id="collapseimg_forumhome_events" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_forumhome_events].gif" alt="" border="0" /></a>
<if condition="$show['todaysevents']">$vbphrase[todays_events]<else /><phrase 1="$vboptions[showevents]">$vbphrase[upcoming_events_for_the_next_x_days]</phrase></if>
</td>
</tr>
</tbody>
<tbody id="collapseobj_forumhome_events" style="$vbcollapse[collapseobj_forumhome_events]">
<tr>
<td class="alt2"><a href="calendar.php?$session[sessionurl]"><img src="$stylevar[imgdir_misc]/calendar.gif" alt="$vbphrase[calendar]" border="0" /></a></td>
<td class="alt1" width="100%"><div class="smallfont">$upcomingevents</div></td>
</tr>
</tbody>
</if>

In the same template, find $navbar. Below, add:

<!-- begin upcoming events -->
<if condition="$show['upcomingevents']">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tbody>
<tr>
<td class="thead" colspan="2">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumhome_events')"><img id="collapseimg_forumhome_events" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_forumhome_events].gif" alt="" border="0" /></a>
<if condition="$show['todaysevents']">$vbphrase[todays_events]<else /><phrase 1="$vboptions[showevents]">$vbphrase[upcoming_events_for_the_next_x_days]</phrase></if>
</td>
</tr>
</tbody>
<tbody id="collapseobj_forumhome_events" style="$vbcollapse[collapseobj_forumhome_events]">
<tr>
<td class="alt2"><a href="calendar.php?$session[sessionurl]"><img src="$stylevar[imgdir_misc]/calendar.gif" alt="$vbphrase[calendar]" border="0" /></a></td>
<td class="alt1" width="100%"><div class="smallfont">$upcomingevents</div></td>
</tr>
</tbody></table><br />
</if>
<!-- end upcoming events -->


See attached screenshot.

croft
07-23-2005, 09:50 AM
You forgot to add this in your first edit.

<if condition="$show['upcomingevents']">

mkdevo
07-23-2005, 12:24 PM
fixed. thanks!

Tony G
07-24-2005, 01:35 AM
Thanks for sharing your mod. If you don't mind, could you put your instructions in a text file and attach it rather than having the instructions in the thread? It makes it easier for members to refer back to a modification if they need to install it again for whatever reason. :) Thanks.

CocteauBoy
10-19-2005, 12:42 AM
Will this work for 3.5 Gold?

Thanks!

troy

Tony G
10-21-2005, 07:51 AM
Some of the variables will probably vary for 3.5, but if you try make sure you make a backup of your template before doing so.

BPnet
01-25-2006, 05:43 PM
Stupid question:

If i take that code niblet (the <if statement en toto) I can place it as I liek on that page. Sweet.

Our members have asked that the current events box also be displayed when goign to the main calendar page since it makes a nice summation.

I have played with that but I cannot get it to show. Does the calendar.php lack something this is calling?

lvnloud
01-30-2007, 01:30 AM
bump for BP. I'm curious also.

Blturner
01-30-2007, 02:00 AM
Can I do this in 3.6.4? I can't seem to find 'FORUMHOME'

Blturner
01-30-2007, 02:16 AM
Found it. Thanks.

turbo.:R
06-03-2007, 09:18 PM
great hack.. been looking for this....

REIGN SS
09-28-2007, 06:08 AM
you sir are my hero!! Installed on 3.6.8

aamirkhj
03-21-2008, 11:54 PM
Gr8 Mod, excellent work on 3.6.8 pl2