MyBB Community Forums

Full Version: [Release] Public Ban Information 1.1
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
The Public Ban Information plugin enables your members to see details about banned members such as the reason for the ban, the date they got banned, and the time they have left (to name a few).

Features
# Turn the mod on/off in the Admin CP.
# If no users are banned, a message is displayed to say so.
# This mod displays the following info about the ban:

Username (with link to profile).
Banned by (username).
Banned on (date).
[url=Ban Length.
Ban Lifted on (date).
Time Remaining.
Ban Reason

# All of the info above (except for the username) can be turned off and on from the Admin CP.
# Admin can choose whether to allow guests to see who has been banned or not.
# On install, a link is added to the footer.

Changes
- The changes from version 1.0 include some bug fixes where the time remaining became negative. It also includes some minor code additions for smoother running!

- The changes from the BETA release include one spelling mistake (Toungue), a load of code changes to make it efficient, and the use of the MyBB function that makes the Time Remaining change color.

Download
MyBB Mods
or use the attachment below (which is updated with bug fixes before the MyBB Mods one). You might get an error when visiting the MyBB Mods download page since it is currently (at the time of this post) being validated!


Please report any bugs in this thread.

-DrPoodle
Hi, thanks for this cool mod. Smile

I think there is a bug:

A ban that already (should be) is lifted, still shows up on that page:

With -111 hours remaining. Toungue

Also, in combination with the forum warning system there still is a (non existing) ban: Moderator RaPaTTaCK 16-06-2006 Permanent Never - Forum Warning System: reached 100%

(See http://www.chat2b.be/forum/pbi.php)

There's only one ban, and that's LOL. The only user in the banned group.


Sorry, I accidently deleted the bans. :s
Why does it not add an link on the header for it? Confused
CraKteR Wrote:Why does it not add an link on the header for it? Confused
To be honest, I tried adding it to the footer links, and it always messed up, either on install, or when you deactivated it.

If someone can give me the code that I need to use I'll add it to the plugin file.
Added the link to the MyBB Mods site.
Something like this on activate.
	require "./inc/adminfunctions_templates.php";
	find_replace_templatesets("header", '#help</a></li>#', "help</a></li><li><a href=\"\$settings[bburl]/\pbi.php\"><img src=\"\$theme[imgdir]/star.gif\" border=\"0\" alt=\"Public ban page\">Public ban page</a></li>");
Change star.gif to some other picture if you got any.

And something like this on deactivation.
require "./inc/adminfunctions_templates.php";
	find_replace_templatesets("header", '#<li><a href=\"\$settings[bburl]/pbi.php\"><img src=\"\$theme[imgdir]/star.gif\" border=\"0\" alt=\"Public ban page\">Public ban page</a></li>#', "", 0);
Change star.gif to the picture off your choice here aswell.
The activate works fine, but the deactivate comes up with the error:

Warning: preg_match() [function.preg-match]: Compilation failed: unknown property name after \P or \p at offset 33 in C:\Program Files\xampp\xampp\htdocs\forum\inc\adminfunctions_templates.php on line 37

This is the same error I had when attempting it before.
Change pbi.php to pbi\.php
Same error.
Oh I'm sorry. updated my above post. change\pbi\.php to pbi.php
I managed to fix the error, but the template now screws up when you deativate. Maybe you can make any sense of it:

Activation
require "./inc/adminfunctions_templates.php";
find_replace_templatesets("footer", '#\$lang->bottomlinks_syndication</a>#', "\$lang->bottomlinks_syndication</a> | <a href=\"\$settings[bburl]/pbi.php\">Public Ban Information</a>");

Deactivation
require "./inc/adminfunctions_templates.php";
find_replace_templatesets("footer", '# | <a href=\"\$settings[bburl]/pbi.php\">Public Ban Information</a>#', "", 0);

Also, tonight I will release a newer version of this mod which eliminates the "negative" time remaining for people whose bans are over!
Pages: 1 2 3