• [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 620799 times)

0 Members and 4 Guests are viewing this topic.

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 #180 on: July 20, 2005, 03:20:07 AM »
1) did it work before?
2) the code I've posted did not include "all" link, so I have no clue what could be wrong.
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 #181 on: July 20, 2005, 07:42:39 AM »
I take the original memberlist.php. Everything is fine.
Then I modify the code for the following feature:
Code: [Select]
Select user like this (#.A. B. C. D. E. F. G. H. I. J. K. L. M. N. O. P. Q. R. S. T. U. V. W. X. Y. Z)Still everything is fine.

Now I like to show only users with usergroup "photographer" (ID=1).
So I modify the code regarding the instruction of Jan (Page 12).

The only thing I can not change is the following code:

Then search for
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;

and replace it with
Code: [Select]
$user_cache = array();
$sql = "SELECT user_id
       FROM ".GROUP_MATCH_TABLE."
       WHERE group_id IN (".$show_group_id.")";
$result = $site_db->query($sql);
while ($row = $site_db->fetch_array($result)) {
   $user_cache[$row['user_id']] = $row['user_id'];
}
$site_db->free_result();

$num_rows_all = count($user_cache);

The following code has already been changed in your modification.
Code: [Select]
WHERE user_id <> ".GUEST;to
Code: [Select]
WHERE user_id <> ".GUEST.$condition;
The problem is, that I don't habe a link "ALL". I can see the text "ALL", but it is not a link.
It seams, that the two modifications does not work properly together.

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 #182 on: July 20, 2005, 02:29:08 PM »
there is no "all" thingie in either of the modifications U've mentioned! what "all" link are u talking about? Unless u are trying to do something on your own, but then u are the only one knows what u did/didnt do...
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 #183 on: July 20, 2005, 03:00:57 PM »
In the following modification, there is a link "all".

Quote
[all] . # . A . B . C . D . E . F . G . H . I . J . K . L . M . N . O . P . Q . R . S . T . U . V . W . X . Y . Z

Once you have click on a character, it must be possible to select all users again.
The text for this link is mentioned on step 3 in your explication.
I see this text, but I can't select all users.

Do you know, what I mean?   :?

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 #184 on: July 21, 2005, 12:59:59 AM »
Ok.
1) the modification I've provided would not work, sorry.
2) I just installed the mod on a fresh 4images, added my modification from page 6, added Jan's modification, then fixed a few lines after Jan modification and everything was working. I can not see anything in Jan's or in my "wrong" modification that would affect your "all" link, there is not even remotely close to it.

So, here is what I'd suggest u to do:
1) replace memberlist.php with the fresh one (thats the only file needs to be adjusted)
2) add the code for alphabetic selection
3) add Jan's groups code
4) replace the following:

find:
Code: [Select]
$condition = " AND ".get_user_table_field("", "user_name")." NOT REGEXP(\"^[a-zA-Z]\")";replace it with:
Code: [Select]
$condition = " AND ".get_user_table_field("u.", "user_name")." NOT REGEXP(\"^[a-zA-Z]\")";

find:
Code: [Select]
$condition = ($ltr) ? " AND ".get_user_table_field("", "user_name")." LIKE '".addslashes($ltr)."%'" : "";replace it with:
Code: [Select]
$condition = ($ltr) ? " AND ".get_user_table_field("u.", "user_name")." LIKE '".addslashes($ltr)."%'" : "";

find:
Code: [Select]
$user_cache = array();replace it with:
Code: [Select]
$user_cache = array(0);

find:
Code: [Select]
$sql = "SELECT user_id
       FROM ".GROUP_MATCH_TABLE."
       WHERE group_id IN (".$show_group_id.")";
replace it with:
Code: [Select]
$sql = "SELECT g.user_id
        FROM ".GROUP_MATCH_TABLE." g
        LEFT JOIN ".USERS_TABLE." u ON (u.user_id = g.user_id)
        WHERE g.group_id IN (".$show_group_id.") ".$condition;


find:
Code: [Select]
        FROM ".USERS_TABLE."
        WHERE user_id IN (".implode(',', $user_cache).")
        ORDER BY $order_by
replace it with:
Code: [Select]
        FROM ".USERS_TABLE." u
        WHERE u.user_id IN (".implode(',', $user_cache).")$condition
        ORDER BY u.$order_by
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 #185 on: July 21, 2005, 09:22:51 AM »
Hi V@no

I did what you said... and it works!

Thank you for this great service. I appreciate that.    :D

Now I have an other problem.
When I'm logged in and want to log out, the following Page can't be found:
http://www.photofrontal.ch/memberlist.php&order=ASC&page=2
Message: Not Found - The requested document was not found on this server.

I believe there is a "?mode=" missing in the URL.
With "http://www.photofront.ch/memberlist.php?mode=&order=ASC&page=1"
it works.

PS: I added the user online/offline notice... (from brandkanne, page 9)

Thank you for helping me.


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 #186 on: July 21, 2005, 03:03:50 PM »
will it break it if u replace
Code: [Select]
$link_arg = $site_sess->url(ROOT_PATH."memberlist.php?mode=$mode&order=$sort_order".(($user_search) ? "&$user_search" : ""));with:
Code: [Select]
$link_arg = $site_sess->url(ROOT_PATH."memberlist.php");(?)
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 #187 on: July 21, 2005, 03:41:21 PM »
Great!

Now it works!

Thank you very much.

 :D

Offline Dragon20

  • Pre-Newbie
  • Posts: 2
    • View Profile
Re: [Mod] Memberlist / Mitgliederliste > for/für v 1.7.x
« Reply #188 on: July 27, 2005, 12:05:03 AM »
Hallo,

hab zwar nicht viel ahnung von PHP aber ich habs einigermaßen hinbekommen bis auf dieses ERROR im page header:

DB Error: Bad SQL Query: UPDATE 4images_users SET user_t_images = 0 WHERE user_id = 2
Unknown column 'user_t_images' in 'field list'

DB Error: Bad SQL Query: UPDATE 4images_users SET user_t_images = 3 WHERE user_id = 1
Unknown column 'user_t_images' in 'field list'


kann mir jemand helfen? Vielen dank im voraus !

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
Re: [Mod] Memberlist / Mitgliederliste > for/für v 1.7.x
« Reply #189 on: July 27, 2005, 01:48:45 PM »
Lies Dir nochmal Punkt 2 in der Readme.txt durch.
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline Dragon20

  • Pre-Newbie
  • Posts: 2
    • View Profile
Re: [Mod] Memberlist / Mitgliederliste > for/für v 1.7.x
« Reply #190 on: July 28, 2005, 12:34:09 PM »
danke!  :D

Offline TIMT

  • Hero Member
  • *****
  • Posts: 505
    • View Profile
Re: [Mod] Memberlist / Mitgliederliste > for/für v 1.7.x
« Reply #191 on: August 27, 2005, 07:16:03 PM »
Hi everybody

I have seen some memberlists with a search field. So you can enter a username and klick on a button "go". The search result is shown in the memberlist. How can I implement this features?

Thank you for your help

TIMT

Offline TIMT

  • Hero Member
  • *****
  • Posts: 505
    • View Profile
Re: [Mod] Memberlist / Mitgliederliste > for/für v 1.7.x
« Reply #192 on: August 27, 2005, 07:23:05 PM »
Hi everybody

In my memberlist I have 3 pages. When I sort the list e.g. "number of pictures" it is ok on the first page.
But when I click on "next page", the sort is not OK anymore. It is sorted after username, which is activ per deafault.

I have implemented the code from Jan, which allows you to show only the members of a specific usergroup.
When I shall post the code, let me know.

Thanks for helping me.

TIMT

SOLVED, was my fault

Offline TIMT

  • Hero Member
  • *****
  • Posts: 505
    • View Profile
Re: [Mod] Memberlist / Mitgliederliste > for/für v 1.7.x
« Reply #193 on: August 30, 2005, 06:59:39 PM »
Can anybody tell me, how I can implement this searchfield? I couldn't find a hint in this MOD.  V@no mentioned this features in this MOD, but I couldn't find the code. But I have seen this serachfield in memberlists of some of the users in this forum.

Offline beseech

  • Full Member
  • ***
  • Posts: 150
    • View Profile
Re: [Mod] Memberlist / Mitgliederliste > for/für v 1.7.x
« Reply #194 on: September 01, 2005, 10:29:46 PM »
i've installed some mods , "Select country and gender with gif when register " , "memberlist" .... and  how can i show on memberlist for example (after) username , a user gender(image) ??


=> Username (gender image) | date of.... etc etc etc