View Full Version : Show Thread Enhancements - Post Body CSS For Specified Users
MarkFL
04-04-2017, 09:00 PM
Overview:
This product will allow you to specify users by usergroup and/or username to be given CSS to their postbit post body content. You may also select active forums in which the product is active.
https://vborg.vbsupport.ru/attachment.php?attachmentid=156105&stc=1&d=1491375360
Updates:
Version 1.1:
Added option to preserve text color within quote/code blocks.
CSS applied to post previews as applicable.
Compatibility:
Tested and working on VB 4.2.x and may work on all 4.x versions of vBulletin.
Backup/Warning:
This product does not alter your database, however it is always good practice to make regular backups and you should make a backup before installing ANY new mod.
As always, products are USE AT YOUR OWN RISK. I will provide support and do my best to help but no absolute guarantee is offered.
To Install:
Download and extract the attached .zip file.
Follow AdminCP -> Plugins & Products -> Manage Products -> Add/Import Product.
Click on "Choose File" and browse to the product .xml file that was packaged in the .zip file.
Click "Import."
You MUST enable the product in the settings before it will function.
Configure the remaining settings to your liking. Each setting has a detailed explanation of its use.
https://vborg.vbsupport.ru/attachment.php?attachmentid=156133&stc=1&d=1491500000
Support for this product can be found here:
MHB - Post Body CSS For Specified Users (http://mathhelpboards.com/vbulletin-products-61/post-body-css-specified-users-21711.html)
TAZ - Post Body CSS For Specified Users (https://theadminzone.com/threads/post-body-css-for-specified-users.144954/)
Stratis
04-06-2017, 05:42 AM
Very nice Mark, is there a way not to change the quote message from other user in the post? that is included. As i see it effect the quotes to.
MarkFL
04-06-2017, 03:36 PM
Update - Version 1.1:
Added option to preserve text color within quote/code blocks.
CSS applied to post previews as applicable.
final kaoss
04-06-2017, 05:40 PM
Now it only needs to have the ability to let a user choose a picture to use as background and permission checks to see if their group has that option available.
MarkFL
04-06-2017, 05:51 PM
Now it only needs to have the ability to let a user choose a picture to use as background and permission checks to see if their group has that option available.
You could define the appropriate CSS for any user to do that as is. This product doesn't allow users to define their post body CSS (for obvious reasons), this is done by an admin within the product settings.
MajorKokosnuss
07-01-2017, 09:27 AM
Is it possible to make the same thing for Borders? I have the issue, that the text gets a border aswell.
https://vborg.vbsupport.ru/external/2017/07/1.png
concepts
07-02-2017, 04:18 AM
What about CMS posts? Only for Showthread?
MarkFL
07-08-2017, 01:32 PM
Is it possible to make the same thing for Borders? I have the issue, that the text gets a border as well.
Without knowing what you have in the product settings, or a link to the page in question, I can't provide help.
What about CMS posts? Only for Showthread?
Yes, as it is written, this product does not affect CMS.
BrettC Frontier
11-20-2017, 11:05 PM
Minor bug...
all|5,6,9|background:rgba(18, 18, 18, 0.90) url('https://forum-cdn.domain.tld/BackgroundFade1.png')
The background (and all of the css for that matter) is duplicated in postbit_legacy.
156735
Couple other things...
1) Is there a way to add in a user-selectable toggle on reply/post to show/hide said markup?
2) Possible for a third input row in the ACP for direct CSS tagging?
Essentially, rather inline CSS like the addon does, it would add in a blurb to the class="" element within the html div called 'postbody'. In the ACP, would end up with something like this as a third input row: all|5,6,9|flare_moderator. Where flare_moderator is taken as literal text and injected to the <div class="postbody" section, to the right of postbody, and left of the double quote.
156736
MarkFL
11-21-2017, 12:29 AM
Minor bug...
all|5,6,9|background:rgba(18, 18, 18, 0.90) url('https://forum-cdn.domain.tld/BackgroundFade1.png')
The background (and all of the css for that matter) is duplicated in postbit_legacy.
156735
In the plugin titled "Set User As Specified If Applicable" comment out the line:
//$post['message'] = html_entity_decode('<div style="' . $added_css . '">') . $post['message'] . html_entity_decode('</div>');
This should fix the issue with that.
Couple other things...
1) Is there a way to add in a user-selectable toggle on reply/post to show/hide said markup?
2) Possible for a third input row in the ACP for direct CSS tagging?
Essentially, rather inline CSS like the addon does, it would add in a blurb to the class="" element within the html div called 'postbody'. In the ACP, would end up with something like this as a third input row: all|5,6,9|flare_moderator. Where flare_moderator is taken as literal text and injected to the <div class="postbody" section, to the right of postbody, and left of the double quote.
156736
At the moment, I don't have any plans to add any features to this product. I don't see it as being worth developing any further. :)
BrettC Frontier
11-21-2017, 05:27 AM
Small report, this seems to be an issue with activity.php and how it's polling for forum data with the addon active.
template_render_output hook is causing the Forum Name text, and the forum ID to not render on activity.php. It's completely stripped out, everything else is displayed.
Adding in AND !in_array(THIS_SCRIPT, array('activity', 'usercp') at the end of the first if (line 3) of Quick Reply/Edit appears to have resolved the issue - as weird as it seems.
Script effectively becomes this... ($vbulletin->options['markfl_pbsu_active'] AND ($vbulletin->options['markfl_pbsu_usergroups'] OR $vbulletin->options['markfl_pbsu_users']) AND in_array(THIS_SCRIPT, array('editpost', 'newreply')) AND array_intersect(explode(',', $foruminfo['parentlist']), explode(',', $vbulletin->options['markfl_pbsu_forums'])) AND in_array($this->template, array('postbit', 'postbit_legacy')) AND !in_array(THIS_SCRIPT, array('activity', 'usercp'))
MarkFL
11-21-2017, 06:07 AM
Those scripts have no issues with this product active for me. The condition:
in_array(THIS_SCRIPT, array('editpost', 'newreply'))
already keeps the plugin from executing if THIS_SCRIPT is not in the given array, so adding that new condition should have no effect.
On reviewing the difference between the current version and the version here, I now see what is likely the issue. I have updated the product at the sites on which I offer support (in my signature).
I am attaching this update here to this post.
MarkFL
11-21-2017, 05:58 PM
Version 1.2 introduced a new issue, which I have resolved in version 1.2.1 and can be found on the sites on which I actively provide support.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.