Only fill this in if you're a spammer huh? Your name :
Your email :
Your message :
Mar
20th
2008

Playing with a blogrum

Posted in : Techno Babble, Skins, Hacks, Plugins & Widgets

Convincing Evo that it's a forum

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 ;)

¥

Tags: blogrum
7998 views and only
Latest Gallery : The end of June and it's chilli ;)
  • Couple more lemon drops
  • Thai Dragon
  • Untitled image
  • Untitled image
  • Untitled image
  • Untitled image
  • Untitled image
  • Untitled image
Feb
24th
2008

Magento anybody?

Posted in : Techno Babble

Add dash of XML....

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.

Did I mention XML yet?

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

<?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>

++?????++ Out of Cheese Error. Redo From Start.

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 :D :| ....... 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.

How to prune a skin

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.

Would *I* recommend Magento?

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 :|

¥

16543 views and only
Feb
10th
2008

Are you a skiddie?

Posted in : Spam Trap

Skiddie : I've tried all the DLL exploits possible and I still haven't r00t3d this box

SpamHound :It's a linux box you dumb arse. Your IP has been banned for stupidity

Ctrl+C + Ctrl+V does not make you a programmer

The chances are that if you're a skiddie then instead of seeing this you're seeing a page that reads something like "Forbidden : SpamHound has detected your IP as belonging to a spammer. Your IP address has been blocked from all SpamHound protected sites until ##/##/####". Don't take it to personally as the SpamHound doesn't really think you're a dumb arse Spammer, it realises that you're an even dumber skiddie that's been looking for exploits on the server, it just treats all IQs below 1 in the same way.

The good news is that the skiddies prompted me to do some more work on the SpamHound to include checks for these dumb arses, and whilst I was tempted to link all such requests to a virus or just redirect them to 127.0.0.1, in the end I decided to just ban them, which is a lot less fun but they're not even worth playing with. The recode not only added the ability to detect the lower IQs on the web but also reintroduced the ability to network multiple servers/domains so that they can share the same information, you hit one you get your sorry arse banned from them all.

At this moment in time the new version of the Hound only protects this server, although it's due to be rolled out to another few servers in the very near future, once we've done some multi-server testing and gained a few more stats 'n' stuff. Then I'm going to be working on a public version of the Hound, it won't be half as ferocious as our own but it should help cut down on the bandwidth and cpu that gets wasted on spammers and skiddies on a daily basis and I'll probably tie it in with a b2evolution plugin that will allow you to ban IP addresses direct from your admin pages. We already have a working version of the plugin so it won't take much to make it a publicly available release, assuming anybody's interested in it

So far the various versions of the Hound have stopped over half a million spam/skiddie attempts, not bad for a bunch of code huh? I'd be able to give you the exact figures but I had a blonde moment when coding the log analyser and accidentally wiped the logs for the last couple of months :roll: ahh well, they'll soon build up again as these arses really don't understand "403 : Your shit is forbidden". It'll be interesting to watch that figure soar as the new version is rolled out.

Anyway I suppose it's time I went and did some more testing so it can be unleashed on our network
¥

16390 views and only
Jan
31st
2008

Life

Posted in : Silly O'clock quotes

Life is a delusion .... hell, most Americans think they speak English

13293 views and only
Jan
15th
2008

Testing

Posted in : Babble

This is a test post so don't get excited ;)

¥

9729 views and only
Jan
3rd
2008

Playing with an RSS reader

Posted in : Plugins & Widgets

SimplePie gets widgetised

After being nudged by Danny about an RSS reader I started a fair while back and never finished, mainly because I didn't have a use for it, I felt obliged to create an RSS Reader widget .... mainly to stop him nagging my arse off ;). Fortunately I'd come across an RSS Reader class a tad ago called SimplePie which would make the task a LOT easier, although it took a bit of pissing about to get it working the way I wanted. If you want to skip all the usual babble you can download the current version of the plugin here ( AM RSS Reader ), it does come with some system requirements which can be found on SimplePies System requirements page.

Installation and usage

Installing is the same as every other widget, download the file, unzip it, upload the am_rss_reader_plugin folder to your blogs folder. Meander over to admin > global settings > plugin install > install new plugin ( damn that's a hell of a path ), click the install link for the plugin. Now wander over to your skins widgets and click add new widget for whatever skin container you want it in. On the widgets settings page choose a custom title for the feed, the maximum number of items you want to display and slap in the feeds url ( note to self : validate the feed url ). If you feel brave you can play with the items html ( see the readme for replacement values ), the chances are that you won't need to change it. Once you have all your settings done, hit save. That's it, you now have the feed in your skin wherever your container is.

So, what can it do?

The short answer is "quite a bit actually", the long answer is that it has a bunch of settings which it utilises in a magic ceremony that results in the RSS feed being spat out, wherever you placed the widget, in a totally customised way. This magic is carried out by unemployed elves who are desperate for work now that christmas is over. So not only will you have a really cool widget, you'll also be helping save the elves, now is that cool or what? Of course this means that the widget stops working around the beginning of december for a few weeks but such is life ;) Rather than repeat all of the settings, what they do, why and how I actually made a readme ( yeah I know, me write a readme, whatever is the world coming to? )

Semi-technical stuff

Due to the fact that I dislike having folder permissions set to "let the world rape me", which is unavoidable on some shared hosting, I decided not to use SimplePies caching system, which uses files, and instead the results are cached in the database. You can set the cache duration to absolutely anything you like, the default is 60 minutes. At the moment I've only enabled the simplest of the SimplePies abilities, ( ie/ you can get post author, content, url, date, title ), but if anybody really wants some of the other functionality that's available with the class then just holler, it's not that difficult to incorporate them.

As always this is a pre-release version, although it's been tested in most 2.x flavours, so if it breaks let me know .... if it doesn't break then it'll be released as soon as I come up with a post that doesn't involve elves ;)

¥

*edit* You can now see the widget in action on my Feeds I read page.

10593 views and only

<< 1 ... 6 7 8 9 10 11 12 13 14 15 16 ... 38 >>

 
 
 

X