WordPress.org

Ready to get started?Download WordPress

Forums

World Flag
Post Problem (9 posts)

  1. aleksthemighty
    Member
    Posted 1 year ago #

    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" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://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

    http://wordpress.org/extend/plugins/world-flag/

  2. WPPress
    Member
    Plugin Author

    Posted 1 year ago #

    its something to do with your php config I think. Some hosts come with high security setups if you used wordpress auto-installer or some security plugins.

    create a .htaccess file with text
    AddType x-mapp-php5 .php
    in it and put it in the in
    wp-contents/plugins/world-flag
    directory or somewhere you have installed the world-flag.

  3. aleksthemighty
    Member
    Posted 1 year ago #

    Nope, steel the same problem :(

  4. WPPress
    Member
    Plugin Author

    Posted 1 year ago #

    the iframe is showing the php codes means that your server is not working properly or your php config is forcing php files to be treated as html file. Please make sure of it. Also, if you contact your web host provider, they can sort it out.

  5. Tadas Krivickas
    Member
    Posted 1 year ago #

    I also have similar issue: http://imgur.com/D8u71P0

    Maybe it is possible to implement it like in other plugins (it's working), e.g. Tablepress using admin_post.php and action?

  6. Doctorpwnz
    Member
    Posted 1 year ago #

    Have the same trouble.

  7. teeratouch
    Member
    Posted 1 year ago #

    Got the same problem .. Moreover I use a localhost which shouldn't have any problem with server as you mention. About php config, I haven't tried it yet. Please advise and help.

    Anyway this plug-in is very useful if I could use it. I will definitely rate it as a 5 stars.

  8. myxmlcigar
    Member
    Posted 1 year ago #

    Same issue here. When I goto add a flag, I simply get the popup and it spits up the php and html code.

    It's not our server as we have root access and pretty much EVERY plugin we've installed on WP works fine.

  9. myxmlcigar
    Member
    Posted 1 year ago #

    Fix the issue on my end. Simply removed the .htaccess file that was in:

    wp-contents/plugins/world-flag/assets/tinymce

    Looks like the developer put an .htaccess file in the above directory. Deleting the .htacces file fixed the issue with the plugin burping up the php code.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.