Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
Forum showing twice on the page and uploaded media not enlarging, embedded video not showing, edit function not working.
Avatar
Greggy Boone
Member
Free Members
sp_UserOfflineSmall Offline
Jun 16, 2012 - 10:06 pm

My website is http://gbapple.com/filamchw/me.....ion-board/

The forum is showing twice. whatever media i upload is not popping-up and video embedded (youtube) will not show but I'm able to see its preview. Also, it's not letting me edit my posts.

I tested if a plugin is responsible for the first issue. I found out that everytime I add a footer, it would show the forum twice. Enabling and disabling the plugins did not make any changes on this problem.

The second one is that any media that's on the forum won't enlarge everytime i click on it. and also the usage policy and privacy policy links. I'm not sure what the problem is.

Another issue, i embedded two youtube videos. i am able to preview it but it won't show as soon as im done submitting the post. 

and one last thing, the edit button is not working 🙁

Help anyone?

 

Thanks

Avatar
Greggy Boone
Member
Free Members
sp_UserOfflineSmall Offline
Jun 16, 2012 - 10:10 pm

one last thing, when i click my profile picture, my profile won't pop up.

Avatar
Brandon
U.S.
SP Wrangler
Free Members
sp_UserOfflineSmall Offline
Jun 16, 2012 - 10:38 pm

Two issues to look into on this.

1) You are loading Query from the Google CDN. You can read about what problems that can cause and and how to correct it in the FAQs. http://codex.simple-press.com/.....-conflict/

2) The double display issue is also covered in the FAQ. http://codex.simple-press.com/.....-displayed.

After going through those and making some adjustments most of your issues will probably be taken care of.

Avatar
Greggy Boone
Member
Free Members
sp_UserOfflineSmall Offline
Jun 17, 2012 - 5:21 pm

Is there another way to fix this problem with the jQuery? The developer of the theme (Salutation) that I am using doesn't seem to care about this one. He has not responded to my several inquiries about this matter. 

 

The double display issue is fixed. Thank you very much for the advice. 

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jun 17, 2012 - 6:36 pm

No other way. And it shouldn't be that difficult. All you need to do is find the location in the theme code where jQuery is being loaded from Google. Then we can help you correct it. And it is almost certainly in the themes functions.php file.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Greggy Boone
Member
Free Members
sp_UserOfflineSmall Offline
Jun 17, 2012 - 6:54 pm

ok i got a response from the developer of the theme:

To change or update the version of jQuery used by the theme you will need to edit the functions.php file. On or about line 133 you will see the following line of code:

wp_register_script( 'jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js', array(), '1.6.2');

To update to using the latest version of jQuery, change this line code so that it looks like this:

wp_register_script( 'jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js', array(), '1.7.2');

Where the script comes from is neither here nor there. If you want to download the jQuery script and load it from your own website, feel free to do so. The great thing about loading it from the Google CDN is that tons of websites do this so it means that the script will almost certainly be cached by the visitor’s browser and therefore your website will load more quickly.

i changed it to:

wp_register_script( 'jquery', 'https://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.7.2.min.js', array(), '1.7.2');

instead of using google, i changed it to a microsoft cdn hosted jquery. It's still not working 🙁

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jun 18, 2012 - 4:49 am

Well no - you've missed the whole point. As the codex article Brandon linked to above, you need to use the jQuery library that is supplied by WordPress. That is what it is for. What are the two or three lines of code either side of the above?

andy-signature.png
YELLOW
SWORDFISH
Avatar
Greggy Boone
Member
Free Members
sp_UserOfflineSmall Offline
Jun 18, 2012 - 9:11 am

Here you go:

// Modernizr (enables HTML5 elements & feature detects)
wp_deregister_script( 'modernizr' );
wp_register_script( 'modernizr', $jsPath.'libs/modernizr-1.6.min.js', '', '1.6');
wp_enqueue_script( 'modernizr' );

// jQuery
wp_deregister_script( 'jquery' );
wp_register_script( 'jquery', 'https://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.7.2.min.js', array(), '1.7.2');
wp_enqueue_script( 'jquery' );

// swfobject
wp_deregister_script( 'swfobject' );
wp_register_script( 'swfobject', $jsPath.'libs/swfobject.js', array(), '2.2');
wp_enqueue_script( 'swfobject' );

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jun 18, 2012 - 9:32 am

Change these three lines:

wp_deregister_script( 'jquery' );
 wp_register_script( 'jquery', 'https://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.7.2.min.js', array(), '1.7.2');
 wp_enqueue_script( 'jquery' );

to

// wp_deregister_script( 'jquery' );
 // wp_register_script( 'jquery', 'https://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.7.2.min.js', array(), '1.7.2');
 wp_enqueue_script( 'jquery' );

and see what happens.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Greggy Boone
Member
Free Members
sp_UserOfflineSmall Offline
Jun 18, 2012 - 10:52 am

Still the same thing. Below is the content of functions.php

<?php
if (__FILE__ == $_SERVER['SCRIPT_FILENAME']) { die(); }

#-----------------------------------------------------------------
# Enable/disable developer theme options
#-----------------------------------------------------------------

$developer_options = true;

#-----------------------------------------------------------------
# Default theme variables and information
#-----------------------------------------------------------------

$themeInfo = get_theme_data(TEMPLATEPATH . '/style.css');
$themeVersion = trim($themeInfo['Version']);
$themeTitle= trim($themeInfo['Title']);
$shortname = sanitize_title($themeTitle . "_");

// shortcuts variables
//................................................................

$cssPath = trailingslashit(get_bloginfo('stylesheet_directory')) . 'assets/css/';
$jsPath = trailingslashit(get_bloginfo('stylesheet_directory')) . 'assets/js/';
$themePath = trailingslashit(get_bloginfo('template_url'));
$themeUrlArray = parse_url(get_bloginfo('template_url'));
$themeLocalUrl = trailingslashit($themeUrlArray['path']);
$frameworkPath = trailingslashit($themePath . 'framework');

// set as constants
//................................................................

define('THEME_NAME', $themeTitle); // Theme title
define('THEME_VERSION', $themeVersion); // Theme version number
define('THEME_URL', $themePath); // URL of theme folder
define('FRAMEWORK_URL', $frameworkPath); // URL of framework folder
define('THEME_DIR', trailingslashit(TEMPLATEPATH)); // Server path to theme folder
define('FRAMEWORK_DIR', trailingslashit(TEMPLATEPATH) . 'framework/'); // Server path to framework folder
define('AVATAR_SIZE', 35); // Default avatar size

// other variables
//................................................................

if (!isset($content_width)) $content_width = 926; // Max content width

// a temporary post variable used with custom post type filters
global $tempPost;

// Theme menu locations (auto registered "framework/theme-functions/filters-and-actions.php")
$themeMenus = array(
'MainMenu' => __( 'Main Menu', THEME_NAME)
);

#-----------------------------------------------------------------
# Translation ready code
#-----------------------------------------------------------------

/*
* To create a translation file for your language, download POEdit (www.poedit.net) and open the file "assets/translation/en_US.po"
* Create the translation using this file and save the new file in the format "lang_COUNTRY.po", for example "en_UK.po" for British translation of English.
*
* You can manually set your language with the value of the "$locale" variable to your ".mo" file name.
* For example, you could force the locale with: $locale = 'es_ES';
*/

global $locale;
$locale = get_locale();
// $locale = 'es_ES';
load_theme_textdomain( THEME_NAME, THEME_DIR . 'assets/translation' );
load_theme_textdomain( 'buddypress', THEME_DIR . 'assets/translation' );

#-----------------------------------------------------------------
# Setup post thumbnails
#-----------------------------------------------------------------

if ( function_exists( 'add_theme_support' ) ) {
add_theme_support( 'post-thumbnails' );
set_post_thumbnail_size( 150, 150, true ); // default Post Thumbnail dimensions (cropped)
}

#-----------------------------------------------------------------
# Load framework
#-----------------------------------------------------------------

include_once(FRAMEWORK_DIR . 'setup.php');

#-----------------------------------------------------------------
# Enqueue CSS style sheets
#-----------------------------------------------------------------

/* This function will add CSS files to the list which are output by the function "theme_style_sheets()" in "header.php"
* You can add to or remove from this list as needed. The function follows the format shown in the example below:
*
* theme_register_css( $handle, $src, $priority (optional), $id (optional), $class (optional) );
*
* You must include the following paramaters:
*
* $handle - string or plain text name for registering the file
* $src - the path to the file
*/

theme_register_css( 'base', $cssPath.'base.css', 1 ); // Base CSS styles for browsers
theme_register_css( 'default', get_stylesheet_directory_uri().'/style-default.css', 2 ); // Default theme styles
theme_register_css( 'ddsmoothmenu', $cssPath.'ddsmoothmenu.css' ); // Drop down menu styles
theme_register_css( 'colorbox', $cssPath.'colorbox.css' ); // Lightbox styles
theme_register_css( 'qtip', $cssPath.'qtip.css' ); // Tool tip styles

#-----------------------------------------------------------------
# Enqueue required scripts
#-----------------------------------------------------------------

// Default scripts to load (universal to all pages)
//................................................................
if (!function_exists('enqueue_theme_scripts')) :
function enqueue_theme_scripts() {
if (!is_admin()) {
global $jsPath, $theLayout;
// wp_register_script( $handle, $src, $deps, $ver, $in_footer );

// Modernizr (enables HTML5 elements & feature detects)
wp_deregister_script( 'modernizr' );
wp_register_script( 'modernizr', $jsPath.'libs/modernizr-1.6.min.js', '', '1.6');
wp_enqueue_script( 'modernizr' );

// jQuery
// wp_deregister_script( 'jquery' );
// wp_register_script( 'jquery', 'https://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.7.2.min.js', array(), '1.7.2');
wp_enqueue_script( 'jquery' );

// swfobject
wp_deregister_script( 'swfobject' );
wp_register_script( 'swfobject', $jsPath.'libs/swfobject.js', array(), '2.2');
wp_enqueue_script( 'swfobject' );

// Cufon fonts for headings
//if ($theLayout['heading_font']['cufon']) {
// Cufon YUI
wp_deregister_script( 'cufon' );
wp_register_script( 'cufon', $jsPath.'libs/cufon-yui.js', '', '1.09');
wp_enqueue_script( 'cufon' );
//}

// DD Smooth Menu (main menu drop downs)
wp_deregister_script( 'ddsmoothmenu' );
wp_register_script( 'ddsmoothmenu', $jsPath.'libs/ddsmoothmenu.js', array('jquery'), '1.5', true);
wp_enqueue_script( 'ddsmoothmenu' );

// Colorbox (lightbox)
wp_deregister_script( 'colorbox' );
wp_register_script( 'colorbox', $jsPath.'libs/jquery.colorbox-min.js', array('jquery'), '1.3.16', true);
wp_enqueue_script( 'colorbox' );

// qTips (tool tips)
wp_deregister_script( 'qtip' );
wp_register_script( 'qtip', $jsPath.'libs/jquery.qtip.min.js', array('jquery'), '2', true);
wp_enqueue_script( 'qtip' );

// Overlabel (if enabled you must also enable function in "assets/js/onLoad.js")
/*
wp_deregister_script( 'overlabel' );
wp_register_script( 'overlabel', $jsPath.'libs/jquery.overlabel.min.js', array('jquery'), '1.0', true);
wp_enqueue_script( 'overlabel' );
*/

}
}

add_action('wp_enqueue_scripts', 'enqueue_theme_scripts', 1);
endif;

// Shortcode or other conditional scripts.
//................................................................
if (!function_exists('enqueue_conditional_footer_scripts')) :
function enqueue_conditional_footer_scripts() {
global $jsPath;

// Items below must have a global variable set to 'true' to trigger enqueue.
// Also, these can only be loaded in footer becaues they they happen after the <head> is loaded.

// Contact form
if ($GLOBALS['load_contact_form_scripts']) {
wp_register_script( 'jquery-validate', $jsPath.'libs/jquery.validate.min.js', array('jquery'), '1.8.0', true);
wp_print_scripts('jquery-validate');

wp_register_script( 'ajax-form', $jsPath.'ajaxForm.js', array('jquery'), '1.0', true);
wp_print_scripts('ajax-form');
}

// Slide show
if ($GLOBALS['load_slide_show_scripts']) {
wp_register_script( 'jquery-cycle-all', $jsPath.'libs/jquery.cycle.all.min.js', array('jquery'), '2.9995', true);
wp_print_scripts('jquery-cycle-all');
}

}
endif;
add_action('wp_footer', 'enqueue_conditional_footer_scripts');

#-----------------------------------------------------------------
# Other WP Stuff
#-----------------------------------------------------------------

// required by WP
//................................................................
if ( is_singular() ) wp_enqueue_script( 'comment-reply' );

add_theme_support('automatic-feed-links');

// CSS styling to apply to admin editor
//................................................................
add_editor_style('style-wp-editor.css');

function _out($var) {
echo "<pre>".print_r($var, true)."</pre><br>";
}

?>

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: 620
Members: 17365
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10128
Posts: 79626