stefanledin
Forum Replies Created
-
Forum: Plugins
In reply to: [Responsify WP] Linked, Aligned & Gallery Images Not WorkingBefore I release 1.5.1, would you mind downloading it from Github and try the new version and see if all problems are resolved? ??
Forum: Plugins
In reply to: [Responsify WP] Help with Header ImageIf you just do this:
<?php $header_id = graphene_get_attachment_id_from_src( $header_img ); die(var_dump($header_id)); ?>
What happens?
Forum: Plugins
In reply to: [Responsify WP] Help with Header ImageTry this:
<?php $header_id = graphene_get_attachment_id_from_src( $header_img ); if ( ! is_front_page() && $graphene_settings['link_header_img'] ) { $header_img_tag = '<a href="' . apply_filters( 'graphene_header_link' , home_url() ) . '" id="header_img_link" title="' . esc_attr__( 'Go back to the front page', 'graphene' ) . '">'; $header_img_tag .= Picture::create( 'element', $header_id ); $header_img_tag .= '</a>'; $header_img = $header_img_tag; } echo $header_img; ?>
Forum: Plugins
In reply to: [Responsify WP] Help with Header ImageThe Picture::create() function wants to know the ID of the image/attachment, so that’s what we need to find out.
By looking at the first row,$header_img
contains the src to the header image first. Can you find where that variable comes from?
Or, you could do this:die(var_dump($graphene_settings));
…and paste the output here.
Forum: Plugins
In reply to: [Responsify WP] Linked, Aligned & Gallery Images Not WorkingOur version is just called “1 May”, so I didn’t make the connection instantly ??
Forum: Plugins
In reply to: [Responsify WP] Linked, Aligned & Gallery Images Not WorkingI wasn’t sure about what Labour day was at first, but after a quick search on google, I realized that we have the same thing here. The difference is that labour day is at 1 May here ??
Anyway, I’d be glad to help you with the header image, but we can do it in a new thread. 2/3 resolved support issues looks better than 1/2 ??
These kinds of questions can point out parts of the documentation that needs improvments, or if I need to add something to the FAQ ??Forum: Plugins
In reply to: [Responsify WP] Linked, Aligned & Gallery Images Not WorkingI’ll work with 1.5.1 this weekend and hopefully publish the update in the beginning of next week ??
By the way, while I’ll still have you here, may I ask what you think about the the explanation of the settings inside WordPress? Are they fairly understandable? As a swede, some things has been a bit tricky to explain in english ??Forum: Reviews
In reply to: [Responsify WP] Awesome support – awesome plugin!Thanks for the review! And as I’ve said before, I would never found these issues if you had not pointed them out ??
Forum: Plugins
In reply to: [Responsify WP] Linked, Aligned & Gallery Images Not WorkingI’ve taken a quick look at it now and understand what you mean. It’s an javascript error that says
Uncaught TypeError. Cannot read property 'split' of null
. The cause is an missing attribute on the<img>
element inside<picture>
.
If you look at the thumbnail when the RWP is deactivated, Jetpack adds a bunch of custom attributes, likedata-attachment-id
,data-image-meta
anddata-orig-file
.
The problem is that when RWP builds the new markup, onlysrc
andclass
is being passed on topicture
.Before:
<img src="thumbnail.jpg" class="attachment-thumbnail" data-orig-file="original.jpg">
After:
<picture> <source srcset="thumbnail.jpg"> <img src="thumbnail.jpg" class="attachment-thumbnail"> </picture>
So, the solution would be to keep all of the original attributes, not only
src
andclass
. This is definitely something I’ll try to do.
Again, thanks for pointing out this issue!Forum: Plugins
In reply to: [Responsify WP] Linked, Aligned & Gallery Images Not WorkingFirst, thanks for all of your thoughts and for taking the time to write it down! You give me a lot to think about ??
Regarding fallback for older browsers, I don’t know, but I guess that
<picture>
won’t work if javascript is turned off. I believe that the browser will just ignore the element and won’t see the<img>
inside. But as long javascript is turned on and thedocument.createElement( "picture" );
snippet is present, it should not cause any problems.
But once again, correct me if I’m wrong.
(The<picture>
element is implemented in Chrome 38 and higher, Opera 25 and Firefox 33 and higher.)Back to your question about galleries. As you said, the native gallery function doesn’t have any lightbox or carousel out of the box. Basically it just creates a group of thumbnails which links to either nothing, the attachment page or the file itself.
I’m afraid that the plugin can’t do so much in that situation. Maybe it could replace the URL to the full image with the URL to a smaller version, but that feels wrong.
I guess all lightbox/carousel plugins will have to implement support for RWP instead ??Forum: Plugins
In reply to: [Responsify WP] Linked, Aligned & Gallery Images Not WorkingI just released RWP 1.5.0, so if you update to that version and select the
picture
element in the settings, the first issue would be resolved!2) Oh, it’s an external image! As you said, the plugin will try to find other sizes of the image, which it won’t. That’s another scenario I haven’t thought of ??
I’ll fix it in 1.5.1.3) I just took a quick look at this. The gallery function creates a
div
with this markup:<dl class="gallery-item"> <dt class="gallery-icon landscape"> <a href="{{ URL_TO_ATTACHMENT }}"> <picture> <!--[if IE 9]><video style="display: none;"><![endif]--> <source srcset="{{ URL_TO_THUMBNAIL }}"> <!--[if IE 9]></video><![endif]--> <img class="attachment-thumbnail" src="{{ URL_TO_THUMBNAIL }}"> </picture> </a> </dt> </dl>
This works as expected, even though it’s unnecessary to generate this markup since the image sizes already is the smallest.
In the gallery settings, I can choose between linking the image directly to the media file or the attachment page. The plugin can only do something with the markup on the attachment page, but that doesn’t seem to work.
Besides of that, how would you like the plugin to handle galleries? ??Forum: Plugins
In reply to: [Responsify WP] Linked, Aligned & Gallery Images Not WorkingHi!
First, thanks for pointing out these issues. It’s hard to come up with all possible scenarios and test the plugin. I can only use it myself and take it from there.First issue: I’m aware of this one. It’s kind of a limitation with Picturefill 1.2.1 that uses
span
elements. There’s no possibility to pass the alignment classes directly to theimg
. However, with Picturefill 2.1 and the realpicture
element, this will work. RWP 1.5 will be out any day now and you’ll be able to select which markup pattern you wanna use.Second issue: This one sounds very strange. There was a similar problem with shortcodes, but that was fixed in 1.4.3. If you open
responsify-wp/includes/content_filter.php
, do you see this line 10?
add_filter( 'the_content', array( $this, 'filter_images' ), 11 );
Third issue: I guess that it is the native gallery function you are using? I never use that myself actually, so I just have not tried that.
As I said, so many scenarios… ??Again, thanks for the feedback! RWP is still a very young plugin.
Forum: Plugins
In reply to: [Responsify WP] Custom media queries and imagesHi Claude!
Let’s say that you have a page called Portfolio and want to specify the settings on that page, then you’ll insert the code inpage-portfolio.php
.In the example snippet, the
get_posts()
function is called, so you’ll have to replace the regular loop with something like the following:foreach ($posts as $post ) : setup_postdata( $post ); the_title(); the_content(); wp_reset_postdata(); endforeach;
(Sorry for late reply, I actually didn’t see your question until now! I thought I would get an email notification or something ;))