When I check show images, the image file that is pulled from the post isn't the first image in the post (which is relevant to the topic) but has skipped down to the adobe icon image that links to a pdf file and pulls and places the pdf icon image in the archive list. Is this due to how the reg expression is constructed? If so, can you help me modify it to pull the relevant image?
All of the images files I'd like to have pulled and displayed in the archive will be located in one directory and the files will be named in a similar pattern: /images/*au.png.
Is this the line that needs to be changed: preg_match('/]*src\\s*=\\s*[\\""\\']?([^\\""\\'>]*)/i', $post->post_content, $matches);
or is it something else? My coding skills are limited to cut and paste so your help would be appreciated.
Post edited 8:34 – 28 November, 2009 by Kissed Vixen Post edited 8:35 – 28 November, 2009 by Kissed Vixen
Ok, I get to post a helpful hint! Despite loving this plugin, I gave up on it for a while due to not being able to change the thumbnails… the default first image was causing many images of chests instead of heads but I gave it another try and though trial and error…figured this out.. hopefully it helps other people ! I could not figure out how to change the image though custom fields but I figured out another trick using the "first image" default here we go… the trick…. hide a thumbnail at the begining of your post – it doesn't effect the layout at all and the archives grabs it up! best to make the thumbnail the desired size then use this
<img style="display: none;" src="path to your image" alt="custom_thumb" title="custom_thumb" />
seems full path to the image is good put it at the very top of the post and voila! nice images in your archive I hope this helps someone, since no one helped us… now I love the Snazzy Archives again though I too would like to see an option to sort by category :)
Vladimir’s WordPress Forum
not pulling the first image from post
18:30
31 July, 2009
P01W
When I check show images, the image file that is pulled from the post isn't the first image in the post (which is relevant to the topic) but has skipped down to the adobe icon image that links to a pdf file and pulls and places the pdf icon image in the archive list. Is this due to how the reg expression is constructed? If so, can you help me modify it to pull the relevant image?
All of the images files I'd like to have pulled and displayed in the archive will be located in one directory and the files will be named in a similar pattern: /images/*au.png.
Is this the line that needs to be changed: preg_match('/]*src\\s*=\\s*[\\""\\']?([^\\""\\'>]*)/i', $post->post_content, $matches);
or is it something else? My coding skills are limited to cut and paste so your help would be appreciated.
paris
20:16
31 July, 2009
P01W
Never mind, I substituted a custom field in the layout. Now I have more control over what image is posted.
7:17
12 October, 2009
Kissed Vixen
HI
This goes to P01W or anyone who can answer this…
what can be added as a custom field to have that kind of control
help please as some of our first images, are of people and depending on size, I am getting their chest instead of faces :(
the only big draw back to this plugin..
thanks
4:08
1 November, 2009
Emma
I would love to know how to do this too!!!!!!!
10:32
28 November, 2009
Kissed Vixen
Post edited 8:34 – 28 November, 2009 by Kissed Vixen
Post edited 8:35 – 28 November, 2009 by Kissed Vixen
Ok, I get to post a helpful hint!
Despite loving this plugin, I gave up on it for a while due to not being able to change the thumbnails… the default first image was causing many images of chests instead of heads
but I gave it another try and though trial and error…figured this out..
hopefully it helps other people !
I could not figure out how to change the image though custom fields but I figured out another trick using the "first image" default
here we go…
the trick…. hide a thumbnail at the begining of your post – it doesn't effect the layout at all and the archives grabs it up!
best to make the thumbnail the desired size then use this
seems full path to the image is good
put it at the very top of the post and voila! nice images in your archive
I hope this helps someone, since no one helped us…
now I love the Snazzy Archives again though I too would like to see an option to sort by category
:)
17:40
10 December, 2009
Vladimir
posts 707
That's a very creative solution there
15:59
19 November, 2010
Infrarex
Post edited 16:03 – 19 November, 2010 by Infrarex
Well I have to contribute one another solution.
Create custom field named snazzy_img and add a value for image like http://something.com/…/pic.j…..
21:46
20 November, 2010
infrarex
in snazzy-layout-x.php add
and change
with
the whole code looks like
<a class="sz_title" href="<?php echo $url ?>"><?php echo $title ?></a>
<?php $meta_values = get_post_meta($post->ID, 'snazzy_img', true); ?>
<?php $imageurl = $this->getImageUrl($meta_values, 110); ?>
<?php if ($imageurl) : ?>
<div class="sz_img" style="background: transparent url('<?php echo $imageurl ?>') no-repeat center;" ></div>
<div class="sz_excerpt"><?php echo ($comcount ? "<strong>$comcount comments</strong>" : "") ?></div>
<?php elseif ($excerpt) : ?>
<div class="sz_excerpt">“<?php echo $excerpt ?>” <?php echo ($comcount ? "<br/><strong>$comcount comme
nts</strong>" : "") ?></div>
<?php endif; ?>
</div>