|  | 
 
| Discuz! Plugin : Static Google Map for Discuz! X2 Author: Kisson
 Transcoded : Vic.0 ( UTF-8 Vietnamese )
 Ratings: A Greate plugin for business & travel .
 Usage: How to use this Plugin
 1. Edit files:
 \static\js\editor.js
 \template\default\common\editor.css
 \template\default\forum\post_editor_body.htm
 2. Add Files
 \googlemap
 \static\image\common\map.gif
 3.Modification steps:
 + Open : \static\js\editor.js
 ** Search:
 You'll find out:Sao chép mãfunction discuzcode(cmd, arg) 
Just add following code behind it:** Search function showEditorMenu(tag, params) , you'll find out the first string like this:Sao chép mãif(in_array(cmd, ['sml', 'url', 'quote', 'code', 'free', 'hide', 'aud', 'vid', 'fls', 'attach', 'image', 'pasteword', 
case 'pasteword':......breakYou add :
 ** The secondSao chép mã                        case 'googlemap'://
                        stitle = 'Insert Google Map';
                        str = '<p class="px" style="height:390px"><iframe id="' + ctrlid + '_param_1" frameborder="0" style="width:100%;height:100%" onload="this.contentWindow.document.body.style.width=\'530px\';this.onload=null" src="./googlemap/googlemap.html"></iframe></p><p class="xg2 pbn">Insert static Google Map!</p>';
                        menuwidth = 600;
                        menupos = '00';
                        menutype = 'win';
                        //var mapurl=this.frames[ctrlid+'_param_1'].document.getElementById("addMap").click(pasteMap);
                        break;        
case 'pasteword':......breakYou add these:
 + Open : \template\default\common\editor.cssSao chép mã                        case 'googlemap'://
                                //var mapsrc = window.frames[ctrlid + '_param_1'].document.getElementById("mapurl").value;        
                                var mapsrc = document.getElementById(ctrlid + '_param_1').contentWindow.document.getElementById("mapurl").value;
                                var str = '<img src=' + mapsrc + ' border=0 />';
                                if(wysiwyg) {
                                insertText(str, str.length, 0, false, sel);
                                }else {
                                insertText('[img]' + mapsrc + '[/img]', 0, 0, false, sel);
                                }
                                hideMenu('', 'win');
                                break;        
Find:
 Add:Sao chép mã#e_bold                        { background-position: 0 0; }
+ Open: \template\default\forum\post_editor_body.htmSao chép mã    #e_googlemap { background:transparent url({STATICURL}image/common/map.gif) no-repeat 0 0; overflow: hidden;background-position: 5px 1px;}
Find:
 Add:Sao chép mã                                        <a id="{$editorid}_fls" title="{lang e_flash_title}">{lang e_flash}</a>
+ Upload the googlemap folder to your root forum.Sao chép mã<a id="{$editorid}_googlemap" title="Insert Google map">Map</a>
+ Update cache & Enjoy ^^
 + Download:
 | 
 |