View Full Version : change usercp settings when specific style is set
martin1
01-25-2018, 01:03 PM
I would love to change some user cp display settings when specific forum style is set, for example when style2 is selected, forum options under user control panel :
Visible Post Elements: all three options( show signatures, show avatars, show images) to be deactivated.
Is it somehow possible to set that?
MarkFL
01-25-2018, 03:51 PM
You could do that with some CSS in the additional.css template for that particular style. For example, try:
.signaturecontainer, .postuseravatar {
display: none !important;
}
This will disable signatures and avatars...I'm not sure what images you are wanting to disable. :)
martin1
01-25-2018, 07:46 PM
thanks, exactly what I was looking for!
The images in the threads recognized by IMG tags , that's the third option in USER CP by those two you typed.
MarkFL
01-26-2018, 12:24 AM
Okay, try this:
.signaturecontainer, .postuseravatar, .content img:not(.inlineimg) {
display: none !important;
}
This will disable all images except smilies. :)
martin1
01-26-2018, 05:48 AM
yes, it's removing the image content completely :up:
can you make it just to leave a link or code to original image external location, without actually showing the bbcode thumbnail?
LOL I was trying to find that variable whole evening!
MarkFL
01-26-2018, 06:48 AM
yes, it's removing the image content completely :up:
can you make it just to leave a link or code to original image external location, without actually showing the bbcode thumbnail?
LOL I was trying to find that variable whole evening!
That would require some actual coding. The CSS I provided is just masking things, instructing it not to be displayed, but they are still in the DOM.
Here's what I would do instead. Remove the CSS you added to the "additional.css" template. Now, create a plugin hooked at "postbit_display_complete" with the following code:
if (STYLEID == XX)
{
$show['avatar'] = 0;
$post['signature'] = 0;
require_once(DIR . '/includes/class_bbcode.php');
$bbcode_parser = new vB_BbCodeParser($vbulletin, fetch_tag_list());
$post['pagetext'] = $bbcode_parser->parse($post['pagetext'], $post['forumid'], 1);
$post['pagetext'] = html_entity_decode($post['pagetext']);
$post['message'] = $post['pagetext'];
}
Replace XX with the id of the style you wish to affect. :)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.