Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 10-19-2008, 05:23 PM
Taragon's Avatar
Taragon Taragon is offline
 
Join Date: Sep 2007
Location: The Netherlands
Posts: 390
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default [solved] onlinestatus

Hello,

Currently I'm trying to adjust my postbit here and there, and having something like this setup:

Code:
		<td class="alt3" style="padding: 0px; background-image: url($stylevar[imgdir_misc]/back.gif); background-repeat: repeat-x; border-$stylevar[right]: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]">
			$post[onlinestatus]
Would it be possible to replace [minicode]$post[onlinestatus][/minicode] by
Code:
<if condition="$onlinestatus==1"><img src="$stylevar[imgdir_misc]/online.gif" style="float: right;" border="0"></if>
somehow?
Reply With Quote
  #2  
Old 10-20-2008, 07:56 PM
Taragon's Avatar
Taragon Taragon is offline
 
Join Date: Sep 2007
Location: The Netherlands
Posts: 390
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I hope it's ok to bump this one once
Reply With Quote
  #3  
Old 10-20-2008, 08:21 PM
Seven Skins's Avatar
Seven Skins Seven Skins is offline
 
Join Date: Sep 2008
Location: London, UK
Posts: 1,481
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Look at "postbit_onlinestatus" template.

I think this is what you need to edit to get what you want.

.
Reply With Quote
  #4  
Old 10-20-2008, 10:01 PM
Boosted Panda Boosted Panda is offline
 
Join Date: Mar 2008
Location: Long Beach, CA
Posts: 262
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

"postbit_onlinestatus" contains all the information for the online status images.
Reply With Quote
  #5  
Old 10-20-2008, 10:22 PM
Taragon's Avatar
Taragon Taragon is offline
 
Join Date: Sep 2007
Location: The Netherlands
Posts: 390
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

true, however I was trying to avoid the postbit_onlinestatus template, since changing things here also changes ie. the appearance of the memberprofile page.

I was hoping to just change the appearance of the postbit instead.
Reply With Quote
  #6  
Old 10-20-2008, 10:38 PM
Boosted Panda Boosted Panda is offline
 
Join Date: Mar 2008
Location: Long Beach, CA
Posts: 262
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Then to answer that I think a hook will be needed. I asked the same question myself.
Reply With Quote
  #7  
Old 10-20-2008, 11:26 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I think another way may be to change this line of code in /includes/class_postbit.php in the function process_registered_user:
PHP Code:
     // get online status
        
fetch_online_status($this->posttrue); 
To:
PHP Code:
     // get online status
        
fetch_online_status($this->postfalse); 
and then you can use $post[onlinestatus]==1 in your condition.

(Not tested.)
Reply With Quote
  #8  
Old 10-20-2008, 11:35 PM
SEOvB's Avatar
SEOvB SEOvB is offline
 
Join Date: May 2007
Location: Indianapolis
Posts: 2,451
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Taragon View Post
true, however I was trying to avoid the postbit_onlinestatus template, since changing things here also changes ie. the appearance of the memberprofile page.

I was hoping to just change the appearance of the postbit instead.
Code:
<if condition="(THIS_SCRIPT == showthread) OR (THIS_SCRIPT == showpost)">
Postbit online code for threads
<else />
Postbit online code for else where
</if>
try that maybe?
Reply With Quote
  #9  
Old 10-21-2008, 09:46 AM
Taragon's Avatar
Taragon Taragon is offline
 
Join Date: Sep 2007
Location: The Netherlands
Posts: 390
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lynne View Post
I think another way may be to change this line of code in /includes/class_postbit.php in the function process_registered_user:
PHP Code:
     // get online status
        
fetch_online_status($this->posttrue); 
To:
PHP Code:
     // get online status
        
fetch_online_status($this->postfalse); 
and then you can use $post[onlinestatus]==1 in your condition.

(Not tested.)
I have to admit I haven't tried this yet; it however is giving me loads of new ideas
Quote:
Originally Posted by FRDS View Post
Code:
<if condition="(THIS_SCRIPT == showthread) OR (THIS_SCRIPT == showpost)">
Postbit online code for threads
<else />
Postbit online code for else where
</if>
try that maybe?
Like a charm (and I should have known) Much apriciated both!
Reply With Quote
Reply


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 06:28 AM.


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.04590 seconds
  • Memory Usage 2,258KB
  • 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
  • (4)bbcode_code
  • (4)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (9)postbit
  • (9)postbit_onlinestatus
  • (9)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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete