Michal Szafranski Posted December 30, 2023 Share Posted December 30, 2023 Hi, I'm migrating my old forum from plugin "Post Formatting per User Group" to new "Highlight Post Per User Group" app (1.3.1). I can't migrate one setting which is crucial to look & feel of my forum. Previously I had a nice shadow in the color of border around specific group member posts. After migration I can't bring this back and I don't know where I can modify the code / CSS to get such effect. OLD & expected formatting: And NEW formatting after migration: Please, let me know where I can add this nice shadow or how can I turn it on. Thanks! Quote Link to comment Share on other sites More sharing options...
A Zayed Posted December 30, 2023 Share Posted December 30, 2023 Hello Michael, This shadow effect was manually added to your old setup. However, I liked the idea and added it to version 1.3.2. Please download the latest application version, try it and feedback. Tip Me! Quote Link to comment Share on other sites More sharing options...
Michal Szafranski Posted December 30, 2023 Author Share Posted December 30, 2023 Thanks @A Zayed! I'm downloading and checking it right now. 1 Quote Link to comment Share on other sites More sharing options...
Michal Szafranski Posted December 30, 2023 Author Share Posted December 30, 2023 @A Zayed It seems that something is broken. Version 1.3.1 worked OK, but 1.3.2 gives errors in my test environment. Screen attached. There is a shadow, but different one than I used to have. Would it be possible to add another setting in options that would allow me to add custom shadow CSS? In example: there could be a text-box in options "Custom shadow style:" and I would fill the text box with: box-shadow: 0px 1px 8px #311b6a !important; or box-shadow: 0px 1px 8px 1px rgba( 49,27,106, 0.6 ) !important; What do you think? Would that be possible? It would allow me to set different parameters for different user groups and even different shadow color (from border color) for each group. BTW: currently in the 1.3.2 plugin shadow is different from what I used to have. Comparison (old = left, new 1.3.2 = right): New one looks like solid second frame and old one - more like a disappearing shadow (I liked that). Looking forward for info! Quote Link to comment Share on other sites More sharing options...
Michal Szafranski Posted December 30, 2023 Author Share Posted December 30, 2023 (edited) @A Zayed I think I found the reason of errors: when "Consider Secondary Group" is enabled in 1.3.2 then plugin gives errors. After disabling of this option - there are no errors generated. Anyway - it would be great to have "custom shadow CSS" option added. Thanks! Edited December 30, 2023 by Michal Szafranski Quote Link to comment Share on other sites More sharing options...
A Zayed Posted December 30, 2023 Share Posted December 30, 2023 Thanks @Michal Szafranski for figuring the secondary groups issue. This should be fixed in version 1.3.3 Also, to adjust the shadow effect, I moved the styling to a separate phtml template, so that you can modify it. Feel free to modify the below styling in these templates: highlightpost => front => styling => postsListing Modify the highlighted line, (It's written in the template twice) Tip Me! Quote Link to comment Share on other sites More sharing options...
Michal Szafranski Posted December 30, 2023 Author Share Posted December 30, 2023 Thank you very much @A Zayed! Have a great New Year! 1 Quote Link to comment Share on other sites More sharing options...
Michal Szafranski Posted January 9 Author Share Posted January 9 Hi @A Zayed! Unfortunately 1.3.3 is throwing exceptions on my site. As I'm not developer I asked my dev friend to check what might be the reason and he pointed me to this part of code: $parent = parent::getStore(); $custom = iterator_to_array( \IPS\Db::i()->select( '*', 'highlightpost_groups' )->setKeyField( 'g_id' ) ); $new_groups = array(); /* Updating Caches */ foreach( $parent as $k => $v ) { if( isset( $custom[ $k ] ) ) { $new_groups[$k] = array_merge(\IPS\Data\Store::i()->groups[$k], array( 'posts_bg' => $custom[ $k ]['posts_bg'], 'posts_border' => $custom[ $k ]['posts_border'], 'posts_color' => $custom[ $k ]['posts_color'] ) ); } else { $new_groups[$k] = array_merge(\IPS\Data\Store::i()->groups[$k], array( 'posts_bg' => "", 'posts_border' => "", 'posts_color' => "" ) ); } } \IPS\Data\Store::i()->groups = $new_groups; return \IPS\Data\Store::i()->groups; I asked for clarification and he said that your code doesn't properly write data to variable: \IPS\Data\Store::i()->groups Could you please check this code and make sure that the format and content is given in proper way? I don't know whether this diagnosis is OK as I'm not developer - just forwarding information I received from my buddy. I hope it helps. I'm looking forward for info! Quote Link to comment Share on other sites More sharing options...
Michal Szafranski Posted January 9 Author Share Posted January 9 And one more thing @A Zayed. Currently I can't access "Posts Formatting" tab on Blocked Users group (without access to page), however it would be great to show this tab also there, as I would like to set different color of background for posts of blocked users. Thanks! Quote Link to comment Share on other sites More sharing options...
A Zayed Posted January 9 Share Posted January 9 7 hours ago, Michal Szafranski said: Hi @A Zayed! Unfortunately 1.3.3 is throwing exceptions on my site. As I'm not developer I asked my dev friend to check what might be the reason and he pointed me to this part of code: $parent = parent::getStore(); $custom = iterator_to_array( \IPS\Db::i()->select( '*', 'highlightpost_groups' )->setKeyField( 'g_id' ) ); $new_groups = array(); /* Updating Caches */ foreach( $parent as $k => $v ) { if( isset( $custom[ $k ] ) ) { $new_groups[$k] = array_merge(\IPS\Data\Store::i()->groups[$k], array( 'posts_bg' => $custom[ $k ]['posts_bg'], 'posts_border' => $custom[ $k ]['posts_border'], 'posts_color' => $custom[ $k ]['posts_color'] ) ); } else { $new_groups[$k] = array_merge(\IPS\Data\Store::i()->groups[$k], array( 'posts_bg' => "", 'posts_border' => "", 'posts_color' => "" ) ); } } \IPS\Data\Store::i()->groups = $new_groups; return \IPS\Data\Store::i()->groups; I asked for clarification and he said that your code doesn't properly write data to variable: \IPS\Data\Store::i()->groups Could you please check this code and make sure that the format and content is given in proper way? I don't know whether this diagnosis is OK as I'm not developer - just forwarding information I received from my buddy. I hope it helps. I'm looking forward for info! Hello Michael, Can you share the exception error? Tip Me! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.