Moved to: WoodyHayday.com
Woody Hayday

Fresh Ideas

Hi there! This is my old blog, I don't hang around here much.
You can now find me trying to mix things up here:
Visit WoodyHayday.com Subscribe To My Email List

Dreamweaver .Ste into Adobe Dreamweaver CS4

I have never personally used .ste files or indeed template (.dwt) files within dreamweaver, I never liked the system personally – but pulling .Ste and .dwt files into CS4 is as easy as any old version, you have got to hand it to Adobe, they keep true to old versions (dreamweaver got to 10 before even moving to CS.) – Arguably little has actually changed in the last 10 versions of Dreamweaver, except it does look prettier these days.

Anyway its straitforward to get a dreamweaver .ste into dreamweaver cs4 (or a .dwt) from any old version.

  1. Load Dreamweaver CS4
  2. Go to Assets
  3. Go to Site Manager
  4. Click Import
  5. Find your .Ste File
  6. Set the root of this folder to be the same as the original .Ste
  7. Your done!

What do you use dreamweaver for anyway?

Posted in Web Development

ReSeed Identity column – TSQL

Randomly I didn’t remember the code to reseed the identity column in tsql, this works though on ms sql 2008 – DBCC CHECKIDENT (tbl_crazyTableName, RESEED, 20000)

TSQL
Posted in SQL Server, Transactional SQL

ASP/PHP Network Share browsing between Servers on IIS

Its always the simple things that take longer than expected, if you are trying to access a network share, say \\server1\netshare$ from some code on your webserver (say \\server2) – you would think this would be simple? If your on IIS you would be wrong, kind of. I think if you are on Apache this wouldn’t be such a big deal, its more to do with the stupid setup of IIS6 (may also be fixed in IIS7 – havent tried) and how it deals with user based access, networking and permissions. It was probably set up to give flexibility but its less than transparent. You cannot add permissions to a folder on another server for a local user (again we are talking Windows Server 2003, IIS6), so at first it would seem that you need to either need to make a shared domain account and add the permissions for that, switching out the IUSR account on the webserver, but in fact this doesn’t even work. You could of course use impersonation if you are talking about aspx but that was overkill in this situation.

After a ton of messing about and a load of messy permissions trials I happened across the solution:

In short the easiest way to access \\server1\netshare$ from a piece of code on \\server2 (without giving administrator rights, creating specific domain users, etc.) is to find the IUSR account details on \\server2 (your webserver) and then create a user on \\server1 with these exact credentials. Having both boxes with these local permissions then allows you to assign this local user on the netshare server the permissions you want on its local folder structure, and curiously lets the webserver login locally.

Now this doesn’t, or rather shouldn’t work if you ask me, but it does. To get the IUSR password from the webserver you need to do a bit of a fudge, but once you are all set up this works. Great if you want to access network shares from a web server without compromising your network security!

Get your webserver’s IUSR Account username and IUSR Account password:

  • Right click my computer -> manage -> local users and groups -> users (this does not show up on domain controllers so wont work if your web server is also your dc)
  • You will have an account in here called IUSR_*SOMETHING* (if you are running iis) – this is what I was refering to as the IUSR account and what you will need to create an account as on the other server – you do this in the same place on that box.
  • Next you need to get the IUSR account password, which you can do by first going to C:\Inetpub\AdminScripts and opening adsutil.vbs in notepad, finding the line “isSecureProperty = True” – (this is within an if statement) and replacing true with false (this is temporary – you will want to change this back as soon as you have got the IUSR Password.)
  • Once you have altered your adsutil.vbs open up a command prompt (cmd) and type/copy the following and hit return:
  • C:\Inetpub\AdminScripts>cscript adsutil.vbs get w3svc/anonymoususerpass
  • You should be presented with something like
  • anonymoususerpass : (STRING) “**PASSWORDHERE**”
  • And there you have it – this is your IUSR Password, use this and the IUSR account name you got from above and create a local user on the server and you will be singing! Don’t forget to change isSecureProperty = False back though!
Posted in ASP.Net, PHP, Web Development

WikiMedia Spam – Lock Media Wiki Permissions down

Using Media Wiki (wikiMedia) somewhere online to manage content? chance’s are you’ve had unwelcome guests spamming you to high heavens. By default permissions on wiki media are, well wiki-level, they provide access to everyone – that’s the point of wiki right? But if you want a private wiki (Media Wiki suggests itself that its not the right solution for this) or a wikipedia which only some user’s can participate in then you have to add a few lines to your LocalSettings.php.

It’s better to do this on setup rather than wait for the spam bots, and without doubt there is different ways of doing this – but the following locked down media wiki in this instance just how I wanted it too.

$wgGroupPermissions[‘*’][‘edit’] = false;
$wgGroupPermissions[‘user’][‘edit’] = false;
$wgGroupPermissions[‘sysop’][‘edit’] = true;
$wgGroupPermissions[‘*’][‘createpage’] = false;
$wgGroupPermissions[‘user’][‘createpage’] = false;
$wgGroupPermissions[‘sysop’][‘createpage’] = true;

This does what it says on the tin, and leaves you free to carry on filling your own mini wikipedia up how you want. You can find full explanations/wikimedia security settings here.

Posted in Web Development, Wiki Media

ionCube on 1and1 shared hosting

…I needed to use ionCube for Auction 2 Post but it takes an odd combination of files to get it working so heres how to get ionCube loaders to work on 1 and 1 shared hosting (spoon fed):

1. Use getcwd to find the working directory (make a new .php file with two lines “echo getcwd().'<br />’;” and “phpinfo();”, ftp this to the root of your domain on 1and1 shared hosting and then navigate your browser to the url and leave this open in a tab/write it down)

2. Download Linux (x86) .zip archived ionCube loader files from here (http://www.ioncube.com/loaders.php)

3. Upload ionCube folder to the absolute root of your hosting (this is so you don’t have to maintain a copy per website later if you have multiple sites) – I called the folder ioncube

4. Open up notepad and add a line “zend_extension = /homepages/**/**********/htdocs/ioncube/ioncube_loader_lin_5.2.so” – where the **** will be letters/numbers you will be able to find these out from step 1 – save this as php.ini on your desktop or similar (unless you already have a php.ini for this website/subfolders of this website at which point you will want to make a copy of them and add this line then re-upload)

5. Upload php.ini to the domain’s root folder (where you require ionCube to be loaded)

6. Revisit your original .php file and search the page – you should now find “ionCube” under additional modules

Notes:

  • If  you are using something like auction2post you may need to copy this php.ini into any subfolders which have .php files in that may need ionCube, this seems to be a slight bug in the 1and1 php.ini system
  • There is a 1and1 guide for doing this, however its not particularly helpful (http://faq.oneandone.com/miscellaneous/24.html)
  • You might wan’t to make 1and1 run php5 before you do this, depending on what you are using it for – this will mean adding “AddType x-mapp-php5 .php” to the domains .htaccess file
Posted in PHP, Web Development Tagged ,

Auction 2 Post

The reason I am writing about this WordPress plugin is long winded, but essentially a while back I wrote a website which featured a hand picked 3 best auctions in certain categories from ebay and posted them to a custom themed WordPress blog, the idea being that people could see the 3 most expensive cars of Tuesday or the 3 most luxury houses for sale etc.  I had written a plugin for WordPress to do this which worked pretty well, but lacked the finesse a full time project would get. This was probably a few years ago, but the other day I happened across Auction2Post and instantly it reminded me of the pitfalls I had encountered with this previous site/plugin. I went to the homepage of the site and was instantly put off, as most of you should be by these sales pages. Having been on the other side of affiliate marketing online I know landing pages and selling copy and unless I am selling a similar product don’t particularly enjoy reading other peoples.

But irrelevant of the selling gumpf I had heard good things. In the uk it worked out as £68 or so with currency conversion to buy Auction 2 Post and a pack of 20 themes and it is, worth it. Worth it that is if you intend to use it to satisfy a need. I wouldn’t buy it if you are just looking for some new “get rich quick scheme” to burn your money into, get it if you know wordpress, get it if you already have some ebay sites (php bay, bans, bespoke – please say you have bespoke!) or a good use within an established site network/blog context.

auction-2-postThere are lots of ways  you can use Auction 2 post, essentially it just posts ebay auctions as posts’ and offers you a host of ways of doing that, within templates, automatically etc. and you can stay within the ebay partner network rules as long as you invest a bit of time in reading them (you should do this when you sign up, by the way!) A word of caution at this point though, EbayPartnerNetwork is apparently getting hotter on the unscrupulous affiliate and if you were not careful you could probably tear their Terms of Service to shreds with this plugin, not that I would know about doing that! EPN (Ebay Partner Network) is lucrative and worth investing time if your a natural SEO developer, auction 2 post is a nice implementation of a wordpress plugin that helps you into this – but its all about how you use it!

I won’t go into how I am using this WordPress plugin, or how you should – there are a lot of great ways this can work for you. I have set up several experimental sites and am using it in xx other blogs, I will perhaps release some results, experiences and stats in the near future, although we don’t want A2p to get too big do we 😉 The forum’s and support for Auction 2 Post are great, zizby/radio is quick to respond to your questions about the plugin – the member area is simple but I have found a few dead links – nothing important and I am sure they’ll fix this. In essence if you know what your doing with the web and wordpress you need this plugin in your affiliate arsenal!

auction-2-post-wordpress-pluginGet Auction 2 Post
(Just skip through the blurb and click order now)

 

Auction 2 Post Discount Code: 789FB24704
Use this code you also get $20/£13 off:

 

Read the rest : Auction 2 Post »
Posted in Affiliate Marketing, Search Engine Optimisation, Web Development, Wordpress Tagged ,

iPhone HomeScreen’s, Spotify, Evernote and the iphone

Thought I would randomly dump a few iphone screenshots I have just found on my 3gs (too many people have iphones – I am not one of these fanboys :/) – If you didn’t know you can take a screenshot at any point with an iphone by pressing the home key and the lock key at the same time, then it saves them as a jpeg in your photo’s.

early-iphonemiddle-iphonecurrent-iphone
As you can see I have gone from sod all to too much, but I can definitely say I am happy with where I am now – the ipod is thrown out and in its place is Spotify, notes really is replaced with evernotes and the rest of the stuff just works.
Spotify and the iphone is a relative craze, but in fact it is one I would recommend – it does mean paying a tenner a month to the company but then the high bitrates and legality of having a huge music collection, playlists etc instantly at your disposal is almost priceless, certainly worth more than the £120 a year.
Evernote is my other favourite – seamless note’s between your iphone and the net – I did write a huge application to do this more specific to my own self management style but its beta was dragging and this does 90% of what I need it to do so that’s been put on the backburner – highly recommend this elephant logo’d app though.
Posted in Ideas, Music, Technology, WoodyLabs

TED Talks – Architecture

For some reason architectural design has really got me recently…specifically Bjarke Ingels – He’s someone I would like to work with should I ever give up this code for CAD!

Posted in Ideas
The New Blog
WoodyHayday.com
A Quote..
"(days) Come and go like muffled and veiled figures, sent from a distant friendly party; but they say nothing, and if we do not use the gifts they bring, they carry them as silently away"
Emerson
Old Random Projects
    © Woody Hayday 2008-2025