vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Forum Display Enhancements - Country Display for Who's Online (https://vborg.vbsupport.ru/showthread.php?t=151600)

TomasDR 07-08-2007 07:54 AM

Quote:

Originally Posted by mfyvie (Post 1285615)
@TomasDR - Just because you've installed some plugins which fix security issues, this is NOT the same as running 3.6.6 or higher. As I said in that information the problem is that you are missing a hook, and this won't be fixed by security patches!

I also said that GLA will work fine (which you've just confirmed), but that Who's online won't work properly.

Because the hook is missing, the mod then has no way to add those extra fields into the query which is pulling the info from the database.

I'm going to update the .xml file so that it will refuse to install on anything less than 3.6.6. I doubt that will eliminate people complaining though.

I'm afraid you'll have to bite the bullet and upgrade. 3.6.6 contains around 20 new hooks and is the only version that will support the new blog and project tools products.

Well I definitely wasn't complaining and I realize patching is not the same as upgrading.

Along with updating your XML I recommend changing your description from 3.6x to something along the lines of 3.6.6+.

Quote:

Works on both vBulletin 3.5x, 3.6x and should work for future versions as well.
Due to your location I realize English might not be your native language but you come off very crass & condescending, with your response to my post and others I have read. But most likely you don't care which hopefully will reflect on future installs of your product or the lack thereof.

Have a nice day!

mfyvie 07-08-2007 08:20 AM

Quote:

Originally Posted by TomasDR (Post 1285654)
Along with updating your XML I recommend changing your description from 3.6x to something along the lines of 3.6.6+.

Oops, I didn't realise it, but I did notice that I had 3.5 and 3.6 in the list of features for this mod - I must have meant that for GLA, and I've not changed it. Thanks for pointing that out.

Quote:

Originally Posted by TomasDR (Post 1285654)
Due to your location I realize English might not be your native language but you come off very crass & condescending, with your response to my post and others I have read. But most likely you don't care which hopefully will reflect on future installs of your product or the lack thereof.

No, English is my native language. However, there was nothing in my messages to you which was attempting to be crass and condescending. I realise that you made an honest mistake with the version number (assisted by my mistake in the description), and you did take the time to report more details and do a bit of homework. I'm writing a lot of mails supporting these mods (both public and private), so I don't always have time to pepper my posts with emoticons, especially at 3am in the morning, which is when I was writing to you. I think if you re-read my posts in that context, you may not get the same impression.

However, I do freely admit to writing snotty messages to people who just don't bother to read a single thing written in my instructions, etc. You'll find plenty of examples in every mod thread of people who are just wasting the mod author's time. So, no, I don't apologise about comments to those people!

Bear in mind that coders give their time for free to build these things. I don't even use this mod on my own board, I wrote it purely as an example to show one application for GLA. I also mark my mods as supported (and actually support them), but I do understand why many others coders mark their mods as unsupported, eventually the stupid questions from people who can't read get to them. At least one coder has told me that once he started charging for mods, it reduced the number of stupid questions he got to almost zero. Once people pay for something, they actually take the time to read instructions.

But like I said, sorry if this has been a misunderstanding in your case.

SocialNetworkBuzz 07-08-2007 08:42 AM

Quote:

Originally Posted by mfyvie (Post 1285612)
That could create a huge amount of clutter. That area is designed to take text - imagine what it would look like with 300 flags in there?

That's why it's at the bottom :) I have seen sites do things like that, and I think it's kinda neat. If you code it, i'll be happy to install it ;)

BigDog56 07-08-2007 08:51 AM

Installed yesterday, no problems, works great!

Silvio 07-08-2007 09:45 AM

ty so much for ur cool professiona hack!

works like a charm!*installed* and waiting for new cool AME add-on

ciao

mfyvie 07-08-2007 09:50 AM

Quote:

Originally Posted by Silvio (Post 1285692)
works like a charm!*installed* and waiting for new cool AME add-on

[cough] I think you mean cool new GLA add-ons rather than AME. But you never know... ;)

Ahsin1 07-08-2007 10:00 AM

WHta is this man i import that Geo Location i got this msg when i open my forums

Warning: Unknown(/home/pakcan/public_html/includes/gla.php): failed to open stream: No such file or directory in /global.php(356) : eval()'d code on line 80

Fatal error: (null)() [function.require]: Failed opening required '/home/pakcan/public_html/includes/gla.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/pakcan/public_html/global.php(356) : eval()'d code on line 80



My forums :: www.desibollywood.org

Kaycee123 07-08-2007 10:01 AM

I've installed GLA and this program and everything is working fine except the flag pictures don't come up. I have them all installed under /images/misc/flags/ Is that where they're supposed to be??

steven s 07-08-2007 10:05 AM

Quote:

Originally Posted by Kaycee123 (Post 1285702)
I've installed GLA and this program and everything is working fine except the flag pictures don't come up. I have them all installed under /images/misc/flags/ Is that where they're supposed to be??

Did you follow the instructions exactly?
Quote:

1. Upload the files and directories in the upload directory into your forums directory
2. Verify that the file ip-to-country.csv is now in your main forums directory
3. Install the enclosed .xml file via AdminCP -> Plugins & Products -> Manage Products -> Add/Import Product. Remember to click overwrite if upgrading
4. After the mod is installed, delete the file ip-to-country.csv from your forums directory.

** Make sure you perform the steps in this sequence. If you don't, you won't get the correct data in your database.
Did you edit the options and save?

Ahsin1 07-08-2007 10:08 AM

SOme one Reply to this


WHta is this man i import that Geo Location i got this msg when i open my forums

Warning: Unknown(/home/pakcan/public_html/includes/gla.php): failed to open stream: No such file or directory in /global.php(356) : eval()'d code on line 80

Fatal error: (null)() [function.require]: Failed opening required '/home/pakcan/public_html/includes/gla.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/pakcan/public_html/global.php(356) : eval()'d code on line 80



My forums :: www.desibollywood.org

mfyvie 07-08-2007 10:08 AM

Quote:

Originally Posted by Ahsin1 (Post 1285701)
WHta is this man i import that Geo Location i got this msg when i open my forums

You've just posted exactly the same thing on the GLA thread (the correct place for that issue), and I've answered you on that thread.

Quote:

Originally Posted by Kaycee123 (Post 1285702)
I've installed GLA and this program and everything is working fine except the flag pictures don't come up. I have them all installed under /images/misc/flags/ Is that where they're supposed to be??

Yes that's the correct location. Two possibilities - file permissions error. Is the flags directory accessible from the outside world? Try manually typing in the full URL to one of the flags. The other possibilities is the style variable that points to the misc directory is set somewhere else. If you are using multiple styles and have multiple "misc" directories, then you can put the flags directory in there (this allows you to show different sets of flags according to different styles).

mfyvie 07-08-2007 10:12 AM

@Ahsin1 - this is now the third time you've pasted exactly the same post. If you continue to do this, I will ignore you. I've already given you a solution (i.e. disable product and then follow the instructions) on the GLA thread, which is the correct thread.

This thread is for discussion of the who's online hack.

Kaycee123 07-08-2007 10:19 AM

Quote:

Originally Posted by mfyvie (Post 1285707)

Yes that's the correct location. Two possibilities - file permissions error. Is the flags directory accessible from the outside world? Try manually typing in the full URL to one of the flags. The other possibilities is the style variable that points to the misc directory is set somewhere else. If you are using multiple styles and have multiple "misc" directories, then you can put the flags directory in there (this allows you to show different sets of flags according to different styles).

Thanks for the advice, they were in the wrong misc directory - I have a custom skin and when I moved the flags directory into the misc file for that skin it works great!! Thank you very much for your prompt response:up:

Ahsin1 07-08-2007 10:19 AM

Quote:

Originally Posted by mfyvie (Post 1285709)
@Ahsin1 - this is now the third time you've pasted exactly the same post. If you continue to do this, I will ignore you. I've already given you a solution (i.e. disable product and then follow the instructions) on the GLA thread, which is the correct thread.

This thread is for discussion of the who's online hack.

OKk i wont ...i disable it now forums is working :)

mfyvie 07-08-2007 10:21 AM

Quote:

Originally Posted by Kaycee123 (Post 1285716)
Thanks for the advice, they were in the wrong misc directory - I have a custom skin and when I moved the flags directory into the misc file for that skin it works great!! Thank you very much for your prompt response:up:

I might put a note in the instructions for people with multiple styles to check that.

shamda 07-08-2007 02:26 PM

Very nice add on! I just installed it and it works great, except that there are one of two that do not show including mine! I am using comcast isp in florida, not sure why it does not show. I have it set to show flag and country. Right now there are 20 online and all show except mine and one other. I am the super admin for my board, not sure if that has something to do with it. Any ideas?

mfyvie 07-08-2007 02:31 PM

Quote:

Originally Posted by shamda (Post 1285832)
Very nice add on! I just installed it and it works great, except that there are one of two that do not show including mine! I am using comcast isp in florida, not sure why it does not show. I have it set to show flag and country. Right now there are 20 online and all show except mine and one other. I am the super admin for my board, not sure if that has something to do with it. Any ideas?

That's an issue concerning GLA itself, rather than this mod. But if you look in the instructions for GLA you'll find the link to the site that provides the database. It's just bad luck that your ISP isn't in it.

JD45 07-08-2007 03:31 PM

Quote:

Originally Posted by mfyvie (Post 1285612)
Ok, that's odd. If you have the session columns and they are populated, then it's working. Once that table is extended, those values are loaded automatically by vb. You may be putting it in a part of the template that doesn't display?

I just went to footer, and inserted $session[host] as the very first line. This displays the IP address and should work for you - it worked for me and has nothing at all to do with this mod.

Of course there's a remote possibility that your own session has the country field blank if it couldn't look up your address. Maybe you should double check the session table to find your own entry and check.

I put $session[host] in the first line of the footer and it did show up. I put $session[country] and nothing showed up.

I checked the session table again, and there is a country being shown for each session listed.

I'm at a loss..

It seems all the data is there, I just can't get it to display.

steven s 07-08-2007 03:55 PM

Quote:

Originally Posted by JD45 (Post 1285890)
It seems all the data is there, I just can't get it to display.

What if you do add this to a template?

HTML Code:

<img src="$stylevar[imgdir_misc]/flags/$session[country_iso2].png" alt="$session[country]" />
Look at www.318ti.org/forum/
Do you see the US flag in the lower right of the header banner?

mfyvie 07-08-2007 04:04 PM

Quote:

Originally Posted by JD45 (Post 1285890)
I put $session[host] in the first line of the footer and it did show up. I put $session[country] and nothing showed up.

I checked the session table again, and there is a country being shown for each session listed.

I'm at a loss..

It seems all the data is there, I just can't get it to display.

All I can think of is that your session isn't matching. Post your current IP or PM it to me and I'll look it up to see if it is matching. I presume also you are running on 3.6.7.

JD45 07-08-2007 04:16 PM

Quote:

Originally Posted by 1996 328ti (Post 1285902)
What if you do add this to a template?

HTML Code:

<img src="$stylevar[imgdir_misc]/flags/$session[country_iso2].png" alt="$session[country]" />
Look at www.318ti.org/forum/
Do you see the US flag in the lower right of the header banner?

I did add that to mine and it didn't show up and I don't see it on yours either...:confused:

steven s 07-08-2007 04:23 PM

Quote:

Originally Posted by JD45 (Post 1285924)
I did add that to mine and it didn't show up and I don't see it on yours either...:confused:

OK. I figured if it showed on my site the problem was with your installation.
The fact that it is not showing up then has more to do with your ip address as you both figured.
I was just trying to rule out the installation.

Zagis 07-09-2007 06:33 PM

Quote:

Originally Posted by Kaycee123 (Post 1285702)
I've installed GLA and this program and everything is working fine except the flag pictures don't come up. I have them all installed under /images/misc/flags/ Is that where they're supposed to be??

I've got a similar problem here. It doesn't show flag pictures but only country names, even if I have selected the "Display Country Flag" option.
Quote:

Originally Posted by mfyvie (Post 1285707)
Try manually typing in the full URL to one of the flags.

I did and I can see them.
Quote:

Originally Posted by mfyvie (Post 1285707)
The other possibilities is the style variable that points to the misc directory is set somewhere else. If you are using multiple styles and have multiple "misc" directories, then you can put the flags directory in there (this allows you to show different sets of flags according to different styles).

I use only custom style. No others are installed.

Thanks :)

mfyvie 07-09-2007 06:54 PM

Quote:

Originally Posted by Zagis (Post 1286916)
I did and I can see them.I use only custom style. No others are installed.

If you have a custom style then your stylevar might be pointed to a different directory than images/misc - the previous person had the same problem.

Styles and Templates -> (for the right style) Style Vars -> Scroll down to Miscellaneous Images Folder.

On the default installation this is set to "images/misc", which is where you put your flags. If your style has a different location for this directory, then you must move your flags there instead.

Zagis 07-09-2007 07:15 PM

"Miscellaneous Images Folder" is images/misc for the Default Style that I use.

mfyvie 07-09-2007 07:24 PM

Then the most likely possibility is that the automatic template edits were not able to work due to customisations you've made on WHOSONLINE or whosonlinebit templates (very likely if you have a heavily customised style).

However, if your country names are showing up, then it's obviously managed to make these changes.

The only thing you can do now to examine the source of the page (i.e. check the HTML output) for the who's online display. Each cell should contain something like this:
HTML Code:

<td class="alt1"><img title="Switzerland" style="margin-right: 3px;" src="images/misc/flags/ch.png" alt="Switzerland">Switzerland</td>
You should see the img tag in there, along with the relative path (relative to your forum directory) for the image. Is the problem that the img tag is missing from this cell, or that the path to the image is somehow wrong? If this doesn't resolve the problem, then please paste in just the cell (as I have done) for your page.

Zagis 07-09-2007 07:39 PM

This is what I've got
PHP Code:

<td class="alt1"><img style="margin-right: 3px" src="images/misc/flags/gr.png" alt="Greece" /></td


mfyvie 07-09-2007 07:49 PM

Ok, then based on what you've written, I assembled a URL which *should* display your image directly -

http://www.malinoiscanary.gr/forum/i...c/flags/gr.png

However, it doesn't - this URL just brings up some more of your forum, not the image itself. You said when you put the URL in directly it worked? Which URL did you put in to make it work?

tycity 07-10-2007 05:32 AM

This is awesome - thanks! Worked like a charm. :) Only tip is that if you are using a template other than the default VB skin, you have to upload the flags to the template's image directory.

Zagis 07-10-2007 07:19 AM

Ok this is what happened...

The size of all the png files after bz.png in \forum\images\misc\flags dir was 0 bytes for some reason. So, I reupload the \images\misc\flags dir and the prob solved.
Quote:

Originally Posted by mfyvie (Post 1286971)
You said when you put the URL in directly it worked? Which URL did you put in to make it work?

I was checking the first 5-6 files (ad.png, ae.png...) and that is why it was working for me.

Any way, thanks for the support :up:

Triky 07-10-2007 09:29 AM

Another great one! Thanks!

fpattberg 07-10-2007 12:24 PM

Hi.

I really like this mod and installed it. It worked for 2 hours after installation and then suddenly the complete Country category doesnt show up anymore.

The previous installation went without a problem.

Just to be sure, I reinstalled followed all the steps in the correct order but still nothing. My Whois online doesnt show anything other then the normal stuff.

Really strange.

I am using custom style and this mod from Dream for the whois online: https://vborg.vbsupport.ru/showthread.php?t=123158

But this shouldnt really be a problem right? it worked before.

Can anyone help me with this?

Thanks.

mfyvie 07-10-2007 12:28 PM

Sounds very strange. I would go through the various steps that people have used for troubleshooting for both this mod and GLA. Remember that this mod relies on GLA - if something isn't working there, then this mod won't work either. Have a scan through both this thread and the GLA thread and you should be able to narrow down where the problem lies. But as a first step I would double check your settings in the admincp, and click save, even if the settings appear to be the way you want them (there is a bug in vbulletin which can sometimes show you different settings than there really are)

fpattberg 07-10-2007 01:08 PM

Hi mfyvie.

Thanks for the heads up. I have looked through all the threads but nothing.

I have tried everything I can think of. It just doesnt work. As if I did not install anything. :(

I guess there is no other way other then to uninstall altough I hate to give up. :mad:

Fabian

mfyvie 07-10-2007 01:15 PM

Fabian,

If you've followed all the steps in this and the other thread then you'd have a pretty good idea about WHICH part isn't working. For example - is GLA functioning correctly? Were you able to get any information showing after a manual template edit, is the session table populated?

You say you've tried everything that you can think of - "but it just doesn't work". The question is, which parts worked, and which parts didn't - or are you saying that GLA has completely failed and NONE of it is working? I'd find that a bit difficult to understand.

fpattberg 07-10-2007 01:22 PM

Quote:

Originally Posted by mfyvie (Post 1287570)
Fabian,

If you've followed all the steps in this and the other thread then you'd have a pretty good idea about WHICH part isn't working. For example - is GLA functioning correctly? Were you able to get any information showing after a manual template edit, is the session table populated?

How can I check that the GLA worked? That might be the problem.

mfyvie 07-10-2007 01:28 PM

Quote:

Originally Posted by fpattberg (Post 1287574)
How can I check that the GLA worked? That might be the problem.

I thought you'd said you'd gone through both threads? If you visit the GLA thread, you'll find information about troubleshooting GLA (but you already said you did this?) Anyway, if you have a specific question about GLA troubleshooting, best to pick it up on the GLA thread rather than this one.

fpattberg 07-10-2007 01:32 PM

Okay thanks mfyvie.

Great mod anyway. :)

Logician 07-10-2007 05:27 PM

Great hack, thanks for sharing! :)

For people who have 3.6.x version (3.6.0 to 3.6.6) which is not compatible with this pluggin and who don't mind hacking .php code here is how you can install this hack:

Edit online.php, find:

Quote:

$allusers = $db->query_read_slave("
SELECT user.username, session.useragent, session.location, session.lastactivity, user.userid, user.options, session.host, session.badlocation, session.incalendar, user.aim, user.icq, user.msn, user.yahoo, user.skype,
IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid, infractiongroupid
FROM " . TABLE_PREFIX . "session AS session
". iif($vbulletin->options['WOLguests'], " LEFT JOIN " . TABLE_PREFIX . "user AS user USING (userid) ", ", " . TABLE_PREFIX . "user AS user") ."
WHERE session.lastactivity > $datecut
". iif(!$vbulletin->options['WOLguests'], " AND session.userid = user.userid", "") ."
ORDER BY $sqlsort $sortorder
");
REPLACE IT AS:


Quote:

// Logician modified Hack : Country display for who's online
$hook_query_fields = $hook_query_joins = $hook_query_where = '';
$hook_query_fields = ', session.country, session.country_iso2, session.country_iso3';
$allusers = $db->query_read_slave("
SELECT user.username, session.useragent, session.location, session.lastactivity, user.userid, user.options, session.host, session.badlocation, session.incalendar, user.aim, user.icq, user.msn, user.yahoo, user.skype,
IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid, infractiongroupid
$hook_query_fields
FROM " . TABLE_PREFIX . "session AS session
". iif($vbulletin->options['WOLguests'], " LEFT JOIN " . TABLE_PREFIX . "user AS user USING (userid) ", ", " . TABLE_PREFIX . "user AS user") ."
$hook_query_joins
WHERE session.lastactivity > $datecut
". iif(!$vbulletin->options['WOLguests'], " AND session.userid = user.userid", "") ."
$hook_query_where
ORDER BY $sqlsort $sortorder
");
// Logician modified Hack : Country display for who's online
Upload online.php hack to server and then import the ATTACHED product.

I've tested with vb 3.6.2 and it is working fine if installed as described here. Yet I don't have time to give support for this, sorry about it if it does not work for you. If you have 3.6.7 or above, please dont apply my instructions, use original hack instead!

winpro19 07-11-2007 05:10 AM

Hey

First of all I must say great support here, keep up the good work mfyvie - we really appreciate your efforts! And a great plug-in too, very informative (at least for me).

However, I'm having a little problem...I've installed the plug in and GLA and verified that ip2country table exists in my database, and my session table has "country" and I believe "country_is1" and "country_is2" ( I may be mistaken a bit about the country_is1 and is2, it's something like that you probably know).

However there is no table in who's online for "Country/flag". Do you know what the issue could be? Here are screenshots:

http://img249.imageshack.us/img249/6687/img1hn9.gif
http://img529.imageshack.us/img529/6413/img1pz7.gif

To clarify, there has been user activity after the plug-in was installed.

Interestingly enough, when I enable "Resolve IP Address" option then I do see a new table created which resolves their IP.

Thanks !


All times are GMT. The time now is 08:18 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01442 seconds
  • Memory Usage 1,879KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_html_printable
  • (1)bbcode_php_printable
  • (28)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete