1
snow77
Theme dropdown menu selector for visitors
  • 2007/11/17 2:42

  • snow77

  • Just can't stay away

  • Posts: 864

  • Since: 2003/7/23


Does someone know which module makes a theme selector box with a dropdown menu like the one shown here: http://www.xoops-menu.fr/index.php in the block "Choix du menu" ?

2
fathersmurf
Re: Theme dropdown menu selector for visitors

this looks that standard block with system? with bigger pictures

3
arpofhoef
Re: Theme dropdown menu selector for visitors
  • 2007/11/17 10:29

  • arpofhoef

  • Just popping in

  • Posts: 29

  • Since: 2005/12/20


"XT-Temas" with a bigger preview maybe?

4
FaYsSaL
Re: Theme dropdown menu selector for visitors
  • 2007/11/17 10:32

  • FaYsSaL

  • Not too shy to talk

  • Posts: 115

  • Since: 2006/1/2 2


i think its just a play with the system block templates listbox->selectbox

5
shalommemphi
Re: Theme dropdown menu selector for visitors

I use XT TEMAS module. It will also let the user select and have it remember his favorite theme for the next time he/she logs back into the site.
Helping each other with Knowledge

6
skenow
Re: Theme dropdown menu selector for visitors
  • 2007/11/17 14:07

  • skenow

  • Home away from home

  • Posts: 993

  • Since: 2004/11/17


The system theme select block will display screenshots - edit the block then select show screenshot. You can also set the width of the screenshot. The screenshots must be named 'shot.gif' according to modules/system/blocks/system_blocks.php and in the base directory of the theme (themes/yourtheme/shot.gif)

7
snow77
Re: Theme dropdown menu selector for visitors
  • 2007/11/17 18:33

  • snow77

  • Just can't stay away

  • Posts: 864

  • Since: 2003/7/23


Thank you everyone. Like Skenow said worked perfect, I didn't have the shots thing activated so I was looking for the dropdown selection somewhere else but by activating the shots it turns automatically the selection to a dropdown.

8
kris_fr
Re: Theme dropdown menu selector for visitors
  • 2007/11/17 20:47

  • kris_fr

  • Theme Designer

  • Posts: 1009

  • Since: 2005/12/31


hi,

block system theme or duplicate block

exemple :
<?php
function mes_themes_show($options)
{
    global 
$xoopsConfig;
    
$theme_options '';

    
$mes_themes file(XOOPS_ROOT_PATH '/themes/kris_theme.txt');
    
$allowed_themes $xoopsConfig['theme_set_allowed'];

    foreach (
$mes_themes as $theme) {
        
$theme trim($theme);
        
$key array_search($theme$allowed_themes);
        if (
$key) {
        
$theme_options .= '<option value="'.$theme.'"';
        if (
$theme == $xoopsConfig['theme_set']) {
            
$theme_options .= ' selected="selected"';
        }
        
$theme_options .= '>'.$theme.'</option>';
        }
    }
    
$block = array();
    if (
$options[0] == 1) {
        
$block['theme_select'] = "<img vspace="2" id="xoops_theme_img" src="".XOOPS_THEME_URL."/".$xoopsConfig['theme_set']."/shot.gif" alt="screenshot" width="".intval($options[1])."" /><br /><select id="xoops_theme_select" name="xoops_theme_select" onchange="showImgSelected('xoops_theme_img''xoops_theme_select''themes''/shot.gif''".XOOPS_URL."');">".$theme_options."</select><input type="submit" value=""._GO."" />";
    } else {
        
$block['theme_select'] = '<select name="xoops_theme_select" onchange="submit();" size="3">'.$theme_options.'</select>';
    }

    
$block['theme_select'] .= '<br />('.sprintf(_MB_SYSTEM_NUMTHEME'<b>'.count($xoopsConfig['theme_set_allowed']).'</b>').')<br />';
    return 
$block;
}

function 
mes_themes_edit($options)
{

    
$chk "";
    
$form _MB_SYSTEM_THSHOW."&nbsp;";
    if ( 
$options[0] == ) {
        
$chk " checked='checked'";
    }
    
$form .= "<input type='radio' name='options[0]' value='1'".$chk." />&nbsp;"._YES;
    
$chk "";
    if ( 
$options[0] == ) {
        
$chk ' checked="checked"';
    }
    
$form .= '&nbsp;<input type="radio" name="options[0]" value="0"'.$chk.' />'._NO;
    
$form .= '<br />'._MB_SYSTEM_THWIDTH.'&nbsp;';
    
$form .= "<input type='text' name='options[1]' value='".$options[1]."' />";
    return 
$form;
}
?>


and the file .txt with the themes list

@++

9
snow77
Re: Theme dropdown menu selector for visitors
  • 2007/11/23 4:00

  • snow77

  • Just can't stay away

  • Posts: 864

  • Since: 2003/7/23


thank you Kris, I'll be trying this too.

Login

Who's Online

60 user(s) are online (37 user(s) are browsing Support Forums)


Members: 0


Guests: 60


more...

Donat-O-Meter

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

Latest GitHub Commits