1
slyss
News 1.44 -> Show topic id in news_item.html
  • 2006/10/18 22:53

  • slyss

  • Quite a regular

  • Posts: 343

  • Since: 2006/1/26


hi everyone

i need to know how i can take the topic id.

I need to work in the template news_item.html

for eg: <{ if $topic_id == 3 }> do this <{ /if }>

thanks a lot
[size=x-large]2008 Xoops Book[/size]

2
tcnet
Re: News 1.44 -> Show topic id in news_item.html
  • 2006/10/18 23:45

  • tcnet

  • Friend of XOOPS

  • Posts: 297

  • Since: 2006/5/12


$story.topicid

3
slyss
Re: News 1.44 -> Show topic id in news_item.html
  • 2006/10/19 9:22

  • slyss

  • Quite a regular

  • Posts: 343

  • Since: 2006/1/26


Quote:

tcnet wrote:
$story.topicid


thanks a lot!!! it work!!!

but now i need to take "topic id" also in template news_index.html and $story.topicid dosen't work...

thanks for your time...
[size=x-large]2008 Xoops Book[/size]

4
tcnet
Re: News 1.44 -> Show topic id in news_item.html
  • 2006/10/19 14:17

  • tcnet

  • Friend of XOOPS

  • Posts: 297

  • Since: 2006/5/12


I am not having much luck with your request, but will keep looking.

5
iHackCode
Re: News 1.44 -> Show topic id in news_item.html

put this.
in index.php of the news module, near line 202 (if using classic mode)
$story['topicid'] = $thisstory ->storyid();

and $story.topicid should work for the index.php (page that uses the news_index.html & news_item.html template files)
CBB / LatestNews / Publisher / XM-Spotlight

(ノ◕ヮ◕)ノ*:・゚✧

6
slyss
Re: News 1.44 -> Show topic id in news_item.html
  • 2006/10/20 9:09

  • slyss

  • Quite a regular

  • Posts: 343

  • Since: 2006/1/26


Quote:

Bandit-X wrote:
put this.
in index.php of the news module, near line 202 (if using classic mode)
$story['topicid'] = $thisstory ->storyid();

and $story.topicid should work for the index.php (page that uses the news_index.html & news_item.html template files)


hi bandit-x and thanks for your reply

i have added the string
$story['news_title'] = $story['title'];
            
$story['title'] = $thisstory->textlink().'&nbsp;:&nbsp;'.$story['title'];
            
//string below added by slyss79
            
$story['topicid'] = $thisstory ->storyid();
            
$story['topic_title'] = $thisstory->textlink();
            
$story['topic_color'] = '#'.$myts->displayTarea($thisstory->topic_color);


but in now in my index.php he display (wrong) Topic's description

do you know why?

thanks a lot
[size=x-large]2008 Xoops Book[/size]

7
iHackCode
Re: News 1.44 -> Show topic id in news_item.html

Quote:

slyss79 wrote:

but in now in my index.php he display (wrong) Topic's description

do you know why?

thanks a lot


im not sure why its doing that. $story.topicid should relate to the current story in the array. Maybe Its a Template Issue, $story.topicid is not in the loop? So $story.topicid Shows The Wrong Number?
CBB / LatestNews / Publisher / XM-Spotlight

(ノ◕ヮ◕)ノ*:・゚✧

Login

Who's Online

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


Members: 0


Guests: 252


more...

Donat-O-Meter

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

Latest GitHub Commits