vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   CSS If Condtion? (https://vborg.vbsupport.ru/showthread.php?t=224563)

TheInsaneManiac 10-06-2009 03:46 PM

Quote:

Originally Posted by Lynne (Post 1895648)
I was trying to figure out if it would work that way. If it does, then you can figure out how to go about it.

I think I'm not understanding what you are doing. You have a User Profile Field, and the user enters a color for the background? adn then you want that to effect the background on all your pages? What is the name of your background class that you need to change or is your background actually part of the body tag as you said above? If so, have you tried just seeing if it works inline for the body tag, or tried adding the class/css in the headerinclude template?

Every single page I have has a background for it. Hence:
background: #080B1C url(banner.jpg) no-repeat top center fixed;

I want the members to be able to enter their background url into the profile field and them be able to see their background.

Lynne 10-06-2009 03:51 PM

OK, so have you tried adding something to the headerinclude template like I suggested?
HTML Code:

<style type="text/css">
body {
    background: #080B1C url($bbuserinfo['fieldx']) no-repeat top center fixed;
}
</style>

Put it at the end, of course, to overwrite the css in the css file.

TheInsaneManiac 10-06-2009 04:47 PM

Code:

syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /public_html/forum/includes/adminfunctions_template.php(3950) : eval()'d code on line 3
Got that after trying:
Code:

<style type="text/css">
body {
    background: #080B1C url($bbuserinfo['field85']) no-repeat top center fixed;
}
</style>


Wayne Luke 10-06-2009 04:50 PM

Can't use quotes between [] for variables in templates. Parsing issue.

Lynne 10-06-2009 06:22 PM

Whoops, I knew that. Thanks, Wayne.

TheInsaneManiac 10-07-2009 01:24 AM

Thanks guys! It works now.


All times are GMT. The time now is 08:07 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.01920 seconds
  • Memory Usage 1,727KB
  • 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
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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