View Full Version : Redirect to login if uploads are exceeded

February 15th, 2009, 11:33 AM
Chuck, what can I do to get PP to redirect to the login screen if the daily uploads amount are exceeded? THis will force either a registration or login.. hopefully.

Can I redirect in uploadphoto.php around line 144:

$Globals['pp_lang']['uplimit'] = str_replace( "%pics%", $uploadchk, $Globals['pp_lang']['uplimit'] );

Chuck S
February 15th, 2009, 12:08 PM
Maybe replace the diewell with this?

login( "{$Globals['maindir']}/uploadphoto.php" );

February 15th, 2009, 05:16 PM
almost - that shows the login screen plus the upload screen - allowing uploading, but then giving the error that uploads exceeded.

I want to login only.

February 15th, 2009, 05:21 PM
How about showing the login screen under the diewell message?

Chuck S
February 15th, 2009, 05:28 PM
Really you can not unless maybe possibly you include the login template directly in the diewell template for all diewell messages.

February 15th, 2009, 05:31 PM
never paid attention to that. I will look into that - as I stated in the mod forums a while back - a user should be given every opportunity to upload and register with the gallery - every opportunity - thanks for the tip - I will post the results once I got it set up.

Chuck S
February 15th, 2009, 05:41 PM
We do not show the upload link if a group does not have permission to upload which is the preferred method of handling things just like if someone does not have permission to post in a forum you dont see a new post link.

There is default code to show a login screen if a bot or someone views uploadphoto.php from a bookmark or by mistake but outright showing the link is not done.

February 15th, 2009, 06:37 PM
How come the menu bar disappears when you go to login? All that shows is the custom links I added in the mnubar.tmpl - all other do not show on the login screen.. Hmm..

Skidpics - Fast, free image hosting. The Place for your images! - Login (http://skidpics.com/misc.php?action=login&login=yes)

Chuck S
February 15th, 2009, 06:44 PM
we dont call the menubar in that login page.

February 15th, 2009, 06:46 PM
that explains that then..

Chuck S
February 15th, 2009, 08:53 PM
;) yep usually something quite simple