Post Problem
-
Hi, today i install this plugin in my site but when i go to New Post and click on the button on my UltimateTwice i get a popup sreen with this Code `<?php
$root = __FILE__;
require_once(‘../../countries.php’);
asort($ar_countries);
for ($i = 0; $i < 6; $i++) $root = dirname($root);
if (!defined(‘DS’)) { define(‘DS’, DIRECTORY_SEPARATOR); }
require_once($root . DS . ‘wp-config.php’);
require_once(ABSPATH . ‘wp-admin’ . DS . ‘admin-functions.php’);
if(!current_user_can(‘edit_posts’)) die;
do_action(‘admin_init’);
global $wpdb;
?>
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN” “https://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd”>
<html xmlns=”https://www.w3.org/1999/xhtml”>
<head>
<title>Insert Country Flag</title>
<link type=”text/css” rel=”stylesheet” href=”<?php echo $wpdb->worldflag_plugin_dir; ?>assets/flags.css”/>
<script language=”javascript” type=”text/javascript” src=”<?php echo site_url(); ?>/wp-includes/js/jquery/jquery.js”></script>
<script language=”javascript” type=”text/javascript” src=”<?php echo site_url(); ?>/wp-includes/js/tinymce/tiny_mce_popup.js”></script>
<script language=”javascript” type=”text/javascript” src=”<?php echo site_url(); ?>/wp-includes/js/tinymce/utils/mctabs.js”></script>
<script language=”javascript” type=”text/javascript” src=”<?php echo site_url(); ?>/wp-includes/js/tinymce/utils/form_utils.js”></script>
<script language=”javascript” type=”text/javascript” src=”<?php echo site_url(); ?>/wp-includes/js/tinymce/utils/form_utils.js”></script>
<script language=”javascript” type=”text/javascript”>
jQuery(document).ready(function($){
var _self = tinyMCEPopup;
$(‘#wpwrap .country’).live(‘click’,function(e){
e.preventDefault();
var country=$(this).attr(‘data-cid’);
var tag='[flag country=”‘+country+'”]’;
if(window.tinyMCE) {
window.tinyMCE.execInstanceCommand(‘content’, ‘mceInsertContent’, false, tag);
tinyMCEPopup.editor.execCommand(‘mceRepaint’);
tinyMCEPopup.close();
}
});
$(‘#closeMCE’).click(function(e){
e.preventDefault();
tinyMCEPopup.close();
})
});
</script>
<style type=”text/css”>
.countries-wrap { background:#EEE; }
.countries-wrap .country { width:45%; float:left; padding:3px; cursor:pointer; -moz-border-radius: 2px; -webkit-border-radius: 2px; -ms-border-radius: 2px; border-radius: 2px; }
.countries-wrap .country:hover { background:#DDD; }
.countries-wraps:after { content:””; clear:both; display:block; width:100%; }
</style>
</head><body>
<div id=”wpwrap”>
<div class=”countries-wrap”>
<?php foreach($ar_countries as $code=>$name){ ?>
<div class=”country country-<?php strtolower($code); ?>” data-cid=”<?php echo strtolower($code); ?>”><img src=”<?php echo $wpdb->worldflag_plugin_dir; ?>assets/blank.gif” class=”flag flag-<?php echo strtolower($code); ?>” /> <?php echo ucwords(strtolower($name)); ?></div>
<?php } ?>
</div>
</div>
</body>
</html>` Please help me
- The topic ‘Post Problem’ is closed to new replies.