Forum Replies Created

Viewing 15 replies - 1 through 15 (of 20 total)
  • Thread Starter canchuckwood

    (@canchuckwood)

    Ah, that’s great, thanks so much!!

    Thread Starter canchuckwood

    (@canchuckwood)

    Looks like they have fixed it in the new 3.7.5 release. Phew!

    Thread Starter canchuckwood

    (@canchuckwood)

    Further, I have found the following with getimagesize:

    function _wp_get_attachment_image_src( $attachment_id,
    									   $size='thumbnail',
    									   $icon = false ) {
    	// get a thumbnail or intermediate image if there is one
    	if ( $image = _image_downsize($attachment_id, $size) )
    		return $image;
    	if ( $icon && $src = wp_mime_type_icon($attachment_id) ) {
    		$icon_dir =
    			apply_filters( 'icon_dir', ABSPATH . WPINC . '/images/crystal' );
    		$src_file = $icon_dir . '/' . basename($src);
    	@list($width, $height) = getimagesize($src_file);
    	}
    	if ( $src && $width && $height )
    		return array( $src, $width, $height );
    	return false;
    }

    and

    function _image_downsize($id, $size = 'medium') {
    	if ( !wp_attachment_is_image($id) )
    		return false;
    	$img_url = wp_get_attachment_url($id);
    	$meta = wp_get_attachment_metadata($id);
    	$width = $height = 0;
    	// plugins can use this to provide resize services
    	if ( $out = apply_filters('_image_downsize', false, $id, $size) )
    		return $out;
    	// try for a new style intermediate size
    	if ( $intermediate = image_get_intermediate_size($id, $size) ) {
    		$img_url = str_replace(basename($img_url), $intermediate['file'], $img_url);
    		$width = $intermediate['width'];
    		$height = $intermediate['height'];
    	}
    	elseif ( $size == 'thumbnail' ) {
    		// fall back to the old thumbnail
    		$thumb_file = wp_get_attachment_thumb_file( $id ); // modified by Y2
    		if ( $info = getimagesize($thumb_file) ) {		   //
    			$img_url = str_replace(basename($img_url), basename($thumb_file), $img_url);
    			$width = $info[0];
    			$height = $info[1];
    		}
    	}
    	if ( !$width && !$height && isset($meta['width'], $meta['height']) ) {
    		// any other type: use the real image and constrain it
    		list( $width, $height ) =
    			 image_constrain_size_for_editor( $meta['width'],
    											  $meta['height'], $size );
    	}
    	if ( $img_url)
    		return array( $img_url, $width, $height );
    	return false;
    }

    There doesn’t seem to be any gaps, but I don’t know much about php, so I can’t figure out why it is displaying this error at the same time as working perfectly. Any help is really appreciated.

    Charlette

    Thread Starter canchuckwood

    (@canchuckwood)

    Thanks esmi

    I think it’s a rotten tactic. At least there should be some kind of warning, like ‘don’t edit this link or else we will crash your entire site with an error message’…

    Not only that, but when I re-uplaoded the fresh footer.php it didn’t get rid of it, until I deleted the whole theme (including customisation I’d done). Certainly won’t be using that theme again.

    I respect copyright requirements, but I think if themes are being offered for free under commons, the user should be able to choose where the link goes, and not have the entire website crash when editing the footer…

    Ah well, my rant is over. Shame on you NattyWP!!

    Thread Starter canchuckwood

    (@canchuckwood)

    Hi webjunk, thanks for your reply.

    I did a fresh install, but moved the wp-content files to the new server.

    The URL is exactly the same, but I thought perhaps the file paths aren’t which is causing a problem? I tried using find and replace in the text sql document on my computer, and in mysql admin, and that didn’t seem to work either.

    I haven’t tried creating a new post yet, will just go do that… Ok, that works fine, but still nothing of the old posts or page content.

    I’m wondering if something went wrong with the database export, although I followed all instructions…

    Eeek!

    Hi folks, anyone found a resolution for this? I’ve built a cart which sells mp3’s, and when we tested it (purchased a song, paid through paypal), we were charge but received no download link.

    This is pretty crucial for a musician’s site, so any help is really appreciated.

    note @the Asom – we have add to cart enabled, darn it I was hoping it would be something that simple!

    Cheers

    Thread Starter canchuckwood

    (@canchuckwood)

    @stvwlf – Thanks so much! That works brilliantly :~) Really appreciate your time and help.

    @coldtraffic – I tried something similiar, hoping it would be simple! No such luck :~)

    Thread Starter canchuckwood

    (@canchuckwood)

    Hi stvwlf, thanks so much for replying to my post!

    I understand the "<?php if ( in_category('children') ) {" part, but not the "$cat_name = 'children';" part.

    I’m after putting a different class of html code between the php, like the example above, or this example which I am trying to do in single.php:

    <?php 
    
    if ( in_category( 'housekeeping' )) {
    <div id="pagehousekeeping" class="clearfloat">
    } elseif ( in_category( 'gardening' )) {
    	<div id="pagegardening" class="clearfloat">
    } else {
    	<div id="page" class="clearfloat">
    }
    ?>

    Or am I going about the colour coding in a complicated way? Here is my draft site so far: housewife.sunstonemedia.co.nz.

    Like I said, I really know very little about php so I’m a cut and paste-r at the moment, not very good at troubleshooting.

    Thanks again for any help you’re able to give!
    Charlette

    canchuckwood

    (@canchuckwood)

    Where did you put the extra code? I am having exactly the same problem and have tried all sorts of solutions and still can’t fix it!

    Did you put the snippet in your page template or archive.php? I have tried both with no luck. I am using the wp-page-numbers plugin but I have also tried the page-navi plugin and just the plain old:

    <?php next_posts_link('Next') ?>
      <?php previous_posts_link('Previous') ?>

    And nothing seems to work. Here is my page template code:

    <?php // "Section teaser" module begins
    	query_posts('showpost=10&offset=1&cat=3'); ?>
           <?php while (have_posts()) : the_post(); ?>
        <small class="commentmetadata">
        </small> <a href="https://www.wellingtonlivemusic.com/?page_id=4" class="wlm">Reviews</a><a href="<?php the_permalink() ?>" rel="bookmark" class="section-title">
       <?php
    // this is where title of the article gets printed
    	  the_title(); ?>
        </a><br />
        <?php the_excerpt(); ?>
        </a>
        <div class="section-read-on">
        <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php _e('Read More','wyntonmagazine');?></a><div id="spaceex"></div>
        </div>
        <?php endwhile; ?>
    <?php if(function_exists('wp_page_numbers')) { wp_page_numbers(); } ?>

    Thanks for any help :~)

    How did you do it? Thanks :~)

    Hi Captain Smallet – I was looking for a similiar thing as you with the tables, and I went through and looked at your site… I was wondering if you would share your code for the transparent png nav menu? I want to overlay an excerpt over an image with a transparent black background but I’m not 100% sure it can be done without some rather complicated code…
    Thanks :~)

    Hi guys

    Great piece of code – thanks! I’m wondering if anyone can help me adapt it for something. I want to list a limited excerpt which changes size…

    Eg. in my main excerpt I have

    <div class="post-meta">Dogs Bollix | 18/10/2008</div>
    Mostly upbeat songs, their enthusiasm is reflected in a tight and energetic show, and in the crowd at the Dogs Bollix all eyes were riveted to the stage.

    Which could change to

    <div class="post-meta">San Francisco Bathhouse | 16/10/2098</div>
    Mercury Crowe are hot hot hot. Did I say hot? They are young, talented, their live show is on fire, and they are up-and-coming in the best sense of the phrase.

    (Dogs Bollix and San Francisco Bathhouse are music venues in NZ and I am building a music info website).

    I want to display only the venue and date information on a different part of the site. So is there any way I can adapt Bechsters code to display only the div rather than limit the number of words? I’m a novice at php so any help is appreciated!

    Thanks!

    Thread Starter canchuckwood

    (@canchuckwood)

    Thanks so much :~)

    Thread Starter canchuckwood

    (@canchuckwood)

    Thread Starter canchuckwood

    (@canchuckwood)

    Ah ok, so it needs a header and footer to display. Thanks so much! Will get cracking.

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