If you'd like to provide updated information and do not have access to directly edit, please contact the site admin; thanks!
Admin Panel Image Sorting
Depending on your textpattern installation you could download the following files, renaming the one that corresponds to your install as txp_image.php and uploading to yourtxpinstall/include/
- Textpattern 4.0 : txp_image-4.0
- Textpattern 4.1 : txp_image-4.1
- Textpattern 4.02 : txp_image-4.0.2
- Textpattern 4.03 : txp_image-4.0.3 Thanks for this patch goes to Matthias
The directions below apply only for Textpattern 4.01/4.02 However, it wouldn’t be difficult to apply the changes to previous or future versions with minor adjustments
- After
global $txpcfg,$extensions,$img_dir;
around line 33 add the following:
// From Manfre's Mod File
$sort = gps('sort');
$dir = gps('dir');
$sort = ($sort) ? $sort : 'id';
$dir = ($dir) ? $dir : 'asc';
if ($dir == "asc") { $dir = "desc"; } else { $dir = "asc"; }
// End
- Find, around line 58, the following code, and either delete it or comment it out:
hCell(ucfirst(gTxt('name'))) .
hCell(gTxt('image_category')) .
hCell(gTxt('tags')) .
hCell(gTxt('author')) .
hCell(gTxt('thumbnail')) .
hCell()
- In the place of the aforementioned code, place the following:
column_head('Id','id','image',1,$dir).
column_head('Name','name','image',1,$dir).
column_head('image_category','category','image',1,$dir).
td(gTxt('tags')).
column_head('Author','author','image',1,$dir).
hCell(gTxt('thumbnail')).
hCell()
- Find, around line 83
$rs = safe_rows_start("*", "txp_image", "1 order by category,name limit $offset,$limit");
- Replace the aforementioned code with:
$rs = safe_rows_start("*", "txp_image", "1 order by $sort $dir limit $offset,$limit");
- Find, around line 105, the following code:
td($elink).td($category).td($txtilelink.' / '.$txplink.' / '.$xhtmlink).
- In front of
td($elink)
add the following:
td($id).
Please notice the ’.’