It used to be very easy to rank hosted galleries for bigger terms, basically all you are doing is utilizing the link power the hosted gallery domain has and creating authority on YOUR page, or ref code.
Back a few years ago I had quite the run with tcg hosted galleries (over 2500 sales from tcg hosted galleries direct from google), there is actually a post here from 04 or 05 with someone asking if there was a "trick" to rank tcg galleries with blogspot. (I was the first guy to realize I could register deleted blogs from most of the "trusted" establishments, and aquired thousands of PageRank)
Sure there was a trick, 1500 pr worth of link juice was a great place to begin searching for the "trick".
For the course of about 2 years I had tcg and nasty dollars hosted galleries ranked in the top 3 for terms like blowjobs, big tits, xxx, squirting, milf (amongst others) everyone of the sitenames, and most the stars names.
I had ALOT of link power, alot of unique backlinks into my feeder pages, and solidifying AUTHORITY was easy as pie. Google had no choice but to rank these super domains (thousands of links) and further had no choice but to list the most authoritive page for that search term. Knowing what they HAD to do, made it easy to work with.
The same applies for referal codes. You see some people say its cheesy for me to rank my referal code for "Paysite Classics", because that serp should belong only to the paysite paysiteclassics.com (spoof). What they may not realize is its in the process of being bumped for "classic porn" and just from sheer authority, it picks up all the other serps that the domain may show in. And the traffic from the generic, yet highly targeted serp should trump the others in value.
Edit** Alot of whats mentioned above is common knowledge now, almost everything still applies, its just not as easy to aquire the quality link power was it was then
