You can shorten the track you want as a ringtone in itunes itself, right click on a track, get info, options and set the start/stop time to the 30secs of which ever bit in a song you want. Make sure you make a backup of the original first though cos it overwrites it. Once you've done that, sync the iphone to where ever your track is under Devices on the left, then under the 'Ringtones' tab.
Message tone, can't do anything unless you jailbreak your phone, google it, it's a piss to do.