Hey fury

catocom

Well-Known Member
I saw at vb.com where you responded to the old thread "clock Icon" thing/idea.

I can't find anywhere where anyone else has done that, or anything.

Could you give me instruction to how to add that?
I'd pay ya. :nerd:
I noticed you have it going on here. I don't know why more people didn't
pick up on it. It's a great thing to me. :confused:
 

fury

Administrator
Staff member
Hi, this was a simple template conditional...

Code:
<if condition="$thread['dateline'] < (TIMENOW - (86400*30))"><img src="yourimage.gif" alt="This thread was started more than 30 days ago" /></if>

Place that where you want your icon to appear in the threadbit template.
 

catocom

Well-Known Member
Wow
I thought it'd be way more complicated.
You da man for figuring it out though.
hail.gif


will be implementing shortly. :banana:
 

Luis G

<i><b>Problemator</b></i>
Staff member
if php is still as alike to C as it used to be, aren't you doing an assigment '=' to condition instead of a comparison '=='?

(unless of course you did that intentionally)
 

catocom

Well-Known Member
eh I figured it out.
The nesting was off a little.

instead of
(TIMENOW - (86400*30))"

it neede to be
(TIMENOW-86400*180)"

PHP:
<!-- ---------------------- clock ------------------------------- -->
<if condition="$thread['dateline'] <(TIMENOW-86400*180)"><img src="http://catocom.com/forum/images/smilies/readup.gif" alt="This thread was started more than 6 months ago"></if>
<!-- ---------------------- /clock ------------------------------- -->
 

fury

Administrator
Staff member
catocom said:
well I'm working on it.
I'm getting this error.
Any ideas?
Hm, I guess vB3 has gotten a lot stricter with function control since the beta. :shrug:
 

catocom

Well-Known Member
I had to mod the code a little farther because when searching
it showed a clock on "all" the results.
I fixed it so that it doesn't show at all in the "search/new posts" ,
but I'd like to get it working right in the searches, ...eventually.
 

fury

Administrator
Staff member
I wouldn't know for sure, but check and see if the bit that processes threadbits in the search.php file includes thread.dateline in the query
 

catocom

Well-Known Member
yep, around line 253 there's this.....what would I do with it?

PHP:
		// sort variables that need changing
		case 'forum':
			$sortby = 'forum.title';
			break;

		case 'threadstart':
			$sortby = 'thread.dateline';
			break;
 
Top