Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
  #1  
Old 09-16-2009, 07:44 PM
Blind Dragon Blind Dragon is offline
 
Join Date: Aug 2009
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Giving Stickies their own status icon

So I want to give stickied threads a different icon than normal threads and closed threads. Not so hard...

My problem is, I need it to be conditional on if the thread is a sticky, then use the sticky icon, if the thread is not a sticky, then use normal thread icons.

Here's where I am at - the sticky icon shows, but it shows along with the normal icon showing closed thread or new post ect instead of replacing it:

This is the threadbit template (is there somewhere else they have conditionals for when to use one threadicon or another ?)

HTML Code:
<tr>
	<td class="alt1" id="td_threadstatusicon_$thread[realthreadid]">
		$thread[openclose_editable]
<if condition="$show['sticky']">
<img src="$stylevar[imgdir_statusicon]/stickyicon.gif" alt="$vbphrase[sticky_thread]" /></if>
		<else /><img src="$stylevar[imgdir_statusicon]/thread$thread[statusicon].gif" id="thread_statusicon_$thread[realthreadid]" alt="<if condition="$show['threadcount']"><phrase 1="$thread[dot_count]" 2="$thread[dot_lastpost]">$vbphrase[have_x_posts_in_thread_last_y]</phrase></if>" border="" />
	</td>
I figured the if/else statement would mean if condition 1 is not met then use condition 2

or if the thread is not a sticky then use [statusicon].gif

If you need to see and example of what I am talking about:
http://www.tech-101.com/windows/
Reply With Quote
  #2  
Old 09-16-2009, 09:09 PM
TimberFloorAu's Avatar
TimberFloorAu TimberFloorAu is offline
 
Join Date: May 2008
Location: Brisbane
Posts: 2,264
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Love to help, but why link to something with VIRUS lol... in title.

Usually its just a case of appending the sticky image.
Reply With Quote
  #3  
Old 09-16-2009, 09:23 PM
Blind Dragon Blind Dragon is offline
 
Join Date: Aug 2009
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Wow - I didn't even think about that title scaring people - just our virus removal forums have the most stickies

I changed link to our windows forums.
Reply With Quote
  #4  
Old 09-16-2009, 09:35 PM
TimberFloorAu's Avatar
TimberFloorAu TimberFloorAu is offline
 
Join Date: May 2008
Location: Brisbane
Posts: 2,264
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

K so you want a STATUS ICON for sticky ? hmmmm if thats the case good question.

Surely that isnt too hard.

Isnt the code to display the gif:

<div> <span style="float:right"> <img class="inlineimg" src="http://www.anyforum.com/forum/images/styles/MyStyle/misc/sticky.gif" alt="Sticky Thread" /> </span>

So wouldnt you just need to amend the code within :

threadbit

Code:
<if condition="$show['sticky']"> <img class="inlineimg" src="$stylevar[imgdir_misc]/sticky.gif" alt="$vbphrase[sticky_thread]" /> </if>
And move this within the statusicon bit ?

somewhere around here :

Code:
<tr class="$rowClass">
	<td id="td_threadstatusicon_$thread[realthreadid]">
		$thread[openclose_editable]
		<img src="$stylevar[imgdir_statusicon]/thread$thread[statusicon].gif" id="thread_statusicon_$thread[realthreadid]" alt="<if condition="$show['threadcount']"><phrase 1="$thread[dot_count]" 2="$thread[dot_lastpost]">$vbphrase[have_x_posts_in_thread_last_y]</phrase></if>" border="" />
	</td>
Reply With Quote
  #5  
Old 09-16-2009, 10:17 PM
Blind Dragon Blind Dragon is offline
 
Join Date: Aug 2009
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Not exactly.

I don't want to change the sticky status icon.

I am looking to add a thread status icon for stickies - which is non existent by default.

By default, when you stick a thread - it shows either hot topic, closed topic, or new topic, ect for a thread status icon.

I want it to show the icon that I create, which it does.. but it also shows the other icon

===========================
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 12:56 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.10985 seconds
  • Memory Usage 2,202KB
  • Queries Executed 13 (?)
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_code
  • (1)bbcode_html
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (5)postbit
  • (5)postbit_onlinestatus
  • (5)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_postinfo_query
  • fetch_postinfo
  • 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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete