1
robyduck
xoops module title variable
  • 2006/12/30 20:42

  • robyduck

  • Just popping in

  • Posts: 16

  • Since: 2005/2/3 2


I'd like to insert a variable on my site, which outputs only the title of he module that I'm visiting.
Example: When I read a post I'd like to have the output Forum, for a new article of wfsection guides ecc..
The titles are the same in the module admin page, so I haven't to change titles or define all of them.
I know that with xoops_pagetitle I'm very close to the solution, but this one outputs me also the title of the post (example for the Forum).
Hope to be understandable for you, thank's
Robyduck

2
irmtfan
Re: xoops module title variable
  • 2006/12/30 20:53

  • irmtfan

  • Module Developer

  • Posts: 3419

  • Since: 2003/12/7


use <{$xoops_dirname}>

3
robyduck
Re: xoops module title variable
  • 2006/12/30 21:43

  • robyduck

  • Just popping in

  • Posts: 16

  • Since: 2005/2/3 2


Thank you for your answer, but with dirname I receive the output of the modules name, like newbb for the forum or wfsection for the guides.
I'd like to have the title which I gave to the module, for example "Forum" for the newbb module. Is this possible?

4
wodnick
Re: xoops module title variable
  • 2006/12/30 23:11

  • wodnick

  • Just popping in

  • Posts: 32

  • Since: 2006/12/30


Hi robyduck!

Quote:

robyduck wrote:
I'd like to have the title which I gave to the module, for example "Forum" for the newbb module. Is this possible?


Maybe <{$module.name}> is an answer...

regards,
wodnick
========
Pozycjonowanie

5
iHackCode
Re: xoops module title variable

get module name.. then assign the module's name to the template variable. <{$xoops_pagetitle}> or.. some other variable..

Code..
$xoops_pagetitle $xoopsModule->getVar('name');
$xoopsTpl->assign('xoops_pagetitle'$xoops_pagetitle);


.. mainfile.php has to be included also. i think that should work.
CBB / LatestNews / Publisher / XM-Spotlight

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

6
robyduck
Re: xoops module title variable
  • 2006/12/31 13:44

  • robyduck

  • Just popping in

  • Posts: 16

  • Since: 2005/2/3 2


Ok, but where do i have to define the variable? In which file? Thank you for your help and happy newyear.

7
irmtfan
Re: xoops module title variable
  • 2006/12/31 14:40

  • irmtfan

  • Module Developer

  • Posts: 3419

  • Since: 2003/12/7


in class/theme.php in line 185 add after 'xoops_dirname' a new row like:
'xoops_module_name'=> @$xoopsModule $xoopsModule->getVar'name' ) : 'system',

then <{$xoops_module_name}> AND SO ON

8
iHackCode
Re: xoops module title variable

irmtfan's solution is a better one. since you will have to edit only one file, that will show up on all the modules.
CBB / LatestNews / Publisher / XM-Spotlight

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

9
robyduck
Re: xoops module title variable
  • 2006/12/31 20:08

  • robyduck

  • Just popping in

  • Posts: 16

  • Since: 2005/2/3 2


Thank's for your answers, I'll try to do as you wrote, but I've no file theme.php in the class directory. I'm using XOOPS 2.0.x.
Bye

10
iHackCode
Re: xoops module title variable

so i was looking through header.php on some versions of XOOPS and there is a variable that is already assigned that is probably what you are looking for. it is . <{$xoops_modulename}>

so try using that smarty variable.
CBB / LatestNews / Publisher / XM-Spotlight

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

Login

Who's Online

306 user(s) are online (202 user(s) are browsing Support Forums)


Members: 0


Guests: 306


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