1
Ronaldus
What's the use of {X_SITEURL} ?
  • 2004/10/13 5:28

  • Ronaldus

  • Friend of XOOPS

  • Posts: 389

  • Since: 2004/5/8 1


Hello folks,

In the admin area, under system admin --> blocks, it says that {X_SITEURL} is a handy tag.
Why is this the case?

Thanks and greetings,

Ronaldus

2
Herko
Re:What's the use of {X_SITEURL} ?
  • 2004/10/13 6:58

  • Herko

  • XOOPS is my life!

  • Posts: 4238

  • Since: 2002/2/4 1


Easy: if your site is moved from a development environment to a production environment, the base url (like www.xoops.org) changes automagically with the value used in the mainfile.php, thus making the deployment of your website to a production environment a lot easier.

Herko

3
smdcom
Re:What's the use of {X_SITEURL} ?

{X_SITEURL} is use in smarty template it will show ur current url...

{X_SITEURL} =http://www.yourdomain.com/

4
smdcom
Re:What's the use of {X_SITEURL} ?

@Herko.. lol.. we post at the same time... hehe..

5
Ronaldus
Re:What's the use of {X_SITEURL} ?
  • 2004/10/13 11:06

  • Ronaldus

  • Friend of XOOPS

  • Posts: 389

  • Since: 2004/5/8 1


Thanks Herko and smdcom,

that's what I just thought.
So: that means that I have to type {X_SITEURL} in every place I want to have a link, and automatically XOOPS takes over the piece of code that is in the mainfile.php?

BUT: why does this not work in multimenu?
When I define a link in the menu as {X_SITEURL}/modules/wfsection/etc, my browser points tohttp://localhost/{X_SITEURL}/modules/wfsection/etc.

Is this a bug or do I make an mistake??

Thanks for repliying and greetings,

Ronaldus

6
Mithrandir
Re:What's the use of {X_SITEURL} ?

Guys - don't confuse matters, please

{X_SITEURL} is a tag which is string-replaced with the XOOPS_URL and possibly more - depending on the situation - most prominently, it is used in the custom blocks and mail templates.

X_SITEURL is NOT a smarty variable and cannot be used for such. X_SITEURL can only be used in modules and areas of the core, where this is programmed - which in the core is the mailer and blocks. So for a module to understand {X_SITEURL}, the module itself will have to have code to deal with it.

Ronaldus, are you sure you need to put the site URL in the link? Isn't MultiMenu meant to deal with site urls and work without the complete url?

7
Ronaldus
Re:What's the use of {X_SITEURL} ?
  • 2004/10/13 12:09

  • Ronaldus

  • Friend of XOOPS

  • Posts: 389

  • Since: 2004/5/8 1


Thanks for your reply Mithrandir.

Things becaome a bit more clear now. (I was always a slow starter, but when I understand it, I'll never forget...)

So: the {X_SITEURL} is not in every place useable.

Does that mean that I have to define links relatively?
When I want to make a link from one page (sayhttp://www.mysite.com/modules/wfsection/article1) to another page (sayhttp://www.mysite.com/modules/news/item6), how do I define that in a way that it works both locally as remote?

Thanks for your efforts and greetings,

Ronaldus

8
Draven
Re:What's the use of {X_SITEURL} ?
  • 2004/10/13 13:21

  • Draven

  • Module Developer

  • Posts: 337

  • Since: 2003/5/28


Sort of, if the module does not have a string_replace item set-up for replacing the item with the URL, then I'd suggesting creating your links as "/modules/wfsection.." and let the server handle the URL.

As mith said, the {X_SITEURL} is only set-up (as far as I know) for use with in the SYSTEM module inplaces like custom blocks and e-mail templates. But this does not mean it's used within templates themesleves since you would use the smarty variable <{$xoops_url}> in there.

9
Ronaldus
Re:What's the use of {X_SITEURL} ?
  • 2004/10/13 20:21

  • Ronaldus

  • Friend of XOOPS

  • Posts: 389

  • Since: 2004/5/8 1


Right.

Now it's clear.
I've played a little with some testlinks in a few modules, and indeed, /modules/news/etc works!
For a link inside a module (from wfsection/article1 in wfsection/article6296) the part after wfsection/ is enough.

I think I'll manage aftre these lessons from you and Mithrandir.

Thanks and greetings,

Ronaldus

10
Marco
Re:What's the use of {X_SITEURL} ?
  • 2004/10/13 20:37

  • Marco

  • Home away from home

  • Posts: 1256

  • Since: 2004/3/15


hello,

where is set the value of X_SITEURL (i.e where does it come from) ?
Are they any others variables like this in XOOPS ?
Where can I find the list of them ????

Login

Who's Online

164 user(s) are online (70 user(s) are browsing Support Forums)


Members: 0


Guests: 164


more...

Donat-O-Meter

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

Latest GitHub Commits