php forum
php mysql forum
php mysql smarty
 
Page 1 of 2 1 2 >
Topic Options
#280752 - 10/14/04 04:34 AM Finished-[6.5] Time ban and notifications 1.04
Anno Offline
Code Monkey

Registered: 05/23/01
Posts: 562
Loc: Austria

   Finished-[6.5]  Time ban and notifications 1.04 to Del.icio.us Add to del.icio.us
  Digg Finished-[6.5]  Time ban and notifications 1.04 Digg it
Mod Name / Version: Time ban and notifications 1.04 <br /> <br />Version 1.04 <br /> <br />Description: <br />In previous versions of UBBThreads there has been a notification of staff when a user was banned or unbanned. <br />In the 6.5 this feature disappeared. <br />This mod ads this feature back. <br />In addition to this the mod adds the ability to specify the ban duration. If the user tries to login before the ban time is over, he is shown the time that still remains until he is going to be unbanned. After the time is over, the user is automatically unbanned when he tries to login. <br />The banned user receives an email about his ban, the ban reason and the ban duration. He also receives an email if he is manually unbanned. <br /> <br />Working Under: UBB.Threads 6.5 <br /> <br />Mod Status: Finished <br /> <br />Any pre-requisites: none <br /> <br />Author(s): Anno <br /> <br />Date: 10/14/04 <br /> <br />Credits: Ythan for testing and bug finding <br /> <br />Files Altered: <br />/admin/showuser.php <br />/admin/changeuser.php <br />/templates/default/admin/showuser.tmpl <br />/ubbt.inc.php <br /> <br />New Files: <br />none <br /> <br />Database Altered: <br />yes <br /> <br />Info/Instructions: <br />In the attachment. <br /> <br />Disclaimer: Please backup every file that you intend to modify. <br />If the modification modifies the database, it's a good idea to backup your database before doing so. <br /> <br />Note: If you modify your UBB.Threads code, you may be giving up your right for "official" support from Infopop.If you need official support, you'll need to restore unmodified files.


Edited by Anno (01/20/05 02:32 AM)

Top
#280753 - 10/14/04 10:08 AM Re: Finished-[6.5] Time ban and notifications 1.0 [Re: domain123]
Anno Offline
Code Monkey

Registered: 05/23/01
Posts: 562
Loc: Austria
"2132 Views"<br /><br />The spiders seem busy..... <img src="http://www.ubbdev.com/forum/images/graemlins/shocked.gif" alt="" />

Top
#280754 - 10/15/04 12:42 AM Re: Finished-[6.5] Time ban and notifications 1.0 [Re: domain123]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
Nice!
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#280755 - 10/16/04 04:38 AM Re: Finished-[6.5] Time ban and notifications 1.01 [Re: domain123]
Anno Offline
Code Monkey

Registered: 05/23/01
Posts: 562
Loc: Austria
A small bug was found where the status of a time banned user was set to permanaent if his profile was edited after the ban.<br /><br />If you already installed the mod, then<br /><br />in admin/changeuser.php<br /><br />## Search for:<br />if ($user['U_Status'] == "Administrator") {<br /> $updatestatus = ",U_Status = '$newstatus'";<br />}<br />else {<br /> $updatestatus = "";<br />}<br /><br />## Replace with:<br />if ($user['U_Status'] == "Administrator") {<br /> $updatestatus = ",U_Status = '$newstatus'";<br />}<br />else {<br /> $updatestatus = "";<br />}<br /><br />//if the status changed insert the ban duration an reason, else not<br />$ubanover = "";<br />$ubanreason = "";<br />if ($check != $isbanned) { /* status changed */<br /> $ubanover = ",U_BanOver = '$banover'";<br /> $ubanreason = ",U_BanReason = '$banreason'";<br />}<br /><br /><br />## Search for:<br /> U_FloodControl = '$floodcontrol',<br /> U_BanOver = '$banover',<br /> U_BanReason = '$banreason'<br /><br />## Replace with:<br /> U_FloodControl = '$floodcontrol'<br /> $ubanover<br /> $ubanreason<br /><br /><br />That's it.<br /><br />I will update the instructions in he attachement.

Top
#280756 - 11/12/04 04:58 PM Re: Finished-[6.5] Time ban and notifications 1.01 [Re: domain123]
Organizer Offline
User

Registered: 08/17/02
Posts: 34
When writing in ban time and ban comment, but forgetting to uncheck the Member has Access Rights? it still sends PM's to admins and mods, would it not be smart to have a check for that field beeing unchecked, or automaticly uncheck when ban reason and/or time have been entered?
_________________________
Organizer

Top
#280757 - 11/12/04 07:13 PM Re: Finished-[6.5] Time ban and notifications 1.01 [Re: Billyo]
Anno Offline
Code Monkey

Registered: 05/23/01
Posts: 562
Loc: Austria
>When writing in ban time and ban comment, but forgetting to uncheck the Member <br />>has Access Rights? it still sends PM's to admins and mods<br /><br />It doesn't. There is a check in place if the status changed, and only THEN it sends the notification.<br /><br />This is the part of the code that does the check:<br /><br />if ($check != $isbanned) {<br /> //the status changed, let's motify the admins and mods

Top
#280758 - 11/13/04 06:37 AM Re: Finished-[6.5] Time ban and notifications 1.01 [Re: domain123]
Organizer Offline
User

Registered: 08/17/02
Posts: 34
Hmm, strange, thouht I did all according to instructions, have to check thorugh then and find my bug....
_________________________
Organizer

Top
#280759 - 11/13/04 10:18 AM Re: Finished-[6.5] Time ban and notifications 1.01 [Re: domain123]
Organizer Offline
User

Registered: 08/17/02
Posts: 34
I have no clue on what I am talking about, but I did not get it to work in 6.5 without some changes. <br /> <br />Since $isbanned always was 1 in my test, i was banning another moderator as test... this is when it always sent an banned PM (maybe mail) even if the $hasaccess checkbox was not changed... is this check if status moderator to avoid banning of mods? I never tried banning a normal user btw. but are experimenting there maybe now... if i have time. <br /> <br />I changed like this, and now it works for me, thought i dont really know what I have done <img src="http://www.ubbdev.com/forum/images/graemlins/wink.gif" alt="" /> <br /> <br />if ($hasaccess == "1") { <br /> $isbanned = "0"; <br />} <br />else { <br /> $isbanned = "1"; <br />} <br /> <br />Then later when one used showuser.php to look for the ban status it always said permanently banned... so i had to change the list(x,x,x,x,x) thing to fetch variables $banover and $banreason from the query... <br /> <br />list(xxxxxxxxxxxxxxxx,$floodcontrol,$banover,$banreason)=$dbh->fetch_array($sth); <br /> <br />have no clue what I am doing wrong from the start, does any of this make any sense, i am really newbie in php things...


Edited by Organizer (11/13/04 07:39 PM)

Top
#280760 - 11/14/04 01:23 PM Re: Finished-[6.5] Time ban and notifications 1.01 [Re: Billyo]
scroungr Offline
Old Hand

Registered: 10/17/03
Posts: 2409
Loc: Richmond, VA
I use a modified version of this for a penalty box on IIP
_________________________
Couchtomatoe - www.couch-tomatoe.cc
My abilities are for hire for installs, upgrades, custom themes and custom modifications.

Top
#280761 - 11/28/04 01:14 PM Re: Finished-[6.5] Time ban and notifications 1.01 [Re: 234234]
[SkA] Offline
Lurker

Registered: 10/30/04
Posts: 1
I'm getting the following error when trying to edit a user as an admin:<br /><br />PHP Parse error: parse error, unexpected $ in /admin/showuser.php on line 714, referer: showprofile.php?Cat=0&User=1981&Board=mkmf&what=ubbthreads&page=0 <br /><br />Since showuser.php doesn't have 714 lines, I'm guessing there's something wrong with showuser.tmpl?<br /><br />Any ideas (i've tryed adding the mod from scratch two times now)?

Top
#280762 - 12/25/04 10:56 PM Re: Finished-[6.5] Time ban and notifications 1.01 [Re: bgone]
nosleep Offline
Junior Member

Registered: 12/08/04
Posts: 36
Loc: DE
I have no such code in changeuser.php (6.5): <br /> <br />
Code:
## Search for: <br />if ($status == "Moderator") { <br />	$isbanned = "1"; <br />} <br />else { <br />	$isbanned = "0"; <br />} <br />
<br /> <br />instead I have: <br /> <br />
Code:
// If !$hasaccess user is banned. <br />if (!$hasaccess) { <br />	$isbanned = "1"; <br />} <br />else { <br />	$isbanned = "0"; <br />}
<br /> <br />shall I apply modification to the code I have?
_________________________
nosleep

Top
#280763 - 12/30/04 09:40 AM Re: Finished-[6.5] Time ban and notifications 1.01 [Re: bobbychet]
Anno Offline
Code Monkey

Registered: 05/23/01
Posts: 562
Loc: Austria
Opps, yes, this is the right place to add the code, yes.

Top
#280764 - 01/02/05 04:18 AM Re: Finished-[6.5] Time ban and notifications 1.01 [Re: domain123]
nosleep Offline
Junior Member

Registered: 12/08/04
Posts: 36
Loc: DE
I would like to assign one of my mods to be able to do time bans. How should I do that please?
_________________________
nosleep

Top
#280765 - 01/02/05 04:41 AM Re: Finished-[6.5] Time ban and notifications 1.01 [Re: bobbychet]
Anno Offline
Code Monkey

Registered: 05/23/01
Posts: 562
Loc: Austria
well...the easiest would be to give him permission to edit users. Then he will be able to access this function(but also other functions that deal with user settings)

Top
#280766 - 01/03/05 06:42 PM Re: Finished-[6.5] Time ban and notifications 1.01 [Re: domain123]
Catshadow Offline
User

Registered: 10/14/03
Posts: 25
Loc: Russia, Moscow
Small bag in "Time ban and notifications 1.02" Attachment <br />need to add <br />#### in admin/showuser.php <br /> <br />## Search for: <br />list($lname,$dname,$email,$femail,$fullname,$sig,$homepage,$occ,$hobbies, <br />$loc,$bio,$textcols,$textrows,$extra1,$extra2,$extra3,$extra4,$extra5, <br />$picture,$visible,$acceptpriv,$onlineformat,$birthday,$showbday,$picwidth, <br />$picheight,$display,$view,$postsper,$textcols,$textrows,$stylesheet, <br />$preview,$picview,$picposts,$chosenlanguage,$flatposts,$timeoffset, <br />$frontpage,$startpage,$showsigs,$timeformat,$ereplies,$notify,$adminemails, <br />$emailformat,$regdate,$regip,$lastpost,$lastpostip,$rating,$rates,$usertitle, <br />$namecolor,$status,$banned,$coppa,$groups,$floodcontrol)=$dbh->fetch_array($sth); <br />## Replace with: <br />list($lname,$dname,$email,$femail,$fullname,$sig,$homepage,$occ,$hobbies, <br />$loc,$bio,$textcols,$textrows,$extra1,$extra2,$extra3,$extra4,$extra5, <br />$picture,$visible,$acceptpriv,$onlineformat,$birthday,$showbday,$picwidth, <br />$picheight,$display,$view,$postsper,$textcols,$textrows,$stylesheet, <br />$preview,$picview,$picposts,$chosenlanguage,$flatposts,$timeoffset, <br />$frontpage,$startpage,$showsigs,$timeformat,$ereplies,$notify,$adminemails, <br />$emailformat,$regdate,$regip,$lastpost,$lastpostip,$rating,$rates, <br />$usertitle,$namecolor,$status,$banned,$coppa,$groups,$floodcontrol, <br />$banover,$banreason)=$dbh->fetch_array($sth);


Edited by JoshPet (01/29/05 02:17 PM)
_________________________
Sorry for my english.

Top
#280767 - 01/08/05 12:24 AM Re: Finished-[6.5] Time ban and notifications 1.01 [Re: wht]
nosleep Offline
Junior Member

Registered: 12/08/04
Posts: 36
Loc: DE
I don't want any mails to admins or mods when a user is banned by me. Where in the code can I disable the mailing please?
_________________________
nosleep

Top
#280768 - 01/08/05 01:36 AM Re: Finished-[6.5] Time ban and notifications 1.01 [Re: bobbychet]
Anno Offline
Code Monkey

Registered: 05/23/01
Posts: 562
Loc: Austria
Delete the lines that contain <br /><br />$html -> send_message

Top
#280769 - 01/08/05 04:05 AM Re: Finished-[6.5] Time ban and notifications 1.01 [Re: domain123]
nosleep Offline
Junior Member

Registered: 12/08/04
Posts: 36
Loc: DE
in admin/changeuser.php and/or where else? there are multiple references to that line.
_________________________
nosleep

Top
#280770 - 01/08/05 10:43 AM Re: Finished-[6.5] Time ban and notifications 1.01 [Re: bobbychet]
Anno Offline
Code Monkey

Registered: 05/23/01
Posts: 562
Loc: Austria
ok...<br />You don't to notify anybody when the user is banned by you and only you or in general?<br /><br />If you simply want to disable all PMs on banning occurences, then you simply delete/comment out all those lines. In all the modified scripts.

Top
#280771 - 01/09/05 12:54 AM Re: Finished-[6.5] Time ban and notifications 1.01 [Re: domain123]
nosleep Offline
Junior Member

Registered: 12/08/04
Posts: 36
Loc: DE
thank you. logic - slapping myself because I didn't think <img src="http://www.ubbdev.com/forum/images/graemlins/smile.gif" alt="" />
_________________________
nosleep

Top
Page 1 of 2 1 2 >


Moderator:  Ian_W 
Top Posters Last 30 Days
AllenAyres 20
Gizmo 10
blaaskaak 2
S7ARBVCK 2
Iann128 1
Claus1 1
M4D 1
Who's Online
2 Registered (blaaskaak, GEN), 25 Guests and 7 Spiders online.
Key: Admin, Global Mod, Mod
Shout Box

Latest Posts
Security Patch released for all 7.x versions
by AllenAyres
Yesterday at 08:00 PM
What do you use to edit the files
by AllenAyres
Yesterday at 07:54 PM
Team UBBDev Rides Again!
by AllenAyres
Yesterday at 07:32 PM
Here I am! Rock me like a Hurricane!
by AllenAyres
Yesterday at 07:20 PM
BeyondCompare v3.00
by AllenAyres
Yesterday at 07:16 PM
[7.3.1] add search to showmembers page
by AllenAyres
Yesterday at 07:13 PM
Noob - need help, or a reality check!
by Gizmo
09/04/08 03:21 AM
New Mods
[7.3.1] add search to showmembers page
by blaaskaak
Yesterday at 04:50 AM
Installing FlashChat with 7.3
by Paug
08/23/08 12:14 AM
[7.3.x] ubb.links
by AllenAyres
06/20/08 11:50 PM
[7.2.1] - Naked shoutbox
by sirdude
08/17/07 10:36 PM
[7.x] Generic Page Outside of forum directory
by
01/14/07 10:58 PM
Newest Members
veedubb8, twentyseven, Claus1, welcomeback1, Paug
13327 Registered Users

 

 

 
fusionbb message board php hacks