Category Archives: Web sites

osCmax and Templates, Responsive, CSS, and frameworks

A few years back I was working up a site in osCmax (osCommerce fork) and while the templating system was good it left a lot of issues with cross browser compatibility. I blogged several posts and some lengthy commentary on how I set it up with Blueprint, a CSS framework.

Revisiting osCmax recently I am now looking again at templates or themes and I have noted that Blueprint has not been updated since 2011 only a short while after my last efforts into my Blueprint for osCmax efforts.

As a result, I am doing more reading, and particularly on the more recent Responsive frameworks. Blueprint may well have atrophied simply due to the rapid increase in mobility issues for web design.

I’d observe that in some cases I expect that I do not need a responsive website and unless I know that I am working to a market that has a prevalence of mobile visits, then what is the point ? I have a particular site that I manage and I know from its’ stats over 10 years or more of views, that even today 80% of users are PC based and the 20% tend to be more unknowns than emphatically mobile. Further, even if the 20% were all mobile users, they may well be ok with the existing CSS styles that still present the site in a usable fashion on a tablet. Phone and small screen users may also be ok, and even if I ‘ask the audience’ do I get a response that I can use?

At this stage I am thinking that if I do deploy a responsive framework, then I will do so as a backend ‘good idea’ to maybe future-proof the site for an advent of a mobile tipping point. And to achieve that I should review the possible frameworks, just not from a ‘mobile-first’ perspective.

 

 

Which WordPress Contact Form Plugin to use?

Reviewing the plethora of Contact Form plugins for WordPress is daunting.  I have looked at dozens of possible options.

This review is relatively brief and focuses on obvious contenders. The rest can be summarily dismissed:

Contact Form by ContactMe.com reads very well, with all the common features. The catch is that it requires registration at yet another software as a service provider that wants your name and email address and offers ‘features’ that are totally unneccessary for the purpose of a contact form. Not for me.

Custom Contact Forms is another that sounds promising when reading the blurb and it installs smoothly, but then the top line is “Are you looking for a more customizable, reliable, and secure contact form solution for WordPress? Try Gravity Forms” which says to me that this plugin is not reliable or secure or customisable? Just a weird approach to marketing. Did not go further as Gravity Forms is one I am also looking at and if this one promotes Gravity then who am I to argue?

Fast Secure Contact Form is anything but fast with screen after screen of options, fields, and settings in one very long page. While I started to trawl down the list, I was overwhelmed within 30 seconds and decided that it would require far too much thinking and effort when all I want is a simple ‘Contact Us’ page.

BotDetect CAPTCHA is not a contact form tool but a method of adding Captcha processes to an entire WordPress site. The issue is that the plugin install does not include the native Captcha library, which must be downloaded separately and only after registering your email address with the service provider, etc. I had hoped to build a contact form and add this, but it just gave me headaches trying to get it configured.

Contact Form With Captcha is a nice contact form but the Recaptcha process is difficult for some users as the distortion of the words can be too much. In fact I have deployed this one on a number of sites and this review is simply to find an alternative that provides flexibility in the Captcha options.

Contact Form 7 is the one I eventually went with as it provided an easier Captcha option.

 

Finding large files or folders on a drive

My Toshiba Ultrabook has a 128G SSD drive and it is kinda small. I’ve just gone through the process of some clean up to remove unused apps and archive data files.

In the process I tried a number of free “Large File Finder” type applications and there are two that I really like.

The first is WinDirStat which provides a neat graphical view as well as a file list.

The other is from Extensoft called Free Disk Analyzer.

I’ve prepared two simple screenshots showing each one after I used them on my drive when it was over-crowded. Since then I’ve done a clean up.

I think the visual aid of WinDirStat is helpful, but I am a simple lists type user (changing the default Windows view to Details list is normal, and using Linux ls -la, is my default setting) and I think Free Disk Analyzer is my first go-to tool.

 

Nextgen Gallery WordPress nggtags template caption option

I have a slightly older version of NGG because I have modded it and have yet to transfer those mods to the latest version. But I just made another minor change that I wanted to document before I forget what I did.

Using the

no images were found

  works well for showing the images from the gallery that are tagged as an automated gallery creation.

But I wanted to get the captions displayed as well like the syntax for the standard gallery by id display

no images were found

.  So I needed to add the ” template=caption” as an option for the nggtags shortcode.

Edit /wp-content/plugins/nextgen-gallery/nggfunctions.php

Around line 867 should start the function into which I inserted the $template value (with relevant comma’s etc.) at 3 places as highlighted with the new text.

[php highlight=”1,13,23″]
function nggShowGalleryTags($taglist, $template = ”) {

// $_GET from wp_query
$pid    = get_query_var(‘pid’);
$pageid = get_query_var(‘pageid’);

// get now the related images
$picturelist = nggTags::find_images_for_tags($taglist , ‘ASC’);

// look for ImageBrowser if we have a $_GET(‘pid’)
if ( $pageid == get_the_ID() || !is_home() )
if (!empty( $pid ))  {
$out = nggCreateImageBrowser( $picturelist, $template);
return $out;
}

// go on if not empty
if ( empty($picturelist) )
return;

// show gallery
if ( is_array($picturelist) )
$out = nggCreateGallery($picturelist, false, $template);

$out = apply_filters(‘ngg_show_gallery_tags_content’, $out, $taglist);
return $out;
}

[/php]

That sorts out the function that is called from the  /wp-content/plugins/nextgen-gallery/lib/shortcodes.php

Around line 114 there is a string evaluation test process that we change to look for a second option referenced as template= etc..  shown in the highlighted line.

[php highlight=”6″]

if ( stristr( $content, ‘[tags’ )) {
$search = "@(?:<p>)*s*[tagss*=s*(.*?)s*]s*(?:</p>)*@i";
if (preg_match_all($search, $content, $matches, PREG_SET_ORDER)) {

foreach ($matches as $match) {
$replace = "

no images were found

}" template="{$match[2]}"]";
$content = str_replace ($match[0], $replace, $content);
}
}
}

[/php]

Finally around line 273 there is the call to the nggShowGalleryTags in the show_tags function. Insert a new line for $template as a parameter and to the output option.

[php highlight=”5,12″]

function show_tags( $atts ) {

extract(shortcode_atts(array(
‘gallery’       => ”,
‘template’  => ”,
‘album’         => ”
), $atts ));

if ( !empty($album) )
$out = nggShowAlbumTags($album);
else
$out = nggShowGalleryTags($gallery, $template);

return $out;
}

[/php]

Now the nggtags option that will create a custom gallery from Tagged images can optionally include the image caption as well.