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

Archives for: July 2009

Jul
24th
2009

Wordpress

Posted in : Silly O'clock quotes

If this is poetry, it's crap

yabba_hh: heh, I just dislike playing with wp :P
yabba_hh: having said that, I really should learn wp core, I could make a bloody fortune
tuxnus: maybe I'll switch themes and see what happens
tuxnus: yep @ core
yabba_hh: it really is fugly though ... feels like waking up next to a fat chick with the hangover of your life :|

¥

11021 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
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
¥

7980 views and only
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
¥

15907 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
5200 views and only
 
 
 

X