vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   members can delete attachment ! (https://vborg.vbsupport.ru/showthread.php?t=203235)

Rezafcom 01-27-2009 08:29 AM

members can delete attachment !
 
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':
HTML Code:

    <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.


All times are GMT. The time now is 08:58 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01094 seconds
  • Memory Usage 1,718KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_html_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete