[AP] Style Suite

[AP] Style Suite [Paid] 2.11.9

No permission to buy (€15.00)
I can't say for certain because I've not been able to test it with that theme.
My best guess is that avatar frames would look weird unless the hexagon kind of shape that theme adds is removed (or you made hexagon shaped frames yourself to replace the ones provided by the addon). Custom title, Post, Tooltip, Username styles should all work. No idea whether Postbit & Profile styles would need extra work or not.
 
@apathy Loving this addon. Thank you!
For the tooltip customization, is there any chance to have an option or custom css to edit the color of this line? (as you can see in this screenshot, its a dark blue currently by defualt)
1688734359328.webp
 
@apathy Loving this addon. Thank you!
For the tooltip customization, is there any chance to have an option or custom css to edit the color of this line? (as you can see in this screenshot, its a dark blue currently by defualt)
Sorry for the delay in getting back to you.
This should be controllable with the Tooltip border color option but I've confirmed myself the border color doesn't apply. It's thankfully a small fix so I'll have it included in the next update.

In the meantime you can modify ap_ss_tooltip_styles.less like so and it should do the trick:

Find:
Code:
                border: 1px solid {$tooltipStyle.border_color};
                
                & .button 
                {
                    border: 1px solid {$tooltipStyle.border_color};
                }

Replace with:
Code:
                border: 1px solid {$tooltipStyle.border_color};
                
                & .button 
                {
                    border: 1px solid {$tooltipStyle.border_color};
                }
            
                .memberTooltip-separator
                {
                    border-top: 1px solid {$tooltipStyle.border_color};
                }
 
I've notice since one of your most recent upgrades that some of our user post styles have a weirdly small font.

for example I see this in the css:
.ap-ss-postStyle--3414

font-size: 12px.

I've disable post styles in the admin and have set minimum font-size to 16px yet I still see them. What's weird is that it's not everyone but certain users (maybe some user group perm gone wrong). Any ideas? Is there a post styles cache rebuild I need to run?
 
I've notice since one of your most recent upgrades that some of our user post styles have a weirdly small font.

for example I see this in the css:
.ap-ss-postStyle--3414

font-size: 12px.

I've disable post styles in the admin and have set minimum font-size to 16px yet I still see them. What's weird is that it's not everyone but certain users (maybe some user group perm gone wrong). Any ideas? Is there a post styles cache rebuild I need to run?
So a known bug that's fixed in the next update is that while the Entity definition for Post styles has a default value of "12" for font size, the actual table in the database has a default value of 0. However a font size of 0 means that you just wont see the text at all, so if it's correctly defaulting to 12 for you in the CSS but it still seems too small, then that sounds like an oversight in regards to 3rd party styles/fonts compatibility.

I could try create a Style Property for a default Post Style Font Size, which would be nice because you could have a different value for each theme you have installed, but this wouldn't overwrite the default "12" found in the entity definition or the database itself, instead it would just be a prioritized value and would then fall back to the 12 that we define.

In the meantime I'd suggest modifying ap_ss_post_styles.less (untested but I see no reason this wont work):

Find:
Code:
font-size: {$postStyle.font_size}px;

Replace with:
Code:
font-size: {{ ($postStyle.font_size <= 15) ? 15 : $postStyle.font_size }}px;

This would make it so that if a user chooses a font size less than 15px, or if for some reason they were falling back to the defined default of 12, it would hardcode their font-size to 15. Or if they chose a font-size larger than 15, for instance 20px, then it would respect that and display the font at 20px.
This would of course just be a temporary workaround though because definitely users will be confused if they choose a font size of 10px but it forces their font to be 15px.
 
So a known bug that's fixed in the next update is that while the Entity definition for Post styles has a default value of "12" for font size, the actual table in the database has a default value of 0. However a font size of 0 means that you just wont see the text at all, so if it's correctly defaulting to 12 for you in the CSS but it still seems too small, then that sounds like an oversight in regards to 3rd party styles/fonts compatibility.

I could try create a Style Property for a default Post Style Font Size, which would be nice because you could have a different value for each theme you have installed, but this wouldn't overwrite the default "12" found in the entity definition or the database itself, instead it would just be a prioritized value and would then fall back to the 12 that we define.

In the meantime I'd suggest modifying ap_ss_post_styles.less (untested but I see no reason this wont work):

Find:
Code:
font-size: {$postStyle.font_size}px;

Replace with:
Code:
font-size: {{ ($postStyle.font_size <= 15) ? 15 : $postStyle.font_size }}px;

This would make it so that if a user chooses a font size less than 15px, or if for some reason they were falling back to the defined default of 12, it would hardcode their font-size to 15. Or if they chose a font-size larger than 15, for instance 20px, then it would respect that and display the font at 20px.
This would of course just be a temporary workaround though because definitely users will be confused if they choose a font size of 10px but it forces their font to be 15px.

Thanks. Weirdly only happens when I'm logged in as admin, as a guest it's not an issue.

The edit above did not help my situation btw.


Also attempted to update my personal style settings and got these below:
  • ErrorException: [E_WARNING] Undefined variable $link
  • src/addons/apathy/StyleSuite/Pub/Controller/Style.php:82
  • Generated by: Nik
  • Jul 19, 2023 at 10:10 PM

Stack trace​

#0 src/addons/apathy/StyleSuite/Pub/Controller/Style.php(82): XF::handlePhpError(2, '[E_WARNING] Und...', '/home/nginx/dom...', 82)
#1 src/XF/Mvc/Dispatcher.php(352): apathy\StyleSuite\Pub\Controller\Style->actionIndex(Object(XF\Mvc\ParameterBag))
#2 src/XF/Mvc/Dispatcher.php(259): XF\Mvc\Dispatcher->dispatchClass('apathy\\StyleSui...', 'Index', Object(XF\Mvc\RouteMatch), Object(apathy\StyleSuite\Pub\Controller\Style), NULL)
#3 src/XF/Mvc/Dispatcher.php(115): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(apathy\StyleSuite\Pub\Controller\Style), NULL)
#4 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#5 src/XF/App.php(2487): XF\Mvc\Dispatcher->run()
#6 src/XF.php(524): XF\App->run()
#7 index.php(20): XF::runApp('XF\\Pub\\App')
#8 {main}

Request state​

array(4) {
["url"] => string(24) "/account/style-settings/"
["referrer"] => string(58) "https://mysite.com/account/style-settings/"
["_GET"] => array(1) {
["/account/style-settings/"] => string(0) ""
}
["_POST"] => array(4) {
["_xfRequestUri"] => string(24) "/account/style-settings/"
["_xfWithData"] => string(1) "1"
["_xfToken"] => string(8) "********"
["_xfResponseType"] => string(4) "json"
}
}
 
So a known bug that's fixed in the next update is that while the Entity definition for Post styles has a default value of "12" for font size, the actual table in the database has a default value of 0. However a font size of 0 means that you just wont see the text at all, so if it's correctly defaulting to 12 for you in the CSS but it still seems too small, then that sounds like an oversight in regards to 3rd party styles/fonts compatibility.

I could try create a Style Property for a default Post Style Font Size, which would be nice because you could have a different value for each theme you have installed, but this wouldn't overwrite the default "12" found in the entity definition or the database itself, instead it would just be a prioritized value and would then fall back to the 12 that we define.

In the meantime I'd suggest modifying ap_ss_post_styles.less (untested but I see no reason this wont work):

Find:
Code:
font-size: {$postStyle.font_size}px;

Replace with:
Code:
font-size: {{ ($postStyle.font_size <= 15) ? 15 : $postStyle.font_size }}px;

This would make it so that if a user chooses a font size less than 15px, or if for some reason they were falling back to the defined default of 12, it would hardcode their font-size to 15. Or if they chose a font-size larger than 15, for instance 20px, then it would respect that and display the font at 20px.
This would of course just be a temporary workaround though because definitely users will be confused if they choose a font size of 10px but it forces their font to be 15px.
I had a similar issue. Some member's text font was noticeably smaller than others, and they had no idea why. I will see what happens!
 
Thanks. Weirdly only happens when I'm logged in as admin, as a guest it's not an issue.

The edit above did not help my situation btw.
Would you mind linking me to one of the affected posts? @zoldos it wouldn't hurt if you sent me one too

Also attempted to update my personal style settings and got these below:
I can't personally reproduce it but I'll include a fix that should work in the update.
 
Would you mind linking me to one of the affected posts? @zoldos it wouldn't hurt if you sent me one too


I can't personally reproduce it but I'll include a fix that should work in the update.

Interestingly enough, this appears to be a me problem. If I go in as a guest or a regular user it looks fine, as an Admin it's small font.

Each time I visit my style settings (without saving), I get the below:

  • ErrorException: [E_WARNING] Undefined variable $link
  • src/addons/apathy/StyleSuite/Pub/Controller/Style.php:82
  • Generated by: Nik
  • Jul 23, 2023 at 9:51 PM

Stack trace​

#0 src/addons/apathy/StyleSuite/Pub/Controller/Style.php(82): XF::handlePhpError(2, '[E_WARNING] Und...', '/home/nginx/dom...', 82)
#1 src/XF/Mvc/Dispatcher.php(352): apathy\StyleSuite\Pub\Controller\Style->actionIndex(Object(XF\Mvc\ParameterBag))
#2 src/XF/Mvc/Dispatcher.php(259): XF\Mvc\Dispatcher->dispatchClass('apathy\\StyleSui...', 'Index', Object(XF\Mvc\RouteMatch), Object(apathy\StyleSuite\Pub\Controller\Style), NULL)
#3 src/XF/Mvc/Dispatcher.php(115): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(apathy\StyleSuite\Pub\Controller\Style), NULL)
#4 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#5 src/XF/App.php(2487): XF\Mvc\Dispatcher->run()
#6 src/XF.php(524): XF\App->run()
#7 index.php(20): XF::runApp('XF\\Pub\\App')
#8 {main}

Request state​

array(4) {
["url"] => string(24) "/account/style-settings/"
["referrer"] => string(58) "https://mysite.com/account/style-settings/"
["_GET"] => array(1) {
["/account/style-settings/"] => string(0) ""
}
["_POST"] => array(4) {
["_xfRequestUri"] => string(24) "/account/style-settings/"
["_xfWithData"] => string(1) "1"
["_xfToken"] => string(8) "********"
["_xfResponseType"] => string(4) "json"
}
}


AND

  • Error: Macro public:ap_ss_style_settings_macros :: asset_selector() error: Call to a member function isMemberOf() on null
  • src/addons/apathy/StyleSuite/Entity/Asset.php:186
  • Generated by: Nik
  • Jul 23, 2023 at 9:50 PM

Stack trace​

#0 src/XF/Template/Templater.php(1194): apathy\StyleSuite\Entity\Asset->canUse(NULL)
#1 internal_data/code_cache/templates/l1/s0/public/ap_ss_style_settings_macros.php(48): XF\Template\Templater->method(Object(apathy\StyleSuite\Entity\Asset), 'canUse', Array)
#2 src/XF/Template/Templater.php(827): XF\Template\Templater->{closure}(Object(ThemeHouse\UIX\XF\Template\Templater), Array, NULL)
#3 src/addons/MaZ/AMP/XF/Template/Templater.php(152): XF\Template\Templater->callMacro('ap_ss_style_set...', 'asset_selector', Array, Array, Object(XF\Template\MacroState))
#4 internal_data/code_cache/templates/l1/s0/admin/ap_ss_user_edit_frame.php(10): MaZ\AMP\XF\Template\TemplaterAbstract->callMacro('public:ap_ss_st...', 'asset_selector', Array, Array)
#5 src/XF/Template/Templater.php(1654): XF\Template\Templater->{closure}(Object(ThemeHouse\UIX\XF\Template\Templater), Array, NULL)
#6 src/addons/MaZ/AMP/Traits/Templater/XF22.php(52): XF\Template\Templater->renderTemplate('ap_ss_user_edit...', Array, true, NULL)
#7 src/XF/Template/Templater.php(1683): MaZ\AMP\XF\Template\Templater->renderTemplate('admin:ap_ss_use...', Array)
#8 internal_data/code_cache/templates/l1/s0/admin/user_group_edit.php(143): XF\Template\Templater->includeTemplate('admin:ap_ss_use...', Array)
#9 src/XF/Template/Templater.php(1654): XF\Template\Templater->{closure}(Object(ThemeHouse\UIX\XF\Template\Templater), Array, NULL)
#10 src/addons/MaZ/AMP/Traits/Templater/XF22.php(52): XF\Template\Templater->renderTemplate('user_group_edit', Array, true, NULL)
#11 src/XF/Template/Template.php(24): MaZ\AMP\XF\Template\Templater->renderTemplate('admin:user_grou...', Array)
#12 src/XF/Mvc/Renderer/Html.php(50): XF\Template\Template->render()
#13 src/XF/Mvc/Dispatcher.php(460): XF\Mvc\Renderer\Html->renderView('XF:UserGroup\\Ed...', 'admin:user_grou...', Array)
#14 src/XF/Mvc/Dispatcher.php(442): XF\Mvc\Dispatcher->renderView(Object(ThemeHouse\StyleSwitch\XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#15 src/XF/Mvc/Dispatcher.php(402): XF\Mvc\Dispatcher->renderReply(Object(ThemeHouse\StyleSwitch\XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#16 src/XF/Mvc/Dispatcher.php(60): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#17 src/XF/App.php(2487): XF\Mvc\Dispatcher->run()
#18 src/XF.php(524): XF\App->run()
#19 admin.php(13): XF::runApp('XF\\Admin\\App')
#20 {main}

Request state​

array(4) {
["url"] => string(44) "/admin.php?user-groups/administrative.3/edit"
["referrer"] => string(57) "https://mysite.com/admin.php?user-groups/"
["_GET"] => array(1) {
["user-groups/administrative_3/edit"] => string(0) ""
}
["_POST"] => array(0) {
}
}
 
Last edited:
@apathy any luck getting this resolved or figured out?
Those undefined variable: $link errors are being triggered by the same thing, while I don't see why you'd be running into it (that code hasn't really changed in like 2 years and no one else has reported it), as mentioned I do have a workaround included in the next update, and that should be released on maybe monday or tuesday.
 
apathy updated [AP] Style Suite with a new update entry:

2.11.3

  • Stop filter from appearing if a postbit style exists but has no background image set
  • Fix separator not being styled by Tooltip border color
  • Fix padding of image uploader in certain instances
  • Some internal consistency cleanups
  • Convert post style font size admin options into style properties
  • Change default value of Post style font size column from 0 -> 12

Read the rest of this update entry...
 
I had to uninstall 2.11.2 as I was having issues with rebuilding jobs not completing. I then freshly installed 2.11.3, and it took awhile. Then the screen went blank, but it was still processing. I refreshed the site about 10 minutes later, and got a permissions error for the data folder (the frames folder under data). I corrected this, and attempted to install the plugin again. It worked with no errors, but the mod itself is buggy. Whenever there is a dropdown selection, it just says "None", with no other choices, on sparkles, avatar frames, etc. I gave users all the permissions to use the mod.

Very strange. Any ideas?
 
@zoldos did the assets actually import (check Appearance -> Avatar frames)? It's expected for a fresh install or an upgrade from a pre-2.10.0 version to take a long time, particularly for the Sparkles and Fonts.
If the assets imported, none of them will be visible by default, as you need to go through each of them and configure what usergroups you want them to be available for (a successful install will always have empty dropdowns until this step is completed).

See the attached, if I don't have "Administrative" or "Badgeless" ticked then this frame will not appear in the dropdown for anyone on my site.
 

Attachments

  • user_group_configure.webp
    user_group_configure.webp
    24.5 KB · Views: 6
@zoldos did the assets actually import (check Appearance -> Avatar frames)? It's expected for a fresh install or an upgrade from a pre-2.10.0 version to take a long time, particularly for the Sparkles and Fonts.
If the assets imported, none of them will be visible by default, as you need to go through each of them and configure what usergroups you want them to be available for (a successful install will always have empty dropdowns until this step is completed).

See the attached, if I don't have "Administrative" or "Badgeless" ticked then this frame will not appear in the dropdown for anyone on my site.
Ah, okay, fixed! Thanks! A quick idea though, maybe make them all enabled by default, then let the Admin decide which ones to disable, if any. It would be much easier IMO. Right now it is rather tedious to go through each one of them. Or, add checkboxes allowing the Admin to mass enable/disable them?

I also noticed a bug: When I tried to upload a username icon, it doesn't work, and my member ID card shows a broken picture holder, and the text "xxxxx''s Icon" :)
 
Ah, okay, fixed! Thanks! A quick idea though, maybe make them all enabled by default, then let the Admin decide which ones to disable, if any. It would be much easier IMO. Right now it is rather tedious to go through each one of them. Or, add checkboxes allowing the Admin to mass enable/disable them?

I also noticed a bug: When I tried to upload a username icon, it doesn't work, and my member ID card shows a broken picture holder, and the text "xxxxx''s Icon" :)
I can set them all to enabled in the next update.
Can you send me a link to your profile with the affected icon?
 
Top Bottom