forum.coppermine-gallery.net

Support => cpg1.4 plugins => cpg1.4.x Support => Older/other versions => cpg1.4 plugin contributions => Topic started by: just_some_guy on October 18, 2007, 10:32:30 am

Title: New Registered Users Today
Post by: just_some_guy on October 18, 2007, 10:32:30 am
New Registered Users Today
DEMO (http://www.mysimtractor.com)

CPG 1.4x

This plugin creates a box of all the users that registered to your gallery in the past 24 hours. The box shows the number of users that registered in the past 24 hours as well as thier usernames which link to thier user profile. It is a very simple and useful plugin and this is my first plugin.


Install-

How It's Done


CHANGELOG


      -   Added the option of displaying the user name as a link or not. (as suggested by Hein)
      -   Fixed some minor coding issues. (Thanks Sami)
      -   Added multi lingual support (thanks Sami and Frantz for the help as well as the all the other plugin authors whose plugins i read through to
          understand how to implement this system.) (see note at bottom of post)
      - Added French lang file.
      - Fixed Bug.
      - Added German lang file.
      - Added Dutch lang file.
      - Added Italian lang file.


Languages

- English
- Spanish
- French (thanks Frantz )
- German (thanks Farnsi )
- Dutch (thanks Hein )
- Italian (thanks Lontano )
- Translations welcome!

Note: The Language system should work in theroy, it works for me...but i have had trouble getting the translated text to apppear when a different language is selected. I think this problem is due to my browse/cookie settings. If someone could check this issue on thier site that would be great.

Hope you like it

just_some_guy

Title: Re: New Registered Users Today
Post by: Hein Traag on October 18, 2007, 10:38:34 am
Might want to build in a option to show the new usernames without the profile link. In case people want privacy etc..
Title: Re: New Registered Users Today
Post by: just_some_guy on October 18, 2007, 10:59:16 am
Good suggestion Hein, i edited my original post and added that feature.

Thanks,
Title: Re: New Registered Users Today
Post by: Sami on October 18, 2007, 11:18:22 am
good work just_some_guy

Just a tip :
you're using hard coded table prefix on codebase.php
this
Code: [Select]
$result = mysql_query("SELECT * FROM cpg1411_users WHERE DATE_SUB(CURDATE(),INTERVAL 1 DAY) <= user_regdate");
should be
Code: [Select]
$result = mysql_query("SELECT * FROM {$CONFIG['TABLE_PREFIX']}_users WHERE DATE_SUB(CURDATE(),INTERVAL 1 DAY) <= user_regdate");

Again good work for your first plugin
Welcome to Contributor group :)
Title: Re: New Registered Users Today
Post by: just_some_guy on October 18, 2007, 11:23:21 am
Thanks Sami, I ment to change that before i posted this plugin, i will change my first post attachment accordingly.

Thanks,
Title: Re: New Registered Users Today
Post by: François Keller on October 18, 2007, 01:26:30 pm
Quote
For The Future

    * I hope to possibly add some lang file
have a look into others plugins who have multilanguage possibility to see haw to do this
Title: Re: New Registered Users Today
Post by: just_some_guy on October 18, 2007, 01:38:54 pm
Ok, i will have a read through others codebase's. This is a feature i really want to add.

Thanks,
Title: Re: New Registered Users Today
Post by: François Keller on October 18, 2007, 01:49:54 pm
it's not difficult to do.
Title: Re: New Registered Users Today
Post by: just_some_guy on October 18, 2007, 02:55:15 pm
i am still finding this impossible i started a thread here for help: http://forum.coppermine-gallery.net/index.php?topic=47669.0 (http://forum.coppermine-gallery.net/index.php?topic=47669.0)

Thanks, your help would be appreciated.
Title: Re: New Registered Users Today
Post by: just_some_guy on October 18, 2007, 05:30:16 pm
Version 2: Multi Lingual support: see first post.
Title: Re: New Registered Users Today
Post by: François Keller on October 18, 2007, 06:12:47 pm
french lang file attached.

btw, you must repack the plugin and rename the folder who contain the plugin files: the name muts be newusers and not newusersv2 if will not have an error message after installing the plugin
Title: Re: New Registered Users Today
Post by: just_some_guy on October 18, 2007, 06:23:31 pm
Thanks Frantz!

Added the lang file and renamed the folder inside the zip.
As you can probebly tell...im new to this sort of thing.
Title: Re: New Registered Users Today
Post by: Farnsi on October 18, 2007, 06:28:42 pm
Thanks for this plugin. I attached the german translation.  :)
Title: Re: New Registered Users Today
Post by: François Keller on October 18, 2007, 06:31:57 pm
Quote
As you can probebly tell...im new to this sort of thing.
not a problem  ;) i make mistakes too  ;)
Title: Re: New Registered Users Today
Post by: just_some_guy on October 18, 2007, 06:38:14 pm
Ok, Thanks Farnsi. I have added your translation to the download.
Title: Re: New Registered Users Today
Post by: Hein Traag on October 19, 2007, 07:45:22 am
No zip option here so just rename the file to dutch.php  ;)
Nice work!
Title: Re: New Registered Users Today
Post by: just_some_guy on October 19, 2007, 09:41:22 am
Thanks Hein, i added your translation on the first post.
Title: Re: New Registered Users Today
Post by: Davide Renda on October 19, 2007, 10:24:37 am
Here comes the Italian translation, just unzip inside /land directory as usual to have it working.
Thanks!
Title: Re: New Registered Users Today
Post by: just_some_guy on October 19, 2007, 11:41:25 am
Thanks Lontano, i added your translation on the first post.
Title: Re: New Registered Users Today
Post by: ch33p0x on May 12, 2009, 04:26:56 pm
i installed this plugin. cant see where the users today is... i created a test user to check this out. no luck
Title: Re: New Registered Users Today
Post by: Joachim Müller on May 13, 2009, 12:39:04 pm
We're out of crystal balls. Please do as suggested per board rules: http://forum.coppermine-gallery.net/index.php/topic,55415.msg270616.html#msg270616