• [Mod] Memberlist / Mitgliederliste > for/für v 1.7.x 5 0 5 1
Currently:  

Author Topic: [Mod] Memberlist / Mitgliederliste > for/für v 1.7.x  (Read 617537 times)

0 Members and 3 Guests are viewing this topic.

Offline ascanio

  • Hero Member
  • *****
  • Posts: 569
    • View Profile
    • http://www.surfourspace.net
Re: [Mod] Memberlist / Mitgliederliste > for/für v 1.7.x
« Reply #150 on: May 09, 2005, 08:31:48 PM »
Code: [Select]
$userlist .="<tr>\n<td class=\"head2\" align=\"left\">".$lang['user_name']."</td>\n<td class=\"head2\"i got it, is here where i have to put left
Code: [Select]
$userlist .= "<td  align=\"left\">".$user_name."</td>\n";

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] Memberlist / Mitgliederliste > for/für v 1.7.x
« Reply #151 on: May 10, 2005, 01:24:23 AM »
and also he used row1 and row2 how can include that too?
here is a little tip for u:
try use the template from the package of this mod ;)
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 breathe

  • Pre-Newbie
  • Posts: 2
    • View Profile
Re: [Mod] Memberlist / Mitgliederliste > for/für v 1.7.x
« Reply #152 on: May 22, 2005, 04:02:55 AM »
NVM I solved the problem

Offline TIMT

  • Hero Member
  • *****
  • Posts: 505
    • View Profile
Re: [Mod] Memberlist / Mitgliederliste > for/für v 1.7.x
« Reply #153 on: June 13, 2005, 11:53:03 PM »
Hi,

I have three usergroups:
  • photographers
  • customers
  • partner

Now I'd like to show only the usergroup "photographer" in the memberlist.

How can I do that?

TIMT

Offline TIMT

  • Hero Member
  • *****
  • Posts: 505
    • View Profile
Re: [Mod] Memberlist / Mitgliederliste > for/für v 1.7.x
« Reply #154 on: June 20, 2005, 12:29:30 PM »
Anybody here who can help me   :?:

Where can I change the color of the links and the color of the text in the member list?


Offline graficalicus

  • Full Member
  • ***
  • Posts: 235
    • View Profile
Re: [Mod] Memberlist / Mitgliederliste > for/für v 1.7.x
« Reply #155 on: June 20, 2005, 01:31:01 PM »
Quote
Where can I change the color of the links and the color of the text in the member list?

in templates/(your_template)/style.css

Offline TIMT

  • Hero Member
  • *****
  • Posts: 505
    • View Profile
Re: [Mod] Memberlist / Mitgliederliste > for/für v 1.7.x
« Reply #156 on: June 20, 2005, 01:42:19 PM »
for the links, ok, but where do I have to define the "class" in the member list?
and where in the "member-list-scripts" do I have to define "font color"?

I tried different places, but the color doen't change.

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] Memberlist / Mitgliederliste > for/für v 1.7.x
« Reply #157 on: June 20, 2005, 02:40:34 PM »
perhaps u should look for <a href=
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 TIMT

  • Hero Member
  • *****
  • Posts: 505
    • View Profile
Re: [Mod] Memberlist / Mitgliederliste > for/für v 1.7.x
« Reply #158 on: June 20, 2005, 03:03:32 PM »
that was a good hint   :)

in memberlist.php

old:
Code: [Select]
$user_name = "<a href=\"".$site_sess->url($user_profile_link)."\">".htmlspecialchars($user_row['user_name'])."</a>";
new:
Code: [Select]
$user_name = "<a href=\"".$site_sess->url($user_profile_link)."\" class=\"schwarz\">".htmlspecialchars($user_row['user_name'])."</a>";
now I'm looking for the code I have to change vor the text color (join date, total user image)

I think, it must be somewhere here....


Code: [Select]
$sql = "SELECT COUNT(*) AS total_user
       FROM ".USERS_TABLE."
       WHERE user_id <> ".GUEST;
$result = $site_db->query($sql);
while ($row = $site_db->fetch_array($result)) {
   $user_cache[$row['user_id']]['total_user'] = $row['total_user'];
}
$site_db->free_result();

$num_rows_all = (isset($user_cache[$user_id]['total_user'])) ? $user_cache[$user_id]['total_user'] : 0;
$link_arg = $site_sess->url(ROOT_PATH."memberlist.php?mode=$mode&order=$sort_order");
include(ROOT_PATH.'includes/user_paging.php');
$getpaging = new Paging($page, $user_per_page, $num_rows_all, $link_arg);
$offset = $getpaging->get_offset();

$site_template->register_vars(array(
  "paging" => $getpaging->get_paging(),
  "paging_stats" => $getpaging->get_paging_stats()
));


$sql = "SELECT *
        FROM ".USERS_TABLE."
        WHERE user_id <> ".GUEST."
        ORDER BY $order_by
        LIMIT $offset, $user_per_page";
$result = $site_db->query($sql);
  $userlist .="\n<table width=\"100%\" border=\"0\" bordercolor=\"FFFFFF\" cellspacing=\"0\" cellpadding=\"0\" align=\"left\">\n<tr>\n<td height=\"5\">\n</td>\n</tr>\n<tr>\n<td>\n";
  $userlist .="<table width=\"100%\" bordercolor=\"000000\" border=\"1\" cellpadding=\"7\" cellspacing=\"0\">\n";
  $userlist .="<tr>\n<td class=\"head2\" align=\"left\">".$lang['user_name']."</td>\n<td class=\"head2\" align=\"left\">".$lang['join_date']."</td>\n</td>\n<td class=\"head2\" align=\"left\">".$lang['lang_total_user_images']."</td>\n</tr>\n";
//  $userlist .="<tr>\n<td class=\"head2\" align=\"left\">".$lang['user_name']."</td>\n<td class=\"head2\" align=\"left\">".$lang['join_date']."</td>\n<td class=\"head2\" align=\"left\">".$lang['email']."</td>\n<td class=\"head2\" align=\"left\">".$lang['homepage']."</td>\n<td class=\"head2\" align=\"left\">".$lang['lang_total_user_comments']."</td>\n<td class=\"head2\" align=\"left\">".$lang['lang_total_user_images']."</td>\n</tr>\n";
  $count = 0;
  $bgcolor = 0;
  while ($user_row = $site_db->fetch_array($result)){
  $user_id = "";
  $user_name = "";
  $user_join_date = "";
  $user_email = "";
  $user_email_save = "";
  $user_mailform_link = "";
  $user_email_button = "";
  $total_user_images = "";
  $total_user_comments = "";
  $user_id = $user_row['user_id'];
   // --------------------------
   // COUNT users pics
   // --------------------------
   $sql = "SELECT COUNT(image_id) AS t_images
           FROM ".IMAGES_TABLE."
           WHERE user_id = $user_id";
   $count_t_images = $site_db->query_firstrow($sql);
   // --------------------------
   // UPDATE user_t_images field
   // --------------------------
   $sql = "UPDATE ".USERS_TABLE."
           SET user_t_images = ".$count_t_images['t_images']."
           WHERE user_id = $user_id";
   // --------------------------
   $site_db->query($sql);
    $user_profile_link = (!empty($url_show_profile)) ? preg_replace("/{user_id}/", $user_row['user_id'], $url_show_profile) : ROOT_PATH."member.php?action=showprofile&amp;".URL_USER_ID."=".$user_row['user_id'];
    $user_name = "<a href=\"".$site_sess->url($user_profile_link)."\" class=\"schwarz\">".htmlspecialchars($user_row['user_name'])."</a>";
    $user_homepage = (isset($user_row['user_homepage'])) ? format_url($user_row['user_homepage']) : REPLACE_EMPTY;
    if (!empty($user_homepage) && $user_homepage != REPLACE_EMPTY) {
      $user_homepage_button = "<a href=\"".$user_homepage."\" target=\"_blank\"><img src=\"".get_gallery_image("homepage.gif")."\" border=\"0\" alt=\"".$user_homepage."\" /></a>";
    }
    else {
      $user_homepage_button = REPLACE_EMPTY;
    }
    if (!empty($user_row['user_email']) && (!isset($user_row['user_showemail']) || (isset($user_row['user_showemail']) && $user_row['user_showemail'] == 1))) {
      $user_email = $user_row['user_email'];
      $user_email_save = str_replace("@", " at ", $user_row['user_email']);
      if (!empty($url_mailform)) {
        $user_mailform_link = $site_sess->url(preg_replace("/{user_id}/", $user_row['user_id'], $url_mailform));
      }
      else {
        $user_mailform_link = $site_sess->url(ROOT_PATH."member.php?action=mailform&amp;".URL_USER_ID."=".$user_row['user_id']);
      }
      $user_email_button = "<a href=\"".$user_mailform_link."\"><img src=\"".get_gallery_image("email.gif")."\" border=\"0\" alt=\"".$user_email_save."\" /></a>";
    }
    $user_join_date = (isset($user_row['user_joindate'])) ? format_date($config['date_format'], $user_row['user_joindate']) : REPLACE_EMPTY;
    $total_user_comments = $user_row['user_comments'];
    $total_user_images = $user_row['user_t_images'];
      if ($total_user_images > 0) {
        $total_images_link = $site_sess->url(ROOT_PATH."search.php?search_user=".$user_row['user_name']);
        $total_user_images_link =  "<a href=\"".$total_images_link."\">".$total_user_images."</a>";
      } else {
       $total_user_images_link = $total_user_images;
      }
    if ($count == 0) {
      $row_bg_number = ($bgcounter++ % 2 == 0) ? 1 : 2;
      $userlist .= "<tr class=\"imagerow".$row_bg_number."\">\n";
    }
    $userlist .= "<td  class=\"schwarz\" bgcolor=\"#elelel\" valign=\"top\" align=\"left\"><color=\"#000000\">".$user_name."</td>\n";
    $userlist .= "<td bgcolor=\"#elelel\" valign=\"top\" align=\"left\">".$user_join_date."</td>\n";
//    $userlist .= "<td bgcolor=\"#elelel\" valign=\"top\" align=\"left\">".$user_email_button."</td>\n";
//    $userlist .= "<td bgcolor=\"#elelel\" valign=\"top\" align=\"left\">".$user_homepage_button."</td>\n";
//    $userlist .= "<td bgcolor=\"#elelel\" valign=\"top\" align=\"left\">".$total_user_comments."</td>\n";
    $userlist .= "<td bgcolor=\"#elelel\" valign=\"top\" align=\"left\">".$total_user_images_link."</td>";
    $userlist .= "\n</tr>\n";
  }
  $userlist .= "</table>\n";
  $userlist .= "</td>\n</tr>\n</table>\n";
$site_template->register_vars("userlist", $userlist);
unset($userlist);[hr]

thanks


Offline graficalicus

  • Full Member
  • ***
  • Posts: 235
    • View Profile
Re: [Mod] Memberlist / Mitgliederliste > for/für v 1.7.x
« Reply #159 on: June 20, 2005, 03:16:58 PM »
in style.css, take a look at ".head2" - you can change it from there (make it bold, make it italic, make it pink or green or purple!)

If you log in to my site, you'll see that you have the option to choose different templates from your user control panel - all templates are the same with just different style.css attached. Makes it W-A-Y E-A-S-Y to add new templates and/or colors very fast.

Offline TIMT

  • Hero Member
  • *****
  • Posts: 505
    • View Profile
Re: [Mod] Memberlist / Mitgliederliste > for/für v 1.7.x
« Reply #160 on: June 20, 2005, 03:27:02 PM »
I also have my own templates and a style.css. But the mode "Memberlist" has HTML-Code in the PHP-Script. And I can't finde the common style-definitions like head2 or row1. That's my problem  :(

Offline graficalicus

  • Full Member
  • ***
  • Posts: 235
    • View Profile
Re: [Mod] Memberlist / Mitgliederliste > for/für v 1.7.x
« Reply #161 on: June 20, 2005, 03:55:15 PM »
sure it does - in the code above, you posted this snippet:
[code$userlist .="\n<table width=\"100%\" border=\"0\" bordercolor=\"FFFFFF\" cellspacing=\"0\" cellpadding=\"0\" align=\"left\">\n<tr>\n<td height=\"5\">\n</td>\n</tr>\n<tr>\n<td>\n";
  $userlist .="<table width=\"100%\" bordercolor=\"000000\" border=\"1\" cellpadding=\"7\" cellspacing=\"0\">\n";
  $userlist .="<tr>\n<td class=\"head2\" align=\"left\">".$lang['user_name']."</td>\n<td class=\"head2\" align=\"left\">".$lang['join_date']."</td>\n</td>\n<td class=\"head2\" align=\"left\">".$lang['lang_total_user_images']."</td>\n</tr>\n";
//  $userlist .="<tr>\n<td class=\"head2\" align=\"left\">".$lang['user_name']."</td>\n<td class=\"head2\" align=\"left\">".$lang['join_date']."</td>\n<td class=\"head2\" align=\"left\">".$lang['email']."</td>\n<td class=\"head2\" align=\"left\">".$lang['homepage']."</td>\n<td class=\"head2\" align=\"left\">".$lang['lang_total_user_comments']."</td>\n<td class=\"head2\" align=\"left\">".$lang['lang_total_user_images']."</td>\n</tr>\n";
 
Code: [Select]

you can change the stylesheet and it will change this part of the code, no matter where it is -  :wink:

Offline TIMT

  • Hero Member
  • *****
  • Posts: 505
    • View Profile
Re: [Mod] Memberlist / Mitgliederliste > for/für v 1.7.x
« Reply #162 on: June 20, 2005, 05:01:36 PM »
Hi graficalicus

Thank you, the desing ist OK now!   :D

May be you also have a solution for me regarding the other posted question....

I have three usergroups:

    * photographers
    * customers
    * partner


Now I'd like to show only the usergroup "photographer" in the memberlist.

Would be greate if you (other somebody else) could help me.

Offline graficalicus

  • Full Member
  • ***
  • Posts: 235
    • View Profile
Re: [Mod] Memberlist / Mitgliederliste > for/für v 1.7.x
« Reply #163 on: June 20, 2005, 07:18:37 PM »
can't help you there - sounds like it will require some serious code change-

you'll have to modify which user table field to sort from - it should be easy enough, but I don't know how to help you with that.  :(

Offline Flatermann

  • Newbie
  • *
  • Posts: 32
    • View Profile
Re: [Mod] Memberlist / Mitgliederliste > for/für v 1.7.x
« Reply #164 on: June 20, 2005, 07:30:49 PM »
I did a liitle modifacation on this member list. hope the mod maker doent mind.  :(
The loggedin user is showed red in the list so he doest havto look for him so long to see his total comments an pics

hiere the changes i did
find in memberlist.php the line
Code: [Select]
$user_profile_link = (!empty($url_show_profile)) ? preg_replace("/{user_id}/", $user_row['user_id'], $url_show_profile) : ROOT_PATH."member.php?action=showprofile&amp;".URL_USER_ID."=".$user_row['user_id'];
add befor it
Code: [Select]
  if($user_row['user_name'] == $user_info['user_name'])
{
$color = "#FF0000";
}
else
{
$color = "";
}

then find the line
Code: [Select]
$user_name = "<a href=\"".$site_sess->url($user_profile_link)."\">".htmlspecialchars($user_row['user_name'])."</a>";
replace it with
Code: [Select]
$user_name = "<a href=\"".$site_sess->url($user_profile_link)."\"><font color=".$color." >".htmlspecialchars($user_row['user_name'])."</font></a>";
Greats to all