MyBB Community Forums

Full Version: Shochu's Plugin List: Unread PM Notification & Table Tags
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
---------------------------
Shochu's PR2 Plugins
---------------------------


Unread PM Notification

This is my first plugin and it's rather simple. On my boards it came to my attention that a lot of people would not notice when they had unread PM's because the text in the welcome back panel is rather small. If you cancel the popup (or the popup gets blocked) it's very easy for your users to forget they have an unread PM.

This plugin will display a "you have an unread PM notification panel" at the top of the board whenever a user has an unread PM. I'm using it on my boards now and haven't noticed any problems yet.

Here are some screenshots of the plugin.

Just download the unreadpm.php file and put it in your /inc/plugin folder. Activate from the plugin manager of admincp and you're good to go.

You can change the message along with the table background and border colors from the admin panel.

Please let me know if you have any problems with it. I'll do my best to fix any bugs or add required features. Smile

Also, I wanted to thank MusicalMidget (if he's still around) because I used his boardmsg plugin as a starting point for this plugin. Hopefully he doesn't mind Toungue

Great mod, I will use it Smile
Great mod!
I'm using it, great mod! Smile
Customizable Table Tags v1.2


Just finished up my second plugin. I've noticed that there is no good way to display table data in a forum post. Now for most forums that's probably not an issue but my forums are for a RPG I enjoy and often times I found it difficult to format large amounts of data (weapons and armor stats, spell information etc.).

I decided to make a customizable table tag plugin. Not only does it give your users the ability to put html style tables into their posts but the tables are sortable as well! This feature makes use of javascript and can be disabled within the plugin settings if you don't want to allow it.

The tables are customizable through custom css which you can edit from the admincp.

I've attached some screenshots of the plugin.

To install the plugin just download the zip file, unzip it and read the installation.txt. If you don't want sortable tables then all you have to do is copy table_tag.php to your inc/plugin folder. If you want the sortable js tables then you need to do just a few more simple steps (no code modification required).

I wanted to thank the creator of the sorttable.js file which I got from this website

http://www.kryogenix.org/code/browser/sorttable/

--------------
Creating Tables
--------------

You create tables in almost exactly the same way you would with html except the tags use [] instead of <>

Non Sortable Table Example:

[table]
[tr]
[th]Header1[/th]
[th]Header2[/th]
[/tr]
[tr]
[td]data1[/td]
[td]data2[/td]
[/tr]
[/table]

Sortable Table Example*:

[table=sortable]
[tr]
[th]Header1[/th]
[th]Header2[/th]
[/tr]
[tr]
[td]data1[/td]
[td]data2[/td]
[/tr]
[/table]

Shaded Sortable Table Example*:

[table=sortable]
[tr]
[th]Header1[/th]
[th]Header2[/th]
[th]Header3[/th]
[/tr]
[tr]
[td=shaded]data1[/td]
[td]data2[/td]
[td=shaded]data3[/td]
[/tr]
[/table]


*Note that for the sorting to work you must enable the javascript from the admincp. If you don't enable javascript then the [table=sortable] tag will not be parsed.


Please note that things like colspan and rowspan are not currently supported. Also, if you use the sortable tables then the table header links will use whatever link css you have set for your theme. If you would like to change this then you can add the following css to your theme (at the very bottom in the theme editor in admincp).

a.sortheader:link {
    color:#ffffff;
    font-weight: bold;
    text-decoration: none;
}


a.sortheader:hover{
    background-color:#eee;
    color:#666666;
    font-weight: bold;
    text-decoration: none;
    display: block;
}

Of course you can change the values to suit your taste.

--------------
Update Log
--------------
v1.0: Initial Release
v1.1: Fixed bug involving multiple tables in a single post
v1.2: Added [table=sortable] tag which is required to make your table sortable
cool! im going to use both Smile
There's still a small problem that I'm looking into even in v1.1 so once I get that fixed I'll update it v1.2 and let everyone know so you only have to update once.
Okay v1.2 of the table tag plugin is out and I think everything is working now. Please notice that to make a sortable table you have to use the [table=sortable] tag. This is to allow multiple tables in the same post with some being sortable and some not.

Please check the table tag plugin post for more information and the download. That post is located here
Screenshot:
[attachment=4941]
When I try to activate the PM mod I get these errors

Warning: unreadpm_activate(./inc/adminfunctions_templates.php) [function.unreadpm-activate]: failed to open stream: No such file or directory in /home/shadowdo/public_html/mybb/inc/plugins/unreadpm.php on line 27

Warning: unreadpm_activate(./inc/adminfunctions_templates.php) [function.unreadpm-activate]: failed to open stream: No such file or directory in /home/shadowdo/public_html/mybb/inc/plugins/unreadpm.php on line 27

Fatal error: unreadpm_activate() [function.require]: Failed opening required './inc/adminfunctions_templates.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/shadowdo/public_html/mybb/inc/plugins/unreadpm.php on line 27
Pages: 1 2