Closed (fixed)
Project:
Views (for Drupal 7)
Version:
6.x-2.5
Component:
node data
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
18 May 2009 at 13:38 UTC
Updated:
11 May 2013 at 15:53 UTC
can i add "NEW" icon in VIEWS ? i just wanna add "NEW" in RED near the new nodes some thing like (Node: Has new content) but stay appear for a 1 or 2 weeks for all users
is there is any module can do that ?
anyone can help me in this ?
Comments
Comment #1
merlinofchaos commentedWell you could probably add the 'post date' field and theme the field to provide an icon if it is within a certain timeframe. There's nothing that will do this automatically, though, so you'll have to use a bit of PHP to accomplish it. This is the best I can offer.
Comment #2
qaffaf commentedthnx merlinofchaos but how i can do that by coding ? can u help me to do it ?
Comment #3
qaffaf commentedComment #4
dawehnerhere is a example how the tracker module does it
I Think this will help you
Comment #5
qaffaf commentedthnx alot dereine but i'm new in drupal and php... can u help me where i can put this code and what to do pleaseeee ?
Comment #6
dawehnerthis is not critical ... :)
add a field node: post date;
Then click theme informations and add a specific theme for the node: post date field.
Then edit this theme file and add
This will not be all, because i'm not sure how to access the other stuff like nid title and changed, i have to see how to do it
perhaps you can figure this out of the variable $row in the theme file
Comment #7
qaffaf commentedit gives me some hyroglifics symbols :P
what i can do now ?
thnx for helping me
Comment #8
CrashNet commentedSubscribing...would be a nice little feature to have. Surprised its not built into core as news sites, etc do this all the time.
Comment #9
merlinofchaos commentedOh, you might also be able to override theme_node_mark which is what most things in Drupal use to display if a node (or comment) is new. Hm. Maybe it's theme_mark I forget.
Comment #10
mcrittenden commentedqaffaf: Try reading http://www.group42.ca/theming_views_2_the_basics for a background of Views theming (or just Google "theming views") and then the code posted here will make a lot more sense.
Comment #11
esmerel commentedSuggestions given.
Comment #13
tarang127 commentedHow do I add this new field "post-date"?