Forum Replies Created

Viewing 15 replies - 1 through 15 (of 30 total)
  • Looks like you never figured this out. If you check the code for the display for Pinterest, it has at least one string that sets it ABOVE the others.

    Thread Starter shetakaey

    (@shetakaey)

    I don’t recall a second bad review.

    In any case, this is my opinion based on my experience, and does not constitute fact. However, I’ve done my best to honestly relay my experience.

    Oh wait, I see. This was a support request, and the OTHER post was the review. I should’ve looked closer. So in this case, I’ve asked about my perception of what the plugin page was describing. The bad review came later.

    Thread Starter shetakaey

    (@shetakaey)

    Nope, I’m not. I found the enormous images of highligher pens objectionable, as well, and there was no warning that they’d appear once the plugin was activated. And there was no way to turn them off that I could find.

    So… what are you referring to and where? ?? I’m dying to know.

    Okay, so “Import finished” but it didn’t import anything. Do the posts have to be public? Even though it asked for my password?

    Thank you for posting the fix, Taipa. I was wondering why it just sat here doing nothing. ??

    Awesome, lokrin2000! Thank you for the links.

    The fix I’ve found is to create a [email protected] email address on your host site. That’s the address used to send the email notifications, and adding this address worked for me. I found the fix in some guy’s blog.

    The fix I’ve found is to create a [email protected] email address on your host site. That’s the address used to send the email notifications, and adding this address worked for me.

    The fix I’ve found is to create a [email protected] email address on your host site. That’s the address used to send the email notifications, and adding this address worked for me. I found the fix in some guy’s blog.

    Thread Starter shetakaey

    (@shetakaey)

    Otto42: I accept your chiding with good grace, and thank you for the specifics. ?? I need to study up on php. I did have to check another php file for the opening and closing codes. ??

    t31os: Yes, you were correct in that it was the slashes breaking the smiley code. Alas. But thankfully this whole fiasco resulted in a plugin that keeps me from having to do this again later. ??

    Thanks to both of you — it’s working now. I appreciate the assistance and your continuing patience.

    Thread Starter shetakaey

    (@shetakaey)

    To Otto42: I saw that code hack on the Ars Aranea forum, but I really don’t know what to put in place of “…stuff just like in the functions.php but with your changes.” lol. I’m a PHP Noob all the way.

    Thread Starter shetakaey

    (@shetakaey)

    Oh and an addendum — it’s not the smilies with dashes, since the default WP smilies also use dashes. It appears to be an issue with wp_smiliesreplace being omitted from the new version.

    Thread Starter shetakaey

    (@shetakaey)

    Okay, here’s what I’m finding. The old functions.php contained this code:

    Convert smiley code to the icon graphic file equivalent.
     *
     * You can turn off smilies, by going to the write setting screen and unchecking
     * the box, or by setting 'use_smilies' option to false or removing the option.
     *
     * Plugins may override the default smiley list by setting the $wpsmiliestrans
     * to an array, with the key the code the blogger types in and the value the
     * image file.
     *
     * The $wp_smiliessearch global is for the regular expression array and is
     * set each time the function is called. The $wp_smiliesreplace is the full
     * replacement. Supposely, the $wp_smiliessearch array is looped over using
     * preg_replace() or just setting the array of $wp_smiliessearch along with the
     * array of $wp_smiliesreplace in the search and replace parameters of
     * preg_replace(), which would be faster and less overhead. Either way, both are
     * used with preg_replace() and can be defined after the function is called.
     *
     * The full list of smilies can be found in the function and won't be listed in
     * the description. Probably should create a Codex page for it, so that it is
     * available.
     *
     * @global array $wpsmiliestrans
     * @global array $wp_smiliesreplace
     * @global array $wp_smiliessearch
     * @since 2.2.0
     */
    function smilies_init() {
    	global $wpsmiliestrans, $wp_smiliessearch, $wp_smiliesreplace;
    
    	// don't bother setting up smilies if they are disabled
    	if ( !get_option( 'use_smilies' ) )
    		return;
    
    	if ( !isset( $wpsmiliestrans ) ) {
    		$wpsmiliestrans = array(
    		[CLIPPED SMILEY CODES FOR BREVITY]
    		);
    	}
    
    	$siteurl = get_option( 'siteurl' );
    	foreach ( (array) $wpsmiliestrans as $smiley => $img ) {
    		$wp_smiliessearch[] = '/(\s|^)' . preg_quote( $smiley, '/' ) . '(\s|$)/';
    		$smiley_masked = attribute_escape( trim( $smiley ) );
    		$wp_smiliesreplace[] = " <img src='$siteurl/wp-includes/images/smilies/$img' alt='$smiley_masked' class='wp-smiley' /> ";
    	}
    }
    
    /**
     * Merge user defined arguments into defaults array.
     *
     * This function is used throughout WordPress to allow for both string or array
     * to be merged into another array.
     *
     * @since 2.2.0
     *
     * @param string|array $args Value to merge with $defaults
     * @param array $defaults Array that serves as the defaults.
     * @return array Merged user defined values with defaults.
     */
    function wp_parse_args( $args, $defaults = '' ) {
    	if ( is_object( $args ) )
    		$r = get_object_vars( $args );
    	elseif ( is_array( $args ) )
    		$r =& $args;
    	else
    		wp_parse_str( $args, $r );
    
    	if ( is_array( $defaults ) )
    		return array_merge( $defaults, $r );
    	return $r;
    }
    
    /*

    and the new looks like this, below, which takes away my ability to use my own smilies with my own codes:

    /**
     * Convert smiley code to the icon graphic file equivalent.
     *
     * You can turn off smilies, by going to the write setting screen and unchecking
     * the box, or by setting 'use_smilies' option to false or removing the option.
     *
     * Plugins may override the default smiley list by setting the $wpsmiliestrans
     * to an array, with the key the code the blogger types in and the value the
     * image file.
     *
     * The $wp_smiliessearch global is for the regular expression and is set each
     * time the function is called.
     *
     * The full list of smilies can be found in the function and won't be listed in
     * the description. Probably should create a Codex page for it, so that it is
     * available.
     *
     * @global array $wpsmiliestrans
     * @global array $wp_smiliessearch
     * @since 2.2.0
     */
    function smilies_init() {
    	global $wpsmiliestrans, $wp_smiliessearch;
    
    	// don't bother setting up smilies if they are disabled
    	if ( !get_option( 'use_smilies' ) )
    		return;
    
    	if ( !isset( $wpsmiliestrans ) ) {
    		$wpsmiliestrans = array(
    		[CLIPPED SMILEY CODES AGAIN AS ABOVE]
    		);
    	}
    
    	if (count($wpsmiliestrans) == 0) {
    		return;
    	}
    
    	/*
    	 * NOTE: we sort the smilies in reverse key order. This is to make sure
    	 * we match the longest possible smilie (:???: vs :?) as the regular
    	 * expression used below is first-match
    	 */
    	krsort($wpsmiliestrans);
    
    	$wp_smiliessearch = '/(?:\s|^)';
    
    	$subchar = '';
    	foreach ( (array) $wpsmiliestrans as $smiley => $img ) {
    		$firstchar = substr($smiley, 0, 1);
    		$rest = substr($smiley, 1);
    
    		// new subpattern?
    		if ($firstchar != $subchar) {
    			if ($subchar != '') {
    				$wp_smiliessearch .= ')|(?:\s|^)';
    			}
    			$subchar = $firstchar;
    			$wp_smiliessearch .= preg_quote($firstchar, '/') . '(?:';
    		} else {
    			$wp_smiliessearch .= '|';
    		}
    		$wp_smiliessearch .= preg_quote($rest);
    	}
    
    	$wp_smiliessearch .= ')(?:\s|$)/m';
    }
    
    /**
     * Merge user defined arguments into defaults array.
     *
     * This function is used throughout WordPress to allow for both string or array
     * to be merged into another array.
     *
     * @since 2.2.0
     *
     * @param string|array $args Value to merge with $defaults
     * @param array $defaults Array that serves as the defaults.
     * @return array Merged user defined values with defaults.
     */
    function wp_parse_args( $args, $defaults = '' ) {
    	if ( is_object( $args ) )
    		$r = get_object_vars( $args );
    	elseif ( is_array( $args ) )
    		$r =& $args;
    	else
    		wp_parse_str( $args, $r );
    
    	if ( is_array( $defaults ) )
    		return array_merge( $defaults, $r );
    	return $r;
    }

    I’ve been trying to figure it out but I don’t know php. The main question for me at the moment is this: If I replace the new code — in full — with the old code, will it break anything else? How many other files would require changes to work? I am very fond of my smilies and I went to a great deal of trouble to code pretty much every possible configuration that someone might use in comments, to ensure that my smilies show up for various typed emotes.

    I realize this is not a crucial issue but dammit, why <strike>break</strike> change a code that worked just fine? I’m spending a lot of time (off and on) trying to figure this out and really won’t be happy if I can’t use my own smiley set. ??

    Thanks for your patience.

    Thread Starter shetakaey

    (@shetakaey)

    I’ll give it a try, and post my results here. Thanks.

Viewing 15 replies - 1 through 15 (of 30 total)