PDA

View Full Version : Calendar Enhancements - Show Events & Birthdays on Additional Forum Pages


Farcaster
07 Sep 2006, 22:16
This hack will allow you to display upcomming events and birthdays at the top of the forum display, show thread and/or search pages. It uses the forums normal calendar permission rules, so only authorized users will be able to see your forum's events. The hack will correctly install for both 3.5.x and 3.6.0 version forums.

Installation:
1. Use the Product Manager to import the product file product-rah_events_on_forum_pages_1_1_0
2. Configure the product options as desired under the vBulletin options, "Events on Forum Pages".
3. Use the Style Manager to add the code below to the bottom of the navbar template.

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<!-- today's birthdays -->
<if condition="$show['birthdays']">
<tbody>
<tr>
<td class="thead" colspan="2">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumhome_birthdays')"><img id="collapseimg_forumhome_birthdays" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_forumhome_birthdays].gif" alt="" border="0" /></a>
$vbphrase[todays_birthdays]
</td>
</tr>
</tbody>
<tbody id="collapseobj_forumhome_birthdays" style="$vbcollapse[collapseobj_forumhome_birthdays]">
<tr>
<td class="alt2"><a href="calendar.php?$session[sessionurl]do=getday&day=$today&sb=1"><img src="$stylevar[imgdir_misc]/birthday.gif" alt="$vbphrase[view_birthdays]" border="0" /></a></td>
<td class="alt1" width="100%"><div class="smallfont">$birthdays</div></td>
</tr>
</tbody>
</if>
<!-- end today's birthdays -->
<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_q]"><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>
</table>
<br />

Note that if you do not want the events to be shown both at the top of the forum home page and at the bottom, you will need to remove the original tables from the forumhome template.

That's it. You're done. Enjoy!

Please find sample screenshots of the options menu and the forum display page attached. If you have any questions, please feel free to PM me.

aveon
08 Sep 2006, 00:42
nice hack installed thanx

marlita
08 Sep 2006, 05:13
it doesn't work on my site. Are there any known bugs or issues with other mods that you know of?

Farcaster
08 Sep 2006, 06:38
No known bugs at this point. I originally wrote this mod for a fellow who is running a 3.5.4 board, and it has been running there without issue for the past three weeks or so, and I've been running it on a 3.6.0 test site also without any problems. Can you specify exactly what is happening?

And, additionally:
- If you aren't seeing the events on the forumdisplay, showthread or search pages, are you able to at least see them at the top of the forumhome page, just under the navbar?
- Are all the option configurations set to "Yes"?

MrNase
08 Sep 2006, 19:06
One addition that might be handy for some: Add an option to select on which forums this information is shown. Imagine someone has a forum where people discuss events - it would be good to show the upcoming events only on that forum because on the other forums it's just an information-overkill. :)

I'll click install later - I am now busy with other things but I will install this addon for sure. Thank you! :)

Snake
09 Sep 2006, 18:40
Working good... :)

mustangdotcom
11 Sep 2006, 11:19
Excellent Work!

Is there a way to modify the number of days? I would like to show upcoming events for the next 30 days.

JenniferK
12 Sep 2006, 15:25
Any way to get this to just appear in a vBA CMPS module rather than the forum pages?

Farcaster
13 Sep 2006, 00:13
Excellent Work!

Is there a way to modify the number of days? I would like to show upcoming events for the next 30 days.

It uses the default settings for your upcoming events as set in the vBulletin options for the forumhome page. So, if you change the setting there, it will change it for your forum home and for every page this is installed on.

Farcaster
13 Sep 2006, 00:17
Any way to get this to just appear in a vBA CMPS module rather than the forum pages?

In its present form no, but I will see about adding it in a future revision.

soulface
13 Sep 2006, 07:46
It'd be nice, if there is an option to set specific forum for events & birthdays. for example, I've an forum for members birthdays.. so i only want to show birthdays on that section.. thx..

//Edit .. Oops sorry! MrNase already posted this :p

JenniferK
13 Sep 2006, 17:11
In its present form no, but I will see about adding it in a future revision.


That would be great - thank you! :)

cheesegrits
21 Sep 2006, 22:48
One addition that might be handy for some: Add an option to select on which forums this information is shown. Imagine someone has a forum where people discuss events - it would be good to show the upcoming events only on that forum because on the other forums it's just an information-overkill. :)


I second the request for per-forum selection. Although I'd suggest having it the other way round - a list of forums NOT to display it on.

For instance, I use the "Event Forums (http://www.vbulletin.org/forum/showthread.php?t=123416)" mod, which already puts a display of X days at the top of calendar-linked forums. In those forums I'd like to use the Event Forums display for 7 days worth of events, but use your mod to display just a day or two everywhere else.

Other than that, this mod looks perfect for my site.

-- hugh

Farcaster
20 Oct 2006, 06:59
I have confirmed that this hack is working with 3.6.0 through 3.6.2.

SHD Born2Fight
15 Nov 2006, 14:34
I get an error when I use it:

Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of convert_bits_to_array(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer. in /is/htdocs/wp1012303_QBSRR1K0AQ/www/board/forumdisplay.php(106) : eval()'d code on line 103


AND

vBulletin Message
Unable to add cookies, header already sent.
File: /is/htdocs/wp1012303_QBSRR1K0AQ/www/board/forumdisplay.php(106) : eval()'d code
Line: 103

Canis Firebrand
15 Nov 2006, 14:41
Awesome. I had just did the templace edit manually to show on Forum home and was dreading having to do it all by hand to show other places.

I removed my manual template edit from FORUMHOME and followed your directions.

This hack did the trick very nicely to have it show other places with only the one template edit in navbar. Thanks!

GHoSti
20 Dec 2006, 06:20
Hi!

I have the following problem:

On the forum index I see this (index.php):
http://www.necronia.de/home1.jpg
That's ok :) But when I switch to a forum I see this (forumdisplay.php):
http://www.necronia.de/forum1.jpg
Same in viewing a thread (showthread.php) :(

Can someone help me? :) I'm using vBulletin 3.6.4.

Thx,
GHoSti

Fangorn
25 Feb 2007, 12:30
Hello,

Thank you for this great addon!

One suggestion but I don't know if it's doable since it's probably intertwined with VB... It would be great to be able to select which calendar to display on which forum since VB allows for creation of multiple calendars.

Once again, thanks a lot for this mod, it's exactly what I've been looking for!


- Jeff

ConKien
27 Feb 2007, 05:12
Farcaster, like Jeff suggest, is there a way to make these info display on a specific forum only?

kizzmet
06 Mar 2007, 14:30
Confirming that this works on 3.6.3

Great hack, just what I was looking for. Thanks!

abroad
08 Mar 2007, 11:05
I am using 3.6.5 but after installation nothing changed on my site...no upcoming events...nothing... all options are "YES"?

Can somebody help me?

memorex
13 Apr 2007, 13:29
I love this hack, Thanks Farcaster.

I also would love to use this on vbadvanced portal.

ThorstenA
13 Apr 2007, 13:46
I'd like to only see special calendars on special forums.

Benj
13 Apr 2007, 23:57
sweet how many additional queries does this add?

nebu
21 Apr 2007, 22:00
this hack didnt work with 3.6.4.
i installed, edited the template and ... nothing happaned.

all to yes!

there is only 1 change. i have 1 more line between the navbar and
the forum, but it is a clear line.
nothing in it :(

can someone help me?


ADD:
after reboot .... they appear.
but!
only the today events!
why doesnt appear upcoming events?

tell me, how i can set the days for the events to display.

santimariani
21 May 2007, 20:37
Help! I am getting the following error:

Database error in vBulletin 3.6.5:

Invalid SQL:

SELECT
c.calendarid,
max(CASE WHEN cp.calendarpermissions IS NULL THEN
ug.calendarpermissions
ELSE cp.calendarpermissions
END) maxPerm
FROM
usergroup ug
CROSS JOIN calendar c
LEFT JOIN calendarpermission cp ON
c.calendarid = cp.calendarid
AND cp.usergroupid = ug.usergroupid
WHERE
ug.usergroupid IN (6, 09)
GROUP BY
c.calendarid;;

MySQL Error : Unknown column 'ug.usergroupid' in 'on clause'
Error Number : 1054
Date : Monday, May 21st 2007 @ 08:36:59 PM
Script : XXXX
Referrer : XXXX
IP Address : XXX
Username : XXX
Classname : vB_Database

Thanks for what is promising to be a very useful mod. :)

santimariani
14 Jun 2007, 17:54
I was able to install it and it is a very good mod, but... it did add about 5 queries, so, sadly, I had to uninstall it. Is there any way of decreasing the quearies this mod requires? That would be great.

Ignicoccus
07 Aug 2007, 14:51
Hi,

I have the problem that your mod shows the birthdays on forumhome, even though I did switch this feature off (I only want to show events). Any ideas on this ?

joker2040
21 Aug 2007, 01:56
Works on 3.6.5

Farcaster
21 Aug 2007, 21:21
Hi,

I have the problem that your mod shows the birthdays on forumhome, even though I did switch this feature off (I only want to show events). Any ideas on this ?

Have you also disabled the vBulletin option to show birthdays on the forumhome?

voter
28 Jun 2008, 20:26
Not functioning in 3.7.1 when one uses the nice ad_on hooks of vbulleting and trying to put into ad_navbar_below the code to escape editing navbar template :(

But it is ok when one edits navbar

Deimos
13 Oct 2009, 12:21
Would it be possible to choose a specific calendar to display only on a certain forum, or forum(S)?

JWL
13 Oct 2009, 16:31
I really like this product, It is simple and easy, Works thus far in my 3.8.4 PL1 system

What I would like to do as well is add the Events Posting to a Thread, much like the mod Here

voter
27 Nov 2009, 23:10
It is Buggy as of being in showthread_start and forumdisplay_start hook it generates the error.
PHP Warning: Call-time pass-by-reference has been deprecated in showthread.php(112) : eval()'d code on line 104 or forumdisplay.php(111) : eval()'d code on line 111

Disabled.

Edgespeeder06
09 May 2011, 04:44
where in the code can I change the x amount of days for forum events?