Being in command of a ship doesn't require you to be a Captain, acting or otherwise. Riker could have been the CO of the Excalibur at Commander rank without in any way being "unofficial" or "informal" or anything like that, even though he knew he was just temping it. Yet in "BoBW", Riker did receive a promotion that came through in hard metal but was for some reason later revoked, while in "Gambit" he got the CO spot without any accompanying promotion and started dictating "Acting Captain logs".
So Starfleet appears to have at least three different protocols for giving impromptu command of a starship to an officer lower than Captain in rank - and actually adjusting the person's rank is only seen once, and revoked afterwards, so it might be something associated with highly special circumstances only. Say, Riker would have already gathered all the courses and merits required for the fourth pip by the time of "BoBW", unlike most temp-skippers, so Starfleet would give him the promotion. But when he turned that down after Picard survived (the fourth time he did that!), he became such a pariah that none of his temporary commands were ever considered grounds for promotion again.
Timo Saloniemi