MyBB Community Forums

Full Version: Who's Online _blank
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello thar!

For a very odd and advanced reason I need to find a way to make the "Who's Online" userlinks open in a new window.

To clarify:

The board stats on the index page, when a member is online his name is shown there. I need the link to open in a new window when someone clicks a name!

Right not it looks like:

{$comma}{$user['profilelink']}{$invisiblemark}

And I guess I need target="_blank" put somewhere, but where? :O

I'd appreciate any kind of help!
Unfortunately, you can't. That area uses the build_profile_link function, so all username links would become _blank if you edited it that way.

The only way I can think of this being plausible is by using Prototype (it comes with MyBB). Find out the code of converting all "a" elements in a div to _blank.
But wouldn't that make every link open in a new window.. ? That doesn't sound very nice!

What I actually did was to add the "board stats" into the forumdisplay with an iframe. It's hard to explain but that's the only way I could fake it in because of the hooks not working.

How would I make all usernames open in _blank?
eh.. bump...?

Blush