1
janmetpet
Wordbook and changing title
  • 2005/4/8 14:34

  • janmetpet

  • Just popping in

  • Posts: 78

  • Since: 2004/5/17


Hi everybody,

Couldn't find it with the search. Ik would like to hack the wordbook module, so it displays the category and the term as page title. I haven't got a clue how to do it.

I use XOOPS 2.0.9. I heard that wordbook doesn't with it, but I have no problem whatsoever. It isn't to big though, 11 categories and 193 terms.

I would love to see the title change from:

Domain - Wordbook - browser into:
Domain - Wordbook - Category - Term or:
Domain - Wordbook - Term

Can anyone help me out here. It really helps in the SE ranking, so I noticed with the newsmodule.

Thanks in advance,


Jan

2
janmetpet
Re: Wordbook and changing title
  • 2005/4/17 23:08

  • janmetpet

  • Just popping in

  • Posts: 78

  • Since: 2004/5/17


Is there really no one with a suggestion?

Thanks in advance, Jan

3
yokonozco
Re: Wordbook and changing title
  • 2005/4/18 0:19

  • yokonozco

  • Just popping in

  • Posts: 25

  • Since: 2005/3/27


Hey!

I´m in the same way...
Please, some coder help us!

Thanks and thanks to Hsalazar for this great module.

Yoko

4
janmetpet
Re: Wordbook and changing title
  • 2005/5/14 0:58

  • janmetpet

  • Just popping in

  • Posts: 78

  • Since: 2004/5/17


I just try it again. Really, is there nobody who tried to change the browser title in the module Wordbook? Maybe I'm lucky this time. Thanks in advance.

Grtz, J.

5
hsalazar
Re: Wordbook and changing title
  • 2005/5/14 3:12

  • hsalazar

  • Just popping in

  • Posts: 78

  • Since: 2003/2/6 1


janmetpet, yokonozco:

This should not be that difficult. In my other module, Soapbox, there's a provision to do that. I¿ll take a look at it and post here the solution.

I should take the opportunity to add that mondarse has joined me as developer of the module, since I have done nothing but watch the lint in my navel for far too long, so you can expect movement here. Thanks to all!

Cheers.

6
janmetpet
Re: Wordbook and changing title
  • 2005/5/14 9:38

  • janmetpet

  • Just popping in

  • Posts: 78

  • Since: 2004/5/17


Thanks, hsalazar. Good to see you're back. I believe the module is very popular and we would welcome any new developement and developers. I'm not much of a coder, but if I can help out in any way, I will. Thanks in advance. Jan

7
hsalazar
Re: Wordbook and changing title
  • 2005/5/16 5:22

  • hsalazar

  • Just popping in

  • Posts: 78

  • Since: 2003/2/6 1


janmetpet:

Here's a quick and dirty solution to your request to include category/term in the browser title.

XOOPS' Smarty implementation includes a specific variable to put there some of the content of the browser title. This variable is called xoops_pagetitle. All you need to do is to retrieve whatever variables and to make the appropriate assignment in the relevant page.

Since this sounds too academic, this is what it means:

1. Open file entry.php.

2. In some of the last lines, before ending the file, add the following (I'll put it in several lines, but of course you write it in just one):
$xoopsTpl->assign('xoops_pagetitle',
$myts->htmlSpecialChars($xoopsModule->name()).' - '.
$thisterm['catname'].' - '.
$thisterm['term']);

Assuming you have a site called Abracadabra, assuming you renamed your Wordbook module to WitchWords, assuming your first category is called Spells, assuming your term is called Eternal love, and assuming you're using Mozilla Firefox as your browser, then you'd see in the browser title something like:
Abracadabra WitchWords Spells Eternal love Mozilla Firefox

Being things as they are, you have no way to change the first and the last word. The other three are optional, and they are, of course, the ones included in the line you just added.

That's about it. Hope it works ok.

Cheers.

8
janmetpet
Re: Wordbook and changing title
  • 2005/5/16 18:37

  • janmetpet

  • Just popping in

  • Posts: 78

  • Since: 2004/5/17


Hsalazar,

Totally works as advertised. It's exactly what I wished for. Wordbook rocks more than ever! Thank you for the quick (and dirty) response and for sharing your knowledge!

Grtz J.

9
yokonozco
Re: Wordbook and changing title
  • 2005/5/23 0:20

  • yokonozco

  • Just popping in

  • Posts: 25

  • Since: 2005/3/27


Hey Hsalazar:

Your code works fine...
Thanks and i waiting to a new release of wordbook (with the mondarse help) and the soapbox.

When www.mesadepruebas.com reborn? =)

Thanks for all.

Yoko

10
Kiki1
Re: Wordbook and changing title
  • 2005/9/3 13:30

  • Kiki1

  • Not too shy to talk

  • Posts: 118

  • Since: 2004/3/14


hsalazr canu tell me have can i do that with module articles, xoopspool, mylinks, tutorials, wfdownloads, and newwbb 1.0 version... i have this problem and i have tried everthing but nothing helps, i dont undertanda that, please help, it means allot in search engine

Login

Who's Online

189 user(s) are online (97 user(s) are browsing Support Forums)


Members: 0


Guests: 189


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