1
klike222
Limited Selectable Themes
  • 2008/12/21 4:40

  • klike222

  • Just popping in

  • Posts: 10

  • Since: 2008/2/2 2


I Have 15 Themes loaded in my themes directory. I updated to v2.3.0 now the theme selector in the admin section will only show 5 themes in the selector box. The 5 themes showing are selectable.

I updated to v2.3.0a didn't fix the problem
I updated to v2.3.0b didn't fix the problem
You can click on the default theme drop down menu and all 15 themes appear are selectable.

How do I get all the themes to appear again and select them so they will appear in the theme block? Is this a bug?

2
ghia
Re: Limited Selectable Themes
  • 2008/12/21 11:04

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


What happens if you add a new (16th) theme?
Where all themes selectable in the user block before the upgrade?

3
klike222
Re: Limited Selectable Themes
  • 2008/12/21 17:36

  • klike222

  • Just popping in

  • Posts: 10

  • Since: 2008/2/2 2


Yes, all the themes were visible and selectable before. I have had at least 50 themes loaded before just like you see in any other XOOPS websites using the system theme block to switch themes. If I delete the 5th theme showing in the selectable default theme field from the theme folder the next one in line will appear in the selectable theme field(weird)I can select it and it shows up in the system theme block.

But It will still only shows 5 themes at a time in the selectable theme field.

The default drop down menu still shows all 15 themes in the theme folder.

All the themes I have loaded are good themes, no bugs, all run excellent when set as default theme.

Any Suggestions!

4
trabis
Re: Limited Selectable Themes
  • 2008/12/21 17:53

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


Go to system/admin/preferences/main.php and edit around line 117
case 'theme_multi':
                
$ele = ($config[$i]->getVar('conf_formtype') != 'theme_multi') ? new XoopsFormSelect($title$config[$i]->getVar('conf_name'), $config[$i]->getConfValueForOutput()) : new XoopsFormSelect($title$config[$i]->getVar('conf_name'), $config[$i]->getConfValueForOutput(), 5true);
                require_once 
XOOPS_ROOT_PATH."/class/xoopslists.php";
                
$dirlist XoopsLists::getThemesList();
echo 
count($dirlist).'';//place this line
                
if (!empty($dirlist)) {
                    
asort($dirlist);
                    
$ele->addOptionArray($dirlist);
                }
                
//$themeset_handler =& xoops_gethandler('themeset');
                //$themesetlist =& $themeset_handler->getList();
                //asort($themesetlist);
                //foreach ($themesetlist as $key => $name) {
                //  $ele->addOption($key, $name.' ('._MD_AM_THEMESET.')');
                //}
                // old theme value is used to determine whether to update cache or not. kind of dirty way
                
$form->addElement(new XoopsFormHidden('_old_theme'$config[$i]->getConfValueForOutput()));
                break;


Then access your preferences page and you will see that 2 values are outputed. Please tell me if the values match.

If they macth then try to change the value from 5 to 10 here:
$config[$i]->getVar('conf_name'), $config[$i]->getConfValueForOutput(), 5, true

5
klike222
Re: Limited Selectable Themes
  • 2008/12/21 18:37

  • klike222

  • Just popping in

  • Posts: 10

  • Since: 2008/2/2 2


Thanks very much You have solved my problem!

This line was missing from my code:

echo count($dirlist).'
';//place this line

Just FYI I have been using XOOPS for several years and I try to make it a priority to solve my own problems without bothering anyone. I generally know my way around XOOPS code hacking ect. I have v2.3.2b fresh install on my home server to try to identify this problem and this same piece of code was missing from that main.php to. I downloaded it maybe 3-4 days ago.

Thanks for your help it is greatly appreciated!

6
klike222
Re: Limited Selectable Themes
  • 2008/12/21 19:00

  • klike222

  • Just popping in

  • Posts: 10

  • Since: 2008/2/2 2


I believe this is a bug in main.php.
I checked v.2.3.0 Final
I downloaded v.2.3.2a on 12/03/2008 code line missing
I downloaded v2.3.2b on 12/13/2008 code line missing
----------------------------------------------------
echo count($dirlist).'
';//place this line

This line of code is missing from all 3 versions of main.php

7
trabis
Re: Limited Selectable Themes
  • 2008/12/21 19:09

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1




That line is not supposed to be there and it was not supposed to solve your problem. I asked you to place it there so I could know if the problem was in reading your themes dir or in xoopsform. Please remove the line and see if your problem get back again.

8
klike222
Re: Limited Selectable Themes
  • 2008/12/21 19:35

  • klike222

  • Just popping in

  • Posts: 10

  • Since: 2008/2/2 2


ok, I did not understand what you were asking of me.
I removed the piece of code you gave me and now I have the same problem again. It is present on my home server installation which is a windows box and on my dedicated server installation which is a linux box.

What now?

9
trabis
Re: Limited Selectable Themes
  • 2008/12/21 19:39

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


Just for curiosity, try adding just this line:

echo ' ';


10
klike222
Re: Limited Selectable Themes
  • 2008/12/21 21:08

  • klike222

  • Just popping in

  • Posts: 10

  • Since: 2008/2/2 2


This code line has no effect.

Login

Who's Online

334 user(s) are online (306 user(s) are browsing Support Forums)


Members: 0


Guests: 334


more...

Donat-O-Meter

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

Latest GitHub Commits