Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

trying to fetch news cats name..

Asked Modified Viewed 2,149 times
A
afif
A
afif 10
  • Member, joined since
  • Contributed 183 posts on the community forums.
  • Started 12 threads in the forums
  • Started this discussions
asked
Member

hi,

i'm currently making a theme for php fusion 7. what i wanna do is at the news footer, instead of putting "author on Month Date Year at TIME · x Comments · y Reads", i just wanna put it as "posted by author under the category x" (like blogs or something)

the problem is.. i can't call the name of the category.

what i've tried is, i open news.php and on line 52, i put the array as shown, then i tried to call it using $info in theme.php but it just doesn't work:

news.php

$news_info = array(
"news_id" => $data['news_id'],
"user_id" => $data['user_id'],
"user_name" => $data['user_name'],
"news_date" => $data['news_datestamp'],
"news_ext" => $data['news_extended'] ? "y" : "n",
"news_reads" => $data['news_reads'],
"news_comments" => dbcount("(comment_id)", DB_COMMENTS, "comment_type='N' AND comment_item_id='".$data['news_id']."'"),
"news_allow_comments" => $data['news_allow_comments'],
[color=#cc0000]"news_cat_name" => $data['news_cat_name'][/color]
);


theme.php
echo "<div class='newsinfo'>Posted by <a href='".BASEDIR."profile.php?lookup=".$info['user_id']."'>".$info['user_name']."</a> under the category [color=#ff0000]".$info['news_cat_name']."[/color]</div>";
0 replies

1 post

A
afif
A
afif 10
  • Member, joined since
  • Contributed 183 posts on the community forums.
  • Started 12 threads in the forums
  • Started this discussions
answered
Member

oooppss.. I'm sorry, my bad. It's actually working..
0 replies

Labels

None yet

Statistics

  • Views 0 views
  • Posts 1 post
  • Votes 0 votes
  • Topic users 1 member

1 participant

A
A
afif 10
  • Member, joined since
  • Contributed 183 posts on the community forums.
  • Started 12 threads in the forums
  • Started this discussions

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet