Log in

View Full Version : Trying to make an icon appear next to a thread if a user has posted...


sblum
09-16-2004, 06:42 AM
And this is what I've tried so far. In "functions_forumdisplay.php" I've added these lines of code: if ($thread['threadid'] == $dotthreads["$thread[threadid]"])
{
$show['hasposted'] = true;
}

and then in my threadbit template I have a simple conditional saying if $show['hasposted'], display this image, but it's not working. The problem is in the conditional in the PHP file, and I can't figure this out for the life of me. I guess I just need to check to see if the current threadid is in the array of dotthreads? Any help would be much, much appreciated.

Dean C
09-16-2004, 08:17 AM
Moved to General vBulletin questions. Please read the forum descriptions more closely in future :) Thanks

sblum
09-16-2004, 04:22 PM
Just simply
if ($dotthreads["$thread[threadid]"])
{
$show['hasposted'] = true;
}

Makes an icon show up for every post, and I Can't figure out why. Pulling my hair out here, any ideas?

sblum
09-16-2004, 07:26 PM
My most recent attempt was this, also didn't work:

for($i=0;$i < count($dotthreads);$i++);
if ($dotthreads[$i] == $thread['threadid'])
{
$show['hasposted'] = true;
}

sblum
09-16-2004, 07:48 PM
OK, well I finally figured it out - it required no hacking whatsoever, vB already did the work for me :)

I just had to put [php]<if condition="$thread[dot_count] > 0"> in the template. Oops!