Author Topic: Req: Total User Votes (from images) in profile .  (Read 22536 times)

0 Members and 1 Guest are viewing this topic.

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: Req: Total User Votes (from images) in profile .
« Reply #15 on: January 26, 2006, 05:41:22 AM »
I think you are missunderstanding meaning of this topic. Its not how many votes a member made, but how many votes member's images (the images the member have uploaded) received from other members.
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 Stoleti

  • Hero Member
  • *****
  • Posts: 574
    • View Profile
Re: Req: Total User Votes (from images) in profile .
« Reply #16 on: January 26, 2006, 06:02:25 AM »
resuming this MOD just count the votes and average rate from votes from "another" users in your IMAGES  , only this :) simply this !! :wink:

Offline trez

  • Hero Member
  • *****
  • Posts: 613
    • View Profile
    • blog / photography
Re: Req: Total User Votes (from images) in profile .
« Reply #17 on: January 26, 2006, 06:06:39 AM »
Oh no  :twisted: I'am sittin' ours trying to solve my "problem"  ... thanks for the information guys - but, anyway, is it posible to show that what i'am searching for in the members profile? f.e.:

This user has rated XX images with an average voting of XX

Possible?

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: Req: Total User Votes (from images) in profile .
« Reply #18 on: January 26, 2006, 06:31:59 AM »
only with this mod:
http://www.4homepages.de/forum/index.php?topic=6123.0
I think I've posted code for that somewhere in the replys of that mod.
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 mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: Req: Total User Votes (from images) in profile .
« Reply #19 on: January 26, 2006, 11:13:53 AM »
Its ... how many votes member's images (the images the member have uploaded) received from other members.

... it's important to know for a description ...
... for more clarity in member_profile.html the language-code in lang/<your_language>/main.php should be ...

... ...
Code: [Select]
$lang['num_votes'] = "Votes - received for the own images";
$lang['avg_rating'] = "Images average rating - for the own images";

... ...
Code: [Select]
$lang['num_votes'] = "Bildbewertungen - erhalten für die eigenen Bilder";
$lang['avg_rating'] = "Bewertungsdurchschnitt - für die eigenen Bilder";

... btw. a nice fetuare ... thanks V@no ...  :!:

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 trez

  • Hero Member
  • *****
  • Posts: 613
    • View Profile
    • blog / photography
Re: Req: Total User Votes (from images) in profile .
« Reply #20 on: January 26, 2006, 01:46:07 PM »
only with this mod:
http://www.4homepages.de/forum/index.php?topic=6123.0
I think I've posted code for that somewhere in the replys of that mod.

Do you mean this *http://www.4homepages.de/forum/index.php?topic=6123.msg57740#msg57740* code? If yes, how and where have i to include it to get the total votes/average rating for the user in his profile?

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: Req: Total User Votes (from images) in profile .
« Reply #21 on: January 26, 2006, 02:22:39 PM »
@ trez

... like this : http://www.4homepages.de/forum/index.php?topic=11242.msg58027#msg58027
... but it is only the count of user votes ...
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 trez

  • Hero Member
  • *****
  • Posts: 613
    • View Profile
    • blog / photography
Re: Req: Total User Votes (from images) in profile .
« Reply #22 on: January 26, 2006, 04:23:52 PM »
@ trez

... like this : http://www.4homepages.de/forum/index.php?topic=11242.msg58027#msg58027
... but it is only the count of user votes ...

so when i want to show the total votes the member made, in his profile i should add

Code: [Select]
wrong
and then show the results by {user_num_votes} etc., in the profile.html? If iam wrong, can you explain me how to do it right? Kannst auch auf deutsch posten ;)

Offline TheOracle

  • Hero Member
  • *****
  • Posts: 875
    • View Profile
Re: Req: Total User Votes (from images) in profile .
« Reply #23 on: January 26, 2006, 04:27:38 PM »
Quote

and then show the results by {user_num_votes} etc., in the profile.html? If iam wrong, can you explain me how to do it right?


Actually. You're going on the right track. However, under your templates/<your_template>/member_profile.html file, these are the four tags you need to add :

Code: [Select]

{user_num_votes}
{user_avg_rating}
{user_lang_num_votes}
{user_lang_avg_rating}


;)

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: Req: Total User Votes (from images) in profile .
« Reply #24 on: January 26, 2006, 05:48:42 PM »
If iam wrong, can you explain me how to do it right? Kannst auch auf deutsch posten ;)

... Ja, du liegst falsch ...  :!:
... du hast oben gefragt, wo du den von dir angegeben Code (siehe Link) einfügen sollst und nicht was ...
... der Code für die vom User abgegebenen Stimmen in member.php --- Show Profile --- sieht etwa so aus :

Code: [Select]
//--- Nummer der abgegebenen Stimmen im Profil ---
    $lang['user_votes'] = "Abgegebene Bewertungen:";
    $lang['vot'] = "Bewertungen";
    $sql = "SELECT user_v_images, user_id FROM ".USERS_TABLE." WHERE user_id = $user_id";
    $row = $site_db->query_firstrow($sql);
    $user_votes = $row['user_v_images'];
    $lang_user_votes = $lang['user_votes'];
    $lang_vot = $lang['vot'];
    $site_template->register_vars(array(
    "user_votes" => $user_votes,
    "lang_user_votes" => $lang_user_votes,
    "lang_vot" => $lang_vot,
    ));
//--- Nummer der abgegebenen Stimmen im Profil ---

jetzt kannst du in deiner member_profile.html folgende Tags verwenden :
Code: [Select]
<b>{user_lang_votes}</b> {user_votes} {vot}

PS. Voraussetzung ist aber : http://www.4homepages.de/forum/index.php?topic=6123.0 Varinate B
PPS. Deinen Code kannst du löschen, da er andere User nur verwirren wird !

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 trez

  • Hero Member
  • *****
  • Posts: 613
    • View Profile
    • blog / photography
Re: Req: Total User Votes (from images) in profile .
« Reply #25 on: January 26, 2006, 08:01:27 PM »
mawenzi, vielen dank fuer deine muehe, allerdings habe ich die Avariante installiert, kann man den code irgendwie aendern so dass er mit der A variante funzt? :)

mawenzi, thanks for your help, but i have installed the A version of that mod - anyway to make thinks work?

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: Req: Total User Votes (from images) in profile .
« Reply #26 on: January 26, 2006, 08:27:20 PM »
... und auf speziellen Wunsch ...
... der Code für die vom User abgegebenen Stimmen in member.php --- Show Profile --- ....
... in Anlehnung an : http://www.4homepages.de/forum/index.php?topic=6123.msg57740#msg57740
... Voraussetzung hierfür : http://www.4homepages.de/forum/index.php?topic=6123.0 Varinate A

Code: [Select]
//--- Nummer der abgegebenen Stimmen im Profil ---
    $lang['user_votes'] = "Abgegebene Bewertungen:";
    $lang['vot'] = "Bewertungen";
    $sql = "SELECT COUNT(vote) AS user_votes FROM ".VOTED_TABLE." WHERE user_id = ".$user_id;
    $result = $site_db->query_firstrow($sql);
    $user_votes = $result['user_votes'];
    $lang_user_votes = $lang['user_votes'];
    $lang_vot = $lang['vot'];
    $site_template->register_vars(array(
    "user_votes" => $user_votes,
    "lang_user_votes" => $lang_user_votes,
    "lang_vot" => $lang_vot,
    ));
//--- Nummer der abgegebenen Stimmen im Profil ---

jetzt kannst du in deiner member_profile.html folgende Tags verwenden :
Code: [Select]
<b>{user_lang_votes}</b> {user_votes} {vot}

PS. ist aber ungetestet, da ich auch die Struktur der Tabelle nicht weiter kenne ... !

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 trez

  • Hero Member
  • *****
  • Posts: 613
    • View Profile
    • blog / photography
Re: Req: Total User Votes (from images) in profile .
« Reply #27 on: January 26, 2006, 10:21:51 PM »
FUNZT! Vielen vielen dank ;)