No Support => Modifications/Add-Ons/Hacks => Mods: Visuals => Topic started by: Quinn on January 11, 2011, 08:44:53 am

Title: Drop Down Sort Order Form
Post by: Quinn on January 11, 2011, 08:44:53 am
I found a piece of unfinished code here in a earlier post that was what I was looking for and thought I would give it a go -,58676.0.html (,58676.0.html)
it works as expected, but only if I have Admin Controls enabled... else I get the error!?!? All Guests have the same issue.

The selected album/file does not exist!

CPG 1.5.12 bridged w/SMF 1.1.12 (

Code: [Select]
// HTML template for title row of the thumbnail view (album title + sort options)
$template_thumb_view_title_row = <<<EOT
<table width="100%" cellpadding="4" cellspacing="0">
<td width="50%" class="statlink">
<!-- BEGIN admin_buttons -->
<span><img src="images/spacer.gif" width="12" alt="" />
                    <a href="modifyalb.php?album={ALBUM_ID}" class="admin_menu">{MODIFY_LNK}</a>&nbsp;                   
                    <a href="index.php?cat={CAT_ID}" class="admin_menu">{PARENT_CAT_LNK}</a>&nbsp;                   
                    <a href="editpics.php?album={ALBUM_ID}" class="admin_menu" >{EDIT_PICS_LNK}</a>&nbsp;                   
                    <a href="albmgr.php?cat={CAT_ID}" class="admin_menu" >{ALBUM_MGR_LNK}</a>
<!-- END admin_buttons -->
<!-- START Sort Option dropdown -->
<td class="sortorder_cell">
                        <div align="right">
          <form name="sort" action="{$_SERVER['REQUEST_URI']}" method="get">
         <select name="sortbox" OnChange="location.href=sort.sortbox.options[selectedIndex].value">
                                <option>Sorting Order</option>
<option value="thumbnails.php?album={ALBUM_ID}&page={PAGE}&sort=ta">{TITLE} +</option>
<option value="thumbnails.php?album={ALBUM_ID}&page={PAGE}&sort=td">{TITLE} -</option>
<option value="thumbnails.php?album={ALBUM_ID}&page={PAGE}&sort=na">{NAME} +</option>
<option value="thumbnails.php?album={ALBUM_ID}&page={PAGE}&sort=nd">{NAME} -</option>
<option value="thumbnails.php?album={ALBUM_ID}&page={PAGE}&sort=da">{DATE} +</option>
<option value="thumbnails.php?album={ALBUM_ID}&page={PAGE}&sort=dd">{DATE} -</option>
<option value="thumbnails.php?album={ALBUM_ID}&page={PAGE}&sort=pa">{POSITION} +</option>
<option value="thumbnails.php?album={ALBUM_ID}&page={PAGE}&sort=pd">{POSITION} -</option>

<!-- END Sort Option dropdown -->

Maybe there is a simple reason for this action?