This mod will show selected images first in the category no matter what sorting is selected, aka make images "pinned" or "sticky"
Demo:
http://4images.vano.org/ajaxcomments/categories.php?cat_id=4 (option "Show "sticky" media first" option on the left)
1) add new field into 4images_images table (use phpmyadmin or similar)
ALTER TABLE 4images_images ADD image_sticky TINYINT( 1 ) UNSIGNED NOT NULL
or download attached install_pin_images.php file, upload it to your 4images root directory and executed it. (thanks to Rembrandt for the installer)
2) add this line in includes/db_field_definitions.php (refer to this topic for more:
[TUT] Zusätzliches Image Feld anlegen / Additional Image Field and how to make it multilanguage)
$additional_image_fields['image_sticky'] = array("Sticky", "radio");
3) in categories.php find:
ORDER BY ".$config['image_order']." ".$config['image_sort'].", i.image_id ".$config['image_sort']."
Replace with:
ORDER BY i.image_sticky DESC, ".$config['image_order']." ".$config['image_sort'].", i.image_id ".$config['image_sort']."
4) in details.php find three times:
ORDER BY ".$config['image_order']." ".$config['image_sort'].", image_id ".$config['image_sort'];
Replace all of them with:
ORDER BY image_sticky DESC, ".$config['image_order']." ".$config['image_sort'].", image_id ".$config['image_sort'];
5) edit an image in ACP (Admin Control Panel) you should see a new radio button "Sticky"
6) if you would like display an icon for sticky images, edit thumbnail_bit.html template and add something similar to this:
{if image_sticky}
<img src="{template_image_url}/pin.gif" style="float: right;" border="0">
{endif image_sticky}
(assuming you already have
in templates/<your template>/images/ directory)