What is vldPersonals?

vldPersonals is a very easy to use dating/social software. It allows you to create a fully functioning & modern dating website in a matter of minutes. If You think it's too complicated - check vldPersonals!
Know more about how You can become a dating website owner

What is vldCrowd?

vldCrowd.com is the biggest unofficial community of vldPersonals owners. It is a place to share ideas and thoughts about Your dating website. It is a place to answer questions and receive answers.
Do You own a vldPersonals license? Don't hesitate and join!

Connect Today

Community members help each other to take their dating websites to the next level. Can You make your vldPersonals website better? Join and find out...

Connect With More Than 500 Dating Website Owners! Sign Up Today
433 0 7
It's a small part of rating improvements I made recently for one of my dear clients.
 
Every popular website has a few angry maniacs browsing pictures, videos, profiles and giving them one star rating. Nobody deserves 1!
Let's consider those guys as psychos and won't record their votes to database but still giving them illusion rating has been recorded.
 
Open your /includes/hp/hp.rate.php and find at the bottom:
 
PHP

 
        //------------------------------------------------
        // Insert rating
        //------------------------------------------------
        $DB->query("UPDATE " . DB_PREFIX . "$type"."s
                                SET totalvotes=totalvotes+1, totalscore=totalscore+$score
                                WHERE member_id=$member_id AND $type"
."_id='$content_id' LIMIT 1");
       
 
echo "ok\nok";
exit;
 

Modify it to look like this:
 
PHP

        if ( $score > 1 )
        {
                //------------------------------------------------
                // Insert rating
                //------------------------------------------------
                $DB->query("UPDATE " . DB_PREFIX . "$type"."s
                                        SET totalvotes=totalvotes+1, totalscore=totalscore+$score
                                        WHERE member_id=$member_id AND $type"
."_id='$content_id' LIMIT 1");
               
        }
       
        echo "ok\nok";
        exit;
 

That's it! No more disappointed users wishing to cancel their membership because of ugly "one star" after 50 "five stars" in a row.

Comments

radioact

  • Posted on 09/16/2009 07:52 AM
Ha-ha, no :)

godyn

  • Posted on 09/16/2009 04:52 AM
Is that picture Radioact, when he got a 1 star score??? :-D

radioact

  • Posted on 09/15/2009 11:25 AM
1. Reverse back your changes.
2. If you can use PHP if statements just wrap sql query by if statement checking if $score > 1.

firesgame

  • Posted on 09/15/2009 11:22 AM
Something wrong with my vers 253 or me.
Its doesnt work - except freezing progress.

godyn

  • Posted on 08/16/2009 04:54 AM
Great ! and works on pictures also :-)

radioact

  • Posted on 06/10/2009 06:18 AM
I wish there were more contributors on this website and I don't care if they ask reward from members, promote their websites or exchange their emails because it's the main goal of the website.

db3204

  • Posted on 06/10/2009 05:33 AM
Thank you Ramil for the great rating mod. Yes, I can now control the rating and more with your great mod.
 
Dan.

Log in to leave a comment