Support Forum
OK, not exactly sure how to phrase this. Will try a few ways to be clear, then explain what I need to do...
1. Is there a way to remove or override parent overlays with plain CSS in a child theme?
2. Would I have to create a custom version of Reboot to remove all the overlays, or is there a way to override them and just use CSS in the child theme?
2b. Which would be the preferred method to have minimal edite when parent theme is updated?
3. Is there or will there be a CSS Only version of Reboot any time soon? (hint, hint.)
So... I'm trying to limit the amount of PHP requests avery time the Forums load. I have no need for all the overlays in Reboot, but the stylesheet is filled with PHP to call numerous colors and styles.
I do see this in spFunctions.php:21-22
# add support for child overlays add_theme_support('sp-theme-child-overlays');
Just wondering if this is relative. Can I just comment this out in the child file to remove the overlays? If so, would I then just edit the various sylesheets on /styles:
- reboot-mobile.php
- reboot-rtl.php
- reboot.php
Any other files call styles from the overlays?
Or, am I just way off track here?
NOTE: To achieve my current child theme design, I have edited the following (in addition to a few templates)...
- /rebootkid/styles/overlays/light-matte.php
- /rebootkid/styles/rebootkid.css
Clear as mud?
Thanks in advance for any direction here! We are troubleshooting server performance issues again, and the biggest culprit seems to be PHP using a lot of resources. Hence my reasoning for removing any unnecessary functions.
Simple:Press powers the Tripawds Discussion Forums.
It's better to hop on three legs than to limp on four.
The Tripawds Blogs Community is made possible by The Tripawds Foundation.
The problem with making a CSS only Reboot is that a child will always revert back to the parent if something isn't present. So the child stylesheet would have to be basically 100% complete, and every call to a PHP variable would have to be overwritten with CSS. That should be enough but it would be a lot of work.
Of course you'd also have plugin .spcss files, the mobile and RTL which contain PHP calls (not sure on the RTL would have to double check actually).
Seeing as you'd have to replace all these PHP calls with CSS, you wouldn't need to remove the overlay theme support as the stylesheet shouldn't be looking for them any more.
Sorry if I'm off the mark there, I think I see what you are suggesting. I will certainly discuss the potential for a CSS only Reboot, consider it noted, I wonder how useful others would find it..
Hopefully Andy could enlighten us as to how resource hungry the whole child theme setup is..
Ike said
I will certainly discuss the potential for a CSS only Reboot, consider it noted, I wonder how useful others would find it..
Thanks!
It sounds like in the mean time, if I wanted to bypass all the PHP style calls, I might as well create a custom theme instead of trying to do it with a child theme. Is that what you might siggest @ike ?
Simple:Press powers the Tripawds Discussion Forums.
It's better to hop on three legs than to limp on four.
The Tripawds Blogs Community is made possible by The Tripawds Foundation.
Well logically thinking, removing all the PHP from the stylesheet, replacing it with CSS and using it as a child stylesheet sounds right, but - and it's possibly a bit of a snag - the 'get overlay' call is at the top of the parent stylesheet, so ideally I'd like confirmation from Andy or Steve if it would work, or if the overlay is just going to be loaded and not used.
I'd rather make sure before committing you to all that work 🙂
Thanks again... just hoping to find out A) Which method creates less overhead when loading pages, custom theme or child hacks; and B) Which will cause fewer headaches when parent theme is updated.
I will gladly wait for input from all, and am also interested to see if anyone else has thumbs up for a CCS Only Reboot.
Simple:Press powers the Tripawds Discussion Forums.
It's better to hop on three legs than to limp on four.
The Tripawds Blogs Community is made possible by The Tripawds Foundation.
the time to load the overlay and process it is going to be very, very small... much less than the php that is loaded and run just to load any wp page...
but you could certainly just copy the generated css file loaded on your page (ie load the css php file directly) and stick it in a css file...
but that is going to be a custom theme that you woldnt want overwritten on updates...
if there is no php in the main css file (ie reboot.php) in this custom theme, you can remove the overlay call... you also need to set the file type at the top to not be php... might be couple other... is it worth all the work? I would be very surprised if the loading time difference was even noticeable...
Visit Cruise Talk Central and Mr Papa's World
Mr Papa said
the time to load the overlay and process it is going to be very, very small...
Understood. But we're multiplying that by up to 100 users online at a time some evenings, all who like to open multiple tabs, loading lots of forum pages...
but you could certainly just copy the generated css file loaded on your page (ie load the css php file directly) and stick it in a css file...
Thanks for this tip!
Not to change the subject, but look at what I get when directly loading:
../wp-content/sp-resources/forum-themes/reboot/styles/reboot.php
Warning: include(/problem-with-post-edit-buttonome/tripawds/public_html/wp-content/sp-resources/forum-themes/reboot/styles/../..//styles/overlays/.php) [function.include]: failed to open stream: No such file or directory in /problem-with-post-edit-buttonome/tripawds/public_html/wp-content/sp-resources/forum-themes/reboot/styles/reboot.php on line 25
Warning: include() [function.include]: Failed opening '/problem-with-post-edit-buttonome/tripawds/public_html/wp-content/sp-resources/forum-themes/reboot/styles/../..//styles/overlays/.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /problem-with-post-edit-buttonome/tripawds/public_html/wp-content/sp-resources/forum-themes/reboot/styles/reboot.php on line 25
It looks like there may be an extra / in there...here is reboot.php:23-25
# load the selected color overlay stylesheet
$overlay = dirname(__FILE__).'/../../'.$_GET['theme'].'/styles/overlays/'.$_GET['overlay'].'.php';
include($overlay);
I'm surprised my overlay is even working, but then I am using a Child theme where I have a modified overlay...
but that is going to be a custom theme that you woldnt want overwritten on updates...
So it sounds like the best way to do this, if I deem it necessary, is to create a custom CSS only version of Reboot, and not bother attempting via the Child Theme?
if there is no php in the main css file (ie reboot.php) in this custom theme, you can remove the overlay call...
From spFunctions.php, I presume.
you also need to set the file type at the top to not be php...
As in just remove the opening/closing <?php tags, right?
might be couple other...
Couple other files to edit, you mean. So I just review all the files and look for any PHP I can replace with hard-coded styles? OK.
is it worth all the work?
Exactly my question. Just tossing it out there as my mission these days is to eliminate any and all unnecessary PHP and SQL queries. SimplePress and its theme are just one front I'm attacking since that is where the vast majority of our traffic is generated.
Thanks again for all the feedback and direction!
Simple:Press powers the Tripawds Discussion Forums.
It's better to hop on three legs than to limp on four.
The Tripawds Blogs Community is made possible by The Tripawds Foundation.
No, I dont think there is an extra /... what is happening is you are missing the $_GET['theme'] variable... in other words its blank...
are you running the latest SP? and reboot?
perhaps go to forum - themes - theme list and try resaving your current theme selection... pick another theme or overlay, save, then go back to what you want...
it seems perhaps your theme options record is not up to date...
Visit Cruise Talk Central and Mr Papa's World
Mr Papa said
are you running the latest SP? and reboot?
Yes, and yes.
perhaps go to forum - themes - theme list and try resaving your current theme selection...
Warnings persist at top of generated css when calling reboot.php after selecting different overlay, updating, selecting preferred overlay and saving again.
Warnings still persist, even after I select Reboot (parent) as the active theme.
FYI: I also re-saved theme and overlay for all device views, desktop, phone and tablet. Warnings are still there when viewing file:
<br /> <b>Warning</b>: include(/problem-with-post-edit-buttonome/triblogs/public_html/wp-content/sp-resources/forum-themes/reboot/styles/../..//styles/overlays/.php) [<a href='function.include'>function.include</a>]: failed to open stream: No such file or directory in <b>/problem-with-post-edit-buttonome/triblogs/public_html/wp-content/sp-resources/forum-themes/reboot/styles/reboot.php</b> on line <b>25</b><br /> <br /> <b>Warning</b>: include() [<a href='function.include'>function.include</a>]: Failed opening '/problem-with-post-edit-buttonome/triblogs/public_html/wp-content/sp-resources/forum-themes/reboot/styles/../..//styles/overlays/.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in <b>/problem-with-post-edit-buttonome/triblogs/public_html/wp-content/sp-resources/forum-themes/reboot/styles/reboot.php</b> on line <b>25</b><br /> /* # -------------------------------------------------------------------------------------- # # Simple:Press Template Reset CSS # Theme : Unified # Author : Simple:Press # # This is the reset and common class CSS file for the SP Unified theme. # # -------------------------------------------------------------------------------------- */
it seems perhaps your theme options record is not up to date...
So... putting my CSS only theme project aside, how might I go about getting rid of these warnings?
Simple:Press powers the Tripawds Discussion Forums.
It's better to hop on three legs than to limp on four.
The Tripawds Blogs Community is made possible by The Tripawds Foundation.
we need to understand why your query argument is missing... will take a look but not sure how or why... might need Andy to weigh in since he coded that up...
one thing... look in your db, table sfoptions, option name sp_current_theme and see what is listed there...
Visit Cruise Talk Central and Mr Papa's World
1 Guest(s)