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 » Sat May 09, 2009 5:44 am

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 .

User avatar
DavidIQ
Site Admin
Posts: 581
Joined: Thu Sep 07, 2006 4:31 pm
Location: Earth
Contact:

Re: users file delete permisson

Post by DavidIQ » Sun May 17, 2009 11:03 pm

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 » Tue May 19, 2009 5:16 am

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 ?

User avatar
DavidIQ
Site Admin
Posts: 581
Joined: Thu Sep 07, 2006 4:31 pm
Location: Earth
Contact:

Re: users file delete permisson

Post by DavidIQ » Tue May 19, 2009 7:39 pm

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 » Sun May 24, 2009 7:41 am

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

Locked

Who is online

Users browsing this forum: No registered users and 2 guests