vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Show Thread Enhancements - Post Body CSS For Specified Users (https://vborg.vbsupport.ru/showthread.php?t=324881)

MarkFL 04-04-2017 09:00 PM

Post Body CSS For Specified Users
 
1 Attachment(s)
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/attachmen...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:
  1. Download and extract the attached .zip file.
  2. Follow AdminCP -> Plugins & Products -> Manage Products -> Add/Import Product.
  3. Click on "Choose File" and browse to the product .xml file that was packaged in the .zip file.
  4. Click "Import."
  5. You MUST enable the product in the settings before it will function.
  6. Configure the remaining settings to your liking. Each setting has a detailed explanation of its use.

https://vborg.vbsupport.ru/attachmen...1&d=1491500000

Support for this product can be found here:

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

Quote:

Originally Posted by final kaoss (Post 2584915)
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

Quote:

Originally Posted by MajorKokosnuss (Post 2588024)
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.

Quote:

Originally Posted by concepts (Post 2588044)
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

1 Attachment(s)
Minor bug...

Code:

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.
Attachment 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.

Attachment 156736

MarkFL 11-21-2017 12:29 AM

Quote:

Originally Posted by BrettC Frontier (Post 2591189)
Minor bug...

Code:

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.
Attachment 156735

In the plugin titled "Set User As Specified If Applicable" comment out the line:

PHP Code:

        //$post['message'] = html_entity_decode('<div style="' . $added_css . '">') . $post['message'] . html_entity_decode('</div>'); 

This should fix the issue with that.

Quote:

Originally Posted by BrettC Frontier (Post 2591189)
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.

Attachment 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
Code:

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...
Code:

($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

1 Attachment(s)
Those scripts have no issues with this product active for me. The condition:

PHP Code:

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.


All times are GMT. The time now is 07:14 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01173 seconds
  • Memory Usage 1,755KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (2)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (13)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete