Patch for:
http://groups.drupal.org/node%252F8426 : Show if there are new topics in forum listing (change icon)

Please test this. It will replace the blue folder icon with red if there is a new Topic. It does not show if there is a new reply/comment to a topic.
Please put forum-all-new.png in your {themefolder/}advanced_forum/images.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Max_Headroom’s picture

Manual:
In advf-forum-list.tpl.php find:

<td <?php print $forum->is_container ? 'colspan="4" class="container"' : 'class="forum"'; ?>>

Replace with:

<td 
<?php if( $forum->is_container){
	print 'colspan="4" class="container"';
}elseif ($forum->new_topics){
	print 'class="forum forum-list-new"';
}else{
	print 'class="forum"';
}
?>>

in advanced_forum.css find:

#forum tr td.forum {
  background-image:url(images/forum.png);
  background-position:2px 50%;
  background-repeat:no-repeat;
  padding-left:25px;
}

After insert:

#forum tr td.forum-list-new{
  background-image:url(images/forum-all-new.png);
}
Michelle’s picture

Thanks. I'll be working on the module again soon and will get this in.

Michelle

fe@drupal.org’s picture

works perfect for the 6.x version, too

Michelle’s picture

Status: Needs review » Fixed

Committed to 5.x. Will add it to 6.x as well when I update that.

Thanks,

Michelle

robotjox’s picture

Some time ago I made some code that also included new replies/comments: http://groups.drupal.org/node/7916
you can see it in action at http://www.ammenet.dk/forum (grey hearts means no new posts).

Michelle’s picture

Zandroc - I keep looking at that red folder and thinking there's an error... Too conditioned, I guess. :) Any chance of making a less "alert" colored folder? Green, perhaps?

robotjox - Whoops, lost track of that g.d.o post. If it's not in the issue queue I tend to forget. I'll make an issue for it so I don't forget about it again. Unfortunately, I'm at the end of what I'm going to be able to do on advforum for at least the next few days.

Michelle

Max_Headroom’s picture

FileSize
2.36 KB

Here's your green icon, Michelle :)

Michelle’s picture

Status: Fixed » Active

Thanks! Setting this active again as I'm not sure I'll get to it today (only online a short while) and I'll lose it if it's still set fixed.

Michelle

Michelle’s picture

Status: Active » Fixed

Green commited and red one renamed for people who prefer that one.

Thanks for the icons. My apologizes for missing your name on the latest commit. I just realized I didn't add it.

Michelle

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.