1
cydud3
Help with modifying News 1.1 module
  • 2004/11/16 8:31

  • cydud3

  • Just popping in

  • Posts: 50

  • Since: 2004/6/10


I don't know where to post this request so I'll just post it here. Some of my users are complaining about some features of the News 1.1. It's not because the module sucks it's just because they're too picky. I'm not really good at programming (that's why I use XOOPS in the first place), so I need the help of you expert module programmers out there. I need the template for News 1.1 modified so that the "Posted by:" part is not displayed when it is posted by specified uids.

Can somebody please post a modified template. I would really appreciate it.

2
smdcom
Re: Help with modifying News 1.1 module

You can simply go to edit template

admin menu -> system -> templates -> news -> news_item.html

find:
<div class="itemInfo">
    [
color=ff0000]<span class="itemPoster"><{$lang_postedby}><{$story.poster}></span>[/color] <span class="itemPostDate"><{$lang_on}> <{$story.posttime}></span> (<span class="itemStats"><{$story.hits}> <{$lang_reads}></span>)
  </
div>


just delete the code with red color. anyway, if you don't have any clone template... just make one clone template and set it as default template at system admin -> preferences -> general settings. or you can edit modules/news/templates/news_item.html. update your modules.

that's the way you can do it. hope that make sense.

SMD

3
cydud3
Re: Help with modifying News 1.1 module
  • 2004/11/16 15:52

  • cydud3

  • Just popping in

  • Posts: 50

  • Since: 2004/6/10


But won't doing that delete all Posted by lines? I only want to hide Posted by when the item is posted by a particular user (e.g. webmaster).

4
m0nty
Re: Help with modifying News 1.1 module
  • 2004/11/16 16:58

  • m0nty

  • XOOPS is my life!

  • Posts: 3337

  • Since: 2003/10/24


yep it will remove it from all posts..

i'm not sure how to achieve what u want.. but maybe a simple if else script..

something similar to:

<div class="itemInfo">
<{if 
$story.poster == $xoops_isadmin}><{else}>
    <
span class="itemPoster"><{$lang_postedby}><{$story.poster}><{/if}></span>
<
span class="itemPostDate"><{$lang_on}> <{$story.posttime}></span> (<span class="itemStats"><{$story.hits}> <{$lang_reads}></span>)
  </
div>



don't try that as i'm pretty certain it won't work.. i'm not sure if the devs could come up with an easy solution for that without having to edit the files..

5
cydud3
Re: Help with modifying News 1.1 module
  • 2004/11/17 6:46

  • cydud3

  • Just popping in

  • Posts: 50

  • Since: 2004/6/10


Does anybody know if News 1.2 makes this task easier? I might just upgrade to 1.2 if it makes any difference. What's the main advantage of upgrading anyway?

Login

Who's Online

123 user(s) are online (65 user(s) are browsing Support Forums)


Members: 0


Guests: 123


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits