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
Hi, I am a small time user of mybb and a frantic hacker of plugins to tweak them to my specifications  (oh sorry, I thought this was plugin users anonymous....Tongue)

Anyway, I got a great plug in from the mybb site (it was for 1.2 but I changed it about a bit) and another neat FREE plugin from mybb central.

The two plugins are:

Threads on calendar (1.2 updated to 1.4/1.6) - this adds a table to the calendar view. When you view the calendar in day view you get a list of threads made on that day and you can click through to the thread.

Link to threads on calendar in action on my site

Mini Calendar on Index (updated to 1.6 and edited to show on portal).
The mini calendar shows events and birthdays from the main calendar. If you click on a date where the date is in red or green font  (birthday or event) then it takes you to the day view.

My master plan is to edit the threads on calendar plug in so that it changes in TWO ways.

1) Set which forums are chosen so that threads from private forums are not added to the the default calendar

2) automatically adds an event IF there are threads posted on that day (or does NOT create an event if there are no threads posted that day). That way when a user views the mini calendar they will see the days that threads are posted marked as events. Then they can click through and maybe wander about the site a bit.

I know that the MYBB calendar is perceived as pretty useless, but I thought this would be a neat way to add another access point to areas of the forum and try and use that big chunk of functionality.

Unfortunately I do not know how to make adding the event bit work. If I post the plugins here can someone maybe help?

Also, BOTH plugins are "do what you want, just leave my credits in" licences. As the original authors are retired/gone from the community I can't contact them to help me out :/
Yes RateU, that is the one. I edited a tiny bit. I will upload my edit.
Try this one (based on the original plugin):
hmmm, no effect.....it works like before, but the mini calendar is not picking up the days with threads as events
I don't know about mini calendar plugin. I don't have it. I just re-write the plugin for this:


(08-04-2010 02:51 AM)leefish Wrote: [ -> ]Threads on calendar (1.2 updated to 1.4/1.6) - this adds a table to the calendar view. When you view the calendar in day view you get a list of threads made on that day and you can click through to the thread.

Link to threads on calendar in action on my site

My master plan is to edit the threads on calendar plug in so that it changes in TWO ways.

1) Set which forums are chosen so that threads from private forums are not added to the the default calendar

That update shouldn't display threads from private forum?
Oh right - indeed, that was the bit I was planning to do myself.....Hmm, well, I have a forum that only I can see - as admin - but it is showing up in the threads on calendar when I view as guest. Its the RSS posts forum.

http://www.leefish.nl/mybb/calendar.php?...http://www.leefish.nl/mybb/calendar.php?action=dayview&calendar=1&year=2010&mont
(08-04-2010 08:24 AM)RateU Wrote: [ -> ]I don't know about mini calendar plugin. I don't have it. I just re-write the plugin for this:

Well, I don't know much about the mini calendar, but it looks pretty complex... Smile . I thought that if I could get the threads on calendar plug in to add a public EVENT on the calendar to all days where there was a thread showing in the posted threads then the mini calendar would pick up the event automatically. So only one plug in would need to be edited.

EDIT
And back again - I see a request in the xthreads forum - maybe the real solution is a hidden field where threads in a certain forum get added as events on creation? It would be nice if it was possible to apply it to existing posts though.
Are you sure you have replaced the plugin, Lee? The "update" plugin uses formatted username and has a bit different in table header.

This is the demo:

http://mynie.6te.net/demo/calendar.php?a...http://mynie.6te.net/demo/calendar.php?action=dayview&calendar=1&year=2010&mon

I've created two thread:
Test To Calendar - Should be viewed by guest.
Calendar - Shouldn't be viewed by guest.
Hi RateU, I deactivated the plugin, and replaced the file with yours - went back, activated the plugin. You see the result. Weird stuff is happening....
HEADDESK......

Would work a LOT better if I was looking at the right board......I was uploading the changed file to another board...

Now it is on Leefish and looking FINE. Sorry RateU
Glad I refreshed this thread before replying: "Sorry, Lee... I don't know what happened ....?" Biggrin
It's OK, Lee Smile
Pages: 1 2
Reference URL's