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?

News image

Asked Modified Viewed 2,341 times
H
HaYaLeT
H
  • Senior Member, joined since
  • Contributed 262 posts on the community forums.
  • Started 28 threads in the forums
  • Started this discussions
asked
Senior Member

How to generate general news image code?

Example:
$newsimage = news image elseif news cat image else news.jpg

I made it but i think not practical,do you have another idea?
if ($data['news_image_t1']) {
      $newsimage = '<img src="'.IMAGES_N_T.$data['news_image_t1'].'" width="150" height="100" alt="" />';
   } elseif ($data['news_cat_image']) {
      $newsimage = '<img src="'.get_image('nc_'.$data['news_cat_name']).'" width="150" height="100" alt="" />;
   } else {   
      $newsimage = '<img src="../news.png" width="150" height="100" alt="" />';
   }
      echo $newsimage;
0 replies

3 posts

J
JoiNNN
J
JoiNNN 10
  • Veteran Member, joined since
  • Contributed 850 posts on the community forums.
  • Started 100 threads in the forums
answered
Veteran Member

I didn't understand exactly what you want.
Do you want to show the category image instead of news image when clicking on the image is set to take you to the category?
0 replies
M
MeTRoiD
M
  • Member, joined since
  • Contributed 114 posts on the community forums.
  • Started 11 threads in the forums
answered
Member

I think it should work and work grate.. No need to create different code.
0 replies
H
HaYaLeT
H
  • Senior Member, joined since
  • Contributed 262 posts on the community forums.
  • Started 28 threads in the forums
  • Started this discussions
answered
Senior Member

MeTRoiD thank you.

JoiNNN no for clicking,for panels
Ex:
www.hayaletsevgili.com/images/news/thumbs/mn5_t1.png
0 replies

Labels

None yet

Statistics

  • Views 0 views
  • Posts 3 posts
  • Votes 0 votes
  • Topic users 3 members

3 participants

M
M
  • Member, joined since
  • Contributed 114 posts on the community forums.
  • Started 11 threads in the forums
H
H
  • Senior Member, joined since
  • Contributed 262 posts on the community forums.
  • Started 28 threads in the forums
  • Started this discussions
J
J
JoiNNN 10
  • Veteran Member, joined since
  • Contributed 850 posts on the community forums.
  • Started 100 threads in the forums

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet