May 10th, 2005

_code sections/questions


within bml, you have the ability to use the '_code' attribute to parse/insert perl code. however, whatever is inside the '_code' block gets run/interpreted when the '_code' block is used.

is there a way to have separate '_code' blocks within a given bml file. i'm trying to figure out how i can have a page with multiple dynamic sections. within php, you can simply setup a couple of different if/logic statements and include the required text bsed on the logic. i can't quite see how to do the same thing with the '_code' statements.

as an example:

<\?? __code
__code ??\>


i would expect that the above would have 'fsfssfs' in the initial file1.bml, in the place where the 'code' block is used... this makes sense. however, how could i use a 'code' block in another section of the file. if i simply did another '__code', then i'm going to use the same defined 'code' block, which isn't what we need...

any ideas/thoughts/comments/etc...

we're obviusly missing something simple here...

however, every bml file that we've seen in livejournal, appears to have only one 'code' block...


$body .= "\n";


i'm going through the bml code.. looking at login.bml. can someone shed light on how/what this does:
$body .= "<\?p $ML{'.login.text2'} p?\>\n";

i get that the 'login.text2' comes from either the database/en.dat file. my question, is how/where do i find the code that can show me how/what the '$ML' does?

if i copy the 'login.bml' file to 'foo.bml' and access it '', i get a login page that's incomplete regarding the information being displayed. this indicates that the 'login'/filename is somehow used to index/access the en.dat/database, to pull out information. however, i can't seem to get my hands around the details.

searching through the code/files/google doesn't clarify things.

any ideas/thoughts/comments/etc...



bml - understanding the $M - login.bml


we're trying to follow/understand the logic for 'login.bml', as it extracts/uses 'text string' information from the database.

we have the function BML::ml and $ML, but we can't seem to find the routines/code that actually do the work. we suspect that the functions are somehow mapped to functions within but we can't seem to determine how it actually works.

basically, we're trying to determine how the filename is set, and used to access the information for the given text string from the database.

if anyone has actual experience/understanding of this process, we'd appreciate the short tutorial/pointer! we're also pretty certain that the answer is in front of our eyes, but we can't see it.

pointers/thoughts/comments to actual information will be seriously appreciated.



ps... searching the code, login.bml, global.look, ljconfig.bml, etc.. hasn't shed any light. neither has searching google and the docs/files for livejournal...