Aiken Full Member
  
![[Avatar]](http://uploads.virtualforums.co.uk/forums/support/me-yat.jpeg) Posts: 333 Status: Offline Gender: Male Location: In a very lonely place, the domain of despair Age: 35 Joined:
pmskypemsnyahooxfire | Different new/old images for certain boards (13th Dec 09 at 7:28pm UTC) Resolved | | Would it be possible to have a code to change the new/old images for specific boards, this will be used for like guild boards on my forum where the new/old images are the icon/logo for their guild The code must work for sub-boards, I saw a code similar to this but it wouldn't work for the sub-board, when I tried it changed for the board that the sub-board was in
Example:
My guild on my forum is called Crimson Lotus with these images:
Title:
for the group image
New:
Old:
| |
vF forums: Perfect World RP BLEACH Universe - Under Construction / Testing Phase Xen Qarna RP - Stage I Vyren Entar Battle Network RP - Under Construction / Maintenance Mode Enabled the Final Anime Hideout |
|
Aiken Full Member
  
![[Avatar]](http://uploads.virtualforums.co.uk/forums/support/me-yat.jpeg) Posts: 333 Status: Offline Gender: Male Location: In a very lonely place, the domain of despair Age: 35 Joined:
pmskypemsnyahooxfire | |
Ross Administrator
    
![[Avatar]](http://uploads.virtualforums.co.uk/forums/pokemon/vforums-qr1.png) Posts: 3,709 Status: Offline Gender: Male Age: 9 1⁄4 Joined:
Additional Groups: Support Team
  
pmwwwgtalkvForum | Re: Different new/old images for certain boards (15th Dec 09 at 11:51pm UTC) | | Hi,
I will reply to this in the morning. There's a couple of ways it could be done and I'd like to check which is the most efficient.
| |
|
|
Ross Administrator
    
![[Avatar]](http://uploads.virtualforums.co.uk/forums/pokemon/vforums-qr1.png) Posts: 3,709 Status: Offline Gender: Male Age: 9 1⁄4 Joined:
Additional Groups: Support Team
  
pmwwwgtalkvForum | Re: Different new/old images for certain boards (16th Dec 09 at 10:00am UTC) | | Hi,
I think this is the most efficient way of achieving that.
Firstly, in your global header, enter this piece of code. Repeat the lines in red as many times as necessary, entering the board id and images urls where indicated:
<script type="text/javascript"> <!-- var unread_board_images = new Array(); unread_board_images["general"] = new Array("Read Image URL", "Unread Image URL"); unread_board_images["board-id"] = new Array("Another Read Image URL", "Another Unread Image URL");
function unread_board_image(board_id, has_new_posts, default_image) { if("undefined" != typeof unread_board_images[board_id]) { if(has_new_posts) { document.write('<img src="'+ unread_board_images[board_id][1] +'" alt="New Posts" />'); } else { document.write('<img src="'+ unread_board_images[board_id][0] + '" alt="No New Posts" />'); } } else { document.write(default_image); } } //--> </script>
And then, in your board template (Admin -> Manage Templates -> Board Listing), enter this where the new posts image should appear. There's no need to change any parts of it.
<script type="text/javascript"> unread_board_image('{board_id}', {has_new_posts}, '{new_posts}'); </script> | |
|
|
Aiken Full Member
  
![[Avatar]](http://uploads.virtualforums.co.uk/forums/support/me-yat.jpeg) Posts: 333 Status: Offline Gender: Male Location: In a very lonely place, the domain of despair Age: 35 Joined:
pmskypemsnyahooxfire | |