1
Vertygo
Chaning News module
  • 2005/1/9 0:01

  • Vertygo

  • Just popping in

  • Posts: 4

  • Since: 2005/1/8 2


I`m trying to change news module.
I`m adding picture for topic instead of text
so it wont be like:
TOPIC : Test
Posted by Admin on 2004/12/22 4:39:09 (0 reads)

instead of TOPIC will be picture.

Now problem is when i add in /modules/news/article.php

$story['topicimg']= $article->getimage();

and into /modules/news/class/class.newsstory.php add this line:

function getimage()
{
return $this->newstopic->topicimg;
}

it wont work ... i`m new to php so i could drop some variable or such... please help

2
smdcom
Re: Chaning News module

maybe you can try this... go to modules/news/article.php

in line 69:
$story['title'] = [color=ff0000]$article->textlink()." : ".[/color]$article->title();


remove code mark red.

then go to edit template (system -? template -> news)

edit template for news_item.html

<table cellpadding="0" cellspacing="0" width="98%">
            <
tbody>
                <
tr>
                    <
td class="itemHead">
                        <
span class="itemTitle">[color=0000ff]<img src="<{$xoops_url}>/images/image.gif">[/color]<{$story.title}>span>
                    td>
                tr>
                <
tr>


add img src likes code mark blue... good luck!

SMD

3
Vertygo
Re: Chaning News module
  • 2005/1/9 0:31

  • Vertygo

  • Just popping in

  • Posts: 4

  • Since: 2005/1/8 2


Problem is that there are different topics it should be like:
Every topic has its own picture.

Like science would have some science picture and sport would have some sport picture.

4
smdcom
Re: Chaning News module

How about this:

<table cellpadding="0" cellspacing="0" width="98%">
            <
tbody>
                <
tr>
                    <
td class="itemHead">
                        <
span class="itemTitle">[color=0000ff]<{$story.imglink}>."nbsp;:nsbp;".[/color]<{$story.title}>span>
                    td>
                tr>
                <
tr>

5
Vertygo
Re: Chaning News module
  • 2005/1/9 0:49

  • Vertygo

  • Just popping in

  • Posts: 4

  • Since: 2005/1/8 2


$story.imglink != $story.topicimg

problem is to set "topicimg"

6
smdcom
Re: Chaning News module

Quote:

Vertygo wrote:
$story.imglink != $story.topicimg

problem is to set "topicimg"


have you try? i've try in my localhost. and it works... $story.imglink is the topic image link. try 1st..

SMD

7
Vertygo
Re: Chaning News module
  • 2005/1/9 1:10

  • Vertygo

  • Just popping in

  • Posts: 4

  • Since: 2005/1/8 2


No no :)
i wanted to say that $story.imglink WILL NOT BE $story.topicimg it means it will be different picture :)

I want to set up new variable that will return that new image but i fail to do that

Login

Who's Online

187 user(s) are online (50 user(s) are browsing Support Forums)


Members: 0


Guests: 187


more...

Donat-O-Meter

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

Latest GitHub Commits