Page 1 of 1

users online plugin

Posted: Wed May 18, 2005 5:08 pm
by kjoker
I need a little help here.
I made users online plugin it shows up fine. But here's the thing:

I set the location on the right..at the very bottom. But when I move it up...the rest of the right side bar plugins disappeared. When I uninstalled my plugin...everything shows up again. So tried leaving it at the bottom... and i added the commetns plugin. The comments didn't show up ...only the title.

I just took the hitmap plugin and modify it a bit.

Any help would be appreciated.
As far as the php coding concern... it works fine if it's not included in class functions etc etc..

Re: users online plugin

Posted: Wed May 18, 2005 5:20 pm
by garvinhicking
There's an error then in your plugin of course; try to look out for any PHP errors on the page?

Else you can post your plugin somewhere (nopaste.php-q.net) and then I can look at it.

Regards,
Garvin

done

Posted: Wed May 18, 2005 5:40 pm
by kjoker
posted it

the name of the file is serendipity_plugin_usersonline.php
if you go to htt://tcsmidway.no-ip.org/usersonline.php it shows the number of users online...

of course you have to go to my blog first cause that's where I put the mysql query to enter the ip, url, timestamp

on the blog if you click Who's Online Now...that pulls up another php page with the Country and IP. I'm still working on the showing the flag image...

Re: done

Posted: Wed May 18, 2005 6:21 pm
by garvinhicking
I need the sourcecode of the plugin :)

Regards,
Garvin

??

Posted: Wed May 18, 2005 6:58 pm
by kjoker
:?: :?: the one I pasted on the http://nopaste.php-q.net/ IS the source code. It is cut and pasted from the serendipity_plugin_useronline.php I don't have any other code. You mean the mysql query entries?

it's in there http://nopaste.php-q.net/134713

Re: ??

Posted: Wed May 18, 2005 8:22 pm
by garvinhicking
Now that's better. You did not give me your NoPaste URL before! :-P

Now, the problem is in your Plugin: It creates a MySQL connection and closes it. Thereby it also closes all Serendipity Database connections, so that Serendipity can no longer operate.

Try to use this plugin instead:

http://nopaste.php-q.net/134747

It uses the existing serendipity DB functions.

hm..

Posted: Wed May 18, 2005 8:33 pm
by kjoker
nope. not working.. still the same as before.

well if it doesn't work..the other script is working anyway.. :)
i just can't make plugins :P