MyBB Community Forums
Group php script - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Community Archive (https://community.mybb.com/forum-106.html)
+--- Forum: Archived Forums (https://community.mybb.com/forum-143.html)
+---- Forum: Miscellaneous Archive (https://community.mybb.com/forum-140.html)
+----- Forum: Requests/Services/Jobs 2 (https://community.mybb.com/forum-136.html)
+----- Thread: Group php script (/thread-98192.html)

Pages: 1 2 3 4 5


RE: Group php script - Euan T - 2011-07-08

Alright, I'll add that just now Smile I take it you know how to format a UNIX timestamp in vb.net. If not, I can format it PHP side instead.


RE: Group php script - SergeMorel - 2011-07-08

no, not really :o
At the moment I do this in vb.net :
Dim UserInfo As XmlTextReader = New XmlTextReader("http://mysite.com/userinfo.php?uid=1")
        While (UserInfo.Read())
            Dim type = UserInfo.NodeType
            If (type = XmlNodeType.Element) Then
                If (UserInfo.Name = "username") Then
                    Label1.Visible = True
                    Label1.Text = UserInfo.ReadInnerXml.ToString()
                End If
            End If
        End While
it Gives me 'SergeMorel', but it lags...
are there better ways to do this? I found this on google, never used xml before.

EDIT :
I now use this :
Dim UserInfo As XmlTextReader = New XmlTextReader("http://www.sergemorel.co.cc/userinfo.php?uid=1")
        While (UserInfo.Read())
            Dim type = UserInfo.NodeType
            If (type = XmlNodeType.Element) Then
                If (UserInfo.Name = "uid") Then
                    Label1.Text = UserInfo.ReadInnerXml.ToString()
                End If
                If (UserInfo.Name = "username") Then
                    Label2.Text = UserInfo.ReadInnerXml.ToString()
                End If
                If (UserInfo.Name = "usertitle") Then
                    Label3.Text = UserInfo.ReadInnerXml.ToString()
                End If
                If (UserInfo.Name = "postcount") Then
                    Label4.Text = UserInfo.ReadInnerXml.ToString()
                End If
                If (UserInfo.Name = "usergroup") Then
                    Label5.Text = UserInfo.ReadInnerXml.ToString()
                End If
            End If
        End While
Works good, I put it in a backgroundworker & goes pretty fast now.
The only thing I don't receive is the usertitle ?


RE: Group php script - Euan T - 2011-07-08

I'd guess it's because you've got HTML in your usertitle, though I'm not 100% sure.


RE: Group php script - SergeMorel - 2011-07-08

Well , usertitle doesn't matter, you changed usergroup to be a name, that's sweet. I use that Smile

So can you make the other things working too now or are some of them not possible ?


RE: Group php script - Euan T - 2011-07-08

I'm just doing it now, but I'm struggling a little with the online status as the function doesn't seem to be working. The rest is done though.


RE: Group php script - SergeMorel - 2011-07-08

[Image: onlineornot.png]
That's the status I mean The 'online (viewing...)'



RE: Group php script - Euan T - 2011-07-08

Yeah, I know. It just isn't working correctly right now Wink


RE: Group php script - SergeMorel - 2011-07-08

oh ok.
Can you give the other things already?


RE: Group php script - Euan T - 2011-07-08

Ok, I've got it sorted. The only issue is that the html link tag exists - I'm just going to remove that, then I'm done.


RE: Group php script - SergeMorel - 2011-07-08

I already removed the usertitle in mine (the one that didn't show up), because it's buggy & I don't really need it :p