Software » Page 4

Category: Software

Chrome’s Got Extensions

Yes, the developer’s version of Chrome has extensions for some time now but the latest stable release now includes not only support for extensions but also new HTML and Javascript APIs.

The Google Code Blog today announced that Extensions would now be available far and wide. If you want to learn more about extensions for Chrome, follow this link.

Don’t know what Chrome is all about? Well it is, IMHO, the fastest and best browser on the market today. You owe it to yourself today to check this great web browser out.

Here is a list of my favorite extensions (in no particular order):

  • Bookmark all tabs – Bookmark all tabs using quick keyboard shortcut: ctrl + shift + d
  • ChromeMUSE – Multi-URL Shortener/Expander – Shorten and expand URLs with different shortening service providers. Probably my most used extension these days
  • Chromium Delicious Plugin – Extension to work with delicious.com
  • Google Tasks – A simple Google Task extension for Chrome.
  • Google Voice (by Google) – Notifies you of new messages and gives you quick access to calling and free SMS via Google Voice
  • iMacros for Chrome – Automate your web browser. Record and replay repetitious work
  • Kuber PageRank Checker – This SEO tool shows the pagerank of webpages beside the address box. Click the icon Alexa rank shows as well as WHOIS link.
  • Lorem Ipsum Generator – Creates random dummy text
  • MeasureIt! – Draw out a ruler that will help you get the pixel width and height of any elements on a webpage.
  • Nofollow Checker – Simple nofollow highlighter. Great way to easily see if links on a page use nofollow or not.
  • Pendule – Extended developer tools for Chrome.
  • QR-Code Tag Extension – Display a QR-Code tag for the current URL in the brower. QR-code is a very convenient way to quickly jump to a certain page with for instance mobile devices
  • RSS Subscription Extension (by Google) – Adds one-click subscription to your toolbar.
  • Speed Tracer (by Google) – Get insight into the performance of your web applications.
  • Window Resizer – Resize browser window to emulate various screen resolutions

What are your favorite extensions for Chrome? Use the comments below to sound off..

Skin Templates in AspDotNetStorefront

Visual Studio directory screen shot of ASPDNSF ecommerce solution skin directoryI’m not sure if you knew this or not, but AspDotNetStorefront ML and ML/Express both use different default templates in the skin directory.

Recently, a new file has begun showing up in the shipping SKIN_1 folder called expressTemplate.ascx.  I had kind of assumed that this file was a bare bones template, much like the standard “bare” skin that comes with many blog packages. And if you’ve been working with standard ML software like I have for years, you just automatically start modifying template.ascx to skin your sites. Well, we quickly found out this was wrong and it isn’t documented in the ASPDNSF manual either (at least not now).

As it turns out, you need to use the expressTemplate.asc as your base template in a skin when using ML/Express and Template.ascx as the base template in a skin when using any of the other ML products.

I can only assume the One of the nice things is that many of the other template “features” are still available in ML/Express.

Our favorite is the HomeTemplate AppConfig that allows you to define a separate template to use on the site’s home page (default.aspx). As you can see in the example above, we are using expressTemplate.home.ascx for this purpose. We just set the value of the HomeTemplate AppConfig to be the name of the home page template and it all works fine.

Another template feature that we tested under ML/Express is template switching. While I’m not sure that you are SUPPOSED to use this feature, it works. In order to turn on template switching, you’ll need to go to the Configuration | Advanced | Run SQL menu option in the admin. Then you can run the following SQL command to turn this feature on: UPDATE AppConfig SET ConfigValue=’true’ WHERE Name=’TemplateSwitching.Enabled’

This allows you to define different templates for different physical pages on the site. Let’s say you want to have your product display pages use a different template than the rest of the site, you would add a new AppConfig called templateshowproduct.aspx with a value of the full template name (like expressTemplate.Products.ascx).

The reason why I’m not sure you are supposed to use this in ML/Express is that it has been hidden from view. You won’t find it in the normal AppConfig variables by searching for it but it does exist and it does work.

So don’t forget, if you are using AspDotNetStorefront ML/Express version, plan on using expressTemplate.ascx as your base template for your skin rather than the template.ascx file as this is hard-coded into the compiled project.

Thoughts about this post? Please use our comments section below. If you are a comment spammer looking to get “link love” back to your site with some inane comment, don’t bother as the comments are moderate to week people like you out!

Using a Google Spreadsheet as a Database

I recently had the opportunity to attempt to create a simple little CMS for a single page on a website hosted on a Linux box somewhere out there in the cloud. We wanted to offer the client (who had no experience or patience to work in HTML) the ability to update the content on this page. So, with Google’s search engine as my reference material (who needs to buy programming books any more?) I launched into writing some PHP code that will read a published Google Spreadsheet and treat each of the sheets as a table.

Kinda nifty stuff!

Of course, if we are going to do this, I’d prefer the customer use their own spreadsheet so we aren’t held responsible for failure to ensure the existence of this spreadsheet and it’s content. So, here are the steps required to properly publish a Google Spreadsheet that can be consumed by another website:

Create your Google Spreadsheet – In this case, we’ve got 5 columns that contain information to be used in an unordered list typical of a Resources (links) page.

 Publish your Google Spreadsheet – This is the “hardest step” we’d be asking of our client. It entails pulling down the Share button at top right of spreadsheet and selecting Publish as a web page.

image

imageConfigure Published Data Link -  In our scenario, we are publishing All Sheets, Automatically republishing this data when changes are made and we are NOT requiring a login to view this data (making it publicly visible). Once you’ve pressed the  “Start Publishing” button, the bottom half of the form will become active, allowing you to create the correct link to the data in a format that can be programmatically consumed by our target web page. In this case, we want to select CSV data and we are only interested in the “Resource Links” sheet in this spreadsheet. We are taking all available cells. Copy and paste the provided URL and you are good to consume this data via the programming language of your choice.

 

“But  Mike”, you say… “Why not just publish it as HTML to embed in a page” using the aptly named option on this dialog box? Good question. In this case, we want this data to be tied back directly to our client’s site rather than having the content iframed in from spreadsheets.google.com. Better to have this quality content showing up on the clients site for SERP and Page Rank purposes.

“But Mike”, you stammer again… “Why not use the GData APIs that have been written for PHP?” Another good question. In this case, I don’t know if the customer’s hosting environment has the API installed (it installs as an add-on to PHP) nor do I know if the host company will do this for our client even if we begged them to. So this provides us with a nice, lightweight way to address this in any hosting environment that supports later versions of PHP (anything greater than 4.02).

And that’s all there is to it. Perhaps if you are good, and ask really nicely, I’ll make the time to post the source code to consume this data.

SEO And ASPDotNetStorefront

In almost all respects, this is a FANTASTIC product in terms of providing the webmaster/merchant/developer with a great set of tools for SEO purposes. You define, on a page by page, product by product basis not only the page name but also the title, product image alt tag, meta keywords and description but the process is also painless to boot!

There is one aspect of the site that has left me “wanting more” and that is the operation of the breadcrumbs. This is a must-have feature for any e-commerce website and ASPDNSF does a good job of this. However, they don’t necessarily make it easy to modify the display string format without having to have a source code license as the generation of this string is compiled into one of the site DLLs.

A recent post in the great support forums for ASPDNSF inspired me to revisit this issue.

What I’ve always wanted to do, from a display and from an SEO standpoint, was to set up my client’s sites so that the primary keywords on any given page are used in the URL and that first occurrence of the keywords on a page are formatted as the only occurrence of Heading 1 (<h1>) as well as sprinkling them in the content. ASDNSF, by carefully naming products (and topics and sections and categories) appropriately, will automatically take care of most of this EXCEPT the Heading 1 tag. I can modify a product page so that they Name of the product is set up as Heading 1 but the challenge is that the first occurrence of this phrase is in the page is in the breadcrumb and has no emphasis, thereby discounting it in the eyes of the almighty search engine bots. (See below)

breadcrumb example, out of the box

However, by going in and doing a little string manipulation in the SkinBase.cs file (which is thankfully NOT compiled into the DLLs) I’ve gone in and broken apart the breadcrumb and made the name of the item (product, category, section, etc) into a Heading 1 giving it primary importance on the page.

image

The code to do this isn’t particularly elegant, nor is it difficult. I’ll outline the logic and then show the complete code at the end.

The idea is to find out if the SectionTitle (the value used by ASPDNSF as the breadcrumb and created in one of the DLLs)  contains the string used as a breadcrumb separator. If not, this is a either a stand-alone page (topic, system page, etc) or it is the root level of one of the entities (product, category, section, etc). If so, we just slap <h1> tags around it and be done with it.

string sep = AppLogic.AppConfig("BreadcrumbSeparator");
if (SectionTitle.LastIndexOf(sep) == -1)
s = s.Replace("(!SECTION_TITLE!)",String.Format("<h1>{0}</h1>",SectionTitle));
else

Otherwise, we know it is a traditional breadcrumb and we’ll need to determine where to insert the tags at specific points in the string. We again look for the last instance of the breadcrumb separator and add 1 to it’s own length (‘cause it has a trailing space). The end tag location is determined by subtracting 7 (the length of a space and the closing span tag).

int insertOpening = SectionTitle.LastIndexOf(sep) + sep.Length + 1;int insertClosing = SectionTitle.Length – 7;

Once we have these, we can insert the appropriate Heading 1 tags into a string.

string newSectionTitle = String.Format("{0}<h1>{1}</h1>{2}",
SectionTitle.Substring(0, insertOpening), SectionTitle.Substring(insertOpening, insertClosing – insertOpening),
SectionTitle.Substring(insertClosing));

So, instead of using

s = s.Replace("(!SECTION_TITLE!)", SectionTitle);

which is the default code for this function, we’ll use the following instead:

string sep = AppLogic.AppConfig("BreadcrumbSeparator");
if (SectionTitle.LastIndexOf(sep) == -1) s = s.Replace("(!SECTION_TITLE!)", String.Format("<h1>{0}</h1>",SectionTitle));
else{
int
insertOpening = SectionTitle.LastIndexOf(sep) + sep.Length + 1;
int insertClosing = SectionTitle.Length – 7;
string
newSectionTitle = String.Format("{0}<h1>{1}</h1>{2}",
SectionTitle.Substring(0, insertOpening),
SectionTitle.Substring(insertOpening, insertClosing – insertOpening),
SectionTitle.Substring(insertClosing));

s = s.Replace("(!SECTION_TITLE!)", newSectionTitle);
}

I've found this code to be helpful to resolve the problem described at the top of this blog post. Hopefully you will as well. Please leave us comments below if you agree or disagree with me.