vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   $post[backcolor] (https://vborg.vbsupport.ru/showthread.php?t=40694)

Birdie501 07-05-2002 01:38 PM

$post[backcolor]
 
Hi,

i want to modify my postbit! In postbit i have this variable or the background -> $post[backcolor]

the first stands for { firstaltcolor }
the second for { secondaltcolor }

How can i make a table in the postbit that uses the opposite of $post[backcolor] as background.

so if postbit is { firstaltcolor }, the background of the small table is { secondaltcolor }

Thanks you!?

Xenon 07-05-2002 01:44 PM

you have to edit functions.php

find:
PHP Code:

if ($counter%2==0) {
        
$post[backcolor]={ firstaltcolor };
        
$post[bgclass] = "alt1";
    } else {
        
$post[backcolor]={ secondaltcolor };
        
$post[bgclass] = "alt2";
    } 

and replace with:
PHP Code:

if ($counter%2==0) {
        
$post[backcolor]={ firstaltcolor };
        
$post[backcolor2]={ secondaltcolor };
                                
$post[bgclass] = "alt1";
    } else {
        
$post[backcolor]={ secondaltcolor };
                                
$post[backcolor2]={ firstaltcolor };
        
$post[bgclass] = "alt2";
    } 

then use $post[backcolor2] as opposite :)

Birdie501 07-05-2002 01:46 PM

Danke! Ich frag in Zukunft einfach gleich Dich! :)

Xenon 07-05-2002 01:54 PM

hehe, wär meist einfacher ^^
aber so sehn andre meine guten taten *g*

Brad 07-05-2002 02:28 PM

hehe i was ganna ask this one myself :D. danke.

Xenon 07-05-2002 04:01 PM

bitte :) == you're welcome :)

BigJohnson 07-12-2002 06:31 PM

Thats awesome. I have one question though. do you see this in the PHP code in fucntions

$post[backcolor]

How can i make that not hardcoded and make it look for a template. Because have a lot fo styles and i would like to give some style the bevel effect for that and others non. So it will call for a template for every style. Please help thanks.

Xenon 07-12-2002 09:15 PM

$post[backcolor] = gettemplate("templatenamehere");

but post[backcolor] isn't hardcoded, it depens on the replacementvars {firstaltcolor} and {secondaltcolor} so its different in your styles to

BigJohnson 07-13-2002 07:03 PM

Ic. Well the template thingy doesnt work for me. IS there any way to add this to the php file also next to firstl alt {bevel1}

I need to add that some where too.

$post[back] = bgcolor="$post[back]

{bevel1} = style="BORDER-RIGHT: #000022 1px solid; BORDER-TOP: #336699 1px solid; BORDER-LEFT: #336699 1px solid; BORDER-BOTTOM: #000022 1px solid;"

Please help me out. Thanks

Xenon 07-14-2002 07:58 AM

i'm not sure, but i think you can perhaps use that:

$post[backcolor]="{firstaltcolor} {blevel1}";

BigJohnson 07-14-2002 07:00 PM

Nope that doesnt work neither. Thats because the template says this bgcolor="{firstaltcolor} {bevel1}" And that is not what we want. Also the template thing doesnt work. gettemplate("templatenamehere");
That doesnt work. I no you put the template name in there so that is not the prob hehe. But it uses this gettemplate("templatenamehere");
as the hex code. It doesnt go to the template like it is suppose to. I dont no what to do.

BigJohnson 07-14-2002 07:05 PM

Well i figured out how to do it.

i did this

PHP Code:

        if ($counter%2==0) {
                
$post[backcolor]="{firstaltcolor}";
                
$post[bgclass] = "alt1";
        } else {
                
$post[backcolor]="{secondaltcolor}";
                
$post[bgclass] = "alt2";
        }

        if (
$counter%2==0) {
                
$post[bevel]="{bevel1}";
                
$post[bevelclass] = "bevel1";
        } else {
                
$post[bevel]="{bevel2}";
                
$post[bevelclass] = "bevel2";
        } 

That worked great for me. I figured it out thanks.


All times are GMT. The time now is 08:49 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.00992 seconds
  • Memory Usage 1,747KB
  • 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
  • (3)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (12)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