Updating a plugin for extra functionality
leefish Offline
Hamster
*****
Posts: 1,009
Joined: Apr 2010
Post: #11
RE: Updating a plugin for extra functionality
so, next thing is the events - Ive been looking about - there are almost no mods for the calendar


[Image: leelink.gif]
MYBB1.6 & XThreads
08-04-2010 11:09 AM
Visit this user's website Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #12
RE: Updating a plugin for extra functionality
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.

My Blog
08-04-2010 10:40 PM
Find all posts by this user Quote this message in a reply
leefish Offline
Hamster
*****
Posts: 1,009
Joined: Apr 2010
Post: #13
RE: Updating a plugin for extra functionality
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.


Attached File(s)
.zip  Index_Calendar.zip (Size: 8.66 KB / Downloads: 455)


[Image: leelink.gif]
MYBB1.6 & XThreads
08-05-2010 12:08 AM
Visit this user's website Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #14
RE: Updating a plugin for extra functionality
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...


My Blog
08-05-2010 08:25 AM
Find all posts by this user Quote this message in a reply
leefish Offline
Hamster
*****
Posts: 1,009
Joined: Apr 2010
Post: #15
RE: Updating a plugin for extra functionality
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.


[Image: leelink.gif]
MYBB1.6 & XThreads
08-05-2010 08:30 AM
Visit this user's website Find all posts by this user Quote this message in a reply
scatterbrain Offline
Junior Member
**
Posts: 1
Joined: Jan 2011
Post: #16
RE: Updating a plugin for extra functionality
(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?
01-14-2011 10:33 PM
Find all posts by this user Quote this message in a reply
leefish Offline
Hamster
*****
Posts: 1,009
Joined: Apr 2010
Post: #17
RE: Updating a plugin for extra functionality
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


[Image: leelink.gif]
MYBB1.6 & XThreads
01-15-2011 01:08 AM
Visit this user's website Find all posts by this user Quote this message in a reply
ollie2015 Offline
Member
***
Posts: 90
Joined: Jan 2015
Post: #18
RE: Updating a plugin for extra functionality
how we doing with this?
09-20-2015 10:01 PM
Find all posts by this user Quote this message in a reply
leefish Offline
Hamster
*****
Posts: 1,009
Joined: Apr 2010
Post: #19
RE: Updating a plugin for extra functionality
(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....


[Image: leelink.gif]
MYBB1.6 & XThreads
09-21-2015 12:35 AM
Visit this user's website Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

 Standard Tools
Forum Jump: