Updating a plugin for extra functionality
leefish Offline
Hamster
*****
Posts: 1,009
Joined: Apr 2010
Post: #1
Updating a plugin for extra functionality
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 :/


[Image: leelink.gif]
MYBB1.6 & XThreads
(This post was last modified: 08-04-2010 03:42 AM by leefish.)
08-04-2010 02:51 AM
Visit this user's website Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #2
RE: Updating a plugin for extra functionality
Do you mean this plugin?

http://mods.mybb.com/archive/view/thread...http://mods.mybb.com/archive/view/threads-posted-o

08-04-2010 06:19 AM
Find all posts by this user Quote this message in a reply
leefish Offline
Hamster
*****
Posts: 1,009
Joined: Apr 2010
Post: #3
RE: Updating a plugin for extra functionality
Yes RateU, that is the one. I edited a tiny bit. I will upload my edit.


Attached File(s)
.rar  goughy_calendar_threads.rar (Size: 1.1 KB / Downloads: 499)


[Image: leelink.gif]
MYBB1.6 & XThreads
(This post was last modified: 08-04-2010 07:07 AM by leefish.)
08-04-2010 07:02 AM
Visit this user's website Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #4
RE: Updating a plugin for extra functionality
Try this one (based on the original plugin):


Attached File(s)
.php  goughy_calendar_threads.php (Size: 3.22 KB / Downloads: 535)

08-04-2010 07:35 AM
Find all posts by this user Quote this message in a reply
leefish Offline
Hamster
*****
Posts: 1,009
Joined: Apr 2010
Post: #5
RE: Updating a plugin for extra functionality
hmmm, no effect.....it works like before, but the mini calendar is not picking up the days with threads as events


[Image: leelink.gif]
MYBB1.6 & XThreads
08-04-2010 08:15 AM
Visit this user's website Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #6
RE: Updating a plugin for extra functionality
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?

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


[Image: leelink.gif]
MYBB1.6 & XThreads
(This post was last modified: 08-04-2010 08:43 AM by leefish.)
08-04-2010 08:30 AM
Visit this user's website Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #8
RE: Updating a plugin for extra functionality
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.

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


[Image: leelink.gif]
MYBB1.6 & XThreads
(This post was last modified: 08-04-2010 09:00 AM by leefish.)
08-04-2010 08:52 AM
Visit this user's website Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #10
RE: Updating a plugin for extra functionality
Glad I refreshed this thread before replying: "Sorry, Lee... I don't know what happened ....?" Biggrin
It's OK, Lee Smile

08-04-2010 09:08 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

 Standard Tools
Forum Jump: