1
nmshah
dropdown theme select option in the nav bar
  • 2008/11/27 18:40

  • nmshah

  • Just can't stay away

  • Posts: 556

  • Since: 2007/7/2 8


In my theme i do not wish to have any left or right blocks. Only the center blocks and also give my visitors the option to change the theme. If i use the change theme block it looks out of place and disproportionate if displayed in the any of the center blocks.

So i wish to display the theme change option as a dropdown visible at the right hand corner in the horizontal navigation bar of the theme. Is there a way to do this.

2
nmshah
Re: dropdown theme select option in the nav bar
  • 2008/11/27 21:14

  • nmshah

  • Just can't stay away

  • Posts: 556

  • Since: 2007/7/2 8


I have got this to work using the following code

<div style="display:inline; float: right;">Select Theme<br /><form name="{5C088896-C4CC-4430-A6D8-9DC9D2BE379D}" action="index.php" method="post">
<
select name="xoops_theme_select" onchange="submit();" size="1"><option value="blue" selected="selected">blueoption><option value="default">defaultoption><option value="zetagenesis">zetagenesisoption>select><br>(<strong>3strongthemes)<br>
form>
div>


Now in the above code default, zetagenesis and blue are the three themes that are present. But i need to add these names manually. Is there a way that all the themes that are allowed to be selected in the admin general settings be displayed automatically instead of adding each theme manually

3
frankblack
Re: dropdown theme select option in the nav bar
  • 2008/11/27 22:18

  • frankblack

  • Just can't stay away

  • Posts: 830

  • Since: 2005/6/13


No warranty for this!

<div style="display:inline; float: right;">Select Theme<br /><form name="{5C088896-C4CC-4430-A6D8-9DC9D2BE379D}" action="index.php" method="post">
<
select name="xoops_theme_select" onchange="submit();" size="1">
<{
php}>
    global 
$xoopsConfig;
    foreach (
$xoopsConfig['theme_set_allowed'] as $theme) {
        echo 
'.$theme.'"';
        if (
$theme == $xoopsConfig['theme_set']) {
            echo 
' selected="selected"';
        }
        echo 
'>'.$theme.'';
    }
<{/
php}>
select>
form>
div>

4
nmshah
Re: dropdown theme select option in the nav bar
  • 2008/12/1 14:24

  • nmshah

  • Just can't stay away

  • Posts: 556

  • Since: 2007/7/2 8


Thanks a lot, that did the trick

Login

Who's Online

403 user(s) are online (44 user(s) are browsing Support Forums)


Members: 0


Guests: 403


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Oct 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits