What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » CSS Code for Status Away

Pages: (2): « First [ 1 ] 2 » Last »
CSS Code for Status Away
Author: Message:
ASI Pinoy
New Member
*


Posts: 5
Joined: Jan 2007
O.P. CSS Code for Status Away
can anyone give me a code that will enable away status on my forums? *-)

This post was edited on 01-16-2007 at 04:42 AM by ASI Pinoy.
01-16-2007 04:38 AM
Profile E-Mail PM Find Quote Report
FineWolf
Full Member
***

Avatar
Space Artist

Posts: 188
Reputation: 12
– / Male / Flag
Joined: Sep 2003
RE: CSS Code for Status Away
Number 1, this is not the proper place to post these kinds of questions.

Number 2, the code largely depends on the kind of forums you use, and it's not CSS... If you have no knowledge of the underlaying technology, you rather not modify your forums' code.

This post was edited on 01-16-2007 at 04:46 AM by FineWolf.
[Image: spacesigkj4.png]
01-16-2007 04:46 AM
Profile PM Web Find Quote Report
ASI Pinoy
New Member
*


Posts: 5
Joined: Jan 2007
O.P. RE: CSS Code for Status Away
i know what type of forum i have and i know what works on this. i am sorry if this is in the wrong forum. and if u have ever heard of fmods.com, then i am one of the development team members. so i think i know what i am doing.(H)
01-16-2007 04:54 AM
Profile E-Mail PM Find Quote Report
FineWolf
Full Member
***

Avatar
Space Artist

Posts: 188
Reputation: 12
– / Male / Flag
Joined: Sep 2003
RE: RE: CSS Code for Status Away
quote:
Originally posted by ASI Pinoy
i know what type of forum i have and i know what works on this. i am sorry if this is in the wrong forum. and if u have ever heard of fmods.com, then i am one of the development team members. so i think i know what i am doing.(H)


Then I have no idea why you speak of CSS when you should know that such modification would require PHP code as well as modifications to the MySQL tables in order to hold the away status of the user.

CSS is a stylesheet language used to describe the presentation of a document written in a markup language and doesn't control at all the behaviour a website.
[Image: spacesigkj4.png]
01-16-2007 04:59 AM
Profile PM Web Find Quote Report
ASI Pinoy
New Member
*


Posts: 5
Joined: Jan 2007
O.P. RE: CSS Code for Status Away
but my forum isn't php
01-16-2007 05:17 AM
Profile E-Mail PM Find Quote Report
FineWolf
Full Member
***

Avatar
Space Artist

Posts: 188
Reputation: 12
– / Male / Flag
Joined: Sep 2003
RE: CSS Code for Status Away
Well, it's either PHP, ASP, JSP, Python, Ruby or any other type of dynamic web platform language, but it isn't CSS. What forum platform are you using? Invision's IP.Board?

No offense, but you do not seem to have any knowledge on web technologies.

This post was edited on 01-16-2007 at 05:47 PM by FineWolf.
[Image: spacesigkj4.png]
01-16-2007 05:20 AM
Profile PM Web Find Quote Report
RaceProUK
Elite Member
*****

Avatar

Posts: 6073
Reputation: 57
39 / Male / Flag
Joined: Oct 2003
RE: CSS Code for Status Away
The CSS could be just hiding the controls for Away status.
[Image: spartaafk.png]
01-16-2007 07:26 PM
Profile PM Web Find Quote Report
ASI Pinoy
New Member
*


Posts: 5
Joined: Jan 2007
O.P. RE: CSS Code for Status Away
this is the online offline code i am using. i don't think css is hiding it.
code:
<script language="javascript" type="text/javascript">
<!-- Online Status Indicator for Forumer

onlineStatus = "<p style='color:green;font-weight:bold'><img src='http://img86.exs.cx/img86/6840/useronline6oh.gif' alt='Online'> Online</p>"
offlineStatus = "<p style='color:red;font-weight:bold'><img src='http://img91.exs.cx/img91/5369/useroffline9qd.gif' alt='Offline'> Offline</p>"

document.write("<iframe name='index' src='{ibf.script_url}act=Online&CODE=listall&sort_key=click' style='display:none' onload='harvest()'></iframe>")

function harvest()
{
var td = window.frames["index"].document.getElementsByTagName("td")
for(var i = 0; i < td.length; i++){
if(td[i].className == "row1" && td[i].parentNode.parentNode.parentNode.parentNode.innerHTML.match("Online Users")){
var tdi = td[i]
harvestLinks(tdi);
}
}
}

function harvestLinks(tdi){
var a = tdi.getElementsByTagName("A")
var names = new Array(a.length)
for(i = 0; i < a.length; i++){
if(a[i].href.match("showuser=")){
names[i] = a[i].innerHTML.replace(/<[^>]+>/g, "")
updateStatus(names);
}
}
}

function updateStatus(names)
{
td=document.body.getElementsByTagName("TD")
for(s=0;s<td.length;s++) {
if((td[s].className=="post1"||td[s].className=="post2")&&td[s].innerHTML.match("Posts: ")&&td[s].width!="100%") {
var poste=td[s].getElementsByTagName("SPAN")[0]
var postName=td[s].parentNode.parentNode.getElementsByTagName("SPAN")[0].getElementsByTagName("A")[0];
for(j = 0; j < names.length; j++){
if(postName.innerHTML==names[j])
{
var replacoo=poste.getElementsByTagName("DIV");
for(p=0;p<replacoo.length;p++){
if(replacoo[p].className=="ShowOn"){
replacoo[p].innerHTML=onlineStatus;
}
else{
//good is sin
}
}
}
}
}
}
}


function OfflineWhen(){
td=document.body.getElementsByTagName("TD")
for(s=0;s<td.length;s++) {
if((td[s].className=="post1"||td[s].className=="post2")&&td[s].innerHTML.match("Posts: ")&&td[s].width!="100%") {
var poste=td[s].getElementsByTagName("SPAN")[0]
if(! poste.innerHTML.match("ShowOn")){
poste.innerHTML += "<br /><div class='ShowOn'>"+offlineStatus+"</div>"
}
}
}
}

OfflineWhen()
// -->
</script>
01-16-2007 07:59 PM
Profile E-Mail PM Find Quote Report
FineWolf
Full Member
***

Avatar
Space Artist

Posts: 188
Reputation: 12
– / Male / Flag
Joined: Sep 2003
RE: CSS Code for Status Away
Ok, first of all I can clearly see in the code that you are using IP.Board from Invision. Second, why use client side scripting that will fail on workstations with Javascript disabled when you could do the exact same in alot less work directly in the PHP code (Yes, IPB is coded in PHP).

Not to sound rude, but either fmods are accepting anyone in their staff, or they made a mistake by accepting you. Client side scripting should NEVER BE USED if the same could be achived using Server-side scripting (AJAX excluded, but in that case it's an even mix of the two).

(And this is the dirtiest javascript code I have ever seen.)

This post was edited on 01-16-2007 at 08:37 PM by FineWolf.
[Image: spacesigkj4.png]
01-16-2007 08:34 PM
Profile PM Web Find Quote Report
WDZ
Former Admin
*****

Avatar

Posts: 7106
Reputation: 107
– / Male / Flag
Joined: Mar 2002
RE: CSS Code for Status Away
quote:
Originally posted by ASI Pinoy
document.write("<iframe name='index' src='{ibf.script_url}act=Online&CODE=listall&sort_key=click' style='display:none' onload='harvest()'></iframe>")
[Image: lmao.gif]

That method really sucks, and has some serious limitations. You should only use it if absolutely necessary, like if it's impossible to modify the server-side PHP code. Someone must have access to it, since your board seems to be on a dedicated server: http://69.64.49.113/ :-/

Basically your script just screen-scrapes the "Online Users" page, so unless that page tells you whether someone is "Away" or not, you're out of luck.
01-16-2007 09:08 PM
Profile PM Web Find Quote Report
Pages: (2): « First [ 1 ] 2 » Last »
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On