Jump to content


Blocks


1 reply to this topic

#1 dEcade

    P2L Staff

  • P2L Staff
  • PipPipPipPip
  • 1,850 posts
  • Gender:Male
  • Location:Saskatoon, Saskatchewan
  • Interests:Guitar, Programming, Storm Chasing, Games (Designing and playing), Hockey, Photography

Posted 20 May 2006 - 10:24 AM

Hi, I have been having trouble with blocks like the things that are like this:

<!-- BEGIN something -->
{BLOCK_VAR}
<!-- END something -->

I have my template script done I am using the phpLIB script but their blocks aren't exactly what I want. I want a function that I could do this:

$template->assign_block_vars('NAME OF BLOCK', array(
'BLOCK_VAR' => 'text')
);

I have the script so that I can do the {STUFF} and it works but I need it to work with the blocks. where it says the NAME OF BLOCK that is what would go into the something in the example before.

If you want my template script please ask but if anyone knows how to code blocks that would be really appreciated.

dEcade

#2 rc69

    PHP Master PD

  • P2L Staff
  • PipPipPipPip
  • 3,827 posts
  • Gender:Male
  • Location:Here
  • Interests:Web Development

Posted 21 May 2006 - 12:04 AM

Blocks are fun. Not easy, but fun. Ironically enough, i already happen to have an age old file on my site that already answers this question (i just don't remember who it was for, just that it was the same question).

deceptive-logic.com/template.php <- Thats the file, i'm not making it a url because i don't want search engines to follow it.

If you can't make enough sense of that, my DBMS has a more up-to-date version with more comments.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users