function phpcode($s) { $match = array('#\[php\](.*?)\[\/php\]#se'); $replace = array("'<span class=\"notranslate\"><font class=css_code><pre class=\"brush:php\">'.$1.'</pre></font></span>'"); return (preg_replace($match, $replace, $s)); }
function bbcode($input){ $input = strip_tags($input); $input = htmlentities($input); $search = array( '/\[xml\](.*?)\[\/xml\]/is' ); $replace = array( '<pre class="brush:xml">$1</pre>' ); return preg_replace($search,$replace,$input); }
<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd"> <hibernate-configuration> <session-factory> <property name="show_sql">true</property> </session-factory> </hibernate-configuration>
<br /> <?xml version="1.0" encoding="utf-8"?><br /> <!DOCTYPE hibernate-configuration PUBLIC<br /> "-//Hibernate/Hibernate Configuration DTD 3.0//EN"<br /> "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd"><br /> <br /> <hibernate-configuration><br /> <session-factory><br /> <br /> <br /> </session-factory><br /> </hibernate-configuration><br /> <br /> <br />
bbcode($item['description']);
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง