Drop Down Sort Order Form Drop Down Sort Order Form
 

News:

CPG Release 1.6.27
change DB IP storage fields to accommodate IPv6 addresses
remove use of E_STRICT (PHP 8.4 deprecated)
update README to reflect new website
align code with new .com CPG website
correct deprecation in captcha

Main Menu

Drop Down Sort Order Form

Started by Quinn, January 11, 2011, 08:44:53 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Quinn

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 -http://forum.coppermine-gallery.net/index.php/topic,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.

Error
The selected album/file does not exist!

CPG 1.5.12 bridged w/SMF 1.1.12
http://forums.bs-raven.net/galleries/thumbnails.php?album=6



// 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">
<tr>
<td width="50%" class="statlink">
<h2>{ALBUM_NAME}</h2>
</td>
<td>
<!-- 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>
</span>
</td>
<!-- 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>
</select>
</form>
</div>
</td>
</tr>
</table>

<!-- END Sort Option dropdown -->
EOT;


Maybe there is a simple reason for this action?