You could start the computer from the Leopard 10.5 DVD
installer disc and consider an 'archive & install' could help
at least restore the system to a functional state. However
anything you put into the "Trash" will not recycle or be
available directly to recover, since it the process of trash
sets up those files so marked to be overwritten by the OS.
If you perform an 'archive and install' using the booted DVD
(hold C key on start, to run from DVD) it will make a second
new system folder and the old folder will be renamed as a
"previous system" that will not run the computer. You may
be able to look through there for anything left that you made
in a user file or other, that had not been removed via Trash.
A recovery software or service could attempt to find and
restore the lost files that Trash marked as gone, but it
likely would cost quite a bit of money; and in order to not
have those files over-written by the system, the computer
should not be used until a recovery service is performed.
The need to create a backup scheme to safe copies of all your
important documents, images, video, and so on, starts at the
beginning of using a computer; with a Mac, it's best to have an
off-computer independent self-powered hard disk drive, and
with an older Mac, that should be a FireWire400 if you were to
consider using it as a bootable device to run a full clone from.
Time Machine can do some backups, if the system isn't too
old or from before that existed; that has limits & conditions.
Of course backups need to be done ahead of any issue.
So hopefully an archive & install can give you a new system
folder and at least not take away anything not already lost.
There may be some other ideas out there, but none that I
would recommend due to lack of situational information.
That may be your best bet, to get the machine working.
But all your Trashed Files are likely lost.
If you could start the messed up Mac in Target Disk Mode
and see it as an external HDD to another Mac (FireWire)
that could save you from overwriting files in that drive;
and see about repairing it from another Mac. That way
the Mac you want to recover from won't be overwritten.
PS: This has not let me edit to add, a second/third try.
You could see if a prosoft Data Rescue or other utility
from the era of your OS X version may work, or see if
this free non-GUI application to recover data/image/etc
files may help. It is not an easy thing.
http://www.cgsecurity.org/wiki/PhotoRec
My earlier attempts to post a detailed edit on to the main
post here were not allowed, maybe due to a few URLs
to help you fix the problem, using third party retail tools
that can be about $100. for data recovery on DVD.
Good luck! 🙂
Edited 3x failed 2x