Go Back   vb.org Archive > vBulletin 5 Connect Discussion > vB5 Programming Discussions

Reply
 
Thread Tools Display Modes
  #1  
Old 04-07-2014, 11:22 PM
alexxxmk alexxxmk is offline
 
Join Date: Apr 2014
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Help Changing Status Icons for each Forum

Hi,

I found this useful code on vb.com which I am using now on my forum. But what I am still missing is to add icons in specific forums. Not having all the forums with the same icon. if anyone knows how to please let me know!



/* forum icon for forums with no new posts */
.forum-list-container .forum-item .cell-forum .icon {
background: transparent url("http://yoursite.com/forum/images/css/car-old2.png") no-repeat;
}

/* forum icon for forums with new posts */
.forum-list-container .forum-item.new .cell-forum .icon {
background: transparent url("http://yoursite.com/forum/images/css/car-new3.png") no-repeat;
}

Example:

http://eurocrewpr.com/forum


On you CPanel go to -> Styles & Templates -> Style Manager -> Edit Template -> Click on CSS Templates -> Open css_additional.css


Thanks to vbulletin.com former developer who posted the code
Reply With Quote
  #2  
Old 04-08-2014, 04:54 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The example you posted has the same icon for all the forums. I thought you were saying you want them different for each forum? If so, I think you would need to first edit the display_Forums_item template and use the nodeid to create a new class:

HTML Code:
class="forum-item {vb:raw forumCssPrefix} forum-item{vb:raw forumStatus} iconclass{vb:raw forum.nodeid}"
And then change the classes in the list to something like this (changeXX to the nodeid of the forum):
HTML Code:
.forum-list-container .forum-item.iconclassXX .cell-forum .icon {....
Reply With Quote
  #3  
Old 04-10-2014, 12:06 AM
alexxxmk alexxxmk is offline
 
Join Date: Apr 2014
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi Lynne, yes that's exactly what I am looking for.

Just tried creating the iconclass but didn't work out for me

any other suggestions?
Reply With Quote
  #4  
Old 04-10-2014, 12:54 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It worked just fine on my test site. I suggest you try it again from scratch. And be sure that the URLs for your images are correct or they won't show.
Reply With Quote
  #5  
Old 04-10-2014, 01:27 AM
alexxxmk alexxxmk is offline
 
Join Date: Apr 2014
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes! now its working! just realized I had the .forum-item repeated on my css_additional.css

Thank you so much Lynne!

--------------- Added [DATE]1397100570[/DATE] at [TIME]1397100570[/TIME] ---------------

Reply With Quote
  #6  
Old 04-10-2014, 04:52 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That looks nice! I'm glad it finally worked for you.
Reply With Quote
  #7  
Old 04-11-2014, 04:51 AM
Spangle Spangle is offline
 
Join Date: Jun 2011
Posts: 520
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I like this idea, it would be useful for my football ( soccer) forum, is there any chance the OP could do an idiots guide on how to achieve this ?

TIA
Reply With Quote
  #8  
Old 04-11-2014, 05:54 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

All he did was what was posted here - https://vborg.vbsupport.ru/showpost....32&postcount=2
Reply With Quote
  #9  
Old 04-11-2014, 06:23 PM
Spangle Spangle is offline
 
Join Date: Jun 2011
Posts: 520
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lynne View Post
All he did was what was posted here - https://vborg.vbsupport.ru/showpost....32&postcount=2

I'm confused as to how the correct icons are displayed for each forum
Reply With Quote
  #10  
Old 04-11-2014, 06:23 PM
IggyP IggyP is offline
 
Join Date: May 2012
Posts: 252
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

here is more code for changing if you want icons the same...

this has adjustments for spacing and such so can easily do with most any size icons

http://www.vbulletin.com/forum/forum...icons-any-size
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:54 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04299 seconds
  • Memory Usage 2,248KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_html
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete