An extended discussion on internal vs. external forces
We usually like to describe hinges as "places where the moment is always zero."
But, wait a minute, the moment is always zero anywhere in a stable structure. Don't believe me? Let's take a look at the most trivial structure ever, a simply-supported beam with a uniform load:

So, it has a span of 8 m and a load of 1 kN/m. Obviously, the reactions are 4 kN each.
We also know that the bending moment at the midspan is given by $M = \dfrac{qL^2}{8}$, which in this case gives us 8 kNm, as shown in the diagram above.
But let's calculate the moment at midspan by hand, using our trusty sum of bending moments approach:
$$\begin{align}
\sum M_{\text{midspan}} &= M_{\text{left reaction}} + M_{\text{right reaction}} + M_{\text{load}} \\
&= -(4\cdot4) + (4\cdot4) + (1\cdot8\cdot0) \\
&= 0\text{ kNm}
\end{align}$$
So... what's going on here? What's that 8 kNm at midspan if we actually obviously have zero moment there?
Well, what's going on is that internal moment is one thing, external is another, and we can't get them mixed up.
For a more obvious distinction between the two, let's instead look at axial loads: imagine you have a sugar cube between your fingers and you start squeezing it. What'll happen? Well, if you look at the applied forces generally, you'll conclude that nothing will happen: you are applying equal forces in opposite directions, so the net force on the sugar cube is zero! It doesn't matter whether you are squeezing the cube with barely any force at all or if you're putting all your strength into it: you'll always be applying two forces in opposite directions and the net force will always be zero.
But we know that's not how this works; if you squeeze the cube enough, it'll crumble between your fingers. Because the net external force may be zero, but the cube is under extreme internal forces. And the value of this internal force is equal to the force applied by one of your fingers (if you squeeze the cube with a force of 1 kN from each side, the internal force in the cube will be of 1 kN).
The definition of a stable structure is that the external forces are all balanced in every point in space (it doesn't even need to be on the beam. You could calculate the moment at $x = 1000\text{ m}$ and you'll still get zero moment). And when we calculate moment as we did above, what we're calculating is the external moment. Hinges are in no way special with regards to external moment (indeed, nowhere is).
So external moment (and other forces) is useful to know whether the structure is stable: if the external moment were non-zero, that'd mean we're actually dealing with a mechanism that will accelerate over time.
Internal moment (and other forces), however, is useful to know whether the structure can withstand the applied load. And just as the internal force in the cube is equal to the load applied to one side of the sugar cube, so is the internal bending moment equal to the bending moment on one side of the point of interest.
So, if we recalculate the bending moment at midspan looking just at the load to its right, we get:
$$\begin{align}
\sum M_{\text{midspan}}^+ &= M_{\text{right reaction}} + M_{\text{load}} \\
&= (4\cdot4) - (1\cdot4\cdot\dfrac{4}{2}) \\
&= 8\text{ kNm}
\end{align}$$
Notice that since we are calculating the moment to the right of the midspan, I had to "break up" the uniform load so that I'm considering the effect of its right half. After all, that uniform load is arbitrary. We drew it as one uniform load along the entire span, but should we expect a different result if we instead had two uniform loads of equal value, one on each side of the midspan? Of course not!

So just because we drew the uniform load as covering the entire span (and with a centroid at the midspan), that doesn't mean we can ignore its effect on the internal bending moment calculated when looking at only one side of the beam.
We can also calculate this from the left-hand side, but then we need to remember the sign convention that, for left-hand internal moments, clockwise is positive:
$$\begin{align}
\sum M_{\text{midspan}}^- &= M_{\text{left reaction}} + M_{\text{load}} \\
&= (4\cdot4) - (1\cdot4\cdot\dfrac{4}{2}) \\
&= 8\text{ kNm}
\end{align}$$
That these two calculations should have equal results is obvious: if the external bending moment is zero at that point, then the internal bending moment must be equal (and opposite, but we dropped the sign for the left-hand side because of the convention) on both sides of that point.
As a refresher, here's the sign convention for internal forces:

Now to answer your actual question
What we really mean when we say that hinges always have zero moment is that they always have zero internal moment.
As such, when calculating this zero-moment at the hinge, we need to do so by only looking at the loads to one side of the hinge. So for your triangular load in the second example, you need to calculate the moment at the hinge by considering the part of the load that's visible on the side you're calculating.