PDA

View Full Version : Calendar Enhancements - BBR - vB Event Forums


Pages : 1 [2]

SpikeyWelsh
07-14-2010, 08:38 PM
does it ? not been able to get it to work

SpikeyWelsh
07-15-2010, 02:48 PM
how is this set up as i have only been able to get Farcaster's Event Attendance to show on the calender

nick-harper
07-29-2010, 12:07 PM
Will this work with Events Scheduled for the Future? Also, is it possible to get it to post a thread say a week before the event and then close a week after?

Thanks

Skyrider
07-29-2010, 12:35 PM
Is it possible that this plugin can create automated threads regarding upcoming events?

Dragonsys
08-04-2010, 01:49 PM
yep, I even uninstalled & reinstalled this mod
I get this
Fatal error: Maximum execution time of 30 seconds exceeded in /.../forums/includes/class_dm_event.php(513) : eval()'d code on line 7

This is still an issue. This problem makes this Mod unusable on my boards. I will have to dig into the code and see if I can figure anything out.

Michlerish
08-15-2010, 12:28 AM
Annoying how it only sorts by %title in the forum, no matter what order you specify the thread title to be in.

I love the mod, just wish I could sort the forum by %datetime in ascending order

BBR-APBT
08-19-2010, 12:26 AM
I have not upgraded in some while when I do I will upgrade it. I am still on 4.0.2 Sorry, I just do not have the time to keep up with vb and all there changes and bugs.

Videx
08-19-2010, 01:00 AM
I have not upgraded in some while when I do I will upgrade it. I am still on 4.0.2 Sorry, I just do not have the time to keep up with vb and all there changes and bugs.FWIW, 406 is looking good.

RustyDogma
08-19-2010, 12:44 PM
Great add-on! When you do have time for an update, would be cool to have an option on how to format the forum title using date strings, so folks can set forums to sort on title and put things in the order relevant to their needs:

Pennsylvania AADR Show & Pull Club (PA)- AADR: 07-25-2009 10:00 AM - 05:30 PM

vb_eventforums_eventid : m-d-Y h:i A - h:i A

Have the ability to enter a string in the options menu

d M | g:i - g:i (e) | vb_eventforums_eventid

25 Jul | 10:00 - 17:30 (EDT) | Pennsylvania AADR Show & Pull Club (PA)- AADR

Regardless, love the mod.. has made our scheduling a ton easier, as we use this and export everything to iCal.

So thanks for your work! :D

MelH
08-22-2010, 10:24 PM
Hi BBR-APBT

Firstly thanks for a truly great mod. I can see that it used by many people and greatly appreciated by all.

Unfortunately I cant use it yet because I need an extra feature but I see that you plan to upgrade it soon?

Please consider this feature request – I am happy to pay/donate to you to integrate this for me. I need to be able to attach images to the post as well as place them in the body of the post just like the normal vBulletin posting/attachment system.

Please let me know if you can do this and if so please let me know a time frame.

Thanks
Mel

WATRD
08-24-2010, 12:02 AM
I've also got this problem on my board. My events person can post up event threads fine but cannot edit them... his usergroup settings and calendar settings are turned on.. checked multiple times. But still no "edit".

This is the single biggest problem for me as well. Mod works GREAT! But, I have to edit events for people because they cannot edit them by themselves :( I have checked and rechecked permissions, no joy.

Videx
08-24-2010, 12:32 AM
Yes, I can't quite understand why this hasn't been addressed ages ago. People keep adding this mod, but aren't they quickly discovering this particular and most serious downside?

I'm about ready to uninstall it. I mean, the vb calendar is hard enough for people to understand without being able to edit their events.

WATRD
08-24-2010, 02:39 AM
I see mentions of people editing their template to get the edit button working for everyone. Could someone post up some pointers on that please? I am willing to do so, I just need some hints. Thanks!

jnrdavo
08-24-2010, 08:25 PM
Hi guys, getting an error using this in vbulletin 4.0.6 PL1..

Error is

DELETE FROM moderation
WHERE type = 'thread'
AND threadid = 29049;

threadid doesn't existing anymore in the sql database...

There is a field called primaryid (from memory), can I just change the code in this xml to fix this? Has anybody else notice the same problem?

Wondering if a fix is coming out to resolve this?

bassmonkeys
08-25-2010, 06:26 PM
absolutely charming mod. does exactly what we need.

one lil question thou...

how can i sort the threads generated in the corresponing forum by eventdate?

it seems the %datetime is ignored when having default sorting of threads on title in the forum and then all is sorted by %title. so is it possible to sort it by ascending by %datetime?

thx for the mod and your help

CharlieDelta
09-01-2010, 07:29 PM
When this mod is enabled you cannot RSVP to an event but when I disable this mod you can RSVP. I would assume that is not what is to happen. The event gets posted properly in a new thread however.
Any ideas?

SamirDarji
09-02-2010, 07:47 PM
It sounds like the Event Attendance plugin isn't integrating correctly. Without the right integration plugin, in the vb3 version of these they would behave exactly like you're describing.

Front Range 4x4
09-02-2010, 08:01 PM
CharlieDelta- Have you confirmed each works independently? IIRC you had the RSVP working and are now adding this. I suggest disabling each individually, testing for proper use then try again. I have both working just fine but haven't upgraded past 4.0.2 because it appears something fails on later versions.

CharlieDelta
09-02-2010, 10:01 PM
It sounds like the Event Attendance plugin isn't integrating correctly. Without the right integration plugin, in the vb3 version of these they would behave exactly like you're describing.
Interesting.

CharlieDelta- Have you confirmed each works independently? IIRC you had the RSVP working and are now adding this. I suggest disabling each individually, testing for proper use then try again. I have both working just fine but haven't upgraded past 4.0.2 because it appears something fails on later versions.
Well I am using 4.0.3 so this could be the culprit. You are correct (in fact you helped me with alignment issues), RSVP is working fine but I will try to test event forums with RSVP disabled.

Updated; Tested independently and both work as should but still having same problem when both enabled.

der_darkon
09-07-2010, 08:08 AM
I wonder why the first post in the event-threads is "missing" and it starts counting with number 2.

Since the event-description isn´t a posting (actualy i would prefer it to be one...) this isn´t making any sense to me.

Would it be possible to post the event-description as a normal posting?

Videx
09-07-2010, 11:34 AM
Would it be possible to post the event-description as a normal posting?That might solve a lot of problems if only it were possible (missing avatars, inability to edit events, lack of notification).

RichieBoy67
09-10-2010, 04:13 AM
The first thing I want to do is thank BBR for his hard work. he has spent so much time on this and people just keeping asking for more and more.. Personally, I would go nuts trying to support something like this. At any rate, I thank you for your hard work. It is appreciated.

I have version 4.06 and I am also having permission issues. These cannot be addressed by settings..

If someone does have a work around can it please be posted here?

If not does anyone know of any similar mods? i have a client who relies on this type of mod and it is very important. things were fine until I upgraded her..

If a fix has been posted could someone please save me from having to read each and every post??

Thanks,
Rich

Front Range 4x4
09-10-2010, 04:27 AM
I agree RichieBoy67, this mod is one I rely on in a big way along with Farcaster's for event management. Knowing problems arise when upgrading is why I won't upgrade. Having this working is far more important than any upgrade.

RichieBoy67
09-10-2010, 04:56 AM
Thanks,

I am going to have to work on a fix for this. it is just that I have no idea when I will find the time.

I am getting some database errors but they are related to this permission problem. I believe that is really the only issue and it is what I will try to focus on. I will let you know when I have something. I would never release anything here though because I cannot deal with 8,000 people just telling me what the mod doesn't do that they want it to do.. lol

Hopefully someone else will pop up with a fix before I have to do this. ..lol

yeah, I upgraded the site mainly for the suite package.. This is the only mod having issues though and who knows, some of these issues could have been going on before. I really don't know what has changed from versions 4.1 to 4.06 that would cause this? I guess that would be a great place to start. :)

Have a good one,
Rich

Tony_FPM
09-26-2010, 07:53 AM
WOW man. I just updated the forum to 4.07 and this mod stopped working :(
Will this mod be updated ?

Tony_FPM
09-26-2010, 08:09 AM
Got it working again in 4.07!
Made a stupid mistake with calender id's.

Still a amazing mod!

unknown22
09-26-2010, 09:08 PM
How Can I add upcoming events in the next 30 days under forum here's a picture, so the events would be posted onto a forum board and like this.

https://vborg.vbsupport.ru/

zapiy
10-08-2010, 05:03 PM
I have tried to run 3 extra calendars on my site but when this mod is enabled the 2 new calendars do not work.. ie adding events.. When i disable this mod they work fine.. Any help please?

SamirDarji
10-08-2010, 05:44 PM
Got it working again in 4.07!
Made a stupid mistake with calender id's.

Still a amazing mod!Sounds like it was a simple fix. What did you do?

Harelin
10-10-2010, 05:09 PM
I have tried to run 3 extra calendars on my site but when this mod is enabled the 2 new calendars do not work.. ie adding events.. When i disable this mod they work fine.. Any help please?

I am having the same problem. I would be greatly appreciative if anyone could help with this one.

BBR-APBT
10-19-2010, 02:09 AM
I will update for 4.1 I feel most of the bugs will be pushed out of vb by then and I can make this work properly.

RichieBoy67
10-28-2010, 07:13 AM
That will be great BBR! This is one of those mods some sites just cannot do without...

Thanks! Great work by the way!

guni75
11-01-2010, 10:03 AM
I have tried to run 3 extra calendars on my site but when this mod is enabled the 2 new calendars do not work.. ie adding events.. When i disable this mod they work fine.. Any help please?

Yes good mod.
but same problem

Videx
11-01-2010, 01:57 PM
A fix for the multiple calendar problem was given a while back. I'm not sure why I just spent 10 minutes searching for it, but here it is: https://vborg.vbsupport.ru/showpost.php?p=2019855&postcount=206

psypix
11-05-2010, 02:09 PM
Here is a quick fix to show the edit link to everybody.

Open the calendar_showeventsbit template

Search for <span class="textcontrols">

Below that add:

<a class="editevent" href="calendar.php?{vb:raw session.sessionurl}do=manage&amp;e={vb:raw eventinfo.eventid}">{vb:rawphrase edit_event}</a>

Only the user or admin can edit the event. All other users will get "...you do not have permission to access this page."

Thanks to utahraves for pointing me in the right direction.

edit:
If you want to remove the second edit button (that only admin can see) remove this in the calendar_showeventsbit template

<vb:if condition="$show['caneditevent']"><a class="editevent" href="calendar.php?{vb:raw session.sessionurl}do=manage&amp;e={vb:raw eventinfo.eventid}">{vb:rawphrase edit_event}</a></vb:if>

Videx
11-05-2010, 03:42 PM
Thanks. Oddly, I just had a moderator complain about not being able to edit an event moments before you posted this edit. Hard to believe 173 installs and so few complaints. Obviously we'd rather see the mod fixed, but maybe this can at least hold us until someone figures it out.

chocolate angel
11-07-2010, 10:37 PM
will this work with 3.8.6?

Videx
11-08-2010, 12:03 AM
will this work with 3.8.6?No, but the vb3 version will. See above under "similar mods".

chocolate angel
11-08-2010, 12:35 AM
thanks

Rckcrwlr
11-08-2010, 10:57 AM
I just installed this and am having permissions issues. I have 4 calendars that are linked to 4 new Event Forums. Two of them will not let me post a new event, it is saying that I do not have permission...I am the admin.

The other two I can post the event but then it sits there loading indefinitely.

Any suggestions?

This is exactly what I was looking for.

John

Videx
11-08-2010, 02:01 PM
Verify you have done the multiple calendar fix most recently mentioned in post #284 just a few posts above? I have no idea why the author hasn't yet included this in the download.

stud
11-08-2010, 03:57 PM
This is great! Thanks soo much for developing this.

Sorry if this was discussed already but can this be done in reverse order - having an event posted to the calendar based on a forum post?

Videx
11-08-2010, 04:07 PM
...can this be done in reverse order - having an event posted to the calendar based on a forum post?No. Maybe in vbulletin 10. Gmail is making some inroads in this direction though - I've noticed if I get an email with obvious dates, it sometimes offers to add the event to my calendar. But so far 90% of the time it guesses wrong.

It would be even more difficult with an international crowd, mixing up the days and months, and even the years.

Rckcrwlr
11-08-2010, 07:51 PM
Verify you have done the multiple calendar fix most recently mentioned in post #284 just a few posts above? I have no idea why the author hasn't yet included this in the download.

Made the change in the Plugin manager.

Still doing it.

Any other suggestions?

Thanks for your help.

thincom2000
11-08-2010, 08:08 PM
Great to see that this mod is still being worked on and continued by the community. However, I have had a number of concerns with the product for a while and have been waiting for one of the coders to see where I'm coming from.

This mod has been in desparate need of a performance upgrade for years, and still looks like it hasn't been done. The fact that each threadbit adds 2 queries in event forums is not a good thing, when it can easily be avoided.

You should create a thread-event cache in the first one using the already available list of thread IDs. In other words, fetch the events and custom fields for all threads on the page in one swoop. Of course if an entry is not in your cache for some reason, you can do a second lookup, but this would still be a massive improvement. It is also possible to do for search results.

A lot of the code can also be reduced in size by simply shortening the unnecessarily long $lv_vb_event_forums, etc. variable names. And a lot of the code can be condensed and improved in other ways. Some of the plugins are very long and could help memory consumption by moving them to files (all plugin code is loaded to memory on all pages, not just the ones where your plugin actually does something).

I highly recommend having a look at this mod again from a performance perspective, rather than settling with it in a working state.

Thanks.

mmacrypt
11-09-2010, 06:12 PM
I would like to use this but I'm also wanting the same thing Ted S wanted. I would like the option of clicking something that makes this an Event thread versus every post being an event. I love the concept of it linking to the calendar, we had something just like this when our site was still PHPBB. But I'm not finding any other options right now either. I hope somebody can take over this and get it back from the dead. It seems really close.

BBR-APBT
11-10-2010, 10:29 AM
Verify you have done the multiple calendar fix most recently mentioned in post #284 just a few posts above? I have no idea why the author hasn't yet included this in the download.

Perhaps cause I am busy with my life!!! I already stated I would upgrade it when 4.1 comes out. I do not have time to update my mods every time IB decides they want to push out 20 releases in a year. I have my own sites to worry about.

I would like to use this but I'm also wanting the same thing Ted S wanted. I would like the option of clicking something that makes this an Event thread versus every post being an event. I love the concept of it linking to the calendar, we had something just like this when our site was still PHPBB. But I'm not finding any other options right now either. I hope somebody can take over this and get it back from the dead. It seems really close.
No one is taking over this I will still be working on it. I gave no one permission to re-release it. I have not ran any where. As I stated above I have my own sites to worry about, I run a ferret and reptile rescue, I have two kids, a job and I go to collage. You try to add in time for all the half ass releases IB is putting out.

mmacrypt
11-10-2010, 12:09 PM
My apologies BBR, didn't mean to offend, I understand about being busy but its seems like a few guys a lot smarter than I am offered to help a bit. This seems like a mod that works perfectly for your site and with a few little options, sounds like it would be perfect for other sites also. I would love to also use it, I just it to work like Ted S was saying. And props for doing the reptile rescue, I had 3 burns when I was younger, 2 albino and 1 het. Again, sorry to offend, just seems like a great mod with lots of interest in it.

Rckcrwlr
11-10-2010, 12:10 PM
I have my own sites to worry about, I run a ferret and reptile rescue, I have two kids, a job and I go to collage. You try to add in time for all the half ass releases IB is putting out.

Is that all you have to do... :eek: LOL

Seriously, I know where you are coming from. I really like this mod but cannot get it to work with the four calendars that I am running independently for different organizations.

I will wait for your update.

Just as a "Wish List":


Multiple Calendar Usage
An option to select a Regular Post or Event Forum PostThanks BBR for all your help...Always remember priorities. Family first, income second and the PITAs on VBulletin.org last. LOL

Videx
11-10-2010, 12:49 PM
We're talking about a simple edit that takes a minute to do and another minute to upload. Two minutes for you. But since you refuse to add it, every time someone new runs into the problem they spend hours trying to figure out what they did wrong (nothing), then they post and if they're lucky someone else then spends more time trying to find the solution buried in the thread.

I never said you don't have a life. But let's assume everyone else does too?

Of course, now there's also the solution to the missing edit button that needs to be included in the instructions. So add another five minutes. For you. I wish I could do it for you to save you those ten minutes. Not that I don't have a life and will really miss ten minutes today.

BBR-APBT
11-10-2010, 03:24 PM
After I add those I have to test it and let it run on my site. If it causes errors on my site then I have to fix that. I like to test things I release or else I will have broken releases like IB. How ever I will add links to fix them in my very first post.

702Larry
11-12-2010, 08:02 PM
i had to replace line 583

$type = '&type=range';

not sure if it is documented yet for anyone using Default Add Event Type: 2

GoTTi
11-18-2010, 06:14 AM
The problem is at line #256:

change
for($lv_vb_eventforums_i = 0; $lv_vb_eventforums_i<count($lv_vb_eventforums_map); $lv_vb_eventforums_i+2)

with

for($lv_vb_eventforums_i = 0; $lv_vb_eventforums_i<count($lv_vb_eventforums_map); $lv_vb_eventforums_i+=2)

This fixes the issue when inserting a new event in case of more than one calendar. There might be other issues as I haven't run a deep test yet.

thanks for the fix.

The Rake
11-24-2010, 05:54 AM
Deleted post, as the error in question was a my mistake

Kyojii
12-26-2010, 04:22 AM
I have a really strange error. My avatar seems to have a huge width which pushes the content down. Also, this doesn't happen anywhere else on the forums.

Videx
12-26-2010, 07:49 AM
I have a really strange error. My avatar seems to have a huge width which pushes the content down. Also, this doesn't happen anywhere else on the forums.Probably a style issue. Does it happen with the default vb style?

Kyojii
12-26-2010, 05:47 PM
Probably a style issue. Does it happen with the default vb style?

it actually does. For some reason though on the default the avatar is centered overtop the content. It's as if there are no constraints on the avatar.

The dotted line around the avatar is very wide and have no idea where to fix that. But, when I click on or around the avatar that line shows up with the link to userprofile.

EDIT: NVM, found the error. I had remnants of code left in the additional.css I didn't notice. Thanks for the help though! :)

utahraves
12-27-2010, 08:34 PM
Thanks for the fixes. I just barely looked and saw that there were fixes. Woohoo! Anyway, still waiting on the avatars showing up properly (not just the standard no-avatar picture but the avatar of the actual poster) to be fixed.

rob01
12-27-2010, 11:32 PM
you should add something, like who is attending (might go , will go , cant go), just as facebook

thanks

tagged

SamirDarji
01-01-2011, 11:59 PM
you should add something, like who is attending (might go , will go , cant go), just as facebook

thanks

taggedThat's the event attendance addon listed in the original posting.

sweetpotato
01-05-2011, 02:47 PM
I would like to know how to syn birthday from calendar to forum?

SamirDarji
01-07-2011, 02:33 AM
I would like to know how to syn birthday from calendar to forum?If you're talking about a hack that makes threads for birthdays, this one won't do it, but there is one out there that does. I ran into it once but forgot the name.

sweetpotato
01-07-2011, 07:50 AM
If you're talking about a hack that makes threads for birthdays, this one won't do it, but there is one out there that does. I ran into it once but forgot the name.
Thanh you much. I found this mod https://vborg.vbsupport.ru/showthread.php?t=236131 but now it does not work for vb 4.0.8 anh 4.1.1 beta.

smnet
01-13-2011, 02:52 PM
This doesn't appear to be working in 4.1.1.

If I go to the calendar in question, click on an event then I would expect to land in a thread.... this does not happen.

Ideas?

smnet
01-13-2011, 05:44 PM
This doesn't appear to be working in 4.1.1.

If I go to the calendar in question, click on an event then I would expect to land in a thread.... this does not happen.

Ideas?

Sorry, I saw that I need to remove the installcode. working fine now.

smnet
01-16-2011, 01:23 PM
Just a small improvement for everybody....

This change will ensure all occurrences of the word 'thread' on the page are changed to 'event'... eg, 'print thread' becomes 'print event'. (NOTE: This does not take translations into account)

It also fixes a display error where the event details come before the action / admin / inline mod bar (it should come after, not before).

Open the plugin called "Display Event Details on Thread Page - BBR" (showthread complete hook)... replace all with this:- // we need to initialise this variable here, otherwise on non Event Threads, the var will show as text
$lv_vb_eventforums_eventdetails = "";

// is this a VB event forum?
$lv_vb_eventforums_eventForum = false;
$lv_vb_eventforums_map = preg_split('/[\n:]/', trim($vbulletin->options['lv_vb_eventforums_map']));
for($lv_vb_eventforums_i = 0; $lv_vb_eventforums_i<count($lv_vb_eventforums_map); $lv_vb_eventforums_i+=2)
{
if(intval($lv_vb_eventforums_map[$lv_vb_eventforums_i+1]) == $foruminfo['forumid'])
{
$lv_vb_eventforums_eventForum = true;
break;
}
}

$lv_vb_eventforums_eventid = $threadinfo['lv_vb_eventforums_eventid'];

if($lv_vb_eventforums_eventForum && ($lv_vb_eventforums_eventid > 0) && (!empty($lv_vb_eventforums_eventid)))
{
require_once(DIR . '/includes/functions_calendar.php');
require_once(DIR . '/includes/functions_misc.php');
require_once(DIR . '/includes/functions_newpost.php');
require_once(DIR . '/includes/functions.php');
require_once(DIR . '/includes/functions_user.php');

require_once(DIR . '/includes/class_bbcode.php');
$bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list(), true);

// get the event
$lv_vb_eventforums_event = $vbulletin->db->query_read("
SELECT *, IF(dateline_to = 0, 1, 0) AS singleday
FROM " . TABLE_PREFIX . "event
WHERE eventid = " . intval($lv_vb_eventforums_eventid) . "
");
$lv_vb_eventforums_event = $vbulletin->db->fetch_array($lv_vb_eventforums_event);

$eventinfo = $lv_vb_eventforums_event;

### Added by Farcaster ################################################## ###########################

$offset = $eventinfo['dst'] ? $vbulletin->userinfo['timezoneoffset'] : $vbulletin->userinfo['tzoffset'];
$eventinfo['dateline_from_user'] = $eventinfo['dateline_from'] + $offset * 3600;
$eventinfo['dateline_to_user'] = $eventinfo['dateline_to'] + $offset * 3600;

################################################## ##################################################

// get the user info
$lv_vb_eventforums_user = $vbulletin->db->query_read("
SELECT *
FROM " . TABLE_PREFIX . "user
WHERE userid = " . intval($eventinfo['userid']) . "
");
$lv_vb_eventforums_user = $vbulletin->db->fetch_array($lv_vb_eventforums_user);

// get the calendar info
$lv_vb_eventforums_calendar = $vbulletin->db->query_read("
SELECT *
FROM " . TABLE_PREFIX . "calendar
WHERE calendarid = " . intval($eventinfo['calendarid']) . "
");
$lv_vb_eventforums_calendar = $vbulletin->db->fetch_array($lv_vb_eventforums_calendar);

$calendarinfo = $lv_vb_eventforums_calendar;
$calendarinfo['title'] = '<a href="calendar.php?c=' . $eventinfo['calendarid'] . '">' . $calendarinfo['title'] . '</a>';

// work out offsets etc
$offset = $lv_vb_eventforums_event['utc'] ? $vbulletin->userinfo['timezoneoffset'] : ($vbulletin->userinfo['timezoneoffset'] ? $vbulletin->userinfo['tzoffset'] : $vbulletin->userinfo['timezoneoffset']);
$from = $eventinfo['dateline_from'] + $offset * 3600;
$to = $eventinfo['dateline_to'] + $offset * 3600;

if($lv_vb_eventforums_event['dateline_to'] == 0)
{
$from = $lv_vb_eventforums_event['dateline_from'];
}

$date1 = trim(vbdate($vbulletin->options['dateformat'], $from, false, true, false, true));
$date2 = trim(vbdate($vbulletin->options['dateformat'], $to, false, true, false, true));
$time1 = trim(vbdate($vbulletin->options['timeformat'], $from, false, true, false, true));
$time2 = trim(vbdate($vbulletin->options['timeformat'], $to, false, true, false, true));

// phrases
require_once(DIR . '/includes/functions_databuild.php'); // added by Farcaster
fetch_phrase_group("calendar"); // added by Farcaster

$vbphrase['date_x_to_y'] = fetch_phrase("date_x_to_y", 'calendar');
$vbphrase['time_x_to_y'] = fetch_phrase("time_x_to_y", 'calendar');
$vbphrase['delete_reminder_for_this_event'] = fetch_phrase("delete_reminder_for_this_event", 'calendar');
$vbphrase['request_reminder_for_this_event'] = fetch_phrase("request_reminder_for_this_event", 'calendar');
$vbphrase['event_options'] = fetch_phrase("event_options", 'calendar');
$vbphrase['edit_event'] = fetch_phrase("edit_event", 'calendar');
$vbphrase['delete_event'] = fetch_phrase("delete_event", 'calendar');
$vbphrase['move_event'] = fetch_phrase("move_event", 'calendar');
$vbphrase['event_uses_dst'] = fetch_phrase("event_uses_dst", 'calendar');
$vbphrase['event_posted_for_timezone_x'] = fetch_phrase("event_posted_for_timezone_x", 'calendar');
$vbphrase['lv_vb_eventforums_phrase_noReplies'] = fetch_phrase("lv_vb_eventforums_phrase_noReplies", 'calendar');

// Initialise all the variables we need to set for the template
$show['canmoveevent'] = false;
$show['caneditevent'] = false;
$show['candeleteevent'] = false;

$show['postedby'] = true;
$show['subscribed'] = false;
$show['subscribelink'] = true;
$show['recuroption'] = false;
$show['adjustedday'] = false;
$show['holiday'] = false;

$show['singleday'] = false;
$show['daterange'] = false;

$show['customfields'] = false;
$show['customoption'] = false;

$show['eventoptions'] = false;

// can the user move or delete this event?
$show['canmoveevent'] = can_moderate_calendar($calendarinfo['calendarid'], 'canmoveevents');
$show['candeleteevent'] = can_moderate_calendar($calendarinfo['calendarid'], 'candeleteevents');
$show['caneditevent'] = can_moderate_calendar($calendarinfo['calendarid'], 'caneditevents');

if(isset($lv_vb_eventforums_permissions))
{
// check each usergroup
foreach($lv_vb_eventforums_permissions as $key => $value)
{
// can this user edit the event?
if(!$show['caneditevent'])
{
if($eventinfo['userid'] == $vbulletin->userinfo['userid'])
{
if(($value & $vbulletin->bf_ugp_calendarpermissions['caneditevent']))
{
$show['caneditevent'] = true;
}
}
}
}
}

// show the options box?
if(($show['candeleteevent'] OR $show['canmoveevent'] OR $show['caneditevent']) AND !$show['holiday'])
{
$show['eventoptions'] = true;
}

fetch_musername($eventinfo);

// construct the user info for the event poster
$eventinfo['username'] = $lv_vb_eventforums_user['username'];

// user title
$eventinfo['usertitle'] = $lv_vb_eventforums_user['usertitle'];
if($usertitle != '')
{
$eventinfo['usertitle'] .= '<div class="smallfont" style="margin-bottom:3px;">' . $usertitle . '</div>';
}

//we already have the avatar info, no need to refetch.
fetch_avatar_from_userinfo($eventinfo);

// prepare the member action drop-down menu
$memberaction_dropdown = construct_memberaction_dropdown($eventinfo);

//$avatar = fetch_avatar_url($eventinfo['userid']);
//$eventinfo['avatarurl'] = $avatar[0];


// does the current user have a reminder for this event?
if($lv_vb_eventforums_eventReminderRows != 0)
{
$show['subscribed'] = true;
}

if($eventinfo['dateline_to'] == 0)
{
$show['singleday'] = true;
}

if(strcmp($date1, $date2) != 0)
{
$show['daterange'] = true;
}

if(!$show['daterange'] || $show['singleday'])
{
$eventdate = $date1;
}

$eventinfo['event'] = $bbcode_parser->parse($eventinfo['event'], $foruminfo['forumid'], true);

if ($vbulletin->options['bbr_image_active']) {
$eventid = $eventinfo['eventid'];

$eventinfo['event'] = preg_replace('/<img src="([^"]*)" border="0" alt="" \/>/', '<a href="\\1" rel="' . $vbulletin->options['bbr_image_type'] . '[' . $eventid . ']"><img src="\\1" style="max-width: ' . $vbulletin->options['bbr_image_width'] . 'px; max-height: ' . $vbulletin->options['bbr_image_height'] . 'px; cursor: pointer;" border="0" alt="" /></a>', $eventinfo['event']);
}

$templater = vB_Template::create('spacer_open');
$spacertable1 = $templater->render();

$templater = vB_Template::create('spacer_close');
$spacertable2 = $templater->render();

($hook = vBulletinHook::fetch_hook('calendar_getday_event') ) ? eval($hook) : false; // Added by Farcaster

$templater = vB_Template::create('calendar_showeventsbit');
$templater->register('calendarinfo', $calendarinfo);
$templater->register('customfields', $customfields);
$templater->register('date1', $date1);
$templater->register('date2', $date2);
$templater->register('eventdate', $eventdate);
$templater->register('eventinfo', $eventinfo);
$templater->register('gobutton', $gobutton);
$templater->register('memberaction_dropdown', $memberaction_dropdown);
$templater->register('recurcriteria', $recurcriteria);
$templater->register('spacer_close', $spacer_close);
$templater->register('spacer_open', $spacer_open);
$templater->register('time1', $time1);
$templater->register('time2', $time2);
$lv_vb_eventforums_eventblock = $templater->render();


if($vbulletin->options['lv_vb_eventforums_varForEventDetails'])
{
$lv_vb_eventforums_eventdetails = $lv_vb_eventforums_eventblock;
}
else
{
$postbits = $lv_vb_eventforums_eventblock . $postbits;
}

// if thread is only showing first post, and is an event thread
if($totalposts == 1) // only first post
{
$templater = vB_Template::create('lv_vb_eventforums_noPostSpace r');
$noposts = $templater->render();
$postbits = $postbits . $noposts;
} // is first post

$vbphrase = str_replace('Thread', 'Event', $vbphrase);
$vbphrase = str_replace('thread', 'event', $vbphrase);
}

Enjoy!

utahraves
01-18-2011, 03:53 AM
Just a small improvement for everybody....

This change will ensure all occurrences of the word 'thread' on the page are changed to 'event'... eg, 'print thread' becomes 'print event'. (NOTE: This does not take translations into account)

It also fixes a display error where the event details come before the action / admin / inline mod bar (it should come after, not before).

Open the plugin called "Display Event Details on Thread Page - BBR" (showthread complete hook)... replace all with this:- // we need to initialise this variable here, otherwise on non Event Threads, the var will show as text
$lv_vb_eventforums_eventdetails = "";

// is this a VB event forum?
$lv_vb_eventforums_eventForum = false;
$lv_vb_eventforums_map = preg_split('/[\n:]/', trim($vbulletin->options['lv_vb_eventforums_map']));
for($lv_vb_eventforums_i = 0; $lv_vb_eventforums_i<count($lv_vb_eventforums_map); $lv_vb_eventforums_i+=2)
{
if(intval($lv_vb_eventforums_map[$lv_vb_eventforums_i+1]) == $foruminfo['forumid'])
{
$lv_vb_eventforums_eventForum = true;
break;
}
}

$lv_vb_eventforums_eventid = $threadinfo['lv_vb_eventforums_eventid'];

if($lv_vb_eventforums_eventForum && ($lv_vb_eventforums_eventid > 0) && (!empty($lv_vb_eventforums_eventid)))
{
require_once(DIR . '/includes/functions_calendar.php');
require_once(DIR . '/includes/functions_misc.php');
require_once(DIR . '/includes/functions_newpost.php');
require_once(DIR . '/includes/functions.php');
require_once(DIR . '/includes/functions_user.php');

require_once(DIR . '/includes/class_bbcode.php');
$bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list(), true);

// get the event
$lv_vb_eventforums_event = $vbulletin->db->query_read("
SELECT *, IF(dateline_to = 0, 1, 0) AS singleday
FROM " . TABLE_PREFIX . "event
WHERE eventid = " . intval($lv_vb_eventforums_eventid) . "
");
$lv_vb_eventforums_event = $vbulletin->db->fetch_array($lv_vb_eventforums_event);

$eventinfo = $lv_vb_eventforums_event;

### Added by Farcaster ################################################## ###########################

$offset = $eventinfo['dst'] ? $vbulletin->userinfo['timezoneoffset'] : $vbulletin->userinfo['tzoffset'];
$eventinfo['dateline_from_user'] = $eventinfo['dateline_from'] + $offset * 3600;
$eventinfo['dateline_to_user'] = $eventinfo['dateline_to'] + $offset * 3600;

################################################## ##################################################

// get the user info
$lv_vb_eventforums_user = $vbulletin->db->query_read("
SELECT *
FROM " . TABLE_PREFIX . "user
WHERE userid = " . intval($eventinfo['userid']) . "
");
$lv_vb_eventforums_user = $vbulletin->db->fetch_array($lv_vb_eventforums_user);

// get the calendar info
$lv_vb_eventforums_calendar = $vbulletin->db->query_read("
SELECT *
FROM " . TABLE_PREFIX . "calendar
WHERE calendarid = " . intval($eventinfo['calendarid']) . "
");
$lv_vb_eventforums_calendar = $vbulletin->db->fetch_array($lv_vb_eventforums_calendar);

$calendarinfo = $lv_vb_eventforums_calendar;
$calendarinfo['title'] = '<a href="calendar.php?c=' . $eventinfo['calendarid'] . '">' . $calendarinfo['title'] . '</a>';

// work out offsets etc
$offset = $lv_vb_eventforums_event['utc'] ? $vbulletin->userinfo['timezoneoffset'] : ($vbulletin->userinfo['timezoneoffset'] ? $vbulletin->userinfo['tzoffset'] : $vbulletin->userinfo['timezoneoffset']);
$from = $eventinfo['dateline_from'] + $offset * 3600;
$to = $eventinfo['dateline_to'] + $offset * 3600;

if($lv_vb_eventforums_event['dateline_to'] == 0)
{
$from = $lv_vb_eventforums_event['dateline_from'];
}

$date1 = trim(vbdate($vbulletin->options['dateformat'], $from, false, true, false, true));
$date2 = trim(vbdate($vbulletin->options['dateformat'], $to, false, true, false, true));
$time1 = trim(vbdate($vbulletin->options['timeformat'], $from, false, true, false, true));
$time2 = trim(vbdate($vbulletin->options['timeformat'], $to, false, true, false, true));

// phrases
require_once(DIR . '/includes/functions_databuild.php'); // added by Farcaster
fetch_phrase_group("calendar"); // added by Farcaster

$vbphrase['date_x_to_y'] = fetch_phrase("date_x_to_y", 'calendar');
$vbphrase['time_x_to_y'] = fetch_phrase("time_x_to_y", 'calendar');
$vbphrase['delete_reminder_for_this_event'] = fetch_phrase("delete_reminder_for_this_event", 'calendar');
$vbphrase['request_reminder_for_this_event'] = fetch_phrase("request_reminder_for_this_event", 'calendar');
$vbphrase['event_options'] = fetch_phrase("event_options", 'calendar');
$vbphrase['edit_event'] = fetch_phrase("edit_event", 'calendar');
$vbphrase['delete_event'] = fetch_phrase("delete_event", 'calendar');
$vbphrase['move_event'] = fetch_phrase("move_event", 'calendar');
$vbphrase['event_uses_dst'] = fetch_phrase("event_uses_dst", 'calendar');
$vbphrase['event_posted_for_timezone_x'] = fetch_phrase("event_posted_for_timezone_x", 'calendar');
$vbphrase['lv_vb_eventforums_phrase_noReplies'] = fetch_phrase("lv_vb_eventforums_phrase_noReplies", 'calendar');

// Initialise all the variables we need to set for the template
$show['canmoveevent'] = false;
$show['caneditevent'] = false;
$show['candeleteevent'] = false;

$show['postedby'] = true;
$show['subscribed'] = false;
$show['subscribelink'] = true;
$show['recuroption'] = false;
$show['adjustedday'] = false;
$show['holiday'] = false;

$show['singleday'] = false;
$show['daterange'] = false;

$show['customfields'] = false;
$show['customoption'] = false;

$show['eventoptions'] = false;

// can the user move or delete this event?
$show['canmoveevent'] = can_moderate_calendar($calendarinfo['calendarid'], 'canmoveevents');
$show['candeleteevent'] = can_moderate_calendar($calendarinfo['calendarid'], 'candeleteevents');
$show['caneditevent'] = can_moderate_calendar($calendarinfo['calendarid'], 'caneditevents');

if(isset($lv_vb_eventforums_permissions))
{
// check each usergroup
foreach($lv_vb_eventforums_permissions as $key => $value)
{
// can this user edit the event?
if(!$show['caneditevent'])
{
if($eventinfo['userid'] == $vbulletin->userinfo['userid'])
{
if(($value & $vbulletin->bf_ugp_calendarpermissions['caneditevent']))
{
$show['caneditevent'] = true;
}
}
}
}
}

// show the options box?
if(($show['candeleteevent'] OR $show['canmoveevent'] OR $show['caneditevent']) AND !$show['holiday'])
{
$show['eventoptions'] = true;
}

fetch_musername($eventinfo);

// construct the user info for the event poster
$eventinfo['username'] = $lv_vb_eventforums_user['username'];

// user title
$eventinfo['usertitle'] = $lv_vb_eventforums_user['usertitle'];
if($usertitle != '')
{
$eventinfo['usertitle'] .= '<div class="smallfont" style="margin-bottom:3px;">' . $usertitle . '</div>';
}

//we already have the avatar info, no need to refetch.
fetch_avatar_from_userinfo($eventinfo);

// prepare the member action drop-down menu
$memberaction_dropdown = construct_memberaction_dropdown($eventinfo);

//$avatar = fetch_avatar_url($eventinfo['userid']);
//$eventinfo['avatarurl'] = $avatar[0];


// does the current user have a reminder for this event?
if($lv_vb_eventforums_eventReminderRows != 0)
{
$show['subscribed'] = true;
}

if($eventinfo['dateline_to'] == 0)
{
$show['singleday'] = true;
}

if(strcmp($date1, $date2) != 0)
{
$show['daterange'] = true;
}

if(!$show['daterange'] || $show['singleday'])
{
$eventdate = $date1;
}

$eventinfo['event'] = $bbcode_parser->parse($eventinfo['event'], $foruminfo['forumid'], true);

if ($vbulletin->options['bbr_image_active']) {
$eventid = $eventinfo['eventid'];

$eventinfo['event'] = preg_replace('/<img src="([^"]*)" border="0" alt="" \/>/', '<a href="\\1" rel="' . $vbulletin->options['bbr_image_type'] . '[' . $eventid . ']"><img src="\\1" style="max-width: ' . $vbulletin->options['bbr_image_width'] . 'px; max-height: ' . $vbulletin->options['bbr_image_height'] . 'px; cursor: pointer;" border="0" alt="" /></a>', $eventinfo['event']);
}

$templater = vB_Template::create('spacer_open');
$spacertable1 = $templater->render();

$templater = vB_Template::create('spacer_close');
$spacertable2 = $templater->render();

($hook = vBulletinHook::fetch_hook('calendar_getday_event') ) ? eval($hook) : false; // Added by Farcaster

$templater = vB_Template::create('calendar_showeventsbit');
$templater->register('calendarinfo', $calendarinfo);
$templater->register('customfields', $customfields);
$templater->register('date1', $date1);
$templater->register('date2', $date2);
$templater->register('eventdate', $eventdate);
$templater->register('eventinfo', $eventinfo);
$templater->register('gobutton', $gobutton);
$templater->register('memberaction_dropdown', $memberaction_dropdown);
$templater->register('recurcriteria', $recurcriteria);
$templater->register('spacer_close', $spacer_close);
$templater->register('spacer_open', $spacer_open);
$templater->register('time1', $time1);
$templater->register('time2', $time2);
$lv_vb_eventforums_eventblock = $templater->render();


if($vbulletin->options['lv_vb_eventforums_varForEventDetails'])
{
$lv_vb_eventforums_eventdetails = $lv_vb_eventforums_eventblock;
}
else
{
$postbits = $lv_vb_eventforums_eventblock . $postbits;
}

// if thread is only showing first post, and is an event thread
if($totalposts == 1) // only first post
{
$templater = vB_Template::create('lv_vb_eventforums_noPostSpace r');
$noposts = $templater->render();
$postbits = $postbits . $noposts;
} // is first post

$vbphrase = str_replace('Thread', 'Event', $vbphrase);
$vbphrase = str_replace('thread', 'event', $vbphrase);
}

Enjoy!
love this, thank you!

deverill2010
01-18-2011, 10:03 PM
Hello!

Ok, I am not sure if this mod is to blame, but I am now receiving a new "vBulletin Database Error!".

When a new calendar event is created, the mod creates a new thread in a forum, as the mod is designed to do. However, the forum is moderated and new threads require approval.

When a new event is created, I receive two emails. The first is the error email (see below). And the second is the new thread notification, which is normal. Here is the error:

Database error in vBulletin 4.0.1:

Invalid SQL:

DELETE FROM vb_moderation
WHERE type = 'thread'
AND threadid = 43476;

MySQL Error : Unknown column 'threadid' in 'where clause'
Error Number : 1054
Request Date : Thursday, February 11th 2010 @ 12:21:57 AM
Error Date : Thursday, February 11th 2010 @ 12:21:57 AM
Script : http://www.allbowling.com/forum/calendar.php?do=update&e=
Referrer : http://www.allbowling.com/forum/calendar.php?do=add&type=single&c=1
IP Address : [userip]
Username : [username]
Classname : vB_Database
MySQL Version :


Does anyone have this mod installed where the target forum requires moderation? Can anyone duplicate this?

Thanks in advance!

Has this been solved? I need the threads to be moderated before hand so I can't just switch it off.

Any ideas? Thank you for such a ace mod!

deverill2010
01-20-2011, 07:40 PM
Sorted.

SamirDarji
01-21-2011, 07:15 PM
Sorted.How did you fix it?

deverill2010
01-22-2011, 07:02 AM
Wasnt referring to my above issue sorry, I had another problem that I posted but I fixed that.

I don't know how to fix the database error it gives if you use modertion, so I have had to turn moderation off.

Mastar
01-24-2011, 05:48 PM
It seems as if this doesn't work on vb 4.1.1

smnet
01-25-2011, 06:57 AM
It seems as if this doesn't work on vb 4.1.1

It's working for me. It will not work for existing events - that is already a known feature / bug.

It will only work for new events. To make old ones work just edit / save the event.

smnet
01-25-2011, 06:58 AM
Wasnt referring to my above issue sorry, I had another problem that I posted but I fixed that.

I don't know how to fix the database error it gives if you use modertion, so I have had to turn moderation off.

How can I reproduce this? I might be able to share a fix if it affects my board - I will need to fix it.

deverill2010
01-27-2011, 09:38 PM
I just had it set so that the events were moderated and that the forum they were posted too were moderated. When those were set, if you tried to submit a event it popped up with that database error.

I'd have to hit back to get off the screen, I'd then browse to the forum where they are posted too and there would be the event I just submitted waiting to be moderated. So it is working but just thowing up that error page.

I know I defo had moderation on on the forum. Cant remember if I had moderation on for events added ion the calendar, there is that option isn't there? Or id I just make that up?

I can't remember now sorry as I've had to disable moderation so I can use it.

I do still want moderation so if you figure it out, please let me know.

smnet
01-28-2011, 11:00 AM
Can you paste me the exact error message?

zapiy
02-01-2011, 04:49 PM
The problem is at line #256:

change
for($lv_vb_eventforums_i = 0; $lv_vb_eventforums_i<count($lv_vb_eventforums_map); $lv_vb_eventforums_i+2)

with

for($lv_vb_eventforums_i = 0; $lv_vb_eventforums_i<count($lv_vb_eventforums_map); $lv_vb_eventforums_i+=2)

This fixes the issue when inserting a new event in case of more than one calendar. There might be other issues as I haven't run a deep test yet.

Which file?

Videx
02-01-2011, 05:28 PM
Which file?There's only one file included with this mod.

Mastar
02-06-2011, 02:02 PM
This doesn't work on my vb4.1.1!

When trying to submit the event the page just goes white, throws no errors or any messages!

Disable the mod, it works fine.

Raul7
02-06-2011, 10:29 PM
I'm looking for the original functionality this modification provided which let sites bring events in with forum posts and did so in a very simple to use way.

Not an event? Nothing is added. Event? Add the calendar stuff. Your updated code still makes that all possible but I will extend it to display the right links to let people create threads vs events.

I fully respect your desire to keep this streamlined and won't post any code to your thread knowing the clutter having other features could cause.

Hi Ted,

anyway you can send me the code in PM? i would really appreciate it.

hiker
02-07-2011, 05:04 PM
It was asked earlier if this was possible, just wondering if there's a solution yet;

I don't want to create a separate forum for events, I'd like some way to use my existing forums and post events from them.... or, post an event on the calendar and choose which forum it can create a thread to.

---without making every thread in that forum convert to an event.

Any progress on this?

Thanks.

Raul7
02-08-2011, 06:30 AM
It was asked earlier if this was possible, just wondering if there's a solution yet;

I don't want to create a separate forum for events, I'd like some way to use my existing forums and post events from them.... or, post an event on the calendar and choose which forum it can create a thread to.

---without making every thread in that forum convert to an event.

Any progress on this?

Thanks.
i asked ted to send me his code, but for the time being i have "DISABLED" newthread_start plugin in plugin manager of admin CP and it seems to be working fine !!! you add event from Calendar and u make thread from forum !!!

if anyone has a better solution please share !

hiker
02-08-2011, 03:32 PM
i asked ted to send me his code, but for the time being i have "DISABLED" newthread_start plugin in plugin manager of admin CP and it seems to be working fine !!! you add event from Calendar and u make thread from forum !!!

if anyone has a better solution please share !

So this would allow choosing either event or thread while posting in a forum?

And what about from the calendar side, would this allow choice of which forum to post to?

EasyEazy
02-13-2011, 08:03 AM
not sure if anyone has posted this before.

Great mod btw.

when it creates a thread is there anyway to change the date format in the thread title.

It currently shows 02-18-2011 for the 18th Feb

I want it to show 18-02-2011

anyone shed any light on this?