Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
plugins-topic
Error when activating Template Tags plugin
Avatar
Adam Smith
Member
Free Members
sp_UserOfflineSmall Offline
Sep 7, 2013 - 6:21 pm

Hello,

I am very new to this forum :) So far I'm very happy with the move over from mingle forums to simple press.

When ever I activate this plugin I get these errors accross the top over wordpress both inside the backend and front;

Warning: include_once(/problem-with-post-edit-buttonome/ali0708/public_html/wp-content/sp-resources/forum-plugins/template-tags/library/sp-RecentPosts-widget.php) [function.include-once]: failed to open stream: No such file or directory in /problem-with-post-edit-buttonome/ali0708/public_html/wp-content/sp-resources/forum-plugins/template-tags2/sp-template-tags-plugin.php on line 23

Warning: include_once() [function.include]: Failed opening '/problem-with-post-edit-buttonome/ali0708/public_html/wp-content/sp-resources/forum-plugins/template-tags/library/sp-RecentPosts-widget.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in/problem-with-post-edit-buttonome/ali0708/public_html/wp-content/sp-resources/forum-plugins/template-tags2/sp-template-tags-plugin.php on line 23

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /problem-with-post-edit-buttonome/ali0708/public_html/wp-content/sp-resources/forum-plugins/template-tags2/sp-template-tags-plugin.php:23) in/problem-with-post-edit-buttonome/ali0708/public_html/wp-content/plugins/jigoshop/classes/jigoshop_session.class.php on line 22

 

Any help guys?

 

Thanks,

Adam.

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Sep 7, 2013 - 8:22 pm

the directory name is wrong (an issue with wp updater)... it should just be template-tags... please rename the directory and all will be well....

Avatar
Adam Smith
Member
Free Members
sp_UserOfflineSmall Offline
Sep 7, 2013 - 8:45 pm

Thanks for the speedy reply!

 

Yes, this resolved my problem :) Many thanks!

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Sep 8, 2013 - 1:04 am

np. glad to help. thanks for the update.

Avatar
Adam Smith
Member
Free Members
sp_UserOfflineSmall Offline
Sep 8, 2013 - 8:41 am

Two more problems I'm having :)

The recent post widget shows a bulletin points instead of the forum avatar. Is this something down to the theme I'm using? If so any pointers in to the correct place I can change it?

Also, my 'Ad Topic' & 'Ad reply' buttons don't work. I am able to reply to already made threads that i've imported over from mingle forum by using the 'Quote' button, but if i'm to hit 'Ad Reply' nothing happens, or if I'm to click the 'Ad Topic' button it takes me to the forum topic page and then the button becomes unresponsive again. 

Here's my site if this helps;

http://www.a4service.co.uk

Many thanks,

Adam.

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Sep 8, 2013 - 12:17 pm

have you enabled avatar display in the widget?  you have to turn it on as its not on by default...

see:  http://codex.simple-press.com/.....ts-widget/

and bullets are likely because your wp theme adds them to li elements... you can style the widget however you like... since its normally show outside of the forum page, our styles are not loaded...

Avatar
Adam Smith
Member
Free Members
sp_UserOfflineSmall Offline
Sep 8, 2013 - 2:28 pm

Fantastic! Problem solved again! :)

Just a problem now with the 'ad topic' and 'ad reply', any ideas on this one? Is it something I'm over looking in the permissions? The buttons don't do anything, i am able to reply to threads using the quote button and topics are made correctly using the blog linking plugin.

Thanks so much for the help :) Sorry to be a pain, I am super n00b with Simple Press =]

Adam.

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Sep 8, 2013 - 2:48 pm

your wp theme is doing bad things...  its using its own versions of jquery and jquery ui instead of using the versions that come with wp...  see:  http://codex.simple-press.com/.....-conflict/

<script type='text/javascript' src='https://www.A4Service.co.uk/wp-content/themes/theme2015/js/jquery-1.7.2.min.js?ver=1.7.2'></script>
<script type='text/javascript' src='https://www.A4Service.co.uk/wp-content/themes/theme2015/jigoshop/jquery-ui-1.9.0.custom.js?ver=3.6'></script>

and those are both older versions that what comes with wp that wp and plugins use and expect...  if you can find where your wp theme is incorrectly loading those jquery and jquery ui versions, we can help you correct it to use the wp versions...

Avatar
Adam Smith
Member
Free Members
sp_UserOfflineSmall Offline
Sep 8, 2013 - 4:10 pm

Many thanks for the reply! :)

I think this is what you've requested;

I have found jquery-1.7.2.min.js in the themes 'theme-scripts.php' on the following line;

wp_register_script('jquery', get_bloginfo('template_url').'/js/jquery-1.7.2.min.js', false, '1.7.2');

here's the full .php;

<?php /* Register and load javascript /*-----------------------------------------------------------------------------------*/ function my_script() { if (!is_admin()) { wp_deregister_script('jquery'); wp_register_script('jquery', get_bloginfo('template_url').'/js/jquery-1.7.2.min.js', false, '1.7.2'); wp_enqueue_script('jquery');

wp_enqueue_script('modernizr', get_bloginfo('template_url').'/js/modernizr.js', array('jquery'), '2.0.6'); wp_enqueue_script('superfish', get_bloginfo('template_url').'/js/superfish.js', array('jquery'), '1.4.8'); wp_enqueue_script('easing', get_bloginfo('template_url').'/js/jquery.easing.1.3.js', array('jquery'), '1.3'); wp_enqueue_script('prettyPhoto', get_bloginfo('template_url').'/js/jquery.prettyPhoto.js', array('jquery'), '3.1.3'); wp_enqueue_script('flexslider', get_bloginfo('template_url').'/js/jquery.flexslider.js', array('jquery'), '1.8'); wp_enqueue_script('tools', get_bloginfo('template_url').'/js/jquery.tools.min.js', array('jquery'), '1.2.6'); wp_enqueue_script('mobilemenu', get_bloginfo('template_url').'/js/jquery.mobilemenu.js', array('jquery'), '1.0'); wp_enqueue_script('elastislide', get_bloginfo('template_url').'/js/jquery.elastislide.js', array('jquery'), '1.0'); wp_enqueue_script('loader', get_bloginfo('template_url').'/js/jquery.loader.js', array('jquery'), '1.0'); wp_enqueue_script('swfobject', get_bloginfo('url').'/wp-includes/js/swfobject.js', array('jquery'), '2.2'); wp_enqueue_script('slides', get_bloginfo('template_url').'/js/slides.jquery.js', array('jquery'), '1.1.9'); wp_enqueue_script('twitter', get_bloginfo('template_url').'/js/jquery.twitter.js', array('jquery'), '1.0'); wp_enqueue_script('flickr', get_bloginfo('template_url').'/js/jquery.flickrush.js', array('jquery'), '1.0'); wp_enqueue_script('touch', get_bloginfo('template_url').'/js/touchTouch.jquery.js', array('jquery'), '1.0'); wp_enqueue_script('si_files', get_bloginfo('template_url').'/js/si.files.js', array('jquery'), '1.0'); wp_enqueue_script('audiojs', get_bloginfo('template_url').'/js/audiojs/audio.js', array('jquery'), '1.0'); wp_enqueue_script('sf_Touchscreen', get_bloginfo('template_url').'/js/sfmenu-touch.js', array('jquery'), '1.0'); wp_enqueue_script('custom', get_bloginfo('template_url').'/js/custom.js', array('jquery'), '1.0'); } } add_action('init', 'my_script');

/* Register and load admin javascript /*-----------------------------------------------------------------------------------*/

function tz_admin_js($hook) { if ($hook == 'post.php' || $hook == 'post-new.php') { wp_register_script('tz-admin', get_template_directory_uri() . '/js/jquery.custom.admin.js', 'jquery'); wp_enqueue_script('tz-admin'); } } add_action('admin_enqueue_scripts','tz_admin_js',10,1); ?>

I found the second one, jquery-ui-1.9.0.custom, within themes 'jigoshops-functions.php' on the following line;

wp_enqueue_script( 'jquery_ui', get_bloginfo('template_url').'/jigoshop/jquery-ui-1.9.0.custom.js', array('jquery'));

here's a copy of the full .php

<?php

//including shortcodes

include_once('shortcodes/cart.php'); add_shortcode('my_cart' , 'get_my_cart'); if (!is_admin()) { wp_enqueue_script( 'jquery_ui', get_bloginfo('template_url').'/jigoshop/jquery-ui-1.9.0.custom.js', array('jquery')); wp_enqueue_script('jigoscript', get_bloginfo('template_url').'/jigoshop/jigoscript.js', array('jquery'), '1.0'); wp_enqueue_script( 'jigoshop_script', get_bloginfo('template_url').'/jigoshop/script.js', array('jquery')); }

//Register sidebars

if (!function_exists('jigoshop_widgets_init')) { function jigoshop_widgets_init() { // Cart Holder register_sidebar(array( 'name' => 'Cart Holder', 'id' => 'cart-holder', 'description' => __( 'Contains shopping cart.'), 'before_widget' => '<div id="%2$s">', 'after_widget' => '</div>', 'before_title' => '<h3>', 'after_title' => '</problem-with-post-edit-button3>', )); } //Overriding jigoshop functions

add_action( 'widgets_init', 'jigoshop_widgets_init' ); }

if (!function_exists('jigoshop_template_loop_add_to_cart')) { function jigoshop_template_loop_add_to_cart( $post, $_product ) {

do_action('jigoshop_before_add_to_cart_button');

// do not show "add to cart" button if product's price isn't announced if ( $_product->get_price() === '' AND ! ($_product->is_type(array('variable', 'grouped', 'external'))) ) return;

if ( $_product->is_in_stock() OR $_product->is_type('external') ) : if ( $_product->is_type(array('variable', 'grouped')) ) : $output = '<a href="'.get_permalink($_product->id).'" class="button" title="Detalis">'.__('Detalis', 'theme2015').'</a>'; elseif ( $_product->is_type('external') ) : $output = '<a href="'.get_post_meta( $_product->id, 'external_url', true ).'" class="button" title="Buy product">'.__('Buy product', 'theme2015').'</a>'; else : $output = '<a href="'.esc_url($_product->add_to_cart_url()).'" class="button" title="Add to cart">'.__('Add to cart', 'theme2015').'</a>'; endif; elseif ( ($_product->is_type(array('grouped')) ) ) : return; else : $output = '<span class="nostock">'.__('Out of Stock', 'theme2015').'</span>'; endif; echo $output;

do_action('jigoshop_after_add_to_cart_button'); } } add_image_size( 'single', 100, 100, true ); // Slider Small Thumbnail if (!function_exists('jigoshop_show_product_images')) { function jigoshop_show_product_images() {

global $_product, $post;

echo '<div class="images">';

do_action( 'jigoshop_before_single_product_summary_thumbnails', $post, $_product );

$thumb_id = 0; if (has_post_thumbnail()) : $thumb_id = get_post_thumbnail_id(); // since there are now user settings for sizes, shouldn't need filters -JAP- //$large_thumbnail_size = apply_filters('single_product_large_thumbnail_size', 'shop_large'); $large_thumbnail_size = jigoshop_get_image_size('single_product_large_thumbnail_size', 'shop_large'); echo '<a href="'.wp_get_attachment_url($thumb_id).'" class="zoom" rel="thumbnails">'; the_post_thumbnail($large_thumbnail_size); echo '</a>'; else : echo jigoshop_get_image_placeholder( 'shop_large' ); endif;

do_action('jigoshop_product_thumbnails');

echo '</div>';

} }

// Product Brands

$brand_labels = array( 'name' => __( 'Brands' ), 'singular_name' => __( 'Brand' ), 'search_items' => __( 'Search Brands' ), 'popular_items' => __( 'Popular Brands' ), 'all_items' => __( 'All Brands' ), 'parent_item' => null, 'parent_item_colon' => null, 'edit_item' => __( 'Edit Brand' ), 'update_item' => __( 'Update Brand' ), 'add_new_item' => __( 'Add New Brand' ), 'new_item_name' => __( 'New Brand Name' ), 'add_or_remove_items' => __( 'Add or remove brands' ), 'choose_from_most_used' => __( 'Choose from the most used brands' ), 'menu_name' => __( 'Brands' ), );

register_taxonomy('brands','product',array( 'hierarchical' => true, 'labels' => $brand_labels, 'show_ui' => true, 'show_admin_column' => true, 'update_count_callback' => '_update_post_term_count', 'query_var' => true, 'rewrite' => array( 'slug' => 'brand' ), )); /** * Category thumbnails */

if (!function_exists('jigoshop_brands_image')) { function jigoshop_brands_image($id) {

if( empty($id) ) return false;

$thumbnail_id = get_metadata('jigoshop_term', $id, 'brand_thumbnail_id', true); $category_image = $thumbnail_id ? wp_get_attachment_url( $thumbnail_id ) : get_bloginfo( 'template_url' ).'/images/placeholder.png';

return array('image' => $category_image, 'thumb_id' => $thumbnail_id);

} }

add_action('brands_add_form_fields' , 'brands_add_thumbnail_field'); add_action('brands_edit_form_fields', 'brands_edit_thumbnail_field', 10,2);

function brands_add_thumbnail_field() { $image = get_bloginfo( 'template_url' ).'/images/placeholder.png'; ?> <div class="form-field"> <label><?php _e('Thumbnail', 'theme2015'); ?></label> <div id="brands_thumbnail" style="float:left;margin-right:10px;"><img src="<?php echo $image; ?>" width="60px" height="60px" /></div> <div style="line-height:60px;"> <input type="hidden" id="brands_thumbnail_id" name="brands_thumbnail_id" /> <button type="submit" class="upload_image_button button"><?php _e('Upload/Add image', 'theme2015'); ?></button> <button type="submit" class="remove_image_button button"><?php _e('Remove image', 'theme2015'); ?></button> </div> <script type="text/javascript"> jQuery(function(){ jQuery('#brands_thumbnail_id').val(''); }) window.send_to_termmeta = function(html) {

jQuery('body').append('<div id="temp_image">' + html + '</div>');

var img = jQuery('#temp_image').find('img');

imgurl = img.attr('src'); imgclass = img.attr('class'); imgid = parseInt(imgclass.replace(/D/g, ''), 10);

jQuery('#brands_thumbnail_id').val(imgid); jQuery('#brands_thumbnail img').attr('src', imgurl); jQuery('#temp_image').remove();

tb_remove(); }

jQuery('.upload_image_button').live('click', function(e){ e.preventDefault(); var post_id = 0;

window.send_to_editor = window.send_to_termmeta;

tb_show('', 'media-upload.php?post_id=' + post_id + '&type=image&TB_iframe=true'); return false; });

jQuery('.remove_image_button').live('click', function(){ jQuery('#brands_thumbnail img').attr('src', '<?php echo $image; ?>'); jQuery('#brands_thumbnail_id').val(''); return false; });

</script> <div class="clear"></div> </div> <?php }

function brands_edit_thumbnail_field( $term, $taxonomy ) { $image = jigoshop_brands_image($term->term_id); ?> <tr class="form-field"> <th scope="row" valign="top"><label><?php _e('Thumbnail', 'theme2015'); ?></label></th> <td> <div id="brands_thumbnail" style="float:left;margin-right:10px;"><img src="<?php echo $image['image']; ?>" width="60px" height="60px" /></div> <div style="line-height:60px;"> <input type="hidden" id="brands_thumbnail_id" name="brands_thumbnail_id" value="<?php echo $image['thumb_id']; ?>" /> <button type="submit" class="upload_image_button button"><?php _e('Upload/Add image', 'theme2015'); ?></button> <button type="submit" class="remove_image_button button"><?php _e('Remove image', 'theme2015'); ?></button> </div> <script type="text/javascript"> jQuery(function(){ jQuery('#brands_thumbnail_id').val(''); }) window.send_to_termmeta = function(html) {

jQuery('body').append('<div id="temp_image">' + html + '</div>');

var img = jQuery('#temp_image').find('img');

imgurl = img.attr('src'); imgclass = img.attr('class'); imgid = parseInt(imgclass.replace(/D/g, ''), 10);

jQuery('#brands_thumbnail_id').val(imgid); jQuery('#brands_thumbnail img').attr('src', imgurl); jQuery('#temp_image').remove();

tb_remove(); }

jQuery('.upload_image_button').live('click', function(e){ e.preventDefault(); var post_id = 0;

window.send_to_editor = window.send_to_termmeta;

tb_show('', 'media-upload.php?post_id=' + post_id + '&type=image&TB_iframe=true'); return false; });

jQuery('.remove_image_button').live('click', function(){ jQuery('#brands_thumbnail img').attr('src', '<?php echo jigoshop::assets_url().'/assets/images/placeholder.png'; ?>'); jQuery('#brands_thumbnail_id').val(''); return false; });

</script> <div class="clear"></div> </td> </tr> <?php }

add_action('created_term', 'barnds_thumbnail_field_save', 10,3); add_action('edit_term' , 'barnds_thumbnail_field_save', 10,3);

function barnds_thumbnail_field_save( $term_id, $tt_id, $taxonomy ) {

if (!isset($_POST['brands_thumbnail_id'])) return false;

update_metadata( 'jigoshop_term', $term_id, 'brands_thumbnail_id', $_POST['brands_thumbnail_id'] );

}

/** * Thumbnail column for categories */ add_filter("manage_edit-brands_columns", 'jigoshop_brands_columns'); add_filter("manage_brands_custom_column", 'jigoshop_brands_column', 10, 3);

function jigoshop_brands_columns( $columns ) {

$new_columns = array( 'cb' => $columns['cb'], 'thumb' => null );

unset($columns['cb']); $columns = array_merge( $new_columns, $columns );

return $columns;

}

function jigoshop_brands_column( $columns, $column, $id ) {

if ($column != 'thumb') return false;

$brands = get_terms( 'brands', 'orderby=count&hide_empty=0' ); foreach ($brands as $brand) { if($brand->term_id==$id) { global $wpdb; $brand_thumb = $wpdb->get_row("SELECT * FROM $wpdb->jigoshop_termmeta WHERE jigoshop_term_id = $id AND meta_key = 'brands_thumbnail_id'", ARRAY_A); $brand_thumb_url = wp_get_attachment_image_src($brand_thumb['meta_value'],'full'); $brand_image = aq_resize( $brand_thumb_url[0], 32, 32, true ); if ($brand_image=='') {$brand_image = get_bloginfo( 'template_url' ).'/images/placeholder.png';} } } $columns .= '<a class="row-title" href="'.get_edit_term_link( $id, 'brands', 'product' ).'">'; $columns .= '<img src="'.$brand_image.'" alt="Thumbnail" class="wp-post-image" height="32" width="32" />'; $columns .= '</a>';

return $columns;

}

 

if (!function_exists('jigoshop_output_content_wrapper')) { function jigoshop_output_content_wrapper() { if( get_option('template') === 'twentyeleven' ) echo '<section id="primary"><div id="content" role="main">'; else echo ''; /* twenty-ten */ } } include_once (TEMPLATEPATH . '/jigoshop/widgets/my-recent_products.php'); include_once (TEMPLATEPATH . '/jigoshop/widgets/my-featured_products.php'); include_once (TEMPLATEPATH . '/jigoshop/widgets/my-cart.php'); add_action("widgets_init", "load_jigo_widgets"); if (!function_exists('load_jigo_widgets')) { function load_jigo_widgets() {

register_widget("MY_RecentProducts"); register_widget("MY_FeaturedProducts"); register_widget("My_Widget_Cart"); } } if (!function_exists('jigoshop_pagination')) { function jigoshop_pagination() {

global $wp_query;

if ( $wp_query->max_num_pages > 1 ) : get_template_part('includes/post-formats/post-nav'); endif;

} }

if (!function_exists('jigoshop_product_attributes_tab')) { function jigoshop_product_attributes_tab( $current_tab ) {

global $_product; if( ( $_product->has_attributes() || $_product->has_dimensions() || $_product->has_weight() ) ): ?> <li <?php if ($current_tab=='#tab-attributes') echo 'class="active"'; ?>><a href="#tab-attributes"><?php _e('Info', 'theme2015'); ?></a></li><?php endif;

} } if (!function_exists('jigoshop_output_related_products')) { function jigoshop_output_related_products() { $jigoshop_options = Jigoshop_Base::get_options(); if ($jigoshop_options->get_option ('jigoshop_enable_related_products') != 'no') // 2 Related Products in 2 columns jigoshop_related_products( 3, 3 ); } } //### Sale products shortcode #########################################################

function on_sale_products( $atts ) { global $columns, $per_page, $paged;

extract(shortcode_atts(array( 'per_page' => Jigoshop_Base::get_options()->get_option('jigoshop_catalog_per_page'), 'columns' => Jigoshop_Base::get_options()->get_option('jigoshop_catalog_columns'), 'orderby' => Jigoshop_Base::get_options()->get_option('jigoshop_catalog_sort_orderby'), 'order' => Jigoshop_Base::get_options()->get_option('jigoshop_catalog_sort_direction'), 'pagination' => false ), $atts));

$today = date('Y-m-d',time()); $tomorrow = date('Y-m-d',mktime(0, 0, 0, date("m"), date("d")+1, date("Y")) );

$args = array( 'post_type' => array( 'product' ), 'post_status' => 'publish', 'ignore_sticky_posts' => 1, 'posts_per_page' => $per_page, 'orderby' => $orderby, 'order' => $order, 'meta_query' => array( array( 'key' => 'visibility', 'value' => array( 'catalog', 'visible' ), 'compare' => 'IN' ), array( 'key' => 'sale_price', 'value' => '', 'compare' => '!=' ) ) ); @query_posts($args); ob_start(); jigoshop_get_template_part( 'loop', 'shop' ); if ( $pagination ) do_action( 'jigoshop_pagination' ); wp_reset_query(); return ob_get_clean(); } add_shortcode('on_sale', 'on_sale_products'); ?>

 

I apologies for such long text, and if this isn't actually what you've requested!

Many thanks! Highly appreciated! 

Adam.

 

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Sep 8, 2013 - 8:21 pm

its kind of hard to read since you didnt use the code button... but try deleting these two lines:

wp_deregister_script('jquery'); 
wp_register_script('jquery', get_bloginfo('template_url').'/js/jquery-1.7.2.min.js', false, '1.7.2');

that should fix the jquery error...

the jquery ui error is actually in the jigoshop portion of the wp theme... but you can try just the jquery change first...

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 619
Members: 17363
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10127
Posts: 79625