Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: Auto keyword on upload  (Read 3219 times)

0 Members and 1 Guest are viewing this topic.

skidpics

  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 223
Auto keyword on upload
« on: September 29, 2007, 05:55:17 pm »

How do you code auto keywords based on the album you are uploading to instead of having to enter them?
Logged

skidpics

  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 223
Re: Auto keyword on upload
« Reply #1 on: September 29, 2007, 06:15:00 pm »

In the upload.php, could you not change the following:

Quote
// Create thumbnail and intermediate image and add the image into the DB
$result = add_picture($album, $filepath, $picture_name, 0,$title, $caption, $keywords, $user1, $user2, $user3, $user4, $category, $raw_ip, $hdr_ip, $movie_wd, $movie_ht);

to:

Quote
// Create thumbnail and intermediate image and add the image into the DB
            $result = add_picture($album, $filepath, $picture_name, 0,$title, $caption, $album, $user1, $user2, $user3, $user4, $category, $raw_ip, $hdr_ip, $movie_wd, $movie_ht);

Which will in turn put the album name automatically into the keyword variable within the database?

I am getting a point here with this.  I replied to a previous thread but forgot where it was about having multiple albums for a single image. The only way I see how to do this is use the keyword variable for the album name..  .. In default, the default keyword will be the current album you are uploading to..  then you can add additional 'keywords' based only on the current albums you have to join them together.  What do you think?
Logged

skidpics

  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 223
Re: Auto keyword on upload
« Reply #2 on: September 29, 2007, 07:56:59 pm »

Well, I give up - What is the variable name in upload.php that passes on the album title?  I used $alb_cat, but it passes on member name and title of Album, which is almost correct..
Logged

skidpics

  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 223
Re: Auto keyword on upload
« Reply #3 on: September 29, 2007, 08:04:48 pm »

How do you change this to capture the keyword as album name?

array($lang_upload_php['keywords'], 'keywords', 0, 255, 1),

or is it this entry?

$keywords = addslashes($_POST['keywords']);
Logged

skidpics

  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 223
Re: Auto keyword on upload
« Reply #4 on: December 11, 2007, 05:43:14 pm »

Anyone have an idea?
Logged

skidpics

  • Coppermine frequent poster
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 223
Re: Auto keyword on upload
« Reply #5 on: February 29, 2008, 05:53:51 pm »

Not alot of readers.  Anyone have any suggestions?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Auto keyword on upload
« Reply #6 on: February 29, 2008, 05:55:21 pm »

Usually, if nobody answers, nobody knows the answer. Or nobody wants to answer. No use bumping frequently.
Logged
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 20 queries.