vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Is there a way to delete a photo (3.7) without going to edit it? (https://vborg.vbsupport.ru/showthread.php?t=196165)

ringleader 11-13-2008 11:45 AM

Is there a way to delete a photo (3.7) without going to edit it?
 
I am looking to incorporate a delete button underneath photos for their owner, and I was wondering if anyone knew a way to pass the 'delete' order directly to
album.php?do=updatepictures without going to do=editpictures.

i.e. it would just delete without the intermediary 'edit' page.

Lynne 11-13-2008 02:45 PM

If you look at the form for the edit page, you can probably find out what form it uses and what variables need to be passed. I did something similar on my site where my Mods have a single button to hit to Move a thread to another forum and remove the torrent/attachment at the same time. You need to pass the attachment id for sure. So, you may need a few Delete buttons - one for each attachment.

ringleader 11-14-2008 07:07 AM

Yeah, I had tried everything it seemed, so I was at the stage where I was ready to be just told how to do it ;)

I got it in the end with this piece of code on an updatepictures form

Code:

<input type="image" src="img/new/ico_del.gif" alt="delete photo" name="pictures[$pictureinfo[pictureid]][delete]" id="cb_delete_pic$pictureinfo[pictureid]" value="1" tabindex="1" />

Lynne 11-14-2008 02:37 PM

Quote:

Originally Posted by ringleader (Post 1665404)
Yeah, I had tried everything it seemed, so I was at the stage where I was ready to be just told how to do it ;)

Boy do I know that feeling!!!

Glad you got it figured out.


All times are GMT. The time now is 02:42 PM.

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.01023 seconds
  • Memory Usage 1,714KB
  • 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_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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