× Joomla Facebook Connect support forum

Topic-icon Template overwrite

Active Subscriptions:

None
15 years 9 months ago #4353 by kwindo
Template overwrite was created by kwindo
Hi there,

Should I be able to do a template overwrite on the "loginregister" page? I've been trying to but it's not working.

My directory structure should be ok since it's not the first overwrite I do.

I'm using JFBConnect 2.6.2
The topic has been locked.
Support Specialist
15 years 9 months ago #4357 by alzander
Replied by alzander on topic Template overwrite
Congratulations! You've found a bug. We're investigating this now, but can recreate the issue. It definitely worked at one point, but something seems to have changed in the 2.6.x releases (and subsequently 3.x).

A temporary fix is to create the override in the following directory:
/templates/YOUR_TEMPLATE/html/jfbconnect/loginregister/default.php

Note the removal of 'com_' from jfbconnect. Not sure why this is being stripped, but that's why the override isn't found. We'll put a fix in a future release, once we determine the cause.

Please let us know if this works for you or if you run into any other issues.
The topic has been locked.
Active Subscriptions:

None
15 years 9 months ago #4360 by kwindo
Replied by kwindo on topic Template overwrite
Jeej, found a bug! ;-)

Your fix worked, thanks for your fast reply.
The topic has been locked.
Support Specialist
15 years 9 months ago #4361 by alzander
Replied by alzander on topic Template overwrite
Glad it worked. We found the cause and it will be fixed in the next release. Please remember when you update that you'll need to change the template override directory to the proper /html/com_jfbconnect/loginregister/default.php

If you'd like to fix this on your own right now so you don't have to remember in the future, you'll need to modify the /components/com_jfbconnect/jfbconnect.php file.

At the top, remove these 2 lines at the top:
$option = JRequest::getCmd('option');
$option = substr($option, 4);

Then, at the toward the bottom of that file, update the following line to remove the $option variable and hardcode it to "JFBConnect":
$classname = 'JFBConnectController'.$view;

Thanks for letting us know about the issue!
The topic has been locked.
Active Subscriptions:

None
15 years 9 months ago #4373 by kwindo
Replied by kwindo on topic Template overwrite
Now that's what I call support. On your avarage saturday ;-)
Also this hack worked for me.

Might be good for you to know that I needed to do a template overwrite because of the hardcoded inline CSS in the "form" tags. Also CSS selectors in the div and the fieldsets would have made an overwrite unnessesairy.

Also for my site I change the "h1" to and "h3".

Thanks again.
The topic has been locked.
Support Specialist
15 years 9 months ago #4374 by alzander
Replied by alzander on topic Template overwrite
Wow, you're not kidding. That's an old(er) file in the JFBConnect scheme of things, and we had no clue there were no ID's or class's on anything but the inputs and labels. We'll add some to the surrounding div's on the page and each form and that should be in the RC2 release.. along with the fixed template override directory issue.

The inline styles, we'll agree, aren't perfect, but we wanted to give a standard 'good look' out of the box. In a future rev, I can see a separate stylesheet (using our fancy new selectors) which can then be overridden. We haven't received too much feedback (good or bad) on that page, so we just haven't dived into it recently.

If you have any suggestions or would like to contribute some changes to that file, we'd love to look over them and possibly integrate the changes.

Thanks again for reporting the bug. It's our job to provide great support, it's what you subscribed for! If you'd like to let others know about your experience, check out our signature.
The topic has been locked.
Support Specialist
15 years 9 months ago #4543 by mel
Replied by mel on topic Template overwrite
I just put up a new version of JFBConnect component v2.6.3 with the fix to allow for template overrides and a quick update to loginregister view to add id's/class names to some of the divs, etc.
The topic has been locked.