Jump to content

Archived

This topic is now archived and is closed to further replies.

brightonkeller

DMS editor is not usable (no tabbed view)- see screenshot

Recommended Posts

brightonkeller

Any insight on what's going on? I think it could be a plugin I recently installed, but I'd like to keep using the plugin (hover button for pinterest)

 

 

Share this post


Link to post
Share on other sites
Danny

Hi,

 

This is most likely caused by the plugin as you mentioned. If you wish to continue using it, you will need to contact the developer of the plugin for assistance. It could be a minor CSS conflict or a JS conflict.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
brightonkeller

hi Danny - I think it's because I'm loading JQUERY 2x.....

 

but I looked at the js files for the plugin and saw where it said (load all necessary scripts), but I wasn't able to see where I could delete this second instance of JQUERY loading. Any ideas?

 

plugin page -->> http://wordpress.org/plugins/jquery-pin-it-button-for-images/

 

see snippet below from code located ---->>> http://plugins.svn.wordpress.org/jquery-pin-it-button-for-images/trunk/jquery-pin-it-button-for-images.php

//Adds all necessary scripts
function jpibfi_add_plugin_scripts() {
	if ( ! ( jpibfi_add_plugin() ) )
		return;

	wp_register_style( 'jquery-pin-it-button-style', plugins_url( '/css/style.css', __FILE__ ), array(), JPIBFI_VERSION, 'all' );
	wp_enqueue_style( 'jquery-pin-it-button-style' );

	wp_enqueue_script( 'jquery-pin-it-button-script', plugins_url( '/js/script.min.js', __FILE__ ), array( 'jquery' ), JPIBFI_VERSION, false );

	$visual_options = get_option( JPIBFI_VISUAL_OPTIONS );
	$selection_options = get_option( JPIBFI_SELECTION_OPTIONS );
	$advanced_options = get_option( JPIBFI_ADVANCED_OPTIONS );
	$use_custom_image = isset( $visual_options[ 'use_custom_image' ] ) && $visual_options[ 'use_custom_image' ] == "1";

	$parameters_array = array(
		'image_selector' 		=> $selection_options['image_selector'],
		'disabled_classes' 	=> $selection_options['disabled_classes'],
		'enabled_classes' 	=> $selection_options['enabled_classes'],
		'description_option'=> $visual_options['description_option'],
		'use_post_url' 			=> isset ( $visual_options['use_post_url'] ) ? $visual_options['use_post_url'] : '0',
		'min_image_height'	=> $selection_options['min_image_height'],
		'min_image_width'		=> $selection_options['min_image_width'],
		'site_title'				=> get_bloginfo( 'name', 'display' ),
		'mode'							=> $visual_options[ 'mode' ],
		'button_position'		=> $visual_options[ 'button_position' ],
		'debug'							=> isset( $advanced_options[ 'debug'] ) ? $advanced_options[ 'debug'] : '0',
		'pin_image_height' 	=> $use_custom_image ? $visual_options['custom_image_height'] : JPIBFI_IMAGE_HEIGHT,
		'pin_image_width'		=> $use_custom_image ? $visual_options['custom_image_width'] : JPIBFI_IMAGE_WIDTH,
		'button_margin_top'	=> $visual_options[ 'button_margin_top' ],
		'button_margin_bottom'	=> $visual_options[ 'button_margin_bottom' ],
		'button_margin_left'=> $visual_options[ 'button_margin_left' ],
		'button_margin_right'	=> $visual_options[ 'button_margin_right' ]
	);

	wp_localize_script( 'jquery-pin-it-button-script', 'jpibfi_options', $parameters_array );
}

add_action( 'wp_enqueue_scripts', 'jpibfi_add_plugin_scripts' );

function jpibfi_print_header_style_action() {
	if ( ! ( jpibfi_add_plugin() ) )
		return;

	$options = get_option( JPIBFI_VISUAL_OPTIONS );

	$use_custom_image = isset( $options[ 'use_custom_image' ] ) && $options[ 'use_custom_image' ] == "1";

	$width  = $use_custom_image ? $options['custom_image_width'] : JPIBFI_IMAGE_WIDTH;
	$height = $use_custom_image ? $options['custom_image_height'] : JPIBFI_IMAGE_HEIGHT;
	$url    = $use_custom_image ? $options['custom_image_url'] : JPIBFI_IMAGE_URL;

	?>
	<!--[if lt IE 9]>
		<style type="text/css">
			.pinit-overlay {
				background-image: url( '<?php echo plugins_url( '/images/transparency_0.png', __FILE__ ); ?>' ) !important;
			}
		</style>
	<![endif]-->

<style type="text/css">
	a.pinit-button {
		width: <?php echo $width; ?>px !important;
		height: <?php echo $height; ?>px !important;
		background: transparent url('<?php echo $url; ?>') no-repeat 0 0 !important;
	}

	a.pinit-button.pinit-top-left {
		margin: <?php echo $options['button_margin_top']; ?>px 0 0 <?php echo $options['button_margin_left']; ?>px;
	}

	a.pinit-button.pinit-top-right {
		margin: <?php echo $options['button_margin_top']; ?>px <?php echo $options['button_margin_right']; ?>px 0 0;
	}

	a.pinit-button.pinit-bottom-left {
		margin: 0 0 <?php echo $options['button_margin_bottom']; ?>px <?php echo $options['button_margin_left']; ?>px;
	}

	a.pinit-button.pinit-bottom-right {
		margin: 0 <?php echo $options['button_margin_right']; ?>px <?php echo $options['button_margin_bottom']; ?>px 0;
	}

	img.pinit-hover {
		opacity: <?php echo (1 - $options['transparency_value']); ?> !important;
		filter:alpha(opacity=<?php echo (1 - $options['transparency_value']) * 100; ?>) !important; /* For IE8 and earlier */
	}
</style>
<?php
}

add_action( 'wp_head', 'jpibfi_print_header_style_action' );

/*
 * Adds a hidden field with url and and description of the pin that's used when user uses "Link to individual page"
 * Thanks to go brocheafoin, who added most of the code that handles creating description
 */
function jpibfi_print_hidden_field_script( $content ) {
	if ( ! jpibfi_add_plugin() )
		return $content;
	global $post;

	$options = get_option( JPIBFI_VISUAL_OPTIONS );

	$add_attributes = false == is_singular() && isset( $options[ 'use_post_url' ] ) && '1' == $options[ 'use_post_url' ];

	$attributes_html = '';

	//if we need to add additional attributes to handle use_post_url setting
	if ( $add_attributes ){
		//if page description should be used as pin description and an excerpt for the post exists
		if ( has_excerpt( $post->ID ) && 2 == $options[ 'description_option' ] )
			$description = wp_kses( $post->post_excerpt, array() );
		else
			$description = get_the_title($post->ID);

		$attributes_html .= 'data-jpibfi-url="' . get_permalink( $post->ID ) . '" ' ;
		$attributes_html .= 'data-jpibfi-description ="' . esc_attr( $description ) . '" ';
	}


	$input_html = '<input class="jpibfi" type="hidden" ' . $attributes_html . '>';
	return $input_html . $content;
}

add_filter( "the_content", 'jpibfi_print_hidden_field_script' );

Share this post


Link to post
Share on other sites
Danny

Unfortunately, we are unable to provide support for third party sections, themes or plugins. If you have an issue with a plugin you need to contact the developer of the plugin.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites

×