In that particular sentence, the use of parentheses is unneeded and confusing. You can just as well type "When I'm using parentheses or quotation marks, can somebody explain to me how I should use commas? One before and after?"
If you do use parentheses, then always keep in mind that your parenthesized clause should in no way influence the sentence (such as this clause) and should therefore be treated as if it weren't there (and inserted before the interpunction). So just write your sentence and plop the parenthesized clause right in there.
As for quotation marks, that's a bit more complicated. The comma starting the direct quote is easy, always inserted before the quotation mark:
John asked, "when do I use commas?"
Now, if you're going to interrupt your direct quote, it should look like this:
"So guys," John asked, "when should I use commas?"
The first comma (after "so guys") is inserted before the closing quotation mark because if you hadn't written the sentence in direct quote, the comma would still be there ("So guys, when do I use commas?")
However, you do not write this:
*"When," John asked, "should I use commas?", but rather "When", John asked, "should I use commas?"
The reason the comma is written on the outside of the quotation marks is because if you just wrote the quote as a sentence, the comma would not be there (it wouldn't be *"when, do I use commas", but rather just "when do I use commas"). So if you divide your direct quote in a place where there shouldn't be a comma, you write the comma on the outside of the quotation mark. Mind, in normal writing, you'll usually simply divide where the comma is, because it's more logical. When writing fiction, however, you'll sometimes divide in illogical places, and then the comma goes on the outside of the quote.
*school bell rings* Class dismissed.