Dave Heavy Industries » wordpress http://www.daveheavyindustries.com Dave Heavy Industries - blog Mon, 12 Aug 2013 00:24:10 +0000 en-US hourly 1 http://wordpress.org/?v=3.6 GoDaddy hosted wordpress facebook featured images http://www.daveheavyindustries.com/2011/08/29/godaddy-hosted-wordpress-facebook-featured-images/ http://www.daveheavyindustries.com/2011/08/29/godaddy-hosted-wordpress-facebook-featured-images/#comments Mon, 29 Aug 2011 00:49:06 +0000 admin http://wp.daveheavyindustries.com/?p=171 I had the strangest issue last week, featured images from wordpress would not appear on a facebook post... sometimes.

The story began a few weeks ago while I was in koh-samui. My host of choice had a SAN failure and ended up having 4 days of downtime. Unacceptable under any circumstances, so I've started looking at other hosts. I setup a test site on godaddy for one of my clients, but as GoDaddy was also the DNS server, they moved the site as soon as it was setup leaving me with a choice of fixing the DNS back to the existing host, or moving the site in a hurry to godaddy. As my customer wasn't paying for hosting I decided to most the hosting to GoDaddy. Bad move.

The reliability on GoDaddy was perfect, the speed even wasn't bad (not as fast as my locally hosted box, as you'd expect, but not bad).  The issue came because my client was complaining that every facebook share, sometimes the descriptions wouldn't appear in the shared post, and almost always the image was missing.

I went through everything a few times and discovered that if I shrank the featured thumbnail presented to facebook to 100x100, the chance of it appearing increased to about 50%, but was still unacceptable. The links were fine, and my browser was able to see the image_src and pick the image up.

I finally gave up and moved the site back to the old host and immediately it started working correctly. Strange. Lesson learnt - cheap hosting just isn't worth it.

 

]]>
http://www.daveheavyindustries.com/2011/08/29/godaddy-hosted-wordpress-facebook-featured-images/feed/ 0
WordPress permalink via SQL http://www.daveheavyindustries.com/2011/02/08/wordpress-permalink-via-sql/ http://www.daveheavyindustries.com/2011/02/08/wordpress-permalink-via-sql/#comments Tue, 08 Feb 2011 08:35:58 +0000 admin http://wp.daveheavyindustries.com/?p=100 Today someone asked how to get the wordpress permalink from another language via SQL. Well, after a little bit of head scratching I have come up with a relatively easy way of doing this... enjoy!

SELECT
wpp.post_title,
wpp.guid,
wpp.post_date,
CONCAT(wpo_su.option_value,
REPLACE(
REPLACE(
REPLACE(
REPLACE(
REPLACE(wpo.option_value,'%year%',date_format(wpp.post_date,'%Y'))
,'%monthnum%',date_format(wpp.post_date,'%m'))
,'%day%',date_format(wpp.post_date,'%d'))
,'%postname%',wpp.post_name )
,'%category%',wpc.slug )
) as permalink
FROM
wp_posts wpp
INNER JOIN wp_options wpo on wpo.option_name='permalink_structure' and wpo.blog_id=0
INNER JOIN wp_options wpo_su on wpo_su.option_name='siteurl' and wpo_su.blog_id=wpo.blog_id
INNER JOIN (
select wtr.object_id ID, max(wpt.slug) slug
from wp_term_relationships wtr
inner join wp_term_taxonomy wtt on wtt.term_taxonomy_id=wtr.term_taxonomy_id and wtt.taxonomy='category'
inner join wp_terms wpt on wpt.term_id=wtt.term_id
group by  wtr.object_id
) wpc on wpc.ID=wpp.ID
WHERE wpp.post_type = 'post' AND wpp.post_status = 'publish'
ORDER BY
wpp.post_date DESC

update 9/2 - appended %category% join and replace

[facebook_ilike]

]]>
http://www.daveheavyindustries.com/2011/02/08/wordpress-permalink-via-sql/feed/ 1
Joomla / WordPress hosting http://www.daveheavyindustries.com/2011/02/07/hosting/ http://www.daveheavyindustries.com/2011/02/07/hosting/#comments Mon, 07 Feb 2011 06:37:40 +0000 admin http://wp.daveheavyindustries.com/?p=83 I've got plenty of hosting resources spare at the moment, get in contact with me if you'd like any wordpress/joomla sites hosted. Will offer very competitive rates or beer currency for community projects.

Get in contact with me !

[facebook_ilike]

Name:
Email:
Phone:
Message:
I can't read the text, please reset it.
  Powered by Quick Contact
 
 
]]>
http://www.daveheavyindustries.com/2011/02/07/hosting/feed/ 0