Profile Tweaks

gary.moncrieff
gary.moncrieff
@garymoncrieff
10 years ago
865 posts
Hey

Following the latest update I had hoped from the changelog

Version 1.3.3:
- Bug Fix: Check to see if the include skin file exist before requiring it.

that it sorted the issue with skins still needing the header.tpl, footer.tpl, meta.tpl, header_menu_desktop.tpl and header_mobole_menu.tpl files rather than checking the default skin folder for these.

This all means that currently we have to include and rework all those templates where in theroy all we should need is the profile templates.

To recreate this? Delete the above files from a skins directory, set the skin as your profile skin and you will see errors.
updated by @garymoncrieff: 06/08/15 08:08:59AM
michael
@michael
10 years ago
7,816 posts
That bug fix was for when there was a folder in the skins folder that was not really a skin:
/skins/jrNova
/skins/jrElastic
/skins/not-really-a-skin

Each of those folders is expected to be a skin. A skin is required to have an /include.php file, so the profileTweaks module was requiring that file. Since 'require' means "get that file or continue no further" that folder that was not really a skin not having an include.php file was causing the system to stop.

The fix was before requiring the include.php file, first check that it actually exists.

Whats the issue your wanting fixed?

Sounds like your wanting to be able to do a sort of sub-skin creation system.
PARENT SKIN:
/skins/jrElastic/

CHILD SKIN:
/skins/xxOtherSkin

Where if there isn't a file in /xxOtherSkin, then /jrElastic is checked for the existence of that file.

I've seen something similar when using Drupal.
gary.moncrieff
gary.moncrieff
@garymoncrieff
10 years ago
865 posts
Me and Brian discussed this in PM before and when I raised it he said something weird was going on. Basically if a skin is purefuly for a new profile layout it shouldnt require any other templates and should check the default skin folder for those.

The reason behind this is if you use profile tweaks today, you have to set up the menu in multiple templates, set your header across multiple etc etc.
michael
@michael
10 years ago
7,816 posts
Not confident I'm understanding.

I think im hearing:
* create a new skin as an option for Profile Tweak users to choose from,
* in the new skin, just put profile_*.tpl files
* select it in a profile as the desired skin

DESIRED:
The skin will show with the main skins header and footer

ACTUAL:
Something breaks because the profile only skin doesn't have its own header/footer.

Is that the issue?
gary.moncrieff
gary.moncrieff
@garymoncrieff
10 years ago
865 posts
Yes when using a skin purely to change the profile there should be no dependencies on templates existing. If someone wanted to override some area of a default skin then sure they are free to add template files in.

Hope that makes it clearer
updated by @garymoncrieff: 05/01/15 11:57:30PM
brian
@brian
10 years ago
10,149 posts
I understand what Gary is getting at here, and I believe it is supposed to work this way, but the change that has been made to the Profile Tweaks is going to prevent it from working correctly so we will get this fixed up.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net

Tags