1
wizanda
What is the variable for xoops site name or short CODE?
  • 2006/5/12 13:48

  • wizanda

  • Home away from home

  • Posts: 1585

  • Since: 2004/3/21


Making a mod and would like to use XOOPS standard site name is there a php variable or XOOP_CODE, XOOPTITLE?
$xoopstitle=?
Or something please???

2
wtravel
Re: What is the variable for xoops site name or short CODE?

The variable you are looking for is: $xoopsConfig['sitename']

It is stored in de config table .

3
wizanda
Re: What is the variable for xoops site name or short CODE?
  • 2006/5/12 13:55

  • wizanda

  • Home away from home

  • Posts: 1585

  • Since: 2004/3/21


If I was looking for XOOPS_URL I would have asked ...... I need XOOPS title, i.e. the Title people name their sites, is there a way to input it in php?

4
wtravel
Re: What is the variable for xoops site name or short CODE?

You were faster then my edit

It is recommended that you use it like this:

$xoopstitle = htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES)

5
wizanda
Re: What is the variable for xoops site name or short CODE?
  • 2006/5/12 14:01

  • wizanda

  • Home away from home

  • Posts: 1585

  • Since: 2004/3/21


Thznks!!!
I will try short and the way you are surposed to, why the extra code, incase people use special charcters and to direct it?

6
wtravel
Re: What is the variable for xoops site name or short CODE?

Have a look at the file header.php in the root of your XOOPS folder. You can see how it is assigned to the smarty template. The smarty variable is overwritable in your module.

7
wtravel
Re: What is the variable for xoops site name or short CODE?

Quote:

wizanda wrote:
...why the extra code, incase people use special charcters and to direct it?


I think that was the purpose of it, to keep the title readable in some cases.

8
wizanda
Re: What is the variable for xoops site name or short CODE?
  • 2006/5/12 14:20

  • wizanda

  • Home away from home

  • Posts: 1585

  • Since: 2004/3/21


Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING'

I have tried loads of things to get it working, including removing the '\'\' like that yet it keep returning this, does that mean I am missing somethings or the code doesn't want to go there??
The mainfile is load as I have the rest of config from there anything else needed?

9
iHackCode
Re: What is the variable for xoops site name or short CODE?

is this in the code, i think that is what is needed.
global $xoopsConfig;



$xoopsConfig Array. DevWiki

and dont forget those semicolons they give me headaches sometimes
CBB / LatestNews / Publisher / XM-Spotlight

(ノ◕ヮ◕)ノ*:・゚✧

Login

Who's Online

230 user(s) are online (144 user(s) are browsing Support Forums)


Members: 0


Guests: 230


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