425 reputation
321
bio website about.me/henrywright
location London, England
age
visits member for 2 years
seen 3 hours ago

I'm a huge WordPress fan and general geek interested in PHP, HTML and CSS. You can usually find me on Twitter @henrywright


5h
accepted Heartbeat API: How to access data already enqueued?
2d
awarded  Yearling
2d
revised WordPress Liveblog plugin: How to associate uploaded images with comments?
deleted 88 characters in body
2d
revised WordPress Liveblog plugin: How to associate uploaded images with comments?
added 1408 characters in body
Oct
16
comment WordPress Liveblog plugin: How to associate uploaded images with comments?
@birgire hopefully they will support the functionality soon, although I'm not entirely sure the plugin is supported right now (hence this question here). I think I'll give Rarst's function a try and report back how I get on. Thanks again for your tips and ideas
Oct
16
comment WordPress Liveblog plugin: How to associate uploaded images with comments?
@G.M. Rarst's approach is definitely the least hackish of them all. And agreed, aside from a major overhaul to the plugin, there isn't a clean way
Oct
16
comment WordPress Liveblog plugin: How to associate uploaded images with comments?
I'm with you! Problem then would be how to guarantee that a particular <li> relates to a particular comment. Imagine, split-seconds apart, 2 users upload an image. The latest <li> might not necessarily be the image we think it is.
Oct
16
comment WordPress Liveblog plugin: How to associate uploaded images with comments?
Thanks for the idea(s) @birgire. I'm not entirely sure I follow your 2nd line of thought, but appending the attachment ID to the entry_text's img URL sounds like an good idea. This will avoid the extra querying needed using Rarst's method but as you say it's kinda unstable.
Oct
16
comment WordPress Liveblog plugin: How to associate uploaded images with comments?
@Howdy_McGee "the comments to attachments relationship is almost nonexistent." - agreed! That's the part I'm trying to resolve
Oct
16
comment WordPress Liveblog plugin: How to associate uploaded images with comments?
@MarkKaplun thanks for your comment. Agreed, the wasted space might not cause my server to fall over but either way I'd prefer not to have lots of redundant images. I feel it's unnecessary and bad practice.
Oct
16
comment WordPress Liveblog plugin: How to associate uploaded images with comments?
@G.M. "File is uploaded using ajax, and when ajax callback happen comment doesn't exist yet. And when comment is created there is no way to get the id of the attachment created in a separate ajax request" - that's exactly the problem. I see no way of making the association either. Rarst's function is a possible solution, I'm just wondering if there is an alternative
Oct
16
revised WordPress Liveblog plugin: How to associate uploaded images with comments?
added 53 characters in body; edited tags; edited title
Oct
14
revised WordPress Liveblog plugin: How to associate uploaded images with comments?
added 212 characters in body
Oct
14
revised WordPress Liveblog plugin: How to associate uploaded images with comments?
added 9 characters in body
Oct
14
comment WordPress Liveblog plugin: How to associate uploaded images with comments?
@Rarst I'm not too bothered about comments and images that already exist in the db, I'm more aiming towards associating uploaded images and comments as new ones get created going forward.
Oct
14
asked WordPress Liveblog plugin: How to associate uploaded images with comments?
Oct
13
comment Why isn't the canonical link element used for all pages?
My understanding is the preferred (canonical) URL is also used in tracking (Google Analytics for example). It is in this scenario that I can see some benefit to using a canonical link element on archive pages. (i.e consolidated page statistics)
Oct
13
comment Why isn't the canonical link element used for all pages?
That's why you should always use the excerpt instead of the content on archive pages. IMO
Oct
12
asked Why isn't the canonical link element used for all pages?
Oct
7
answered Allowing images only when uploading files