users file delete permisson

Since Opentools.de has now gone away I've created this forum to house FAQs and support for this mod in phpBB2.

Moderator: Experts

Locked
streamino
Posts: 15
Joined: Tue Oct 30, 2007 10:45 am

users file delete permisson

Post 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 .
DavidIQ
Site Admin
Posts: 619
Joined: Thu Sep 07, 2006 4:31 pm
Location: Earth
Contact:

Re: users file delete permisson

Post by DavidIQ »

You could probably just edit the .tpl file and remove the delete button from there. That should be enough.
streamino
Posts: 15
Joined: Tue Oct 30, 2007 10:45 am

Re: users file delete permisson

Post 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 ?
DavidIQ
Site Admin
Posts: 619
Joined: Thu Sep 07, 2006 4:31 pm
Location: Earth
Contact:

Re: users file delete permisson

Post 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:
streamino
Posts: 15
Joined: Tue Oct 30, 2007 10:45 am

Re: users file delete permisson

Post by streamino »

it's not success david .My users still see the ''delete '' button .
Locked