Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • SchwarzwaldFalke

    (@schwarzwaldfalke)

    I know it’s an old issue but I had the same problem and wrote a small fix for it. Maybe it’s useful for someone.
    Go to the rocket lazy load plugins editor and open rocket-lazy-load.php
    Search

    function rocket_lazyload_images( $html )

    Some lines below you find something like

    $html = preg_replace( '#<img([^>]+?)src=[\'"]?([^\'"\s>]+)[\'"]?([^>]*)>#', '<img${1}src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" data-lazy-original="${2}"${3}><noscript><img${1}src="${2}"${3}></noscript>', $html );

    Replace the whole line with

    $html = preg_replace( '#<img([^>]+?)src=[\'"]?([^\'"\s>]+)[\'"]?([^>]*)>#i', '<img${1}src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" data-lazy-original="${2}"${3}><noscript><style type="text/css">.rll_lazyimg{display:none !important;}</style><img${1}src="${2}"${3}></noscript>', $html );
    	$html = preg_replace('#<img([^>]+?)class="([^"]*)"([^>]*)>\s*<noscript>(.*)</noscript>#i','<img${1}class="${2} rll_lazyimg"${3}><noscript>${4}</noscript>',$html);

    This will hide the empty boxes if JS is disabled.

    Cheers,
    Chris

    Thread Starter SchwarzwaldFalke

    (@schwarzwaldfalke)

    Hey Andrew,
    thanks for the fast response!

    Not sure if I understand you, but I don’t include styles for the jQuery datepicker. The tc_sortable.css will effect every jQuery datepicker, no matter what style it uses.

    I thought it would be nice to make the selector more specific by default so the customizr theme has no side effect on plugins which uses jQuery datepicker.

    But it was just a proposal, no problem if you have another opinion. 🙂

    Thread Starter SchwarzwaldFalke

    (@schwarzwaldfalke)

    Thanks for the answer!
    It’s great to hear, that I’m not alone. 🙂

    Because I don’t like to write directly to .htaccess (sometimes you don’t have write access, you have to check if your rules was overwritten etc..sucks) and filter the request sounds really hacky to me (just a feeling, I have no experience with it) I now use the following code:

    //Redirect wp-login.php
    			add_action( 'login_init', array( 'Fum_Redirect', 'redirect_wp_login_php' ) );
    public static function redirect_wp_login_php() {
    
    		if ( isset( $_GET['action'] ) ) {
    			$action = $_GET['action'];
    		}
    		else {
    			$action = '';
    		}
    		switch ( $action ) {
    			case '':
    			case 'register':
    				$link = add_query_arg( array( 'action' => $action ), get_permalink( get_option( Fum_Conf::$fum_register_login_page_name ) ) );
    				wp_safe_redirect( $link );
    				exit();
    				break;
    			case 'lostpassword':
    				//TODO Implement it
    				break;
    		}

    The big disadvantage of this solution is the forced redirect and reload. So the user has to load 2 pages to get the login form.

    But it works…and thats currently enough for me. 🙂

    Cheers,
    Chris

Viewing 3 replies - 1 through 3 (of 3 total)