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

0 Members and 1 Guest are viewing this topic.

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: [Mod] Memberlist / Mitgliederliste > for/für v 1.7.x
« Reply #270 on: December 25, 2005, 11:22:48 PM »
Hi mawenzi
...
I have seen a memberlist with a search field. So you can enter a username and click on a button "go".
...

... sorry TIMT for waiting ...  :oops: ... but today is christmas ...  :wink:
... from the old forum ... and tanks to JensF for this ... !

Member Search Field in Memberlist

find in memberlist.php the following :
Code: [Select]
$sql = "SELECT COUNT(*) AS total_user
       FROM ".USERS_TABLE."
       WHERE user_id <> ".GUEST.$condition."";

and add above the following code :
Code: [Select]
//--------------------------------
//------ User Search -------------
//--------------------------------
$filter = "";
if ((isset($HTTP_GET_VARS['search']) && $HTTP_GET_VARS['search']) || (isset($HTTP_POST_VARS['search']) && $HTTP_POST_VARS['search']))
{
  $filter = $site_sess->get_session_var("memberlistfilter");
}
else
{
  $site_sess->drop_session_var("memberlistfilter");
}
if (isset($HTTP_GET_VARS['filter']) || isset($HTTP_POST_VARS['filter']))
{
   $filter = (isset($HTTP_POST_VARS['filter'])) ? $HTTP_POST_VARS['filter'] : $HTTP_GET_VARS['filter'];
}
if ($filter)
{
  $filter_db = str_replace("*", "%", str_replace("**", "*", $filter));
  if ($filter_db && $filter_db != "%")
  {
    $condition =  " AND ".get_user_table_field("", "user_name")." LIKE '".addslashes($filter_db)."'";
    $ltr = "";
    $user_search = "search=1";
    $site_sess->set_session_var("memberlistfilter", $filter);
  }
}
$site_template->register_vars(array(
    "filter" => $filter,
    "filter_url" => $site_sess->url(ROOT_PATH."memberlist.php"),
    "lang_filter" => $lang['search']
));
//--------------------------------
//------ End User Search ---------
//--------------------------------

and add in memberlist.html where you want ... this :
Code: [Select]
<form method="post" action="{filter_url}">
<input name="filter" value="{filter}" class="searchinput">&nbsp;<input type="submit" name="submit" value="{lang_go}" class="button" />
</form>

mawenzi
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 TheOracle

  • Hero Member
  • *****
  • Posts: 875
    • View Profile
Re: [Mod] Memberlist / Mitgliederliste > for/für v 1.7.x
« Reply #271 on: December 25, 2005, 11:33:36 PM »
Ah ! here we go. Thanks for posting this. ;)

Offline Darkness2001

  • Full Member
  • ***
  • Posts: 151
    • View Profile
    • photo-galerie-online
Re: [Mod] Memberlist / Mitgliederliste > for/für v 1.7.x
« Reply #272 on: January 10, 2006, 05:28:42 AM »
Hallo,

ich habe einwenig gebastelt und da kam das bei raus für die Memberliste.
Userstatus in der memberlist.php
----------------------------------------------------------------------------------------------
I have in little tinkered and there came with raus for the Memberliste. User status in memberlist.php
----------------------------------------------------------------------------------------------



open memberlist.php

finde / find:
user_name = "";

danach einfügen / insert afterwards:

$user_status = "";

find:

$user_joindate = (isset($user_row['user_joindate'])) ? ....

danach einfügen / insert afterwards::

$user_status = ($user_row['user_lastaction'] >= (time() - 300) && ((isset($user_row['user_invisible']) && $user_row['user_invisible'] == 0) || $user_info['user_level'] == ADMIN)) ? " <img src=\"".get_gallery_image("user_online.gif")."\" border=\"0\" alt=\"online\" />" : "<img src=\"".get_gallery_image("user_offline.gif")."\" border=\"0\" alt=\"Offline\" />";

find:   

$userlist .= "<td valign=\"top\" align=\"center\">".$user_name."</td>\n";

danach einfügen / insert afterwards::

$userlist .= "<td valign=\"top\" align=\"center\">".$user_status."</td>\n";

Meine Liste habe ich dann unter / I have my list then under:

Code: [Select]
$result = $site_db->query($sql);

$userlist .="\n<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\">\n<tr>\n<td class=\"row2\">\n";
  $userlist .="<table width=\"100%\" border=\"0\" cellpadding=\"2\" cellspacing=\"1\">
  <td class=\"kbalken\" colspan=\"9\" width=\"100%\"height=\"1\"></td></tr>\n";
  $userlist .="<tr>\n<td class=\"kbalken\" align=\"center\">".$lang['user_name']."</td>\n<td class=\"kbalken\" align=\"center\">Status:</td>\n<td class=\"kbalken\" align=\"center\">".$lang['join_date']."</td>\n<td class=\"kbalken\" align=\"center\">".$lang['email']."</td>\n<td class=\"kbalken\" align=\"center\">".$lang['homepage']."</td>\n<td class=\"kbalken\" align=\"center\">Kommentare:</td>\n<td class=\"kbalken\" align=\"center\">".$lang['lang_total_user_images']."</td>\n";
  // --- User edit and delete ---
$userlist .=($user_info['user_level'] != ADMIN) ? "" : "\n<td width=\"10%\" class=\"kbalken\" valign=\"top\" align=\"center\"><small>".$lang['user_edit']."</small></td>";
$userlist .=($user_info['user_level'] != ADMIN) ? "" : "\n<td width=\"10%\" class=\"kbalken\" valign=\"top\" align=\"center\"><small>".$lang['user_delete']."</small></td></tr>
<tr>
<td class=\"kbalken\" colspan=\"9\" width=\"100%\"height=\"1\"></td></tr>\n";

und die Tabelle / and the table::

   if ($count == 0) {
      $row_bg_number = ($bgcounter++ % 2 == 0) ? 1 : 2;
      $userlist .= "<tr class=\"row2".$row_bg_number."\">\n";

sieht so aus / looks in such a way:

    $userlist .= "<td valign=\"top\" align=\"center\">".$user_name."</td>\n";
    $userlist .= "<td valign=\"top\" align=\"center\">".$user_status."</td>\n";
    $userlist .= "<td valign=\"top\" align=\"center\">".$user_joindate."</td>\n";
    $userlist .= "<td valign=\"top\" align=\"center\">".$user_email_button."</td>\n";
    $userlist .= "<td valign=\"top\" align=\"center\">".$user_homepage_button."</td>";
    $userlist .= "<td valign=\"top\" align=\"center\">".$user_com."</td>";   
    $userlist .= "<td valign=\"top\" align=\"center\">".$total_user_images."</td>";

thats all :mrgreen:

Greez Darkness



« Last Edit: October 30, 2006, 06:26:33 PM by Darkness2001 »

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: [Mod] Memberlist / Mitgliederliste > for/für v 1.7.x
« Reply #273 on: January 10, 2006, 10:07:44 AM »
@ Darkness2001,

danke für deine Erweiterung der Memberlist, doch wenn du "Code" postest, dann solltest du dafür auch die entsprechende BB-Formatierung verwenden, so dass er auch sofort als solcher in deinem Beitrag sichtbar wird. Bitte editiere deinen Beitrag diesbezüglich noch einmal nach .

Danke ... mawenzi
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 JensF

  • Addicted member
  • ******
  • Posts: 1.028
    • View Profile
    • http://www.terraristik-galerie.de
Re: [Mod] Memberlist / Mitgliederliste > for/für v 1.7.x
« Reply #274 on: January 10, 2006, 05:57:22 PM »
Sowas in der Richtung gab es aber schonmal. Das sieht aber ein wenig besser aus :)
Mit freundlichem Gruß
Jens Funk



-> Sorry for my bad English <-

Offline Fastian

  • Full Member
  • ***
  • Posts: 199
    • View Profile
Re: [Mod] Memberlist / Mitgliederliste > for/für v 1.7.x
« Reply #275 on: January 16, 2006, 10:34:51 PM »
Before i go for all the changing stuff,

Can someoen tell me if it works well with v 1.7.1 ??

The title says its for v 1.7 
I m not a  Programmer.
          But
I m a Good Learner.

Offline Darkness2001

  • Full Member
  • ***
  • Posts: 151
    • View Profile
    • photo-galerie-online
Re: [Mod] Memberlist / Mitgliederliste > for/für v 1.7.x
« Reply #276 on: January 16, 2006, 10:53:37 PM »
Before i go for all the changing stuff,

Can someoen tell me if it works well with v 1.7.1 ??

The title says its for v 1.7 

Hi,

its works under 1.7.1 (is my version)

Greez darkness  :mrgreen:

Offline TheOracle

  • Hero Member
  • *****
  • Posts: 875
    • View Profile
Re: [Mod] Memberlist / Mitgliederliste > for/für v 1.7.x
« Reply #277 on: January 16, 2006, 10:58:08 PM »
@Darkness2001:

I looked forward for this moment myself. Would it be possible to instruct these steps in english as well ? ;)

Offline TIMT

  • Hero Member
  • *****
  • Posts: 505
    • View Profile
Re: [Mod] Memberlist / Mitgliederliste > for/für v 1.7.x
« Reply #278 on: January 17, 2006, 06:31:38 AM »
Hi Darkness

I have seen on your example of memberlist, that you can search for username. Since a long time I'm looking for this code. Could you post the code for this search-features? That would be great!

Thanks!
TIMT

______________

Hallo Darkness

In deinem Screen-Beispiel gibt es eine Suchfunktion, welches es erlaubt, nach Users zu suchen. Schon seit einer halben Ewigkeit bin ich auf der Suche nach diesem Code. Könntest du den Code für diese Suchfunktion auch posten? Das wäre supertoll.

Vielen Dank!

TIMT

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 #279 on: January 17, 2006, 06:40:35 AM »
Hi Darkness

I have seen on your example of memberlist, that you can search for username. Since a long time I'm looking for this code. Could you post the code for this search-features? That would be great!
mawenzi has already replyed to you with the working code...you should read the replys after your last reply :P ;)
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 #280 on: January 17, 2006, 06:49:29 AM »
wow.... thank you v@no and thank you mawenzi and thank you JensF! What a teamwork. It seems to be to early in the morning for me...  :oops:

Offline anderitor

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: [Mod] Memberlist / Mitgliederliste > for/für v 1.7.x
« Reply #281 on: January 24, 2006, 09:37:18 PM »
Kann mir jemand den Mod nochmal komplett zum download einstellen. Die Version auf der ersten Seite funktioniert bei mir nicht.

Vielen Dank

Offline anderitor

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: [Mod] Memberlist / Mitgliederliste > for/für v 1.7.x
« Reply #282 on: January 25, 2006, 06:52:19 AM »
Hi,
Ich habe Probeleme beim 2. Schritt, der in der README Datei von Nicky beschrieben ist. Wenn ich die table_update.php öffne kommt bei mir folgendes:

DB Error: Bad SQL Query: ALTER TABLE 4images_users ADD user_t_images SMALLINT( 6 ) DEFAULT '0' NOT NULL
Duplicate column name 'user_t_images'

ADDED FIELD user_t_images TO TABLE: 4images_users

Wenn ich das richtig verstehe soll ich in 4images_users die Zeile user_t_images  hinzufügen. Diese existiert bei mir aber schon. Bitte helft mir ich komm damit nicht klar.

Englisch:

Rear one,
I have Probeleme with 2. Step, in the README file by Nicky is described. If I the table_update.php open comes with me the following:
DB Error: Bad SQL Query: ALTER TABLE 4images_users ADD user_t_images SMALLINT( 6 ) DEFAULT '0' NOT NULL
Duplicate column name 'user_t_images'

ADDED FIELD user_t_images TO TABLE: 4images_users

If I that understand am I in 4images_users the line user_t_images correctly to add. This exists with me however already.

Please help me.

Offline anderitor

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: [Mod] Memberlist / Mitgliederliste > for/für v 1.7.x
« Reply #283 on: January 26, 2006, 03:27:51 PM »
Hallo Leute,

helft mir bitte. Ist wirklich dringend.

Danke

english:

Help me, please. It´s very important.

Offline TheOracle

  • Hero Member
  • *****
  • Posts: 875
    • View Profile
Re: [Mod] Memberlist / Mitgliederliste > for/für v 1.7.x
« Reply #284 on: January 26, 2006, 03:34:03 PM »
If the field is already existent, it shouldn't be that big of a deal actually. Does it cause you problems when using the memberlist MOD during the actions from memberlist.php file ?

 

Post your comments here