Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions
  #1  
Old 01-25-2018, 01:03 PM
martin1's Avatar
martin1 martin1 is offline
 
Join Date: Feb 2010
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default change usercp settings when specific style is set

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?
Reply With Quote
  #2  
Old 01-25-2018, 03:51 PM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You could do that with some CSS in the additional.css template for that particular style. For example, try:

Code:
.signaturecontainer, .postuseravatar {
	display: none !important;
}
This will disable signatures and avatars...I'm not sure what images you are wanting to disable.
Reply With Quote
  #3  
Old 01-25-2018, 07:46 PM
martin1's Avatar
martin1 martin1 is offline
 
Join Date: Feb 2010
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #4  
Old 01-26-2018, 12:24 AM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Okay, try this:

Code:
.signaturecontainer, .postuseravatar, .content img:not(.inlineimg) {
	display: none !important;
}
This will disable all images except smilies.
Reply With Quote
  #5  
Old 01-26-2018, 05:48 AM
martin1's Avatar
martin1 martin1 is offline
 
Join Date: Feb 2010
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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!
Reply With Quote
  #6  
Old 01-26-2018, 06:48 AM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by martin1 View Post
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:

PHP Code:
if (STYLEID == XX)
{
    
$show['avatar'] = 0;
    
$post['signature'] = 0;
    require_once(
DIR '/includes/class_bbcode.php');
    
$bbcode_parser = new vB_BbCodeParser($vbulletinfetch_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.
Reply With Quote
Благодарность от:
blind-eddie
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:34 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.06897 seconds
  • Memory Usage 2,217KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (1)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (6)post_thanks_box
  • (1)post_thanks_box_bit
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (6)post_thanks_postbit_info
  • (6)postbit
  • (6)postbit_onlinestatus
  • (6)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete