To purchase this Sefer, click here
3. Inserting a door into vessels that do not hold 40 Seah and are not attached to the ground:
A. By doors that have hinges on their top and bottom as opposed to their side:
If the entire hinge came out of the socket: All doors of vessels, such as for example [the doors of] a drawer, a box or a portable tower, that have doors on their sides and have two hinges, meaning that they have two heads protruding out from the door, one on its top which enters into a socket that is in the top of the door frame and one on its bottom which goes into a socket that is in the threshold, then if [on Shabbos] the bottom hinge became completely dislocated from its [socket], then it is forbidden to reinsert it.
The reason for this is: [due ] to a decree that one may come to [properly] fix it, meaning that one [may] strongly insert it [into the socket] using a mallet and hatchet in a way that one will no longer be able to take it out from there, and [one thus] will become liable for [transgressing the] building [prohibition] as will be explained, or [he will transgress the] “final blow’ [prohibition] as will be explained in chapter 314 [Halacha 17].
If only part of the bottom hinge came out of its socket: However, if only part [of the bottom hinge] came out [of its socket] then one may press on it until it returns back into its place. [The Sages in this case] were not worried that one may come to [properly] fix it [with tools] because [such a strong insertion] is not so necessary [in this case] being that [the hinge] did not completely come out of its socket [and thus does not require much action to secure it back into its socket].
If part of the upper hinge came out of its socket: However, if even [only] part of the upper hinge came out it is forbidden to push it and return it back into its place, due to a decree that one may come to [properly] fix it.
The reason for this decree by the upper hinge is because: the upper [hinge] is required to be inserted more strongly than the lower [hinge], being that the lower [hinge] is consequently secured within its socket when the upper [hinge] is in its place [correctly, thus by the upper hinge there is a suspicion that one may come to strongly insert it and thus transgress the building prohibition].
B. By doors with a hinge on their side:
Even a door that does not have a hinge on its top or bottom, but rather on its side, meaning that on its side there is one bolt that protrudes which has a hole opposite it within the doorpost, into which one inserts the bolt into this hole when he closes the door, and when one opens the door he removes it out from the hole, in which case here there is [thus] no suspicion that one may come to [strongly] insert [the bolt into its hole] being that the door is made for constant opening and closing [and thus one will purposely not place the bolt too strongly into the hole], nevertheless it is forbidden to return this hinge into its hole on Shabbos due to a decree [that if one were to be allowed to do so then he may come to also insert] a hinge which is not on the side of the door, [in which there is suspicion that one may insert it strongly].
Its law on Yom Tov: However, on Yom Tov it is allowed [to insert this type of hinge into its socket, when done] for the sake of the joy of Yom Tov, [such as to get into one’s food storage house to get food for Yom Tov], as will be explained in chapter 519 [Halacha 1].
Summary of inserting doors into vessels that are not attached to the ground and are not large enough to contain 40 seah:
It is never allowed to initially enter the hinges of a door into its sockets on Shabbos. If one inserts it very strongly one is liable for the Building prohibition. If he inserts it weakly it is Rabbinically forbidden.
Inserting a hinge which is already partially in its socket: Even if the hinge is already partially in its socket it is forbidden to further hammer it in on Shabbos. This is with exception to a door that has a top and bottom hinge [meaning a hinge attached to the top and bottom of the door as opposed to the side] in which case it is allowed to bang in the bottom hinge if it only partially came out, as longs as the top hinge [that is on the top of the door] is fully set inside of its hinge.
On Yom Tov: In cases of need one is allowed to remove and replace a door with a bolt on its side [which is entered into a hole in the doorpost] back into its socket as will be explained in Chapter 519.
To remove a door from its socket: See next Halacha.
May one insert a door into a toy house?
This is forbidden even if less than 40 Seah.
May one insert a drawer onto its railing on Shabbos?
If cabinet/table holds 40 Seah: Seemingly this is forbidden. [Vetzaruch Iyun why no mention of this is made in Poskim which deal with this question- See The Laws of Ohel Halacha 2 Q&A!]
If does not hold 40 Seah: See The Laws of Ohel Halacha 2 Q&A!
 Admur 313:14
 Meaning that the case here is not discussing the classical hinges of a door which are positioned on the side of the door, but rather that the hinges are on the top and bottom of the door.
 Vetzaruch Iyun why here Admur leaves in doubt whether one transgresses the building prohibition or the Fixing prohibition, while in many other cases he rules plainly that attaching detached parts transgresses the building prohibition [see 313:20 or here 5A]. Perhaps though one can explain that Admur here is referring to the dispute brought later on in 314:17 that some opinions hold that one is never liable by building even complete structures for building but rather for Makeh Bepatish, and thus here he leaves it open to both opinions. However, Tzaruch Iyun why specifically in this case did Admur choose to not finalize like whom we rule while in other cases he rules plainly that it has a building prohibition.
 Admur 313:15
 Admur 313:14-15
 Admur 313:14
 Admur 313:15