PDA

View Full Version : Ok, where is all this stuff coming from...


Dionysis
01-25-2005, 05:55 AM
http://www.nrgdrink.com/asdf.jpg


You'll notice the "asdf" and "fff" inserted.
here is the code:

about 90% of the way down admincp/template.php you'll find : I just added "asdf" and "fff" in there.

if ($debug)
{
print_style(-1);
} ?>asdf <?php
foreach($stylecache AS $styleid => $style)
{
print_style($styleid, $style);
}

?> fff
</div>


Ok. now here is where i say "omfg wtf." The only thing in that code is a foreach() and it's creating a default style, dropdown menu, expander, and list ????? where is all this stuff coming from?

Marco van Herwaarden
01-25-2005, 06:02 AM
Well a few lines higher you will find some page initialisation putted out.

'print_style' is a function that is part of 'include/adminfunctions_template.php' that will take care of the rest.

Dionysis
01-25-2005, 06:35 AM
i did a ctrl+f and searched for "print_style" in 'include/adminfunctions_template.php'

didn't find anything.

Marco van Herwaarden
01-25-2005, 07:17 AM
First it should have been 'includes/adminfunctions_template.php', typo from me.

You will find the print_style function around line 1069 in adminfunctions_template.php (3.0.6).

What editor are you using?

Dionysis
01-26-2005, 01:50 AM
ah ok, found the function. i'm using "context" editor.

Zachery
01-26-2005, 02:34 AM
print_style($styleid, $style);

print_style(number, name);

basicly, its a function.

Dionysis
01-26-2005, 09:09 PM
yea thanks guys, learning something new everyday ^_^