Subscribe To RSS Feed


Jeremy Dost's SharpBlog

Just another Sharpdot weblog

Archive for the ‘Uncategorized’ Category

Does Facebook scrape your post for an image when you link from wordpress?

- Friday, February 25th, 2011 -

Forty Weeks uses facebook a lot (check out their facebook page) and it appears that their site, which is built in Wordpress, is not feeding facebook pictures and descriptions to attach to links. Lets see what is needed to fix that…

Instead facebook is printing out a bunch of commented out javascript code as the description and no picture. Troubleshooting step 1 – remove that javscript.

OK step 1 complete and description gets pulled in now. The js had CDATA tags in it which may have been throwing facebook for a loop. Still no picture though. Step 2 comparing the sharpdot blog head tags to the fortyweeks blog head tags.

Well that seemed to do the trick. Facebook is now pulling in pictures that are relevant to the post. So the answer to the questions is YES BUT javascript can mess it up. After a little trial and error it seemed to come down to this line:

var morelink = $(‘<li><a href=”javascript:void(0);” class=”viewAllLink”>See all in this category</a></li>’);

Maybe there were just some hidden utf characters in there? Well color me surprised!

Posted in Uncategorized | No Comments »

Drupal 7 Released! Initial impressions

- Wednesday, January 5th, 2011 -

At long last Drupal 7 has been released so I eagerly downloaded it and set up a test site. First impression is that it’s great! Really great! Lots of enhancements to the ui and a number of those must-install modules are now pulled into the core. I’m still testing it out but here’s a few first impressions:

Installation was easier – not that a single site install was ever that complicated for this developer… but it ‘looks’ nicer now and had some very clear warnings about file permissions etc…

The default theme has a nice black admin bar at the top that reminds me of the administration menu module we always install here.  It’s definitely not the same – it doesn’t have the full set of dropdowns and all but it looks similar. Also, there’s a nice shortcuts menu below that admin menu that you can customize. Again – might not be helpful to an admin since you need to get to sooo many different things but will surely help out the average user or content editor.

All the edit screens load up using ajax now which is a bit surprising! It does break down nicely and the back/forward buttons work fine. I didn’t see a big boost in load time (internet is slow today so maybe it’s just that) but I do hope that this ajax loading translates to smaller server requests and load times when editing.

Another ui shocker – the content editor doesn’t have those familiar collapsible framesets anymore. All of those sections are at the bottom of the page in a mini-sidebar type of layout. I like this layout better – no scrolling scrolling scrolling and many of those sections you rarely deal with anyway so they can just stay hidden.

And some admin candy – you can install modules directly from the admin tools now. That is REALLY nice as I managed to install the Link module right from the backend. Sweet! It’s similar to installing plugins in wordpress where you can specify ftp info and pull files down from a url.

Ok, last comment for now, cck functionality is now in the core (under ‘Structure’) so you can create custom content types right out of the box. There’s a number of input widgets pre-loaded but like I mentioned I had to install the link module myself. Image IS in there as a field type though – crackin!

Well, there is still a lot more to try out but so far I’d say most of these changes are going to add up to a much better experience for the basic user and it brings drupal’s administrative interface closer to the ease of use that you get/expect with a wordpress. In my mind that is a pretty big deal because it’s always been a critical distinction between the two and seen as a barrier to using drupal. Time will tell but it looks very positive.

Oh – and a quick shout about the drupal 7 release party here intown in Atlanta.  Get out there and raise a glass to celebrate with the community. Hopefully someone from here can attend.

Tags:
Posted in Uncategorized | No Comments »

sql to find drupal module file path

- Friday, November 19th, 2010 -

Troubleshooting Drupal modules can be hard if you have a lot of them plus a complex structure for where they’re saved – especially if there are multiple copies and multiple sites out there. If you update your module and suspect there is another copy of the module but you don’t know where, this sql will tell you where drupal is REALLY pulling the module code from:

mysql> select filename from system where filename like ‘%/my-module-name/%’;

This will give you a relative path to the module.

Tags:
Posted in Uncategorized | No Comments »

jQuery Cookie Plugin

- Monday, October 4th, 2010 -

I’ve been using the jquery cookie plugin created an age ago by Klaus Hartl (stilbuero.de) but it looks like his site is down? It’s a very easy to use plugin – not all that complicated but I thought I’d post our couple of most basic uses here since we had to use it recently and I couldn’t find the demos:

Pre-reqs – load jquery first and then the cookie plugin:

<script src="PATH-TO-JQUERY/jquery-1.4.2.min.js"></script>
<script src="PATH-TO-JQUERY/jquery.cookie.js"></script>

Most used – example for a one time user notification via js…

var MESSAGE_COOKIE_NAME = 'sawMessage'; // code for the cookie name $(document).ready(function(){ var sawMessage = false; if (typeof $.cookie != 'undefined'){ sawMessage = ($.cookie(MESSAGE_COOKIE_NAME) == '1'); } if (!sawMessage){ $.cookie(MESSAGE_COOKIE_NAME, '1', { path: '/', domain: 'mydomain.com', expires: 365 }); // expires in one year // code to show the message } }

Used less often – a cookie for just 1 session:

if (typeof $.cookie != 'undefined'){
  // set it
  $.cookie('one-session-cookie', 'yes');
  // read it
  if ($.cookie('one-session-cookie') == 'yes'){
    alert('the cookie was set');
  }
}

Posted in Uncategorized | No Comments »

Wordpress Boosted by Microsoft gift

- Tuesday, September 28th, 2010 -

Microsoft: Hey Wordpress.com – how would you like to take over our 30 million Live Spaces users?

Wordpress: Sure – what do we owe you for it?

Microsoft: Nothing. And we’ll even tell everyone how good your service and company is too.

Wordpress: Gee Thanks! You did say you were calling from Microsoft right?

Interesting news – microsoft is killing live spaces and telling everyone to move on over to wordpress. They announced it in this blog post. It’s really very unlike what i think the general perception is of Microsoft. Sounds like a great move to me though – I mean does microsoft have to be the best in every area? I’d be happy to see more innovation in the microsoft stuff that we ARE using – windows, word, excel, powerpoint.  So kudos to them for picking their fights, knowing where to focus and knowing how to hand the ball over when they’re not going to hit a homerun. And happy early christmas to wordpress.com!

I wonder what other areas Microsoft should get out of while they’re at it…

Tags: ,
Posted in Uncategorized | No Comments »

Recent Linux kernel exploit in the wild

- Wednesday, September 22nd, 2010 -

Just a quick not to linux server folks out there – this looks like something to make sure you’ve covered because it looks like it affects a whole lot of the web.

http://www.zdnet.co.uk/news/security-threats/2010/09/21/linux-kernel-exploit-roots-64-bit-machines-40090177/?s_cid=116&tag=mantle_skin;content

Lucky for use we have ksplice so we’re already patched. Hopefully you do too!

Posted in Uncategorized | No Comments »

Change of heart for creating iPhone apps

- Thursday, September 16th, 2010 -

Just wanted to post this because I was pleasantly surprised last week to hear the news that Apple is revising their guidelines for app approval to allow for the use of 3rd party apps (cheers from developers who use Flash and Unity3d etc). I guess we still have to wait and see how it pans out and also if they are preferential on the ‘approval’ side to native apps but seems like good news.

Of particular interest is that this comes up just shy of the completion of our first Facebook app here at Sharpdot which just happens to be built entirely in flash. It would be very nice to be able to push it out to iphones from largely existing code.

Posted in Uncategorized | No Comments »

Protected: Test Post

- Sunday, September 12th, 2010 -

This post is password protected. To view it please enter your password below:


Posted in Uncategorized | Enter your password to view comments

When does 75 equal 61?

- Tuesday, August 31st, 2010 -

When it has a leading zero in actionscript 2 of course.

trace(Number("075"));
// ActionScript 3.0 75
// ActionScript 2.0 61

try it for yourself!

and then add this code somewhere to strip off those zeros

var movieLenStr:String = '0075';
trace(movieLenStr + ' does NOT equal ' + Number(movieLenStr));
while(movieLenStr.charAt(0) == '0') {
     movieLenStr = movieLenStr.substr(1);
}
trace(movieLenStr + ' does equal ' + Number(movieLenStr));

So just to finish the thought – the problem is that in AS2 it’s interpreting that leading zero as an octal number and therefore converts it differently. In AS3 it just ignores the zero. It’s all spelled out in the livedocs:

In ActionScript 3.0, the Number() function no longer supports octal, or base 8, numbers. If you supply a string with a leading zero to the ActionScript 2.0 Number()function, the number is interpreted as an octal number, and converted to its decimal equivalent. This is not true with the Number() function in ActionScript 3.0, which instead ignores the leading zero. For example, the following code generates different output when compiled using different versions of ActionScript

from this entry: http://www.adobe.com/livedocs/flash/9.0/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=00000048.html

Posted in Uncategorized | No Comments »

Gigya

- Tuesday, August 10th, 2010 -

Testing something out with Gigya but stupid wywisyg isn’t letting me…

aaaaaaaaaaaaaaaa stuff

Posted in Uncategorized | No Comments »