4images Forum & Community
4images Issues / Ausgaben => Discussion & Troubleshooting => Topic started by: Kjeld on April 15, 2006, 12:22:22 AM
-
I have just created 2 to $additional_image_fields.
One is for 'Model release', the other for 'Property release'.
When I added the new fields to the MySQL database, I set the default to '0' in the database.
The new fields are displayed correctly in the administration for entering new images.
However, they show 'yes' as the default selection. I want 'no' as the default.
I have spent many hours searching the forum and trying out solutions, but can't figure it out... :?
I imagine that a solution for this issue would help lots of people. And I really need the help.
Please help. How do I set the default to 'no' for these 2 $additional_image_fields?
PS
I am using 4images version: 1.7.2
-
It seems this should be eays to solve... I can' figure it out, though. Please help.
-
I just changed the wording of my original question as I am getting no response.
Noboby knows how to do solve this? Please help.
-
try this:
in admin/images.php find: show_additional_fields("image", array(), IMAGES_TABLE, $i);
Replace with: show_additional_fields("image", array("field1 => 0", "field2" => 0), IMAGES_TABLE, $i);
In admin/admin_functions.php find: show_radio_row($val[0], $field_name, ($value == "") ? 1 : $value);
Replace with: show_radio_row($val[0], $field_name, ($value === "") ? 1 : $value);
I dont know how these changes will affect other radio buttons (including none-custom)
-
try this:
in admin/images.php find: show_additional_fields("image", array(), IMAGES_TABLE, $i);
Replace with: show_additional_fields("image", array("field1" => 0, "field2" => 0), IMAGES_TABLE, $i);
In admin/admin_functions.php find: show_radio_row($val[0], $field_name, ($value == "") ? 1 : $value);
Replace with: show_radio_row($val[0], $field_name, ($value === "") ? 1 : $value);
I dont know how these changes will affect other radio buttons (including none-custom)
Thanks a lot for helping, V@no. I am always amazed at all your helpful advice in this forum.
I followed the instructions above exactly, but it doesn't change the settings of the radio buttons.
I noticed you used "field1 => 0" but "field2" => 0
Was this on purpose?
Also, should I change 'field1' and 'field2' with the field names that I use?
-
Also, should I change 'field1' and 'field2' with the field names that I use?
I guess I forgot to mention that...:oops:
Yes, change these to the name of your new fields that you want set to "no" by default.
-
Thanks, V@no! That did the trick. I also had to make a tiny change in the code.
WAS
show_additional_fields("image", array("field1 => 0", "field2" => 0), IMAGES_TABLE, $i);
SHOULD BE (the quotation mark for 'field1' has been moved)
show_additional_fields("image", array("field1" => 0, "field2" => 0), IMAGES_TABLE, $i);
Thanks a lot.
This is a small change code wise, but it has a huge result in the work load. When uploading hundreds of images at a time, each click counts.
-
not my fault, its browser's fault! j/k ;) (updated)
This is a small change code wise, but it has a huge result in the work load. When uploading hundreds of images at a time, each click counts.
really? ever consider FTP upload? ;)
-
Yes, I upload by ftp and then use 'Check new images'. You still have to click the appropriate buttons for each image, right? Or is there another method?
-
You still have to click the appropriate buttons for each image, right?
Not quiet sure what do you mean...in check images? if you use "detailed view" ? if so, then you can do the exact same changes as in images.php but in checkimages.php ;)
Still, IMO, FTP method is much quicker then selecting each image one-by-one ;)
Good luck.
-
Yes, I use the detailed view so that I can click on the IPTC buttons for caption and keywords. Now I will also need to check 'yes' if an image has a model or property release.
V@no, I have one more question that I can't seem to find an answer for in the forum.
After adding the new fields and following your excellent advice above, I have added this to details.html:
{if image_property}YES{endif image_property}
But I get no results... Do I perhaps have to change another file as well?
Must have been a caching problem of my browser...