focallocal (@focallocal)

Forum Replies Created

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

  • focallocal
    Participant

    @focallocal

    thanks very much.

    i’m not sure what i was doing wrong the last time i tried but the short codes did work perfectly for the individual thread this time.

    In reply to: Stylesheet Issues

    focallocal
    Participant

    @focallocal

    just a last quick question.

    will the coming update overwrite the code i just changed without any issues?

    thanks very much

    In reply to: Stylesheet Issues

    focallocal
    Participant

    @focallocal

    i think i’ve found it.

    the problem is only there when W3 Total Cache and bbPress are both switched on, if either are off the problem goes away. i’ve flushed the cache a few times but it made no difference so i believe there is a compatibility issue between the two. W3 is not essential to my site so i’ve switched it off and wont worry too much, but i thought you’d like to know.

    In reply to: Stylesheet Issues

    focallocal
    Participant

    @focallocal

    (including the forum itself)

    In reply to: Stylesheet Issues

    focallocal
    Participant

    @focallocal

    the odd thing is that every other page i’ve looked at appears absolutely fine, except for the home page.

    In reply to: Stylesheet Issues

    focallocal
    Participant

    @focallocal

    i’m making all changes live to my site as i havent launched yet (hopefully in 2 days) and my hosting companies servers are running Litespeed.

    <link rel=’stylesheet’ id=’bbp-default-css’ href=’http://focallocal.org/wp-content/plugins/bbpress/templates/default/css/bbpress.css?ver=2.5-5199&#8242; type=’text/css’ media=’screen’ />

    In reply to: Stylesheet Issues

    focallocal
    Participant

    @focallocal

    function bbp_enqueue_style( $handle = '', $file = '', $dependencies = array(), $version = false, $media = 'all' ) {
    
    	// No file found yet
    	$located = false;
    
    	// Trim off any slashes from the template name
    	$file = ltrim( $file, '/' );
    
    	// Make sure there is always a version
    	if ( empty( $version ) ) {
    		$version = bbp_get_version();
    	}
    
    	// Loop through template stack
    	foreach ( (array) bbp_get_template_stack() as $template_location ) {
    
    		// Continue if $template_location is empty
    		if ( empty( $template_location ) ) {
    			continue;
    		}
    
    		// Check child theme first
    		if ( file_exists( trailingslashit( $template_location ) . $file ) ) {
    			$located = trailingslashit( $template_location ) . $file;
    			break;
    		}
    	}
    
    	// Enqueue if located
    	if ( !empty( $located ) ) {
    
                    $content_dir = constant( 'WP_CONTENT_DIR' );
    
                    // IIS (Windows) here
                    // Replace back slashes with forward slash
                    if ( strpos( $located, '\\' ) !== false ) {
                            $located     = str_replace( '\\', '/', $located );
                            $content_dir = str_replace( '\\', '/', $content_dir );
                    }
    
    		// Make path to file relative to site URL
    		$located = str_replace( $content_dir, WP_CONTENT_URL, $located );
    
    		// Enqueue the style
    		wp_enqueue_style( $handle, $located, $dependencies, $version, $media );
    	}
    
    	return $located;
    }
    
    /**
     * Enqueue a script from the highest priority location in the template stack.
     *
     * Registers the style if file provided (does NOT overwrite) and enqueues.
     *
     * @since bbPress (r5180)
     *
     * @param string      $handle    Name of the script.
     * @param string|bool $file      Relative path to the script. Example: '/js/myscript.js'.
     * @param array       $deps      An array of registered handles this script depends on. Default empty array.
     * @param string|bool $ver       Optional. String specifying the script version number, if it has one. This parameter
     *                               is used to ensure that the correct version is sent to the client regardless of caching,
     *                               and so should be included if a version number is available and makes sense for the script.
     * @param bool        $in_footer Optional. Whether to enqueue the script before </head> or before </body>.
     *                               Default 'false'. Accepts 'false' or 'true'.
     *
     * @return string The script filename if one is located.
     */
    function bbp_enqueue_script( $handle = '', $file = '', $dependencies = array(), $version = false, $in_footer = 'all' ) {
    
    	// No file found yet
    	$located = false;
    
    	// Trim off any slashes from the template name
    	$file = ltrim( $file, '/' );
    
    	// Make sure there is always a version
    	if ( empty( $version ) ) {
    		$version = bbp_get_version();
    	}
    
    	// Loop through template stack
    	foreach ( (array) bbp_get_template_stack() as $template_location ) {
    
    		// Continue if $template_location is empty
    		if ( empty( $template_location ) ) {
    			continue;
    		}
    
    		// Check child theme first
    		if ( file_exists( trailingslashit( $template_location ) . $file ) ) {
    			$located = trailingslashit( $template_location ) . $file;
    			break;
    		}
    	}
    
    	// Enqueue if located
    	if ( !empty( $located ) ) {
    
    				$content_dir = constant( 'WP_CONTENT_DIR' ); 	 
    		                // IIS (Windows) here 
     		                // Replace back slashes with forward slash 
     		                if ( strpos( $located, '\\' ) !== false ) { 
     		                        $located     = str_replace( '\\', '/', $located ); 
     		                        $content_dir = str_replace( '\\', '/', $content_dir ); 
     		                } 
    
    		// Make path to file relative to site URL
    		$located = str_replace( $content_dir, WP_CONTENT_URL, $located );
    
    		// Enqueue the style
    		wp_enqueue_script( $handle, $located, $dependencies, $version, $in_footer );
    	}
    
    	return $located;
    }
    
    /**
     * This is really cool. This function
    In reply to: Stylesheet Issues

    focallocal
    Participant

    @focallocal

    i’ve copied those files across but haven’t got the patch to work. i’ll post the changes i made, perhaps you can see if i missed something

    In reply to: bbPress 2.5 is out!

    focallocal
    Participant

    @focallocal

    i added the 2481.01.2.patch but bbpress still breaks my site when active (it was fine before the update)

    and here’s screenshots of what’s happening on my site: http://imgur.com/a/4SNAC

    sorry, i have learned from this to wait a few weeks before updating – but if anyone could help me to see what what i’ve done wrong here that’d be a huge help.

    EDIT: As your issue is fixed I removed the huge code chunk you posted. Netweb 3rd Dec

    In reply to: bbPress 2.5 is out!

    focallocal
    Participant

    @focallocal

    also, in the patch would i just copy and paste it all? or should i not include/remove the parts highlighted red?

    thanks

    In reply to: bbPress 2.5 is out!

    focallocal
    Participant

    @focallocal

    thanks for the style sheet fix. any idea how long before its officially fixed in bbpress so i can decide whether to have a go at it myself or to wait?

    i’m a little nervous about messing around with code as updates seem to break the things i change.. ironically in this case.

    In reply to: Stylesheet Issues

    focallocal
    Participant

    @focallocal

    i think i am having the same issue, although i dont understand what windows would have to do with it.

    i updated and the styling on my site was broken. if i deactivate bbpress it comes back to normal. here’s some screen shots: http://imgur.com/a/4SNAC

    notice after the update the headers have turned blue, the outlines of all elements have gone and the image in the top left of the header has moved to the top of the page. the site is: http://www.focallocal.org

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