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

0 Members and 2 Guests are viewing this topic.

Offline anderitor

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: [Mod] Memberlist / Mitgliederliste > for/für v 1.7.x
« Reply #285 on: January 26, 2006, 09:47:40 PM »
Can you tell me what this mean?

DB Error: Bad SQL Query: SELECT * FROM 4images_users WHERE user_id NOT IN ('-1') ORDER BY username ASC LIMIT 0, 30
Unknown column 'username' in 'order clause'

Thank you

Offline TheOracle

  • Hero Member
  • *****
  • Posts: 875
    • View Profile
Re: [Mod] Memberlist / Mitgliederliste > for/für v 1.7.x
« Reply #286 on: January 26, 2006, 10:21:20 PM »
It means you're probably using mySQL 5 and you need to apply some patches from this forum in order to get rid of this error message.

Simply search for : mySQL 5 and results should be returned to you. ;)

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 #287 on: January 27, 2006, 01:33:14 AM »
Can you tell me what this mean?

DB Error: Bad SQL Query: SELECT * FROM 4images_users WHERE user_id NOT IN ('-1') ORDER BY username ASC LIMIT 0, 30
Unknown column 'username' in 'order clause'

Thank you
That means that either you've modifyed memberlist.php and made a misstake - with that nobody can help you, since nobody could possible know what modifications you've made, or you have an intgration with a forum, which causing this error.
And since you've provided no usefull information, the answer to your question is:
You are trying to sort members list by 'username' field, but there is no such field in default 4images.

It means you're probably using mySQL 5 and you need to apply some patches from this forum in order to get rid of this error message.

Simply search for : mySQL 5 and results should be returned to you. ;)
maybe you should just be quiet, if you want to stay here :roll:
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 TheOracle

  • Hero Member
  • *****
  • Posts: 875
    • View Profile
Re: [Mod] Memberlist / Mitgliederliste > for/für v 1.7.x
« Reply #288 on: January 27, 2006, 01:39:49 AM »
Perhaps my response was a little bit too pushed ... what I meant is since there are many topics regarding the ' where clause ' issue and that many of your answers refers to mySQL 5 (based on this error), then it was clairly that patches needed to be installed.

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 #289 on: January 27, 2006, 01:48:08 AM »
And that related to the topic/problem anderitor has HOW?
STOP THE SPAM!
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 Fragezeichen

  • Jr. Member
  • **
  • Posts: 58
    • View Profile
Re: [Mod] Memberlist / Mitgliederliste > for/für v 1.7.x
« Reply #290 on: January 29, 2006, 04:15:59 PM »
after fixing mysql5 the same problem are to.it dosent change anything,i get the error message

DB Error: Bad SQL Query: SELECT * FROM 4images_users WHERE user_id NOT IN ('-1') ORDER BY username ASC LIMIT 0, 30
Unknown column 'username' in 'order clause'

Offline TheOracle

  • Hero Member
  • *****
  • Posts: 875
    • View Profile
Re: [Mod] Memberlist / Mitgliederliste > for/für v 1.7.x
« Reply #291 on: January 29, 2006, 04:31:39 PM »
I don't think this error has shown since you installed the memberlist MOD ... I have just searched for many relations for : ORDER BY username and hasn't come up with anything ...

Could you show the actual codings on where exacly this has been coded (if so, which file was it ?) ?

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 #292 on: January 29, 2006, 05:26:30 PM »
That means that either you've modifyed memberlist.php and made a misstake - with that nobody can help you, since nobody could possible know what modifications you've made, or you have an intgration with a forum, which causing this error.
And since you've provided no usefull information, the answer to your question is:
You are trying to sort members list by 'username' field, but there is no such field in default 4images.
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 Fragezeichen

  • Jr. Member
  • **
  • Posts: 58
    • View Profile
Re: [Mod] Memberlist / Mitgliederliste > for/für v 1.7.x
« Reply #293 on: January 30, 2006, 01:03:12 PM »
the only thing that workswell are show members email,other parts dont work.
so there,if needful i want open memberlist code,possible some one can help me please?

Code: [Select]
<?php 
/**************************************************************************
 *                                                                        *
 *    4images - A Web Based Image Gallery Management System               *
 *    ----------------------------------------------------------------    *
 *                                                                        *
 *             File: memberlist.php (MOD)                                 *
 *        Copyright: (C) 2002 Jan Sorgalla                                *
 *            Email: jan@4homepages.de                                    *
 *              Web: http://www.4homepages.de                             *
 *    Scriptversion: 1.0 for 4images 1.7 & phpBB 2.0.2                    *
 *                                                                        *
 *    Never released without support from: Nicky (http://www.nicky.net)   *
 *                                                                        *
 **************************************************************************
 *                                                                        *
 *    Dieses Script ist KEINE Freeware. Bitte lesen Sie die Lizenz-       *
 *    bedingungen (http://www.4homepages.de/4images/lizenz.php) fr       *
 *    weitere Informationen.                                              *
 *    ---------------------------------------------------------------     *
 *    This script is NOT freeware! Please read the Copyright Notice       *
 *    (http://www.4homepages.de/4images/lizenz_e.php) for further         *
 *    information.                                                        *
 *                                                                        *
 *************************************************************************/

$templates_used 'memberlist,memberlist_sort';
$main_template 'memberlist';

define('GET_CACHES'1);
define('ROOT_PATH''./');
include(
ROOT_PATH.'global.php');
require(
ROOT_PATH.'includes/sessions.php');
$user_access get_permission();
include(
ROOT_PATH.'includes/page_header.php');

//----------------------------
//---- Set user per page -----
//----------------------------
$user_per_page 10;

//----------------------------
//---- Uncomment -------------
//----------------------------

/*
if ($user_info['user_level'] == GUEST || $user_info['user_level'] == USER_AWAITING) {
  show_error_page($lang['no_permission']);
  exit;
}
*/

//----------------------------
//---- Sort ------------------
//----------------------------

if(isset($HTTP_POST_VARS['order']))
{
$sort_order = ($HTTP_POST_VARS['order'] == 'ASC') ? 'ASC' 'DESC';
}
else if(isset(
$HTTP_GET_VARS['order']))
{
$sort_order = ($HTTP_GET_VARS['order'] == 'ASC') ? 'ASC' 'DESC';
}
else
{
$sort_order 'ASC';
}

$mode_types_text = array($lang['lang_sort_username'], $lang['lang_sort_joindate'], $lang['lang_sort_useremail'],  $lang['lang_sort_homepage']);
$mode_types = array('username''user_regdate''user_email''user_website');

$select_sort_mode '<select class="select" name="mode">';
for(
$i 0$i count($mode_types_text); $i++)
{
$selected = ( $mode == $mode_types[$i] ) ? ' selected="selected"' '';
$select_sort_mode .= '<option value="' $mode_types[$i] . '"' $selected '>' $mode_types_text[$i] . '</option>';
}
$select_sort_mode .= '</select>';

$select_sort_order '<select class="select" name="order">';
if(
$sort_order == 'ASC')
{
$select_sort_order .= '<option value="ASC" selected="selected">' $lang['lang_sort_asc'] . '</option><option value="DESC">' $lang['lang_sort_desc'] . '</option>';
}
else
{
$select_sort_order .= '<option value="ASC">' $lang['lang_sort_asc'] . '</option><option value="DESC" selected="selected">' $lang['lang_sort_desc'] . '</option>';
}
$select_sort_order .= '</select>';

$site_template->register_vars(array(
'lang_select_sort_method' => $lang['lang_select_sort_method'],
'lang_select_sort_order' => $lang['lang_select_sort_order'],
'select_sort_method' => $select_sort_mode,
'select_sort_order_form' => $select_sort_order,
'mode_action' => $site_sess->url(ROOT_PATH."memberlist.php"))
);
$userlist $site_template->parse_template(memberlist_sort);
if ( isset(
$HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) )
{
$mode = ( isset($HTTP_POST_VARS['mode']) ) ? $HTTP_POST_VARS['mode'] : $HTTP_GET_VARS['mode'];

switch( $mode )
{
case 'user_regdate':
$order_by "user_regdate $sort_order";
break;
case 'username':
$order_by "username $sort_order";
break;
case 'user_email':
$order_by "user_email $sort_order";
break;
case 'user_website':
$order_by "user_website $sort_order";
break;
default:
$order_by "username $sort_order";
break;
}
}
else
{
$order_by "username $sort_order";
}

$sql "SELECT COUNT(*) AS total_user 
       FROM "
.USERS_TABLE.
       WHERE user_id NOT IN ('-1')"
;
//--------------------------------
//------ 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 ---------
//--------------------------------

$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 NOT IN ('-1') 
       ORDER BY 
$order_by 
       LIMIT 
$offset$user_per_page";
$result $site_db->query($sql);
  
$userlist .="\n<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\">\n<tr>\n<td class=\"bordercolor\">\n";
  
$userlist .="<table width=\"100%\" border=\"0\" cellpadding=\"2\" cellspacing=\"1\">\n";
  
$userlist .="<tr>\n<td class=\"head2\" align=\"center\">".$lang['user_name']."</td>\n<td class=\"head2\" align=\"center\">".$lang['join_date']."</td>\n<td class=\"head2\" align=\"center\">".$lang['email']."</td>\n<td class=\"head2\" align=\"center\">".$lang['homepage']."</td>\n<td class=\"head2\" align=\"center\">".$lang['lang_total_user_images']."</td>\n</tr>\n";
  
$count 0;
  
$bgcolor 0;
  while (
$user_row $site_db->fetch_array($result)){
  
$username "";
  
$user_regdate "";
  
$user_email "";
  
$user_email_save "";
  
$user_mailform_link "";
  
$user_email_button "";
  
$total_user_images "";
    
$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'];
    
$username "<a href=\"".$site_sess->url($user_profile_link)."\">".htmlspecialchars($user_row['username'])."</a>";
    
$user_website = (isset($user_row['user_website'])) ? format_url($user_row['user_website']) : REPLACE_EMPTY;
    if (!empty(
$user_website) && $user_website != REPLACE_EMPTY) {
      
$user_website_button "<a href=\"".$user_website."\" target=\"_blank\"><img src=\"".get_gallery_image("homepage.gif")."\" border=\"0\" alt=\"".$user_website."\" /></a>";
    }
    else {
      
$user_website_button REPLACE_EMPTY;
    }
    if (!empty(
$user_row['user_email']) && (!isset($user_row['user_viewemail']) || (isset($user_row['user_viewemail']) && $user_row['user_viewemail'] == '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_regdate = (isset($user_row['user_regdate'])) ? format_date($config['date_format'], $user_row['user_regdate']) : REPLACE_EMPTY;
      
$sql "SELECT COUNT(*) AS total_user_images  
              FROM "
.USERS_TABLE." u, ".IMAGES_TABLE." i 
              WHERE u.user_id = i.user_id 
              AND i.user_id="
.$user_row['user_id']."";
      
$row $site_db->query_firstrow($sql);
      
$total_user_images $row['total_user_images'];


    if (
$count == 0) {
      
$row_bg_number = ($bgcounter++ % == 0) ? 2;
      
$userlist .= "<tr class=\"imagerow".$row_bg_number."\">\n";
    }
    
$userlist .= "<td valign=\"top\" align=\"center\">".$username."</td>\n";
    
$userlist .= "<td valign=\"top\" align=\"center\">".$user_regdate."</td>\n";
    
$userlist .= "<td valign=\"top\" align=\"center\">".$user_email_button."</td>\n";
    
$userlist .= "<td valign=\"top\" align=\"center\">".$user_website_button."</td>";
    
$userlist .= "<td valign=\"top\" align=\"center\">".$total_user_images."</td>";
    
$userlist .= "\n</tr>\n";
  }
  
$userlist .= "</table>\n";
  
$userlist .= "</td>\n</tr>\n</table>\n";
$site_template->register_vars("userlist"$userlist);
unset(
$userlist);
//-----------------------------------------------------
//--- Clickstream -------------------------------------
//-----------------------------------------------------
$clickstream "<span class=\"clickstream\"><a href=\"".$site_sess->url(ROOT_PATH."index.php")."\" class=\"clickstream\">".$lang['home']."</a>".$config['category_separator'];
$clickstream .= $lang['lang_userlist_title'];
$clickstream .= $config['category_separator'].$lang['lang_userlist_page'].$page."</span>";
//-----------------------------------------------------
//--- Print Out ---------------------------------------
//-----------------------------------------------------
$site_template->register_vars(array(
  
"msg" => $msg,
  
"clickstream" => $clickstream,
  
"lang_userlist_title" => $lang['lang_userlist_title']
));
$site_template->print_template($site_template->parse_template($main_template));
include(
ROOT_PATH.'includes/page_footer.php');
?>
« Last Edit: January 30, 2006, 02:37:54 PM by V@no »

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 #294 on: January 30, 2006, 02:38:31 PM »
Are you using some sort of integration? Or maybe you used to use one? have you tryed to change the sorting, like sort by date, etc?

P.S. just replace username with user_name
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 Fragezeichen

  • Jr. Member
  • **
  • Posts: 58
    • View Profile
Re: [Mod] Memberlist / Mitgliederliste > for/für v 1.7.x
« Reply #295 on: January 30, 2006, 10:19:30 PM »
..just use copy`n paste  :mrgreen:
what ever,after tra-la-laing 10 hours and following some mods im very pisst off but happy to be finish :twisted:
problem was defently by memberlist,cause using 4image 1.7.1 there change some words,much more as only username.
sorry to say. :?
donty worry,seach is now bloody working,yipeah

damed errors allready contained,possible someone could check?
http://beepnclub.fo.funpic.de/4images/memberlist.php?sessionid=11f0abe195697049b2ef72d5ae3d07c8

Offline TheOracle

  • Hero Member
  • *****
  • Posts: 875
    • View Profile
Re: [Mod] Memberlist / Mitgliederliste > for/für v 1.7.x
« Reply #296 on: January 30, 2006, 10:24:15 PM »
Quote

what ever,after tra-la-laing 10 hours and following some mods im very pisst of but happy to be finish


I didn't had to take 10 hours actually. A little tip: Make the replacements with a batch process from a software like : Advanced Find & Replace software. Your 10 hours will only become a matter of seconds in the end (for the exact same results). ;)

Offline insane

  • Newbie
  • *
  • Posts: 47
    • View Profile
    • Gallery
Re: [Mod] Memberlist / Mitgliederliste > for/für v 1.7.x
« Reply #297 on: February 02, 2006, 04:07:13 PM »
http://p4ddy-online.de.vu/4images/
acc: test pw: test

i think there where the "»" is shown (upper left), there should be the link to the memberlist.php - but it isn't
how can i fix this?

Offline insane

  • Newbie
  • *
  • Posts: 47
    • View Profile
    • Gallery
Re: [Mod] Memberlist / Mitgliederliste > for/für v 1.7.x
« Reply #298 on: February 02, 2006, 05:18:36 PM »
Die Main.php müsste korrekt sein.
Ich weiß ehrlich gesagt nicht wie ich den Code in die user_logininfo richtig einbringen soll, im moment sieht sie so aus:

Code: [Select]
<table width="100%" border="0" cellpadding="4" cellspacing="0">
  <tr>
    <td valign="top" align="left">
  {lang_loggedin_msg}<br /><br />
      &raquo; <a href="{url_lightbox}">{lang_lightbox}</a><br />
  &raquo; <a href="{url_control_panel}">{lang_control_panel}</a><br />
      &raquo; <a href="{url_logout}">{lang_logout}</a><br />
      &raquo; <a href="{url_userlist}">{lang_userlist_title}</a>
&raquo; <a href="{url_sitemap}">{lang_sitemap}</a></td>
  </tr>
</table>

Der Aufruf über den Link direkt zur memberlist.php funktioniert auch einwandfrei


Offline insane

  • Newbie
  • *
  • Posts: 47
    • View Profile
    • Gallery
Re: [Mod] Memberlist / Mitgliederliste > for/für v 1.7.x
« Reply #299 on: February 02, 2006, 05:42:41 PM »
Oh ok die Änderung is irgendwie flöten gegangen, hätte ich auch vorher ma nachschauen können :(
Danke dir!