[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
foodclub.org • View topic - Login not working in iframe; adding your own logo in ncfc
Page 1 of 3

Login not working in iframe; adding your own logo in ncfc

PostPosted: Tue Feb 19, 2013 12:50 pm
by christiancoop
Anyone else experiencing this?
When a user enters a valid user/password the system just returns the user to the login page. No errors.
It seems to happen on Mac Safari browsers and also some other older browsers.
I do have the login page in an iframe on my website, so maybe that is part of the problem? :?:

Re: Login page not working. Returns user to blank login pag

PostPosted: Tue Feb 19, 2013 4:19 pm
by support
Foodclub login should work on all major browsers released within the past 5 years or so. It really only requires cookies, not even javascript (though other features inside Foodclub require javascript).

I am pretty sure your issue is that Safari thinks the Foodclub login cookie is a "3rd party cookie" due to you having it in an iframe. If you open up Safari Preferences, go to Privacy, you will see the default setting is to "Block cookies: From third parties and advertisers." To verify this is the cause of your problem, simply change this setting to "Never" (temporarily) and try logging in again. If login is successful, you know that's the issue.

Obviously, you probably don't want to leave the setting like this forever (or tell all your members to do it), since it opens up your browser to 3rd party cookies. You will probably need to rethink your iframe implementation.

Re: Login page not working. Returns user to blank login pag

PostPosted: Wed Feb 20, 2013 12:00 pm
by christiancoop
That makes sense. I will have to lose the iframe. Wish there was a way to better brand the UI with my own logo though.

Re: Login page not working. Returns user to blank login pag

PostPosted: Wed Feb 20, 2013 3:24 pm
by support
Really, the ideal way to brand Foodclub with your own logo is to design your own UI theme. All a theme is is a single CSS file, as you can see if you look at the HTML source when using the "ncfc" theme (default), which is all contained in http://foodclub.org/css/themes/ncfc.css.

So if you want to design your own, you can simply start adding CSS in your global CSS styles (Global settings), which will apply (cascade) after the ncfc styles, until you like it. If you end up with something different/unique enough, a new theme can be created for you (and other clubs to use, minus your logo of course).

As for using your own logo in the "ncfc" theme, the white space near the top left, just above the green nav bar was designed for a logo. You can reference your logo by URL (hosted on another site) using CSS to place it right there. I will add some sample CSS to this topic shortly that shows how to do that.

Re: Login not working in iframe; adding your own logo in ncf

PostPosted: Wed Feb 20, 2013 4:18 pm
by support

Re: Login not working in iframe; adding your own logo in ncf

PostPosted: Thu Feb 21, 2013 6:21 am
by christiancoop
Very nice! I would rather have it in the upper DIV though where the "Select Source" option is and always centered. Is that possible?

Re: Login not working in iframe; adding your own logo in ncf

PostPosted: Thu Feb 21, 2013 7:04 am
by szimmermann123
On a related topic, does anyone know how to put an image in the tab for food club that appears on the top of my screen. Most of the web sites which I go to have images associated with them. Wikipedia has a "W", Duck duck go has a pictures of a duck, etc.

Thanks,
Sally

Re: Login not working in iframe; adding your own logo in ncf

PostPosted: Thu Feb 21, 2013 7:56 am
by support

Re: Login not working in iframe; adding your own logo in ncf

PostPosted: Thu Feb 21, 2013 7:57 am
by christiancoop
Whoops! Just noticed that the above CSS code does not work because it makes the logo appear on the login page and the logo covers up the custom text I have on the login page.
I like that it appears on the login page too, just no over the top of my custom instructions! :^)

Re: Login not working in iframe; adding your own logo in ncf

PostPosted: Thu Feb 21, 2013 7:59 am
by support
Yes, Sally just reported the same problem about the login page. I just edited the above CSS to add code that hides the logo on the login page and other pages where it would not fit in (e.g. printer-friendly pages w/o nav bars).