[SOLVED] Addfrom Webbrowser - filename not set as title default

axka

Joined: 2012-08-21
Posts: 3
Posted: Tue, 2012-08-21 14:44

On the "Add from Webbrowser" page to add a photo I would like to set "blank" as default (selected in the dropdown) and not the filename as default title.
I found the files (ItemAddFromBrowser) that need to get changed but I don't understand the logic as I am not a programmer.
Please provide the code in order to do the desired above.
Thank you very much!

AxKa

P.S.
Gallery-Version = 2.3.1 Kern 1.3.0.1
API = Core 7.54, Modul 3.9, Motiv 2.6, Eingebettet 1.5
PHP-Version = 5.2.17 cgi-fcgi
Webserver = Apache
Datenbank = mysqlt 5.0.92-1~ui60+1, lock.system=flock
Werkzeuge = ArchiveUpload, Exif, Getid3, jpegtran, LinkItemToolkit, NetPBM, Thumbnail, Gd, SquareThumb
Beschleunigung = full/3600, none/900
Betriebssystem = Linux infong 2.4 #1 SMP Fri May 18 17:32:59 UTC 2012 i686 GNU/Linux
Standard-Motiv = matrix
gettext = Aktiviert
Sprache = de_DE
Browser = Mozilla/5.0 (Windows NT 5.1; rv:14.0) Gecko/20100101 Firefox/14.0.1
Zeilen in der GalleryAccessMap Tabelle = 151
Zeilen in der GalleryAccessSubscriberMap Tabelle = 4633
Zeilen in der GalleryUser Tabelle = 25
Zeilen in der GalleryItem Tabelle = 4628
Zeilen in der GalleryAlbumItem Tabelle = 252
Zeilen in der GalleryCacheMap Tabelle = 27

 
Dayo

Joined: 2005-11-04
Posts: 1642
Posted: Wed, 2012-08-22 21:16

Change ...

    {html_options options=$ItemAddFromBrowser.titleList selected=$form.set.title}

to ...

    {*html_options options=$ItemAddFromBrowser.titleList selected=$form.set.title*}
    {html_options options=$ItemAddFromBrowser.titleList selected=''}

... in modules/core/templates/ItemAddFromBrowser.tpl

... and in modules/core/ItemAddFromBrowser.inc, change ...

		    $title = ($form['set']['title'] == 'filename') ? $base

to ...

		    $form['set']['title'] = '';
		    $title = ($form['set']['title'] == 'filename') ? $base

--
dakanji.com

 
axka

Joined: 2012-08-21
Posts: 3
Posted: Thu, 2012-08-23 13:46

Worked just fine. Thank you!

 
Dayo

Joined: 2005-11-04
Posts: 1642
Posted: Thu, 2012-08-23 15:38

Hi,

Sorry, that was a bad hack. It will have the consequence of always forcing the use of "Blank" no matter what the user selects instead of what you actually asked for which was simply to show "Blank" as default.

To do this, reverse the changes and only change ...

$form['set'] = array('title' => 'filename', 'summary' => 1, 'description' => 1);

to ...

$form['set'] = array('title' => '', 'summary' => 1, 'description' => 1);

... in modules/core/ItemAddFromBrowser.inc

--
dakanji.com

 
axka

Joined: 2012-08-21
Posts: 3
Posted: Thu, 2012-08-23 16:22

Works even better :) Thanks again!
You probably better delete your first post so nobody does that wrong.

AxKa

 
Dayo

Joined: 2005-11-04
Posts: 1642
Posted: Thu, 2012-08-23 17:13

I'll leave it in place as someone might want what it offers.

--
dakanji.com