MyBB Hacks

Full Version: Updating a plugin for extra functionality
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
so, next thing is the events - Ive been looking about - there are almost no mods for the calendar
Generally, it would be considered better for the plugin to pull threads on the day, rather than inserting events.  The latter is generally considered to be adding redundancy, which usually isn't desired because it can introduce data inconsistencies.

For example, if the thread gets deleted, the system needs to delete the event.  If the thread gets moved (to private forum)/unapproved, the system needs to modify the event, somehow, to reflect the change.

I would imagine that changing the calendar plugin to pull from threads rather than events (note, this is a replacement thing, which means that it will no longer display events) shouldn't be too difficult.  I would think that most of it would be replacing references to the events table with the threads table, but I haven't seen the code so I can't really say much.
I see - very smart. Hmm. I will have a look at the code for events - meanwhile, here is the plug in file....I think it is ok to post it here as Lex said if you want this and are not a subscriber, just PM and I will give it to you as it is ONLY a conversion of a free 1.2 plug in.
Yeah, looks like one could simply replace the line:

PHP Code:
$events_cache = get_events(1, $now, $nextm, 0);

with a function which retrieves the posts within the, previous month?, taking into consideration permissions.  Haven't double checked, but that should probably do it.
Don't particularly like it too much, as you could be potentially pulling out a lot of posts...

Hmm that could be very heavy on the database I guess. I have a lot of posts (I waffle a lot).....I guess I can try it - if it blows up the forum then we will know.
(08-05-2010 12:08 AM)leefish Wrote: [ -> ]I see - very smart. Hmm. I will have a look at the code for events - meanwhile, here is the plug in file....I think it is ok to post it here as Lex said if you want this and are not a subscriber, just PM and I will give it to you as it is ONLY a conversion of a free 1.2 plug in.

Sorry for being such a newbie, but how do you install your plugin/hack? I tried placing the files in the obvious directories but no luck  Frown

I got the error:
"This plugin is incompatible with MyBB 1601"

Do you have any suggestions? Also it seems you guys were really into improving the Calendar, have you come up with a better solution?
Hi there - that Index Calendar is probably a 1.4 file - you need to open it and look for this bit (near the top)

"compatibility" => "1.4"

Change that to 1*

Put it in the forum root/inc/plugins folder.

You will need to add this to the portal/index template where you want the calendar to show

$spc
how we doing with this?
(09-20-2015 10:01 PM)ollie2015 Wrote: [ -> ]how we doing with this?

As the last post was in January 2011 I would say we were moving so slowly it could be perceived as stopped....
Pages: 1 2
Reference URL's