Jump to content

Passero

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Passero's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I am writing a CMS where people can enter templates. For the moment, i use a simple textarea for editing my template... THis is nog very good because the code isn't that readeable or code highlighting for html tags doesn't work... Therefore i was wondering if there is a control i can use in combination with my PHP application so the user can easily edit the template.
  2. [!--quoteo(post=376026:date=May 22 2006, 03:49 PM:name=obsidian)--][div class=\'quotetop\']QUOTE(obsidian @ May 22 2006, 03:49 PM) [snapback]376026[/snapback][/div][div class=\'quotemain\'][!--quotec--] passero, welcome to the forums! if you'll look for previous discussions on how to write your own BBCode parser, you'll get the basic understanding of what to use for your template plan of attack. i'll give you a simple function that runs a BBCode parser on a string, though, so you can see where i'm coming from: ... [/quote] Thx for the reply but that's not what i'm looking for.. In fact the code you posted is just a "find and replace"... My template code will be more than just find and replace. For example: [code] <news number="5">       <title><h1>#TITLE#</h1></title>     <item>        <p>#BODY#</p>     <item> </news> [/code] This would mean that there wil be something like that in the output: [code]<h1>first title</h1> <p>first body</p> <h1>second title</h1> <p>second body</p> <h1>3th title</h1> <p>3th body</p>[/code] You see what i mean...
  3. I am writing a webapplication where the user can create templates. those templates need to be interpreted so they can create HTML. The syntax for those templates is something I chose. The question is now: how can i write a function that parse the templatecode to html? I want to extract the special template syntax and transform it to html. Do i have to do a find for each keyword that the user can use in the template and than interprete it? for example the code a lot forums use: [ B ] [ /B ] sets the text to bold so it will be transformed to <b></b> My templating code is more advanced but i think you'll know what i mean.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.