Re: [PHP] Re: Yes!!! BTML v1.0 is here!!!

2003-10-20 Thread Comex
[EMAIL PROTECTED]
Curt Zirzow:
 * Thus wrote Comex ([EMAIL PROTECTED]):

 All this is is a xml, yet it breaks all xml rules, ironic as
 it sounds.

 Curt

I don't know much about XML, so clue me in.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Yes!!! BTML v1.0 is here!!!

2003-10-20 Thread Curt Zirzow
* Thus wrote Comex ([EMAIL PROTECTED]):
 [EMAIL PROTECTED]
 Curt Zirzow:
  * Thus wrote Comex ([EMAIL PROTECTED]):
 
  All this is is a xml, yet it breaks all xml rules, ironic as
  it sounds.
 
  Curt
 
 I don't know much about XML, so clue me in.

http://www.w3.org/XML/ is a good place to start.



Curt
-- 
My PHP key is worn out

  PHP List stats since 1997: 
  http://zirzow.dyndns.org/html/mlists/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Yes!!! BTML v1.0 is here!!!

2003-10-18 Thread Curt Zirzow
* Thus wrote Comex ([EMAIL PROTECTED]):
  Bas:
  That tags? It should not be used anyway...
  what???
 
 
  Yes, i think that you want to know the structure of the BTML-file:
 
  bttag=btml
  /bttag
  bttag=title
  Title of the page
  /bttag
  bttag=text
  Here any valid HTML-MARKUP
  br
  /bttag
  bttag=image
  Path to a image
  /bttag
 
  This is the structure of a BTML file.
 
 I like the idea, and make it more usable.

All this is is a xml, yet it breaks all xml rules, ironic as
it sounds.

Curt
-- 
My PHP key is worn out

  PHP List stats since 1997: 
  http://zirzow.dyndns.org/html/mlists/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Yes!!! BTML v1.0 is here!!!

2003-10-17 Thread Bas
That tags? It should not be used anyway...
Comex [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 [EMAIL PROTECTED]
 Comex:
  [EMAIL PROTECTED]
  Bas:
  Yes, thanx. I always wanted to make a version where you can use
  multiple tags of one type. And, what do you find of it? Please rate
  it 1 to 10 Comex [EMAIL PROTECTED] wrote in message
 
  I don't know... lol...

 BTW, what should happen to text not in any tags?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Yes!!! BTML v1.0 is here!!!

2003-10-17 Thread Comex
[EMAIL PROTECTED]
Bas:
 That tags? It should not be used anyway...
what???

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Yes!!! BTML v1.0 is here!!!

2003-10-17 Thread Chris Shiflett
--- Comex [EMAIL PROTECTED] wrote:
 Bas:
  That tags? It should not be used anyway...
 what???

Would you two please take this discussion elsewhere? This is about the tenth
message that makes no sense to anyone else.

Thank you.

Chris

=
My Blog
 http://shiflett.org/
HTTP Developer's Handbook
 http://httphandbook.org/
RAMP Training Courses
 http://www.nyphp.org/ramp

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Yes!!! BTML v1.0 is here!!!

2003-10-17 Thread Comex
[EMAIL PROTECTED]
Chris Shiflett:
 --- Comex [EMAIL PROTECTED] wrote:
 Bas:
 That tags? It should not be used anyway...
 what???

 Would you two please take this discussion elsewhere? This is about
 the tenth message that makes no sense to anyone else.

 Thank you.

 Chris

 =
 My Blog
  http://shiflett.org/
 HTTP Developer's Handbook
  http://httphandbook.org/
 RAMP Training Courses
  http://www.nyphp.org/ramp


Tenth message that makes no sense to anyone else??

Bas makes BTML.  An 'experimentally' version of HTML, in other words, a
fake markup language.

 Yes, i think that you want to know the structure of the BTML-file:

 bttag=btml
 /bttag
 bttag=title
 Title of the page
 /bttag
 bttag=text
 Here any valid HTML-MARKUP
 br
 /bttag
 bttag=image
 Path to a image
 /bttag

 This is the structure of a BTML file.

I like the idea, and make it more usable.

 Yes, thanx. I always wanted to make a version where you can use multiple
 tags of one type. And, what do you find of it? Please rate it 1 to 10

I wasn't expecting that, but...

 I don't know... lol...

I don't know what I 'find' of it.

 BTW, what should happen to text not in any tags?

I was wondering if the preg_match_all should be a preg_replace... should
text not within tags be displayed.

 That tags? It should not be used anyway...

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Yes!!! BTML v1.0 is here!!!

2003-10-17 Thread Comex
Now I'm confused, because of the canceled message.


[EMAIL PROTECTED]
Chris Shiflett:
 --- Comex [EMAIL PROTECTED] wrote:
 Bas:
 That tags? It should not be used anyway...
 what???
 
 Would you two please take this discussion elsewhere? This is about
 the tenth message that makes no sense to anyone else.
 
 Thank you.
 
 Chris
 
 =
 My Blog
  http://shiflett.org/
 HTTP Developer's Handbook
  http://httphandbook.org/
 RAMP Training Courses
  http://www.nyphp.org/ramp


Tenth message that makes no sense to anyone else??

Bas makes BTML.  An 'experimentally' version of HTML, in other words, a
fake markup language.

 Yes, i think that you want to know the structure of the BTML-file:
 
 bttag=btml
 /bttag
 bttag=title
 Title of the page
 /bttag
 bttag=text
 Here any valid HTML-MARKUP
 br
 /bttag
 bttag=image
 Path to a image
 /bttag
 
 This is the structure of a BTML file.

I like the idea, and make it more usable.

 Yes, thanx. I always wanted to make a version where you can use multiple
 tags of one type. And, what do you find of it? Please rate it 1 to 10

I wasn't expecting that, but...

 I don't know... ...

I don't know what I 'find' of it.

 BTW, what should happen to text not in any tags?

I was wondering if the preg_match_all should be a preg_replace... should
text not within tags be displayed.

 That tags? It should not be used anyway...

I don't know what that means.  So I ask, what???

 Would you two please take this discussion elsewhere?

Where else?  This is a PHP discussion in a PHP group!

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Yes!!! BTML v1.0 is here!!!

2003-10-15 Thread Bas
Yes, thanx. I always wanted to make a version where you can use multiple
tags of one type. And, what do you find of it? Please rate it 1 to 10
Comex [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 ?php
 function parseTags($file) {
   /* readfile... here */
   $filedata = file_get_contents($file);
   $tag_match =(!bttag=(\w*)\s*(.*?)\s*/bttag!is);
   preg_match_all($tag_match, $filedata, $matches);
   for ($i=0; $i count($matches[0]); $i++) {

 $tagname = $matches[1][$i];
 $tag['tagname'] = $tagname;
 $tag['value'] = $matches[2][$i];
 $tags[] = $tag;
   }
   return $tags;
 }
 $filename = $_GET['name'];
 $bttags = parseTags($filename);
 echo HTMLHEAD;
 foreach($bttags as $tag) {
 switch($tag['tagname']) {
 case 'title':
 echo TITLE . $tag['value'] . /TITLE/HEADBODY;
 echo H1 . $tag['value'] . /h1br;
 break;
 case 'heading':
 echo H1 . $tag['value'] . /h1br;
 break;
 case 'image':
 if (!empty($tag['value'])) {
 echo IMG SRC=\ . $tag['value'] . \;
 }
 break;
 case 'text':
 echo nl2br($tag['value']);
 break;
 case 'nl':
 echo br\n;
 break;
 }
 }


 echo /body/html;


 ?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Yes!!! BTML v1.0 is here!!!

2003-10-15 Thread Comex
[EMAIL PROTECTED]
Bas:
 Yes, thanx. I always wanted to make a version where you can use
 multiple tags of one type. And, what do you find of it? Please rate
 it 1 to 10 Comex [EMAIL PROTECTED] wrote in message

I don't know... lol...

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Yes!!! BTML v1.0 is here!!!

2003-10-15 Thread Comex
[EMAIL PROTECTED]
Comex:
 [EMAIL PROTECTED]
 Bas:
 Yes, thanx. I always wanted to make a version where you can use
 multiple tags of one type. And, what do you find of it? Please rate
 it 1 to 10 Comex [EMAIL PROTECTED] wrote in message

 I don't know... lol...

BTW, what should happen to text not in any tags?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Yes!!! BTML v1.0 is here!!!

2003-10-13 Thread Bas
Yes, i think that you want to know the structure of the BTML-file:

bttag=btml
/bttag
bttag=title
Title of the page
/bttag
bttag=text
Here any valid HTML-MARKUP
br
/bttag
bttag=image
Path to a image
/bttag

This is the structure of a BTML file.

I hope that you have improvements. If this changes the structure, post or
email me the new structure also.(double check for spelling errors)
Bas [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 It is freely avialable!!!

 Here is the sourcecode:

 2 files are used to parse:

 read-tags.php
 ---
 ?php
 // Tag Parser v1.11
 // v1.0 First release(not working)
 // v1.1 Edited:
 // Uses Regular Expressions
 // v1.11 Edited:
 // Edited to use with BTML
 function parseTags($file) {
   /* readfile... here */
   $filedata = file_get_contents($file);
   $tag_match = !bttag=(\w*)\s*(.*?)\s*/bttag!is;
   preg_match_all($tag_match, $filedata, $matches);
   for ($i=0; $i count($matches[0]); $i++) {
 $tagname = $matches[1][$i];
 $tags[$tagname] = $matches[2][$i];
   }
   return $tags;
 }
 ?

 ---
 btml.php
 ---
 ?php
 // BTML-HTML converter v1.0
 // v1.0 First release
 // You can write precisely 1 image on the bottom,
 // 1 title
 // and 1 paragraph(you need also the brs in your bttag=text)
 include_once(read-tags.php);
 $filename = $_GET['name'];
 $bttags = parseTags($filename);

 if ($bttags['btml'] == '') {
 echo HTMLHEAD;
 echo TITLE . $bttags['title'] . /TITLE/HEADBODY;
 echo H1 . $bttags['title'] . /h1br;
 echo $bttags['text'];
 if (!empty($bttags['image'])) {
 echo IMG SRC=\ . $bttags['image'] . \;
 }
 echo /body/html;
 }
 ?
 ---
 And an test BTML-file:
 ---
 bttag=btml
 /bttag
 bttag=title
 Welcome to BTML page v1!
 /bttag
 bttag=text
 Welcome to my BTML page!!! This is an experimentally version of HTML!!!
 brBye!!!
 /bttag
 bttag=image
 noimage.gif
 /bttag
 ---

 Run it with: btml.php?name=filename.btm

 Example: btml.php?name=test.btm

 For improvements e-mail me(also if you are planning on inprovements) or
 reply if you have a inprovement ready.

 Regards,

 Bas

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Yes!!! BTML v1.0 is here!!!

2003-10-13 Thread Comex
?php
function parseTags($file) {
  /* readfile... here */
  $filedata = file_get_contents($file);
  $tag_match =(!bttag=(\w*)\s*(.*?)\s*/bttag!is);
  preg_match_all($tag_match, $filedata, $matches);
  for ($i=0; $i count($matches[0]); $i++) {

$tagname = $matches[1][$i];
$tag['tagname'] = $tagname;
$tag['value'] = $matches[2][$i];
$tags[] = $tag;
  }
  return $tags;
}
$filename = $_GET['name'];
$bttags = parseTags($filename);
echo HTMLHEAD;
foreach($bttags as $tag) {
switch($tag['tagname']) {
case 'title':
echo TITLE . $tag['value'] . /TITLE/HEADBODY;
echo H1 . $tag['value'] . /h1br;
break;
case 'heading':
echo H1 . $tag['value'] . /h1br;
break;
case 'image':
if (!empty($tag['value'])) {
echo IMG SRC=\ . $tag['value'] . \;
}
break;
case 'text':
echo nl2br($tag['value']);
break;
case 'nl':
echo br\n;
break;
}
}


echo /body/html;


?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php