I am not a legal adviser.
But to my knowledge nothing awful has ever happened to an HP fanfiction author simply for being an HP fanfiction author. There are a rare few authors that use their copyrights to prevent derivative works, but J.K. Rowling is most certainly not among them.
For me, a disclaimer within a story itself is just a way to show good faith. Use a disclaimer to respect the owner.
Still, Portkey itself uses this fine print:
QUOTE
The stories on this site are based on characters and situations created and owned by JK Rowling, various publishers including but not limited to Bloomsbury Books, Scholastic Books, Raincoast Books, and Warner Bros., Inc. No copyright or trademark infringement is intended. This website is not an affliate of any of the entities listed above.
See? Nothing terribly fancy, just a nod where a nod is due. I'm not suggesting you copy this whole thing, or this whole thing:
QUOTE
Some situations and characters contained herein may be derived wholly or in part from the published works of J.K. Rowling for non-commercial use only. No copyright or trademark infringement is intended or should be inferred.
I'm not saying you need to be so pretentious either:
QUOTE
The following story is based on situations and characters owned by J.K. Rowling or her publishers.