Results 1 to 6 of 6

Thread: Want to show contents for Sponsored ONLY

  1. #1
    Join Date
    Feb 2007
    Posts
    51

    Default Want to show contents for Sponsored ONLY

    Hi, I have made a custom page (http://www.domain.com/page.php?id=custom_page) and on that page I have information I only want paying (Sponsored and maybe Premium) users to see.

    As it is now it is like this:
    PHP Code:
    <%if $login_status_logged_in%>
    <%
    php%> include ("custom_page.php"); <%/php%>
    <%else%>
    For 
    paying users only!
    <%/if 
    $login_status_logged_in%> 
    But this only controls if the user is logged in or not. I also want to connect any of their links' status and allow them to see the contents of the page IF any of their links are Sponsored or Premium.

    Is this possible?

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

    Default

    You would not be able to determine if a logged in user is a paid listing owner without writing some PHP code and joining some database tables. There is simply no easy way to do this and IndexU doesn't record anything about payments in the users table.

    By the way, you only need to end with <%/if%>

  3. #3
    Join Date
    Feb 2007
    Posts
    51

    Default

    Well, I managed to put together an SQL-query which gives me what I want.

    PHP Code:
    select l.link_idl.titleu.username from idx_link lidx_paid_listing pidx_users uidx_link_user lu where l.link_id p.link_id and p.link_id lu.link_id and u.username lu.username and p.sponsored 
    But how do I convert that to some sort of variable similar to <%if $login_status_logged_in%> to be able to check wheter true or false in a custom page? Where is this variable <%if $login_status_logged_in%> declared?

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

    Default

    You're on your own for the programming end, I'm not a programmer, I can only hack things to death until they almost work.

  5. #5
    Join Date
    Feb 2007
    Posts
    51

    Default

    Well, at least that's an honest reply. I probably have to turn my hopes to the Helpdesk in that case...

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

    Default

    I answer the help desk too, although I can forward your question onto the programmers, it is not their function to write code for clients, only to answer questions in regards to the existing code.

Similar Threads

  1. Replies: 2
    Last Post: 01-30-2007, 11:50 AM
  2. Replies: 1
    Last Post: 01-22-2007, 08:18 PM
  3. Sponsored Links
    By Shophere in forum v5.x
    Replies: 1
    Last Post: 12-21-2006, 03:40 AM
  4. Insert Flash contents???
    By cabesoul in forum Tutorials, Hints & Tips
    Replies: 7
    Last Post: 04-30-2006, 01:23 AM
  5. Contents of URL field
    By Nax in forum Pre-Sales Questions
    Replies: 1
    Last Post: 05-11-2005, 02:58 PM

Posting Permissions

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