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]   Go Down

Author Topic: LOGIN Form [Plugin CPG1.4.x]  (Read 9245 times)

0 Members and 1 Guest are viewing this topic.

Pascal YAP

  • Moderator
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 13833
  • Hello World :-)
    • CPG 1.5.x ExperiMental website
LOGIN Form [Plugin CPG1.4.x]
« on: August 21, 2006, 09:43:13 am »

Bonjour,

Voici un Plugin pour Coppermine 1.4.x qui ajoute un petit formulaire de connexion "normalisé".
Présenté ci-dessous (Username et Password sont déjà traduit dans le code)

La Démo n'est plus en fonction en fonction ici (PYAP Galerie)

(https://forum.coppermine-gallery.net/index.php?action=dlattach;topic=33349.0;attach=4325;image)

Copiez le code ci-dessous et nommez-le codebase.php :
Code: [Select]
<?php
/**************************************************
  CPG Photo Shop Plugin for Coppermine Photo Gallery
  *************************************************
  Copyright (c) 2006 Thomas Lange <stramm@gmx.net>
  *************************************************
  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or
  (at your option) any later version.
  *************************************************
  Coppermine version: 1.4.5
  Photo Shop version: 1.0
  $Revision: 1.0 $
  $Author: stramm $
***************************************************/
if (!defined('IN_COPPERMINE')) die('Not in Coppermine...');

 
$thisplugin->add_action('page_start','loginform_start');

 
function 
loginform_start()
{
    global 
$template_sub_menu;
    
$template_sub_menu .= plugin_loginform();
}

function 
plugin_loginform() {
global $CONFIG$REFERER;
if (!USER_ID) {
  
$loginFormHtml = <<<EOT
<span style="float:right">
<ins>
     <form action="login.php?referer=
$REFERER" method="post" name="loginbox" style="margin:0; padding:0;">
        <table cellpadding="0" cellspacing="3" border="0">
        <tr>
            <td><input type="text" class="textinput" name="username" size="10" /></td>
            <td><input type="password" class="textinput" name="password" size="10" /></td>
            <td><input name="submitted" type="submit" value="Login" />
            <input name="remember_me" type="hidden" class="checkbox" value="1" checked="checked" /></td>
        </tr>
        <tr>
        <td class="smallfont">Utilisateur</td>
        <td class="smallfont">Mot de Passe</td>
        <td></td>
</tr>
        </table>
        </form>
</ins>
</span>
EOT;
} else {
$loginFormHtml "<div align=\"right\" class=\"smallfont\">Welcome back <strong>".(USER_NAME)."</strong><br />";
}
  return 
$loginFormHtml;
}
?>

Copiez le code ci-dessous et nommez-le configuration.php :
Code: [Select]
<?php
/**************************************************
  CPG Loginform Plugin for Coppermine Photo Gallery
  *************************************************
  Copyright (c) 2006 Thomas Lange <stramm@gmx.net>
  *************************************************
  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or
  (at your option) any later version.
  *************************************************
  Coppermine version: 1.4.8
  Loginform version: 1.0
  $Revision: 1.0 $
  $Author: stramm $
***************************************************/

$name='Loginform';
$description='Loginform adds a loginform below the menu on your Coppermine Photo Gallery.';
$author='Stramm stramm@gmx.net <a href="http://stramm.st.funpic.org" target="_blank">stramm.st.funpic.org</a>';
$version='1.0';
?>

Copiez ces deux fichiers vers un nouveau sous-dossier de votre_cpg/plugin/loginform
Depuis votre page PluginManager (pluginmgr.php) validez et installez "LogiForm".

PYAP

Sujet original by Stramm.
« Last Edit: September 19, 2007, 04:40:05 pm by PYAP »
Logged

Pascal YAP

  • Moderator
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 13833
  • Hello World :-)
    • CPG 1.5.x ExperiMental website
Re: LOGIN Form [Plugin CPG1.4.x]
« Reply #1 on: January 09, 2007, 11:48:32 am »

Nouvelle version 1.1 (01-08-2007)

Il est possible de placer les boites de saisie où l'on veut.
Pour ce faire, éditez votre TEMPLATE.HTML et placez le tag {LOGIN_FORM} dans le code à l'emplacement adéquat.

Téléchager LOGINFORM v 1.1

PYAP
Logged
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 21 queries.