Nucleus Support Forum Index

Find on the forum:
any terms  all terms  Advanced Search

RSS 2.0
Browse posts: Unanswered | Mark all read

« »
Loading Nucleus FAQ ticker...
Post new topic Reply to topic
Author Message
faceh
Nucleus Expert


Joined: 20 Apr 2003
Posts: 404

Post Posted: Mon Jan 30, 2006 12:58 pm   Post subject:
Reply with quote

maybe this is just me, but the plugin stores "non-members" as -1 in my SQL table, instead of 0 - so everyone who visits the site is a member... strange...

maybe the latest version of nucleus changed non-members to be stored as ID -1 instead of 0 ? i dont know.



UPDATE:
i think thats it - i went through the NP_Online plugin, and replaced all comparisons of WHERE member='0' to WHERE member='-1'

i cant remember all the changes i made, there were quite a few, but i'll leave it to the author of the plugin to update - otherwise it gets confusing.

Theres also some stuff about "showonline" in there which doesnt seem to be getting used... i dont completely understand this plugin Sad

_________________
http://www.faceh.com - faceh.com Webdesign
http://www.jetblag.com - Japan Blogs
http://www.oldsushi.com - Huge Japan community
http://oldsushi.com/blurb - Funny and interesting shit from Japan

Back to top

View user's profile Send private message Visit poster's website
tunupo
Nucleus Fan


Joined: 11 Sep 2005
Posts: 35
Location: Switzerland

Post Posted: Mon Jan 30, 2006 1:16 pm   Post subject: Re: Trouble shooting for NP_Online
Reply with quote

Hi Faceh,

Did you see the posting from kg. This little hack helped me to get the plugin working again. Although I don't know how I can get the time offset issue solved.

kg wrote:
I find a way to make NP_Online work again.

In line 43 (or a little bit more or less) the plugin requests the user id:
Code:
$user = $member->getID();

You must add the following if-then-statement, to give $user a correct value:
Code:
$user = $member->getID();
if ($user<0) $user=0;

I think there could be more code changed to make it a better plugin. But with this "hack" it works again. I have tested it in a local network. It's a nice toy, when it works. Smile

Back to top

View user's profile Send private message Visit poster's website
faceh
Nucleus Expert


Joined: 20 Apr 2003
Posts: 404

Post Posted: Mon Jan 30, 2006 1:40 pm   Post subject:
Reply with quote

timeoffset, as in the time displayed when the user is online?

i added this install option:
Code:
$this->createOption('timeoffset','Time Offset','text','9');


and then changed line 195 to this:
Code:
echo "<li>$n. <a href=\"$memberlink\">$membername</a> (". date('d.m.y - H:i:s', $row->timestamp + $this->getOption('timeoffset')*3600);


displays time correctly.
as for the quick dirty fix if ($user<0) $user=0;, thats basically what i did but instead i replaced them all :S i didnt think of that haha Smile

Theres still a lot of code in that plugin that im sure doesnt need to be there...

_________________
http://www.faceh.com - faceh.com Webdesign
http://www.jetblag.com - Japan Blogs
http://www.oldsushi.com - Huge Japan community
http://oldsushi.com/blurb - Funny and interesting shit from Japan

Back to top

View user's profile Send private message Visit poster's website
tunupo
Nucleus Fan


Joined: 11 Sep 2005
Posts: 35
Location: Switzerland

Post Posted: Mon Jan 30, 2006 2:09 pm   Post subject:
Reply with quote

@faceh
The offset as you showed the code for, works perfect. The plugin displays now the correct time and I can use it on my page. I putted a link to your site. Thanks a lot!

Back to top

View user's profile Send private message Visit poster's website
faceh
Nucleus Expert


Joined: 20 Apr 2003
Posts: 404

Post Posted: Mon Jan 30, 2006 2:46 pm   Post subject:
Reply with quote

no problem.
_________________
http://www.faceh.com - faceh.com Webdesign
http://www.jetblag.com - Japan Blogs
http://www.oldsushi.com - Huge Japan community
http://oldsushi.com/blurb - Funny and interesting shit from Japan

Back to top

View user's profile Send private message Visit poster's website
faceh
Nucleus Expert


Joined: 20 Apr 2003
Posts: 404

Post Posted: Sun Feb 26, 2006 6:32 pm   Post subject:
Reply with quote

yer, so i've lost faith in the online plugin... i just dont think it works.
having checked my server logs for recent visitors, there were 4 new visitors to my site since the start of the new day (12:00am) - however the NP_online plugin displayed 0 visitors...

maybe something i have broken? anybody else having this problem?

_________________
http://www.faceh.com - faceh.com Webdesign
http://www.jetblag.com - Japan Blogs
http://www.oldsushi.com - Huge Japan community
http://oldsushi.com/blurb - Funny and interesting shit from Japan

Back to top

View user's profile Send private message Visit poster's website
0wn4g3
Nucleus Fan


Joined: 05 May 2006
Posts: 25

Post Posted: Tue May 16, 2006 11:26 pm   Post subject:
Reply with quote

Is there anyway for someone to run through the code and perhaps update it to reflect whats available to use now? Perhaps also clean up the code so it reflects Nucleus CMS3.22 a bit better than what it does now.

Back to top

View user's profile Send private message
kg
Nucleus PhD


Joined: 01 Jun 2005
Posts: 541
Location: Germany

Post Posted: Wed May 17, 2006 6:21 pm   Post subject: Version 1.6
Reply with quote

I have built a new version with the discussed changes of the code. You can find the version 1.6 in the wiki: NP_Online. I have also uploaded a zip file for an easier installation.

Now the further improvement and discussion can start. Smile

_________________
My plugins: Nucleus Plugins from kg
My Weblogs: kgblog.de | digi-foto-blog.de

Back to top

View user's profile Send private message Visit poster's website
Dunkelraum.de
Nucleus Disciple


Joined: 03 Mar 2006
Posts: 168
Location: Germany

Post Posted: Wed May 17, 2006 6:54 pm   Post subject:
Reply with quote

Nice would be the option <%allonline%> which would show the number of total users online, wheter they are regsitered members or guests.
_________________
Chris
Dunkelraum.de
Redenschreiber

Back to top

View user's profile Send private message Visit poster's website
0wn4g3
Nucleus Fan


Joined: 05 May 2006
Posts: 25

Post Posted: Wed May 17, 2006 8:17 pm   Post subject:
Reply with quote

Awesome glad to see that work and enhancement of this plugin is still taking place

Back to top

View user's profile Send private message
Post new topic Reply to topic
Display posts from previous:   

Goto page Previous  1, 2, 3, 4, 5  Next

Page 4 of 5

All times are GMT + 1 Hour

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2001, 2002 phpBB Group