PDA

View Full Version : [solved] onlinestatus


Taragon
10-19-2008, 05:23 PM
Hello,

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

<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 $post[onlinestatus] by
<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:
// get online status
fetch_online_status($this->post, true);

To:
// get online status
fetch_online_status($this->post, false);

and then you can use $post[onlinestatus]==1 in your condition.

(Not tested.)

SEOvB
10-20-2008, 11:35 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.

<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
I think another way may be to change this line of code in /includes/class_postbit.php in the function process_registered_user:
// get online status
fetch_online_status($this->post, true);

To:
// get online status
fetch_online_status($this->post, false);

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

<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!