1
pod
2.2 & Smarty theme/template tags
  • 2005/7/27 13:12

  • pod

  • Quite a regular

  • Posts: 301

  • Since: 2003/4/19


I cant get any of these to work as they should in 2.2 - have they been replaced?

<{$xoops_url}>

<{
$xoops_imageurl}>

<{
$xoops_theme}>

<{
$xoops_themecss}>



Did I miss the "New Smarty Tags" bus?
whttp://www.myxoops.com - MyXoops Is Your XOOPS!

2
Mithrandir
Re: 2.2 & Smarty theme/template tags

Where do you try to use them?

<{$xoops_url}> should work as usual, but the rest are only available in the theme.html, not in blocks.
"When you can flatten entire cities at a whim, a tendency towards quiet reflection and seeing-things-from-the-other-fellow's-point-of-view is seldom necessary."

Cusix Software

3
pod
Re: 2.2 & Smarty theme/template tags
  • 2005/7/27 13:39

  • pod

  • Quite a regular

  • Posts: 301

  • Since: 2003/4/19


Just trying to use it in a theme...

You can see how on a fresh install, such as the one here, even the default theme is rendering:
<link rel="stylesheet" type="text/css" media="screen" href="/directoryname/xoops.css" />
<
link rel="stylesheet" type="text/css" media="screen" href="/directoryname/themes/default/css/styleNN.css" />


when the theme.html file displays


<link rel="stylesheet" type="text/css" media="screen" href="<{$xoops_url}>/xoops.css" />
<
link rel="stylesheet" type="text/css" media="screen" href="<{$xoops_themecss}>" />



...seems it is inserting relative URLs, instead of absolute, or something.

Print those 4 smarty variables themselves in a theme & see what they return, vs what they used to return - not the same at all, if they return anything. It's vexing me.
whttp://www.myxoops.com - MyXoops Is Your XOOPS!

4
Mithrandir
Re: 2.2 & Smarty theme/template tags

If you have input a relative URL in the mainfile/during installation, <{$xoops_url}> will be a relative URL.

The reason for this is that you will be able to have example.com or http://www.example.com or 127.0.0.1 all showing the same website where with 2.0.x you'd have to modify the hosts file to access the XOOPS site from both local and global networks.
"When you can flatten entire cities at a whim, a tendency towards quiet reflection and seeing-things-from-the-other-fellow's-point-of-view is seldom necessary."

Cusix Software

5
pod
Re: 2.2 & Smarty theme/template tags
  • 2005/7/27 14:29

  • pod

  • Quite a regular

  • Posts: 301

  • Since: 2003/4/19


I see, thank you for clarifying.

Any chance future releases might include a xoops_absurl variable for the absolute URL?

Are there any [other] changes to smarty tags with 2.2? A 'current directory' or 'current moduledir' tag would be really cool.

Thanks for your time Mithrandir
whttp://www.myxoops.com - MyXoops Is Your XOOPS!

6
Mithrandir
Re: 2.2 & Smarty theme/template tags

Yes. An absolute URL smarty variable is quite likely to appear.

Quote:
A 'current directory' or 'current moduledir' tag would be really cool.

<{$xoops_dirname}> is available. Can't remember if it was put in 2.0.10, but it is for sure in XOOPS 2.2
"When you can flatten entire cities at a whim, a tendency towards quiet reflection and seeing-things-from-the-other-fellow's-point-of-view is seldom necessary."

Cusix Software

Login

Who's Online

456 user(s) are online (340 user(s) are browsing Support Forums)


Members: 0


Guests: 456


more...

Donat-O-Meter

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

Latest GitHub Commits