how to gallery menu change to floating menu how to gallery menu change to floating menu
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

how to gallery menu change to floating menu

Started by santoro, January 05, 2008, 07:44:57 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

santoro

I don't know the terminology, so I know how to call it. I think it's called "floating menu". To see what I mean by that, look on the attached jpeg.
Anyway, I want to have options "Last uploads, Last comments, Most viewed, Top rated and My Favorites" in this sort of "unpacking" menu. Can somebody tell me how to do this? Thanks for answer!!!
I am using theme Green Flower with vertical gallery menu on the left side.

Joachim Müller

That's usually not called "floating menu", but "dropdown menu". Moving your thread to the theme board.

santoro


santoro

I find this html form so far:


<select name="platform" size="1">
<option value="win">Windows
<option value="linux">Linux
<option value="unix">Unix
<option value="mac">Mac
</select>


But I still don't know 1) what should I write inside the quotation marks and 2) which Coppermine file should I edit. I only want to change "sub_menu" to this drop-down menu.

adipisicing

The HTML select element is a form control and is usually used to change values in form input; not to redirect the user to a different page. If you want it to do that kind of thing, the easiest way would probably be to use JavaScript, like the script at http://javascript.internet.com/navigation/jump-menu.html for example. If you're just starting out with HTML, I'd suggest doing that and ignoring the rest of this message.

The other way to do it would be to have something on the server that would take form input and redirect to the page you wanted (the value attribute of the option tag, "in the quotation marks" is the value that is sent to the server).

Although, it occurs to me that most of the links (Last Uploads, Last Comments, Most Viewed, Top Rated, and My Favorites) on the sub_menu are actually supplying different inputs to thumbnails.php, you could have a form that submited to thumbnails.php and have a select element change the album parameter.
Unless otherwise noted, all code that I post on these forums to which I hold the copyright is released under the GPLv2.

adipisicing

Unless otherwise noted, all code that I post on these forums to which I hold the copyright is released under the GPLv2.

santoro

Thanks. Your answer was very helpful!
I just replaced "{SUB_MENU}" with this script. The links are not multilanguage anymore, but I think it works ok :)

Joachim Müller

Why don't you post your changed theme.php for the benefit of others with similar issues?

santoro

I didn't change theme.php. I changed theme.html. Fot others with same issue: just add this script anywhere you want it to have it (for me, it works fine):


<script language="JavaScript">

function openDir( form ) {

var newIndex = form.fieldname.selectedIndex;

if ( newIndex == 0 ) {

alert( "Please select a location!" );

} else {

cururl = form.fieldname.options[ newIndex ].value;

window.location.assign( cururl );

}

}

</script>



<table width=100% cellpadding=4 cellspacing=0 border=0>

<form name=form>

<tr>

<td nowrap>

<select name="fieldname" size="1"

onChange="openDir( this.form )">

<option>Jump To </option>

<option value=http://javascript.internet.com>JSS</option>

<option value=http://internet.com>internet.com</option>

</select>

</td>

</tr>

</form>

</table>

santoro

The links must be manually changed of course :)

Joachim Müller

Quote from: santoro on January 09, 2008, 09:13:24 PM
I didn't change theme.php. I changed theme.html.
Oh really? There is no such file in Coppermine.

adipisicing

Unless otherwise noted, all code that I post on these forums to which I hold the copyright is released under the GPLv2.