PDA

View Full Version : members can delete attachment !


Rezafcom
01-27-2009, 08:29 AM
in this url :
/profile.php?do=editattachments

all of usergroup can delete attachment !
where this Enable/Disable setting ??
or
what php code in profile.php ?

Marco van Herwaarden
01-27-2009, 09:25 AM
They can only delete their own attachments, providing they have permission to delete them.

Lynne
01-27-2009, 02:46 PM
You aren't saying what you want. I know I was having problems with users deleting torrent files via the profile.php page and that caused problems, so I changed that page so if the extension is 'torrent', then they don't get the box to remove the attachment. Template 'modifyattachmentsbit':
<if condition="$show['deletebox'] AND $post['attachmentextension']<>'torrent'">
<td class="alt1" align="center" style="padding:0px"><input type="checkbox" name="deletebox[$post[attachmentid]]" value="yes" /></td>
<else />
<td class="alt1" align="center">&nbsp;</td>
</if>

However, if you don't want to show the delete box for any attachments, you can probably just write a plugin to set $show['deletebox'] to false on that page.

Rezafcom
01-27-2009, 07:51 PM
thanks ... by this way checkbox hide ...

now , how to hide delete button ?!

Lynne
01-27-2009, 08:03 PM
Find the code in the template and remove it. To find the template - vboptions > General Settings > Add Template Name in HTML Comments > set to Yes . Then go back to your page and view the source code and you will see the name of the template called around your part of the code.

Rezafcom
01-28-2009, 12:15 PM
this button is between :
<!-- END TEMPLATE: modifyattachmentsbit -->
and
<!-- BEGIN TEMPLATE: pagenav -->

where template ?

Lynne
01-28-2009, 02:17 PM
Then it's probably in the main template listed at the top of the page source.