Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 How to switch images with this code
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #6
RE: How to switch images with this code
Do this conditional
(07-28-2012 02:22 AM)Matt-One Wrote:  

PHP Code:
<if $thread['uid'] == $post['uid'] then>post_op<else>post_otro</if>

to the img tag here:
(07-28-2012 02:22 AM)Matt-One Wrote:  

PHP Code:
<img src="images/globito01.png">


Code:
<img src="images/<if $post['uid'] == $GLOBALS['thread']['uid'] then>image1<else>image2</if>.png" alt="" />

Maybe you need to modify it if guests are allowed to post in your forum.
And maybe you need to re-check the HTML structures and variables involved in your template.


07-28-2012 03:19 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread
RE: How to switch images with this code - RateU - 07-28-2012 03:19 AM

 Standard Tools
Forum Jump: