users online plugin

Creating and modifying plugins.
Post Reply
kjoker
Regular
Posts: 26
Joined: Fri May 13, 2005 4:32 pm

users online plugin

Post 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..
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: users online plugin

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
kjoker
Regular
Posts: 26
Joined: Fri May 13, 2005 4:32 pm

done

Post 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...
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: done

Post by garvinhicking »

I need the sourcecode of the plugin :)

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
kjoker
Regular
Posts: 26
Joined: Fri May 13, 2005 4:32 pm

??

Post 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
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: ??

Post 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.
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
kjoker
Regular
Posts: 26
Joined: Fri May 13, 2005 4:32 pm

hm..

Post 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
Post Reply