close× Call Us +49 (1805) 01 29 59

SGI Fusion
Thread Author: Distorsn
Thread ID: 4371
Thread Info
Es gibt 3 Beiträge zu diesem Thema, und es wurde 6229 mal angesehen.  Es gibt auch Dateianhänge.
Wer ist hier? 1 Gäste
 Thema drucken
User Online / Offline
Distorsn
Hallo gibt es ein Userfeld das Anzeigt ob der User Online oder offline ist, kann irgend wie nichts genaues finden. Bin euch sehr Dankbar Wink
 
SC-Ad-Bot
 
Septron
Hallo,

ja dies gibt es hier mal eine Anleitung dazu aber als Anhang werde ich es auch noch rein setzen:

als erstes erstellen wir uns eine user_onoff_include.php


<?php
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright © 2002 - 2009 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: user_onoff_include.php
| Author: Smokeman
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
if (!defined("IN_FUSION")) { die("Access Denied"); }

$lseen = time() - $user_data['user_lastvisit'];

if ($profile_method == "display") {
   //if ($user_data['user_onoff']) {
      echo "<tr>\n";
      echo "<td width='104' class='tbl1' style='white-space:nowrap'>".$locale['uf_onoff']."</td>\n";
   if($lseen < 60) {
      echo "<td align='right' class='tbl1'>".$locale['uf_onoff_001']."</td>\n";
   } else {
      echo "<td align='right' class='tbl1'>".$locale['uf_onoff_002']."</td>\n";
   }
      echo "</tr>\n";
   //}
}
?>


dann erstellen wir uns eine user_onoff_include_var.php

<?php
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright © 2002 - 2009 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: user_onoff_include_var.php
| Author: Smokeman
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
if (!defined("IN_FUSION")) { die("Access Denied"); }

// Version of the user fields api
$user_field_api_version = "1.01.00";

$user_field_name = $locale['uf_onoff'];
$user_field_desc = $locale['uf_onoff_desc'];
$user_field_dbname = "user_onoff";
$user_field_group = 1;
$user_field_dbinfo = "VARCHAR(50) NOT NULL DEFAULT ''";
?>


hinzu kommen noch die locale fangen wir mit der German user_onoff.php:

<?php
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright © 2002 - 2009 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: user_onoff.php
| Author: Smokeman
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
$locale['uf_onoff'] = "Online/Offline Status:";
$locale['uf_onoff_desc'] = "Online/Offline status";
$locale['uf_onoff_001'] = "<img src='".IMAGES."online.png' alt='Online' border='0' />";
$locale['uf_onoff_002'] = "<img src='".IMAGES."offline.png' alt='Offline' border='0' />";
?>


dann erstellen wir uns die Englische user_onoff:

<?php
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright © 2002 - 2009 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: user_onoff.php
| Author: Smokeman
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
$locale['uf_onoff'] = "Status:";
$locale['uf_onoff_desc'] = "On/Offline status";
$locale['uf_onoff_001'] = "<img src='".IMAGES."online_stat.gif' alt='Online' border='0' />";
$locale['uf_onoff_002'] = "<img src='".IMAGES."offline_stat.gif' alt='Offline' border='0' />";
?>


dann kommen wir zu den Grafiken:
www.septron.de/images/online.png www.septron.de/images/offline.png www.septron.de/images/online_stat.gif www.septron.de/images/offline_stat.gif www.septron.de/images/online2.gif www.septron.de/images/offline2.gif

hochgeladen wird es wie folgt:

- online.png
- offline.png
- online2.gif
- offline2.gif
- online_stat.gif
- offline_stat.gif
sind im folgenden Ordner hoch zu laden: /root/images/

- user_onoff_include.php
- user_onoff_include_var.php
sind im folgenden Ordner hoch zu laden: /root/includes/user_fields

- user_onoff.php
sind im folgenden Ordner hoch zu laden: /root/locale/German/user_fields

- user_onoff.php
sind im folgenden Ordner hoch zu laden: /root/locale/English/user_fields

das ganze schaut dann so aus:
- images
-- online.png
-- offline.png
-- online2.gif
-- offline2.gif
-- online_stat.gif
-- offline_stat.gif
- includes
-- user_fields
--- user_onoff_include.php
--- user_onoff_include_var.php
- locale
-- German
--- user_fields
---- user_onoff.php
-- English
--- user_fields
---- user_onoff.php


die Online/Offline Bilder werden in der localen definiert (English(German)/user_fields)

viel Spaß

lg Septron
Septron hat folgende Datei angehängt:

user_field_onoff.rar [23.42kB / 597 mal Heruntergeladen]


Downloaded by:

Septron (1)


Bearbeitet von Septron am 16.02.2017 00000002 19:04
www.septron.de/signaturen/septron_1.png
 
Distorsn
Vielen Danke
 
Springe ins Forum:

 Ähnliche Themen 

TEST
Thema Forum Antworten Letzter Beitrag
PHP Fusion 7 User Photogallery Allgemeine Support Fragen 3 26.04.2019 00000004 06:50
Unable to establish connection to MySQL 1045 : Access denied for user 'www-data'@'localh PHP & MySql 13 18.08.2016 00000008 15:00
User News/Blog Infusionen 2 03.04.2016 00000004 15:33
PN bei User-Transfer (Scoresystem) Infusionen 18 06.01.2016 00000001 05:06
User Status Allgemeine Support Fragen 2 21.09.2015 00000009 09:27
PHPFusion DE NSS