* Graham * net3x You have the code there all you have to do is extend the search and replace arrays
2015-02-08 11:35 (edited 2015-02-08 11:37 by Graham ) · (0)
* net3x please help me.. for embed google map bb code
2015-02-08 10:46 · (0)
* 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]..

:)
2015-02-04 16:25 · (0)
* Graham * net3x The most simple form of map image is like
<img src="http://maps.googleapis.com/maps/api/staticmap?zoom=16&size=190x190&center=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
2015-02-04 12:44 (edited 2015-02-04 13:02 by Graham ) · (1)
* Hadest * V.I.P không cần khách 6 : ))
dùng chèn zingtv cũng tốt
2015-02-04 07:48 (edited 2015-02-04 07:52 by Hadest ) · (0)
* net3x * Graham It is for php site.. anyways, i solved this metter. i user "str_replace" "array" function.. but i cant solve the
[googlemap]PLACE_NAME[ /googlemap]
Copy code
code..


ne1 help me..?
2015-02-03 10:37 (edited 2015-02-03 10:39 by net3x ) · (0)
* 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
2015-02-03 09:46 (edited 2015-02-03 09:57 by Graham ) · (0)
* V.I.P * Hadest Thanks You.
2015-02-03 04:43 · (0)
* 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
2015-01-31 05:32 (edited 2015-01-31 05:39 by Hadest ) · (0)
* net3x * Hadest for php site..

i need [map]...[ /map]

[youtube]...[ /youtube] bbcode to embed html preview..
2015-01-30 16:44 · (0)

Online: Guests: 1