MyBB Community Forums
Add a location to fix "Unknown Location"? - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Extensions (https://community.mybb.com/forum-201.html)
+--- Forum: Plugins (https://community.mybb.com/forum-73.html)
+---- Forum: Plugin Support (https://community.mybb.com/forum-72.html)
+---- Thread: Add a location to fix "Unknown Location"? (/thread-120329.html)



Add a location to fix "Unknown Location"? - dr3am - 2012-06-12

My forum: http://www.coding-forums.com

If I have a plugin like My Awards from MyBBCentral it shows up as "Unknown Location" on the who's online list. Obviously it's because it's not standard in MyBB and I know that, but I was curious on how I would add that location so it would show "Viewing Awards" or something along those lines.

Thanks for any replies!


RE: Add a location to fix "Unknown Location"? - Omar G. - 2012-06-12

Hopefully this helps you:
http://resources.xekko.co.uk/thread-353.html


RE: Add a location to fix "Unknown Location"? - Leefish - 2012-06-12

Whaaa!! My super-secret plugin plans outed to the world. Oh wait - I posted them on a public forum Toungue


RE: Add a location to fix "Unknown Location"? - effone - 2013-08-19

^^ Any further progress on this, Lee?


RE: Add a location to fix "Unknown Location"? - effone - 2014-01-31

Sorry to bump a very old thread but I've gone through all the brainstorms of Omar & Lee and have come up with a simple jQuery solution. Obviously its not the best one, but can handle the situation most cases ...

All you have to do is to include the following script to 'online' template, before '{$footer}':

<script type="text/javascript">
jQuery(document).ready(function(){
    jQuery(jQuery('a:contains("Unknown Location")')).each(function () {
        jQuery(this).addClass('unknown'); // Just to capitalize the name, found easy with CSS
        var page = (jQuery(this).attr('href')); // Fetch the link
        page = page.substr(page.lastIndexOf("/") + 1);
        page = page.substr(0, page.lastIndexOf('.')) || page;
        jQuery(this).before('Viewing ').html(page); // Change linked text and prepend text 'Viewing' before it.
    });
});
</script>

And the live result is:

[Image: h5aGoST.png]

A fiddle for the same:

http://jsfiddle.net/effone/9KmzY/


RE: Add a location to fix "Unknown Location"? - Omar G. - 2014-02-01

Looks awesome, let me see if I can code the plugin in this three days break too


RE: Add a location to fix "Unknown Location"? - techmoron - 2014-09-11

Here's the link to my forum: http://www.lucistarforum.com

I tried the script, and nothing changed.

I'm still getting Unknown Location. It's clickable, and all of my Postloop posters are listed when you click on it.

I don't want my usage of Postloop given away. A lot of people would be unwilling to converse with known post exchangers. Can you make a script that makes the unknown location unclickable?

Here's an example of what I mean:

[Image: oUAiVm.png]

And when you click on Unknown Location, all of my Postloop users and their post count is listed. I don't want that revealed to browsers and users.

[Image: mOnqZF.png]

I don't mind it showing Unknown Location, but I don't want it to be clickable.


RE: Add a location to fix "Unknown Location"? - Omar G. - 2014-09-13

http://www.postloop.com/support/threads/mybb-postloop-php.1153/