• Page 1 of 1
  • 1
uCause Community » uCoz Modules » Site News & Blogs » Icon NEW appear on one day
Icon NEW appear on one day
jackassDate: Saturday, 2011-06-25, 4:47 PM | Message # 1
Member
Group: Senior Members
Messages: 262
Awards: 4
Reputation: 8
Status: :-(
Hello! wink

I need help to set up icon in site news entry.

I need when I add new entry "NEW" icon is appearing in right corner like in images



I have all working, but I need if code, there is no $CODE$ for current date in site news appearance of entries...
Attachments: 6171986.png(147.6 Kb)


 
0 Thanked you For This Useful Post:
AnimorphDate: Saturday, 2011-06-25, 4:50 PM | Message # 2
uCause forum Admin
Group: Developer
Messages: 2835
Awards: 73
Status: :-(
jackass, can i have the whole code so i can look into it ?
 
0 Thanked you For This Useful Post:
jackassDate: Saturday, 2011-06-25, 5:06 PM | Message # 3
Member
Group: Senior Members
Messages: 262
Awards: 4
Reputation: 8
Status: :-(
Animorph, Thanks I found answer

Answer:

You need to add ID to icon id="newMessage$ID$"

and
Code
style="display:none">


For example
Code
<img id="newMessage$ID$" src="http://www.new-vision.org/images/new1.gif" style="display:none">


And at the bottom

Code
<script type="text/javascript"> var time=new Date(); var dni=Math.floor((time.getTime()/1000 -$TIMESTAMP$)/86400);
if (dni < 5) {$("#newMessage$ID$").show();}
</script>


Where is dni < 5 5 is days so if entry is older than 5 days icon will be hidden smile

Source: http://arnis.ucoz.lv/forum/29-813-1


 
0 Thanked you For This Useful Post:
AnimorphDate: Saturday, 2011-06-25, 5:08 PM | Message # 4
uCause forum Admin
Group: Developer
Messages: 2835
Awards: 73
Status: :-(
jackass, Great that this is solved then smile
 
0 Thanked you For This Useful Post:
jackassDate: Saturday, 2011-06-25, 5:13 PM | Message # 5
Member
Group: Senior Members
Messages: 262
Awards: 4
Reputation: 8
Status: :-(
Yes it is wink

PS. Great that this site is back booze

Added (2011-06-25, 5:13 PM)
---------------------------------------------
Oh Animorph, please edit this threads title from

Icon NEW appear on on day

To

Icon NEW appear on one day

biggrin


 
0 Thanked you For This Useful Post:
AnimorphDate: Saturday, 2011-06-25, 6:43 PM | Message # 6
uCause forum Admin
Group: Developer
Messages: 2835
Awards: 73
Status: :-(
jackass, I'm glad that you like that uCause is back smile and i will change the title smile
 
0 Thanked you For This Useful Post:
uCause Community » uCoz Modules » Site News & Blogs » Icon NEW appear on one day
  • Page 1 of 1
  • 1
Search:


"Making uCoz web designs simple and easy to use"
- uCause Developers