<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[devshare.de - URLs der Forum-Syntax umwandeln]]></title>
	<link rel="self" href="http://www.devshare.de/feed/atom/topic/32926/"/>
	<updated>2002-12-01T13:07:00Z</updated>
	<generator>PunBB</generator>
	<id>http://devshare.de/topic/32926/urls-der-forumsyntax-umwandeln/</id>
		<entry>
			<title type="html"><![CDATA[Re: URLs der Forum-Syntax umwandeln]]></title>
			<link rel="alternate" href="http://devshare.de/post/32934/#p32934"/>
			<content type="html"><![CDATA[<p>Tach erstmal</p><p> Danke Matho&nbsp; &lt;img border=&quot;0&quot; title=&quot;&quot; alt=&quot;[Winken]&quot; src=&quot;images/icons/wink.gif&quot; /&gt; </p><p> jetzt funzt es ...</p>]]></content>
			<author>
				<name><![CDATA[Ti-Sch]]></name>
				<uri>http://devshare.de/user/607/</uri>
			</author>
			<updated>2002-12-01T13:07:00Z</updated>
			<id>http://devshare.de/post/32934/#p32934</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: URLs der Forum-Syntax umwandeln]]></title>
			<link rel="alternate" href="http://devshare.de/post/32933/#p32933"/>
			<content type="html"><![CDATA[<p>Da kann ich mich nur anschliessen:</p><p> &lt;/font&gt;&lt;blockquote&gt;&lt;font size=&quot;1&quot; face=&quot;Verdana, Helvetica, sans-serif&quot;&gt;Code:&lt;/font&gt;&lt;hr /&gt;&lt;pre style=&quot;font-size:x-small; font-family: monospace;&quot;&gt;&lt;?<br /> $test=&#039;Achso, $test soll einen längeren text enthalten,<br />&nbsp; &nbsp; &nbsp; &nbsp; in dem verschiedene links vorkommen,<br />&nbsp; &nbsp; &nbsp; &nbsp; z.B derda: <a href="http://www.ietf.org/rfc/rfc2396.txt"> rfc2396 :: uri </a>,<br />&nbsp; &nbsp; &nbsp; &nbsp; und dann vielleicht noch jenner:<a href="http://www.ietf.org/rfc/rfc2141.txt"> rfc2141 :: urn </a>,<br />&nbsp; &nbsp; &nbsp; &nbsp; und vielleicht noch einer:<a href="http://www.ietf.org/rfc/rfc822.txt"> rfc822 :: arpa internet text messages </a>,<br />&nbsp; &nbsp; &nbsp; &nbsp; allerdings klappt das doch (jedenfalls bei mir), und auch, wenn ich zwo links unmittelbar hintereinander<br />&nbsp; &nbsp; &nbsp; &nbsp; schreibe:[url=http://www.ietf.org/rfc/rfc2277.txt] rfc2277 :: IETF Policy on Character Sets and Languages<br />&nbsp; &nbsp; &nbsp; &nbsp; [/url]<a href="http://www.ietf.org/rfc/rfc1034.txt"> rfc1034 :: DOMAIN NAMES - CONCEPTS AND FACILITIES </a>,<br />&nbsp; &nbsp; &nbsp; &nbsp; oder hab&#039; ich wieder mal was nicht ganz verstanden? &#039;;</p><p> echo preg_replace(&quot;/[url=([^]]*)]([^[]*)[/url]/i&quot;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;&lt;a href=&#039;$1&#039; target=&#039;_blank&#039;&gt;&lt;font color=&#039;#0000FF&#039;&gt;$2&lt;/font&gt;&lt;/a&gt; 15 12&quot;, $test);<br /> ?&gt;</p><p> und nochen gruß</p><p> matho[/code]&lt;/blockquote&gt;&lt;font size=&quot;2&quot; face=&quot;Verdana, Helvetica, sans-serif&quot;&gt;</p>]]></content>
			<author>
				<name><![CDATA[matho]]></name>
				<uri>http://devshare.de/user/780/</uri>
			</author>
			<updated>2002-11-30T21:57:00Z</updated>
			<id>http://devshare.de/post/32933/#p32933</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: URLs der Forum-Syntax umwandeln]]></title>
			<link rel="alternate" href="http://devshare.de/post/32932/#p32932"/>
			<content type="html"><![CDATA[<p>Nochmal Hi&nbsp; &nbsp;&lt;img border=&quot;0&quot; title=&quot;&quot; alt=&quot;[Lächeln]&quot; src=&quot;images/icons/smile.gif&quot; /&gt;&nbsp; </p><p> Okay, wie wÃ¤rÂ´s dann damit:<br /> &lt;/font&gt;&lt;blockquote&gt;&lt;font size=&quot;1&quot; face=&quot;Verdana, Helvetica, sans-serif&quot;&gt;Code:&lt;/font&gt;&lt;hr /&gt;&lt;pre style=&quot;font-size:x-small; font-family: monospace;&quot;&gt;&nbsp; $text = &quot;[URL]http://www.test.de[/URL] und noch ein Link [URL]http://www.devshare.de[/URL]&quot;;<br />&nbsp; &nbsp;$t1 = preg_replace(&quot;/<a href="http://(.*)">(.*)</a>/iU&quot;,&quot;&lt;A HREF=&quot;$1&quot;&gt;$1&lt;/A&gt;&quot;,$text);</p><p>&nbsp; &nbsp;print $t1;[/code]&lt;/blockquote&gt;&lt;font size=&quot;2&quot; face=&quot;Verdana, Helvetica, sans-serif&quot;&gt;HTH, Tink</p><p> [edit]<br /> Beispieltext eingefÃ¼gt<br /> [/edit]<br />&nbsp; <br />&nbsp; &lt;small&gt;[ 30-11-2002, 22:38: Beitrag editiert von: Tink ]&lt;/small&gt;</p>]]></content>
			<author>
				<name><![CDATA[Tink]]></name>
				<uri>http://devshare.de/user/1641/</uri>
			</author>
			<updated>2002-11-30T21:37:00Z</updated>
			<id>http://devshare.de/post/32932/#p32932</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: URLs der Forum-Syntax umwandeln]]></title>
			<link rel="alternate" href="http://devshare.de/post/32931/#p32931"/>
			<content type="html"><![CDATA[<p>Tach erstmal</p><p> jaja, aber ein Problem gibt es bei allen beiden Versionen noch:</p><p> $test=&quot;]URL]http://www.test.de[/URL] und noch ein Link ]URL]http://www.devshare.de[/URL]&quot;;</p><p> würde folgendes ausgeben:</p><p> &lt;a href=&quot;http://www.test.de[/URL] und noch ein Link ]URL]http://www.devshare.de&quot;&gt;http://www.test.de[/URL] und noch ein Link ]URL]<a href="http://www.devshare.de">http://www.devshare.de</a>&lt;/a&gt;</p><p> Wie kann man da am Besten erkennen, wo der Link zu Ende ist ?</p>]]></content>
			<author>
				<name><![CDATA[Ti-Sch]]></name>
				<uri>http://devshare.de/user/607/</uri>
			</author>
			<updated>2002-11-30T21:09:00Z</updated>
			<id>http://devshare.de/post/32931/#p32931</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: URLs der Forum-Syntax umwandeln]]></title>
			<link rel="alternate" href="http://devshare.de/post/32930/#p32930"/>
			<content type="html"><![CDATA[<p>Hohi,</p><p> oder that:</p><p> &lt;/font&gt;&lt;blockquote&gt;&lt;font size=&quot;1&quot; face=&quot;Verdana, Helvetica, sans-serif&quot;&gt;Code:&lt;/font&gt;&lt;hr /&gt;&lt;pre style=&quot;font-size:x-small; font-family: monospace;&quot;&gt;$test=&#039;<a href="http://www.ietf.org/rfc/rfc2396.txt"> rfc2396 :: url </a>&#039;;</p><p> echo preg_replace(&quot;/[url=([^]]*)]([^[]*)[/url]/i&quot;,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;&lt;a href=&#039;$1&#039; target=&#039;_blank&#039;&gt;&lt;font color=&#039;#0000FF&#039;&gt;$2&lt;/font&gt;&lt;/a&gt;&quot;, $test);[/code]&lt;/blockquote&gt;&lt;font size=&quot;2&quot; face=&quot;Verdana, Helvetica, sans-serif&quot;&gt;gruß</p><p> matho</p>]]></content>
			<author>
				<name><![CDATA[matho]]></name>
				<uri>http://devshare.de/user/780/</uri>
			</author>
			<updated>2002-11-30T20:30:00Z</updated>
			<id>http://devshare.de/post/32930/#p32930</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: URLs der Forum-Syntax umwandeln]]></title>
			<link rel="alternate" href="http://devshare.de/post/32929/#p32929"/>
			<content type="html"><![CDATA[<p>Hiho&nbsp; &lt;img border=&quot;0&quot; title=&quot;&quot; alt=&quot;[Lächeln]&quot; src=&quot;images/icons/smile.gif&quot; /&gt; </p><p> How about this:<br /> &lt;/font&gt;&lt;blockquote&gt;&lt;font size=&quot;1&quot; face=&quot;Verdana, Helvetica, sans-serif&quot;&gt;Code:&lt;/font&gt;&lt;hr /&gt;&lt;pre style=&quot;font-size:x-small; font-family: monospace;&quot;&gt;&nbsp; $text = &quot;[URL]www.devshare.de[/URL]&quot;;</p><p>&nbsp; &nbsp;$t = eregi_replace(&quot;<a href="http://(.*)">(.*)</a>&quot;,&quot;&lt;A HREF=&quot;\1&quot;&gt;\1&lt;/A&gt;&quot;,$text);</p><p>&nbsp; &nbsp;print $t;[/code]&lt;/blockquote&gt;&lt;font size=&quot;2&quot; face=&quot;Verdana, Helvetica, sans-serif&quot;&gt;HTH, Tink</p>]]></content>
			<author>
				<name><![CDATA[Tink]]></name>
				<uri>http://devshare.de/user/1641/</uri>
			</author>
			<updated>2002-11-30T20:05:00Z</updated>
			<id>http://devshare.de/post/32929/#p32929</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: URLs der Forum-Syntax umwandeln]]></title>
			<link rel="alternate" href="http://devshare.de/post/32928/#p32928"/>
			<content type="html"><![CDATA[<p>Tach erstmal</p><p> Danke. dann muss ich nicht immer (u|U) etc. machen ... OK, das hat mir jetzt bei dem <strong>fetten</strong> Text geholfen, aber mein Problem besteht immer noch:</p><p> jetzt bin ich bei:<br /> $test=eregi_replace(&quot;[url=([a-z0-9.:/_-=?&amp;%]+)](.*)[/url]&quot;,&quot;&lt;a href=&quot;\1&quot;&gt;\2&lt;/a&gt;&quot;,$test);<br /> und hab immer noch den REG_ERANGE-Fehler ...</p>]]></content>
			<author>
				<name><![CDATA[Ti-Sch]]></name>
				<uri>http://devshare.de/user/607/</uri>
			</author>
			<updated>2002-11-30T19:43:00Z</updated>
			<id>http://devshare.de/post/32928/#p32928</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: URLs der Forum-Syntax umwandeln]]></title>
			<link rel="alternate" href="http://devshare.de/post/32927/#p32927"/>
			<content type="html"><![CDATA[<p>Hoi Ti-Sch,</p><p> kleiner Hint:<br /> nimm:<br /> eregi_replace<br /> Weil: Dem Ding is Groß-UnD klEInSchreIBung egal&nbsp; &nbsp;&lt;img border=&quot;0&quot; title=&quot;&quot; alt=&quot;[Breites Grinsen]&quot; src=&quot;images/icons/grin.gif&quot; /&gt;&nbsp; </p><p> Gruß, Tink</p>]]></content>
			<author>
				<name><![CDATA[Tink]]></name>
				<uri>http://devshare.de/user/1641/</uri>
			</author>
			<updated>2002-11-30T18:54:00Z</updated>
			<id>http://devshare.de/post/32927/#p32927</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[URLs der Forum-Syntax umwandeln]]></title>
			<link rel="alternate" href="http://devshare.de/post/32926/#p32926"/>
			<content type="html"><![CDATA[<p>Tach erstmal</p><p> also ich programmiere gerade an einem Newssystem, und da wollte ich (aus Sicherheitsgründen) die Tags verbieten (umwandeln mit htmlspecialchars).</p><p> Da ich aber doch den Leuten erlauben will, URLs (http,https,ftp,mailto) zu benutzen, hab ich mir gedacht nimmste einfach die Syntax die sich auch in vielen Forensystemen durchgesetzt hat:</p><p> ]url=http://www.test.de]Stiftung Warentest[/url]<br /> ]url]http://www.test.de[/url]<br /> <a href="http://www.test.de">http://www.test.de</a></p><p> (ich weiß, in den ersten beiden Beispielen muss die erste eckige Klammer auf sein und nicht zu)</p><p> Da das mit normalen String-Funktionen in PHP 4 zu schwierig wäre, hab ich mir gedacht probierste das mal mit Regulären Ausdrücken (POSIX). Nur leider hab ich nicht viel Ahnung davon. Ich hab mir mit einem Buch über PHP was zusammengereimt, aber das funzt net. Ich bekomm immer den Fehler <strong>Warning</strong>: REG_ERANGE: in ...</p><p> hier ist mein erster Versuch:<br /> $test=ereg_replace(&quot;[(u|U)(r|R)(l|L)=(a-zA-Z0-9.:/_-=?&amp;%)](.*)[/(u|U)(r|R)(l|L)]&quot;,&quot;&lt;a href=&quot;\4&quot; target=&quot;_blank&quot;&gt;&lt;font color=&quot;#0000FF&quot;&gt;\5&lt;/font&gt;&lt;/a&gt;&quot;,$test);</p><p> Könnt ihr mir da helfen ???</p>]]></content>
			<author>
				<name><![CDATA[Ti-Sch]]></name>
				<uri>http://devshare.de/user/607/</uri>
			</author>
			<updated>2002-11-30T18:37:00Z</updated>
			<id>http://devshare.de/post/32926/#p32926</id>
		</entry>
</feed>

