xoops forums

xiaodao

Just popping in
Posted on: 2007/11/14 11:30
xiaodao
xiaodao (Show more)
Just popping in
Posts: 9
Since: 2007/11/14
#1

Smarty does not work?

Hi,

I can display my smarty constant in my theme file. Anybody knows why?

I've download neoblue theme. After installing it, I found the navigator section at top of the html theme can not be displayed properly, everything else is fine.

<li><a href="<{$xoops_url}>/modules/mylinks"><{$smarty.const._MA_MENU_LINKS}></a></li>
<
li><a href="<{$xoops_url}>/modules/works"><{$smarty.const._MA_MENU_PORTFOLIO}></a></li>
<
li><a href="<{$xoops_url}>/modules/contact"><{$smarty.const._MA_MENU_CONTACT}></a></li>


It displays like this:
_MA_MENU_LINKS, _MA_MENU_PORTFOLIO, _MA_MENU_CONTACT instead the correct words.



Anybody help? Thanks a lot.

Dave_L

XOOPS is my life!
Posted on: 2007/11/14 12:22
Dave_L
Dave_L (Show more)
XOOPS is my life!
Posts: 2277
Since: 2003/11/7
#2

Re: Smarty does not work?

The PHP file that defines those constants must be "included".

That's normally done within a .php file, but can also be done within a template using the Smarty function "include_php".

wizanda

Home away from home
Posted on: 2007/11/14 13:48
wizanda
wizanda (Show more)
Home away from home
Posts: 1583
Since: 2004/3/21
#3

Re: Smarty does not work?

Not sure , yet couldn't the main language files be used also, as the system runs through these and then it just needs defining there....

skenow

Home away from home
Posted on: 2007/11/14 14:15
skenow
skenow (Show more)
Home away from home
Posts: 993
Since: 2004/11/17
#4

Re: Smarty does not work?

Are those modules installed?

xiaodao

Just popping in
Posted on: 2007/11/16 0:54
xiaodao
xiaodao (Show more)
Just popping in
Posts: 9
Since: 2007/11/14
#5

Re: Smarty does not work?

Yes, the language files are in the theme package.

xiaodao

Just popping in
Posted on: 2007/11/16 0:57
xiaodao
xiaodao (Show more)
Just popping in
Posts: 9
Since: 2007/11/14
#6

Re: Smarty does not work?

Oh, but I do not know which file I should include, it's related to different language, I think there's must be a variable in XOOPS, such as $XOOPS_LANG, which I could use in the path of the php file which define the words mapping.

Can you help to make sure? Thanks.

JasonX

Just popping in
Posted on: 2008/6/8 19:10
JasonX
JasonX (Show more)
Just popping in
Posts: 6
Since: 2007/3/31
#7

Re: Smarty does not work?

Please tell what file need's to be included or what i need to write in main.php file of language folder?