#14 I want you to sort theme select

closed-duplicate
nobody
None
5
2011-02-27
2010-11-07
Anonymous
No

The display becomes asunder because of the difference of the directory system.
Example idea

modules/legacy/class/theme.php
[code]
function _makeCache()
function _makeCache()
{
if (count($this->_mResults) == 0) {
$t_themeArr = array();
$this->mGetInstalledThemes->call(new XCube_Ref($t_themeArr));

foreach ($t_themeArr as $theme) {
$t_themeArr_temp[$theme->mDirname]['name']= $theme->mName;
$t_themeArr_temp[$theme->mDirname]['dirname']= $theme->mDirname;
$t_themeArr_temp[$theme->mDirname]['screenshot']= $theme->mScreenShot;
$t_themeArr_temp[$theme->mDirname]['description']= $theme->mDescription;
$t_themeArr_temp[$theme->mDirname]['format']= $theme->mFormat;
$t_themeArr_temp[$theme->mDirname]['render_system']= $theme->mRenderSystemName;
$t_themeArr_temp[$theme->mDirname]['version']= $theme->mVersion;
$t_themeArr_temp[$theme->mDirname]['author']= $theme->mAuthor;
$t_themeArr_temp[$theme->mDirname]['url']= $theme->mUrl;
$t_themeArr_temp[$theme->mDirname]['licence']= $theme->mLicense;
$t_themeArr_temp[$theme->mDirname]['license']= $theme->mLicence;
}
foreach($t_themeArr_temp as $row){
$dirname_arr[$row['dirname']] = $row['dirname'];
}
array_multisort($dirname_arr,SORT_ASC,$t_themeArr_temp);

foreach ($t_themeArr_temp as $key => $theme) {
$obj =& $this->create();
$obj->set('name', $theme['name']);
$obj->set('dirname', $theme['dirname']);
$obj->set('screenshot', $theme['screenshot']);
$obj->set('description', $theme['description']);
$obj->set('format', $theme['format']);
$obj->set('render_system', $theme['render_system']);
$obj->set('version', $theme['version']);
$obj->set('author', $theme['author']);
$obj->set('url', $theme['url']);
$obj->set('licence', $theme['licence']);
$obj->set('license', $theme['license']);
$this->_mResults[] =& $obj;
unset($obj);
}
}
}
[/code]

and Please change block.

Discussion

  • HIKAWA Kilica

    HIKAWA Kilica - 2011-02-27
    • status: open --> closed-duplicate
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks