Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
themes-topic
Overlay Problem
Avatar
Midget3k
Member
Free Members
Offline
Feb 2, 2015 - 3:51 pm

Hi guys,

 

A little confused. I've been using a child theme for a while. I'm using a default child for desktop and unified child for mobile devices. 

Both are fully functional, but i'm struggling with the default child overlay. My custom overlay does not display correctly using the child theme unless I do one of the following:

a) put a copy of the custom overlay in the default\styles\overlays directory (defeating the purpose of using child theme?!?)

b) copy the entire contents of the default\styles\default.php to my child theme version. I was under the assumption I needed this file, renamed the same as the child theme, but I didn't need to include all the css unless it was parts I had made changes too? This is what I have working with my unified child theme.

I'm probably missing something obvious....

 

Cheers

 

PS, just realised the breadcrumbs aren't working either. Using the following  

#spMainContainer #spBreadCrumbs { font-size: 0.85em; line-height: 1.2em; margin-left: 2px; min-width: 75%; } #spMainContainer #spBreadCrumbs span.spBreadCrumbs { margin-left: 17px; min-height: 2px; } #spMainContainer #spBreadCrumbs a { color: #6699CC; display: block; float: left; font-family: inherit; font-size: 0.9em; font-weight: inherit; height: 34px; line-height: 34px; margin-right: -8px; padding: 0 18px 0 15px; position: relative; text-decoration: none; text-transform: capitalize; } #spMainContainer #spBreadCrumbs a:first-child { padding-left: 11px; } #spMainContainer #BreadcrumbPosition2 { background: url("images/breadCrumbArr2.png") no-repeat scroll right 2px transparent; } #spMainContainer #BreadcrumbPosition2:hover { background: url("images/breadCrumbArr2.png") no-repeat scroll right 2px transparent; } #spMainContainer #BreadcrumbPosition3 { background: url("images/breadCrumbArrCombined.png") no-repeat scroll right 2px transparent; } #spMainContainer #BreadcrumbPosition3:hover { background: url("images/breadCrumbArrCombined.png") no-repeat scroll right -38px transparent; color: #C0C0C0; } #spMainContainer #BreadcrumbPosition4 { background: url("images/breadCrumbArrCombined.png") no-repeat scroll right 2px transparent; } #spMainContainer #BreadcrumbPosition4:hover { background: url("images/breadCrumbArrCombined.png") no-repeat scroll right -38px transparent; color: #C0C0C0; } #spMainContainer #BreadcrumbPosition5 { background: url("images/breadCrumbArrCombined.png") no-repeat scroll right 2px transparent; } #spMainContainer #BreadcrumbPosition5:hover { background: url("images/breadCrumbArrCombined.png") no-repeat scroll right -38px transparent; color: #C0C0C0; } #spMainContainer #BreadcrumbPosition6 { background: url("images/breadCrumbArrCombined.png") no-repeat scroll right 2px transparent; } #spMainContainer #BreadcrumbPosition6:hover { background: url("images/breadCrumbArrCombined.png") no-repeat scroll right -38px transparent; color: #C0C0C0; } #spMainContainer #BreadcrumbPosition7 { background: url("images/breadCrumbArrCombined.png") no-repeat scroll right 2px transparent; } #spMainContainer #BreadcrumbPosition7:hover { background: url("images/breadCrumbArrCombined.png") no-repeat scroll right -38px transparent; color: #C0C0C0; } #spMainContainer #spAck img.spIcon, #spMainContainer #spBreadCrumbs img.spIcon { padding: 0 3px; }
Avatar
Ike
Sawtry, UK
Member
Free Members
Offline
Feb 2, 2015 - 6:36 pm

Hey Midget3k,

Nope you're not missing the obvious! There is a bit of a catch with child theme overlays and you hit the nail on the head in point 'a)' i.e if the custom overlay doesn't have a parent, it breaks.. It has been fixed in core for version 5.5.4 to better support, but the only theme that currently makes use of the fix is the one we are running here in beta.

You can make the changes yourself, you just need to add a couple of lines of code to your parent themes. This should be pretty safe as when the update does roll out, you won't have to worry about things breaking as the code will be the same so they should continue to work just fine.

First off open your parent themes spFunctions.php file (forum-themes > templates > spFunctions.php) and add this line:

add_theme_support('sp-theme-child-overlays');

Next open your parent themes stylesheet (forum-themes > default > styles > default.php) and see at the top - the first thing that happens is the overlay is loaded, you want to remove that line (or comment out for backup) and replace it with:

if (!empty($_GET['color'])) include($_GET['color']);

This should now enable you to use a custom overlay that only exists in the child theme, named whatever you'd like.

Please note a couple of things though, because this custom overlay you are using won't have a parent, it will need to be 100% complete. And also I don't know what version you are running but it will need to be 5.5.4 to work.

You can then do the same for unified.

Could you provide more info on the breadcrumbs? What problem are you having with them?

Hope this helps, let us know how you get on.

Avatar
Midget3k
Member
Free Members
Offline
Feb 5, 2015 - 4:02 pm

Thanks Ike,

As always the support on here is second to none.

 

child overlays are working perfectly now.

 

Okay for the breadcrumbs:

I think the SP site deals with breadcrumbs differently than it used to, but you used to have breadcumbs on one line with the breadcrumb image changing on hover.

2.pngImage Enlarger

Here's where it came from

I've solved the problem now but has left me a little confused. The information for making the child theme says to rename the css file from default.php to the same as your theme e.g. mytheme.php.

1.pngImage Enlarger

When I do this the breadcrumbs stop working and simple:press backend says I'm missing a css file. Anyway i've rename the child css back to default.php, just put the modified css into it, and all is working fine.

I'm sure I probably mis-read something along the lines!

Avatar
Ike
Sawtry, UK
Member
Free Members
Offline
Feb 5, 2015 - 5:48 pm

No problem happy to help.

Have you updated spTheme.txt in the root of the child theme folder? It has a specific line for the stylesheet and I think if that's still looking for default.php you'll get the error described.

Avatar
Midget3k
Member
Free Members
Offline
Feb 5, 2015 - 6:32 pm

I thought that and have just double checked.

When the spTheme.txt and the specific line within it were the same and matched the stylesheet file name breadcrumbs didn't work. But keeping all else the same and just changing stylesheet file name back to default.php worked fine...!

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
Offline
Feb 5, 2015 - 9:19 pm

there are many ways to do breadcrumbs... we do not do default here...

you  might check your spFunctions.php file of your sp theme and make sure its all good if using special breadcrumbs...

there is an option for it all on one line or tree style...  see:  https://simple-press.com/docum.....eadcrumbs/

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 620
Members: 17365
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10128
Posts: 79626