This is the archived version of my b2evolution code blog.
If you require any help regarding b2evolution then
visit it's support forums
You can find my current blogs here
Code : {@link : WafflesOn}
Personal : {@link : InnerVisions}
Posted on 23rd Mar 2008 in : Techno Babble
Considering the number of times I've had to re-install ubuntu recently I should be a bloody expert! .... I've learnt not to play with X .... he gets pissed off real easily
..... Saying that, and with shedloads of help from Afwas, I've managed to get it installed with the majority of the software that I need to be able to play on the web, although I was devastated when I couldn't install IE6,7,8beta.....urm, well any IE version really...... the good news is, it would appear that my pc really CAN move files around without having the unsafest pile of crap since ......urm ........ sliced bread? .... is sliced bread unsafe? ..... I suppose you could always cut yourself with the knife while slicing it?
Anyway, I've mostly managed to install all the shit I need on a day to day basis ...... but I might need to reinstall, so this is just to remind me of stuff ![]()
So, now that all y'all think I'm a bloody genius .... which I am of course
...... I should point out that even my dad can run linux, and he's like "really old" and shit. I've still got a fair few things that I'm missing ... like my second screen working, and a decent ssh client that can hold multiple sessions in tabs .... and I must setup all my email accounts, although the lack of spam whilst they're not setup is damn attractive ... ohhh and I must change the desktop background, the swirly modern art brown thing really isn't to my tastes.
Stupid bloody question really, of course it hasn't improved, I've spent the best part of a couple of days just trying to avoid another re-install ..... it's all X's fault .... so I've done bugger all work! ...... mind you, it IS the weekend so maybe I shouldn't feel ...... urm ..... you know, that feeling you get when yer meant to be doing stuff but instead you just piss off an play? ... anyway, I'm not feeling that.
/me wanders off to find a yen sign that I can copy+paste cos I haven't worked out a way to type "¥" from the keyboard yet :S
¥
Posted on 20th Mar 2008 in : Techno Babble, Skins, Hacks, Plugins & Widgets
On the grounds that it's often easier to show something than try explaining it .....go visit the blogrum. Before you ask, no it's not ready for release yet, I need to sort out some permissions stuff to do with comments and tidy up the code and css ..... cos it's a tad messy in there ..... and then it's gonna take a mammoth post to explain what it can do, how, where, why and when. The good news is that it's pretty much just a trick skin with a couple of plugins thrown in, although I have a few more plugins in the works to make it work even more like a forum.
Registration is open, so if you want to have a play then feel free, although guest users can comment in the chatter blogrum so if all you want to do is spam me then there's no need to even register ![]()
¥
Posted on 24th Feb 2008 in : Techno Babble
I've been a smidge quiet lately because we're in the middle of re-skinning an old OS-Commerce store. As always we started by creating a shiny new dev sub-domain for it to live on so we don't break the live site ..... problem number 1, OS-Commerce requires register globals to be enabled before it can run .... wtf? Not a chance that's going to happen on our server, not even a dev site! .... so, joy of joys we now need to find another e-commerce solution as well as skin it!
After wandering around the demo areas for a few other e-commerce solutions and listening to suggestions from other people we eventually ended up picking Magento Commerce ..... cool, decision made, time to go to work.
So, I got handed this shiny new software and a picture of the proposed skin with "let me know when you've sorted all the code out" ... and into the deep end I dived ....... I wish like hell I hadn't ... I have NEVER seen so many files required for a skin in all my life!! ..... seriously, I didn't even bother to count them, mainly because I have trouble with 3 digit numbers, but also because I get bored easily .... but, how hard could it be right? ....... wrong! As well as having more files than a blonde can count before either the boredom threshold or upper number cap is hit, they also have this reaaaaaally "flexible" approach to skinning where everything is controlled by XML files, and some other files.
This one controls the catalogue, note, this is just for viewing the catalogue, there's another for customers, and one for checkout .... ohhh and another for sales, and one for searching the catalogue ...... etc
Bash:
<?xml version="1.0"?> | |
<!−− | |
/** | |
* Magento | |
* | |
* NOTICE OF LICENSE | |
* | |
* This source file is subject to the Open Software License (OSL 3.0) | |
* that is bundled with this package in the file LICENSE.txt. | |
* It is also available through the world-wide-web at this URL: | |
* http://opensource.org/licenses/osl-3.0.php | |
* If you did not receive a copy of the license and are unable to | |
* obtain it through the world-wide-web, please send an email | |
* to license@magentocommerce.com so we can send you a copy immediately. | |
* | |
* @category design_default | |
* @package Mage | |
* @copyright Copyright (c) 2004-2007 Irubin Consulting Inc. DBA Varien (http://www.varien.com) | |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) | |
*/ | |
| |
Supported layout update handles (action): | |
- catalog_product_gallery | |
- catalog_product_compare_index | |
| |
Supported layout update handles (special): | |
- default | |
- catalog_category_default | |
- catalog_category_layered | |
- catalog_product_view | |
| |
−−> | |
<layout version="0.1.0"> | |
| |
<!−− | |
Default layout, loads most of the pages | |
−−> | |
| |
<default> | |
| |
<!−− Mage_Catalog −−> | |
<reference name="top.menu"> | |
<block type="catalog/navigation" name="catalog.topnav" template="catalog/navigation/top.phtml"/> | |
</reference> | |
<reference name="right"> | |
<block type="core/template" name="left.permanent.callout" template="callouts/left_col.phtml"> | |
<action method="setImgSrc"><src>images/media/col_left_callout.jpg</src></action> | |
<action method="setImgAlt" translate="alt" module="catalog"><alt>Our customer service is available 24/7. Call us at (800) DEMO-NUMBER.</alt></action> | |
<action method="setLinkUrl"><url>checkout/cart</url></action> | |
</block> | |
</reference> | |
<reference name="right"> | |
<block type="core/template" name="catalog.compare.sidebar" template="catalog/product/compare/sidebar.phtml"/> | |
<block type="core/template" name="right.permanent.callout" template="callouts/right_col.phtml"/> | |
</reference> | |
<reference name="footer_links"> | |
<action method="addLink" translate="label title" module="catalog" ifconfig="catalog/seo/site_map"><label>Site Map</label><url helper="catalog/map/getCategoryUrl" /><title>Site Map</title><prepare>true</prepare></action> | |
</reference> | |
| |
</default> | |
| |
| |
<!−− | |
Category default layout | |
−−> | |
| |
<catalog_category_default> | |
<reference name="left"> | |
<block type="catalog/navigation" name="catalog.leftnav" after="currency" template="catalog/navigation/left.phtml"/> | |
</reference> | |
<reference name="content"> | |
<block type="catalog/category_view" name="category.products" template="catalog/category/view.phtml"> | |
<block type="catalog/product_list" name="product_list"></block> | |
</block> | |
</reference> | |
</catalog_category_default> | |
| |
<!−− | |
Category layered navigation layout | |
−−> | |
| |
<catalog_category_layered> | |
<reference name="left"> | |
<block type="catalog/layer_view" name="catalog.leftnav" after="currency" template="catalog/layer/view.phtml"/> | |
</reference> | |
<reference name="content"> | |
<block type="catalog/category_view" name="category.products" template="catalog/category/view.phtml"> | |
<block type="catalog/product_list" name="product_list"></block> | |
</block> | |
</reference> | |
</catalog_category_layered> | |
| |
<!−− | |
Compare products page | |
−−> | |
| |
<catalog_product_compare_index> | |
<!−− Mage_Catalog −−> | |
<reference name="root"> | |
<action method="setTemplate"><template>page/one-column.phtml</template></action> | |
</reference> | |
<reference name="head"> | |
<action method="addJs"><script>scriptaculous/scriptaculous.js</script></action> | |
<action method="addJs"><script>varien/product.js</script></action> | |
</reference> | |
<reference name="content"> | |
<block type="catalog/product_compare_list" name="catalog.compare.list" template="catalog/product/compare/list.phtml"/> | |
</reference> | |
</catalog_product_compare_index> | |
| |
<customer_account_index> | |
| |
<reference name="right"> | |
<action method="unsetChild"><name>catalog_compare_sidebar</name></action> | |
</reference> | |
</customer_account_index> | |
| |
<!−− | |
Product view | |
−−> | |
| |
<catalog_product_view> | |
<!−− Mage_Catalog −−> | |
<reference name="root"> | |
<action method="setTemplate"><template>page/2columns-right.phtml</template></action> | |
</reference> | |
<reference name="head"> | |
<action method="addJs"><script>varien/product.js</script></action> | |
</reference> | |
<reference name="content"> | |
<block type="catalog/product_view" name="product.info" template="catalog/product/view.phtml"> | |
<block type="catalog/product_view_super_config" name="product.info.config" as="super_config" template="catalog/product/view/super/config.phtml"/> | |
<block type="catalog/product_view_super_group" name="product.info.group" as="super_group" template="catalog/product/view/super/group.phtml"/> | |
<block type="catalog/product_list_upsell" name="product.info.upsell" as="upsell_products" template="catalog/product/list/upsell.phtml"/> | |
<block type="catalog/product_view_additional" name="product.info.additional" as="product_additional_data" /> | |
</block> | |
</reference> | |
<reference name="right"> | |
<block type="catalog/product_list_related" name="catalog.product.related" before="-" template="catalog/product/list/related.phtml"/> | |
</reference> | |
| |
</catalog_product_view> | |
<!−− | |
Product send to friend | |
−−> | |
<catalog_product_send> | |
<!−− Mage_Catalog −−> | |
<reference name="root"> | |
<action method="setTemplate"><template>page/2columns-right.phtml</template></action> | |
</reference> | |
<reference name="head"> | |
<action method="addJs"><script>varien/product.js</script></action> | |
</reference> | |
<reference name="content"> | |
<block type="catalog/product_send" name="product.send" template="catalog/product/send.phtml"> | |
</block> | |
</reference> | |
</catalog_product_send> | |
| |
<!−− | |
Product additional images gallery popup | |
−−> | |
| |
<catalog_product_gallery> | |
<!−− Mage_Catalog −−> | |
<reference name="root"> | |
<action method="setTemplate"><template>page/one-column.phtml</template></action> | |
</reference> | |
<reference name="content"> | |
<block type="catalog/product_gallery" name="catalog_product_gallery" template="catalog/product/gallery.phtml"/> | |
</reference> | |
</catalog_product_gallery> | |
| |
<!−− | |
Site Map block | |
−−> | |
<catalog_seo_sitemap_category> | |
<reference name="root"> | |
<action method="setTemplate"><template>page/1column.phtml</template></action> | |
</reference> | |
<reference name="content"> | |
<block type="catalog/seo_sitemap_container" name="seo.container" template="catalog/seo/sitemap/container.phtml"/> | |
</reference> | |
</catalog_seo_sitemap_category> | |
<catalog_seo_sitemap_product> | |
<reference name="root"> | |
<action method="setTemplate"><template>page/1column.phtml</template></action> | |
</reference> | |
<reference name="content"> | |
<block type="catalog/seo_sitemap_container" name="seo.container" template="catalog/seo/sitemap/container.phtml"/> | |
</reference> | |
</catalog_seo_sitemap_product> | |
<!−− | |
Catalog search terms block | |
−−> | |
<catalog_seo_searchterm_popular> | |
<reference name="root"> | |
<action method="setTemplate"><template>page/1column.phtml</template></action> | |
</reference> | |
<reference name="content"> | |
<block type="catalog/seo_searchterm" name="seo.searchterm" template="catalog/seo/searchterm.phtml"/> | |
</reference> | |
</catalog_seo_searchterm_popular> | |
| |
</layout> |
Ok, I know I'm blonde and it doesn't take a lot to confuse my poor cell, but bloody hell I normally at least have a chance of grasping stuff within a reasonable time frame ........ seven hours later my wall is starting to take on the shape of my forehead but at least I finally managed to move the sidebar from the right side to the left side .... I'm a genius
....... faaaaaaaaaantastic, now all I need to be able to do is move every component to the location of my choice and code up all the extra modules that we require for the proposed template .... suddenly Everest looks like a small rock.
Several days later and I'm a smidge more au fait, or whatever that flash french saying is for "got slightly to grips with", with their templating system, and I've managed to satisfy myself that I can at least achieve our requirements within my lifetime, and I've begun making all the changes that we need.
It didn't take me long to get bored with all the files and folders required for a bloody skin, so instead of altering their files I decided to make a single folder for all my changed files to live in. Compared to their god knows how many, I'm currently floating around the half-dozen mark, mind you, there's a long way to go yet but I should hopefully keep the total to way less than half of theirs, and the framework of the skin is finally coming together ..... which will cheer Dexter up, as he's raring to go with the new shop as soon as possible ![]()
Did I mention I think the skinning system is over complicated? Seriously over complicated. I really hope that the developers of the software do a 100% rethink about their skinning system. Not only is it FAR to complicated for the average joe to contemplate playing with, it *appears* to put a fair load on a server whilst it decodes all the files, there's several posts on their forums about it, I can't really tell as I'm playing with very little test data, but that'll change soon as we start adding more products for a dry run.
Despite all of the above I actually would, as long as you don't have a huge store and either have a masochistic outlook on life or you have enough money to pay somebody to skin it for you. The main things that impressed me about the software was that the default template has an XHTML Strict doc type and the admin area was better than all the others that I'd seen by a long way. Remeber that it's still in beta though, and not really recommended for a live site ![]()
Note : If you're even remotely considering asking us to do a Magento skin for you then our prices start at £2,000 .... or £20 a file, whichever is greater ![]()
¥
Posted on 5th Dec 2007 in : Techno Babble
Most people who know me will know my view of any/every version of Internet Explorer, hell most of them hold the same views. In fact, I'd imagine that pretty much every serious web developer out there would probably hold the same views. Internet Explorer is crap, and reminds us daily. Not only can it not understand the most basic HTML or CSS, but it usually can't even understand itself.
Today it hit a new level. I've been coding up a plugin for use on a clients site and, to improve the workflow, we decided to do some fancy shit with javascript seeing as the environment already required javascript to function. After a fair amount of thinking and tinkering I dived in and started coding away in a busy looking manner. After a fair amount of coding, quite a bit of which was spent beating my head against the wall with explorer and coding round it's *quirks* ... but that was expected .... I finally got the code behind the scenes done and started working on the GUI .... I wish I hadn't!
After finding some annoying little quirks ... like don't try leading/trailing whitespace in element title attributes ... ohhh and don't try and make it think to much whilst it's still trying to work out what HTML is .... I hit a deal killer. Internet Explorer couldn't add a radio button ( that worked ) via the DOM ...... a simple bloody radio button! .... if you want to try it yourself, copy paste the following code into notepad, save it as ie_is_crap.html and call it up in IE
Html:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-UK" lang="en-UK"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> | |
<title>Screen demo</title> | |
</head> | |
<body> | |
<script type="text/javascript"> | |
// create an element | |
function amCreateElement( elementType, elementAttributes ) | |
{ | |
// create an element of the required type | |
var theElement = document.createElement( elementType ); | |
| |
if( elementAttributes ) | |
{ // we have attributes for this element | |
var allAttributes = elementAttributes.split( '" ' ); | |
var numAttributes = allAttributes.length; | |
for( i = 0; i < numAttributes; i++ ) | |
{ // step though all elements | |
attributeName = allAttributes[i].slice( 0,allAttributes[i].indexOf( '=' ) ); | |
attributeValue = allAttributes[i].slice( attributeName.length + 2 ); | |
// the last attibute will still have trailing " | |
if( attributeValue.charAt( attributeValue.length - 1) == '"' ) attributeValue = attributeValue.slice( 0, -1 ); | |
// check for onclick et al | |
if( attributeName.slice( 0, 2 ) == 'on' ) | |
{// bugger now we need to play with explorer | |
if ( window.attachEvent ) | |
eval('theElement.attachEvent( attributeName, function(x){ '+attributeValue+' } );' )// IE | |
else | |
theElement.setAttribute( attributeName, attributeValue ); | |
} | |
else | |
{ // rest of attributes | |
if( attributeName == 'class' ) | |
{ // yet another piece of explorer crap | |
theElement.className = attributeValue; | |
} | |
else | |
{ // note : in iE everything else but style will work | |
theElement.setAttribute( attributeName, attributeValue, 0 ); | |
} | |
} | |
} | |
} | |
// return the element we just built | |
return theElement; | |
} | |
| |
theInput = amCreateElement( 'input', 'name="test" type="radio"' ); | |
document.body.appendChild( theInput ); | |
| |
| |
theInput = amCreateElement( 'input', 'name="test" type="radio"' ); | |
document.body.appendChild( theInput ); | |
| |
| |
</script> | |
</body> | |
</html> |
Great huh? I won't begin to tell you how many hours I spent narrowing it down to just that. So, this problem leaves us royally screwed, if I can't solve it then we have to revert back to a crap work flow and undo 3 days worth of my time ..... I am not a happy bunny ....... as a last resort I hit google, and for once I was impressed, it's first result leads to this post ( Problem with RADIO (created by DOM) in Internet Explorer ) on a forum, and more importantly, the answer
.......... notice the date of the post, July 2005.
Basically it comes down to the fact that IE wouldn't allow you to add a name attribute to an element created through the DOM, because nobody would ever want to create a form object huh? The bit that really pisses me off is that their new *flagship* and *compatible* browser IE7 is just as fucked up, so web developers world wide will still have to waste hours overcoming IE's various quirks and failures ......... I dread to think of the number of hours a day that amounts to.
Thanks to the answer given by Martin Honnen, and the microdoft page that he linked to, I managed to get radio buttons working ..... hooray only 4 bloody hours wasted huh Mr Grates
for any of you that are interested, just add the snippet below into the code you saved from above and rerun the page ![]()
Html:
if( window.attachEvent && elementAttributes && elementAttributes.indexOf( 'type="radio"' ) > -1 ) | |
{ // you REALLY have to hate IE :| | |
return document.createElement('<input '+elementAttributes+'></input>' ); | |
} |
As you can imagine, with not being a happy bunny, I had to share my problem with Scott ...... the conversation went a tad like this :
tuxnus: it's ie6 ... it's high time to start penalizing them
yabba_hh: how the fuck do you penalise someone who's using IE6 ? they're ALREADY fucked
tuxnus: make it obvious to them
tuxnus: most haven't a clue
yabba_hh: if they haven't noticed just from using ie then even a big red banner with flashing gif saying "Yer browsers fucked" wouldn't work
tuxnus: trouble is, most have nothing to compare it to
tuxnus: they think what they see, is what everyone sees
yabba_hh: there's probably a fair amount of truth in that
So ...... for all you IE users out that there that haven't a clue what we're on about, go install an alternative browser like Firefox or Opera ( google them huh ), and then go wander around the web and see what it *really* looks like. Not only will you have a better experience, and be safer because you're not using a browser that has more security flaws than MI5's headquarters, you'll also be helping web developers world wide save production time by not having to code out IE's ineptitudes.
Anyway, it's time I went and finished the GUI
¥
Posted on 11th Oct 2007 in : Techno Babble
We get lots of forum posts asking how to get multi-domain and multi-subdomain single evo installs working on a linux box, and I'm still baffled why people find it so hard ( especially if a blonde like me can achieve it huh? ), but I was running a trick windows install and had never tried on linux ......... until now, so I thought I'd document how I did it.....
Posted on 10th Oct 2007 in : Techno Babble, Skins, b2evo 2.0
As you may have noticed, my tacky palace has just had the decorators in. What you probably haven't noticed is that it's now wrapped around b2evolution 2.0.2.alpha|summat .... how cool is that? ..... well, a tad cooler, now it's also running on a linux box as well, so no more windows hacks for clean urls. Of course this means I now have a few plugins that need tweaking and some other bits and bobs like my contact form, but what the hell, life could be far less interesting ![]()
¥
Page archived : 11th Nov 2009