1
marcan
XOOPS_URL in a text area
  • 2004/2/28 20:10

  • marcan

  • Just can't stay away

  • Posts: 824

  • Since: 2003/10/8


Hi !

Is there a way to enter the XOOPS site root path automaticaly in a text area? I'm explaining myself.

I'm using WF-FAQ and in the answer text area, I put some images that are store in xoops_url/images/. Now, I can put the exact root of my site (something likehttp://www.mysite.com/images) but I'm planning to move my site to another domain name sooner or later. So, I would like to be able to put a variable that would look for the XOOPS root path itself.

I don't know if I'm explaining myslef correctly! Does anybody understand what I want? Does anybody have a solution?

Thanks for any help !

2
marcan
Re: XOOPS_URL in a text area
  • 2004/2/28 20:31

  • marcan

  • Just can't stay away

  • Posts: 824

  • Since: 2003/10/8


Forgot to do a search first... please forgive me

However, it seems that no good answers were ever found. See, these would like to achieve pretty much what I want :

Can I get {X_SITEURL} variable in download module ?

X_SITEURL in iMenu/Multimenu

Anyone can help ?

Thanks !!!

3
Dave_L
Re: XOOPS_URL in a text area
  • 2004/2/28 20:52

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


If it's in a Smarty template, you can use:

<{$xoops_url}>


xoops_url and some other template variables are assigned in the XoopsTpl constructor in class/template.php.

4
krayc
Re: XOOPS_URL in a text area
  • 2004/2/28 21:57

  • krayc

  • Not too shy to talk

  • Posts: 107

  • Since: 2004/2/17


So Dave, are you saying that in a regular Article, News, TinyContent, etc. the only way to reference an image is using the exact path name?

krayc

5
Dave_L
Re: XOOPS_URL in a text area
  • 2004/2/28 22:12

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


I just tested this in a custom block, and it worked:

global $xoopsTpl;
echo 
$xoopsTpl->get_template_vars('xoops_url');


For use within places that accept BB Code, there's also the BB Code tag siteurl, described athttp://wiki.xoops.org/wakka.php?wakka=XoopsBBCode

6
marcan
Re: XOOPS_URL in a text area
  • 2004/2/28 22:45

  • marcan

  • Just can't stay away

  • Posts: 824

  • Since: 2003/10/8


Many thanks :

Quote:
[ siteurl=modules/news/index.php ]Our News[ /siteurl ]

(I've included spaces after "[" so it doesn't get interpreted...)

This is exactly what I was looking for !

Thank you !

7
krayc
Re: XOOPS_URL in a text area
  • 2004/2/28 22:50

  • krayc

  • Not too shy to talk

  • Posts: 107

  • Since: 2004/2/17


I can see how that works for php scripts. thanks for the tip, i'm going to see what else in in that file.

and I worked with [siteurl] but that seems to only work with pages, I tried combining [img][/img] but that got me nowhere.

I guess what we need is a [siteimg] bbCode tag.

speaking of which where (code files) would I lookg to see how [siteurl] is implemented?

krayc


8
marcan
Re: XOOPS_URL in a text area
  • 2004/2/28 23:06

  • marcan

  • Just can't stay away

  • Posts: 824

  • Since: 2003/10/8


Resized ImageQuote:
and I worked with [siteurl] but that seems to only work with pages, I tried combining Resized Image but that got me nowhere.

I guess what we need is a [siteimg] bbCode tag.


mmm, good point... Now, this is what I need because I originally needed the siteurl to put images...

Could someone help us on that? Is it possible to add a bbcode somewehere? We would need a [siteimg] bbCode tag. How could we do that?

Anybody have a clue?

Thanks for any help !

9
Dave_L
Re: XOOPS_URL in a text area
  • 2004/2/28 23:36

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


The BB Codes are implemented in MyTextSanitizer::xoopsCodeDecode() in class/module.textsanitizer.php.

10
krayc
Re: XOOPS_URL in a text area
  • 2004/2/28 23:57

  • krayc

  • Not too shy to talk

  • Posts: 107

  • Since: 2004/2/17


Ok. found the code. Thanks Dave for sticking with us through this.

Is there a 'patterns to english' dictionary available?

I wonder as I look at this code, if what we want isn't already there? or close to it?

I mean if siteurl and img patterns and replacements are available, you wouldn't think it'd be a big stretch to have create siteimg pettern/replacement combo.

How do I/we deicpher those patterns? and their replacements?

krc

Login

Who's Online

187 user(s) are online (87 user(s) are browsing Support Forums)


Members: 0


Guests: 187


more...

Donat-O-Meter

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

Latest GitHub Commits