A method to realize a probabilistic conditional sign flip gate for number state qubits based only on linear optics was described. The gate operates based on a nonconventional use of teleportation process. A hadamard gate on the control qubit was combined with a projective teleportation scheme mixing control and target for a destructive version of the gate. For the nondestructive version of the gate, a quantum encoder was used, which was realized through the interaction of the control qubit with an ancillary state composed of two maximally entangled photons. The maximum success probability was found to be 1/4, regardness of the method for generating the entangled states.