Advanced search  

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]

Pages: [1]   Go Down

Author Topic: how to gallery menu change to floating menu  (Read 7656 times)

0 Members and 1 Guest are viewing this topic.

santoro

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 58
how to gallery menu change to floating menu
« on: January 05, 2008, 07:44:57 pm »

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.
« Last Edit: January 08, 2008, 08:14:08 am by Joachim Müller »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: how to gallery menu change to floating menu
« Reply #1 on: January 06, 2008, 07:20:36 pm »

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

santoro

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 58
Re: how to gallery menu change to floating menu
« Reply #2 on: January 06, 2008, 07:55:31 pm »

Thanks. I hope somebody will help me :)
Logged

santoro

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 58
Re: how to gallery menu change to floating menu
« Reply #3 on: January 06, 2008, 10:02:49 pm »

I find this html form so far:

Code: [Select]
<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.
Logged

adipisicing

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 24
Re: how to gallery menu change to floating menu
« Reply #4 on: January 06, 2008, 11:52:05 pm »

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.
Logged
Unless otherwise noted, all code that I post on these forums to which I hold the copyright is released under the GPLv2.

adipisicing

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 24
Re: how to gallery menu change to floating menu
« Reply #5 on: January 06, 2008, 11:55:44 pm »

And see http://forum.coppermine-gallery.net/index.php?topic=26897.0 for how to edit the HTML that is generated for {SUB_MENU}.
Logged
Unless otherwise noted, all code that I post on these forums to which I hold the copyright is released under the GPLv2.

santoro

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 58
Re: how to gallery menu change to floating menu
« Reply #6 on: January 07, 2008, 04:19:48 pm »

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 :)
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: how to gallery menu change to floating menu
« Reply #7 on: January 08, 2008, 08:13:56 am »

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

santoro

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 58
Re: how to gallery menu change to floating menu
« Reply #8 on: January 09, 2008, 09:13:24 pm »

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):

Code: [Select]
<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>
Logged

santoro

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 58
Re: how to gallery menu change to floating menu
« Reply #9 on: January 09, 2008, 09:15:03 pm »

The links must be manually changed of course :)
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: how to gallery menu change to floating menu
« Reply #10 on: January 10, 2008, 08:11:56 am »

I didn't change theme.php. I changed theme.html.
Oh really? There is no such file in Coppermine.
Logged

adipisicing

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 24
Re: how to gallery menu change to floating menu
« Reply #11 on: January 10, 2008, 07:18:57 pm »

I'm assuming santoro meant template.html .
Logged
Unless otherwise noted, all code that I post on these forums to which I hold the copyright is released under the GPLv2.
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 15 queries.