vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Admins and mods have different post backgrounds when posting. (https://vborg.vbsupport.ru/showthread.php?t=200727)

SiK GambleR 01-06-2009 06:15 PM

I can't seem to get it to work, any idea of what the code would be exactly? I have been toying for a little while ( I am still a noob with coding =[ )

MrEyes 01-06-2009 07:50 PM

Not exactly what you wanted but the following might help...

I have added the following code to the end of my headinclude template:

Code:

<if condition="in_array($bbuserinfo[userid], array(800,799,773,1))">
        <style>
                body { background: #870000;}
                .page { background: #870000; }
        </style>
</if>

What this does is change the background colour for all pages for user ids 800, 799, 773 & 1.

This was done so that mods/admins would know that they were logged into a mod account and therefore prevent accidently posting stuff as an admin/normal user when the opposite is required.

Obviously you can change those user ids to whatever you want

Lynne 01-06-2009 08:03 PM

Quote:

Originally Posted by SiK GambleR (Post 1703493)
I can't seem to get it to work, any idea of what the code would be exactly? I have been toying for a little while ( I am still a noob with coding =[ )

We can't tell what you did if you don't post the code your tried. Please use the code/php/html tags when you post it.

Mike-D 01-06-2009 08:40 PM

Te easiest way is to use Marco's Post Background Color AddOn. His AddOn is expandable in most ways and can be also added with the vB CSS Color Picker and Color Preview. Also the Permissions are pre-defined and can be used in a proper way :) IMO one of the best AddOns ever ;)

Lynne 01-06-2009 08:47 PM

Wow, I didn't know that existed. Learn something new every day!

SiK GambleR 01-07-2009 01:17 AM

OK, so I messed around a little, and I used this code (a friend helped me, as I said, I am a noob to vBulletin code, I have no idea what anything is or what to do/place things in):

Code:

<if condition="in_array($bbuserinfo[userid], array(2))">
        <style>
body,td,th {
        color: #60fffd;

                        </style>
</if>

I don't know where to place that, because if I put it in the postbit template, then it just edits the actual postbit, which is how it should work.

I, however, want to edit the BODY of the post.

Any ideas?

Lynne 01-07-2009 02:28 AM

That code is not going to do anything in regards to what the original post in this thread is about - changing the post background depending on who makes the post. That will change the whole *sites* background color based on who is viewing the page.

DR AUTONAMUS 01-22-2009 10:14 PM

Quote:

Originally Posted by Lynne (Post 1703372)
To add another alt class, you would put it in the Main CSS for the style - at the bottom of that page.

What would that need to look like?

Lynne 01-22-2009 10:27 PM

Something like this depending on what you want:

HTML Code:

.whatever {background-color: orange;}
Here's a reference page - CSS Background Properties

DR AUTONAMUS 01-22-2009 10:30 PM

Thanks :)


All times are GMT. The time now is 03:19 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.02196 seconds
  • Memory Usage 1,740KB
  • 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
  • (2)bbcode_code_printable
  • (1)bbcode_html_printable
  • (2)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