vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   User IDs to User Names (https://vborg.vbsupport.ru/showthread.php?t=53309)

SFishy 05-24-2003 01:58 AM

User IDs to User Names
 
1 Attachment(s)
Doesn't seem anyone is interested in this... I'm hoping to spark an interest in someone who might find this useful information to have.

I have this little script that I downloaded here at vbulletin.org (see attached). It tells you what members are being ignored, and who they are being ignored by.

I don't even need to know the "ignored by" part, but it's an added bonus.

Two problems I have...

I'd like to get this info into a template and I don't even know how to start...

I'd like the userIDs (from the ignore lists) to actually be translated into the usernames.

Anyone want to help?

Thanks...

SFishy 05-24-2003 01:59 AM

1 Attachment(s)
This is what the output looks like currently...

SFishy 05-25-2003 01:49 AM

Hi all, just bumping this up...

Here's me trying to convince someone with the know-how: it would be really useful information to have to see who your users consider to be "trouble makers" ... to know who they are ignoring.

I tried to figure out how to get it into a template myself, or how to get the user IDs to convert over to usernames, and I couldn't do either -- I'm really a programming dummy!

*begging* anyone?

Boofo 05-25-2003 01:53 AM

In that file, change this:

PHP Code:

SELECT ignorelistusername 

to this:

PHP Code:

SELECT ignorelistusernameuserid 


SFishy 05-25-2003 02:01 AM

Thanks Boofo... but that didn't work :(

Boofo 05-25-2003 02:35 AM

What are you trying to do exactly?

SFishy 05-25-2003 03:06 AM

Boofo,

Ignore.php spits out a list of users who have people on their ignore list. Their ignore list is shown as a series of userID numbers. If there's more than 1, they are separated by a space.

Look at the attached .gif above in my first reply...

Part 1. I was the userIDs translated into usernames.
Part 2. I was the whole thing in some kind of template.

filburt1 05-25-2003 03:13 AM

PHP Code:

// assuming the list is in $user['ignorelist']...
$ignorelist explode(" "$user['ignorelist']);
$usernames = array();
if (!empty(
$user['ignorelist']))
{
    
$result $DB_site->query("SELECT userid, username FROM user WHERE userid IN (" implode(", "$ignorelist) . ")");
    while (
$bits $DB_site->fetch_array($result)
    {
        
$usernames[$bits[userid]] = $bits['username'];
    }


Then $usernames[userid will equal that userid's username.

SFishy 05-25-2003 05:08 AM

Filburt,

Thank you so much for the help...

Please pardon my php stupidity, but where exactly does your code go in the ignore.php script? I did try to figure it out, but couldn't get it to work.

noppid 05-26-2003 06:01 PM

1 Attachment(s)
So I played with your idea, doctored the php and made a template.

Anyone can view this page. If the point is to humiliate those being ignored, we've succeeded. LOL

If this is supposed to be for admins, we need to change the template and relocate the php file.

Hope it helps.

noppid 05-26-2003 06:07 PM

1 Attachment(s)
Name this template "ignored_members"

noppid 05-26-2003 06:14 PM

1 Attachment(s)
This is with a user ignored.

noppid 05-26-2003 06:15 PM

1 Attachment(s)
This is if no users are being ignored.

SFishy 05-27-2003 02:13 PM

Noppid,

PERFECT!

The way the permissions are on my board, this is only viewable by admins and mods (my users cannot view "who's online") which is why I added the permissions code that I did -- so regular members and guest just get the "no permission" template).

Thanks so much!!!!

Feel free to release it as a hack if you want -- others might find it userful.

As for credits, I think Logician was the person who released the original ignore.php (though I'm not sure)

SFishy 05-27-2003 02:30 PM

1 Attachment(s)
I'm attaching my modified .php -- this helps make it look more like tables in other templates on your site... (just more aesthetically pleasing)

SFishy 05-27-2003 02:31 PM

1 Attachment(s)
And these is the modified .txt file (for the template "ignored_members") that also makes it look more pleasing.

SFishy 05-27-2003 02:32 PM

1 Attachment(s)
Screen shot of how it looks...

noppid 05-27-2003 08:24 PM

Nice job, glad it worked out.


All times are GMT. The time now is 04: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.01155 seconds
  • Memory Usage 1,748KB
  • 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_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (18)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete