Quote:
Many localization matters are already available inn core but developers/desginers never used them.
for eample please promote "image localization" for xoops theme designers.
we should encourage xoops theme designers to use local lang smarty code for images. (all images would be better but for images contain some characters would be nessesary)
currently everything is localized in themes and multi-language is implemented in official english themes released in xoops 2.5.5 except images.
eg: in xoops255/htdocs/themes/default/theme.html
should be changed to:
1st way:
2nd way:
then the image should be renamed like below:
1st way:
xoops-logo.en.png
2nd way:
img/en/xoops-logo.png
please choose the preferred/best way for doing that. Then it should be promoted.
following the above for theme images, i recently see the developer of newbb introduced a very nice and professional fabulous work for
fully customizing and localizing a module images.
IMO current core developers should follow this way and define a new image class in the core of xoops 2.6 and introduced it to all module developers. Then we can have the first CMS in the globe with the deepest image customizing/localizing.
This is a full customizing because It works without touching any core/module images. Therefore End user just need to copy all images in the "htdocs/themes" folder. So after updating a module he/she dont worry about losing its own created images by mistakenly overwriting some module images.
End user can follow the below instruction for customizing and localizing:
* Priority for path per types:
* NEWBB_ROOT - IF EXISTS XOOPS_THEME/modules/newbb/images/, TAKE IT;
* ELSEIF EXISTS XOOPS_THEME_DEFAULT/modules/newbb/images/, TAKE IT;
* ELSE TAKE XOOPS_ROOT/modules/newbb/templates/images/.
* types:
* button/misc - language specified;
* //indicator - language specified;
* icon - universal;
* mime - universal;
*/
So for example if i want to implement a new image set for all of my themes in the website i can copy them to the below folders:
themes/default/modules/newbb/images/icon
themes/default/modules/newbb/images/language/english
themes/default/modules/newbb/images/language/persian
You can see that I dont want to customize "rpg" and "mime" icons so the newbb will read the original ones from newbb original folders:
XOOPS_ROOT/modules/newbb/templates/images/rpg
XOOPS_ROOT/modules/newbb/templates/images/mime
If i want to create a custom imageset for a special theme i can easily add to that theme folder:
themes/MY_THEME/modules/newbb/images/icon
themes/MY_THEME/modules/newbb/images/language/english
themes/MY_THEME/modules/newbb/images/language/persian
coders can read below to find the class that make it available:
The class is defined in newbb/class/icon.php file
eg: a function "getPath":
$path = is_dir($theme_path."/{$rel_images}/{$type}/")
? $theme_path."/{$rel_images}/{$type}"
: ( is_dir(XOOPS_THEME_PATH."/default/{$rel_images}/{$type}/")
? XOOPS_THEME_PATH."/default/{$rel_images}/{$type}"
: ( empty($default) || is_dir(XOOPS_ROOT_PATH."/modules/{$dirname}/templates/images/{$type}/")
? XOOPS_ROOT_PATH."/modules/{$dirname}/templates/images/{$type}"
: XOOPS_ROOT_PATH."/modules/{$dirname}/templates/images/{$default}"
)
);
Then function called "newbb_displayImage" in file newbb/include/functions.render.php
function newbb_displayImage($image, $alt = "", $display = true, $extra = "class='forum_icon'")
{
$icon_handler = newbb_getIconHandler();
if (empty($display)) {
return $icon_handler->assignImage($image, $alt, $extra);
} else {
return $icon_handler->getImage($image, $alt, $extra);
}
}
so module developers can use this function very easy like this:
$xoopsTpl->assign('img_newposts', newbb_displayImage('topic_new',_MD_NEWPOSTS));
$xoopsTpl->assign('img_hotnewposts', newbb_displayImage('topic_hot_new',_MD_MORETHAN));
$xoopsTpl->assign('img_folder', newbb_displayImage('topic',_MD_NONEWPOSTS));
$xoopsTpl->assign('img_hotfolder', newbb_displayImage('topic_hot',_MD_MORETHAN2));
$xoopsTpl->assign('img_locked', newbb_displayImage('topic_locked',_MD_TOPICLOCKED));
$xoopsTpl->assign('img_sticky', newbb_displayImage('topic_sticky',_MD_TOPICSTICKY));
$xoopsTpl->assign('img_digest', newbb_displayImage('topic_digest',_MD_TOPICDIGEST));
$xoopsTpl->assign('img_poll', newbb_displayImage('poll',_MD_TOPICHASPOLL));
Please add this class in the core. Then XOOPS will be the first ever CMS that have the fully customized images feature.
Also please if you can take a look at this feature:
Image creator classI think it is very nice to create pictures for different languages automatically.