Page 1 of 2 12 LastLast
Results 1 to 15 of 17

Thread: Individual Membership pages

  1. #1
    Join Date
    Apr 2008
    Posts
    18

    Default Individual Membership pages

    How would I go about creating different pages for different members?

    What we would like to do is when member 1 logs in he has a page he can go to gather certain information, when member 2 logs in he also has a page but it has different information?

    We only need 1 page like this and we will control the information that is on it.

    If there is something like this as an addon already please let us know. Otherwise please point us in the direction of how to do this. Thank you.

  2. #2
    Join Date
    May 2009
    Location
    uk
    Posts
    953

    Default

    I do not now the coding you need at this time but use the groups and put each client in a group call x then with in you page do like if group == x then "this text or code" elseif this group == y then "this text or code"

    I now the above is not code nor is it right but it will point you in the right direction.

    it would need to be in smarty as you would have group tag within the template.

    hope this helps

  3. #3
    Join Date
    Sep 2007
    Location
    Jimboomba, Qld. AU
    Posts
    2,291

    Default

    I quickly wipped this up for you
    {php}
    $userid=$_SESSION["uid"];
    $result=select_query("tblclients","groupid",array( "id"=>$userid));
    $data = mysql_fetch_array($result);
    $groupid = $data["groupid"];
    $this->assign('groupid',$groupid);
    {/php}

    {if $groupid == "1"}
    This is group 1
    {elseif $groupid == "2"}
    This is group 2
    {elseif $groupid == "3"}
    This is group 3
    {elseif $groupid == "4"}
    This is group 4
    {/if}

  4. #4
    Join Date
    Apr 2008
    Posts
    18

    Default

    Well this sounds good but im a little lost on how to implement it. Any advise?

  5. #5
    Join Date
    May 2009
    Location
    uk
    Posts
    953

    Default

    add your client to a group and the 1 = the group id that is show in the admin

    then the info you want to show that client input it in the code where This is group is.

    then place the above code where you need it.

    if you still need help let us now what you have got/ done.

  6. #6
    Join Date
    Apr 2008
    Posts
    18

    Default

    I seem to have it working but it seems I don't need to change anything in the above code. It seems all I need to do is add a client group assign it to a client then its done.

    What I dont get is if I have say 600 clients how am I to keep track of the numbers?

  7. #7
    Join Date
    Apr 2008
    Posts
    18

    Default

    Also when I add this it shows that Im getting unencrypted areas while the rest shows it encrypted. Why might this be?

  8. #8
    Join Date
    May 2009
    Location
    uk
    Posts
    953

    Default

    1, are you saying that each and every client will have a different bit of info?

    if so you would of had to have 600+ bit of info so sorry you would also have to have 600+ groups but the group part will not be the hard part but if you needed 600+ bits of info that will be any way you do it.

    you could install the page manager mod and then name each page the group id then dynamically call the right page

    2, would need screen shot to see what you mean.

  9. #9
    Join Date
    Apr 2008
    Posts
    18

    Default

    Where can I download this plugin or buy it?

  10. #10
    Join Date
    May 2009
    Location
    uk
    Posts
    953

    Default

    http://forum.whmcs.com/showthread.ph...t=page+manager

    then make one STD page in whmcs and then add like:

    {php}
    $userid=$_SESSION["uid"];
    $result=select_query("tblclients","groupid",array( "id"=>$userid));
    $data = mysql_fetch_array($result);
    $groupid = $data["groupid"];
    $this->assign('groupid',$groupid);
    {/php}

    {include file="$groupid.html"}

    this should auto include the file you set-up for the client in page manager called like 1.html ie 1 = the group ID

    I have not tested this so it may need to be played with to get it working.

    P.s Thanks sparky for helping out with the code, would the above work?
    Last edited by thehost5968; 11-07-09 at 11:24 PM.

  11. #11
    Join Date
    Apr 2008
    Posts
    18

    Default

    Ok so I kept the page I already created but added the code you mentioned above to it rather than sparkies code.

    so my .tpl file now has this

    Code:
    {php}
    $userid=$_SESSION["uid"];
    $result=select_query("tblclients","groupid",array( "id"=>$userid));
    $data = mysql_fetch_array($result);
    $groupid = $data["groupid"];
    $this->assign('groupid',$groupid);
    {/php}
    
    {include file="$groupid.html"}
    I go to the page manager plugin and create a page with title as 1 which is the only client group I have.

    It did not work any ideas?

    By the way thank you very much for your time and efforts with this, I really appreciate it.
    Last edited by earthone; 11-08-09 at 12:28 AM.

  12. #12
    Join Date
    Apr 2008
    Posts
    18

    Default

    Its weird because the logic in the above makes since, it seems all im doing is parsing a simple number from the group id and adding it to the .html to get 1.htm, but it don't seem to be working that way.

  13. #13
    Join Date
    Apr 2008
    Posts
    18

    Default

    Ok so I use an ssl in the area where the script installed. I noticed that when the url is https the code changes to index.php?page=1 or the page doesnt display as 1.html so now I need to figure out how to fix this as I think this is the problem

  14. #14
    Join Date
    Apr 2008
    Posts
    18

    Default

    Alright Ive been working on this more than 4 hours now and I can see the problem but just cant get to it.

    If anyone can help id really appreciate it. Thank you.

  15. #15
    Join Date
    Apr 2008
    Posts
    18

    Default

    Ok so ive made a little progress, I figured out that if I add
    Code:
    {if $groupid == "1"}
    testing
    {/if}
    To the page manager and
    Code:
    {php}
    $userid=$_SESSION["uid"];
    $result=select_query("tblclients","groupid",array( "id"=>$userid));
    $data = mysql_fetch_array($result);
    $groupid = $data["groupid"];
    $this->assign('groupid',$groupid);
    {/php}
    to the pagemanager index.tpl I can get it to show the content only for that group. So now this works great.

    Now figure out how to make a link to each. I want to use the $groupid in the link to change to their group when they click the link, but I haven't figured that much out yes.

    Any ideas?

    Thanks again.

Page 1 of 2 12 LastLast

Similar Threads

  1. Gym membership system
    By jrnetwork in forum Pre-Sales Questions
    Replies: 1
    Last Post: 09-18-11, 07:11 PM
  2. Custom membership site
    By [email protected] in forum Customisation & Integration Questions
    Replies: 0
    Last Post: 07-21-11, 09:33 PM
  3. Use WHMCS For Membership Systems
    By UNIXIELHOST in forum Customisation & Integration Questions
    Replies: 0
    Last Post: 06-14-09, 03:55 PM
  4. Membership Service
    By rmesa4748 in forum Customisation & Integration Questions
    Replies: 0
    Last Post: 02-03-08, 02:57 AM