Author Topic: .  (Read 202118 times)

0 Members and 2 Guests are viewing this topic.

Offline AntiNSA2

  • Hero Member
  • *****
  • Posts: 774
  • As long as I can finish my site before I die.
    • View Profile
    • http://www.thelifephotography.com
Re: [Mod] Letze aktive User / Last active users
« Reply #135 on: March 30, 2009, 09:45:49 AM »
Greetings, hello and hi!

Two Things I can not find in this mod thread but am trying to do are:

1) Ad user flag (flag for location)
2) allow guests TO be seen

Anyone know?

With Great Thanks-
Robert
As long as I can finish my site before I die.

Offline Jasi

  • Jr. Member
  • **
  • Posts: 74
    • View Profile
Re: [Mod] Letze aktive User / Last active users
« Reply #136 on: April 03, 2009, 01:11:44 PM »
Hallo,
wie bewirke ich denn, das mir z.b. 20 User, in 4 Spalten (nebeneinander) somit 5 User untereinander angezeigt werden??

Quote
//-----------------------------------------------------
//--- Last active User --------------------------------
//-----------------------------------------------------
$last_action_user_list = "";
$sql = "SELECT user_name, user_id, user_lastaction FROM ".USERS_TABLE."
                 WHERE user_level >= '".GUEST."'
                    ORDER BY user_lastaction DESC
                 LIMIT 20";
    $result = $site_db->query($sql);

  while ($row = $site_db->fetch_array($result)) {
   if(date("dmy", $row['user_lastaction']) == date("dmy")) {
  $last_user_date = $lang['lang_user_last_today']." ".format_date($config['time_format'], $row['user_lastaction']); 
  }else {
  $last_user_date = format_date($config['date_format']." ".$config['time_format'], $row['user_lastaction']);
  }   
  $last_action_user_list .= "<a href =\"".$site_sess->url(ROOT_PATH."member.php?action=showprofile&user_id=".$row['user_id'])."\"><b>".$row['user_name']."</b></a><br><span class=\"smalltext\">".$last_user_date."</span><br>";
   }

Also etwas so:
User 1 xx.xx.xxx     User 2 xx.xx.xx   User 3 xx.xx.xx   User 4 xx.xx.xx
User 5 xx.xx.xxx     User 6 xx.xx.xx   User 7 xx.xx.xx   User 8 xx.xx.xx
User 9 xx.xx.xxx     User10 xx.xx.xx   User11 xx.xx.xx   User12 xx.xx.xx
User13 xx.xx.xxx    User14 xx.xx.xx   User15 xx.xx.xx   User16 xx.xx.xx
User 17 xx.xx.xxx    User18 xx.xx.xx  User19 xx.xx.xx   User20 xx.xx.xx

LG



@ honda2000

@ ALL

Öffne die Datei includes/page_header.php und suche folgenen Codeabschnitt:

Code: [Select]
//-----------------------------------------------------
//--- Last active User --------------------------------
//-----------------------------------------------------
$last_action_user_list = "";
$sql = "SELECT user_name, user_id, user_lastaction FROM ".USERS_TABLE."
                 WHERE user_level >= '".GUEST."'
                    ORDER BY user_lastaction DESC
                 LIMIT 5";
    $result = $site_db->query($sql);

    while ($row = $site_db->fetch_array($result)) {
    $last_action_user_list .= "<a href =\"".$site_sess->url(ROOT_PATH."member.php?action=showprofile&user_id=".$row['user_id'])."\"><b>".$row['user_name']."</b></a><br ><span class=\"smalltext\">".format_date($config['date_format']." ".$config['time_format'], $row['user_lastaction'])."</span><br >";
    }

$site_template->register_vars(array(
  "lang_user_last_action" => $lang['lang_user_last_action'],   
  "user_last_action_list" => $last_action_user_list
));
$site_template->register_vars("user_last_action_box", $site_template->parse_template("user_last_action_box"));
  unset($user_last_action_box);
  unset($last_action_user_list);

Suche dort:
while ($row = $site_db->fetch_array($result)) {

1. Füge darüber folgendes ein:

Code: [Select]
//Anzahl Spalten der Tabelle
$SPALTEN = 2;
$num=0;
$last_action_user_list .= "<table width=\"100%\" align=\"center\" cellspacing=\"12\" border=\"0\">\n  </tr>\n";
// Ende Anzahl Spalten der Tabelle

2. Suche danach weiter nach:
$last_user_date = format_date($config['date_format']." ".$config['time_format'], $row['user_lastaction']);
  } 


Füge danach (darunter) folgendes ein: (...nach der geschweiften Klammer } ...)

Code: [Select]
if ($num % $SPALTEN == 0)// Neue Zeile beginnen
                $last_action_user_list .=  "</tr>\n </tr>\n";


3. Suche danach weiter nach:

Code: [Select]
$last_action_user_list .= "<a href =\"".$site_sess->url(ROOT_PATH."member.php?action=showprofile&user_id=".$row['user_id'])."\"><b>".$row['user_name']."</b></a><br ><span class=\"smalltext\">".format_date($config['date_format']." ".$config['time_format'], $row['user_lastaction'])."</span><br >";


Füge danach (darunter)  folgendes ein: => noch vor }

Code: [Select]
$num++;

Füge folgendes direkt nach/unter } ein:

Code: [Select]
$last_action_user_list .= "</TR>\n ";
$last_action_user_list .= "</table>";

Unter $SPALTEN = 2;
kannst du nun festlegen/einstellen wie viele Spalten in einer (1) Reihe angezeigt werden sollen. Wenn du z.B. 3 oder 4 Spalten in einer Reihe nebeneinander haben möchtest, so änder den Wert 2 dementsprechend z.B. auf $SPALTEN = 3; ab.

Eine abgeänderte Variante mit 2 Spalten nebeneinander und 2 Reihen untereinander als Vorschau der letzen 4 angemeldeten User mit einigen eigenen Zusätzen findest du hier unter den letzten 3 neuen Bilder:

http://www.modkon-germany.de/modelgalerie/index.php

LG euer Jasi

« Last Edit: April 03, 2009, 01:30:38 PM by Jasi »
LG Jasi

Offline 4ella

  • Jr. Member
  • **
  • Posts: 90
    • View Profile
    • http://www.dancersrecruit.com/pictures/
Re: [Mod] Letze aktive User / Last active users
« Reply #137 on: May 03, 2009, 01:58:22 AM »
Hello i was searching all the forum and didn't find how to put country flag(I.P)into this Mod , I have installed this : http://www.4homepages.de/forum/index.php?topic=7831.0  , I saw on some sites that somebody has it also in last active user MOD  and have found some people here asking the same but no respond :(
pls help me to implement it too.

This is my page_header.php , where can I put it? , as I said i have just flags in the root , all Mods concerning flags working....
Thanks Daniel

Quote
//-----------------------------------------------------
//--- Last active User --------------------------------
//-----------------------------------------------------
$last_action_user_list = "";
$sql = "SELECT user_name, user_id, user_lastaction FROM ".USERS_TABLE."
                WHERE user_level >= '".GUEST."'
                   ORDER BY user_lastaction DESC
                LIMIT 10";
    $result = $site_db->query($sql);

while ($row = $site_db->fetch_array($result)) {
    $max_length = 18; // hier max.Zeichen für Username eingeben
    $user_name_short = $row['user_name'];
         if (strlen($user_name_short) > $max_length) {
            $user_name_short = substr($row['user_name'], 0, $max_length)." ... ";
         }
   if(date("dmy", $row['user_lastaction']) == date("dmy")) {
  $last_user_date = $lang['lang_user_last_today']." ".format_date($config['time_format'], $row['user_lastaction']); 
  }else {
  $last_user_date = format_date($config['date_format']." ".$config['time_format'], $row['user_lastaction']);
  }
     
  $last_action_user_list .= "<a href =\"".$site_sess->url(ROOT_PATH."member.php?action=showprofile&user_id=".$row['user_id'])."\"><b>".$user_name_short."</b></a><br><span class=\"smalltext\">".$last_user_date."</span><br>";
   }

$site_template->register_vars(array(
  "lang_user_last_action" => $lang['lang_user_last_action'],   
  "user_last_action_list" => $last_action_user_list
));
$site_template->register_vars("user_last_action_box", $site_template->parse_template("user_last_action_box"));
  unset($user_last_action_box);
  unset($last_action_user_list);

?>

Would be also nice to show online people with small icon like here in the previous post of Jasi
http://www.modkon-germany.de/modelgalerie/index.php   by the way , compliments for your site ...

http://www.dancersrecruit.com/pictures/
4IMAGES 1.7.6 version/default theme
Apache version   2.2.11 (Unix)
PHP version   5.2.9
MySQL version   5.0.75-community-log
Architecture   x86_64
Operating system   Linux

Offline 4ella

  • Jr. Member
  • **
  • Posts: 90
    • View Profile
    • http://www.dancersrecruit.com/pictures/
Re: [Mod] Letze aktive User / Last active users
« Reply #138 on: May 08, 2009, 08:00:44 PM »
pls help me someone to get the country flag in last active users -:) , it would help me a lot because I need the visitors of my site to know that for e.g somebody from Italy was watching my site 2 hours ago , my site is international so I would use it a lot and I know that many of you just have it on your sites  , I'm sure that for most people here it's not a big problem to get the flag there, but for me it is :(

http://www.dancersrecruit.com/pictures/
4IMAGES 1.7.6 version/default theme
Apache version   2.2.11 (Unix)
PHP version   5.2.9
MySQL version   5.0.75-community-log
Architecture   x86_64
Operating system   Linux

Offline 4ella

  • Jr. Member
  • **
  • Posts: 90
    • View Profile
    • http://www.dancersrecruit.com/pictures/
Re: [Mod] Letze aktive User / Last active users
« Reply #139 on: May 16, 2009, 05:31:43 PM »
Hi can anybody tell me how can i eliminate border from the flags ? it works like a link , but its very ugly , I would like to use the link function of the flag together with user name and also let user name bold and underlined .


this is my page header script

Code: [Select]
//-----------------------------------------------------
//--- Last active User --------------------------------
//-----------------------------------------------------
$last_action_user_list = "";
$sql = "SELECT user_name, user_id, user_country, user_lastaction FROM ".USERS_TABLE."
                WHERE user_level >= '".GUEST."'
                   ORDER BY user_lastaction DESC
                LIMIT 15";
    $result = $site_db->query($sql);

while ($row = $site_db->fetch_array($result)) {
    $max_length = 18; // hier max.Zeichen für Username eingeben
    $user_name_short = $row['user_name'];
         if (strlen($user_name_short) > $max_length) {
            $user_name_short = substr($row['user_name'], 0, $max_length)." ... ";
         }
   if(date("dmy", $row['user_lastaction']) == date("dmy")) {
  $last_user_date = $lang['lang_user_last_today']." ".format_date($config['time_format'], $row['user_lastaction']); 
  }else {
  $last_user_date = format_date($config['date_format']." ".$config['time_format'], $row['user_lastaction']);
  }
     
  $last_action_user_list .= "<a href =\"".$site_sess->url(ROOT_PATH."member.php?action=showprofile&user_id=".$row['user_id'])."\"><img src=\"".TEMPLATE_PATH."/images/flags/".$row['user_country'].".gif\" alt=\"\"><b>".$user_name_short."</b></a><br><span class=\"smalltext\">".$last_user_date."</span><br>";
   }

$site_template->register_vars(array(
  "lang_user_last_action" => $lang['lang_user_last_action'],   
  "user_last_action_list" => $last_action_user_list
));
$site_template->register_vars("user_last_action_box", $site_template->parse_template("user_last_action_box"));
  unset($user_last_action_box);
  unset($last_action_user_list);
I would appreciate any help .

Quote
Hi can anybody tell me how can i eliminate border from the flags ? it works like a link , but its very ugly , I would like to use the link function of the flag together with user name and also let user name bold and underlined .

Sorry I figure it out - I 've put into the code    -  border=\"0\"
Now it works fine.
« Last Edit: May 16, 2009, 06:02:32 PM by 4ella »

http://www.dancersrecruit.com/pictures/
4IMAGES 1.7.6 version/default theme
Apache version   2.2.11 (Unix)
PHP version   5.2.9
MySQL version   5.0.75-community-log
Architecture   x86_64
Operating system   Linux

Offline Nicky

  • Administrator
  • 4images Guru
  • *****
  • Posts: 3.195
    • View Profile
Re: [Mod] Letze aktive User / Last active users
« Reply #140 on: May 16, 2009, 05:53:09 PM »
hi,

hope this is okay for you
Code: [Select]
<img src=\"".TEMPLATE_PATH."/images/flags/".$row['user_country'].".gif\" alt=\"\" border=\"0\">
cheers
Nicky
Your first three "must do" before you ask a question ! (© by V@no)
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

nicky.net 4 4images
Signature stolen from mawenzi

Offline 4ella

  • Jr. Member
  • **
  • Posts: 90
    • View Profile
    • http://www.dancersrecruit.com/pictures/
Re: [Mod] Letze aktive User / Last active users
« Reply #141 on: May 16, 2009, 06:08:10 PM »
Yes exactly it works like that , I ve figure it out 1 minute ago , thanks a lot Nicky , I didn't know how to put border-0 in PHP , i only knew that  in html and its different so I have found it in page header above - Thanks a lot anyway for very quick respond, Daniel

http://www.dancersrecruit.com/pictures/
4IMAGES 1.7.6 version/default theme
Apache version   2.2.11 (Unix)
PHP version   5.2.9
MySQL version   5.0.75-community-log
Architecture   x86_64
Operating system   Linux

Offline Jan-Lukas

  • Addicted member
  • ******
  • Posts: 1.289
    • View Profile
    • Discover the New World of Kindersurprise
Re: [Mod] Letze aktive User / Last active users
« Reply #142 on: December 26, 2011, 10:47:31 PM »
Original Code funktioniert in der 1.7.10
weitere Funktionen nicht getestet
Danke Harald




Offline crs

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
Re: [Mod] Letze aktive User / Last active users
« Reply #143 on: January 16, 2012, 11:38:59 PM »
N'abend!

Ich hätte eine Bitte, weil ich es nicht hinbekomme... :-/

Ich möchte die Namen der einzelnen User nebeneinander ohne Uhrzeit/Datum anzeigen lassen - die Schrift sollte nicht fett oder sonstiges sein, also unformatiert.
Genial wäre das ganze mit Länderflagge und Abstand zwischen den einzelnen Usern.

Ist das möglich?
Wäre großartig!
Danke!

///

I have one request, because I do not get it ... : - /

I would like to display the name of each user next to each other without time / date.
Would be awesome with all the countries flag and distance between the individual users.

Is that possible?
Would be great!
Thank you!