Forum Replies Created

Viewing 15 replies - 46 through 60 (of 80 total)
  • Thread Starter wallyO

    (@wallyo)

    Thanks Steven,
    AIO Webmaster does indeed also use menu position 5.
    after reading your codex entry I added the following code to my themes functions.php

    add_filter( 'eventorganiser_menu_position', 'my_callback_function', 10, 1 );
    function my_callback_function( $menu_position ){
    	//$menu_position = 7; // Positions Events menu item below AIO Webmaster menu item.
    	$menu_position = 20; // Positions Events menu item below Pages menu item.
    	return $menu_position;
    };

    Sub-folder setup would only require (at a minimum) one verification code located in head of the domain.com page.
    This plugin puts THAT verification code on ALL pages of domain.com in a NON multi-site install.
    I am unsure of its behavior in a multi-site install.

    Plugin file does not exist error occurs due to the plugin file-name changing from
    all-in-one-webmaster.php
    to
    all-in-one-webmaster-premium.php
    Plugin with new file-name activates fine as you discovered.

    What I noticed was that the settings data (in my case google-site-verification) was not transferred from the old version of the plugin to the new version of the plugin.
    SO…..
    Before you update copy all your entered data to a text file somewhere so the you can reenter it into the new version of the plugin after the update.
    If like me, you have already updated, you can recover your old settings data by deactivating and deleting the new version, re-upload the old version then activate it.
    The data remains orphaned in the wp_options table and it repopulates the settings fields of the old version of the plugin.
    Copy all your settings data to a text file somewhere so the you can reenter it into the new version of the plugin after you update.
    I had done the update on a dozen sites before I realised that all the google-site-verification fields in the new version were blank.

    Works well for me.
    Thanks Alexander.

    Hello joannamnew,
    Here is my minified version.
    This was minified by YSlow for Firefox. (Tools => All JS Minified)
    Hint: To make it easy on yourself when minifying files with YSlow, only load the unminified js in Firefox, not the whole page.
    Some of the differences between yours and mine are,
    Yours is all on one line. Mine has about 100 lines.
    Yours has the end of line semi-colons stripped. mine are still in place.
    Other than that I think yours and my files are identical, so one or more of the semi-colans or one or more was the line breaks are required for the syntax of this file to still be valid after passing through the minifier.
    This is a common problem when trying to minify js files.
    Some files break for some settings in some minifiers

    Google is your friend.
    https://www.google.com.au/#q=How+do+i+minify+a+JS+file
    The first result is https://jscompress.com/
    The javascript compressor on this site seems to work quite well.
    There are many other ways also. (Yslow for firebug can be convenient if you use it, Tools=> All JS beatified, All JS Minified.)

    So now copy the contents of framework.js and replace the contents of framework.min.js with the code you just copied.
    Then save framework.min.js.
    The plugin should work now.

    Did you do this and does that plugin work now?

    I really like your plugin by the way.
    It is the most feature rich Google maps plugin out of the 4 I have tried.

    1. Geo-coordinate locations with labels
    2. Custom marker pins
    3. kml overlays
    4. Available in any content type I want
    5. Awesome

    In the file
    wp-content\plugins\comprehensive-google-map-plugin\assets\js\cgmp.framework.js
    find the code

    var version = parseFloat($.fn.jquery);
    if (version < 1.0) {
    	alert(CGMPGlobal.errors.oldJquery);
    	//Logger.fatal("Client uses jQuery older than the version 1.3.0. Aborting map generation ..");
    	return false;
    }

    and replace it with

    function compVersions(strV1, strV2) {
    var nRes = 0
    , parts1 = strV1.split('.')
    , parts2 = strV2.split('.')
    , nLen = Math.max(parts1.length, parts2.length);
    
    for (var i = 0; i < nLen; i++) {
    var nP1 = (i < parts1.length) ? parseInt(parts1[i], 10) : 0
    , nP2 = (i < parts2.length) ? parseInt(parts2[i], 10) : 0;
    
    if (isNaN(nP1)) { nP1 = 0; }
    if (isNaN(nP2)) { nP2 = 0; }
    
    if (nP1 != nP2) {
    nRes = (nP1 > nP2) ? 1 : -1;
    break;
    }
    }
    
    return nRes;
    
    };
    
    var strV1 = "1.3";
    var strV2 = $.fn.jquery;
    //alert(compVersions(strV1, strV2));
    
    if (compVersions(strV1, strV2) > 0) {
    	alert(CGMPGlobal.errors.oldJquery);
    	//Logger.fatal("Client uses jQuery older than the version 1.3.0. Aborting map generation ..");
    	return false;
    }

    Save this file.
    That file is not actually used by the plugin, it is the formatted version for humans to read and edit.
    The file that is used is
    wp-content\plugins\comprehensive-google-map-plugin\assets\js\cgmp.framework.min.js
    So now copy the contents of framework.js to framework.min.js then save again.
    The plugin should work now.
    If you know how to minify a js file then minify framework.min.js and save again.

    I have done some troubleshooting and have found that if called directly the loginLockdown_install function does create the two database tables on my wamplite server.
    The problem lies in the lines 311-315.
    On my LAMP Production server this works as designed, $activatestr outputs
    activate_login-lockdown/loginlockdown.php
    On my WAMPlite Development server this does not work, $activatestr outputs
    C:\Users\user\Documents\MySites\wordpress-site\login-lockdown.dev\wp-content\plugins\login-lockdown\loginlockdown.php
    This happens because __FILE__ outputs
    C:\Users\user\Documents\MySites\wordpress-site\login-lockdown.dev\wp-content\plugins\login-lockdown\loginlockdown.php
    and
    WP_PLUGIN_DIR . "/"
    outputs
    C:\Users\user\Documents\MySites\wordpress-site\login-lockdown.dev/wp-content/plugins/
    I got this to work on the DEVELOPMENT server and the PRODUCTION server by replacing

    if(!defined('WP_PLUGIN_DIR')){
    define('WP_PLUGIN_DIR', ABSPATH . 'wp-content/plugins');
    }
    $activatestr = str_replace(WP_PLUGIN_DIR . "/", "activate_", __FILE__);
    add_action($activatestr, 'loginLockdown_install');

    with
    register_activation_hook( __FILE__, 'loginLockdown_install' );
    PS. Apparently register_activation_hook is only called on activation not on update. It is documented here.

    Thread Starter wallyO

    (@wallyo)

    Thread Starter wallyO

    (@wallyo)

    Got it.
    The bug is with wpmudev multi-db.
    On line 512 of db.php replace the code

    } else if ( preg_match('/^\s*SHOW CREATE TABLE<code>?(\w+?)</code>?\s*/is', $query, $maybe) ) {

    with

    } else if ( preg_match('/^\s*SHOW CREATE TABLE<code>?(\w+)</code>?\s*/is', $query, $maybe) ) {

    Backup Scheduler is now fully functional on my multisite multi database installation.
    I regret your time I have wasted Sed Lex. The issue was never with your plugin.
    I will post the bug to wpmudev tomorrow.

    Thread Starter wallyO

    (@wallyo)

    I have just tested two versions of this multisite installation on my local development server. It is a xampplite server on windows.

    First was using the original single database version from before I migrated the data to the multi database. Backup scheduler created a good backup sql for a single site in the multisite install.

    Next I tested the same installation but this time with the multi database connection. Backup scheduler created broken sql as I posted above with missing create table sections.

    So that is two separate multi database installations giving problems, one on a Development and one on a Production server. I am using the multi-db plugin from wpmudev when I connect to the multi databases.

    Thread Starter wallyO

    (@wallyo)

    I just ran used backup scheduler on a single site wordpress installation on the same server and it created a good backup file as in your post Arffff …
    The installation which is not creating good backup sql is a multisite installation on the same server. Server is Lamp with cPanel MySQL 5.0.92 PHP 5.2.17.
    The instalation is on a multi db (16 database), which is most likely the cause of the problem.
    I should have listed full environment in my first post. Sorry.

    Thread Starter wallyO

    (@wallyo)

    [ Moderator Note: Please post code or markup snippets between backticks or use the code button. ]

    No I do not.
    Here is the start of a backup for a single site in a multisite install.

    -- -----------------------------
    -- CREATE wp_3_commentmeta
    -- -----------------------------
    DROP TABLE IF EXISTS wp_3_commentmeta;
    ;
    
    -- -----------------------------
    -- CREATE wp_3_comments
    -- -----------------------------
    DROP TABLE IF EXISTS wp_3_comments;
    ;
    
    -- -----------------------------
    -- CREATE wp_3_links
    -- -----------------------------
    DROP TABLE IF EXISTS wp_3_links;
    ;
    
    -- -----------------------------
    -- CREATE wp_3_options
    -- -----------------------------
    DROP TABLE IF EXISTS wp_3_options;
    ;
    
    -- -----------------------------
    -- CREATE wp_3_postmeta
    -- -----------------------------
    DROP TABLE IF EXISTS wp_3_postmeta;
    ;
    
    -- -----------------------------
    -- CREATE wp_3_posts
    -- -----------------------------
    DROP TABLE IF EXISTS wp_3_posts;
    ;
    
    -- -----------------------------
    -- CREATE wp_3_term_relationships
    -- -----------------------------
    DROP TABLE IF EXISTS wp_3_term_relationships;
    ;
    
    -- -----------------------------
    -- CREATE wp_3_term_taxonomy
    -- -----------------------------
    DROP TABLE IF EXISTS wp_3_term_taxonomy;
    ;
    
    -- -----------------------------
    -- CREATE wp_3_terms
    -- -----------------------------
    DROP TABLE IF EXISTS wp_3_terms;
    ;
    
    -- -----------------------------
    -- INSERT INTO wp_3_commentmeta
    -- -----------------------------
    
    -- -----------------------------
    -- INSERT INTO wp_3_comments
    -- -----------------------------
    
    INSERT INTO wp_3_comments VALUES(1, 1, 'Mr WordPress', '', 'https://theme.dev/', '', '2012-08-23 12:33:55', '2012-08-23 12:33:55', 'Hi, this is a comment.To delete a comment, just log in and view the post's comments. There you will have the option to edit or delete them.', 0, '1', '', '', 0, 0);
    Thread Starter wallyO

    (@wallyo)

    Just did,sorry to take so long.
    My first test failed.
    It appears the drop table succeeds, but before you can insert into a table that has been dropped you must have a Create table command to recreate the table.
    For instance a typical phpmyadmin export has the lines:

    DROP TABLE IF EXISTS'wp_commentmeta';
    /*!40101 SET @saved_cs_client     = @@character_set_client */;
    /*!40101 SET character_set_client = utf8 */;
    CREATE TABLE 'wp_commentmeta'

    Please nor I have replaced sql backticks with single quotes so I can post it.

Viewing 15 replies - 46 through 60 (of 80 total)