vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   [solved] onlinestatus (https://vborg.vbsupport.ru/showthread.php?t=194035)

Taragon 10-19-2008 05:23 PM

[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?

Taragon 10-20-2008 07:56 PM

I hope it's ok to bump this one once

Seven Skins 10-20-2008 08:21 PM

Look at "postbit_onlinestatus" template.

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

.

Boosted Panda 10-20-2008 10:01 PM

"postbit_onlinestatus" contains all the information for the online status images.

Taragon 10-20-2008 10:22 PM

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.

Boosted Panda 10-20-2008 10:38 PM

Then to answer that I think a hook will be needed. I asked the same question myself.

Lynne 10-20-2008 11:26 PM

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.)

SEOvB 10-20-2008 11:35 PM

Quote:

Originally Posted by Taragon (Post 1649297)
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?

Taragon 10-21-2008 09:46 AM

Quote:

Originally Posted by Lynne (Post 1649343)
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 :p
Quote:

Originally Posted by FRDS (Post 1649351)
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!


All times are GMT. The time now is 05:04 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.01154 seconds
  • Memory Usage 1,740KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (4)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete