Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1] 2   Go Down

Author Topic: Online stats that work?  (Read 31765 times)

0 Members and 1 Guest are viewing this topic.

turbozutek

  • Coppermine newbie
  • Offline Offline
  • Posts: 18
    • The System
Online stats that work?
« on: January 14, 2006, 12:51:42 pm »

Hello all!!

I've been reading this thread:

http://forum.coppermine-gallery.net/index.php?topic=5373.0

And there was some mention of this being released as a plugin. Now, I downloaded the 'plugin' which includes a folder called 'online' - I uploaded this to my plugin dir and set the permissions and... Nothing... CPG doesn't recognise it as a plugin.

Fine, I tried to 'upload' it using the plugin manager: again, doesn't work. No error except 'this is not a plugin'.

My question is this - is there a final, working version of this plugin available somewhere that doesn't involve reading 17 pages of thread, to end up with a non working plugin?

Many, many thanks!

Chris...
Logged

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: Online stats that work?
« Reply #1 on: January 14, 2006, 05:39:13 pm »

What, so you don't want to read 17 pages of a thread?  If you use the print option, it's pretty easy to scroll through one page of posts.

It's pretty selfish to post a new thread regarding an existing one just because it's difficult to read it.  What's next: anarchy?

I'm assuming an admin will merge this thread into the existing one, so I might as well give a simple response which might fix your problem.  I don't know this mod/plugin very well, but I do see that the configuration.php is missing from the plugin version.  Copy the sample plugin configuration.php into the online plugin folder and modify it as appropriate (giving Nibbler all due credit of course).  Then the plugin manager should be happy when you install.

Oh, and I realize that you think it would be useful to have a thread here in the plugin forum, but glancing through the existing thread I'm guessing this plugin is not ready for prime time and I'm sure Nibbler will add it here once it is.

Please don't take my comments as being belligerent.  I only mean to be factual in a critical way, with an added spice of cheekiness.
Logged

turbozutek

  • Coppermine newbie
  • Offline Offline
  • Posts: 18
    • The System
Re: Online stats that work?
« Reply #2 on: January 15, 2006, 04:01:47 pm »

I'll be frank, 17 pages of thread didn't appeal, however I did read them ALL from start to finish - and the end product did not work.

Now that the mod has graduated to becoming a plugin, posting here seemed logical.

I'll try your suggestions and see what happens, thanks!

Chris...
Logged

turbozutek

  • Coppermine newbie
  • Offline Offline
  • Posts: 18
    • The System
Re: Online stats that work?
« Reply #3 on: January 15, 2006, 04:39:54 pm »

Did that, also copying credits.php to configuration.php seems to have the same result.

Now it installs and shows up as an active plugin !! yay!!!

Next issue ?? Can't get it to display on the front page. I've tried putting 'plugin onlinestats', 'onlinestats' and 'online' and 'stats1' into the config for the front page, each to no avail, as suggested by the thread.

Hmmmm... I'll keep looking at it, but anyone any ideas?

Chris...

Logged

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: Online stats that work?
« Reply #4 on: January 15, 2006, 09:11:20 pm »

Well, it looks like this plugin is definitely not ready for prime time.  I'm guessing it was written for a previous version of the plugin system before the stable releases of 1.4.2 and 1.4.3; I mostly think this because there is no 'plugin_content' filter in the current core scripts.  I don't have time myself to read that other thread but since you did maybe you can give more information about that.

I modified the plugin to work as I thought it should but I don't know if this was the original intent (since I didn't read that other thread).  I'm sure Nibbler will weigh in sometime.  I'm not about to post the modified files without his OK; I'm sure he would post them here if he thought they were ready.

In codebase.php, modify this line:
Code: [Select]
$thisplugin->add_filter('plugin_content','online_mainpage');to be this:
Code: [Select]
$thisplugin->add_filter('plugin_block','online_mainpage');
Then modify this line:
Code: [Select]
function online_mainpage()to be this:
Code: [Select]
function online_mainpage($matches)
Then just below this line in the function online_mainpage:
Code: [Select]
global $CONFIG, $cpg_udb, $comment_date_fmt ;add this line:
Code: [Select]
if($matches[1] != 'onlinestats') { return $matches; }
Then put 'onlinestats' in your config option for the "content of the main page" wherever you want it.

I think that should do it.  I haven't tested out this plugin thoroughly since I don't plan to use it anytime soon.  (Although I probably will in the future; I just don't have the traffic now to warrant it.)
Logged

turbozutek

  • Coppermine newbie
  • Offline Offline
  • Posts: 18
    • The System
Re: Online stats that work?
« Reply #5 on: January 16, 2006, 12:40:41 am »

Now that WORKS reallll well!!

Thank you very much! :-D

Chris...
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Online stats that work?
« Reply #6 on: January 16, 2006, 07:47:31 am »

what plugin are you refering to? Please post a link.
Logged

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: Online stats that work?
« Reply #7 on: January 16, 2006, 02:04:13 pm »

The one I modified was on page 8 of the thread linked above:
http://forum.coppermine-gallery.net/index.php?topic=5373.msg61641#msg61641.

As I said, I am not able to test if out fully to see if it works completely.  If someone else does this and says 'yes', we can post the modified version here as a working plugin.  It's Nibbler's of course.  I assumed it would have been discussed and modified in the next 9 pages, but maybe not.  I just don't know.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Online stats that work?
« Reply #8 on: January 16, 2006, 02:39:27 pm »

I started a separate thread for the online plugin version for cpg1.4.x (which is still experimental, your feedback would be appreciated).
Please post stuff related to the plugin version there, but make sure to read the existing replies to this thread as well.
Logged

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: Online stats that work?
« Reply #9 on: January 16, 2006, 03:26:41 pm »

The one you posted doesn't work for the current version 1.4.3 as I mentioned above.  It won't install and it has the wrong plugin filter.  Ideally you should make the 4 changes I listed above, summarized here:
  • Rename credits.php to configuration.php
  • Change the filter name 'plugin_content' to 'plugin_block'
  • Add the parameter $matches to the function online_mainpage
  • Add the line "if($matches[1] != 'onlinestats') { return $matches; }" to the beginning of online_mainpage
Logged

Gary B

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 38
    • Hagerty High School
Re: Online stats that work?
« Reply #10 on: January 16, 2006, 04:08:55 pm »

Ok I have the plugin installed and it asked me how many minutes to leave the user showing...which seems to mean it is installed and working.

Now HOW do I add the online stats to the footer of my gallery?

www.themeparks.com/library
Logged

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: Online stats that work?
« Reply #11 on: January 16, 2006, 04:40:54 pm »

Did you read this message above?  http://forum.coppermine-gallery.net/index.php?topic=26447.msg122096#msg122096

You need to make the changes I listed to codebase.php, then the plugin is ready to use.  To use it, go to your config page under themes settings, then "content of the main page".  Put the text 'onlinestats' somewhere in that string, wherever you want the stats to appear.  If you want it near the bottom, put it at the end.
Logged

Gary B

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 38
    • Hagerty High School
Re: Online stats that work?
« Reply #12 on: January 16, 2006, 05:32:21 pm »

To use it, go to your config page under themes settings, then "content of the main page".  Put the text 'onlinestats' somewhere in that string, wherever you want the stats to appear.  If you want it near the bottom, put it at the end.

This is the part I don't understand...I did make all the changes and it appears to install ok....but when I go to the config page under themes I see

Custom menu link name
Custom menu link URL
Path to custom header include
Path to custom footer include

None of which seem to be what you are talking about...I must be in the wrong place. Could you pont me in the right direction?

Thank you VERY much.

Most Appreciated
Gary
Logged

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: Online stats that work?
« Reply #13 on: January 16, 2006, 05:36:25 pm »

Oops, I meant 'Album List View' for the config section.  In this section, set the setting 'Content of the main page'.
Logged

turbozutek

  • Coppermine newbie
  • Offline Offline
  • Posts: 18
    • The System
Re: Online stats that work?
« Reply #14 on: January 16, 2006, 09:37:48 pm »

Well, I can confirm it's worked like a good 'un for the last few days now!

You can have a look over here:

www.turbozutek.f2s.com

:-)

Chris...
Logged

Gary B

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 38
    • Hagerty High School
Re: Online stats that work?
« Reply #15 on: January 16, 2006, 10:30:41 pm »

Well I did figure out where to add the stuff in the config page...but then when I tried it I got a

Critical Error:
There was an error while processing a database query

So I took the /onlinestats back out of that field so my photo albums would work again.
Logged

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: Online stats that work?
« Reply #16 on: January 16, 2006, 10:39:28 pm »

Weird.  How about some more information?  Does it tell you which query gave the error?  If not, please post the queries section of the debug info (only - keep it simple for now and don't post the whole debug info).
Logged

Gary B

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 38
    • Hagerty High School
Re: Online stats that work?
« Reply #17 on: January 16, 2006, 10:47:45 pm »

Here is some debug info....is this what you needed?


While executing query "SELECT COUNT(*) FROM `parkho2_xmb1`.phpbb_users" on 0

mySQL error:

File: /home/parkho2/public_html/library/include/functions.inc.php - Line: 248
Logged

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: Online stats that work?
« Reply #18 on: January 16, 2006, 11:02:39 pm »

Maybe.  So it has to do with your bridge.  I'm not bridged so I don't know too much more.  Looking at the plugin's code and the bridge code, I don't see anything glaring that's wrong.

That query is pretty simple to give an error.  Is your database named 'parkho2_xmb1' and your phpBB users table named 'phpbb_users'?  If one of those is wrong, then there's the problem and we need to figure out where the error is.  If neither is wrong, I don't know what to say.  It's a simple "count the number of users" query.
Logged

Gary B

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 38
    • Hagerty High School
Re: Online stats that work?
« Reply #19 on: January 16, 2006, 11:13:44 pm »

Yes both those names are correct and while looking in the database I see I do have a table with valid data called: cpg_mod_online so it is polling data ....


Hmmmm just noticed I have a karma score of -2....wonder who I ticked off. Sorry if I did.
« Last Edit: January 16, 2006, 11:19:08 pm by Gary B »
Logged
Pages: [1] 2   Go Up
 

Page created in 0.032 seconds with 20 queries.