I just put up on my local server the new version. My first test was the implementation of the menu module to see how it was displayed. Is there something to add to the theme for displaying menus created ?
mariane wrote:
Quote:What do you mean?
You can do this now with the "blocks anywhere" hack.
(May need to update it for 2.5.5 if you are using the newest stable xoops)
You can go further with this with the block permissions to show a block or not on a page.
Block anywhere allows you to place a block anywhere in your theme, but what you can do if the module dosnt have a block? for example if you wish to show a quick contact us form in your footer, what is the best solution to do it with xoops? the module contact dosnt have a block.
redheadedrod wrote:
What do you mean?
You can do this now with the "blocks anywhere" hack.
(May need to update it for 2.5.5 if you are using the newest stable xoops)
You can go further with this with the block permissions to show a block or not on a page.
irmtfan wrote:
dont be unhappy my friend.
fortunately, today i had time for you and it just take one hour to show you how you can remove at least this one hardcode.
1- in news/language/YOUR_LANG/main.php change the following:// START hacked by irmtfan
define('_NW_ONECOMMENT',"comment");
// END hacked by irmtfan
define('_NW_BYTESMORE',"%s bytes more");
// START hacked by irmtfan
define('_NW_NUMCOMMENTS',"comments");
// END hacked by irmtfan
2- in news/class/class.newsstory.php change the following:$morelink = '';
if ( $fullcount > 1 ) {
$morelink .= '<a href="'.XOOPS_URL.'/modules/news/article.php?storyid='.$this->storyid().'';
$morelink .= '">'._NW_READMORE.'</a>';
$morelink .= ' | '.sprintf(_NW_BYTESMORE,$totalcount);
if (XOOPS_COMMENT_APPROVENONE != $xoopsModuleConfig['com_rule']) {
$morelink .= ' | ';
}
}
if (XOOPS_COMMENT_APPROVENONE != $xoopsModuleConfig['com_rule']) {
$ccount = $this->comments();
$morelink .= '<a href="'.XOOPS_URL.'/modules/news/article.php?storyid='.$this->storyid().'';
$morelink2 = '<a href="'.XOOPS_URL.'/modules/news/article.php?storyid='.$this->storyid().'';
if ( $ccount == 0 ) {
$morelink .= '">'._NW_COMMENTS.'</a>';
} else {
if ( $fullcount < 1 ) {
// START hacked by irmtfan
//if ( $ccount == 1 ) {
// $morelink .= '">'._NW_READMORE.'</a> | '.$morelink2.'">'._NW_ONECOMMENT.'</a>';
//} else {
$morelink .= '">'._NW_READMORE.'</a> | '.$morelink2.'">';
// $morelink .= sprintf(_NW_NUMCOMMENTS, $ccount);
$morelink .= '</a>';
//}
} else {
//if ( $ccount == 1 ) {
// $morelink .= '">'._NW_ONECOMMENT.'</a>';
//} else {
$morelink .= '">';
// $morelink .= sprintf(_NW_NUMCOMMENTS, $ccount);
$morelink .= '</a>';
//}
// END hacked by irmtfan
}
}
}
// START hacked by irmtfan
$story['numcomments'] = $ccount;
// END hacked by irmtfan
$story['morelink'] = $morelink;
3- then in news/templates/news_item.html change the following:<!-- START hacked by irmtfan to remove num comments hard-code" -->
<span class="itemPermaLink"><{$story.morelink}> <{if $story.numcomments gt 0}> <{$story.numcomments}> <{if $story.numcomments gt 1}> <{$smarty.const._NW_NUMCOMMENTS}> <{else}> <{$smarty.const._NW_ONECOMMENT}> <{/if}> <{/if}></span>
<!-- END hacked by irmtfan to remove num comments hard-code" -->
you can see the right way of doing that. One smarty variable should only used for one php variable.
Edit:
by the way, english language is weak in this point because it needs to add a "s" to make a countable word plural (1 comment and 2 comments) . in persian we dont have this obstacle! (comment=nazar and comments=nazar)
IMO the best way for localize it for languages like english is adding a "s" suffix that can be used in such a situation. eg:
for english:define("_COUNT_SUFFIX","s");
for persian:define("_COUNT_SUFFIX","");