Only fill this in if you're a spammer huh? Your name :
Your email :
Your message :
Jul
13th
2009

Custom Admin Pages

Posted in : Techno Babble

Add your tabs today!

Unlike most of our other plugins this one does bugger all by itself, it's only reason for existence is to be used by other plugins and at the moment the only plugin that uses it is one that we're currently developing. So, what does it do? What this plugin does is allow your own plugins to easily add their own custom tabs to the admin area. Now, before any of yah point out that plugins already have the ability to easily add their own tab to the tools tab, I know, but this plugin allows you to add tabs to any of the evo tab pages ;)

How it works

There's a couple of rules that your plugin has to play by to make all this work. The first and most obvious one is that it needs to declare this plugin as a dependency to ensure that it's always installed when you need it. You tell evo about dependencies by adding the following code snippet to your plugin.

	/**
	 * This plugin requires the AM Admin Pages plugin
	 *
	 * @return array dependencies
	 */
	function GetDependencies()
	{
		return array( 'requires' => array(
			'plugins' => array( array( 'am_adminpages_plugin', 1 ) ), // requires at least version 1 of the plugin
			));
	}

Next you need to create a shiny new method in your plugin called GetAdminTabs() which should return an array of all tabs that you wish to add your tabs to, and the tabs that you wish to add ... it's probably simpler to just show you some code ;)

	/**
	 * Add our tabs to the admin tabs
	 *
	 * @param array $params
	 *	string 'main_tab' : This is the main b2evo tab that is currently being displayed
	 * @return array : our tabs
	 */
	function GetAdminTabs($params)
	{
		global $admin_url, $blog, $current_User, $user_ID;
		global $AdminUI;

		$admin_tabs = false;

		switch( $params['main_tab'] )
		{
			case 'dashboard' :
			case 'blog_settings' :
				global $blog;
				$bCache = get_Cache( 'BlogCache' );
				if( $blog && $sBlog = $bCache->get_by_ID($blog ) )
				{
					$shop_ID = $sBlog->owner_user_ID;
				}
				break;

			case 'users' :
				$shop_ID = param( 'user_ID', 'integer' );
				break;
		}

		if( empty( $shop_ID ) )
		{
			$shop_ID = 0;
		}

		switch( $params['main_tab'] )
		{
/* start snippet */
			case 'blog_settings' :
				if( $this->ShopSettings->get('enabled', $shop_ID ) || $current_User->check_perm('blog_properties', 'edit', false, $blog ) )
				{
					$admin_tabs = array(
						'blogs' => array(
							'amsc_settings' => array(
								'text' => $this->T_('Shop Settings' ),
								'href' => url_add_param( $admin_url, 'ctrl=coll_settings&blog='.$blog.'&amat_tab=amsc_settings' ),
							),
						),
					);
				}
				break;
/* end snippet */
		}
		return $admin_tabs;
	}

The important thing to note in that code is the bit of the href which reads 'amat_tab=amsc_settings', this is the parameter that's used to tell our plugin which one of your custom pages you want to display, and it must have a corresponding function with the following naming convention function AdminTabPayload_your_unique_tab_value(). In the above example the corresponding function would be called AdminTabPayload_amsc_settings(), the following is our code for that function :

	/**
	 * Display our settings
	 *
	 * @param array $params
	 *	string 'main_tab' : This is the main b2evo tab that is currently being displayed
	 */
	function AdminTabPayload_amsc_settings($params)
	{
		global $AdminUI;

		switch( $ctrl = param('ctrl', 'string' ) )
		{
			case 'dashboard' :
			case 'coll_settings' :
				global $blog;
				$bCache = get_Cache( 'BlogCache' );
				if( $blog && $sBlog = $bCache->get_by_ID($blog ) )
				{
					$shop_ID = $sBlog->owner_user_ID;
				}
				break;

			case 'users' :
				$shop_ID = param( 'user_ID', 'integer' );
				break;
		}

		if( empty( $shop_ID ) )
		{
			$shop_ID = 0;
		}

		$edited_settings = $this->ShopSettings;
		$edited_settings->ID = $shop_ID;
		global $Blog;
		amsc_load_disp( 'shopsettings' );
	}

The final thing you need to do is to inform evo of your shiny new abilities :

  /**
   * List of events that we handle
   *
   * @return array : events
   */
	function GetExtraEvents()
	{
		return array(
			'GetAdminTabs' => 'Adds all our required tabs',
			'AdminTabPayload_amsc_settings' => 'Displays our settings',
			'AdminTabPayload_amsc_info' => 'Displays our info',
			'AdminTabPayload_amsc_customers' => 'Displays our customers',
			'AdminTabPayload_amsc_invoices' => 'Displays our invoices',
		);
	}

To make life a tad easier I've also coded a demo plugin that uses this plugin so you can (hopefully) see how it all works.

Anyway, enough blather from me, you can download the plugin here am_adminpages_plugin.zip and the demo plugin from here am_adminpagesdemo_plugin.zip
¥

7830 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
Jul
11th
2009

Chicken Poppers

Posted in : Home made

This is why I grow food

This meal was inspired by the popper thread on the chillisgalore forums ( @chilliesgalore.co.uk : popper thread ). I'd like to thank Davetaylor for posting it :D

I've had to wait ages to try this recipe since I first saw it on the chillisgalore forums, and I mean ages! As with all good meals it started with a compromise, the problem was that I didn't have any chillis that were big enough to stuff so I had to use a pepper instead and add chilli to the stuffing. Other than that I pretty much followed the original recipe.

Ingredients

The Chicken Poppers

  • Chicken ... obviously
  • Bacon
  • Ham
  • BBQ Sauce
  • Soft cheese ... we used philly
  • Strong cheese ... we used mature cheddar
  • Black peppercorns .. crushed
  • Basil ( purple )
  • Garlic ( Thermidore )
  • Onion leaves ( Paris Silverskin ) ... I had loads left after pickling the bulbs ;)
  • Coriander ( Leisure )
  • Sweet Pepper ( N.Napia ) ... you'd normally use chilli here
  • Chilli ( Pretty in Purple ) ... these are a smidge to small to stuff ;)

The rest

  • Cabbage ( Greyhound )
  • Broccoli ( Quick heading callabrese )
  • Onion leaves ( Paris Silverskin ) .... told you we had loads left .... we're thinking of freezing them :p
  • Garlic ( Thermidore )
  • Broad Beans ( Aquadulce )
  • Sugar snaps ( cunningly named Sugar Snaps )
  • Courgette ( Verde di Milano )
  • I forgot to use the tomato, so technically it's not an ingredient :P

Lets make poppers

  1. First of all we'll make the filling by chopping the ham, chillis, onion, garlic, basil and coriander up and then throwing it all into a bowl with the soft cheese and the peppercorns. Give it a good old stir until it's all mixed together.
  2. The mixture should then be dolloped into chillies that have been cut in half lengthways and de-seeded but I didn't have any chillis big enough so I used sweet peppers instead. Pop a few thin slices of the strong cheese on top of the stuffed peppers and then wrap them in strips of chicken and then wrap the wrapped poppers in bacon as well ... smoked bacon worked for us
  3. Finally, baste the whole lot with BBQ sauce and throw them onto a baking tray.
  4. Turn the oven on and set it to gas mark 5 ... assuming you have gas, if not then there's always googy converter ... anyway, turn the oven on and then go grab a beer whilst you wait for it to pre-heat
  5. Once the oven's hot enough slap the tray of poppers in and leave it there for about 20 minutes.
  6. Whilst you're waiting chop up all the other ingredients to a size that suits you.
  7. Once the 20 minutes are up whip the tray out of the oven ( and turn the oven off huh? ) and put it on one side for a few minutes to rest
  8. In the meantime bang a wok on the cooker over a high heat and throw a generous dollop of olive oil in.
  9. Once the oil's fairly hot, but not smoking, throw in the cabbage, broad beans, courgette, garlic and broccoli and stir them round in an energetic way.
  10. Keep that up for a couple of minutes and then add the sugar snaps and onions and use another minutes worth of energy
  11. Finally, throw the poppers on one side of a plate and the veg on the other side and drizzle the juice from the poppers over everything in sight
  12. Eat

You can find a few more images in the gallery
¥

15422 views and only
Jul
7th
2009

Ayam Kebun ( garden chicken )

Posted in : Home made

Now I just need some chickens

I can't begin to describe the feeling you get when you can grab a load of veg that you've grown yourself, slap it in a pan with a few other bits and bobs and then sit down and eat it, all in a matter of hours after the veg was in the ground/on a plant. If you haven't experienced it yourself then I heartily recommend that you do. Anyway, this weekend I brought some veggies home from the field and I was in the mood for a curry so I decided to throw one together.

Ayam Kebun

Feeds as many people as you throw ingredients in for :|

Ingredients

Home grown :D

  • Fresh chillis : Pretty In Purple
  • Radish : Cherry Belle
  • Spinach Beet : Perpetual Spinach
  • Garlic : Thermidrome
  • Onion : Red Baron
  • Potato : Pentland Javelin
  • Broad Beans : Aqualduce
  • Courgette : Verde Di Milano
  • Broccoli : Quick Heading Calabrese

Bought stuff :(

  • Chicken : we used chicken breasts because that's what we had
  • Root ginger
  • Tinned chopped tomatoes
  • Spices :
    • Coriander : Need to spark some more off!
    • Cummin
    • Garam Masala
    • Tumeric
    • Mustard seeds
    • Salt
    • Black Pepper

Preparation

Feel free to adapt this workflow to suit your own needs, but this is what I did :

  1. Chop one of the innocent looking minute chillis in half and, wisely, decide to scrape out the seeds.
  2. Cut a slither off one half of the chilli and eat it.
  3. Wait a few seconds and then run round the kitchen with your eyeballs sweating and your hand wafting your mouth whilst reciting "fuff me thass fuffin' hot"
  4. Gain a whole new respect for a chilli that's smaller than a 5 pence piece and decide to only use four of the bigger ones in the curry :D
  5. Top and tail the radish, saving the leaves, and then cut into rough quarters, or what ever size rocks your boat
  6. Peel and roughly chop the onion and garlic and ginger, how rough is your own decision
  7. If you're using the head of broccoli/calabrese then you'll probably want to break it down to spears
  8. Roughly chop the radish and spinnach leaves
  9. Chop the potatoes and courgettes up into chunks, how big is down to the size of your mouth.
  10. Shell the broad beans
  11. Take the lid off the tin of tomatoes
  12. Chop the chicken into chunks

On with the cooking!

  1. Heat a small pan on the cooker until the base is pretty hot, remove from heat and throw all of the spices in so that they get mildly roasted, which will take bugger all time, and then crush them down with a pestle and mortar ... or use some fancy electronic toy if you're that way inclined
  2. Throw the chicken, onions, garlic, ginger, salt, pepper, chillis and spices into a bowl and mix them all around until the chicken is well coated.
  3. Put some water into the pan that you used for the spices, add the spuds and then slap it back on the cooker and boil away until the spuds are just starting to soften ... ie/ really firm when you push a fork in but without needing the biceps of a female russian weightlifter
  4. Drain the spuds and save the water
  5. Get a pan that's big enough for all the stuff you're about to cook and slap it on a high heat with a bloody generous dollop of olive oil or ghee ... if you remember that you've got ghee before you throw the olive oil in :roll:
  6. Once the oils nice and hot, without burning the house down, throw in the chicken mixture and get a nice bit of colour on it, then take it out and put it on a plate for a tad.
  7. Reduce the heat to something a tad more bearable, add some more olive oil and then cook the courgettes and the spuds until they have some colour as well.
  8. Whack the heat back up high and throw the chicken back in and give everything a good stir until it's mixed together
  9. When you can hear everything start to sizzle, throw the radish, broad beans, radish leaves, spinnach leaves and broccoli on top and then pour over the tin of tomatoes and turn the heat down to a low simmer
  10. Don't stir the pan until you're just about to serve, it'll really keep the colour in all the veg ;)
  11. Whilst that's cooking away nicely, throw some rice in the pan that had the spices, and then the spuds, in it and cover with twice the depth of water as rice, that'd be the spud water that you saved before.
  12. About 15 minutes before you decide the chicken will be ready, put the rice on the heat and bring it to the boil. Give it a quick stir and then put a good fitting lid on it and turn the heat off.
  13. Wait ten minutes and then turn the rice out onto plates, one per person is a nice touch
  14. Turn the heat off the curry and give it a good stir and then slap it on the plates with the rice, I'm really crap at the artistic plate stuff.
  15. At this point I put a dollop of last years cucumber and apple chutney on each plate as well.
  16. Eat
5000 views and only
Jun
6th
2009

E-commerce plugin?

Posted in : Techno Babble

Where the hell do you start?

I've recently found myself in the position where a client has offered to drop ship for me, partly to give me greater freedom of layout/content/style than they'd be happy to risk on their own domain and partly to see if I could come up with some form of drop shipping "template" that could then be rolled out to a wider audience ... either way they're to cheap to pay me the development hours ;) ... So, now I have a conundrum, do I attempt to bend an existing shopping cart to work ( and look ) the way I want it, or do I try and bend b2evo into being an e-commerce solution?

Each has it's own advantages, using off the shelf e-commerce software means that it already does all the tedious stuff required for a shopping cart to function, but I'd spend god knows how many man hours learning the system, and especially the code, before I could begin to use it for a drop shipping site. On the other hand, I'm not to shabby with the evo code base so I'd be able to crack on and add all the custom stuff required to make this all work ... within my lifetime. The downside of using b2evo is that it's not exactly geared up to be an e-commerce solution out of the box.

Decisions, decisions

I guess it all comes down to "which is the better use of my time?", currently my thoughts are "use an e-commerce package and face the 'now make it available to a wider audience' bridge when I get there", by then the chances are that I'd have a much deeper knowledge of the chosen packages code base and in the meantime I could make a few quid ... but ... there's always a "but" huh? ... *if* I went the evo route then I'd save myself a load of learning and, if I needed to, I could change the core in cvs to add any hooks 'n' stuff that would make my life easier long term.

So ... hands up if you think I should go the evo route

¥

7144 views and only
May
18th
2009

Do you sell Pond Pumps?

Posted in : Pond Pumps

Note : I don't sell pond pumps! If you're looking for a pond pump then visit the Pond Pumps section of my mates online aquatics shop ;).

I don't

It's been a fair tad since I last bothered playing with google for pond pumps, but I'm somehow on the second page of google for the search term, and I get a fair bit of traffic from pond related searches, and all because Barry said a blog would never get to the top ... then he made me promise to stop trying because I was getting a smidge to close for comfort ;)

Anyway, this post is nothing about getting to the top of google for

Pond Pumps

because that'd be childish, I mean, he admitted defeat when I got close ... and I'm waaaaaay to old to be childish .... right? :roll:

He'll kill me if I get to number one ... hmmm, I wonder if his lawyers could successfully claim it was suicide and not murder?

¥

13323 views and only
May
5th
2009

May Bank Holiday

Posted in : 2009 Season

Our Lil plot in the corner

No surprise that it rained

Once again I'm starting a post off with "been a tad since I last posted". It's not because I have nothing to say, it's because I've had bugger all time spare to make a post :p Ideally I'll find the time to create a gallery concept/skin that works, and then I can just upload all the pictures I take on a daily/weekly basis to show how things are coming along .... don't hold your breath though, I've not had the time/inclination to do any coding for many a month now :(

Anyway, back to happier thoughts/times ... we're already at the point where the plot is starting to provide ingredients for our meals, it may only be radish and the occasional lettuce, ohhh and a few herbs, ohhh and some spring greens ... but it's only May, and the season's only just starting to kick in. Most of the beds are now full of stuff, I've one more bed in the large greenhouse that will soon be filled with sweetcorn ( true gold ), squashes ( butternut & courgette ), and the odd runner bean and borlotti beans ( about 10' row of each ) which will keep the broad beans, pak choi and beetroot company. Our own little greenhouse, that's recently had a bloody good spring clean and is looking good as new, has been press ganged into holding some of the less robust seedlings, mainly the sweetcorn and the runner beans, because the small greenhouse is starting to get a smidge full of dahlias.

Asparagus for 2013!

After spending a bored afternoon, on one of the sunny days, rearranging the piles of bricks that sit on the concrete base, beside our lil greenhouse, I managed to not only find a space for our water butt, I also managed to sneak in a 11'x4' raised bed. Mind you, when Barry noticed his only comment was "why didn't you just dig a bed in the field, it would've been far easier! .... so, being ever the opportunist I mentioned the fact that I was contemplating the possibility of slapping in 4 more 15'x4' beds in the field ( "but only if I cope with the space I have this year, because you'll want that back next year" ) ... god loves a trier and all that huh? ... and I'm living proof because, not only did Barry go "sure, no problem", he followed it with "you may have the same space next year ... if not more" ... damn, how cool would that be? :D At the same time he mentioned that the space I'd slapped the raised bed on was where he was considering building a shed to house our lawn mower(s) ... ooops ... the good news is, it won't be this year.

So, I decided to use the new bed to raise some Asparagus seedlings, after checking that I had enough time to plant seeds this year, as it's faaaaaaaaaaaaaar to late ( and bloody expensive! ) to buy 1 year crowns for this season. Apart from saving me a fortune ( £2.05 compared to £20+ huh ) it'll also allow me to select the best 20 male plants that grow ( males produce more spears than females ) and I won't have to "wait the extra year" that you normally do by growing from seed because I wouldn't be able to buy 1 year old crowns until next year. The bad news is, I have very little time to get the seed ordered and finish prepping the bed up.

The decapitated tomatoes

I'm a plant doctor!

I can't remember if I mentioned in my last post, but a couple of weeks ago I went round to my dads and he had some very leggy tomato plants that were crammed together in little 3" pots, the good ones were just about able to support their own weight, so I offered to take them away to see if I could improve them as I had better growing conditions and far more time than they did ... So, off I meandered to the potting shed with them. I decided that I could definitely save 4 of them by slapping them into 12" pots and burying them as deep as I could, the others were pretty much buggered, and that's when the experiment I ran earlier this year paid off. One of the things I'd done with the worst of my plants was to decide "bugger it, they'll die anyway", so I cut the tops off and rooted them .... and it mostly worked ... So, I did the same with Sue's tomatoes.

As you can imagine, decapitation isn't something that a plant enjoys to much and they spent quite a bit of time looking pretty dead. I'd slapped them under the misters in the potting shed so they'd at least get some water through their leaves, after that it was a race to see if they'd grow new roots in time to stop them dying. One week on and not only had the plants recovered but they'd also started to put on some new growth! Meanwhile the ones that I'd slapped into tall pots had decided that they weren't going to be out done and have promptly produced their first set of fruit! Damn, here's me growing my own tomatoes in as close to ideal conditions as I can provide and they're beaten to the fruiting stage by a bunch of gangly plants ... I may never live this down :(

The ex-coal shed

By a lucky coincidence I managed to get some free time, some sunshine and a sledgehammer, all at the same time. A tad of grunting later and I'd dropped both our side and our neighbours side of the coal shed, I even managed to leave the dividing wall intact! Unfortunately since then it's pissed it down every time I've had some free time so I haven't been able to clear up all the rubble and take it to the tip. In true frugal fashion I'm going to be reusing any bricks that I can salvage to build a raised bed along the back of next doors garage. Eventually this will be converted into a kind of 9' x 3' greenhouse / cold frame, but first I have to wait until the strawberries have stopped fruiting as I'll need to dig them up before I can start. Once the bed is built I'll then be able to sort out the tuft of grass that we lovingly call a lawn.

¥

The end of April

Click a thumbnail to view the picture

  • The large greenhouse
  • Beetroot ( probno )
  • Pak Choi ( saved seed )
  • Broad Beans ( Super Aqualduce )
  • Onions ( various )
  • Leeks ( Bleau De Solaise )
  • Brassicas ( various )
  • Peas ( Kelvedon Wonder & Sugar Snap )
  • Chilli Pepper ( Pretty in Purple )
  • Chilli Peppers ( Pretty in Purple )
  • Our Lil plot in the corner
  • The coal shed ( before )
  • The coal bunker ( after )
  • The Mighty V mows the lawn
May Bank Holiday

Click a thumbnail to view the picture

  • Large Greenhous ( Dahlia bed )
  • Large Greenhouse ( Dahlia Beds )
  • Our lil plot in the corner
  • Small greenhouse
  • Tomatoes ( various )
  • Small greenhouse
  • Chilli Peppers ( various )
  • Chilli Peppers ( various )
  • Chilli Peppers ( N.Napia )
  • Chilli Peppers ( Pretty in Purple )
  • 3 sisters in minature
  • Runner Beans ( Cherokee Trail of tears )
  • Corriander ( lemon )
  • Pak Choi ( saved seed )
  • Broad beans ( Super Aqualduce )
  • Onions ( various )
  • Leeks ( Bleu De Solaise )
  • Brassicas ( various )
  • Peas ( Sugar Snaps & Kelvedon Wonder )
  • The decapitated tomato plants
  • The first Tomato
27339 views and only

<< 1 2 3 4 5 6 7 8 9 10 11 ... 38 >>

 
 
 

X