PDA

View Full Version : $post[backcolor]


Birdie501
07-05-2002, 01:38 PM
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:if ($counter%2==0) {
$post[backcolor]={ firstaltcolor };
$post[bgclass] = "alt1";
} else {
$post[backcolor]={ secondaltcolor };
$post[bgclass] = "alt2";
}

and replace with:
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


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.