Author Topic: [MOD] Latest Image Upload in Memberprofile  (Read 29445 times)

0 Members and 1 Guest are viewing this topic.

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
[MOD] Latest Image Upload in Memberprofile
« on: August 12, 2006, 12:07:56 AM »
Vorwort / Features :
  • Mit dieser Modifizierung wird im Benutzerprofil der jeweils letzte Bild-Upload des Mitglieds als Thumbnail angezeigt.
  • Der MOD ist schnell und einfach zu installieren.


Dateien die zu ändern sind :
  • member.php
  • templates/<dein_template>/member_profile.html


1. Schritt
finde in der member.php im Abschnitt  //--- Show Profile --- folgende Zeilen :
Code: [Select]
$site_template->register_vars(array(
      "user_id" => $user_row['user_id'],
      "user_name" => (isset($user_row['user_name'])) ? htmlspecialchars($user_row['user_name']) : REPLACE_EMPTY,
      "user_email" => $user_email,
      "user_email_save" => $user_email_save,
und füge unmittelbar davor den folgenden Code ein :
Code: [Select]
//--- Start Show Latest Upload in Profile ----------------------------------
    $sql = "SELECT * FROM ".IMAGES_TABLE." WHERE ".get_user_table_field("", "user_id")." = ".$user_row['user_id']." AND cat_id IN (".get_auth_cat_sql("auth_viewcat").")
            ORDER BY image_date DESC
            LIMIT 1";
    $user_image = "";
    if ($image_row = $site_db->query_firstrow($sql))
    {
      show_image($image_row);
      $user_image = 1;
    }
    $site_template->register_vars("user_image", $user_image);
//--- End Show Latest Upload in Profile ----------------------------------


2.Schritt
finde in member_profile.html folgendes :
Code: [Select]
        <tr>
          <td class="row2"><b>{lang_icq}</b></td>
          <td class="row2">{if user_icq}<a href="http://wwp.icq.com/scripts/search.dll?to={user_icq}">{user_icq}</a> (<b>{user_icq_status}</b>){endif user_icq}</td>
        </tr>
und füge dahinter folgendes ein :
Code: [Select]
        <tr>
          <td class="row1"><b>Letzter Bild-Upload:</b></td>
          <td class="row1">{if user_image}{thumbnail}{endif user_image}</td>
        </tr>
Selbstverständlich ist die Templategestaltung deine Sache und das Beispiel zeigt nur einen Einsatz im Default-Template.
Maßgebend ist der Einsatz des Tags {if user_image}{thumbnail}{endif user_image} .

Wie den Tag {thumbnail} kannst du hier auch alle anderen Tags aus deiner thumbnail_bit.html verwenden wie z.B :
... {image_name} {cat_name} {image_date} ... u.s.w. ...



Viel Spaß mit den letzten Bildern eurer User in ihren Benutzerprofilen ...  :wink:
mawenzi


« Last Edit: October 27, 2006, 12:51:24 AM by mawenzi »
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline Stoleti

  • Hero Member
  • *****
  • Posts: 574
    • View Profile
Re: [MOD] Latest Image Upload in Memberprofile
« Reply #1 on: August 12, 2006, 12:30:10 AM »
awesome :D

by the ill be interesting , if theres another option too to show "all" as thumbnails :)

or just last 5 or 10 :)
« Last Edit: August 12, 2006, 12:57:01 AM by Stoleti »

Offline Loda

  • Sr. Member
  • ****
  • Posts: 353
    • View Profile
    • Fotosucht Schweiz
Re: [MOD] Latest Image Upload in Memberprofile
« Reply #2 on: August 12, 2006, 11:31:21 AM »
funktioniert wunderbar.. auch hier nochmal danke!
ist es möglich, eine bestimmte kategorie auszuklammern?

Offline ccsakuweb

  • Sr. Member
  • ****
  • Posts: 498
  • Patri
    • View Profile
    • My Art
Re: [MOD] Latest Image Upload in Memberprofile
« Reply #3 on: August 12, 2006, 11:47:30 AM »
hi! I don´t find the next line in member.php:

Code: [Select]
$site_template->register_vars(array(
     "lang_show_user_comments" => $lang['show_user_comments'],

why? where is it?
I find this line:
Code: [Select]
"lang_comments" => $lang['comments'],
What I have to do?
:arrow: 4images Paid Mods: Links, Blog, Albums, Subdomains for users, Diferent templates for user profile, Related picture in details, Last pictures in details.
And the mod that you request me.   Demo: http://www.myart.es

A website dedicated to artist people who loves drawing, design, writing and more

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: [MOD] Latest Image Upload in Memberprofile
« Reply #4 on: August 12, 2006, 06:17:02 PM »
@ ccsakuweb
... thanks for you report ( also @ ivan ) ...
... it was a codeline from my member.php ...  :oops:
... I updated Step 1 from default member.php ... !

@ Stoleti
... just last 5 or 10 ... it is possible ...
... for all do you need paging in memberprofile ...  :?
... please give me a little bit more time ...
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline ccsakuweb

  • Sr. Member
  • ****
  • Posts: 498
  • Patri
    • View Profile
    • My Art
Re: [MOD] Latest Image Upload in Memberprofile
« Reply #5 on: August 12, 2006, 08:13:19 PM »
thanks a lot! the mod is really nice, it runs perfectly and too easy!  :D
:arrow: 4images Paid Mods: Links, Blog, Albums, Subdomains for users, Diferent templates for user profile, Related picture in details, Last pictures in details.
And the mod that you request me.   Demo: http://www.myart.es

A website dedicated to artist people who loves drawing, design, writing and more

Offline Stoleti

  • Hero Member
  • *****
  • Posts: 574
    • View Profile
Re: [MOD] Latest Image Upload in Memberprofile
« Reply #6 on: August 12, 2006, 08:33:41 PM »
@ ccsakuweb
... thanks for you report ( also @ ivan ) ...
... it was a codeline from my member.php ...  :oops:
... I updated Step 1 from default member.php ... !

@ Stoleti
... just last 5 or 10 ... it is possible ...
... for all do you need paging in memberprofile ...  :?
... please give me a little bit more time ...

Sure take your time :)

Offline dgparent

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: [MOD] Latest Image Upload in Memberprofile
« Reply #7 on: August 18, 2006, 05:30:57 PM »
Great mod only problem for me is that it shows the random image on the left side instead of the image the user uploaded ??

Offline tdkpaul

  • Full Member
  • ***
  • Posts: 205
    • View Profile
Re: [MOD] Latest Image Upload in Memberprofile
« Reply #8 on: August 18, 2006, 11:20:25 PM »
Great mod only problem for me is that it shows the random image on the left side instead of the image the user uploaded ??
you misunderstood

it only works in view profile of any user, but not if you go to your own Control Panel    !!!
« Last Edit: August 19, 2006, 12:16:15 AM by tdkpaul »

Offline Loda

  • Sr. Member
  • ****
  • Posts: 353
    • View Profile
    • Fotosucht Schweiz
Re: [MOD] Latest Image Upload in Memberprofile
« Reply #9 on: August 20, 2006, 07:28:28 PM »

my question again, i hope you can help me:  is it possible that images of a spezified categorie not to see on the members profil?

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] Latest Image Upload in Memberprofile
« Reply #10 on: August 20, 2006, 07:36:08 PM »
actualy, it seems the code does not obey the categories permissions...I'd call it a bug :P
in member.php replace
Code: [Select]
    $sql = "SELECT * FROM ".IMAGES_TABLE." WHERE ".get_user_table_field("", "user_id")." = ".$user_row['user_id']."
With:
Code: [Select]
    $sql = "SELECT * FROM ".IMAGES_TABLE." WHERE ".get_user_table_field("", "user_id")." = ".$user_row['user_id']." AND cat_id IN (".get_auth_cat_sql("auth_viewcat").")
Now it should only show images that are in the categories you have access to.

If you want additionaly filter out other categories, then at the end of that line add:
Code: [Select]
AND cat_id NOT IN (1,2,3,4,5)(make sure you add a space infront)
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 Loda

  • Sr. Member
  • ****
  • Posts: 353
    • View Profile
    • Fotosucht Schweiz
Re: [MOD] Latest Image Upload in Memberprofile
« Reply #11 on: August 20, 2006, 08:14:56 PM »
@ v@no: wow! it works! thank you very much!!  :D :D

Offline ccsakuweb

  • Sr. Member
  • ****
  • Posts: 498
  • Patri
    • View Profile
    • My Art
Re: [MOD] Latest Image Upload in Memberprofile
« Reply #12 on: August 20, 2006, 08:59:32 PM »
hi!!! how can I add the name from the image  under the thumbnail??
:arrow: 4images Paid Mods: Links, Blog, Albums, Subdomains for users, Diferent templates for user profile, Related picture in details, Last pictures in details.
And the mod that you request me.   Demo: http://www.myart.es

A website dedicated to artist people who loves drawing, design, writing and more

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] Latest Image Upload in Memberprofile
« Reply #13 on: August 20, 2006, 09:29:02 PM »
you can use the same tags as in thumbnail_bit.html template ;)
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 ccsakuweb

  • Sr. Member
  • ****
  • Posts: 498
  • Patri
    • View Profile
    • My Art
Re: [MOD] Latest Image Upload in Memberprofile
« Reply #14 on: August 21, 2006, 12:41:57 AM »
thanks a lot!  :lol:
:arrow: 4images Paid Mods: Links, Blog, Albums, Subdomains for users, Diferent templates for user profile, Related picture in details, Last pictures in details.
And the mod that you request me.   Demo: http://www.myart.es

A website dedicated to artist people who loves drawing, design, writing and more