Tech Ravings

An Opinion is a Terrible Thing To Waste
Subscribe

Archive for the ‘Web Magicary’

How your visitors can save your posts as PDF’s

July 03, 2007 By: ScottK Category: Web Magicary No Comments →

Being a member of several mailing lists gives me they opportunity to try several new things coming out. An email I received today indicated that HP has created a plug-in that allowed posts to be changed into PDF’s. I though hey cool I’ve done this many times using PHP so let me go check out HP.

The link I was given was HP Blog Printing and upon getting there wouldn’t you know it, they have a WordPress plugin as well! Great time to check out the plug-in and see if it works; hehe.

So I clicked the WordPress plug-in image link and was introduced to the registration screen.  You can not download the plug-in without: first, giving your email address; second, entering the URL of the blog you are using it on; third, accepting the terms & conditions. Ehh?!? OK so I can expect unsolicited email I guess but we’ll see if the email account I gave suddenly starts receiving them. >:-)>

Upon completing that step I was sent to the download screen. Which I promptly downloaded the WP plug-in. Although there were some strange files I did exactly as the README file said and uploaded the plug-in folder to the right folder. After logging into Tech Ravings I activated the plug-in.

Tech Ravings doesn’t have a theme that supports WP 2.2 so I had to manually include the php function to activate the print function and image but the README says that for version 2.2 you can widgetize it as well and my version actually shows it; again my theme isn’t widgetized though.

I was un-impressed with the results as the print image had a border around it and it was left justified in the sidebar. Not good in my opinion. HP released this under the GPL so I could modify it. Which I promptly id and added the border=”0″ to the image and wrapped it in a div tag through the code.

However when clicking the print button I was highly impressed as a category listing of all my posts where displayed with the post in each checked marked for conversion. Using the deselect all and then selecting a single post I made a great PDF of a post. This was converted to a PDF which I saved and then printed.

If you are interested in my hack you can download it here: HP Blog Print which will center your image within the area and remove the border for Internet Explorer; otherwise go to the publishers website as posted above for the “official” version.

Give your web page a WEDJE

June 22, 2007 By: ScottK Category: Web Magicary No Comments →

I came across a post that discussed an age old problem, reducing draw times for JavaScript widgets on external sites. As a widget and web site developer I’ve seen this time and time again; the publisher embeds the JavaScript code into their pages. When the JavaScript file producing server becomes slow or un-responsive the publishing web page barely gets drawn and visitors become impatient and leave.

Mike Davidson with consultation from Intern Rob have published a post Widget Enabled DOM JavaScript Embedding which can be found at WEDJE . They also recognize the implications of bad JavaScript includes and even cross-browser incompatibilities. Their solution to these is thus coined WEDJE.

In short the solution surrounds creating a standard div element in the page and then utilizing the DOM elements to create a script element within. Their post simulates a slow loading server and their pages still fully loads and when the 7 second delay is up their widget appears.

I will definitely have to explore the WEDJE pattern some more. Definitely review the comments as there are some further examples that are worth taking a stab at. I had to laugh as I wrote this article on Widget Enabled DOM JavaScript Embedding because I realized that the WEDJE acronym sounds like Wedge.

Disclose Your Privacy

May 30, 2007 By: ScottK Category: Web Magicary No Comments →

Yes I mean pull back the curtains on what your site does and how you resolve issues. By doing so you are disclosing to your visitors browser what information you are collecting through your cookies and if there is a problem how the visitor can contact you. By not doing so isn’t going to kill your web site in any fashion nor is there any requirements from anyone to do so as well. What may happen is some visitors may not be able to fully enjoy your site.

Disclosing your privacy policy is known as the

    Platform for Privacy Preferences

(P3P) as recommended by the World Wide Consortium in 2002. P3P is a protocol that allows a web site declare the information it collects and how that information is used. This gives the visitors more control of their personal information while browsing the site with a P3P enabled browser (aka User Agent).

With the rampant use of tracking cookies to record demographics and surfing habits many surfers elect to turn of cookies. The P3P enabled User Agent seek to give back cookies to these users and even more control over data collection. The surfer sets their browser to allow this or that type of cookie information collection and from there the browser will either save or reject a web sites cookie based up the web sites P3P policy. P3P enabled User Agent can even show the web sites policy in readable format.

Actually building P3P policies is quite difficult. First there’s the whole explanation from the w3c P3P Reference of what the xml formats are needed. They also provide a validator once you are done P3P Validator. You also need a privacy policy page for your site also explaining what you collect and what you do with that information. There are several websites that you can have the necessary P3P files created and they don’t seem expensive.

Are these P3P important? I don’t know the answer to that as User Agent support seems to be spotty. I do know my site visitors are very important too me and that I want to ensure a good experience. So I have created the necessary files. In this day and age privacy is important and trustworthy sites.


ss_blog_claim=ef6135f29164404afb5ea2743196c435