Vote article based on userID and not the IP

More
12 years 10 months ago #16432 by deck1187hw
Sometimes you are dealing with a website in wich People access from a unique IP for example an internal Portal or a Internal Social Network.

Yo won't vote an article already voted by another user because both are using the same IP Adress.
To prevent that and allow users to vote according to the userID.

Edit this file:
components/com_flexicontent/controller.php
Change the line (433):
Code:
$currip = ( phpversion() <= '4.2.1' ? @getenv( 'REMOTE_ADDR' ) : $_SERVER['REMOTE_ADDR'] );
to:
Code:
$currip = $user->id;
And don't forget to do a backup.

This method of vote doesn' t allow to give an "unique vote" to each article, it means that if you vote, and then another user vote the same article, you could vote again for this article, It' s just for preventing multiple votes at once.

Miguel Puig
IT Engineer / UI Designer at FreebandTech LTD

Please Log in or Create an account to join the conversation.

More
12 years 10 months ago #16436 by micker
great thanks for community

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.263 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline