1
irmtfan
news 1.2: disable news title show in page title
  • 2004/8/29 16:30

  • irmtfan

  • Module Developer

  • Posts: 3419

  • Since: 2003/12/7


i want show only module name in page and not title of the each recent news.
like version 1.1
is this possible to disable that?
now i use theme changer module to show what i want in page title.
thanks in advance

2
Stewdio
Re: news 1.2: disable news title show in page title
  • 2004/8/29 17:09

  • Stewdio

  • Community Support Member

  • Posts: 1560

  • Since: 2003/5/7 1


I've been tweaking my version a little bit here and there.

I've been wanting to look this over myself. I'll let you know if I found where it is. It's bad enough I'm using a module as a start page (theme limitation), but when people bookmark the page, they are going to get the title of the most recent news I posted, which isn't desireable for me. Opinions will vary though I know where your coming from.

I'll let you know how it fairs, it won't be hard; I'm just on limited time so it could be a while. Hopefully someone will post where to find it for you.

3
exbanious
Re: news 1.2: disable news title show in page title
  • 2004/8/29 19:41

  • exbanious

  • Not too shy to talk

  • Posts: 113

  • Since: 2004/5/30


I think this is the code you are looking for.
In modules\news\article.php

Quote:

$story['id'] = $storyid;
$story['posttime'] = formatTimestamp($article->published());
$story['title'] = $article->textlink()." : ".$article->title();
$story['text'] = $article->hometext();
$bodytext = $article->bodytext();


take out: Quote:
." : ".$article->title()

Something like that. Hope this helps

or you could just not add a title at all

4
Stewdio
Re: news 1.2: disable news title show in page title
  • 2004/9/1 14:08

  • Stewdio

  • Community Support Member

  • Posts: 1560

  • Since: 2003/5/7 1


irmtfan,

Something about the above code just didn't look right to me so I didn't bother trying it until much later into other checks and tests.

Eventually, I found out where to change this value. I was curious so I checked the above info and found that this only affects the main article page, in fact after a lot of different checks, some testing and some common sense, I took my non php skills to a new level and decided to pour over the code with some level of determination.

I have been rather annoyed with the way it displays because after posting a new article, it does not always update in the browser title, so I just took a chomp on the bit and made the following change after looking around the code for couple hours. (This code is so clean that even a novice like me can understand whats going on, great Job!)

Eventually, I ended up in the main index.php on line 163:

Look for:
$xoopsTpl->assign('xoops_pagetitle', $myts->makeTboxData4Show($xoopsModule->name()) . ' - ' . $myts->makeTboxData4Show($firsttitle));

Change to:
$xoopsTpl->assign('xoops_pagetitle', $myts->makeTboxData4Show($xoopsModule->name()));

It works without errors in php debug and seems to hold up well. The only other result I noticed was that when on the actual article page, the title of the article is lost, but not the topic of the category. I can't remember if the story ID was shown in the story page before the changes or not. Makes little difference to me, I got the results I wanted and hope you do as well.

Good Luck!

5
exbanious
Re: news 1.2: disable news title show in page title
  • 2004/9/1 18:37

  • exbanious

  • Not too shy to talk

  • Posts: 113

  • Since: 2004/5/30


oops! i guess i didn't really understand what you guys were looking for. Now it all makes sense.....

After re-installing XOOPS for the second time, i forgot to update the news module to 1.2, so hence i didn't see a problem with the display in the page title. So thinking that i had installed 1.2, i was a bit confused, and thought you must have been talking about story title.
i'm on vacation, so my mind is in a very different place.

Sorry bout that.

6
Stewdio
Re: news 1.2: disable news title show in page title
  • 2004/9/1 22:16

  • Stewdio

  • Community Support Member

  • Posts: 1560

  • Since: 2003/5/7 1


Don't worry about it. If you hadn't made that post I wouldn't have been curious. Once I started to look at it, something didn't feel right about it, so I just got more curious and snooped around.

If anything, you were a bigger help then you know

Login

Who's Online

352 user(s) are online (252 user(s) are browsing Support Forums)


Members: 0


Guests: 352


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