Author Topic: [MOD] Votes saved in DB  (Read 245466 times)

0 Members and 2 Guests are viewing this topic.

Offline Daniel

  • Full Member
  • ***
  • Posts: 183
  • php rockt
    • View Profile
Re: [MOD] Votes saved in DB
« Reply #90 on: February 12, 2006, 07:30:04 PM »
@ theoracle

yes, thank you, very nice.  :D

>=

daniel
4images in Benutzung/use seit/since 2002 / Version 1.7.6

Offline Stoleti

  • Hero Member
  • *****
  • Posts: 574
    • View Profile
Re: [MOD] Votes saved in DB
« Reply #91 on: February 12, 2006, 08:59:31 PM »
http://www.4homepages.de/forum/index.php?topic=6123.45

But how make appear a message for non-admin's " You've no permission ... "   :?

try to replace this code :
Code: [Select]
while ($row = $site_db->fetch_array($result))
{
  $vote = ($user_info['user_level'] == ADMIN) ? " (".$row['vote'].")" : "";
  $voted_list .= "<a href=\"".$site_sess->url(ROOT_PATH."member.php?action=showprofile&amp;user_id=".$row['user_id'])."\">".$row['user_name']."</a>".$vote."<br />"; //member name WITH a link to their profile page
//  $voted_list .= $row['user_name'].$vote."<br />"; //member name WITHOUT a link to their profile page
}
by this one :
Code: [Select]
if ($user_info['user_level'] == ADMIN) {
  while ($row = $site_db->fetch_array($result))
  {
    $vote = $row['vote'];
    $voted_list .= "<a href=\"".$site_sess->url(ROOT_PATH."member.php?action=showprofile&amp;user_id=".$row['user_id'])."\">".$row['user_name']."</a>".$vote."<br />"; //member name WITH a link to their profile page
  //  $voted_list .= $row['user_name'].$vote."<br />"; //member name WITHOUT a link to their profile page
  }
} else {
  $voted_list .= "You have no permission!" // or anything you want
}

Thanks its working very well  :mrgreen:

Offline TheOracle

  • Hero Member
  • *****
  • Posts: 875
    • View Profile
Re: [MOD] Votes saved in DB
« Reply #92 on: February 12, 2006, 09:33:12 PM »
@stoleti:

please read this post in the mean time :

http://www.4homepages.de/forum/index.php?topic=6123.msg60862#msg60862

@daniel:

Glad it worked out for you. ;)

Offline Stoleti

  • Hero Member
  • *****
  • Posts: 574
    • View Profile
Re: [MOD] Votes saved in DB
« Reply #93 on: February 12, 2006, 09:45:56 PM »
@stoleti:

please read this post in the mean time :

http://www.4homepages.de/forum/index.php?topic=6123.msg60862#msg60862

@daniel:

Glad it worked out for you. ;)

I've made that modifications  8)

Offline dosensteck

  • Full Member
  • ***
  • Posts: 160
    • View Profile
Re: [MOD] Votes saved in DB
« Reply #94 on: February 13, 2006, 01:16:18 AM »
i have a problem with this mod... all vote_date entries are "0"  :?:

i need the vote date for a toplist - i will select all images they have rating x with x votes and order by last vote date.... but without vote_date ist impossible  :|

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] Votes saved in DB
« Reply #95 on: February 13, 2006, 01:31:04 AM »
This mod does not store the date...sorry.
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 dosensteck

  • Full Member
  • ***
  • Posts: 160
    • View Profile
Re: [MOD] Votes saved in DB
« Reply #96 on: February 13, 2006, 10:40:49 AM »
hm, iam confused...

why i have in 4images_voted table a vote_date?

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] Votes saved in DB
« Reply #97 on: February 13, 2006, 10:48:18 AM »
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 dosensteck

  • Full Member
  • ***
  • Posts: 160
    • View Profile
Re: [MOD] Votes saved in DB
« Reply #98 on: February 14, 2006, 12:04:09 AM »
ok, thx :/

Offline trez

  • Hero Member
  • *****
  • Posts: 613
    • View Profile
    • blog / photography
Re: [MOD] Votes saved in DB
« Reply #99 on: February 26, 2006, 02:16:55 PM »
V@no, the IP-check is not working.
I can vote still twice with 2 diffrefrent usernames after deleting cookies  :roll:

edit: when i make the steps, i can even vote twice for an image  :roll:
« Last Edit: February 26, 2006, 03:03:02 PM by trez »

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] Votes saved in DB
« Reply #100 on: February 26, 2006, 07:24:44 PM »
The code by cheribi plus mine addition from this page doesnt work? did you check all the step and make sure everything is correctly modifyed?
I've tested it on a fresh 4images, it worked just fine, in fact, I'm using the exact code on my site...
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 trez

  • Hero Member
  • *****
  • Posts: 613
    • View Profile
    • blog / photography
Re: [MOD] Votes saved in DB
« Reply #101 on: February 26, 2006, 08:06:28 PM »
yes!

i tried first to install the mod [rating buttoin disabled...] , then your update for the votes to database, after that cheribis code and after  that you modifications. Dont work. After that, i restored my backups and tried just to add the code from charibi and your addition - dont work either.

The problem is, that i have many users online, and now i have errors in the database, users are getting mad etc :(
Maybe i have made some error, even if i checked it many times, can i post my functions.php and my page_header in order to you to make the changes? I just dont wanna risk  more doubble-votings from my users.

thanks for the support, i really appreciate it.

Georgi

Offline Zyga

  • Jr. Member
  • **
  • Posts: 87
    • View Profile
Re: [MOD] Votes saved in DB
« Reply #102 on: March 07, 2006, 03:06:59 PM »
next great addon for this mod could be something like "show only 10 (xx) last voters"   :idea:

Offline IcEcReaM

  • Hero Member
  • *****
  • Posts: 714
    • View Profile
    • My little Testboard
Re: [MOD] Votes saved in DB
« Reply #103 on: March 07, 2006, 03:42:51 PM »
you mean listed in the details page?
Coding is a everlasting competition between programmers who tries to write larger, better and idiot-safe programs and the universe producing larger and stupider idiots...
...so far the universe won
bump

Offline Zyga

  • Jr. Member
  • **
  • Posts: 87
    • View Profile
Re: [MOD] Votes saved in DB
« Reply #104 on: March 07, 2006, 10:58:35 PM »
yeah later list could be a really long  :wink: