1
GreenFlatDog
Admin theme exm shows blank images

Smart theme but can look broken. On arrival on the right side under 'installed modules' we have images for the modules. For webmasters all these images are active links leading to a module's admin area, which is great. For site admins who have admin privileges in some but not all modules there are images with active links where they are the admin, but they get a placeholder with a link that diverts to the site's home page when not the admin, which is not so great! The default theme doesn't show the labels/links for modules where the user is not the admin which seems more intuitive. In ..../modules/system/class/gui/exm/xotpl/system_indexcp.html If we change this bit:
<td width="48%" class="CPindexOptions">
        <
div class="CPbigTitle" style="background-image: url(<{xoImgUrl img/modules.png}>)"><{$lang_insmodules}></div><br />
        <
div class="cpicon">
            <{foreach 
item=mod from=$modules}>
                <
a href="<{$mod.link}>" title="<{$mod.title}>">
                    <
img src='<{$mod.icon}>' alt="<{$mod.title}>" />
                    <
span><{$mod.title}></span>
                </
a>
            <{/foreach}>
        </
div>
    </
td>
adding a test to see if module is there like this:
<td width="48%" class="CPindexOptions">
        <
div class="CPbigTitle" style="background-image: url(<{xoImgUrl img/modules.png}>)"><{$lang_insmodules}></div><br />
        <
div class="cpicon">
            <{foreach 
item=mod from=$modules}>
                <{if 
$mod.title}>
                <
a href="<{$mod.link}>" title="<{$mod.title}>">
                    <
img src='<{$mod.icon}>' alt="<{$mod.title}>" />
                    <
span><{$mod.title}></span>
                </
a>
                <{/if}>
            <{/foreach}>
        </
div>
    </
td>
Then the right side module icons appear only if the user is admin for them.

2
DonCurioso
Re: Admin theme exm shows blank images

Try to use other admin theme, default or legacy works fine

3
kris_fr
Re: Admin theme exm shows blank images
  • 2009/11/22 13:29

  • kris_fr

  • Theme Designer

  • Posts: 1009

  • Since: 2005/12/31



4
DonCurioso
Re: Admin theme exm shows blank images

Anyway, i prefer legacy... i donĀ“t know why

5
kris_fr
Re: Admin theme exm shows blank images
  • 2009/11/23 9:19

  • kris_fr

  • Theme Designer

  • Posts: 1009

  • Since: 2005/12/31


also in nameadmintheme.php, comments this lines :
$rtn['url'] = XOOPS_URL '/modules/'$mod->getVar('dirname''n') . '/'
$modOptions $mod->getAdminMenu();
$rtn['options'] = $modOptions;

@+

6
GreenFlatDog
Re: Admin theme exm shows blank images

Thanks Kri_fr for getting me to think more clearly. I should have looked for where the menu items were being collected up, which is in exm.php and not filtered stuff out in the template. However I could not find the lines you mentioned in exm.php but did see where both the module lists were assembled for the drop down menu and the bank of module icons on the right. So scrap the previous suggestion about changing ..../modules/system/class/gui/exm/xotpl/system_indexcp.html and change ..../modules/system/class/gui/exm/exm.php as follows: In the section
// add MODULES  Menu items
around line 148 (deals with drop down menu)
foreach ($mods as $mod) {
  
$rtn = array();
  
$sadmin $moduleperm_handler->checkRight('module_admin'$mod->getVar('mid'), $xoopsUser->getGroups());
  if (
$sadmin) {
    
$info $mod->getInfo();
    if (!empty(
$info['adminindex'])) {
      
$rtn['link'] = XOOPS_URL '/modules/'$mod->getVar('dirname''n') . '/' $info['adminindex'];
    } else {
      
$rtn['link'] = XOOPS_URL '/modules/system/admin.php?fct=preferences&op=showmod&mod=' $mod->getVar('mid');
    }
    
$rtn['title'] = $mod->name();
    
$rtn['absolute'] = 1;
    if (isset(
$info['icon']) && $info['icon'] != '' ) {
      
$rtn['icon'] = XOOPS_URL '/modules/' $mod->getVar('dirname''n') . '/' $info['icon'];
    }
  }
  
$menu[] = $rtn;
}
move the last assigment line into the << if ($sadmin) {} >> block such that the last 4 lines change from:
}
  }
  
$menu[] = $rtn;
}
to
}
    
$menu[] = $rtn;
  }
}
Then go further down near line 207 and find a similar << foreach ($mods as $mod) {} >> block where the last 4 lines should be changed from
}
  }
  
$tpl->append('modules'$rtn);
}
to
}
    
$tpl->append('modules'$rtn);
  }
}
This bit deals with the block of icons on the right of the page. That seems a cleaner way to do it.

Login

Who's Online

130 user(s) are online (90 user(s) are browsing Support Forums)


Members: 0


Guests: 130


more...

Donat-O-Meter

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

Latest GitHub Commits