I'm rather interested in this subject, since I made the "Flanking with Mirror Image" post that started it all. (Btw, I missed the images appearing in a cluster bit of that spell, so obviously Mirror Image could never be used that way- since they can't surround an opponent. But that's beside the point.) Anyway, here's a situation for you to illustrate this issue.
You are a hapless orc doing random patrol duty in a nameless dungeon somewhere. Suddenly a party of adventurers comes out of a corridor just ahead of you. The burly fighter types seem heavily injured, so only a halfling in leather armor wielding a short sword comes forward to fight you. Just as you're closing with the halfling there is a blur of shadow along the wall and before you can react there is a menacing black-garbed figure wielding a wicked blade that drips with venom behind you. Keeping an eye on the halfling you direct your attack against the seemingly more deadly opponent. It nimbly avoids every swing of your axe but is so caught up in defense that it luckily misses you completely with jabs from its poisoned blade. Then the halfling attacks...
Now. Does the halfling rogue get a flanking bonus and thus get to make a sneak attack? This situation is entirely possible whether the "assassin" figure is an actual character from the party, a summoned creature or an illusion. Does it really matter what it is to give the halfling a flanking situation? As far as I can see, it shouldn't.
If you want a "strictly by the rules" reasoning for this, then I'll remind you of
all the SRD says about the relevant definitions...
SRD said:
"FLANKING
When making a melee attack, you get a +2 flanking bonus if your opponent is threatened by a character or creature friendly to you on the opponent’s opposite border or opposite corner.
Only a creature or character that threatens the defender can help an attacker get a flanking bonus."
"Threatened Squares: You threaten all squares into which you can make a melee attack, even when it is not your action. "
"Because figments and glamers (see below) are unreal, they cannot produce real effects the way that other types of illusions can. They cannot cause damage to objects or creatures, support weight, provide nutrition, or provide protection from the elements. Consequently, these spells are useful for confounding or delaying foes, but useless for attacking them directly."
So- to flank you have to threaten, to threaten you have to attack. Nothing in the rules says that figments can't attack. It says "they can't cause damage" and that they're "useless for attacking", but that's not the same thing as not being
able to attack. Attacking a Red Dragon with a fireball is useless, but it's still an attack. Attacking a Balor with a silver sword is useless, but it's also still an attack, and I'd bet everyone of you would argue that it would give an ally on the opposite side of the Balor a flanking bonus. A figment can make all the attacks their caster wants them to make, they just won't do anything or cause any damage- but until the critter being "attacked" by the illusion
realizes that it's being "attacked" by an illusion (and presumably makes it's Will save) it
is being "attacked" and is going to be effectively "threatened".
Honestly, if you rule it
any other way, then illusions are patently useless in their role of "confounding or delaying foes". Because if an illusion can't "attack", no matter how useless and non-damaging those "attacks" may be, then what's the point. Also, knowing that the useless and non-damaging attacks of his illusions would quickly reveal them as the figments they are, any illusionist worth his salt would structure the appearance of those attacks like I described above- so that they make no contact but nonetheless appear quite "threatening".
So I ask again- in my example above, does the halfling get a flanking bonus?