Page 1 of 1

users file delete permisson

Posted: Sat May 09, 2009 5:44 am
by streamino
hi david , my users sometimes delete their important files ..but i dont want that ..how could i deny this permission about delete.they can rename the files and edit the comments but i don't want to give them a permission for delete the files ..how could i do that .

Re: users file delete permisson

Posted: Sun May 17, 2009 11:03 pm
by DavidIQ
You could probably just edit the .tpl file and remove the delete button from there. That should be enough.

Re: users file delete permisson

Posted: Tue May 19, 2009 5:16 am
by streamino
thanks for reply david but i want this edit for only my users not admins ..admins have get a permission about delete..if i remove this button ,how admins will delete the files ?

Re: users file delete permisson

Posted: Tue May 19, 2009 7:39 pm
by DavidIQ
Try this:

Open attach_mod/posting_attachments.php

Find:

Code: Select all

			init_display_template('attachbody', '{POSTED_ATTACHMENTS_BODY}', 'posted_attachments_body.tpl');
Add after:

Code: Select all

			$template->assign_block_vars('switch_user_admin', array());
Open templates/yourtemplate/posted_attachments_body.tpl

Find:

Code: Select all

			&nbsp; <input type="submit" name="del_attachment[{attach_row.ATTACH_FILENAME}]" value="{L_DELETE_ATTACHMENT}" class="liteoption" /> 
Replace with:

Code: Select all

	<!-- BEGIN switch_user_admin -->
			&nbsp; <input type="submit" name="del_attachment[{attach_row.ATTACH_FILENAME}]" value="{L_DELETE_ATTACHMENT}" class="liteoption" /> 
	<!-- END switch_user_admin -->
Hopefully that does the trick...my phpBB2-fu is a bit rusty. :lol:

Re: users file delete permisson

Posted: Sun May 24, 2009 7:41 am
by streamino
it's not success david .My users still see the ''delete '' button .