DESIGNED DEVELOPED DELIVERED

Mob: 07760 392284edward@ee-web.co.uk

ee-web thinks... a bit

Go on, make my day ... leave a comment

Strict errors in Joomla 1.5 and no access to php.ini

May 6th, 2014 by Edward

Recently my host updated their php. This is good of course. However, I started seeing all, on some sites, a pile of  strict errors like this.

strict Standards: Non-static method JLoader::import() should not be called statically in …

It has taken hours to sort this out, and as ever with ‘debugging. its a one line fix. The newer php is getting cross because it has a higher (and therefore more secure) requirement on how well the php is written. Old code didn’t have to live up to this!

Anyway, like many people out there I have some reseller hosting which  means I can’t access php.ini I tried a whole pile of alterations in both the config and the .htaccess and got some angry responses in stackexchange.com telling me to dump clients!!!

Eventually I put this into the both the main index.php and the one within the administration folder.

After

define( ‘_JEXEC’, 1 );

add

error_reporting( E_ERROR | E_PARSE | E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_COMPILE_WARNING );

Imagine my unconstrained joy at seeing a normal login screen again!

categories
tag

php update and joomla 1.5 – solving a couple of errors

March 28th, 2014 by Edward

Many of my clients are still running joomla 1.5 . Recently the hosts that I use upgraded their php to 5.4. This is good news… but has caused some problems with the sites.

Firstly here’s what happens on the front end:
loads of lines of nasty php error codes

Lots and lots of nasty strtotime() errors. Older version so php weren’t so strict about setting the time zone .

Put this in the top line of the configuration.php file – get rid of all the front end

date_default_timezone_set(‘Europe/London’);

… and bob’s your uncle

Secondly I found an error in the back end, but only very occasionally – for example on the list of articles page.

Warning: Creating default object from empty value in … administrator/components/com_content/controller.php on line 97

This time php doesn’t want to use an empty value so just add $section = new stdclass; before $section->title = ‘All Articles’; on line 96 thus:

$section = new stdclass; //edward addition
$section->title = ‘All Articles’;
$section->id = 0;

And again, bob’s your uncle.

categories
tag

Are we getting too generic – spotting wordpress and bootstrap …

January 31st, 2014 by Edward

It’s all the same to me…

Just recently one of the designers I work with came to me with his usual starting point “Give me a ball park figure for …” and sent me off to a link.

When I got there I was impressed, at first. It looked great, using bold greens and blues, and large photos with lots going on. Indeed, it was arresting.

So remembering my mission, I went to work to come up with a ball park figure to produce ‘something with the same spec’ – no, not a copy.

Things fall into place…

After a couple of minutes I thought – ‘I know what this is… its a wordpress template stuffed through the bootstrap frame work.’ All it took was a few seconds poking around in the code to see that, yes it was wordpress, and yes it was bootstrap.

I was quite pleased with myself – I’ve been wondering if I could recognize how things were put together – and here I was, doing it.

Disadvantages of bootstrap…

I have several projects on the go using bootstrap – it is such a time saving library. But, you do have to be careful …. disadvantage… well, it looks to to me like things are in danger of becoming generic? That I believe is one of the problems with bootstrap – it comes so stuffed full of goodies, that before you know it, designers and developers have taken the easy route and – hey presto, it’s all starting to look the same.

Is this a problem? How is this is going to be avoided…

As a web professional you have to adapt – bootstrap, has in effect, opened another market for us.

categories
tag

Bootstrap in Joomla 3

January 21st, 2014 by Edward

I have used joomla since approx. iteration 1.5.7. With the recent release of the 3.2 series bootstrap has been included.

Bootstrap, at least according to me(!) is a library of pre-built css styling and JavaScript that enables you to construct a fully responsive layout based on a 12 column grid. It’s a half way house really between building your own template from scratch (which I love to do) and using an off the shelf template. It has been developed by twitter.

Initially a sceptic

I was quite annoyed about this at first – even wondering for a short while if my joomla days were coming to an end. In retrospect that was a  bit of a knee-jerk reaction of course. I still have concerns though, given that bootstrap includes pre-built responsive menus, glamorous buttons and font-styling – could things could start to become a bit generic in the look? I sometimes think I can spot a wordpress site…

read more Read more…

categories
tag

Please ignor me

September 3rd, 2013 by Edward

The link below will open up a lightbox effect with one picture and a whole pile of text similar to what you showed me to day.

click here for demo

categories
tag

Spam on virtuemart

January 27th, 2012 by Edward

Some of my clients have been getting spam through the “Ask vendor a question” link in virutemart/joomla. You can reduce this by two steps:

First edit out the link “Ask seller a question about this product”

Go to site/components/com_virtuemart/themes/yourtheme/templates/product_details/flypage.tpl.php Assuming this is the flypage you are using (which it maynot be… you’ll know, because this wont work!). Once there comment out line(ish) 48 which says

   <td colspan="2"><?php echo $ask_seller ?></td>

like this

 <td colspan="2"><?php //echo $ask_seller ?></td>

So that will remove the link – however, those nastly littke spammy bots will probably have the address of your form … so you need also to take action with that page. I have tried putting a simple php redirect right at the top – this means that if the bots arrive they’ll be re-directed – in this case back to the index page.

This time go to site/components/com_virtuemart/themes/yourtheme/templates/pages/shop_ask.tpl.php and add something liek this right at the top (make sure NOTHING has gone out to the screen before eg no echo statemetns…) SO in other words you have something like this right at the top.

<?php
header('Location: <a href="http://www.josephstorehouse.co.uk'/">http://www.domain'</a>);
exit;
categories
tag

How to get a You Tube video to work in virtuemart

November 16th, 2011 by Edward

I have been having problems getting youtube video to work on VirtueMart, even though the same code works in a normal article on the same joomla site!

Turns out the filter for stripping out nasty tags for VirtueMart is a big more aggressive than the joomla one. It cuts out the <iframe> tags  and also <object> and the <embed> html tags.

In order to embed YouTube video and other Flash files in your VirtueMart product description area you should remove the object and the embed items from the following array:

 var $tagBlacklist = array('applet', 'body', 'bgsound', 'base', 'basefont', 'embed', 'frame', 'frameset', 'head', 'html', 'id', 'iframe', 'ilayer', 'layer', 'link', 'meta', 'name', 'object', 'script', 'style', 'title', 'xml');

The new array will be:

var $tagBlacklist = array('applet', 'body', 'bgsound', 'base', 'basefont', 'frame', 'frameset', 'head', 'html', 'id', 'iframe', 'ilayer', 'layer', 'link', 'meta', 'name', 'script', 'style', 'title', 'xml');

The modification should be completed in the administrator/components/com_virtuemart/classes/phpInputFilter/class.inputfilter.php file.

So now you can just go to the product article. I usually press the “html source” button and just paste the embed code that you tube present.

categories
tag

Adding a random sort to the category blog in joomla 1.5

October 12th, 2011 by Edward

A client with a joomla wanted to display articles in a random order. Sounds like an opportunity for ee-web design to hack the back of joomla – marvelous. We are working here with joomla 1.5.23 – I shouldn’t think its that different with the later joomlas….

There are two stages to this – set up another option in the drop down menu for the category blog layout and add a random sort to the query.

Adding an option to the category blog
Find root/components/com_content/views/category/tmpl/blog/xml

Look for this code

<param name=”orderby_pri” type=”list” default=”” label=”Category Order” description=”Order items by category”>
<option value=””>No, order by Primary Order only</option>
<option value=”alpha”>Title Alphabetical</option>
<option value=”ralpha”>Title Reverse-Alphabetical</option>
<option value=”order”>Ordering</option>

And add another option thus:

<param name=”orderby_pri” type=”list” default=”” label=”Category Order” description=”Order items by category”>
<option value=””>No, order by Primary Order only</option>
<option value=”alpha”>Title Alphabetical</option>
<option value=”ralpha”>Title Reverse-Alphabetical</option>
<option value=”order”>Ordering</option>
<option vlaue=”random“>Random</option>

Now go to your backend, open the menu item and see if the sort order now provides a “Random” selection in the drop down.

shot of the category blog view

So, half way there – you can now select random order – but it doesn’t do anything useful!

Alter the query
Now open components->com_content->helpers->query.php

and look for this code:

function orderbyPrimary($orderby)
{
switch ($orderby)
{
case ‘alpha’ :
$orderby = ‘cc.title, ‘;
break;

case ‘ralpha’ :
$orderby = ‘cc.title DESC, ‘;
break;

case ‘order’ :
$orderby = ‘cc.ordering, ‘;
break;

which effectively looks to see what selection was made in the back end and then applies that to the sort

We need to add in a random option – like so

function orderbyPrimary($orderby)
{
switch ($orderby)
{
case ‘alpha’ :
$orderby = ‘cc.title, ‘;
break;

case ‘ralpha’ :
$orderby = ‘cc.title DESC, ‘;
break;

case ‘order’ :
$orderby = ‘cc.ordering, ‘;
break;

case ‘random‘ :
$orderby = ‘RAND(), ‘;
break;

default :
$orderby = ”;
break;
}

One last thing – note the word “random” in bold – you can write whatever you like here, just make sure that in the two steps you write EXACTLY the same thing – if you don’t, it wont work!

And, hopefully that’s it – all seemed to work for me.

categories
tag

Keywords – what are they? How to use them?

October 11th, 2011 by Edward

Keywords

There are two major parts to understanding keywords: one is the meta tag and the other is density. Keywords are the focus of your content. You should come up with a list of no more than 25 keywords that describe your site’s message. Use your keywords to update your content and to write you links etc. These keywords will help you raise your SEO.

read more Read more…

categories
tag

Linkr – the best extension

October 5th, 2011 by Edward

I’d like to take a moment to express just how darn wonderful this extension is for joomla, enabling article linking as it does. Its worked seamlessly in IE (7,8) and every other browser.

A recently reported issue with IE9 and Linkr is sorted (seemingly), so that’s good.., however, I found that turning on mootools update meant hat fckeditor stopped working…. so for me, its not that great after all!!!

However, the new spanner in the works is that it appears that Linkr may not be developed such that it works in a version of Joomla above 1.5 – ie its not going to be compatable for 1.6, 1.7 etc.

So it looks like its goodbye to an old friend, as Joomla 1.5 (and hence Linkr) shuffle off into the distance.

Advice to clients – if you are running Joomla 1.5 and IE9 you’ll need to update your linkr. For Joomla 1.6 and on its not such a problem because the joomla developers have built article linking into the backend.

categories
tag