Author Topic: Number of Own Images in MySQL  (Read 21457 times)

0 Members and 1 Guest are viewing this topic.

Offline karimun

  • Newbie
  • *
  • Posts: 49
    • View Profile
    • http://www.at6pm.com
Re: Number of Own Images in MySQL
« Reply #15 on: April 28, 2005, 11:40:06 PM »
ascanio, its time ago when I installed it but still remember a dicussion in the disappeared thread similar to this we have here. There is indeed something strange with it: you donīt need the user_uploaders_box.html at all.

Heres the way it works in my v1.7.1:
1. In page_header.php insert the code I posted above at the end (before ?>, of course) of the file.
2. Now simply add {user_uploaders_list} into your home.html and it should display the list.

If this still doesnīt work check again your user_t_images field inside the _users table:
Type: smallint; Lenght: 6; Null: not null; Default: 0. (from my phpAdmin)
or run the table_update.php from this mod (inside the zip file):
http://www.4homepages.de/forum/index.php?topic=1954.0

Maybe you have to install the memberlist mod completely.. I have them both and as I said: it works.

Offline ascanio

  • Hero Member
  • *****
  • Posts: 569
    • View Profile
    • http://www.surfourspace.net
Re: Number of Own Images in MySQL
« Reply #16 on: April 28, 2005, 11:47:41 PM »
ok perfect now is working ;) i got confused with index.php part that u posted thank u

Offline karimun

  • Newbie
  • *
  • Posts: 49
    • View Profile
    • http://www.at6pm.com
Re: Number of Own Images in MySQL
« Reply #17 on: April 28, 2005, 11:56:53 PM »
welcome  :)

Offline karimun

  • Newbie
  • *
  • Posts: 49
    • View Profile
    • http://www.at6pm.com
Re: Number of Own Images in MySQL
« Reply #18 on: April 28, 2005, 11:59:40 PM »
V@no, I have the mysql query which I posted above in page_header.php and I call it from home.html with {user_uploaders_list}.
No additional html templates. I tried the way JensF described above but that solution dispays nothing in my case - even not with the user_t_images field set up.

Any more suggestions for my language and sessID problem?  8)

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: Number of Own Images in MySQL
« Reply #19 on: April 29, 2005, 12:39:57 AM »
before u'll be able use "user_t_images" field, u must visit the memberlist.php page, and visit all the members. In my oppinion using user_t_images field is not very practical, unless its being populated every time someone upload an image.
I dont know if this will work, but try this query instead (note, it does not require user_t_images field to be present):
Code: [Select]
$sql = "SELECT COUNT(i.image_id) AS user_t_images, u.user_name, u.user_id
        FROM ".USERS_TABLE." u
        LEFT JOIN ".IMAGES_TABLE." i ON (i.user_id = u.user_id)
        WHERE u.user_level > ".GUEST."
        GROUP BY u.user_id
        ORDER BY user_t_images DESC
        LIMIT 5";

About sessionid, I've already replyed on previous page  ;)
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 karimun

  • Newbie
  • *
  • Posts: 49
    • View Profile
    • http://www.at6pm.com
Re: Number of Own Images in MySQL
« Reply #20 on: April 29, 2005, 01:12:19 PM »
V@no, first - the sql query you posted right above doesnīt work work for me.
With your modification of the $last_action_user_list at least the language gets appended now.

The language tag is nevertheless the more important part so I can live with this compromise. Thank you.