Graham
net3x You have the code there all you have to do is extend the search and replace arrays
net3x
please help me.. for embed google map bb code
net3x
Graham I m using like this
<?php function bbcode ( $msg ) { $msg = htmlentities ( $msg ); $search = array( '/\[br\]/is' , '/\[b\](.*?)\[\/b\]/is' , '/\[i\](.*?)\[\/i\]/is' , '/\[u\](.*?)\[\/u\]/is' ,); $replace = array( '<br />' , '<strong>$1</strong>' , '<em>$1</em>' , '<u>$1</u>' ,); $msg = preg_replace ( $search , $replace , $msg ); $msg = bbcode ( $msg ); return $msg ; } ?> Copy code
now can u guide me for [googlemap]LOCATION[ /googlemap]..
Graham
net3x The most simple form of map image is like
<img src="http://maps.googleapis.com/maps/api/staticmap?zoom=16&size=190x190¢er=new+york&markers=label:Marker|new+york" alt="map" /> Copy code
so use the same code and set the "center" and "markers" to the same value
The value should be url encoded
you can use almost anything as the "center" value and Google will try and interpret it as a location
Hadest
V.I.P không cần khách 6 : ))
dùng chèn zingtv cũng tốt
net3x
Graham It is for php site.. anyways, i solved this metter. i user "str_replace" "array" function.. but i cant solve the
code..
ne1 help me..?
Graham
The forum function already has the bbcode built in
but it uses <object> not <iframe>
[youtube]ID CODE[/youtube] [vimeo]ID NUMBER[/vimeo] Copy code
So if you add your own use different names for the bbcode
Hadest
net3x If you use forum function, you can add this code to {{ msg|...|raw }} in my_blocks.twig
replace({'[youtube]':'<iframe width="560" height="315" src="//www.youtube.com/embed/','[/youtube]':'" frameborder="0" allowfullscreen="true"></iframe>'}) Copy code
net3x
Hadest for php site..
i need [map]...[ /map]
[youtube]...[ /youtube] bbcode to embed html preview..