Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - ccsakuweb

Pages: [1] 2 3
1
In comments, pm, everywhere.
I type accents and after click in comment, I get the error: Write a message  And the message textarea is empty, like I didn't type any message. The same occurs if in comments I type a strange character. It say me write a title.

My 4images version is 1.7.3
I have tryed to replicate this error in the last version, in the same server (as php version) and this error doesn't happen.
Could someone tell me the fix that I have to install? I have installing a new version of 4images. But at the moment I can't translate all my website. Because I have installed lot of mods in my current website.

Thanks in advance

2
After the update from php 5.1 to 5.3.3 my website doesn't work.

I have this error in the error log.

Quote
[Mon Oct 03 04:03:25 2011] [error] [client 65.99.235.248] PHP Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting T_STRING in .../httpdocs/tophits3.php on line 29

I need help to fix it, I don't know where is the error to fix.

3
Chit Chat / I heard that md5 is not secure now
« on: December 13, 2009, 12:39:58 PM »
I heard that md5 is broken. and now is best encript with sha2.
http://csrc.nist.gov/publications/fips/fips180-2/fips180-2withchangenotice.pdf

what do you think about that? Could be posible use sha2 instead md5? or sha2 is too weight? I don't know anything about that I only want to know if someone could explain to me about this topic.

4
Chit Chat / Help me please, doubts with sessions and cookies
« on: October 31, 2008, 08:31:22 AM »
Help me please, some doubts with sessions and cookies

Hi, I have to make a work for my father. A shop. I know that I need sessions for the cart. And cookies for identify the user (user and pass, with md5). But I don't know what is secure (is posible to steal cookies?) and there is people without cokies in the internet browser. Then maybe the people use the database.
Someone could help me please? or tell me a tutorial or documentation?

Thanks !!

5
Discussion & Troubleshooting / My Gallery was hacked
« on: June 26, 2007, 11:14:11 PM »
My version is 1.7.3 with all security fix installed... but they hacked me... here is a photo  :cry:
http://www.myart.es

how can i avoid a new hack?? please someone could help me?

The division by zero is a new error.. i don't have php5 ... i will replace this funcions.php  by my last functions.php

Modified: he didn't modify any php file... he only modified home.html and drop all settings from my db.. i don't understand how he hacked my gallery...

6
Español / Castellano / Sobresaturacion en mi galeria
« on: June 15, 2007, 12:32:56 PM »
ultimamente he tenido sobresaturacion en mi galeria. Cuando hay muchos usuarios. La web se inhabilita durante unos segundos porque hay mas del 20% de cpu del hosting

Estos son los datos de mi host:
It is parked courtesy BlueHost.com
Offering 50GB Space, 999GB Bandwidth, and 6 Domains on 1 Account for only $6.95/Month.

que puedo hacer para saber que algoritmo he hecho mal?? he intentado con mysql_stat(); pero nose donde ponerlo para ver los resultados.
creo que tengo sobrecarga desde que tengo instalados los siguientes mods:
http://www.4homepages.de/forum/index.php?topic=8682.0 <- Es un menu que carga en page_header

y este que he hecho yo para ver las 6 ultimas imagenes en los detalles de la imagen del usuario que la envio
en details:
antes de :
Code: [Select]
$sql = "SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits".$additional_sql.", c.cat_name".get_user_table_field(", u.", "user_name").get_user_table_field(", u.", "user_email")."
        FROM (".IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c)
        LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = i.user_id)
        WHERE i.image_id = $image_id AND c.cat_id = i.cat_id";
$image_row = $site_db->query_firstrow($sql);
$cat_id = (isset($image_row['cat_id'])) ? $image_row['cat_id'] : 0;

tengo esto:

Code: [Select]
$sql = "SELECT i.image_id, i.cat_id, i.user_id
        FROM (".IMAGES_TABLE." i)
        WHERE i.image_id = $image_id";
$image_row = $site_db->query_firstrow($sql);
$cat_id = (isset($image_row['cat_id'])) ? $image_row['cat_id'] : 0;
//-----------------------------------------------------
//--- START Show user images in profile ---------------
//-----------------------------------------------------
$imgtable_width = ceil(intval($config['image_table_width']) / $config['image_cells']);
if ((substr($config['image_table_width'], -1)) == "%") {
  $imgtable_width .= "%";
}

$additional_sql = "";
if (!empty($additional_image_fields)) {
  foreach ($additional_image_fields as $key => $val) {
    $additional_sql .= ", i.".$key;
  }
}

$user_images = 6; // SET HERE HOW MUCH IMAGES SHOULD BE SHOWN

$sql = "SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_date, i.image_active,  i.image_media_file, i.image_thumb_file, i.image_hits, c.cat_name
        FROM (".IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c)
        WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.user_id = ".$image_row['user_id']." AND i.cat_id NOT IN (".get_auth_cat_sql("auth_viewcat", "NOTIN").")
        ORDER BY i.image_date DESC
        LIMIT $user_images";

$result = $site_db->query($sql);
$num_rows = $site_db->get_numrows($result);
if (!$num_rows)  {
  $user_profile_images = "<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\"><tr class=\"imagerow1\"><td>";
  $user_profile_images .= $lang['no_new_images'];
  $user_profile_images .= "</td></tr></table>";
}
else  {
  $user_profile_images = "<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\">";
  $count = 0;
  $bgcounter = 0;
  while ($image_row1 = $site_db->fetch_array($result)){
    if ($count == 0) {
      $row_bg_number = ($bgcounter++ % 2 == 0) ? 1 : 2;
      $user_profile_images .= "<tr class=\"imagerow".$row_bg_number."\">\n";
    }
    $user_profile_images .= "<td width=\"".$imgtable_width."\" valign=\"top\">\n";
if(in_array($image_row1['cat_id'],$links_cat)){
    show_image_links($image_row1);
    $user_profile_images .= $site_template->parse_template("thumbnail_links_bit2");
}else{
    show_image($image_row1);
    $user_profile_images .= $site_template->parse_template("thumbnail_bit_last_images");
    }
$user_profile_images .= "\n</td>\n";
    $count++;
    if ($count == $config['image_cells']) {
      $user_profile_images .= "</tr>\n";
      $count = 0;

    }
  } // end while
 
  if ($count > 0)  {
    $leftover = ($config['image_cells'] - $count);
    if ($leftover >= 1) {
      for ($f = 0; $f < $leftover; $f++) {
        $user_profile_images .= "<td width=\"".$imgtable_width."\">\n&nbsp;\n</td>\n";
      }
      $user_profile_images .= "</tr>\n";
    }
  }
  $user_profile_images .= "</table>\n";
} // end else

$site_template->register_vars("user_profile_images", $user_profile_images);
unset($user_profile_images);
//-----------------------------------------------------
//--- END Show user images in profile -----------------
//-----------------------------------------------------

alguien sabe como puedo solucionar estos problemas?? Tambien he hecho que los 5 ultimos mensajes en el guestbook se vean en profile, y las ultimas 12 canciones favoritas se escuchen... y que los 3 ultimas imagenes favoritas se vean al igual que las 6 ultimas imagenes añadidas por el usuario en memberprofile (de nicky el ultimo)

mi web es: http://www.myart.es Como puedo optimizarla??? alguien sabe como puedo arreglar este gran problema???


7
COMMENTS BY AUTHOR
   My second mod to 4images. :)  I wanted to install this mod allways and
   now I have maked it for all us.  This is the first version and I tested
   in 1.7.3 , and the other users : 1.7.1 and 1.7 4images version.

DESCRIPTION
   This mod make a buddy list (or friend list) for user registered. The user
   will can delete all the list or a friend. At the moment the user can add
   his list a friend in comments from details or member_profile page.

DOWNLOAD
: With an english and spanish install version
DEMO: http://www.myart.es   user:test  pass: test

ADDONS:
- Letter Select
- Icon and Order by User Sex/Gender
- Member Personal Photo in the list
- PM icon in the list

- User Status => by Loda
- Users List that added as a friend in profile
- Send PM to users that added you as a friend for notify that you have uploaded a file
- Avatar MOD no Userpic mod

8
COMENTARIO DE LA AUTORA
Mi segundo aporte a 4images y sus usuarios  :lol:  Este ha sido un mod que siempre he querido y aun faltan algunos retoques que ire añadiendo a este topic. Espero que me podais ayudar a pincelarlo y si es necesario optimizarlo. Como soy un poco principiantes y no conozco muy en profundidad 4images quizas necesite ayuda a la hora de dar soporte. Asique se lo agradecere a todos quien aporten y ayuden a que el mod se perfeccione mas y mas.

DESCRIPCION DEL MOD
Este mod crea una lista de amigos que solo podra ser visualizada por el usuario. En cualquier momento se podra eliminar a un amigo de la lista o incluso eliminar la lista completa. Por el momento se podra añadir como amigo a un usuario desde los comentarios de este o desde su respectivo perfil. Este mod ha sido testeado con las versiones 1.7 y 1.7.3 de 4images

DEMO: http://www.myart.es   user:test  pass: test

[MOD]FriendsList_english_install.txt Attached

DESCARGAR MOD
Dentro del archivo comprimido encontraras la explicacion en ingles

ARCHIVOS NUEVOS
- friendslist.php 
- includes/user_paging.php
- templates/tus_plantillas/friendslist.html
- templates/tus_plantillas/friendslist_sort.html

- templates/tus_plantillas/images_tuidioma/friendslist.html
- templates/tus_plantillas/images_tuidioma/friendslist.html
- templates/tus_plantillas/images_tuidioma/friendslist_sort.html
[/b]

ARCHIVOS A EDITAR

- lang/ti_idioma/main.php

- includes/page_header.php

- includes/functions.php

- details.php

- member.php

- templates/tus_plantillas/memberprofile.html

- templates/tus_plantillas/comment_bit.html

- templates/tus_plantillas/user_logininfo.html

HAGA UNA COPIA DE SEGURIDAD DE SU BASE DE DATOS Y GUARDE TODOS LOS ARCHIVOS QUE VAYA A MODIFICAR EN UN SITIO A PARTE

Ejecuta en phpmyadmin en SQL de tu tabla donde tengas 4images las 2 siguientes sentencias
Code: [Select]
ALTER TABLE 4images_users ADD user_friend_ids text   DEFAULT 'NULL' NULL;ATENCION: Si ya tienes instalado memberlist no ejecutes la siguiente sentencia, porque ya esta creado user_t_images
Code: [Select]
ALTER TABLE 4images_users ADD user_t_images SMALLINT( 6 ) DEFAULT '0' NOT NULL;
Abrir main.php
Buscar:
Code: [Select]
?>Añadir arriba:
Code: [Select]
//-----------------------------------------------------
//--- Friendslist  -------------------------------------
//-----------------------------------------------------
$lang['lang_friendslist_title'] = "Lista de Amigos";
$lang['lang_friendslist_add'] = "Añade {user_name} a tu Lista de Amigos";
$lang['lang_friendslist_friend'] = "Amigo:";
$lang['lang_friendslist_page'] = "Pagina ";
$lang['lang_friendslist_pm'] = "PM:";
$lang['lang_total_user_images'] = "Imagenes:";
$lang['lang_total_user_comments'] = "Comentarios:";
$lang['paging_user_stats'] = "Encontrado: {total_cat_images} usuario/s en {total_pages} pagina/s. Mostrado: usuario {first_page} a {last_page}.";

$lang['lang_sort_homepage'] = "Web";
$lang['lang_sort_username'] = "Usuario";
$lang['lang_sort_useremail'] = "Email";
$lang['lang_sort_comments'] = "Comentarios";
$lang['lang_sort_pictures'] = "Imagenes";
$lang['lang_sort_joindate'] = "Fecha de Registro";
$lang['lang_sort_asc'] = "Acendente";
$lang['lang_sort_desc'] = "Descendente";
$lang['lang_select_sort_method'] = "Método ordenado";
$lang['lang_select_sort_order'] = "Orden";
$lang['lang_all'] = "Todo";
$lang['lang_sort_gender'] = "Sexo";


$lang['friendslist_no_images'] = "No tienes amigos almacenados. Para guardarlos haz clic en la imagen Amigo en los comentarios.";
$lang['friendslist_add_success'] = "Amigo guardado.";
$lang['friendslist_add_error'] = "¡Error agregando amigo a la lista!";
$lang['friendslist_remove_success'] = "Amigo eliminado.";
$lang['friendslist_remove_error'] = "¡Error borrando amigo!";
$lang['friendslist_register'] = "Para poder usar su listado de amigos, debe registrarse.<br />&raquo; <a href=\"{url_register}\">Registrarse ahora</a>";
$lang['friendslist_delete_success'] = "Lista de amigos eliminada.";
$lang['friendslist_delete_error'] = "¡Error eliminando lista de amigos!";
$lang['delete_friendslist'] = "Eliminar lista de amigos";
$lang['friendslist_lastaction'] = "Última actualización en su lista de amigos:";
$lang['delete_friendslist_confirm'] = "¿Esta seguro de eliminar su lista de amigos?";




Abrir includes/page_header.php
Buscar:
Code: [Select]
if ($action == "clearlightbox") {
  if ($user_info['user_level'] >= USER) {
    $msg = (clear_lightbox()) ? $lang['lightbox_delete_success'] : $lang['lightbox_delete_error'];
  }
  else {
    $msg = $lang['lightbox_register'];
  }
}
Insertar Debajo:
Code: [Select]
//-----------------------------------------------------
//--- Add & Delete from Friends Lists -----------------
//-----------------------------------------------------
if ($action == "addtofriendslist" && $id) {
  if ($user_info['user_level'] >= USER) {
    $msg = (add_to_friendslist($id)) ? $lang['friendslist_add_success'] : $lang['friendslist_add_error'];
  }
  else {
    $msg = $lang['friendslist_register'];
  }
}
if ($action == "removefromfriendslist" && $id) {
  if ($user_info['user_level'] >= USER) {
    $msg = (remove_from_friendslist($id)) ? $lang['friendslist_remove_success'] : $lang['friendslist_remove_error'];
  }
  else {
    $msg = $lang['friendslist_register'];
  }
}
if ($action == "clearfriendslist") {
  if ($user_info['user_level'] >= USER) {
    $msg = (clear_friendslist()) ? $lang['friendslist_delete_success'] : $lang['friendslist_delete_error'];
  }
  else {
    $msg = $lang['friendslist_register'];
  }
}


Buscar en el mismo archivo:
Code: [Select]
  "url_lightbox" => $site_sess->url(ROOT_PATH."lightbox.php"),Añadir debajo:
Code: [Select]
  "url_friendslist" => $site_sess->url(ROOT_PATH."friendslist.php"),

Buscar:
Code: [Select]
  "lang_lightbox" => $lang['lightbox'],Añadir debajo:
Code: [Select]
  "lang_friendslist_title" => $lang['lang_friendslist_title'],


Abrir includes/functions.php

Buscar:
Code: [Select]
function check_lightbox($id) {
  global $user_info;
  $lightbox_array = explode(" ", $user_info['lightbox_image_ids']);
  return in_array($id, $lightbox_array);
}
Añadir Debajo:
Code: [Select]
////////////////////////////
//BEGIN friendslist
function add_to_friendslist($id) {
  global $user_info, $site_db;
  $id = intval($id);
  if (!$id) {
    return false;
  }
  $friendslist_ids = $user_info['user_friend_ids'];
  $friendslist_array = explode(" ", $friendslist_ids);
  if (!in_array($id, $friendslist_array)) {
    $friendslist_ids .= " ".$id;
  }
  $user_info['user_friend_ids'] = trim($friendslist_ids);
  $sql = "UPDATE ".USERS_TABLE."
          SET user_friend_ids = '".$user_info['user_friend_ids']."'
          WHERE user_id = ".$user_info['user_id'];
  return ($site_db->query($sql)) ? 1 : 0;
}

function remove_from_friendslist($id) {
  global $user_info, $site_db;
  $friendslist_array = explode(" ",$user_info['user_friend_ids']);
  foreach ($friendslist_array as $key => $val) {
    if ($val == $id) {
      unset($friendslist_array[$key]);
    }
  }
  $user_info['user_friend_ids'] = trim(implode(" ", $friendslist_array));
  $sql = "UPDATE ".USERS_TABLE."
          SET user_friend_ids = '".$user_info['user_friend_ids']."'
          WHERE user_id = ".$user_info['user_id'];
  return ($site_db->query($sql)) ? 1 : 0;
}

function clear_friendslist() {
  global $user_info, $site_db;
  $sql = "UPDATE ".USERS_TABLE."
          SET user_friend_ids = ''
          WHERE user_id = ".$user_info['user_id'];
  if ($site_db->query($sql)) {
    $user_info['user_friend_ids'] = "";
    return true;
  }
  else {
    return false;
  }
}

function check_friendslist($id) {
  global $user_info;
  $friendslist_array = explode(" ", $user_info['user_friend_ids']);
  return in_array($id, $friendslist_array);
}
/////////////////
//END FRIENDSLIST
/////////////////


Si quieres que los usuarios añadan a los amigos desde los comentarios:
Abrir details.php

Buscar:
Code: [Select]
        "comment_date" => format_date($config['date_format']." ".$config['time_format'], $comment_row[$i]['comment_date']),Añadir debajo:
Code: [Select]
"friendslist_button" => $friendslist_button, //FRIENDSLIST MOD
Buscar:
Code: [Select]
        if (!isset($comment_row[$i][$user_table_fields['user_level']]) || (isset($comment_row[$i][$user_table_fields['user_level']]) && $comment_row[$i][$user_table_fields['user_level']] == USER)) {
          $comment_user_info = $lang['userlevel_user'];
        }
        elseif ($comment_row[$i][$user_table_fields['user_level']] == ADMIN) {
          $comment_user_info = $lang['userlevel_admin'];
        }

Añadir Arriba:
Code: [Select]
//FRIENDS LIST MOD
 if (($user_info['user_level'] != GUEST) && ($user_info['user_id'] != $comment_user_id)) {
    $friendslist_url = $self_url;
    $friendslist_url .= (!empty($mode)) ? ((strpos($friendslist_url, '?') !== false) ? "&amp;" : "?")."mode=".$mode : "";
    $friendslist_url .= strpos($friendslist_url, '?') !== false ? "&amp;" : "?";

    if (check_friendslist($comment_user_id)) {
      $friendslist_url .= "action=removefromfriendslist&amp;id=".$comment_user_id;
      $friendslist_button = "<a href=\"".$site_sess->url($friendslist_url)."\"><img src=\"".get_gallery_image("friendslist_yes.gif")."\" border=\"0\" alt=\"\" /></a>";
    }
    else {
      $friendslist_url .= "action=addtofriendslist&amp;id=".$comment_user_id;
      $friendslist_button = "<a href=\"".$site_sess->url($friendslist_url)."\"><img src=\"".get_gallery_image("friendslist_no.gif")."\" border=\"0\" alt=\"\" /></a>";
    }
  }
  else {
    $friendslist_button = "<img src=\"".get_gallery_image("friendslist_off.gif")."\" border=\"0\" alt=\"\" />";
  }


Abrir templates/tu_plantilla/comment_bit.html
Puedes poner donde quieras la etiqueta {friendslist_button}


Si tambien quieres poder agregar a tu lista a usuarios desde sus respectivos perfiles
Abre member.php
Busca:
Code: [Select]
    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'];

Insertar Arriba:
Code: [Select]
//-----------------------------------------------------
//--- BEGIN FRIENDSLIST MOD ---------------------------
//-----------------------------------------------------
//FRIENDS LIST MOD

 if (($user_info['user_level'] != GUEST) && ($user_info['user_id'] != $user_row['user_id'])) {
    $friendslist_url = $self_url;
    $friendslist_url .= (!empty($mode)) ? ((strpos($friendslist_url, '?') !== false) ? "&amp;" : "?")."mode=".$mode : "";
    $friendslist_url .= strpos($friendslist_url, '?') !== false ? "&amp;" : "?";

    if (check_friendslist($user_row['user_id'])) {
      $friendslist_url .= "action=removefromfriendslist&amp;id=".$user_row['user_id']."";
      $friendslist_button = "<a href=\"".$site_sess->url($friendslist_url)."\"><img src=\"".get_gallery_image("friendslist_yes.gif")."\" border=\"0\" alt=\"\" /></a>";
    }
    else {
      $friendslist_url .= "action=addtofriendslist&amp;id=".$user_row['user_id']."";
      $friendslist_button = "<a href=\"".$site_sess->url($friendslist_url)."\"><img src=\"".get_gallery_image("friendslist_no.gif")."\" border=\"0\" alt=\"\" /></a>";
    }
  }
  else {
    $friendslist_button = "<img src=\"".get_gallery_image("friendslist_off.gif")."\" border=\"0\" alt=\"\" />";
  }
$site_template->register_vars("lang_friendslist_add", $lang['lang_friendslist_add']);
       

//--- END FRIENDSLIST MOD ---


Buscar:
Code: [Select]
      "user_homepage" => $user_homepage,
Añadir Debajo:
Code: [Select]
  "friendslist_button" => $friendslist_button, //Friend list mod

Abrir templates/tu_plantilla/member_profile.html
Pon donde quieras la etiqueta {friendslist_button}

Abrir templates/tus_plantillas/user_logininfo.html
Buscar:
Code: [Select]
<a href="{url_lightbox}">{lang_lightbox}</a><br />Añadir Debajo:
Code: [Select]
<a href="{url_friendslist}">{lang_friendslist_title}</a><br />

Crear un nuevo archivo llamado templates/tus_plantillas/friendslist.html con el diseño de tu galeria (ejemplo error.html cambia el nombre y pon en el contenido lo siguiente). Y añadir en la parte del contenido de tu web:
Code: [Select]
<p>&nbsp;<b><img src="{template_url}/images/spacer.gif" width="4" height="4" alt="" />{clickstream}</b></p>
                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td><span class="title">{lang_friendslist_title}</span></td>
                      <td align="right">
                        <script language="JavaScript">
        function clearfriendslist() {
                  if (confirm('{lang_delete_friendslist_confirm}')) {
                location.href = "{url_delete_friendslist}";
                  }
                    }
        </script>
                        <a href="javascript:clearfriendslist()"><b>{lang_delete_friendslist}</b></a>
      </td>
                    </tr>
                 
  <br />
                  <hr size="1" /><div align="right"><form method="post" action="{filter_url}">
Buscar Usuario: <input name="filter" value="{filter}" class="searchinput">&nbsp;<input type="submit" name="submit" value="{lang_go}" class="button" /><br>
<span class="smalltext">Puedes usar * como comodín cuando no estés seguro.</span>
</form></div>
  {paging_stats}
                  {if friendslist}
<table width="450" border="0" cellspacing="0" cellpadding="1">
                    <tr>
                      <td class="head1">
                        <table width="100%" border="0" cellspacing="0" cellpadding="3">

                          <tr>
                            <td class="row2" valign="top">{friendslist}</td>
                          </tr>
                        </table>
                      </td>
                    </tr>
                  </table>
  {endif friendslist}
                  <br />
                  <br />
  {paging}
  <br /><div align="center"> Mod Friends List created by <a hreft="http://www.myart.es" target="_blank">CCSakuweb</a></div><br>

Crea un archivo templates/tu_plantilla/friendslist_sort.html
Code: [Select]
<form method="post" action="{mode_action}">
  <table width="100%" cellspacing="0" cellpadding="1" border="0" align="center">
<tr>
  <td align="right" class="head2" nowrap="nowrap">{lang_select_sort_method}:&nbsp;{select_sort_method}&nbsp;&nbsp;{lang_select_sort_order}&nbsp;{select_sort_order_form}&nbsp;&nbsp;
<input type="submit" name="submit" value="{lang_go}" class="button" />
      </td>
</tr>
  </table>
</form>

Crea un archivo llamado friendslist.php y subelo a la raiz de tu galeria (donde esta config.php)
Code: [Select]
<?php
/**************************************************************************
 *                                                                        *
 *    4images - A Web Based Image Gallery Management System               *
 *    ----------------------------------------------------------------    *
 *                                                                        *
 *             File: friendslist.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.                                                        *
 *                                                                        *
 *************************************************************************/
//-------------------------------------------------------- 
//-- USER FRIENDS LIST by CCSAKUWEB : http://www.myart.es
//--------------------------------------------------------
$templates_used 'friendslist,friendslist_sort';
$main_template 'friendslist';

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 20;    //Modificalo para cambiar el numero de usuarios mostrados por pagina

//-----------------------------------------------------------
//---- Uncomment to show friendslist 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
//--------------------------------
//FRIENDS LIST
//----------------------------
//---- 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."friendslist.php".(($user_search) ? "?$user_search"")))
);
$userlist $site_template->parse_template(friendslist_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";
}
//--------------------------------------------
//--------------------------------------------
//--------------------------------
//------ 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("friendslistfilter");
}
else
{
  
$site_sess->drop_session_var("friendslistfilter");
}
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("friendslistfilter"$filter);
  }
}
$site_template->register_vars(array(
    
"filter" => $filter,
    
"filter_url" => $site_sess->url(ROOT_PATH."friendslist.php"),
    
"lang_filter" => $lang['search']
));
//--------------------------------
//------ End User Search ---------
//--------------------------------

  
$user_id $user_info['user_id'];
  
$user_row get_user_info($user_id);
$sql "SELECT *
        FROM "
.USERS_TABLE."
        WHERE user_id = 
$user_id";
    
$user_friends_info $site_db->query_firstrow($sql);
    
$num_rows_all 0;
    if (!empty(
$user_friends_info['user_friend_ids'])) {
    
$friends_id_sql str_replace(" "","trim($user_friends_info['user_friend_ids']));
}else{
$friends_id_sql=0;
}

$sql "SELECT COUNT(user_id) AS total_friends 
       FROM "
.USERS_TABLE."
   WHERE user_id IN (
$friends_id_sql)";

    
$result $site_db->query_firstrow($sql);
    
$user_total_friends $result['total_friends'];
 
    
$num_rows_all = (isset($user_total_friends)) ? $user_total_friends 0;
$site_template->register_vars("user_total_friends"$num_rows_all);
    
unset($user_total_friends);

$site_db->free_result();


$link_arg $site_sess->url(ROOT_PATH."friendslist.php?mode=$mode&order=$sort_order".(($user_search) ? "&$user_search""));
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 IN (
$friends_id_sql
        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['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<td class=\"head2\" align=\"center\">".$lang['lang_friendslist_friend']."</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 "";
  
$friendslist_url="";
  
$friendslist_button="";
  
$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;
    }

    
$friendslist_url $self_url;
    
$friendslist_url .= (!empty($mode)) ? ((strpos($friendslist_url'?') !== false) ? "&amp;" "?")."mode=".$mode "";
    
$friendslist_url .= strpos($friendslist_url'?') !== false "&amp;" "?";
    
$friendslist_url .= "action=removefromfriendslist&amp;id=".$user_id;
    
$friendslist_button "<a href=\"".$site_sess->url($friendslist_url)."\"><img src=\"".get_gallery_image("friendslist_yes.gif")."\" border=\"0\" alt=\"\" /></a>";

    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=\"center\" align=\"left\">".$session_ip." ".$user_name."</td>\n";
    
$userlist .= "<td valign=\"center\" align=\"center\">".$user_email_button."</td>\n";
    
$userlist .= "<td valign=\"center\" align=\"center\">".$user_homepage_button."</td>\n";
    
$userlist .= "<td valign=\"center\" align=\"center\">".$total_user_comments."</td>\n";
    
$userlist .= "<td valign=\"center\" align=\"center\">".$total_user_images_link."</td>\n";
$userlist .= "<td valign=\"center\" align=\"center\">".$friendslist_button."</td>";
    
$userlist .= "\n</tr>\n";
  }
  
$userlist .= "</table>\n";
  
$userlist .= "</td>\n</tr>\n</table>\n";
$site_template->register_vars("friendslist"$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_friendslist_title'];
$clickstream .= $config['category_separator'].$lang['lang_friendslist_page'].$page."</span>";

//-----------------------------------------------------
//--- Print Out ---------------------------------------
//-----------------------------------------------------
$site_template->register_vars(array(
  
"msg" => $msg,
  
"clickstream" => $clickstream,
  
"lang_friendslist_title" => $lang['lang_friendslist_title'],
   
"lang_friendslist" => $lang['friendslist'],
  
"lang_delete_friendslist" => $lang['delete_friendslist'],
  
"url_delete_friendslist" => $site_sess->url(ROOT_PATH."friendslist.php?action=clearfriendslist"),
  
"lang_delete_friendslist_confirm" => $lang['delete_friendslist_confirm'],
  
"lang_friendslist_lastaction" => $lang['lighbox_lastaction'],
));
$site_template->print_template($site_template->parse_template($main_template));
include(
ROOT_PATH.'includes/page_footer.php');
?>

Nuevo archivo: includes/user_paging.php
Code: [Select]
<?php
/**************************************************************************
 *                                                                        *
 *    4images - A Web Based Image Gallery Management System               *
 *    ----------------------------------------------------------------    *
 *                                                                        *
 *             File: user_paging.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.                                                        *
 *                                                                        *
 *************************************************************************/

if (!defined('ROOT_PATH')) {
  die(
"Security violation");
}

class 
Paging {
  var 
$page,$offset,$user_per_page,$num_rows_all,$link_args;
  var 
$first,$last,$total_pages,$config,$desc,$next,$back;

  function 
Paging($page 1$user_per_page 0$num_rows_all 0$link_args "") {
    global 
$lang$config;

    
$this->page $page;
    
$this->perpage $user_per_page;
    
$this->num_rows_all $num_rows_all;

    if (!isset(
$this->page) || !intval($this->page)) {
      
$this->page 1;
    }
    if (!
$this->num_rows_all) {
      
$this->total_pages 0;
    }
    elseif (
$this->num_rows_all <= $this->perpage) {
      
$this->total_pages 1;
    }
    elseif (
$this->num_rows_all $this->perpage == 0) {
      
$this->total_pages $this->num_rows_all $this->perpage;
    }
    else {
      
$this->total_pages ceil($this->num_rows_all $this->perpage);
    }
    if (
$this->page $this->total_pages) {
      
$this->page 1;
    }
    if (!
$this->num_rows_all) {
      
$this->first 0;
    }
    else {
      
$this->first $this->perpage $this->page $this->perpage 1;
    }
    if (!
$this->num_rows_all) {
      
$this->last 0;
    }
    elseif (
$this->page == $this->total_pages) {
      
$this->last $this->num_rows_all;
    }
    else {
      
$this->last $this->perpage $this->page;
    }

    
$this->offset $this->perpage $this->page $this->perpage;

    
$link_args ereg_replace("&page=[0-9]*"""$link_args);
    
$link_args ereg_replace("page=[0-9]*&"""$link_args);
    
$this->link_args basename($link_args);
    
$this->link_args .= preg_match("/\?/",$this->link_args) ? "&amp;" "?";

    
$this->desc $lang['paging_user_stats'];
    
$this->paging_next $lang['paging_next'];
    
$this->paging_back $lang['paging_previous'];
    
$this->paging_lastpage $lang['paging_lastpage'];
    
$this->paging_firstpage $lang['paging_firstpage'];
    
$this->range $config['paging_range'];
  }

  function 
get_paging() {
    
$html "";
    if (
$this->total_pages 1) {
      
$page_back $this->page 1;
      
$page_next $this->page 1;

      if (
$page_back 0) {
        
$html .= "<a href=\"".$this->link_args."page=1\" class=\"paging\">".$this->paging_firstpage."</a>&nbsp;&nbsp;";
        
$html .= "<a href=\"".$this->link_args."page=$page_back\" class=\"paging\">".$this->paging_back."</a>&nbsp;&nbsp;";
      }
      for (
$page_num 1$page_num <= $this->total_pages$page_num++) {
        if (
$page_num >= ($this->page-$this->range) && $page_num <= ($this->page+$this->range)) {
          if (
$this->page == $page_num) {
            
$html .= "<b class=\"pagingon\">$page_num</b>&nbsp;&nbsp;";
          }
          else {
            
$html .= "<a href=\"".$this->link_args."page=$page_num\" class=\"paging\">$page_num</a>&nbsp;&nbsp;";
          }
        }
      }
      if (
$page_next <= $this->total_pages) {
        
$html .= "<a href=\"".$this->link_args."page=$page_next\" class=\"paging\">".$this->paging_next."</a>&nbsp;&nbsp;";
        
$html .= "<a href=\"".$this->link_args."page=$this->total_pages\" class=\"paging\">".$this->paging_lastpage."</a>";
      }
    }
    return 
$html;
  }

  function 
get_offset() {
    return 
$this->offset;
  }

  function 
get_paging_stats() {
    global 
$site_template;
    
$search_array = array(
      
"/".$site_template->start."total_cat_images".$site_template->end."/iU",
      
"/".$site_template->start."total_pages".$site_template->end."/iU",
      
"/".$site_template->start."first_page".$site_template->end."/iU",
      
"/".$site_template->start."last_page".$site_template->end."/iU"
    
);
    
$replace_array = array(
      
$this->num_rows_all,
      
$this->total_pages,
      
$this->first,
      
$this->last
    
);
    
$this->desc preg_replace($search_array$replace_array$this->desc);
    return 
$this->desc;
  }
//end of class
?>



Y por el momento ya esta ^^ En mi web trabaja a la perfeccion. Si haceis alguna modificacion para mejorarlo estaria encantada de que lo postearais mas abajo . Aprovecho para dar las gracias a todos aquellos que me han ayudado con 4images, gracias a ellos he seguido adelante con mi web en 4images. Tambien animo a todos los usuarios a que empiecen a hacer sus modificaciones para aprender mas y mas y por supuesto compartirlas XD
Disfrutar del MOD!

9
Español / Castellano / [MOD] Caja en perfil | Lightbox on profile
« on: May 11, 2007, 09:59:15 AM »
COMENTARIO:
^o^ Mi primer mod!! Por supuesto con ayuda de ejemplos para ayudarme y no cometer errores.
 Como es mi primer mod, agradeceria cualquier comentario, ayuda o correcion acerca de este mod, ya que seguramente es redundante y podra optimizarse.

DESCRIPCION:
Este mod permite ver todos los favoritos del usuario (todas las imagenes que tiene en la caja del lightbox) por paging en el perfil de usuario. Podremos elegir cuantas imagenes mostraremos en el perfil por pagina. Seran visibles tanto para usuarios registrados como invitados. No necesita el mod Multilightbox ni ningun otro (nunca he conseguido instalarlo).

DEMO: http://www.myart.es/perfil2.htm  (al final de mi perfil)

ARCHIVOS A MODIFICAR:
- member.php
- includes/page_header.php
- lang/spanish/main.php
- templates/tus_plantillas/member_profile.html



PASOS A SEGUIR PARA LA INSTALACION:


1-. Abrir member.php
Buscar:
Code: [Select]

//-----------------------------------------------------
//--- Show Profile ------------------------------------
//-----------------------------------------------------
if ($action == "showprofile") {
  $txt_clickstream = $lang['profile'];
  if (isset($HTTP_GET_VARS[URL_USER_ID]) || isset($HTTP_POST_VARS[URL_USER_ID])) {
    $user_id = (isset($HTTP_GET_VARS[URL_USER_ID])) ? intval($HTTP_GET_VARS[URL_USER_ID]) : intval($HTTP_POST_VARS[URL_USER_ID]);
    if (!$user_id) {
      $user_id = GUEST;
    }
  }
  else {
    $user_id = GUEST;
  }


Añadir debajo:
Code: [Select]

//----------------------------------------------------------------------------------
//--- COMENZAR Favoritas en perfil por CCSAKUWEB http://www.myart.es ---------------
//----------------------------------------------------------------------------------
$imgtable_width = ceil(intval($config['image_table_width']) / $config['image_cells']);
if ((substr($config['image_table_width'], -1)) == "%") {
  $imgtable_width .= "%";
}
  $additional_sql = "";
  if (!empty($additional_image_fields)) {
    foreach ($additional_image_fields as $key => $val) {
      $additional_sql .= ", i.".$key;
    }
  }
  if ($user_row = get_user_info($user_id)) {
$sql = "SELECT *
        FROM ".LIGHTBOXES_TABLE."
        WHERE user_id = $user_id";
    $user_favoritos_info = $site_db->query_firstrow($sql);
    $num_rows_all = 0;
    if (!empty($user_favoritos_info['lightbox_image_ids'])) {
    $image_id_sql = str_replace(" ", ",", trim($user_favoritos_info['lightbox_image_ids']));
    $sql = "SELECT COUNT(image_id) AS images
         FROM ".IMAGES_TABLE."
         WHERE image_active = 1 AND image_id IN ($image_id_sql)";
    $result = $site_db->query_firstrow($sql);
    $num_images = $result['images'];
$site_db->free_result();
$num_rows_all = (isset($num_images)) ? $num_images : 0;
    $user_total_favorites = $num_rows_all;
$site_template->register_vars("user_total_favorites", $user_total_favorites);
   
unset($user_total_favorites);


$user_favorites = 3; // Indicar cuantas imagenes favoritas quiere mostrar
 
$link_arg = $site_sess->url(ROOT_PATH."member.php?action=showprofile&user_id=$user_id");
include(ROOT_PATH.'includes/paging.php');
$getpaging_favorites = new Paging($page, $user_favorites, $num_rows_all, $link_arg);
$offset = $getpaging_favorites->get_offset();
$site_template->register_vars(array(
"paging_favorites" => $getpaging_favorites->get_paging(),
"paging_favorites_stats" => $getpaging_favorites->get_paging_stats()
));

  $sql = "SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits".$additional_sql.", c.cat_name".get_user_table_field(", u.", "user_name")."
          FROM (".IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c)
          LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = i.user_id)
          WHERE image_active = 1 AND image_id IN ($image_id_sql) AND c.cat_id = i.cat_id AND i.cat_id NOT IN (".get_auth_cat_sql("auth_viewcat", "NOTIN").")
        ORDER BY i.image_date DESC
        LIMIT $offset, $user_favorites";
  $result = $site_db->query($sql);
  $num_rows = $site_db->get_numrows($result);
 
  $lightbox_lastaction = format_date($config['date_format']." ".$config['time_format'], $user_info['lightbox_lastaction']);
if (empty($user_info['lightbox_lastaction'])) {
  $lightbox_lastaction = "n/a";
}
$site_template->register_vars("lightbox_lastaction", $lightbox_lastaction);
unset($lightbox_lastaction);
}else{
$num_rows = 0;
}


if (!$num_rows)  {
  $user_profile_favorites = "<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\"><tr class=\"imagerow1\"><td>";
  $user_profile_favorites .= $lang['lightbox_no_images'];
  $user_profile_favorites .= "</td></tr></table>";
}
else  {
  $user_profile_favorites = "<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\">";
  $count = 0;
  $bgcounter = 0;
  while ($image_row = $site_db->fetch_array($result)){
    if ($count == 0) {
      $row_bg_number = ($bgcounter++ % 2 == 0) ? 1 : 2;
      $user_profile_favorites .= "<tr class=\"imagerow".$row_bg_number."\">\n";
    }
    $user_profile_favorites .= "<td width=\"".$imgtable_width."\" valign=\"top\">\n";

    show_image($image_row, "lightbox");
    $user_profile_favorites .= $site_template->parse_template("thumbnail_bit");
    $user_profile_favorites .= "\n</td>\n";
    $count++;
    if ($count == $config['image_cells']) {
      $user_profile_favorites .= "</tr>\n";
      $count = 0;
    }
  } // fin while
 
  if ($count > 0)  {
    $leftover = ($config['image_cells'] - $count);
    if ($leftover >= 1) {
      for ($f = 0; $f < $leftover; $f++) {
        $user_profile_favorites .= "<td width=\"".$imgtable_width."\">\n&nbsp;\n</td>\n";
      }
      $user_profile_favorites .= "</tr>\n";
    }
  }
  $user_profile_favorites .= "</table>\n";
} // fin else
$site_template->register_vars("user_profile_favorites", $user_profile_favorites);

unset($user_profile_favorites);

}
//----------------------------------------------------------------------------------
//--- FINALIZAR Favoritas en perfil por CCSAKUWEB http://www.myart.es --------------
//----------------------------------------------------------------------------------


2-. Abrir includes/page_header.php
Buscar:
Code: [Select]

  "lang_lightbox" => $lang['lightbox'],



Añadir debajo:
Code: [Select]

  "lang_favoritos_perfil" => $lang['favoritos_perfil'],



3-. Abrir - lang/spanish/main.php
Buscar:
Code: [Select]

$lang['delete_lightbox_confirm'] = "¿Esta seguro de eliminar su caja de favoritos?";

Añadir debajo:
Code: [Select]

//-----------------------
//--- Favoritas en perfil
//-----------------------
$lang['favoritos_perfil'] = "Ultimos Favoritos de ";


4-. Modifica el numero de la variable $user_favorites para indicar cuantos favoritos mostramos por pagina
- Abrir templates/tus_plantillas/member_profile.html

Añadir debajo o donde quieras que este tu tabla de favoritos:
Code: [Select]

<br><br>
<table width="100%" border="0" cellspacing="0" cellpadding="1">
  <tr>
    <td valign="top" class="head1">
      <table width="100%" border="0" cellpadding="4" cellspacing="0">
        <tr>
      <table width="100%" border="0" cellpadding="4" cellspacing="0">
        <tr>
          <td valign="top" class="head1">{lang_favoritos_perfil}{user_name} ({user_total_favorites})<br>{lang_lighbox_lastaction} {lightbox_lastaction}<br>{lang_lighbox_lastaction} {lightbox_lastaction}</td>
        </tr>
        <tr>
          <td class="row1">{user_profile_favorites}</td>
        </tr>
      </table>
    </td>
  </tr>
</table>{paging_favorites}

{lang_favoritos_perfil} es el texto del titulo de la tabla de los favoritos para que lo podais poner en varios idiomas
Si os fijais el paging de los favoritos sera: {paging_favorites}
Ademas podremos usar {user_total_favorites}  para el numero total de favoritos del usuario.
Y {lightbox_lastaction} que da la fecha y hora de la ultima modificacion en la caja del usuario.
Si no tiene favoritos saldra el mensaje de no imagenes del lightbox ( $lang['lightbox_no_images']) diciendo que no tiene favoritos el usuario


Espero vuestros comentarios y que os sirva ^^

STEPS in ENGLISH

10
¿xQ cuando subo imagenes grandes no terminan de cargarse y no se suben aunque el tamaño y peso no superen el maximo indicado en settings? Hay alguna forma de solucionar este problema?¿?

gracias de antemano ^^

11
Español / Castellano / Como crear mi variable lang para home
« on: April 09, 2007, 02:50:16 AM »
os parecera algo muy sencillo. Yo lo he visto mil veces en los mods  :roll: pero me pongo a intentarlo por mi misma para language selection y me sale en blanco.. no se me escribe nada.. he buscado en FAQ y no lo he encontrado. Es para ponerlo en la pagina principal como mensaje de bienvenida y uno distinto en los distintos main de los lenguajes.. pero nada.. nose me ve.. he puesto lo siguiente en main.php :

Code: [Select]
$lang['index_text'] = "<b>Bienvenidos a My Art!</b><br>
  Página dedicada a las obras de los pequeños artistas que les gusta dibujar, escribir, diseñar... Sobretodo encontrarás trabajos de tus obras favoritas. Pero también hay dibujos
  originales, CGs, gráficos e historias
  inventadas por gente que se ha atrevido a publicarlas
  :).&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  <a href=\"index.php?template=infoworks\">Infórmate para enviarnos tus trabajos</a><br>
             <br>
  A parte de los trabajos de todos nosotros, encontrarás tutoriales, y algunos
  archivos que te servirán de ayuda a la hora de crear tus obras.<br>
  ¡¡Adelante!! ...y disfruta de la página y sus sorpresas.";

y luego en el home pongo esto: {lang_index_text} y no se ve nada T_T alguien me podria ayudar?? qué me falta?? algo en index.php??

GRacias de antemano

12
Discussion & Troubleshooting / how can i put the captcha in an iframe
« on: March 24, 2007, 11:00:34 PM »
the captcha is more width than the column from my template, show i would like to put it in a iframe and works right in it. please could someone help me??
 thankss

13
es q el shoutbox aunq no permita postear a los usuarios no registrados tengo un monton de spam T_T
y necesitaria este shoubox porque puedo poner varios estilos... y hay enlaces a los perfiles..

alguien me podria ayudar??

http://www.4homepages.de/forum/index.php?topic=8987.msg80124#msg80124 este mod lo intefra al formulario de contacto pero nose como ponerlo para el shhoutbox T_T

gracias de antemano

14
Pues eso.. no estoy segura de cuando me lo cargue.. espero que alguien pueda ayudarme.. lo he preguntado ya varias veces por otros foros pero nada.. mi version es 1.7.3 http://www.myart.es

GRacias de antemano ^^

adjunto mi search.php en txt

15
It would be nice have a limit in description from subcategories and when i click to the subcategory and i show the new cateory i can read all the description. But I don't know how can i do this.. someone know how do this??

sorry for my bad english

Pages: [1] 2 3