Page 1 of 1

Denote New Item (Red Circle) Tutorial

Posted: Wed May 23, 2012 5:51 pm
by wale89
Hi Jacek,

Really thank full for yr all effort on making these good tutorial so far. It's helps me a lot.. :D
But if possible, i really need your help on making tutorial for "denotes new item" things. The idea is like whenever there is something new (update) , the system will notify the users by denoting some red circle color besides the new things.

I give you the real situation.
For example, I have this upload & download function. Supervisor can upload doc and student can download it..and vice versa. So, this denotes new item will actually help the student/supervisor to see whether there is any new document has been uploaded or not.

I have google this kind of tutorial, but there is none. So, I really appreciate if you could make one as you are all expert in this lang.

Thanks so much.. :)

Re: Denote New Item (Red Circle) Tutorial

Posted: Wed May 23, 2012 8:05 pm
by Temor
He's already done this as a part of the private message system tutorials.
What you need to do is set a value in your database to signify that there is a new upload available. Lets say a 1 is equal to new and a 0 is equal to old. Whenever the user downloads the new file, set the value back to 0.

After that it's as easy as one if statement.
<?php

if($new_download == 1){
	echo " New Download Available ";
}

?>

Re: Denote New Item (Red Circle) Tutorial

Posted: Wed May 23, 2012 11:25 pm
by jacek
I think I actually based it on some timestamps but the principle is the same :)

Re: Denote New Item (Red Circle) Tutorial

Posted: Thu May 24, 2012 9:33 pm
by Temor
jacek wrote:I think I actually based it on some timestamps but the principle is the same :)
Oh, right. Totally forgot :)