Home Private Messages Search
CPG Dragonfly™ CMS stopsoftwarepatents.eu petition banner
Toggle Content
 
Forums ⇒ CMS (All) ⇒ Requests :: Archives ⇒ Auto Timer for suspended accounts :: Archived


Auto Timer for suspended accounts :: Archived
Requests for core changes must be submitted through the Projects Features section.
Go to page 1, 2  Next
This forum is locked: you cannot post, reply to, or edit topics.    This topic is locked: you cannot edit posts or make replies.    Printer Friendly Page     Forum Index ⇒  Requests

Topic Archived View previous topic :: View next topic  
Author Message
Dizfunkshunal
Platinum Supporter
Platinum Supporter

Offline Offline
Joined: Mar 23, 2006
Posts: 2064

PostPosted: Wed Sep 20, 2006 3:07 am
Post subject: Auto Timer for suspended accounts

Here would be a nice admin feature. A timer forthe suspended account. like suspend acount for 1 or 2 or 3 or 5 or 7 days drop down menu to choose how many days to suspend them for and then when that time is up there account automatically gets unsuspended. and an email should be sent to admins letting them know.

_________________
Diz Web Design Status: Open (Use of resources requires registration.)

Dizfunkshunal's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Multiple Setups
Back to top
View user's profile Send e-mail Visit poster's website Yahoo Messenger
jeffk
Supporter
Supporter

Offline Offline
Joined: Jun 21, 2004
Posts: 322

PostPosted: Wed Sep 20, 2006 9:12 am
Post subject: Re: Auto Timer for suspended accounts

good idea , would be of use to me

cant seeing it being developed tho , DF has ground to a halt

maybe try over at dfbounty

_________________
CMS Version 9.1.2.1
PHP Version 4.4.4
MySQL Version 4.1.22-standard (client: 4.1.22)

jeffk's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
CMS Version 9.1.2.1HP Version 4.4.4MySQL Version 4.1.22-standard (client: 4.1.22
Back to top
View user's profile Visit poster's website MSN Messenger Photo Gallery
DarrylHadfield
Newbie
Newbie

Offline Offline
Joined: Nov 04, 2004
Posts: 15
Location: Ohio
PostPosted: Mon Mar 12, 2007 3:48 pm
Post subject: Re: Auto Timer for suspended accounts

Old thread, but I third that motion. Very handy for admins.


DarrylHadfield's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
private. :)
Back to top
View user's profile Visit poster's website
Kendle
500+ Posts Club
500+ Posts Club

Offline Offline
Joined: Dec 16, 2004
Posts: 552

PostPosted: Mon Mar 12, 2007 4:35 pm
Post subject: Re: Auto Timer for suspended accounts

How would the account get "automatically" unsuspended? You'd need a cron job or similar running on the server to do this, it'd not be part of the CMS (web pages / programs are initiated by a client, they don't run automatically).

If you have the capability to run cron jobs (and you can execute PHP scripts from a command line) I have just such a system running on www.gamersnation.co.uk

We suspend users for a period of time (day / week / month / year) and a cron job un-suspends them when the time is up. If anyone's interested gimme a shout, I should be able to package up the code I used to do it (DF 9.0.6.1 tho, not tried it with DF9.1).

_________________
Gaming League / Cup - www.leaguecms.co.uk :: Other DragonFly modules - www.cmsdreams.co.uk

Kendle's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Back to top
View user's profile Visit poster's website
jeffk
Supporter
Supporter

Offline Offline
Joined: Jun 21, 2004
Posts: 322

PostPosted: Mon Mar 12, 2007 4:40 pm
Post subject: Re: Auto Timer for suspended accounts

is this integrated into df ie admin interface for suspending users and setting a time for suspension ?

_________________
CMS Version 9.1.2.1
PHP Version 4.4.4
MySQL Version 4.1.22-standard (client: 4.1.22)

jeffk's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
CMS Version 9.1.2.1HP Version 4.4.4MySQL Version 4.1.22-standard (client: 4.1.22
Back to top
View user's profile Visit poster's website MSN Messenger Photo Gallery
DarrylHadfield
Newbie
Newbie

Offline Offline
Joined: Nov 04, 2004
Posts: 15
Location: Ohio
PostPosted: Mon Mar 12, 2007 4:43 pm
Post subject: Re: Auto Timer for suspended accounts

You mean a CRON tab? No you wouldn't.

When the user goes to log in, if they're suspended, do a check against the initial ban. CRONtabbing would be too much for this, and would require resources that most providers would (or at least, SHOULD) not want to expose to hosting users.

Simple Example:

Johnny Badman posts a naughty pic of his girlfriend on December 25th (Merry Christmas), and an admin bans him for a day. He tries to log back in on the 25th, and gets a notice that he's been temporarily banned, and the ban will be lifted 24 hours from 10:34am EST, which was when the ban was set.

He tries to log in at 10:33 the next day, the system does a query for his account and sees that it's banned - and Johnny gets a message stating the ban will be lifted in 1 minute.

He tries to log in at 10:35, and he gets in, because the ban automatically lifts when the system checks the expiration date for the ban when he's logging in.

Smile

D.


DarrylHadfield's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
private. :)
Back to top
View user's profile Visit poster's website
Kendle
500+ Posts Club
500+ Posts Club

Offline Offline
Joined: Dec 16, 2004
Posts: 552

PostPosted: Mon Mar 12, 2007 5:01 pm
Post subject: Re: Auto Timer for suspended accounts

Jeff, yes.

DarrylHadfield, yep, you could do it that way. I just did it the cron job way because a) it required less hacking of core code, and b) because I can, I own and run the server the site mentioned above runs on. Wink

_________________
Gaming League / Cup - www.leaguecms.co.uk :: Other DragonFly modules - www.cmsdreams.co.uk

Kendle's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Back to top
View user's profile Visit poster's website
jeffk
Supporter
Supporter

Offline Offline
Joined: Jun 21, 2004
Posts: 322

PostPosted: Mon Mar 12, 2007 6:44 pm
Post subject: Re: Auto Timer for suspended accounts

can you hook me up with a copy then please Mark

_________________
CMS Version 9.1.2.1
PHP Version 4.4.4
MySQL Version 4.1.22-standard (client: 4.1.22)

jeffk's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
CMS Version 9.1.2.1HP Version 4.4.4MySQL Version 4.1.22-standard (client: 4.1.22
Back to top
View user's profile Visit poster's website MSN Messenger Photo Gallery
Kendle
500+ Posts Club
500+ Posts Club

Offline Offline
Joined: Dec 16, 2004
Posts: 552

PostPosted: Mon Mar 12, 2007 6:48 pm
Post subject: Re: Auto Timer for suspended accounts

Will do. You're using DF9.1, or still on 9.0.6.1?

_________________
Gaming League / Cup - www.leaguecms.co.uk :: Other DragonFly modules - www.cmsdreams.co.uk

Kendle's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Back to top
View user's profile Visit poster's website
jeffk
Supporter
Supporter

Offline Offline
Joined: Jun 21, 2004
Posts: 322

PostPosted: Mon Mar 12, 2007 7:00 pm
Post subject: Re: Auto Timer for suspended accounts

9.1

_________________
CMS Version 9.1.2.1
PHP Version 4.4.4
MySQL Version 4.1.22-standard (client: 4.1.22)

jeffk's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
CMS Version 9.1.2.1HP Version 4.4.4MySQL Version 4.1.22-standard (client: 4.1.22
Back to top
View user's profile Visit poster's website MSN Messenger Photo Gallery
tkog2004
Heavy poster
Heavy poster

Offline Offline
Joined: May 14, 2006
Posts: 152

PostPosted: Mon Mar 12, 2007 10:52 pm
Post subject: Re: Auto Timer for suspended accounts

I'd be interested in that one too, could be what im looking for.....

_________________


tkog2004 please enter your server specs in your user profile! Crying or Very sad
Back to top
View user's profile Visit poster's website
Kendle
500+ Posts Club
500+ Posts Club

Offline Offline
Joined: Dec 16, 2004
Posts: 552

PostPosted: Tue Mar 13, 2007 11:47 am
Post subject: Re: Auto Timer for suspended accounts

OK, thought I might as well do this reasonably properly, and for DF9.1 as that's the current version (probably works in 9.0.6.1 but don't take my word for it).

Package is attached to this post and can also be downloaded from:-

www.cmsdreams.co.uk/do...nduser.zip

Here's the README :-

===============================================================
Add Suspend User for time period functionality to DragonFly 9.1
13/03/2007 - www.cmsdreams.co.uk
===============================================================

This hack replaces core files of the DragonFly 9.1 CMS.

DO NOT ATTEMPT TO USE THIS HACK IF YOU'RE IN ANY WAY UNCOMFORTABLE ABOUT REPLACING CORE FILES!!!

The files replaced are :-

/admin/modules/users.php
/admin/modules/users_susdel.inc
/includes/classes/cpg_member.php
/modules/Your_Account/edit_profile.php

MAKE SURE YOU KEEP COPIES OF THE ORIGINAL FILES SO YOU CAN RESTORE THEM LATER IF REQUIRED!!!

INSTALLATION
============

1.

Apply the SQL file contained in this package to your database. This SQL file adds 3 new fields to the users table. If your users table is not called "cms_users" you will need to edit the table name in this SQL file before applying it.

If you don't understand what this instruction means, or you don't have access to your database, STOP NOW and do NOT attempt to use this hack.

2.

Upload the files in the "html" folder in this package to your website root folder.

That's all there is to it!

INSTRUCTIONS
============

This hack amends a field on the "Privileges" tab of the "Edit User" Admin panel screen. (Admin -> Members -> Edit User -> Privileges)

You can specify a quantity and a time period for which you wish to suspend a user. So you can suspend them for 3 hours, 6 days, 9 months for example, or suspend them permanently. The email sent to the user informing them they've been suspended will indicate how long they've been suspended for.

Further, on the "Suspended Users" tab of the "Members" Admin panel screen the date / time until which the user has been suspended is included in the list. Restoring a user from this screen clears their suspension data in their user account.

When a suspended user logs into your website their suspension time is checked against current time. If the suspension has expired their suspension data is cleared and they're allowed to log in. If it hasn't, they're not allowed to login, as per standard DragonFly behaviour.


As it says, don't use this if you don't understand the implications of doing so. It replaces core files and is likely to break the very next time the DF Devs release a new version. Use at your own risk, without warranty and all that Wink

Unlike my solution posted earlier this one doesn't require a CRON job to update a user's status. It checks a timestamp in their account (either when logging in or when reading their cookie if already logged in) to see if their suspension has expired. If it has, it clears the suspension data in their account and allows them to acces to the site, or log in if not logged in.

Tested on my own DF9.1 site and seems to work OK.

_________________
Gaming League / Cup - www.leaguecms.co.uk :: Other DragonFly modules - www.cmsdreams.co.uk

Kendle's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Back to top
View user's profile Visit poster's website
jeffk
Supporter
Supporter

Offline Offline
Joined: Jun 21, 2004
Posts: 322

PostPosted: Tue Mar 13, 2007 2:28 pm
Post subject: Re: Auto Timer for suspended accounts

thx Mark , installed ok , just testing atm

one typo in language needs changing to

define('_CMSD_PERMANENT','Permanently');

_________________
CMS Version 9.1.2.1
PHP Version 4.4.4
MySQL Version 4.1.22-standard (client: 4.1.22)

jeffk's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
CMS Version 9.1.2.1HP Version 4.4.4MySQL Version 4.1.22-standard (client: 4.1.22
Back to top
View user's profile Visit poster's website MSN Messenger Photo Gallery
tkog2004
Heavy poster
Heavy poster

Offline Offline
Joined: May 14, 2006
Posts: 152

PostPosted: Wed Mar 14, 2007 9:55 am
Post subject: Re: Auto Timer for suspended accounts

works a treat Mark, thanks.....

_________________


tkog2004 please enter your server specs in your user profile! Crying or Very sad
Back to top
View user's profile Visit poster's website
dusman
Dragonfly addicted
Dragonfly addicted

Offline Offline
Joined: Mar 17, 2006
Posts: 303
Location: Maryland
PostPosted: Wed Mar 14, 2007 1:37 pm
Post subject: Re: Auto Timer for suspended accounts

would be a nice feature to have built in for sure

_________________
-Dustin

Celebrity Babes | Celebrity Videos | Funny Videos | Information for Men

dusman's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux/Apache 1.3/4.1.21/5.2.1/9.2.0.RC1
Back to top
View user's profile Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.    This topic is locked: you cannot edit posts or make replies.    Printer Friendly Page    Forum Index ⇒  Requests
Page 1 of 2
All times are GMT
Go to page 1, 2  Next

Archive Revive
Username:
This is an archived topic - your reply will not be appended here.
Instead, a new topic will be generated in the active forum.
The new topic will provide a reference link to this archived topic.
 
   Toggle Content User Info

Welcome Anonymous

Nickname
Password
(Register)

   Toggle Content Last CVS commits
· Fixed .ico Expires header.
· Removed domain name from cookies so subdomains wont access them anymore.
· CSS and JS, case insensitives.
· CSS and JS, send correct HTTP 1.1 headers and fixed issues where themes and...
· Further security class improvements.
· 301 redirects on LEO changes
· Option to force 3xx http status codes
· Validate googlebot.com and google.com crawlers.
· CCBot
· Rss with etag and atom.

read more...

   Toggle Content Community

Support for DragonflyCMS in a other languages:

Deutsch
Español

   Toggle Content X-links
UltraEdit Browse Happy logo Firefox MySQL PostgreSQL Valid CSS! Valid XHTML 1.0! Unicode Encoded Badge NukeBiz Resources Raven DragonflyCMS Dedicated Now InsideSupport Lampe Berger

You are seeing squares or questionmarks on this page?

All content of this website is copyrighted by the Creative Commons NC-SA
The logos and trademarks used on this site are the property of their respective owners
We are not responsible for comments posted by our users, as they are the property of the poster.
Our server runs on a P3 1.2GHz with 512MB RAM with no accelerators
Support GoPHP5.org
Interactive software released under GNU GPL, Code Credits, Privacy Policy