Author Topic: .  (Read 202154 times)

0 Members and 1 Guest are viewing this topic.

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: [Mod] Letze aktive User / Last active users
« Reply #105 on: June 26, 2006, 05:33:58 PM »
... und was soll genau in zwei spalten angezeigt werden ... ?
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 ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline Toso

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
    • Lachs & Leder
Re: [Mod] Letze aktive User / Last active users
« Reply #106 on: July 04, 2006, 02:48:03 PM »
Hey guys, how can i display the gender *.gif form my memberlist in my page_header.php

Quote
$last_action_user_list .= '<table border="0" width="100%" id="table1" bordercolor="#808080">
<tr><td width="36"><a href="'.ROOT_PATH.'member.php?action=showprofile&user_id='.$row['user_id'].'"><p align="center">
<img src="'.ROOT_PATH.'/data/userpic/'.((empty($userpic)) ? "member.jpg" : $row['userpic']).'" width="35" height="35" border="1" style="border: 1px solid #000066"></td><td><b>
<a href="'.ROOT_PATH.'member.php?action=showprofile&user_id='.$row['user_id'].'">'.$row['user_name'].'</a></b>
<img src=\"".TEMPLATE_PATH."/images/gender".htmlspecialchars($user_row['user_gender']).".gif\">
<br>'.$last_user_date.'</td></tr></table>

any new ideas?

Offline Zyga

  • Jr. Member
  • **
  • Posts: 87
    • View Profile
Re: [Mod] Letze aktive User / Last active users
« Reply #107 on: July 09, 2006, 05:42:39 PM »

your red line in my code looks like

Code: [Select]
<img src=\"".TEMPLATE_PATH."/images/gender".$row['user_sex'].".gif\" alt=\"\">
remember to add user_sex, to sql querry

it works for me

Offline Toso

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
    • Lachs & Leder
Re: [Mod] Letze aktive User / Last active users
« Reply #108 on: July 10, 2006, 04:47:25 PM »
Another question  :lol:

How to list the last five woman and the last five men separately?

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: [Mod] Letze aktive User / Last active users
« Reply #109 on: July 10, 2006, 05:13:02 PM »
@ Toso,

... make two lists ... in page_header.php ... for example ...
1. woman-list
Code: [Select]
$last_action_user_list_woman = "";
$sql = "SELECT user_name, user_id, user_gender, user_lastaction FROM ".USERS_TABLE."
        WHERE user_level >= '".GUEST."' AND user_gender == 'w'
        ORDER BY user_lastaction DESC
        LIMIT 5";
...
$last_action_user_list_woman = ...
...
unset($last_action_user_list_woman);

2. man-list
Code: [Select]
$last_action_user_list_man = "";
$sql = "SELECT user_name, user_id, user_gender, user_lastaction FROM ".USERS_TABLE."
        WHERE user_level >= '".GUEST."' AND user_gender == 'm'
        ORDER BY user_lastaction DESC
        LIMIT 5";
...
$last_action_user_list_man = ...
...
unset($last_action_user_list_man);

3. in user_last_action_box.html use for the two lists ..
Code: [Select]
{last_action_user_list_woman}
{last_action_user_list_man}



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 ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline Stoleti

  • Hero Member
  • *****
  • Posts: 574
    • View Profile
Re: [Mod] Letze aktive User / Last active users
« Reply #110 on: July 11, 2006, 02:20:20 AM »
i've installed one mod from here (country and gender at reg.) and i'm wondering about a option for sort by country ????

Offline Toso

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
    • Lachs & Leder
Re: [Mod] Letze aktive User / Last active users
« Reply #111 on: July 11, 2006, 11:15:04 PM »

your red line in my code looks like

Code: [Select]
<img src=\"".TEMPLATE_PATH."/images/gender".$row['user_sex'].".gif\" alt=\"\">
remember to add user_sex, to sql querry

it works for me

It works:

Quote
//-----------------------------------------------------
//--- Last active User --------------------------------
//-----------------------------------------------------
$sql = "SELECT user_name, user_id, user_lastaction, user_gender, userpic FROM ".USERS_TABLE."
                WHERE user_level > '".GUEST."' AND user_invisible = 0
                   ORDER BY user_lastaction DESC
                LIMIT 12";
   $result = $site_db->query($sql);
                $site_template->register_vars(array(
          ));
     $bgcounter = 1;
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']);
  }
      $row_bg_number = ($bgcounter++ % 2 == 0) ? 1 : 2;
      $last_action_user_list .= "<TR class=\"row".$row_bg_number."\"><TD><a href =\"".$site_sess->url(ROOT_PATH."member.php?action=showprofile&amp;user_id=".$row['user_id'])."\"><img src=\"".ROOT_PATH."/data/userpic/".((!empty($row['userpic'])) ? $row['userpic'] : "member.jpg")." \" name=\"icons\" border=\"1\" alt=\"\"  width=\"35\" height=\"40\"/></a></TD><TD><a href =\"".$site_sess->url(ROOT_PATH."member.php?action=showprofile&amp;user_id=".$row['user_id'])."\"><b>".$row['user_name']."</b></a>&nbsp;<img src=\"".TEMPLATE_PATH."/images/gender".$row['user_gender'].".gif\" alt=\"\"><br /><span class=\"smalltext\">".$last_user_date."</span><br /></TD></TR> ";
}
$user_last_action_box = $site_template->parse_template("user_last_action_box");
$site_template->register_vars(array(
  "user_last_action_box" => $user_last_action_box,
  "lang_user_last_action" => $lang['lang_user_last_action'],
  "user_last_action_list" => $last_action_user_list
));
  unset($user_last_action_box);
  unset($last_action_user_list);
?>

THX Zyga :mrgreen:

Offline chull

  • Jr. Member
  • **
  • Posts: 51
    • View Profile
Re: [Mod] Letze aktive User / Last active users
« Reply #112 on: August 10, 2006, 02:45:10 AM »
Hallo,

ich würde gerne das Userbild neben dem Namen einblenden. Habe den Thread schon gelesen und genau das auch gefunden, nur weicht der Code von dem den ich hab ziemlich ab. Was muss ich bei meinem Code verändern um das Bild anzeigen zu können.

Code: [Select]
//-----------------------------------------------------
//--- Last active User --------------------------------
//-----------------------------------------------------
$sql = "SELECT user_name, user_id, user_lastaction FROM ".USERS_TABLE."
                WHERE user_level >= '".GUEST."'".(($user_info['user_level'] == ADMIN) ? "" : " AND user_invisible = 0")." OR user_id = ".$user_info['user_id']."
                   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 >";
   }

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

Danke und Grüße

Chull

Offline IGC

  • Newbie
  • *
  • Posts: 29
  • http://www.theanimegallery.com
    • View Profile
    • theAnimeGallery.com
Re: [Mod] Letze aktive User / Last active users
« Reply #113 on: August 15, 2006, 01:11:43 AM »
I've followed the installation step by step, but I still can't get it to work...

It displays nothing on the table created for that purpose...

It's like is not recognizing the {lang_user_last_action} and {last_action_user_list} commands.

It puts the table in, with the appropriate class usage, but there is nothing inside the table...

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [Mod] Letze aktive User / Last active users
« Reply #114 on: August 17, 2006, 12:12:07 AM »
I've updated the original code, it should now be compatible with v1.7.1 and newer.
Redo step 1.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Fastian

  • Full Member
  • ***
  • Posts: 199
    • View Profile
Re: [Mod] Letze aktive User / Last active users
« Reply #115 on: September 03, 2006, 02:50:57 PM »
I just installed the mod
"[MOD] Treat bots as users with less rights

So now all the time Ii am seeing Bots in my "Active Member list"
Is there a way to exclude these searchbots from the list ??

Perhaps by restricting the user group from appearing in the "Last Active Users" list ??
I m not a  Programmer.
          But
I m a Good Learner.

Offline Fastian

  • Full Member
  • ***
  • Posts: 199
    • View Profile
Re: [Mod] Letze aktive User / Last active users
« Reply #116 on: October 24, 2006, 04:36:27 PM »
Some of the things in this thread are not in English so I might have missed it.

The default "Last Active user list" is in a vertical way. Like
User 1
date 1
User 2
date 2
....

How can I change it to be show horizontally with max. 4 users in one row like
User 1     User 2       User 3      user 4
date 1     date 2      date 3      date 5

User 5
Date 5

I know the question seems stupid but I can’t get it working like this.  :oops:
I m not a  Programmer.
          But
I m a Good Learner.

Offline Darkness2001

  • Full Member
  • ***
  • Posts: 151
    • View Profile
    • photo-galerie-online
Re: [Mod] Letze aktive User / Last active users
« Reply #117 on: October 31, 2006, 09:44:21 PM »
Hallo,

habe den Mod eingebaut, klappt auch alles prima, aber..

warum bekomme ich jetzt wenn ich auf suchen gehe --> [edit] auf die suchseite [/edit] folgende Fehlermeldung:


Notice: Undefined variable: last_action_user_list in /homepages/35/d85936339/htdocs/1images/includes/page_header.php on line 682

681    while ($row = $site_db->fetch_array($result)) {
682    $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> <span class="smalltext">'.$row['user_comments'].'</span><br>';
}

$site_template->register_vars(array(
"user_comments_list" => $last_action_user_list,

WEr weiss Rat?

Grüße Darkness  :mrgreen:
« Last Edit: October 31, 2006, 09:58:25 PM by Darkness2001 »

Offline Zyga

  • Jr. Member
  • **
  • Posts: 87
    • View Profile
Re: [Mod] Letze aktive User / Last active users
« Reply #118 on: November 01, 2006, 03:53:55 PM »
I wasn't here long time and I miss 2 updates.
Now with winmerge I updated my gallery to 1.7.4 and I vgot little problem with this mod.

Read - I f-up something and after 4h with winmerge I cant find it please help :oops:
When I paste in to my main template tags {lang_user_last_action}, {user_last_action_list} it works
but with {user_last_action_box} it shows nothing.
« Last Edit: November 01, 2006, 04:35:48 PM by Zyga »

Offline sooner1

  • Newbie
  • *
  • Posts: 48
    • View Profile
Re: [Mod] Letze aktive User / Last active users
« Reply #119 on: March 28, 2007, 10:52:05 PM »
Without having enough english I have had a hard time getting this to work. I have done everything, however nothing shows on the main page except a blank bar where I would assume last active users should be, nothing else. What have I done wrong?