Results 1 to 9 of 9

Thread: Rating - Registered Users Only!

  1. #1
    Join Date
    Dec 2004
    Posts
    65

    Default Rating - Registered Users Only!

    Hey,

    Is there a way to only allow registered users to rate a link ? I know there is an option to only allow registered users to write reviews, however I also want to only allow registered users to rate a link.

    How is this possible ?

  2. #2
    Join Date
    Jun 2002
    Location
    Winnipeg Canada
    Posts
    4,913

    Default

    You can use the following

    <%if $login_status_logged_in%>
    rating code here
    <%else%>
    Registered users can rate links, signup today for free!
    <%/if%>

  3. #3
    Join Date
    Dec 2004
    Posts
    65

    Default

    Hey Bruce, THanks for helping!

    Where should I put these bits of code ?

  4. #4
    Join Date
    Jun 2002
    Location
    Winnipeg Canada
    Posts
    4,913

    Default

    What version of IndexU are you using?

  5. #5
    Join Date
    Dec 2004
    Posts
    65

    Default

    Hey,

    I'm using version 5.4.0

  6. #6
    Join Date
    Jun 2002
    Location
    Winnipeg Canada
    Posts
    4,913

    Default

    On detail_link.html

    <%if $login_status_logged_in%>
    <form action="rating.php" method="post">
    <input type="hidden" name="id" value="<%$link_id%>" />
    <table bgcolor="#D3D3D3" cellpadding="5">
    <tr>
    <td colspan="2">
    <b>Average Visitor Rating: </b> <%$rating_img%>
    <b><%$rating%></b> (out of 5)<br />
    Number of ratings: <%$votes%> Votes
    </td>
    </tr>
    <tr>
    <td width="100">
    <b>Visitor Rating</b>
    </td>
    <td>
    <select name="rating">
    <option value="">Select Your Rating</option>
    <option value="5">Excellent!</option>
    <option value="4">Very Good</option>
    <option value="3">Good</option>
    <option value="2">Fair</option>
    <option value="1">Poor</option>
    </select>
    <input type="submit" value="Rate It!" />
    </td>
    </tr>
    </table>
    </form>
    <%else%>
    Registered users can rate links, signup today for free!
    <%/if%>

  7. #7
    Join Date
    Dec 2004
    Posts
    65

    Default

    Hey,

    Thank you Bruce! It works like a charm! U'r a GURU

  8. #8
    Join Date
    Mar 2008
    Location
    Rome, Italy
    Posts
    118

    Default

    Where I have to insert that PHP codes for IndexU Deluxe v1.0 ?

  9. #9
    Join Date
    Jun 2002
    Location
    Winnipeg Canada
    Posts
    4,913

    Default

    On the same page, detail_link.html

    The code will be pretty much the same.

Similar Threads

  1. Email to registered users
    By vittle in forum v5.x
    Replies: 2
    Last Post: 11-02-2005, 11:59 PM
  2. Replies: 3
    Last Post: 08-06-2005, 05:55 PM
  3. Replies: 0
    Last Post: 05-04-2005, 04:29 AM
  4. Replies: 5
    Last Post: 08-03-2002, 05:10 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •