Author Topic: Si queréis tener una lista de usuarios.  (Read 28066 times)

0 Members and 1 Guest are viewing this topic.

Offline Flakkk

  • Jr. Member
  • **
  • Posts: 74
    • View Profile
Re: Si queréis tener una lista de usuarios.
« Reply #15 on: June 08, 2006, 05:00:10 AM »
Buenisimo, me costo un poco instalarlo porque de php yo vengo -10 pero lo pude hacer y quedo de 10.

Ahora les hago un par de consultas..

Como hago para que en el memberlist aparezca los links que tengo en el home de la galeria, asi mismo como hago para que tome mi logo del home tambien.

Despues ya dentro del memberlist solamente en la primera pagina de usuarios muestra la cantidad de imagenes subidas, en las demas no.

Saludos.

Offline masterred

  • Sr. Member
  • ****
  • Posts: 494
    • View Profile
Re: Si queréis tener una lista de usuarios.
« Reply #16 on: June 29, 2006, 07:40:21 PM »
hola

para modificar el logo de memberlist.html solo tienes que modificar la url

Code: [Select]
<img src="{template_url}/images/header_top.gif" width="640" height="6" alt="" />
por la de tu logo del sitio

Code: [Select]
<img src="{template_url}/images/tu_logo.gif"  width="640" height="6" alt="" />

sobre los links, solo pasa los enlaces al templates que usas, en este caso memberlist.html

si son las que tiene por defecto el templates

Code: [Select]
<a href="{url_top_images}"><b>{lang_top_images}</b></a>
solo pasalos y si son los que haz realizado

Code: [Select]
<a href="http://www.tupagina.com/4images/galeria.php">
                  galeria</a>
 

tambien pasalos a memberlist.html

o si son las de caja de incio de sesion,

abre user_loginform.html y pasalos al mismo templates de memberlist.html, aunque esos ya estan por defecto en el template

Code: [Select]
&raquo; <a href="{url_lost_password}">{lang_lost_password}</a><br />


Apache/2.2.21 (Win32)
PHP/5.3.5
Mysql Version: 5.5.19
4images Version: 1.7.?



Offline masterred

  • Sr. Member
  • ****
  • Posts: 494
    • View Profile
Re: Si queréis tener una lista de usuarios.
« Reply #17 on: June 29, 2006, 10:24:07 PM »
excitex hola

en mi archivo de memberlist.php no aparecen las lineas que indicas para lo de la Ñ

este es mi memberlist integro

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: 2.0 for 4images 1.7                                  *
 *                                                                        *
 *    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) für       *
 *    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 to show memberlist only to registered users
//-----------------------------------------------------------


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


//--------------------------------
// DON'T CHANGE ANYTHING FROM HERE
//--------------------------------


//----------------------------
//---- 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'], $lang['lang_sort_comments'], $lang['lang_sort_pictures']);
$mode_types = array('user_name''user_joindate''user_email''user_homepage''user_comments''user_t_images');

$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_joindate':
$order_by "user_joindate $sort_order";
break;
case 'user_name':
$order_by "user_name $sort_order";
break;
case 'user_email':
$order_by "user_email $sort_order";
break;
case 'user_homepage':
$order_by "user_homepage $sort_order";
break;
case 'user_comments':
$order_by "user_comments $sort_order";
break;
case 'user_t_images':
$order_by "user_t_images $sort_order";
break;
default:
$order_by "user_name $sort_order";
break;
}
}
else
{
$order_by "user_name $sort_order";
}
//--------------------------------------------
//--------------------------------------------
$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\" 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_comments']."</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)){
  
$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)."\">".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++ % == 0) ? 2;
      
$userlist .= "<tr class=\"imagerow".$row_bg_number."\">\n";
    }
    
$userlist .= "<td valign=\"top\" align=\"center\">".$user_name."</td>\n";
    
$userlist .= "<td valign=\"top\" align=\"center\">".$user_join_date."</td>\n";
    
$userlist .= "<td valign=\"top\" align=\"center\">".$user_email_button."</td>\n";
    
$userlist .= "<td valign=\"top\" align=\"center\">".$user_homepage_button."</td>\n";
    
$userlist .= "<td valign=\"top\" align=\"center\">".$total_user_comments."</td>\n";
    
$userlist .= "<td valign=\"top\" align=\"center\">".$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);
//-----------------------------------------------------
//--- 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');
?>

 


solo esta la linea siguiente

Code: [Select]
for($i = 0; $i < count($mode_types_text); $i++)
gracias
Apache/2.2.21 (Win32)
PHP/5.3.5
Mysql Version: 5.5.19
4images Version: 1.7.?



Offline excitex2

  • Addicted member
  • ******
  • Posts: 1.590
  • He desactivado la galería y el buscador
    • View Profile
Re: Si queréis tener una lista de usuarios.
« Reply #18 on: June 29, 2006, 11:54:55 PM »
Saludos,,,

Tienes que insertar este complemento del MOD : http://www.4homepages.de/forum/index.php?topic=1954.msg18810#msg18810

excitex2
Lo importante no es saber,,, lo importante es tener el E-Mail de quien sabe