Ddim7 is made of these notes: D (root), F (minor third), Ab (diminished fifth), Cb (diminished seventh).
With this shape the strings sound like this, from the D string to the D string: D, Ab, Cb, F.
The diminished seventh chord is made only of minor thirds. That’s why it sounds the same when you move it three frets – handy as a passing chord.