Subject:*
<
Name/Email:*
<
Message Icon:*
<
Select*
<
Message:*
<



Click the Preview to see the content in action.
Options:*
<
Confirmation Code*
<
6 + 8 = ?  
Input the result from the expression
Maximum attempts you can try: 10
*
<
     

Re: Theme dropdown menu selector for visitors
by snow77 on 2007/11/23 4:00:28

thank you Kris, I'll be trying this too.
Re: Theme dropdown menu selector for visitors
by kris_fr on 2007/11/17 20:47:16

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] == 1 ) { $chk = " checked='checked'"; } $form .= "<input type='radio' name='options[0]' value='1'".$chk." />&nbsp;"._YES; $chk = ""; if ( $options[0] == 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

@++
Re: Theme dropdown menu selector for visitors
by snow77 on 2007/11/17 18:33:46

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.
Re: Theme dropdown menu selector for visitors
by skenow on 2007/11/17 14:07:52

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)
Re: Theme dropdown menu selector for visitors
by shalommemphi on 2007/11/17 13:44:58

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.

Who's Online

833 user(s) are online (772 user(s) are browsing Support Forums)


Members: 0


Guests: 833


more...

Donat-O-Meter

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

Latest GitHub Commits