vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   javascript change #color to table variable name (https://vborg.vbsupport.ru/showthread.php?t=201465)

Wordplay 01-12-2009 03:03 AM

javascript change #color to table variable name
 
1 Attachment(s)
i have found a javascript that will put round corners on my tables. which i need to use for my memberinfo pages, so users who customize their profile colors can still cutomize their entire profile. rather than using images to make the corners/edges on tables round, in which case user's couldn't customize it completely.

here is a link
http://www.ruzee.com/blog/ruzeeborders

my predicament is that the code i found makes you choose fixed colors for the tables or make them transparent, which would make using this pointless. the only way to fix this would be to have other alternative tables set in there rather than fixed colors.

meaning i'd need this code:

HTML Code:

myborder: {
  border: 2px solid red;
  background: blue;
  padding: 10px;
}

to change into this type of code:

Code:

myborder: {
  border: BORDER SET IN VBULLETIN CSS VARIABLES;
  background: ALTERNATIVE TABLE 1;
  padding: 10px;
}

but since i don't have any java knowledge, i don't know how to do this. is this even possible? if so, somebody please tell me how.


the attachment shows what tables...

Dismounted 01-12-2009 03:26 AM

Add the CSS to each style's CSS declarations in the Admin CP.

Wordplay 01-12-2009 03:34 AM

sorry but i absolutely didn't understand what you just said. what css am i supposed to add to... what are css declarations?

Dismounted 01-12-2009 03:38 AM

From the look of the Javascript, alkl it does is add an extra CSS declaration. You can add extra CSS declarations in the style manager.

http://www.vbulletin.com/docs/html/s...css_additional

Wordplay 01-12-2009 03:50 AM

yeah but that's not going to help me with this problem.

i want certain tables on memberpages to be a certain shape, which is what the css does, the variables with the colors decide the colors of the inside and outside of the shape created, i want the outside to be transparent, and the inside to be the same color as alternative table 2.

how would i use the declarations to accomplish this?

Bellardia 01-12-2009 04:05 AM

We can't see the function for your javascript, so it's hard to tell you how to fix it.
Take the color for the alt2 directly from the css options in the style manager. Leaving the other color blank ("") should make it transparent but I'm not sure.

Dismounted 01-12-2009 04:38 AM

Quote:

Originally Posted by Wordplay (Post 1709272)
yeah but that's not going to help me with this problem.

i want certain tables on memberpages to be a certain shape, which is what the css does, the variables with the colors decide the colors of the inside and outside of the shape created, i want the outside to be transparent, and the inside to be the same color as alternative table 2.

how would i use the declarations to accomplish this?

As I said before, all that Javascript does (from the look of it), is seem to add some extra CSS to a few tables. That CSS can be placed into the style's CSS directly.

Wordplay 01-12-2009 01:06 PM

no that's not what it is for, sorry for not making it clear.

it makes the tables edges/corners round.

it's a modified version of this:

http://webdesign.html.it/articoli/le...fty-corners/1/

Bellardia, i can't just take the color i want and put it in there. because the point of me having a script that uses table-edges without images is so i can have rounded tables on the memberinfo tables, and still have the members be able to customize their profile colors.

whereby this script would be pointless if i had fixed colors in it. so the only way to make it work would be if i could change the 2 color variables to 1 bg color and 2 an alternative table color.

Bellardia 01-12-2009 01:19 PM

I don't have experience with customizing memberinfo templates by users.

Members can add their own CSS to their profiles? If so can tell me where the styles they select are stored?

If in doubt post the source of a page with a styled member profile...

If you can't style your profile then the alt colors are the same site wide and using a static color would be the same.

Wordplay 01-12-2009 01:43 PM

i know, but i do want my users to be able to style their profile. wasn't the customizable user profile function already a default in 3.7?

i'm not sure where the stylesheets are stored, but here are the examples of customized user profiles i could find on vb.org:
http://www.teenforum.net/members/skina/
http://www.copytechnet.com/forums/members/baphomet.html
http://www.teenforum.net/members/cynnie/

i guess i am still not making myself clear enough as to what i need, maybe my english isn't as good as i believe it to be. i hope somebody gets it, because i don't know how else to put it.

Bellardia 01-12-2009 01:55 PM

I know what you mean, I'm just trying to figure out how to do it ;)

vBulletin has a lot of features, many of which I've never used. I'm just trying to figure out how it works before I help.

Edit - Okay, it's stored under #usercss. Now which corners did you want to round?

Wordplay 01-12-2009 02:13 PM

i added an attachment that shows this in the first post, it's the alternative table 1.

Bellardia 01-12-2009 04:59 PM

Your problem still doesn't really make any sense because you're trying to change the css attribute itself when you could just change the class of the HTML element.

Perhaps it would make more sense if you would explain which areas you are trying to apply the rounded corners to. All of them? Just some..? Your image doesn't show anything except the colors of the elements..

Wordplay 01-12-2009 05:26 PM

it shows that alternate table 1 gets the rounded corners/edges, which is what i said in my previous post as well.

i want all my alternate table 1s on the profile page to have rounded corners.

so you're saying i should just have the table set to alternate table 1 and change alternate table 1s table to having rounded corners/edges?

makes sense, not sure if i can do that but i'll give it a shot.

Dismounted 01-13-2009 04:38 AM

I'm not sure that changing alt1 and alt2 will achieve your desired effect. The two classes are used on almost every single (visible) table in vBulletin, meaning if you change them, you will change the navbar, etc. as well.

Wordplay 01-21-2009 06:02 PM

my style is compltely custom, especially my profile pages. and this code will only be for the profile pages. so it's all good, all i need to know is how to set up what i asked in the top thread... so is there a way to do it or am i jost poking into a bush here?


All times are GMT. The time now is 04:59 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.01156 seconds
  • Memory Usage 1,755KB
  • 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
  • (1)bbcode_code_printable
  • (1)bbcode_html_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (16)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete