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 "<a href='".XOOPS_URL."/modules/news/index.php?storytopic=".$this->topicid()."'>".$this->topic_title()."</a>";


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?

or read this:
http://www.ibr.org.pl/modules/newbb/viewtopic.php?forum=2&post_id=2#forumpost2

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:

<table cellpadding="0" cellspacing="0" class="item">
<tr>
<td>
<table cellpadding="0" cellspacing="0" width="98%">
<tr>
<td class="itemHead"><span class="itemTitle"><{$story.title}></span></td>
</tr>
<tr>
<td class="itemInfo"><{if $story.files_attached}><{$story.attached_link}>&nbsp;<{/if}><{if $story.poster != ''}><span class="itemPoster"><{$lang_postedby}> <{$story.poster}></span><{/if}> <span class="itemPostDate"><{$lang_on}> <{$story.posttime}></span> (<span class="itemStats"><{$story.hits}> <{$lang_reads}></span>) <{$news_by_the_same_author_link}></td>
</tr>
<tr>
<td><div class="itemBody"><{$story.imglink}><p class="itemText"><{$story.text}></p></div></td>
</tr>
<tr>
<td class="itemFoot"><span class="itemAdminLink"><{$story.adminlink}></span><{if $rates}><b><{$lang_ratingc}></b> <{$story.rating}> (<{$story.votes}>) - <a href="<{$xoops_url}>/modules/news/ratenews.php?storyid=<{$story.id}>" rel="nofollow"><{$lang_ratethisnews}></a> - <{/if}><span class="itemPermaLink"><{$story.morelink}></span></td>
</tr>
</table>
</td>
</tr>
</table>


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

243 user(s) are online (118 user(s) are browsing Support Forums)


Members: 0


Guests: 243


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