vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Show Thread Enhancements - [OzzModz] Postbit Background For Specific Users (https://vborg.vbsupport.ru/showthread.php?t=301599)

ozzy47 09-03-2013 01:38 AM

Ahh, I dunno I will see what I can come up with.

As far as what I had originally said, I think it is a bad idea, as the posts could get awful ugly looking if users were allowed to add the images.

ozzy47 09-03-2013 02:04 AM

Ok I found a way to do it, in your style open your CSS templates, then find editor.css.

Find this bit of code:
Code:

.texteditor.forum .cke_skin_kama textarea.cke_source,
.texteditor.forum textarea {
    color: {vb:stylevar editor_text_color};
    font: {vb:stylevar postbit_font};
    white-space:pre-wrap;
    background: {vb:stylevar editor_background};
}

Replace it with this:
Code:

.texteditor.forum .cke_skin_kama textarea.cke_source,
.texteditor.forum textarea {
    color: {vb:stylevar editor_text_color};
    font: {vb:stylevar postbit_font};
    white-space:pre-wrap;
    background-color: {vb:stylevar editor_background};
    background: url(images/chain_gradient.jpg); no-repeat;
}

Of course change chain_gradient.jpg to your image that you want to use. And load your image that you want to use to your images folder.

ozzy47 09-03-2013 03:13 AM

Actually not that I think about it, you can have a background image in the editor by editing the stylevar, editor_background by entering the following in the Background Image field:

Code:

url(images/chain_gradient.jpg)
Of course change chain_gradient.jpg to your image that you want to use. And load your image that you want to use to your images folder.

heyzeus909 09-09-2013 06:08 PM

Rather than individual members, can usergroup (s) be employed? For example, I could see using this to watermark postbits with a 'Subscriber' logo for members with paid subscriptions. The idea would be that once someone subscribes, they are automatically put into a "subscriber" usergroup, and thus have their postbits denoted as such. Thereby encouraging others to also subscribe.

ozzy47 09-09-2013 08:24 PM

Quote:

Originally Posted by heyzeus909 (Post 2444454)
Rather than individual members, can usergroup (s) be employed? For example, I could see using this to watermark postbits with a 'Subscriber' logo for members with paid subscriptions. The idea would be that once someone subscribes, they are automatically put into a "subscriber" usergroup, and thus have their postbits denoted as such. Thereby encouraging others to also subscribe.

Sure I believe this will work for usergroups.

Change the following line, which is the fist bit in the code.

Code:

<vb:if condition="in_array($post['userid'], array(X,X,X))">
To this:

Code:

<vb:if condition="is_member_of($post, X,X,X)">
X being the usergroupid, if that does not work let me know and I will test it out.

ozzy47 10-10-2013 11:08 AM

There is no real update, I just removed the code from the first post, and put it into a txt file.

yardimpaylas 10-24-2013 10:50 PM

Very good thanks :)

ozzy47 10-24-2013 10:51 PM

Quote:

Originally Posted by yardimpaylas (Post 2455962)
Very good thanks :)

Thanks, don't forget to mark as installed if you are using it. :)

Cusski 11-04-2013 02:31 PM

You can see this on default skin in any of the threads here http://www.sattvhelp.com/forum/forum...p/9-Other-news

Cusski 11-04-2013 02:53 PM

Quote:

Originally Posted by ozzy47 (Post 2444487)
Sure I believe this will work for usergroups.

Change the following line, which is the fist bit in the code.

Code:

<vb:if condition="in_array($post['userid'], array(X,X,X))">
To this:

Code:

<vb:if condition="is_member_of($post, X,X,X)">
X being the usergroupid, if that does not work let me know and I will test it out.

I have edited in this way, to change from the userid of our bot, to the usergroup that contains the bot, and it works fine


All times are GMT. The time now is 08:26 AM.

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.01291 seconds
  • Memory Usage 1,741KB
  • 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
  • (7)bbcode_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete