Announcement

#1 2007-02-08 21:50:15

LaneLester
Member
2007-02-08
13

How to Disable User Prompt for Thumbnail?

I'd like to disable  the prompt for the user to upload a thumbnail and just take care of that myself. Is that easily accomplished?

Lane

Offline

 

#2 2007-02-08 22:27:05

VDigital
Former Piwigo Team
Paris (FR)
2005-05-04
17680

Re: How to Disable User Prompt for Thumbnail?

I hope it's still working. With any php simple edit program...
In upload.php find:

if ( sizeof( $error ) == 0 )
  {
    $query = 'insert into '.WAITING_TABLE;
    $query.= ' (storage_category_id,file,username,mail_address,date,infos)';
    $query.= ' values ';
    $query.= '('.$page['cat'].",'".$_FILES['picture']['name']."'";
    $query.= ",'".htmlspecialchars( $_POST['username'], ENT_QUOTES)."'";
    $query.= ",'".$_POST['mail_address']."',".time().",'".$xml_infos."')";
    $query.= ';';
    pwg_query( $query );
    $page['waiting_id'] = mysql_insert_id();
  }
}

and replace by:

if ( sizeof( $error ) == 0 )
  {
    $query = 'insert into '.WAITING_TABLE;
    $query.= ' (storage_category_id,file,username,mail_address,date,infos)';
    $query.= ' values ';
    $query.= '('.$page['cat'].",'".$_FILES['picture']['name']."'";
    $query.= ",'".htmlspecialchars( $_POST['username'], ENT_QUOTES)."'";
    $query.= ",'".$_POST['mail_address']."',".time().",'".$xml_infos."')";
    $query.= ';';
    pwg_query( $query );
    $page['waiting_id'] = mysql_insert_id();
    $page['upload_successful'] = true;
  }
}

8-)


Piwigo.com: Start and run your own photo gallery. Signup and get 30 days to try for free, no commitment.
8-)

Offline

 

#3 2007-02-09 21:01:49

VDigital
Former Piwigo Team
Paris (FR)
2005-05-04
17680

Re: How to Disable User Prompt for Thumbnail?

Is it working well?
8-)


Piwigo.com: Start and run your own photo gallery. Signup and get 30 days to try for free, no commitment.
8-)

Offline

 

#4 2007-02-09 21:50:17

LaneLester
Member
2007-02-08
13

Re: How to Disable User Prompt for Thumbnail?

VDigital wrote:

Is it working well?
8-)

Yes, it is, Vincent. Thanks for all your help. That one line of code did take care of the user thumbnail prompt.

Lane

Offline

 

#5 2007-05-20 11:55:07

el ninjo
Translation Team
2006-09-24
40

Re: How to Disable User Prompt for Thumbnail?

What must i found a replace in 1.7.0 ?

Offline

 

#6 2007-05-20 14:42:10

rub
Former Piwigo Team
Lille
2005-08-26
5019

Re: How to Disable User Prompt for Thumbnail?

Find:

Code:

$page['waiting_id'] = mysql_insert_id();

And add after:

Code:

$page['upload_successful'] = true;

Is it correct?

Offline

 

#7 2007-05-20 14:53:00

el ninjo
Translation Team
2006-09-24
40

Re: How to Disable User Prompt for Thumbnail?

Perfekt, it's work great. Thanks for your help.

(Help for all others: line 225 in upload.php)

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact