PDA

View Full Version : Online Text?



snyx
Sat 11th Aug '01, 9:18pm
How can I make it say if a user is online or not? Like the icon under there post, but in text. Here is an example (taken from sitepointforums)

Freddie Bingham
Sat 11th Aug '01, 9:23pm
Doh, you just edit the postbit online/offline templates.

almighty one
Sat 11th Aug '01, 10:30pm
hey yeah that was pretty simple and looks nicer too add the glow effect to onlien users name :)

snyx
Sat 11th Aug '01, 11:46pm
well duh, I was all in the postbit temp. but I couldnt realize how to change it from the icon to text. arg, there has got to be somthing so simple im missing, and then I looked a bit closer and saw postbit_offline and postbit_online wow, I really hate the way the temp. are sorted, and how I can't seem to find simple things. thanks boys.

mjames
Sun 12th Aug '01, 9:03pm
Originally posted by snyx
http://www.vbulletin.com/forum/attachment.php?s=&postid=153055
Hey, that's me! :D

Goddess Washu
Wed 15th Aug '01, 12:44am
Oy, I must be slow... how would I go about doing that... :confused: I see the templates and what not, but what would I do from there...

Pie'oh'pah
Wed 15th Aug '01, 9:05am
Postbit Templates

online template

***remove all

***insert


& nbsp;Online!


or if you want to have it with glow effect:

***insert

<div style="width:100%; font-size:7pt; color:white; filter:Glow(color=lightgreen, strength=2)"> Online!</div>
<nobr>

offline template

***remove all

***insert

& nbsp;Offline!

or if you want to have it with glow effect:

***insert

<div style="width:100%; font-size:8pt; color:white; filter:Glow(color=darkgreen, strength=2)"> Offline!</div>
<nobr>

Make sure to remove the space between '&' and 'nbsp;'
And play around with the colors and glow amount :D

Hope that helps....

-Alex

Pie'oh'pah
Wed 15th Aug '01, 11:10am
I have done it a different way also. Check out the attachement.

To do that, edit the same templates as above, but replace all with


postbit_online template
<table align="center" width="80%" border="0">
<tr>
<td><div align="right" style="width:100%; font-size:8pt; color:white; filter:Glow(color=lightgreen, strength=2)"> Online </div></td>
<td><div style="width:100%; font-size:8pt; color:grey; filter:none"> | Offline</div></td>
</tr>
</table>



postbit_offline template

<table align="center" width="80%" border="0">
<tr>
<td><div align="right" style="width:100%; font-size:8pt; color:{textcolor}; filter:none"> Online | </div></td>
<td><div style="width:100%; font-size:8pt; color:white; filter:Glow(color=lightgreen, strength=2)"> Offline</div></td>
</tr>
</table>


Ahh and make sure, you enable this option in your admin cp !

- Alex

Goddess Washu
Wed 15th Aug '01, 11:49am
Thanks a lot, that second way is really cool. :D

Goddess Washu
Wed 15th Aug '01, 12:41pm
But is it possible for me to get that Online | Offline to appear in the area that has the username and the avatar and all that data?

Pie'oh'pah
Wed 15th Aug '01, 12:58pm
Sure.

In your Postbit Template find $onlinestatus. Take it away
and put that variable whereever you want it to appear.

That's it :)

-Alex

Goddess Washu
Wed 15th Aug '01, 1:12pm
Originally posted by Pie'oh'pah
Sure.

In your Postbit Template find $onlinestatus. Take it away
and put that variable whereever you want it to appear.

That's it :)

-Alex

Ohh ok, thanks again... but is it possible for me to keep that little icon in the toolbar aswell, perhaps I could add some php code to the template to add that decision making...

Pie'oh'pah
Wed 15th Aug '01, 1:19pm
Grrrrrrr :D

Well, i guess that would require a little code stripping.
Something like $onlinestatus and $onlinestatus1 and additional templates.

Try to find the declaration of the $onlinestatus variable in the php file, shouldn't be too hard to copy the part and create the same with the $onlinestatus1

I'm not much into php (mostly glad to be able to add the hacks :D)

I'll try to find it though.

-Alex

Goddess Washu
Wed 15th Aug '01, 1:36pm
Originally posted by Pie'oh'pah
Grrrrrrr :D

Well, i guess that would require a little code stripping.
Something like $onlinestatus and $onlinestatus1 and additional templates.

Try to find the declaration of the $onlinestatus variable in the php file, shouldn't be too hard to copy the part and create the same with the $onlinestatus1

I'm not much into php (mostly glad to be able to add the hacks :D)

I'll try to find it though.

-Alex

Yeah that's what I am thinking... I'm the exact opposite, I understand the php side, but for some reason these templates baffle me... -_- Thanks again for the help. I'll look into that when I get home (at work now) can't get FTP access to my file from here... -_-;; Thanks again.

Pie'oh'pah
Wed 15th Aug '01, 1:48pm
We make a couple hehe

Well, i dont know anything about php, but here is the solution :D

in your admin/functions.php

***find



eval("\$onlinestatus = \"".gettemplate("postbit_online")."\";");


***right below add



eval("\$onlinestatus1 = \"".gettemplate("postbit_online1")."\";");



***find



eval("\$onlinestatus = \"".gettemplate("postbit_offline")."\";");


***right below add



eval("\$onlinestatus1 = \"".gettemplate("postbit_offline1")."\";");



Thats for the php!

Now, just create 2 new Templates:

postbit_offline1
postbit_online1

in those templates put the code from the former postings

now revert the postbit_online and postbit_offline to orignial (then you got that icon back right in front of the posting date)

now place the new variable $onlinestatus1 whereever you like.

Puuuh. Done.


Is this cosidered a hack?? I just did a hack, didn't I?! Yeeehaw my first hack :D:D:D:D


-Alex

Goddess Washu
Wed 15th Aug '01, 1:56pm
Yay!!! Thanks a lot, I'll do it right away when I get home. :D

Johnny
Fri 17th Aug '01, 5:48am
i have add it! now i want to make it that under the posts, location etc.! that you see the word "status" and than online or offline! i have in the postbit add this "status: $onlinestatus" but the online or offline status is not back the word status but under it!

how can i change this! that you see after the word status the online | offline

Pie'oh'pah
Fri 17th Aug '01, 12:37pm
Yes, i have done that myself.

Just change the table width to 100% instead of 80$

-Alex

Johnny
Sat 18th Aug '01, 9:30am
i've changed it to 100%
but it doesnt work!
now my code looks like this:

Postbit_online

<table align="center" width="100%" border="0">
<tr>
<td><div align="right" style="width:100%; font-size:8pt; color:white; filter:Glow(color=green, strength=2)"> Online </div></td>
<td><div style="width:100%; font-size:8pt; color:grey; filter:none"> | Offline</div></td>
</tr>
</table>

---------------------------------------------

Postbit_offline

<table align="center" width="100%" border="0">
<tr>
<td><div align="right" style="width:100%; font-size:8pt; color:{textcolor}; filter:none"> Online | </div></td>
<td><div style="width:100%; font-size:8pt; color:white; filter:Glow(color=red, strength=2)"> Offline</div></td>
</tr>
</table>


is there something wrong?
what must i change? that near the word "status:" i see the status of that user!

tnx

Pie'oh'pah
Sat 18th Aug '01, 11:55am
Hi,

maybe it's the fontsize!?

make sure you put <smalfont> </smallfont> around the status:

check it out at my UA site (http://www.unreal-alliance.de/vbulletin/index.php3?s=&styleid=11)this should be exactly what you are trying to do...

hth...

-Alex

Johnny
Sat 18th Aug '01, 2:24pm
yes like that! but than i want it under the posts, location etc!
what must i change at the fontsize?

can you post the good code here?

Pie'oh'pah
Sat 18th Aug '01, 6:07pm
hey,

did you try <smallfont>Status :</smallfont> ?

that works for me

ozone2000
Sat 18th Aug '01, 6:18pm
Originally posted by Pie'oh'pah
We make a couple hehe

Well, i dont know anything about php, but here is the solution :D

in your admin/functions.php

***find



eval("\$onlinestatus = \"".gettemplate("postbit_online")."\";");


***right below add



eval("\$onlinestatus1 = \"".gettemplate("postbit_online1")."\";");



***find



eval("\$onlinestatus = \"".gettemplate("postbit_offline")."\";");


***right below add



eval("\$onlinestatus1 = \"".gettemplate("postbit_offline1")."\";");



Thats for the php!

Now, just create 2 new Templates:

postbit_offline1
postbit_online1

in those templates put the code from the former postings

now revert the postbit_online and postbit_offline to orignial (then you got that icon back right in front of the posting date)

now place the new variable $onlinestatus1 whereever you like.

Puuuh. Done.


Is this cosidered a hack?? I just did a hack, didn't I?! Yeeehaw my first hack :D:D:D:D


-Alex

How do i do all this in Vbb 2.0.1?? I cant find any of this stuff in the admin/funktions.php in Vbb 2.0.1...

BTW. its not my board im doing this for, but i guy who asked me to do it!

Pie'oh'pah
Sat 18th Aug '01, 8:58pm
Hey Oz

since developers moved sum stuff to different files in version 2.0.3, you might try to search for those strings in the other files.

You can easily do that by using the search feature of windows itself, just search for text instead for a file.

Maybe its admin/misc or sum, i dunno. But i guess this would be a good point to start :D

It doesn't really matter where the code is, you just need to find it.

-Alex

ozone2000
Sun 19th Aug '01, 6:00am
Thanks, and if i find it ill post the "edited" instuctions on how to do it on 2.0.1!

ozone2000
Sun 19th Aug '01, 7:11am
I FOUND IT!!!

It's all located in the announcement.php i've searched all the other files, but i only found it in this file!

Pilot
Sun 19th Aug '01, 7:28am
Why can't this made a CP feature?

ozone2000
Sun 19th Aug '01, 7:31am
Yeah! can anyone make this a feature to add to the admin cp?

Pie'oh'pah
Sun 19th Aug '01, 8:14am
Originally posted by ozone2000
I FOUND IT!!!

It's all located in the announcement.php i've searched all the other files, but i only found it in this file!

Did it work then?

And regarding the admin CP:
What do you want to have in there? On/Off switch?

-Alex

ozone2000
Sun 19th Aug '01, 8:18am
1) No, it didn't work for me!

2) No, it should just se so, that when you create a template you can choose the "name" of it, like the on/offline templates name was both $onlinestatus ... know what i mean?

Pie'oh'pah
Sun 19th Aug '01, 9:13am
err no, not really...

Johnny
Sun 19th Aug '01, 12:21pm
Originally posted by Pie'oh'pah
hey,

did you try <smallfont>Status :</smallfont> ?

that works for me

:( it didn't work!
in the postbit template i have now:


<smallfont>status:</smallfont> $onlinestatus</smallfont></td>

and after the word "$onlinestatus" you see </smallfont></td>
this is because that's the end of that tabel from posts etc..!
you know.....

but how can i make it good!?

Pilot
Sun 19th Aug '01, 5:33pm
Well I really meant that this should be in VB as standard and CP selectable.

Goddess Washu
Sun 19th Aug '01, 10:57pm
Originally posted by ozone2000
1) No, it didn't work for me!

2) No, it should just se so, that when you create a template you can choose the "name" of it, like the on/offline templates name was both $onlinestatus ... know what i mean?

It's in another file... I got it to work... http://forums.anime-network.cjb.net/ but i forget the file now... search through them again.

Maverick1236
Sun 19th Aug '01, 11:20pm
what about users who choose to be invisible?

Pie'oh'pah
Mon 20th Aug '01, 10:43am
@Johnny


and after the word "$onlinestatus" you see </smallfont></td>

You got 1 </smallfont> too much. delete it. :p


@ Goddess W.



It's in another file... I got it to work...

I agree. Was asking my self, what it has to do with the announcement.php at all..... :)


@maverick


what about users who choose to be invisible?

not sure about that. but i think they wont be visible, if they chosen to be invi.

I'm not using $online1 thingy myself, because i find it it useless, to have 2 stats about online/offline :D
I'm using only $online and modified it to display text instead of the symbol :p

Somebody who installed it the other way may check this.

-Alex

Johnny
Tue 21st Aug '01, 10:43am
Originally posted by Pie'oh'pah
@Johnny

You got 1 </smallfont> too much. delete it. :p



It doesn't work :(:(
now the code looks like this:



<smallfont>status:</smallfont> $onlinestatus</td>

pleazz help me!

drumsy
Sat 20th Oct '01, 10:14pm
Originally posted by Goddess Washu
But is it possible for me to get that Online | Offline to appear in the area that has the username and the avatar and all that data?

Can someone expound on this further??? I need to know what to edit and how so the words "Online" or "Offline" will appear under their avator!

FWC
Sat 20th Oct '01, 11:20pm
Originally posted by drumsy


Can someone expound on this further??? I need to know what to edit and how so the words "Online" or "Offline" will appear under their avator! You need to go into the postbit template and move $onlinestatus up under $post[avatar]. Then you need to edit the postbit_online and postbit_offline templates to Online and Offline instead of the default image.

drumsy
Sun 21st Oct '01, 2:23am
Originally posted by FWC
You need to go into the postbit template and move $onlinestatus up under $post[avatar]. Then you need to edit the postbit_online and postbit_offline templates to Online and Offline instead of the default image.

Crap, I hate this!!!

Ok, can someone copy/paste what exactly needs to be moved up to underneath all the info that comes on there.

Example:

<td bgcolor="$post[backcolor]" width="175" valign="top" nowrap>
<a name="post$post[postid]"></a>
$post[firstnewinsert]
<normalfont><b>$post[username]</b></normalfont><br>
<smallfont>$post[usertitle]</smallfont><br>
$post[avatar]<p>
<smallfont>Registered: $post[joindate]<br>
Location: $post[field2]</smallfont></td>

And then there's this:

<td bgcolor="$post[backcolor]" width="175" height="16" nowrap><smallfont>$onlinestatus $post[foldericon]
$post[postdate] $post[posttime]</smallfont></td>

What exactly do I remove from that second set of code there, up to the first set of code, where do I add it in at, and what do I do with the remaining code at the bottom? I want the "Online/Offline" deal right underneath the Location:

Thanks for helpin' a poor bastard out!:(

FWC
Sun 21st Oct '01, 4:42am
Originally posted by drumsy

<td bgcolor="$post[backcolor]" width="175" valign="top" nowrap>
<a name="post$post[postid]"></a>
$post[firstnewinsert]
<normalfont><b>$post[username]</b></normalfont><br>
<smallfont>$post[usertitle]</smallfont><br>
$post[avatar]<p>
<smallfont>Registered: $post[joindate]<br>
Location: $post[field2]</smallfont><br>
<smallfont>$onlinestatus</smallfont></td>Make it look like the code above and remove $onlinestatus from where it is in the other section. Leave the rest there. Then edit the two templates I mentioned.

drumsy
Sun 21st Oct '01, 3:17pm
Nothing.

The postbit_online and postbit_offline have been edited correctly.

Here's the snippet of my postbit:


<td bgcolor="$post[backcolor]" width="175" valign="top" nowrap>
<a name="post$post[postid]"></a>
$post[firstnewinsert]
<normalfont><b>$post[username]</b></normalfont><br>
<smallfont>$post[usertitle]</smallfont><br>
$post[avatar]<p>
<smallfont>Registered: $post[joindate]<br>
Location: $post[field2]<br>
Posts: $post[posts]</smallfont><br>
<smallfont>$onlinestatus</smallfont></td>
I'm almost postive it's right!

And here's what the area looks like where the $onlinestatus orginally was:

<td bgcolor="$post[backcolor]" width="175" height="16" nowrap><smallfont>$post[foldericon]
$post[postdate] $post[posttime]</smallfont></td>

Everything seems to be in order, yet.......it still doesn't work. Insight?

drumsy
Tue 6th Nov '01, 8:25pm
I've been told there's a problem with maybe a php file, since it works on another board using my style. Can anyone offer any insight?

drumsy
Tue 6th Nov '01, 9:00pm
Originally posted by drumsy
I've been told there's a problem with maybe a php file, since it works on another board using my style. Can anyone offer any insight?

Never mind, this white honkey forgot to enable it in the admin cp. It workee much now!:)