1
karuna
Each page have it's own title would be nice
  • 2004/3/14 5:24

  • karuna

  • Not too shy to talk

  • Posts: 171

  • Since: 2002/5/29


I mean that, for example, the html title for this thread woudld be " XOOPS Ofificial Site - Each page have it's own title would be nice " or some thing like this instead of "XOOPS Offical Site - Forum".
And so do the other modules such as News, MyDownloads, Mylinks, albums.

Thanks

2
JackJ
Re: Each page have it's own title would be nice
  • 2004/3/14 11:56

  • JackJ

  • Community Support Member

  • Posts: 747

  • Since: 2003/8/31


Hi karuna


To add specific page titles to news you need to edit the theme.html file for your theme. I recorded this a while back from one of ackbarr's

Your Title Here

and change it to

<{$xoops_sitename}> - <{$xoops_pagetitle}>

then go to modules/news/article.php

add a line before

include XOOPS_ROOT_PATH.'/include/comment_view.php';

The line:

$xoopsTpl->assign('xoops_pagetitle', htmlentities($xoopsModule->name() . ' -' . $article->title()));

WFsections already has this built in. For newbb I know of one method, but requires a bit of hacking of the newbb files

See this thread

https://xoops.org/modules/newbb/viewtopic.php?topic_id=7856&forum=10#forumpost31611

3
Koreus
Re: Each page have it's own title would be nice
  • 2004/3/20 14:19

  • Koreus

  • Just popping in

  • Posts: 29

  • Since: 2003/2/9 2


Thanks it works great !

It is same method for modules mydownloads and mylinks

For mydownloads the title variable is just $title
You can add the program version with variable $version

For mylinks title variable is $ltitle


4
kenogui
Re: Each page have it's own title would be nice
  • 2004/3/31 12:43

  • kenogui

  • Just popping in

  • Posts: 25

  • Since: 2004/1/19


this hack works just fine, but the main pb is that it's not working anymore if you have cache enabled on your site !

any idea about that ? just try to see twice a news uncached/then cached and you will see ...

5
Koreus
Re: Each page have it's own title would be nice
  • 2004/3/31 22:16

  • Koreus

  • Just popping in

  • Posts: 29

  • Since: 2003/2/9 2


I saw that too , I have cache enabled , sometimes it works (title is ok) and it does not.

I dont understand why but I havent search

Perhaps when the cache is enabled it doesnt fetch the title (article, download, links) in database but just read/show the cached html file.

I don't know how cache file is generated but perhaps it should be changed to include the title.


6
tl
Re: Each page have it's own title would be nice
  • 2004/4/17 4:21

  • tl

  • Friend of XOOPS

  • Posts: 999

  • Since: 2002/6/23


If $xoops_pagetitle were to be assigned manually in the module, it would work, but only the first time.

If I were to refesh the same page, the assigned one would be replaced by the Xoops-assigned.

It would be great if the assigned pagetitle could stick.

7
karuna
Re: Each page have it's own title would be nice
  • 2004/4/19 16:30

  • karuna

  • Not too shy to talk

  • Posts: 171

  • Since: 2002/5/29


Hi i finaly got it works~~

$xoopsTpl->assign('xoops_pagetitle'htmlspecialchars($xoopsModule->name() . ' - ' $article->title()));


i have to change htmlentities to htmlspecialchars because my site is in Chinese.

Thanks

Login

Who's Online

254 user(s) are online (178 user(s) are browsing Support Forums)


Members: 0


Guests: 254


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