• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Redirect advice

#1
Hey folks! 

I added this forum script to my site:

http://www.phpcmsframework.com/2014/05/c...r-and.html

The issues I have with it is:
1. It comes with login/register but I have those already implemented..how do fix or redirect so that folks can easily go into forum when they are within the site(no second logging or registering)

2. I want to make myself and another person admin..how to give ourselves admin privileges not only for the forum but in general? I have 90% of the site done so is it too late to place admin privileges within the site?

If these are stupid questions I'm sorry..thank ya kindly

Heart Heart ,
Mekaboo
Reply

#2
CIBB redirects to 'user/join' if the user isn't logged in. I.e. if $this->session->cibb_user_id is not set.
You can create a route in application/config/routes.php to route requests for 'user/join' to your own controller/method for the user to log in.
Example:
PHP Code:
$route['user/join'] = 'myapp/login'
In your own login script, you'll have to set the cibb_user_id in the session, on succesful login.

To give yourself and other users the administrator role, look at how CCIB is doing this. Check the ccib.sql file. You will find a table named "ccib_roles". In the "ccib_users" table, each user has a role_id. On login, the application loads the privileges for the user's role into the session. If a privilege is set to 1, it is active.
Reply

#3
(09-29-2019, 06:12 AM)Wouter60 Wrote: CIBB redirects to 'user/join' if the user isn't logged in. I.e. if $this->session->cibb_user_id is not set.
You can create a route in application/config/routes.php to route requests for 'user/join' to your own controller/method for the user to log in.
Example:
PHP Code:
$route['user/join'] = 'myapp/login'
In your own login script, you'll have to set the cibb_user_id in the session, on succesful login.

To give yourself and other users the administrator role, look at how CCIB is doing this. Check the ccib.sql file. You will find a table named "ccib_roles". In the "ccib_users" table, each user has a role_id. On login, the application loads the privileges for the user's role into the session. If a privilege is set to 1, it is active.
Thank ya so much for this great info Heart
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.