Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Plugin: Login info  (Read 33518 times)

0 Members and 1 Guest are viewing this topic.

m@rk

  • Contributor
  • Coppermine novice
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 39
Plugin: Login info
« on: December 26, 2006, 03:23:19 pm »

I will attach my plugin here soon  ;)
« Last Edit: December 26, 2006, 10:58:11 pm by GauGau »
Logged

m@rk

  • Contributor
  • Coppermine novice
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 39
Plugin: Login info
« Reply #1 on: December 26, 2006, 03:40:05 pm »

I wrote a simple plugin:

Login info adds an info line, if you are logged in or not, below the menu on your Coppermine Photo Gallery.
In Admin Mode, an additional link to the Plugin Manager is displayed.
« Last Edit: December 28, 2006, 06:19:52 am by m@rk »
Logged

m@rk

  • Contributor
  • Coppermine novice
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 39
Plugin: Login info // Languages
« Reply #2 on: December 26, 2006, 03:48:40 pm »

P.S.: Available languages so far: English, German

Sorry for multiple postings, I don't seem to be allowed to edit my previous posts here?
Logged

m@rk

  • Contributor
  • Coppermine novice
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 39
How to display user_lastvisit !?
« Reply #3 on: December 26, 2006, 04:54:07 pm »

Additionally, I'd like to display user_lastvisit, but I can't solve it...
Why doesn't this make any result?:

Code: [Select]
global $CONFIG, $REFERER;

$since= $lang_plugin_login_info['since'] . " ";

$result = cpg_db_query( "SELECT user_lastvisit FROM {$CONFIG['TABLE_USERS']} WHERE user_id = '{USER_ID}' ");

// why doesn't this make any result ???
while ($row = mysql_fetch_array($result)) {
   $tmp= substr($row['user_lastvisit'],11,5);
   $since .= "{$tmp}";
}

Is there a simple way to display user_lastvisit?
« Last Edit: December 28, 2006, 06:20:16 am by m@rk »
Logged

Nibbler

  • Guest
Re: Plugin: Login info
« Reply #4 on: December 26, 2006, 11:16:06 pm »

Code: [Select]
$result = cpg_db_query( "SELECT user_lastvisit FROM {$CONFIG['TABLE_USERS']} WHERE user_id = " . USER_ID);
Logged

m@rk

  • Contributor
  • Coppermine novice
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 39
Re: Plugin: Login info
« Reply #5 on: December 27, 2006, 02:33:27 am »

Thank you Nibbler !  ::)

So here is v1.3.

Summary:

Login info adds an info line below the menu on your Coppermine Photo Gallery, if you are logged in or not, and time of login.
In Admin Mode, additional links (manage plugins, view logs, check versions, display phpinfo) are displayed.

Available languages so far: English, German
Logged

François Keller

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 9094
  • aka Frantz
    • Ma galerie
Re: Plugin: Login info
« Reply #6 on: December 27, 2006, 09:52:21 am »

Hey M@rk,

Good work
Attached login_info_1_3_1.zip with french.php lang file and a little modif in lang files to display properly in french the négative you are not (vous n'êtes pas) words.
I've modified the codebase.php for this.
Logged
Avez vous lu la DOC ? la FAQ ? et cherché sur le forum avant de poster ?
Did you read the DOC ? the FAQ ? and search the board before posting ?
Mon Blog

Hardstyle-boy

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 39
Re: Plugin: Login info
« Reply #7 on: May 05, 2009, 04:42:42 pm »

hello
i have a problem,

sry for my english it is very bad

i have attach a screenshot

what do I need to change, I see the text so as to screenshot
   
the text below and not the middle of it

   
thanks in advance
Logged
Pages: [1]   Go Up
 

Page created in 0.02 seconds with 19 queries.