• [Mod] Keep Track Of What Each User Has Downloaded 4 0 5 1
Currently:  

Author Topic: [Mod] Keep Track Of What Each User Has Downloaded  (Read 224924 times)

0 Members and 1 Guest are viewing this topic.

Offline LeeWicKeD

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: [Mod] Keep Track Of What Each User Has Downloaded
« Reply #120 on: July 03, 2007, 01:27:45 PM »
Thanks for your help, but now i get this error:

DB Error: Bad SQL Query: SELECT `user_id` , `username` FROM 4images_users WHERE `downloaded_image_ids` LIKE '6575' OR `downloaded_image_ids` LIKE '6575 %' OR `downloaded_image_ids` LIKE '% 6575' OR `downloaded_image_ids` LIKE '% 6575 %'
Unknown column 'username' in 'field list'

Offline Buggy Driver

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: [Mod] Keep Track Of What Each User Has Downloaded
« Reply #121 on: July 03, 2007, 01:33:20 PM »
Dorn  I have integrated my phpBB in to 4 images

Change username to user_name in

$sql = "SELECT `user_id` , `username`



EDIT

you will need to change more than that
I hoop I got evriting

Code: [Select]
// START list users who download this image
$dl_users = "";
// change ADMIN   USER  GUEST   to set user Permission
if ($user_info['user_level'] >=  USER) {

  $img_id = $image_row['image_id'];

  $sql = "SELECT `user_id` , `user_name`
          FROM ".USERS_TABLE."
          WHERE `downloaded_image_ids` LIKE '$img_id'
          OR `downloaded_image_ids` LIKE '$img_id %'
          OR `downloaded_image_ids` LIKE '% $img_id'
          OR `downloaded_image_ids` LIKE '% $img_id %'";

  $result = $site_db->query($sql);
  if ($result) {
    while ($row = $site_db->fetch_array($result)) {
      // change ADMIN   USER  GUEST   to set Permission   link to other download same user  - - > link to user profile
      if ($user_info['user_level'] >= ADMIN) {
        $dl_users .= "\n<a href=\"".$site_sess->url("search.php?user_downloads=".$row['user_id'])."\">".$row['user_name']."</a> &nbsp; ";
      } else {
        $dl_users .= "\n<a href=\"".$site_sess->url("member.php?action=showprofile&amp;user_id=".$row['user_id'])."\">".$row['user_name']."</a> &nbsp; ";
      }
    }
  }
}
// STOP list users who download this image

Offline LeeWicKeD

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: [Mod] Keep Track Of What Each User Has Downloaded
« Reply #122 on: July 03, 2007, 01:41:39 PM »
Okay error fixed, thank you!

But the mod doesn't work at all  :cry:

I installed Chris' mod without any errors, but I can't see any downloaded images-ids for a user  :|
I'm sure, that I haven't made a mistake in download.php  :?

Offline Buggy Driver

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: [Mod] Keep Track Of What Each User Has Downloaded
« Reply #123 on: July 03, 2007, 01:46:24 PM »
I am not sure I understand

Is it a problem at the mod it self or just by the ad on I created? 

Offline LeeWicKeD

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: [Mod] Keep Track Of What Each User Has Downloaded
« Reply #124 on: July 03, 2007, 01:47:40 PM »
The mod itself doesn't work  :|

I hoped it would work with your little addition, but I was wrong  :D

Offline Buggy Driver

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: [Mod] Keep Track Of What Each User Has Downloaded
« Reply #125 on: July 03, 2007, 01:57:43 PM »
Are you sure someone download an image after the install? The mod cant backtrack downloads that hap pent in the past

Admin en guests downloads don’t get listed.

I cant remember if I needed to change something when I install it on 4images 1.7.4


Offline LeeWicKeD

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: [Mod] Keep Track Of What Each User Has Downloaded
« Reply #126 on: July 03, 2007, 02:03:12 PM »
Yep i tried this AFTER the installation.

But it seems that my gallery is slow...now all users who downloaded the picture are display... :mrgreen:


Thanks for your help & patience!  :thumbup:

Offline Buggy Driver

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: [Mod] Keep Track Of What Each User Has Downloaded
« Reply #127 on: July 03, 2007, 02:14:31 PM »
No problem we al have to learn 

I am happy to help

Offline Jan-Lukas

  • Addicted member
  • ******
  • Posts: 1.289
    • View Profile
    • Discover the New World of Kindersurprise
Re: [Mod] Keep Track Of What Each User Has Downloaded
« Reply #128 on: July 28, 2007, 11:02:21 PM »
Hi,

soweit sieht alles gut aus in meiner Seite aber die Downloads werden nicht in die DB eingetragen und somit kann ich die auch nicht sehen  :(

Anything loks fine in my Page but now Download is stored in the Database  :(

Benutze 4images  1.7.4

Habe das selbe Problem, alles sieht gut aus, keine Fehlermeldung.
Nur wird nichts in die Datenbank eingetragen, Tabellen sind auch OK

benutze 4images 4images 1.7.1

kann jemand helfen ?

Harald
Danke Harald




Offline passi

  • Pre-Newbie
  • Posts: 3
    • View Profile
Re: [Mod] Keep Track Of What Each User Has Downloaded
« Reply #129 on: December 30, 2007, 03:29:36 AM »
I know this question has already been asked but i couldn't see where it had been answered so sorry if i missed it... but.. does this mod work with Version 1.7.4?

Offline Jan-Lukas

  • Addicted member
  • ******
  • Posts: 1.289
    • View Profile
    • Discover the New World of Kindersurprise
Re: [Mod] Keep Track Of What Each User Has Downloaded
« Reply #130 on: May 04, 2008, 01:11:57 AM »
Ich mal wieder  :wink:
Habe es jetzt erfolgreich unter 1.7.6 installiert
Bilder werden auch angezeigt
trotdem gibt es auf der index (nur da) eine Fehlermeldung
http://ue-ei-portal-sammlerkatalog.de/katupdate/

DB Error: Bad SQL Query: SELECT user_id, user_name, FROM 4images_users WHERE LIKE '%-05-04' ORDER BY user_name
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM 4images_users WHERE LIKE '%-05-04' ORDER BY user_name' at line 2

Und wie kann man das erweitern,das auch die runtergeladenen Bilder per zip (Leuchtkasten) gespeichert werden.

Harald


Danke Harald




Offline Jan-Lukas

  • Addicted member
  • ******
  • Posts: 1.289
    • View Profile
    • Discover the New World of Kindersurprise
Re: [Mod] Keep Track Of What Each User Has Downloaded
« Reply #131 on: May 04, 2008, 02:31:15 AM »
Ich mal wieder  :wink:
Habe es jetzt erfolgreich unter 1.7.6 installiert
Bilder werden auch angezeigt
trotdem gibt es auf der index (nur da) eine Fehlermeldung
http://ue-ei-portal-sammlerkatalog.de/katupdate/

DB Error: Bad SQL Query: SELECT user_id, user_name, FROM 4images_users WHERE LIKE '%-05-04' ORDER BY user_name
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM 4images_users WHERE LIKE '%-05-04' ORDER BY user_name' at line 2

Und wie kann man das erweitern,das auch die runtergeladenen Bilder per zip (Leuchtkasten) gespeichert werden.

Harald




Edit: der Fehler liegt an dem Eintrag in der session.php, wenn ich die alte Datei einspiele ist der Fehler weg
Auch der Geburtstags Mod wird durch diesen Eintrag deaktiviert
Danke Harald




Offline passi

  • Pre-Newbie
  • Posts: 3
    • View Profile
Re: [Mod] Keep Track Of What Each User Has Downloaded
« Reply #132 on: June 06, 2008, 06:08:26 PM »
Help Please..

I'm relatively new at modifcations and am hoping someone can help..

I followed the instruction as they appear and when i went into 4 images to edit the member_profile.html i am met with the folling error:

Quote
Parse error: syntax error, unexpected ';', expecting ')' in /home/tangledi/public_html/epaints/includes/sessions.php on line 69

I have searched through the coding on the sessions.php file and i can't find the error it is referring too... i'm hoping someone else maybe able to identify it:

Quote
<?php
/**************************************************************************
 *                                                                        *
 *    4images - A Web Based Image Gallery Management System               *
 *    ----------------------------------------------------------------    *
 *                                                                        *
 *             File: sessions.php                                         *
 *        Copyright: (C) 2002 Jan Sorgalla                                *
 *            Email: jan@4homepages.de                                    *
 *              Web: http://www.4homepages.de                             *
 *    Scriptversion: 1.7.4                                                *
 *                                                                        *
 *    Never released without support from: Nicky (http://www.nicky.net)   *
 *                                                                        *
 **************************************************************************
 *                                                                        *
 *    Dieses Script ist KEINE Freeware. Bitte lesen Sie die Lizenz-       *
 *    bedingungen (Lizenz.txt) für weitere Informationen.                 *
 *    ---------------------------------------------------------------     *
 *    This script is NOT freeware! Please read the Copyright Notice       *
 *    (Licence.txt) for further information.                              *
 *                                                                        *
 *************************************************************************/
if (!defined('ROOT_PATH')) {
  die("Security violation");
}

//-----------------------------------------------------
//--- Start Configuration -----------------------------
//-----------------------------------------------------

define('SESSION_NAME', 'sessionid');

$user_table_fields = array(
  "user_id" => "user_id",
  "user_level" => "user_level",
  "user_name" => "user_name",
  "user_password" => "user_password",
  "user_email" => "user_email",
  "user_showemail" => "user_showemail",
  "user_allowemails" => "user_allowemails",
  "user_invisible" => "user_invisible",
  "user_joindate" => "user_joindate",
  "user_activationkey" => "user_activationkey",
  "user_lastaction" => "user_lastaction",
  "user_location" => "user_location",
  "user_lastvisit" => "user_lastvisit",
  "user_comments" => "user_comments",
  "user_homepage" => "user_homepage",
  "user_icq" => "user_icq",
$user_table_fields = array(
  "user_id" => "user_id",
  "user_level" => "user_level",
  "user_name" => "user_name",
  "user_password" => "user_password",
  "user_email" => "user_email",
  "user_showemail" => "user_showemail",
  "user_allowemails" => "user_allowemails",
  "user_invisible" => "user_invisible",
  "user_joindate" => "user_joindate",
  "user_activationkey" => "user_activationkey",
  "user_lastaction" => "user_lastaction",
  "user_location" => "user_location",
  "user_lastvisit" => "user_lastvisit",
  "user_comments" => "user_comments",
  "user_homepage" => "user_homepage",
  "user_icq" => "user_icq", // Mod: Track User Downloads (comma was added at end of line!)
  "download_lastaction" => "download_lastaction" // Mod: Track User Downloads
);

//-----------------------------------------------------
//--- End Configuration -------------------------------
//-----------------------------------------------------

function get_user_table_field($add, $user_field) {
  global $user_table_fields;
  return (!empty($user_table_fields[$user_field])) ? $add.$user_table_fields[$user_field] : "";
}

class Session {

  var $session_id;
  var $session_key;
  var $user_ip;
  var $user_location;
  var $current_time;
  var $session_timeout;
  var $mode = "get";
  var $session_info = array();
  var $user_info = array();

  function Session() {
    global $config;
    $this->session_timeout = $config['session_timeout'] * 60;
    $this->user_ip = $this->get_user_ip();
    $this->user_location = $this->get_user_location();
    $this->current_time = time();

    if (defined('SESSION_KEY') && SESSION_KEY != '') {
        $this->session_key = SESSION_KEY;
    } else {
        $this->session_key = md5('4images' . realpath(ROOT_PATH));
    }

    // Stop adding SID to URLs
    @ini_set('session.use_trans_sid', 0);

    //@ini_set('session.cookie_lifetime', $this->session_timeout);

    session_name(urlencode(SESSION_NAME));
    @session_start();

    $this->demand_session();

thank you in advance...

Offline nobby

  • 4images Guru
  • *******
  • Posts: 2.873
    • View Profile
Re: [Mod] Keep Track Of What Each User Has Downloaded
« Reply #133 on: June 06, 2008, 06:16:10 PM »
The area is duplicated

Code: [Select]
$user_table_fields = array(
  "user_id" => "user_id",
  "user_level" => "user_level",
  "user_name" => "user_name",
  "user_password" => "user_password",
  "user_email" => "user_email",
  "user_showemail" => "user_showemail",
  "user_allowemails" => "user_allowemails",
  "user_invisible" => "user_invisible",
  "user_joindate" => "user_joindate",
  "user_activationkey" => "user_activationkey",
  "user_lastaction" => "user_lastaction",
  "user_location" => "user_location",
  "user_lastvisit" => "user_lastvisit",
  "user_comments" => "user_comments",
  "user_homepage" => "user_homepage",
  "user_icq" => "user_icq",

nobby

Offline passi

  • Pre-Newbie
  • Posts: 3
    • View Profile
Re: [Mod] Keep Track Of What Each User Has Downloaded
« Reply #134 on: June 07, 2008, 12:57:17 AM »
ahhh ok i misunderstood the instructions... thank you very much