Global login for the site + forum

For support and discussion related to templates, themes, and imagesets in phpBB 3.0.
Ideas Centre
Goemans
Registered User
Posts: 116
Joined: Fri Feb 20, 2009 6:55 pm

Global login for the site + forum

Post by Goemans »

Hi, I am using a phpBB forum and got the following issue: for my site, I also need a login for certain functions, so I got an easy login system for the site. Only, I'd like the forum's and the site's login to be the same, so when logging in on the forum, you should be logged in on the site as well, and vice versa. So I had a look at the ucp.php code, but it was way too complicated for me. So I'd like some help with it, I'd be very grateful if anybody could tell me how to do this. Thanks in advance!
User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 51553
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: Global login for the site + forum

Post by stevemaury »

For REALLY good and VERY inexpensive hosting CLICK HERE

I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)
Goemans
Registered User
Posts: 116
Joined: Fri Feb 20, 2009 6:55 pm

Re: Global login for the site + forum

Post by Goemans »

Thank you, but it's not yet all that I need. When somebody logged in on the site, it was an admin, cause only admins have accounts on the site. So, when logged in, a page was shown with links to possible actions - add a news item, etc. If I do it this way, the user should be redirected to a page that checks if the user has admin permissions, and if so, displays this list.
User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 51553
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: Global login for the site + forum

Post by stevemaury »

Code: Select all

<!-- IF U_ACP -->List of links <!-- ENDIF -->
For REALLY good and VERY inexpensive hosting CLICK HERE

I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)
Goemans
Registered User
Posts: 116
Joined: Fri Feb 20, 2009 6:55 pm

Re: Global login for the site + forum

Post by Goemans »

But that will display the list to any logged in user. How can I verify whether a user logging in is an admin or not?
User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 51553
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: Global login for the site + forum

Post by stevemaury »

No, it won't. It will only display to admins.
For REALLY good and VERY inexpensive hosting CLICK HERE

I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)
Goemans
Registered User
Posts: 116
Joined: Fri Feb 20, 2009 6:55 pm

Re: Global login for the site + forum

Post by Goemans »

O, that's nice. And where in the ucp.php code should I dump that line?
User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 51553
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: Global login for the site + forum

Post by stevemaury »

It goes in the HTML of wherever you want it to appear - wherever the links go.
For REALLY good and VERY inexpensive hosting CLICK HERE

I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)
Goemans
Registered User
Posts: 116
Joined: Fri Feb 20, 2009 6:55 pm

Re: Global login for the site + forum

Post by Goemans »

I want it to be underneath the text "You have successfully logged in". I can't find where it says that in the code of ucp.php because of the use of variables. Could you tell me the line number/the precedent line(s)?
User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 51553
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: Global login for the site + forum

Post by stevemaury »

I don't think you want it there because that page is only displayed for a few seconds.

Why not put it in overall_header.html so it will be visible (to admins only) on every page? Or in index_body.html.
For REALLY good and VERY inexpensive hosting CLICK HERE

I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)
Goemans
Registered User
Posts: 116
Joined: Fri Feb 20, 2009 6:55 pm

Re: Global login for the site + forum

Post by Goemans »

Does this overall_header.php exist or should I create it? 'cause I can't find it.
Goemans
Registered User
Posts: 116
Joined: Fri Feb 20, 2009 6:55 pm

Re: Global login for the site + forum

Post by Goemans »

O sorry, of course they exist. Although, when I put it in there, I don't see anything. To test I put this in '<span>LOL</span>', and that didn't appear on the webpage either. Edit: even when I remove one of the 2 files, nothing happens!
User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 51553
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: Global login for the site + forum

Post by stevemaury »

In order to see template changes, you must Refresh the Style's template in the ACP, Styles tab.

Or easier, if you are going to make a lot of edits, is in Load settings, set Recompile stale style components to YES, then change it back when you are done.
For REALLY good and VERY inexpensive hosting CLICK HERE

I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)
Goemans
Registered User
Posts: 116
Joined: Fri Feb 20, 2009 6:55 pm

Re: Global login for the site + forum

Post by Goemans »

Thanks. How can I make a red span underneath the menu, like how the forum rules are sometimes displayed above a topic (I'd like to put the links in that).
User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 51553
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: Global login for the site + forum

Post by stevemaury »

Specific HTML/CSS questions should be in Styles support. I will move this.
For REALLY good and VERY inexpensive hosting CLICK HERE

I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)
Locked

Return to “[3.0.x] Styles Support & Discussion”