PDA

View Full Version : Major Additions - Banned Members Log


Mosh
10-30-2008, 10:00 PM
Please click Mark as Installed if you are using this hack.


What Does This Hack Do?hr
It is a update of my v3.7.x hack available here, with the addition of file hooks, hack authors can now use hooks to expand this hack if needed, and a new column for the usergroup the banned user has been put in.

This hack displays a log of all temporary and permanently banned members on it's own page, it is paginated (with page count on the permanent bans section) if there are more results than you selected per page in the AdminCP, temporary bans are only displayed on page 1 (if you have more temporary banned members than one page, you must be doing something wrong), along with a count on how many temporary and permanent banned members there are. Any users displayed on the page(s) will have links to display their profile, if clicked on.

It can also show an altered total member count on your forum's homepage (if enabled) to either show the altered members count (exclude all banned members), show the altered members and unconfirmed (Users Awaiting Email Confirmation) members count, show the altered members, unconfirmed members and banned members count, or you can disabled it altogether (so it shows the unaltered members count). Enabled or disabled, it does not generate any extra queries.

You can optionally add a link on either the navbar proper or quick links.

This hack is controlled by usergroup permissions.

As an added bonus (if enabled), if a usergroup has permissions to view the banned members log, then the banned members count on the forumhome page will be clickable and will load the banned members log if clicked on (if no permission, then it will not be clickable).


This hack was created because I liked the idea of this hack by jredrum, and as it is not supported, not phrased at all, has no pagination, and has no usergroup permissions to speak of, I decided to use the idea of that hack and rewrite it from scratch based on the ModCP file banning.php, I have also integrated my Total Member Count Excluding Banned Members hack into this one and have now retired it.

There is only one file change (to config.php), but no template changes at all and is fully phrased. This generates no extra queries on the forum homepage at all, and generates 9-11 queries (depending on options selected and if logged out/logged in) on the ban_log.php page.


vBulletin Version Compatibilityhr
This hack can be used with vBulletin versions 3.6.0 - 3.8.8.

For the v4.0.x version of this hack - check here.


Hack Support/Feature Requestshr
IMPORTANT: This hack is no longer supported.


Brandinghr
There is a small unobtrusive block of copyright branding text at the bottom of each page generated by this hack, which is there to promote my work and allow you to use this hack for free.

You are NOT allowed to remove my copyright branding from this hack.


Install/Uninstall Instructionshr
The InstallInstructions.txt instructions file is included in attached .zip file.


Screenshotshr
Shown in this order:

AdminCP Options
Banned Members Log (with temporary and permanent bans)
Banned user count shown in forum statistics on the forum homepage
Banned Members Log (with no temporary and permanent bans)
Message if there are no Banned Usergroups defined
Banned Members Log (with permanent bans and pagnation)


Version Historyhr
v3.8.004 - Wednesday 24th June 2009
-- Fixed: banned_log template (column mismatch)

v3.8.003 - Wednesday 25th February 2009
-- Fixed: Banned Members Log (3) plugin - replaced 2 x ? with (c) to prevent parse errors (rare cases)
-- Changed: Files - ban_log.php (streamlined a couple of SQL queries)
-- Changed: banned_log template (column display order)
-- Changed: banned_perm_row template (column display order)
-- Changed: banned_temp_row template (column display order)
-- Updated: Files - ban_log_cron.php, hooks_ban_log.xml
-- Updated: Installation Instructions
-- Updated: Screenshots

v3.8.002 - Thursday 19th February 2009
-- Changed: Files - ban_log.php (updated SQL queries)
-- Changed: banned_log template
-- Changed: banned_none template
-- Changed: banned_perm_row template
-- Changed: banned_temp_row template
-- Updated: Banned Members Log (3) plugin
-- Updated: Files - ban_log_cron.php, hooks_ban_log.xml
-- Updated: Installation Instructions (now includes un-install instructions)
-- Updated: Screenshots
-- Added: New column - Usergroups
-- Added: bangroup phrase
-- Added: VersionHistory.txt

v3.8.001 - Friday 31st October 2008
-- Added: File Hooks
-- Initial vBulletin v3.8.x release


Show Your Appreciation hr
Although not required, if you have enjoyed the benefits of this hack, and would like show your appreciation for my efforts, then please feel free to click on the Support Developer link and donate any amount you feel is appropriate.


Donationshr
I would like to thank the following people for their kind donations:

Koidl (https://vborg.vbsupport.ru/member.php?u=249770)

Shazz
10-31-2008, 03:45 AM
I know this is going to be usefull to alot of people great job!
This has been requested many times.

Bounce
10-31-2008, 06:04 PM
:up:

Small Q....

Display Banned Members Count On Forumhome? is showing 0 bans?

I've got 235 banned members :confused:

Mosh
11-01-2008, 06:39 AM
:up:

Small Q....

Display Banned Members Count On Forumhome? is showing 0 bans?

I've got 235 banned members :confused:
I take it you followed all of the installation instructions to the letter? Including the file edit to config.php in step 4 and ran the cron job in step 6 ? If so, you should get the correct number of banned members.

Bounce
11-01-2008, 08:53 AM
Including the file edit to config.php in step 4

https://vborg.vbsupport.ru/external/2009/11/12.gif no lol

Thanks works perfectly now :up:

Koidl
11-01-2008, 01:57 PM
any idea why i have this code on the left top ? if i click on the ban_log.php



thanks

Mosh
11-02-2008, 05:16 AM
any idea why i have this code on the left top ? if i click on the ban_log.php



thanks
Absolutely no idea. Can you post a screenshot showing this? And your site url, so I can have a look myself.

Koidl
11-02-2008, 06:31 AM
details pmed again thx for reply

Mike-D
11-02-2008, 10:07 AM
Mosh,
in order to prevent 1 additional Query I'd use the following condition...
if (!in_array($vbulletin->userinfo,$banned_allowed_groups))


instead of using this condition...
if(!is_member_of($vbulletin->userinfo,$banned_allowed_groups))


This one saves 1 additional Query ;)

Bounce
11-02-2008, 03:58 PM
This one saves 1 additional Query ;)

Where do you edit this mike?

bigcurt
11-02-2008, 07:02 PM
Great mod - would appreciate it if someone would post on here whether it works with 3.6.X earlier versions..sure it should though.

jambo_1969
11-03-2008, 04:50 AM
Works great on 3.7

Cheers

TheInsaneManiac
11-03-2008, 07:34 AM
I will install if you could add a option to only display temporarily banned members. I see no reason why member need to know why others are banned, but if they are friends with that person and my staff temporarily bans them, they should know about it.

Mosh
11-04-2008, 06:31 AM
details pmed again thx for reply
Check your PM, should now be fixed.

Whitey Bear
11-07-2008, 04:45 PM
Is it possible to modify this so that temporary bans remain on the list permanently?

Also, would it be possible to show both temporary and permanent together under one table, prehaps with the User Name, Banned By, Banned On, Ban Time Remaining and Ban Reason fields visible?

Mosh
11-08-2008, 04:18 AM
Is it possible to modify this so that temporary bans remain on the list permanently?

Also, would it be possible to show both temporary and permanent together under one table, prehaps with the User Name, Banned By, Banned On, Ban Time Remaining and Ban Reason fields visible?
Yes, it would be possible, but not without extensive alterations to this hack, as it will not do what you want in its current state. It is not something I wish to look into at this time, as I am happy with the hack the way it is.

KURTZ
11-13-2008, 11:45 AM
thx Mosh ;)

Sunka
12-13-2008, 09:44 PM
Installed, but disabled untill this errors gone :D

When this MOD is enable this errors shows on top of the page:

On portal page:

Parse error: syntax error, unexpected T_STRING in /home/pijanitv/public_html/forum/global.php(614) : eval()'d code on line 1445

Warning: array_diff() [function.array-diff]: Argument #2 is not an array in [path]/modules/currentpoll.php on line 39

Warning: array_diff() [function.array-diff]: Argument #2 is not an array in [path]/modules/news.php on line 127



On forum index page:

Parse error: syntax error, unexpected T_STRING in /home/pijanitv/public_html/forum/global.php(614) : eval()'d code on line 1445


What to do? :confused:

jeffinj
12-14-2008, 10:59 AM
This hack will be useful on my site. Thank you very much.

Mosh
12-16-2008, 12:12 AM
Installed, but disabled untill this errors gone :D

When this MOD is enable this errors shows on top of the page:

On portal page:

Parse error: syntax error, unexpected T_STRING in /home/pijanitv/public_html/forum/global.php(614) : eval()'d code on line 1445

Warning: array_diff() [function.array-diff]: Argument #2 is not an array in [path]/modules/currentpoll.php on line 39

Warning: array_diff() [function.array-diff]: Argument #2 is not an array in [path]/modules/news.php on line 127



On forum index page:

Parse error: syntax error, unexpected T_STRING in /home/pijanitv/public_html/forum/global.php(614) : eval()'d code on line 1445


What to do? :confused:
One of your other hacks seems to be conflicting with the Banned Members Log (3) plugin which displays the banned members on the forumhome page.

You need to check any other hacks that are using the parse_templates hook to see if they are the cause of the issue. If you can not track it down, you can always disable the Banned Members Log (3) plugin and live without the banned member count on the forumhome page.

Darkstarproject
12-17-2008, 03:59 PM
*Installed*

One thing - Where do I change the text in the Nav that says 'Banned Members Log'? Basically want to remove the 'Log' part.

traf
01-14-2009, 10:47 AM
Great mod, if it weren't for the copyright notice. If every modder added the mod's name, the copyright notice, year and their own linked name to the mods they release all forums would look like a total mess. Great job on the mod, but until the notice is gone I won't be using it on my boards to keep away the unnecessary clutter, thank you.

Mosh
01-14-2009, 01:59 PM
Great mod, if it weren't for the copyright notice. If every modder added the mod's name, the copyright notice, year and their own linked name to the mods they release all forums would look like a total mess. Great job on the mod, but until the notice is gone I won't be using it on my boards to keep away the unnecessary clutter, thank you.
If you don't want the copyright branding, then there are 2 options; purchasing an unbranded version or not installing it at all. The choice is yours.

A few people have chosen to purchase a unbranded version from me, and they are happy to pay a small amount to remove the branding.

I will not be removing the branding on the free version, as it is promotion for my work and the effort I went into creating the hack for free, providing it free, and with free support for people like you.

Mythor
01-14-2009, 07:52 PM
Given that this is really a mod that's mostly going to be seen/used by moderators/admin and that that page is the only place his copyright notice appears, I see absolutely no problem with it. It's not anymore intrusive than any of the dozens of other mods that do in fact put links in the footer or elsewhere - including vbSEO which you have to pay for.
The mod does exactly what it says on the box with a minimum of fuss. Two links back to vbulletin.org - not his own personal sites - is an exceedingly small price to pay for such convenience. :)

(note: the name of the site in my sig is a coincedence, I don't know the developer at all, just use his mod. :) )

HolyKiller
01-20-2009, 12:15 PM
This MOD is excelent, i like it, but i have one wish.

On my forum i'm using two banned groups. First is standart "Banned Users" and second is "Mutes users" and they have restricted access to posts and forum features.

I like this BanLog, but problem is, users can't see who is "Banned" and who si "Muted", because all members in all "banned" groups are together.

So can you please implement some settings to split tables in BanLog based on BannedUsergroup? OR add new column with BannedGroup name?

Look at attached images what i mean.

Thanks in advance

Holy

BTW: Sorry for my english

Mythor
01-20-2009, 07:44 PM
Your English is fine, HolyKiller. And now that you've mentioned it, I'd like to see that feature in a future version myself. I'm not listing the "muted" people in the Ban Log at the moment but it would be useful!

Mosh
01-21-2009, 03:43 AM
This MOD is excelent, i like it, but i have one wish.

On my forum i'm using two banned groups. First is standart "Banned Users" and second is "Mutes users" and they have restricted access to posts and forum features.

I like this BanLog, but problem is, users can't see who is "Banned" and who si "Muted", because all members in all "banned" groups are together.

So can you please implement some settings to split tables in BanLog based on BannedUsergroup? OR add new column with BannedGroup name?

Look at attached images what i mean.

Thanks in advance

Holy

BTW: Sorry for my english

Your English is fine, HolyKiller. And now that you've mentioned it, I'd like to see that feature in a future version myself. I'm not listing the "muted" people in the Ban Log at the moment but it would be useful!
I quite like the idea :)

I will probably go with the new column named Banned Group Name idea.

However, I do not have time to look at it now, but will do so in the next month or so, as I have assignments to finish and 2 exams before I even look at or release new updates to any of my hacks (unless it is small updates/bug-fixes).

BlackJacket
02-05-2009, 02:41 PM
Sorry to sound like a noob but do i add this to the config.php?

// add Mosh's datastore to specialtemplates, so it is loaded on with the main datastore
$GLOBALS['specialtemplates'][] = 'ms_datastore';


5

Do i need to put a ; after the 5?

Thanks again!

EagleNick
02-11-2009, 11:05 PM
It would be neat if the log would provide a link to the infraction discussion thread that is automatically created when an infraction is given.

Other than that, this is a great, neat little mod.

Mosh
02-18-2009, 07:01 PM
Sorry to sound like a noob but do i add this to the config.php?

// add Mosh's datastore to specialtemplates, so it is loaded on with the main datastore
$GLOBALS['specialtemplates'][] = 'ms_datastore';


5

Do i need to put a ; after the 5?

Thanks again!

You are mixing things up - you have only to paste the following into config.php:
// add Mosh's datastore to specialtemplates, so it is loaded on with the main datastore
$GLOBALS['specialtemplates'][] = 'ms_datastore';

Mosh
02-18-2009, 07:03 PM
It would be neat if the log would provide a link to the infraction discussion thread that is automatically created when an infraction is given.

Other than that, this is a great, neat little mod.
I will see if that is possible, if it is, then I will may add it, not promising anything though, but I may.

Mosh
02-19-2009, 12:19 AM
*Installed*

One thing - Where do I change the text in the Nav that says 'Banned Members Log'? Basically want to remove the 'Log' part.

Sorry I missed this one :(

Edit the banned_members_link phrase.

Nadavy
02-19-2009, 12:21 AM
What did the latest update do :) ?

Mosh
02-19-2009, 12:22 AM
I will see if that is possible, if it is, then I will may add it, not promising anything though, but I may.
I have had a look at it, and there is no direct connection between banned users and the infraction that banned them. If I can figure it out down the road, I may add it at that time.

Mosh
02-19-2009, 12:23 AM
Update: v3.8.002
-- Changed: Files - ban_log.php (updated SQL queries)
-- Changed: banned_log template
-- Changed: banned_none template
-- Changed: banned_perm_row template
-- Changed: banned_temp_row template
-- Updated: Banned Members Log (3) plugin
-- Updated: Files - ban_log_cron.php, hooks_ban_log.xml
-- Updated: Installation Instructions (now includes un-install instructions)
-- Added: New column - Usergroups
-- Added: bangroup phrase
-- Added: VersionHistory.txt file

Mosh
02-19-2009, 12:30 AM
What did the latest update do :) ?
See post above this one :)

New column - Ban Usergroup, for forums that have more than one usergroup that banned members are assigned to when banned (temporary or permanent).

Nadavy
02-19-2009, 11:10 PM
Have you added it to the quick links yet? :P

Mosh
02-19-2009, 11:47 PM
Have you added it to the quick links yet? :P
What are you on about "yet"?

It has been in the AdminCP options since the first release of this hack (v3.7.001) in August 2008.

Check Automatic Link Creation in vBulletin Options -> Banned Members Log.

HolyKiller
02-20-2009, 09:30 AM
I get error msg after instalation on forum index page:


Warning: Unexpected character in input: ''' (ASCII=39) state=1 in /data/web/virtuals/xxxxxxx.xx/www/forum/global.php(609) : eval()'d code on line 25

Parse error: syntax error, unexpected '.' in /data/web/virtuals/xxxxxxx.xx/www/forum/global.php(609) : eval()'d code on line 25


I try to set Default skin and no imports to indexpage, but no change :/

Automatic Link Creation: Disabled
Display Banned Members Count On Forumhome?: No

EDIT: I installed vBulletin 3.8.0 instalation on my local and changed anything in vBulletin options. Then i installed this MOD and it works perfectly. After this i copied my "life" forum on my local and uninstalled ALL plugins and products and reverted ALL template changes. After this i installed this Banned members log and i again get the error msg.

So, i think, problem is in vBulletin, not in this mod. But i rlly dont know how to find it :(

Holy

Mosh
02-22-2009, 05:02 AM
I get error msg after instalation on forum index page:


Warning: Unexpected character in input: ''' (ASCII=39) state=1 in /data/web/virtuals/xxxxxxx.xx/www/forum/global.php(609) : eval()'d code on line 25

Parse error: syntax error, unexpected '.' in /data/web/virtuals/xxxxxxx.xx/www/forum/global.php(609) : eval()'d code on line 25


I try to set Default skin and no imports to indexpage, but no change :/

Automatic Link Creation: Disabled
Display Banned Members Count On Forumhome?: No

EDIT: I installed vBulletin 3.8.0 instalation on my local and changed anything in vBulletin options. Then i installed this MOD and it works perfectly. After this i copied my "life" forum on my local and uninstalled ALL plugins and products and reverted ALL template changes. After this i installed this Banned members log and i again get the error msg.

So, i think, problem is in vBulletin, not in this mod. But i rlly dont know how to find it :(

Holy
Try disabling the Banned Members Log (3) plugin and try again. Let me know the result.

HolyKiller
02-22-2009, 06:21 PM
2 Mosh: Yes, after disabling Banned Members Log (3) the indexpage loads correctly.

EDIT: I tested something and i am rly confused about this...

1)
- Installed FRESH vBulletin 3.8.0 on my localhost. Don't make any changes, just install. Then used this MOD and it works perfectly. No errors on index page, ban_log.php works OK.
- Saved (exported) vBulletin options


2)
- Backuped whole DB and all files from my "life" forum and copied it on my localhost.
- Installed this MOD
- Disabled AdSense integration
- Disabled and UnInstalled ALL products and ALL plugins
- Reverted ALL template changes and ALL CSS definitions
- UnInstalled ALL nondefault templates. (So only Default skin remained without any customizations)
- Deleted ALL forums and child forums and created only one new category and one new forum
- Deleted ALL nondefault usergroups
- Deleted ALL notifications
- Deleted ALL thread prefixes
- Imported vBulletin options from fresh vB instalation
- In Maintenance used "Repair / Optimize Tables" on all tables
- In Maintenance used all of the "Update Counters"
- Again used "Repair / Optimize Tables"
- So now i should have forum equal to fresh instalation, but the problem still remains
- Unsintalled MOD, again used "Repair / Optimize Tables", browser cache deleted and Apache restarted
- Problem is still here :(

So now i rly don't know what to do

Mosh
02-22-2009, 07:42 PM
2 Mosh: Yes, after disabling Banned Members Log (3) the indexpage loads correctly.
I suspected that. But there is not actually a parse error, it is something to do with your installation, but I don't know what is causing it.

All that plugin does is to add a link to the navbar or quick links menu on the navbar. So, all you need to do, is leave that plugin disabled and if you want to add the link manually added to the navbar template, paste the following where you want the link to display:

<!-- $vbphrase[banned_members_log] v3.8.002 ? Mosh Shigdar 2008 - 2009 --><td class="vbmenu_control"><a href="$vbulletin->options[bburl]/ban_log.php?$session[sessionurl]">$vbphrase[banned_members_link]</a></td><!-- end of Banned Members Log -->

HolyKiller
02-22-2009, 08:11 PM
2 Mosh: Ok, thanks, i will try it.

BTW: Edited my previous post


EDIT: ARGHHHHHHH!!!

Now i rlly DON'T KNOW WHY, but if now i'm looking in code of Banned Members Log (3) of my copy of life forum i see uncomplete code!!


// version information
$bml_version = 'v3.8.002';

// set display link flag to false
$show_bml_nav_link = false;

// if allow show to all usergroups, then set display link flag to true
if ($vbulletin->options['bml_all_grps'] == 0)
{
$show_bml_nav_link = true;
}

// if user in allowed usergroup, then set display link flag to true
$banned_allowed_groups = explode(',',$vbulletin->options['bml_grps']);
if ($vbulletin->options['bml_all_grps'] == 1 && (is_member_of($vbulletin->userinfo,$banned_allowed_groups)))
{
$show_bml_nav_link = true;
}

// if the display link flag is true, then add the link to the navbar or quicklinks
if ($show_bml_nav_link)
{
if ($vbulletin->options['bml_nav_link'] == 1)
{
$template_hook['navbar_buttons_left'] .= '<!-- '.$vbphrase['banned_members_log'].' '.$bml_version.'.

BTW: The lastest row missing one ' here in PHP tag ... accualy i see this:
$template_hook['navbar_buttons_left'] .= '<!-- '.$vbphrase['banned_members_log'].' '.$bml_version.'.


And if i look into fresh vBull instalation with this MOD i see this (correct code). And ofcourse, after i copy&pasted full code to my forum, problem solved, everything is FINE ... so, there is some &ł@$&!!! mistake in plugin importation.


Plugin PHP Code
// version information
$bml_version = 'v3.8.002';

// set display link flag to false
$show_bml_nav_link = false;

// if allow show to all usergroups, then set display link flag to true
if ($vbulletin->options['bml_all_grps'] == 0)
{
$show_bml_nav_link = true;
}

// if user in allowed usergroup, then set display link flag to true
$banned_allowed_groups = explode(',',$vbulletin->options['bml_grps']);
if ($vbulletin->options['bml_all_grps'] == 1 && (is_member_of($vbulletin->userinfo,$banned_allowed_groups)))
{
$show_bml_nav_link = true;
}

// if the display link flag is true, then add the link to the navbar or quicklinks
if ($show_bml_nav_link)
{
if ($vbulletin->options['bml_nav_link'] == 1)
{
$template_hook['navbar_buttons_left'] .= '<!-- '.$vbphrase['banned_members_log'].' '.$bml_version.'. ? Mosh Shigdar 2008 - 2009 --><td class="vbmenu_control"><a href="'.$vbulletin->options['bburl'].'/ban_log.php?'.$session['sessionurl'].'">'.$vbphrase['banned_members_link'].'</a></td><!-- end of Banned Members Log -->';
}
if ($vbulletin->options['bml_nav_link'] == 2)
{
$template_hook['navbar_quick_links_menu_pos1'] .= '<!-- '.$vbphrase['banned_members_log'].' '.$bml_version.'. ? Mosh Shigdar 2008 - 2009 --><tr><td class="vbmenu_option"><a href="'.$vbulletin->options['bburl'].'/ban_log.php?'.$session['sessionurl'].'">'.$vbphrase['banned_members_link'].'</a></td></tr><!-- end of Banned Members Log -->';
}
}

HolyKiller
02-22-2009, 08:57 PM
Okay, i find the problem ... the problem is in the symbol "?" in XML file on line 230 and 234.

$template_hook['navbar_quick_links_menu_pos1'] .= '<!-- '.$vbphrase['banned_members_log'].' '.$bml_version.'. ? Mosh Shigdar 2008 - 2009 --><tr><td class="vbmenu_option"><a href="'.$vbulletin->options['bburl'].'/ban_log.php?'.$session['sessionurl'].'">'.$vbphrase['banned_members_link'].'</a></td></tr><!-- end of Banned Members Log -->';

Exactly here:
? Mosh Shigdar 2008 - 2009


The plugin import system just don't go thru this and does NOT import the whole code.

After i deleted the ? symbol 230 and 234 in XML file and imported the plugin again, everything is fine.


Now all works fine and i'm so happy. Thanks again for great hack :)

Holy

Mosh
02-23-2009, 05:09 AM
Okay, i find the problem ... the problem is in the symbol "?" in XML file on line 230 and 234.

$template_hook['navbar_quick_links_menu_pos1'] .= '<!-- '.$vbphrase['banned_members_log'].' '.$bml_version.'. ? Mosh Shigdar 2008 - 2009 --><tr><td class="vbmenu_option"><a href="'.$vbulletin->options['bburl'].'/ban_log.php?'.$session['sessionurl'].'">'.$vbphrase['banned_members_link'].'</a></td></tr><!-- end of Banned Members Log -->';

Exactly here:
? Mosh Shigdar 2008 - 2009


The plugin import system just don't go thru this and does NOT import the whole code.

After i deleted the ? symbol 230 and 234 in XML file and imported the plugin again, everything is fine.


Now all works fine and i'm so happy. Thanks again for great hack :)

Holy
No wonder I could not replicate it :eek:

Oh well, I will just have to change it for the next version, as I am assuming that will only happen in very limited cases, as apart from yours I have not come across a case where it would not parse the copyright symbol (just me trying to be fancy).

Thanks for tracking it down :)

Mosh
02-24-2009, 10:28 PM
Update: v3.8.003 - Wednesday 25th February 2009
-- Fixed: Banned Members Log (3) plugin - replaced 2 x © with (c) to prevent parse errors (rare cases)
-- Changed: Files - ban_log.php (streamlined a couple of SQL queries)
-- Changed: banned_log template (column display order)
-- Changed: banned_perm_row template (column display order)
-- Changed: banned_temp_row template (column display order)
-- Updated: Files - ban_log_cron.php, hooks_ban_log.xml
-- Updated: Installation Instructions
-- Updated: Screenshots

Sunka
03-01-2009, 10:11 PM
Installed, but disabled untill this errors gone :D

When this MOD is enable this errors shows on top of the page:

On portal page:

Parse error: syntax error, unexpected T_STRING in /home/pijanitv/public_html/forum/global.php(614) : eval()'d code on line 1445

Warning: array_diff() [function.array-diff]: Argument #2 is not an array in [path]/modules/currentpoll.php on line 39

Warning: array_diff() [function.array-diff]: Argument #2 is not an array in [path]/modules/news.php on line 127
On forum index page:

Parse error: syntax error, unexpected T_STRING in /home/pijanitv/public_html/forum/global.php(614) : eval()'d code on line 1445What to do? :confused:

One of your other hacks seems to be conflicting with the Banned Members Log (3) plugin which displays the banned members on the forumhome page.

You need to check any other hacks that are using the parse_templates hook to see if they are the cause of the issue. If you can not track it down, you can always disable the Banned Members Log (3) plugin and live without the banned member count on the forumhome page.

Update: v3.8.003 - Wednesday 25th February 2009
-- Fixed: Banned Members Log (3) plugin - replaced 2 x ? with (c) to prevent parse errors (rare cases)
-- Changed: Files - ban_log.php (streamlined a couple of SQL queries)
-- Changed: banned_log template (column display order)
-- Changed: banned_perm_row template (column display order)
-- Changed: banned_temp_row template (column display order)
-- Updated: Files - ban_log_cron.php, hooks_ban_log.xml
-- Updated: Installation Instructions
-- Updated: Screenshots

Okay, i find the problem ... the problem is in the symbol "?" in XML file on line 230 and 234.

$template_hook['navbar_quick_links_menu_pos1'] .= '<!-- '.$vbphrase['banned_members_log'].' '.$bml_version.'. ? Mosh Shigdar 2008 - 2009 --><tr><td class="vbmenu_option"><a href="'.$vbulletin->options['bburl'].'/ban_log.php?'.$session['sessionurl'].'">'.$vbphrase['banned_members_link'].'</a></td></tr><!-- end of Banned Members Log -->';Exactly here:
? Mosh Shigdar 2008 - 2009


The plugin import system just don't go thru this and does NOT import the whole code.

After i deleted the ? symbol 230 and 234 in XML file and imported the plugin again, everything is fine.


Now all works fine and i'm so happy. Thanks again for great hack :)

Holy

No wonder I could not replicate it :eek:

Oh well, I will just have to change it for the next version, as I am assuming that will only happen in very limited cases, as apart from yours I have not come across a case where it would not parse the copyright symbol (just me trying to be fancy).

Thanks for tracking it down :)


Now is working OK Mosh...

Jon1422
06-11-2009, 04:34 PM
Excellent Hack - thank you Mosh :) ...and good luck with the exams :)

One thing I would like to change is to remove the 'banned by' column - it doesn't really fit in on our forum. If anyone could advise how to go about that I'd appreciate it :)

Jon1422
06-15-2009, 07:04 AM
Quick word of advice... when installed, the "ban time remaining" and "lift ban" column headers for temp bans are over the wrong columns ;)

To correct, edit the .xml file prior to installing and locate the code lines:

<td class='thead' align='center'>$vbphrase[ban_time_remaining]</td>
<td class='thead' align='center'>$vbphrase[lift_ban]</td>

and swap these around so they read...

<td class='thead' align='center'>$vbphrase[lift_ban]</td>
<td class='thead' align='center'>$vbphrase[ban_time_remaining]</td>

Done ;)

Mosh
06-23-2009, 12:53 AM
Excellent Hack - thank you Mosh :) ...and good luck with the exams :)

One thing I would like to change is to remove the 'banned by' column - it doesn't really fit in on our forum. If anyone could advise how to go about that I'd appreciate it :)
In the banned_log template, find and delete the two instances of:
<td class='thead' align='center'>$vbphrase[banned_by]</td>

In the banned_perm_row and banned_temp_row templates, find and delete:
<td><div class='smallfont'><a href="member.php?$session[sessionurl]u=$user[adminid]">$user[adminname]</a></div></td>

That is all that is needed :)

Mosh
06-23-2009, 12:57 AM
Quick word of advice... when installed, the "ban time remaining" and "lift ban" column headers for temp bans are over the wrong columns ;)

To correct, edit the .xml file prior to installing and locate the code lines:

<td class='thead' align='center'>$vbphrase[ban_time_remaining]</td>
<td class='thead' align='center'>$vbphrase[lift_ban]</td>

and swap these around so they read...

<td class='thead' align='center'>$vbphrase[lift_ban]</td>
<td class='thead' align='center'>$vbphrase[ban_time_remaining]</td>

Done ;)
Thanks for pointing that out :)

I have been able to replicate this. I will release an updated version that fixes this in the next couple of days.

Mosh
06-24-2009, 07:18 AM
Update: v3.8.004 - Wednesday 24th June 2009
-- Fixed: banned_log template (column mismatch)

ragarcia87
08-12-2009, 01:34 PM
After I upgraded to vBulletin 3.8.4 the number of banned users at the bottom shows 0 instead of 33 which it should be. Any help would be awesome :D

toonysnn
08-12-2009, 04:33 PM
For anyone who has the issue that ragarcia87 has, I've made a temporary fix, adding a SQL query.

Replace plugin "Banned Members Log (2)" contents with:

if ($vbulletin->options['bml_display_banned_membercount'] != 0)
{

$qqqqqq = $vbulletin->db->query_read("SELECT COUNT(*) FROM `" . TABLE_PREFIX . "user` WHERE usergroupid='8'");
$qqqqqq = $vbulletin->db->fetch_array($qqqqqq);

// assign the member counts from the datastore to some variables
$bannedmembercount = intval(($vbulletin->ms_datastore['bml_counter'] > 0 ? $vbulletin->ms_datastore['bml_counter'] : $qqqqqq['COUNT(*)']));
$unconfirmedmembercount = intval($vbulletin->ms_datastore['bml_unconfirmed']);
$propermembercount = $vbulletin->userstats['numbermembers'];

// set all display flags to true
$show['banned_count_url'] = true;
$show['banned_count'] = true;
$show['unconfirmed_count'] = true;

// work out if the user is in a usergroup that has permissions to get the banned member link
// if the user does not have permission, then set the display flag are set to false
$banned_allowed_groups = explode(',',$vbulletin->options['bml_grps']);
if ($vbulletin->options['bml_all_grps'] == 1)
{
if(!is_member_of($vbulletin->userinfo,$banned_allowed_groups))
{
$show['banned_count_url'] = false;
}
}

// change flags to false, depending on what counts we want to display
// also calculate the altered member count, based on selection
if ($vbulletin->options['bml_display_banned_membercount'] == 1)
{
$show['banned_count'] = false;
$show['unconfirmed_count'] = false;
$newmembercount = $propermembercount - $bannedmembercount;
}
if ($vbulletin->options['bml_display_banned_membercount'] == 2)
{
$show['banned_count'] = false;
$newmembercount = $propermembercount - $unconfirmedmembercount - $bannedmembercount;
}
if ($vbulletin->options['bml_display_banned_membercount'] == 3)
{
$show['unconfirmed_count'] = false;
$newmembercount = $propermembercount - $bannedmembercount;
}
if ($vbulletin->options['bml_display_banned_membercount'] == 4)
{
$newmembercount = $propermembercount - $unconfirmedmembercount - $bannedmembercount;
}

// here is the correct members count
$numbermembers = vb_number_format($newmembercount);

// spit out the resulting template
eval('$numbermembers .= "' . fetch_template('banned_count') . '";');
}


ragarcia87: I've applied this to our board.

Mosh
08-13-2009, 02:45 AM
After I upgraded to vBulletin 3.8.4 the number of banned users at the bottom shows 0 instead of 33 which it should be. Any help would be awesome :D

I will look into it and get back to you.

For anyone who has the issue that ragarcia87 has, I've made a temporary fix, adding a SQL query.

Replace plugin "Banned Members Log (2)" contents with:

if ($vbulletin->options['bml_display_banned_membercount'] != 0)
{

$qqqqqq = $vbulletin->db->query_read("SELECT COUNT(*) FROM `" . TABLE_PREFIX . "user` WHERE usergroupid='8'");
$qqqqqq = $vbulletin->db->fetch_array($qqqqqq);

// assign the member counts from the datastore to some variables
$bannedmembercount = intval(($vbulletin->ms_datastore['bml_counter'] > 0 ? $vbulletin->ms_datastore['bml_counter'] : $qqqqqq['COUNT(*)']));
$unconfirmedmembercount = intval($vbulletin->ms_datastore['bml_unconfirmed']);
$propermembercount = $vbulletin->userstats['numbermembers'];

// set all display flags to true
$show['banned_count_url'] = true;
$show['banned_count'] = true;
$show['unconfirmed_count'] = true;

// work out if the user is in a usergroup that has permissions to get the banned member link
// if the user does not have permission, then set the display flag are set to false
$banned_allowed_groups = explode(',',$vbulletin->options['bml_grps']);
if ($vbulletin->options['bml_all_grps'] == 1)
{
if(!is_member_of($vbulletin->userinfo,$banned_allowed_groups))
{
$show['banned_count_url'] = false;
}
}

// change flags to false, depending on what counts we want to display
// also calculate the altered member count, based on selection
if ($vbulletin->options['bml_display_banned_membercount'] == 1)
{
$show['banned_count'] = false;
$show['unconfirmed_count'] = false;
$newmembercount = $propermembercount - $bannedmembercount;
}
if ($vbulletin->options['bml_display_banned_membercount'] == 2)
{
$show['banned_count'] = false;
$newmembercount = $propermembercount - $unconfirmedmembercount - $bannedmembercount;
}
if ($vbulletin->options['bml_display_banned_membercount'] == 3)
{
$show['unconfirmed_count'] = false;
$newmembercount = $propermembercount - $bannedmembercount;
}
if ($vbulletin->options['bml_display_banned_membercount'] == 4)
{
$newmembercount = $propermembercount - $unconfirmedmembercount - $bannedmembercount;
}

// here is the correct members count
$numbermembers = vb_number_format($newmembercount);

// spit out the resulting template
eval('$numbermembers .= "' . fetch_template('banned_count') . '";');
}


ragarcia87: I've applied this to our board.

Thanks for the temp fix ;)

But it introduces two problems:

It adds an extra query per page
It does not take into account all ban groups, just usergroupid 8


As I said above for ragarcia87, I will look into it and get back to you asap (hopefully with a solution).

Mosh
08-13-2009, 04:08 AM
After I upgraded to vBulletin 3.8.4 the number of banned users at the bottom shows 0 instead of 33 which it should be. Any help would be awesome :D
I can not replicate your issue.

I just upgraded a forum to vBulletin v3.8.4 and the number of banned users still shows up fine and correct.

As the number of banned members shown on the homepage is stored in the datastore and as far as I know vBulletin v3.8.4 has not altered how the datastore works, upgrading your forum should not affect this hack at all.

OK, from the installation instructions, can you ensure that you have done step 4 (i.e. file edit has not been accidentally been removed), then follow it by step 6.

Let me know if this fixes your issue.

dothanhtrung
08-16-2009, 07:08 AM
In Automatic Link Creation (ACP ===> Banned Members Log), can you add "Create Link in Community" ?

Thanks,

Mosh
08-16-2009, 07:28 AM
In Automatic Link Creation (ACP ===> Banned Members Log), can you add "Create Link in Community" ?

Thanks,
I thought about that before I released v3.8.004 of this hack, but as the Community menu was not added until vBulletin v3.8, the option would not work with v3.7.x nor v3.6.x, I would definitely get unnecessary posts asking this was not working on 3.x.x and how to get it working with it.

So, to maintain full compatibility over all 3 versions of vBulletin this hack is supported on, I will not be adding your request to the hack, sorry :(

Mosh
11-25-2009, 02:08 AM
The vBulletin v4.0.x version of this hack is available here.

Mosh
01-02-2010, 01:36 AM
Hi all,

It is with regret that after over 4 years (and thousands of hours) spent providing free support for my free hacks released here, as of today I will no longer be able to provide support for free.

This is due to being unemployed for a while, being strapped for cash and unable to rely on the virtually non-existent donations from here to help to pay the bills or put food on the table for my family. I am now providing all support for my free hacks released here over at Wolfshead Solutions (http://www.wolfshead-solutions.com) via an annual support subscription (for a small fee).

It does not mean I will be no longer release free hacks, I will, but I will just no longer be supporting them for free.

My free hacks have and always will remain free to download and use. And so will updates/bug fixes.

I will be releasing more free hacks, but if you require any support at all for those free hacks, you will need to purchase an annual support subscription over at Wolfshead Solutions to receive support.

I am really sorry I have to do this, but revenue generated by my programming gigs are now my only source of income, and I can no longer afford the luxury of providing free support here, when that time can be spent creating new commercial products, doing paid work requests or providing paid support to pay the bills.

Thank you for the understanding.

Regards,

Mosh.

bigcurt
03-15-2010, 09:10 PM
Thanks for all the help through the years Mosh and your wonderful mods. I will definitely be visiting your site.

Mosh
01-08-2011, 02:19 AM
Hi all,

Free support has now been moved back to vBulletin.org.

Please see the first post for more information (and also this thread (http://www.wolfshead-solutions.com/threads/444-Our-quot-vBulletin.org-Hacks-Support-quot-subscription-has-been-scrapped) at Wolfshead Solutions).

Enjoy :)

Regards,

Mosh Shigdar - Wolfshead Solutions.