1
littletern
News module: how to remove category name from news headline?
  • 2006/11/22 20:19

  • littletern

  • Just popping in

  • Posts: 44

  • Since: 2005/6/5 2


Is it possible to remove category name from news headline?
From some news template, maybe?

2
hervet
Re: News module: how to remove category name from news headline?
  • 2006/11/23 7:11

  • hervet

  • Friend of XOOPS

  • Posts: 2267

  • Since: 2003/11/4


in the file /xoops/modules/news/class/class.newsstory.php
find this line :
$ret ".XOOPS_URL."/modules/news/index.php?storytopic=".$this->topicid()."'>".$this->topic_title()."";


and replace it with :
$ret '';

3
littletern
Re: News module: how to remove category name from news headline?
  • 2006/11/23 8:45

  • littletern

  • Just popping in

  • Posts: 44

  • Since: 2005/6/5 2


That's it! Tnx!

4
littletern
Re: News module: how to remove category name from news headline?
  • 2006/11/24 11:50

  • littletern

  • Just popping in

  • Posts: 44

  • Since: 2005/6/5 2


After that I removed the category name from news header on here explained Hervet's way there still was "problem" with colomns (:) - colomns are still there. Somehow they (colomns) are manualy inserted in /modules/news/index.php for short story and in /modules/news/article.php for full story. Maybee that will help someone..
An example of this "hack" can be found here. News header without category names. Viola!

5
Bates
Re: News module: how to remove category name from news headline?
  • 2006/11/26 10:53

  • Bates

  • Just popping in

  • Posts: 13

  • Since: 2006/11/26


Can you tell exactly what you delete and where to remove the (:) ?

Thanks

6
red_Slider
Re: News module: how to remove category name from news headline?


7
Bates
Re: News module: how to remove category name from news headline?
  • 2006/11/26 13:51

  • Bates

  • Just popping in

  • Posts: 13

  • Since: 2006/11/26


sorry red_slider

i've read that polish solution but i have no idea what he is talking about..

8
red_Slider
Re: News module: how to remove category name from news headline?

When you look into code of template "news_item.html" then you will find "$stories.title" smarty, what decides on displaying a news title in form CATEGORY : NEWS TITLE. As I said in "article.php" I found a code "story.news_title" and I used it.

so:
1. if U have clonned templates system:
go into administration > templates > CLONED news templates (there're 15 of them) > news_item.html
ad edit it

Quote:



















<{$story.title}>
<{if $story.files_attached}><{$story.attached_link}> <{/if}><{if $story.poster != ''}><{$lang_postedby}> <{$story.poster}><{/if}> <{$lang_on}> <{$story.posttime}> (<{$story.hits}> <{$lang_reads}>) <{$news_by_the_same_author_link}>
<{$story.imglink}>

<{$story.text}>

<{$story.adminlink}><{if $rates}><{$lang_ratingc}> <{$story.rating}> (<{$story.votes}>) - <{$lang_ratethisnews}> - <{/if}><{$story.morelink}>




you can see the bolder string in the code - it's "$stories.title" and U have to change it into "story.news_title"

2 if U have not clonned Yours templates
use ftp cl;ient and edit it directly on serwer. (do the same)

9
Wayne
Re: News module: how to remove category name from news headline?
  • 2006/11/26 15:34

  • Wayne

  • Just popping in

  • Posts: 35

  • Since: 2002/2/13


Quote:

Bates wrote:
sorry red_slider

i've read that polish solution but i have no idea what he is talking about..


I just read it. (Thank you red_slider!)

What he means is this;

In /modules/news/article.php, you will find a list of variables at the top in the comments sections. Each of these can be used in the templates.

So... Edit your news template and replace $story.title with $story.news_title and that should fix the problem.

@red_slider

Thank you! That helps greatly.

{edit : see below}

Thank you.

Wayne

10
Wayne
Re: News module: how to remove category name from news headline?
  • 2006/11/26 15:37

  • Wayne

  • Just popping in

  • Posts: 35

  • Since: 2002/2/13


@red_slider

Nevermind, thanks. Found it... I was looking for something with the word "category", not topic_title

Login

Who's Online

391 user(s) are online (304 user(s) are browsing Support Forums)


Members: 0


Guests: 391


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