vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Change Username via UserCP v2.0 (https://vborg.vbsupport.ru/showthread.php?t=24722)

Matt 11-08-2001 01:51 PM

Anyway of stopping banned users with over the amount of posts from changing their name?

Scott MacVicar 11-08-2001 02:27 PM

I haven't really had time to do more work on name logging, as far as i knew banned users shouldn't be even able to view the board never mind change their username.

Will do work on name logging tonight after working on my backend a bit more.

heretic 11-08-2001 08:33 PM

excellent hack!

|DarkManX| 11-23-2001 03:13 PM

getting this error....

Parse error: parse error in /home/***/public_html/tof/member.php on line 1467

|DarkManX| 11-23-2001 03:50 PM

ok i got it

what i did was instead of pasting this

if ($bbuserinfo[posts] >= $postuserchange) {
$oldnames=$DB_site->fetch_array($DB_site->query("SELECT * FROM namelogs WHERE userid='$bbuserinfo[userid]'"));
$diff = time() - $oldnames[lastchange];
$limit = (86400 * $dayuserchange);
if ($diff > $limit) {
eval("\$changeuser = \"".gettemplate("changeuser")."\";");
}
}


i pasted this

if ($bbuserinfo[posts] >= $postuserchange) {
$oldnames=$DB_site->fetch_array($DB_site->query("SELECT * FROM namelogs WHERE userid='$bbuserinfo[userid]'"));
$diff = time() - $oldnames[lastchange];
$limit = (86400 * $dayuserchange);
if ($diff > $limit) {
eval("\$changeuser = \"".gettemplate("changeuser")."\";");


:rolleyes: dumb mistake on my part......great hack PPN :)

Syphin 11-27-2001 02:08 AM

I keep getting this error when i change user names:

Warning: Argument to array_reverse() should be an array in /***/***/***/***/***/***/***/member.php on line 459


And this is whats on that line:

PHP Code:

      $DB_site->query("UPDATE user SET username='".addslashes(htmlspecialchars($username))."' WHERE userid='$bbuserinfo[userid]'");
      if (
$oldnames=$DB_site->fetch_array($DB_site->query("SELECT * FROM namelogs WHERE userid='$bbuserinfo[userid]'"))) {
        
$oldnames array_reverse($oldnames);
        
$oldnames explode("<~>"$oldnames[usernames]);
        if (
count($oldnames) >= 5) {
          
$oldestuser array_shift($oldnames);
          
array_splice($oldnames,4,4addslashes($bbuserinfo[username]));
        }
        else {
          
array_push($oldnames,addslashes($bbuserinfo[username]));
        }
        
$oldusers implode($oldnames"<~>");
        
$oldusers array_reverse($oldusers);   <<**>> LINE 459 <<**>>
        
$DB_site->query("UPDATE namelogs SET usernames='".addslashes($oldusers)."',lastchange='".time()."' WHERE userid='$bbuserinfo[userid]'");
      }
      else {
        
$DB_site->query("INSERT INTO namelogs (userid, usernames,lastchange) VALUES ('$bbuserinfo[userid]','".addslashes(htmlspecialchars($bbuserinfo[username]))."', '".time()."')");
      }
      
$bbuserinfo[username] = $username;
    }
  } 


Any Ideas? =/


-Syphin

Scott MacVicar 11-27-2001 05:26 PM

hmm documentation wrong?
PHP Code:

$oldnames array_reverse($oldnames);
        
$oldnames explode("<~>"$oldnames[usernames]); 

these lines are the wrong way round, should be

PHP Code:

 $oldnames explode("<~>"$oldnames[usernames]);
       
$oldnames array_reverse($oldnames); 


Syphin 11-29-2001 04:14 PM

thnx... =)

I have no clue how i messed that up tho.. lol it also said implode instead of explode... >_< oh wel, all is good now.. thnx.. :p


*and sry for the late reply*

-Syphin

DarkReaper 12-09-2001 02:48 AM

Name...logging? :(

Shadowz 12-09-2001 03:21 PM

Great Hack!!!

I was wondering can I just offer this feature to just a certaint user group?

DarkReaper 12-31-2001 05:34 AM

I fixed it all up. Everything works now - name logging, and the original goal of this hack. The problem was that it didn't change the username everywhere it was needed. Things such as the lastposter store the username, not the userid, so that didn't change.

I've tested it on my current vB running 2.2.1 and it works perfectly. File attached.

Scott MacVicar 01-01-2002 08:22 PM

thanks Darkreaper
i'll update the attachment on the first post.

Dakota 01-15-2002 10:47 PM

When I try to change names, it says the name is already in use, but I know its not. anyone know how to fix this?

Shenlong 01-19-2002 07:34 PM

hey can u make an install file for the mySQL tables plz?

haas 02-02-2002 05:38 AM

Hey great, just downloaded!

Im gonna test it on my local board.

neal 02-09-2002 02:40 AM

Bug for ya:

Whenever I use a username with - at the end, it says the username is already in use, even though it isn't, and won't let you change to it.

Soma 02-15-2002 03:07 PM

thanx man w00tit00t

neal 02-22-2002 02:35 AM

Quote:

Originally posted by neal
Bug for ya:

Whenever I use a username with - at the end, it says the username is already in use, even though it isn't, and won't let you change to it.


amity 03-13-2002 05:31 PM

ok, i am sorry to be clueless, but i followed the instructions perfectly and i don't see these new fields anywhere... i am looking around to find the coppa info and the parent e mail info, thinking it would be in the general vacinity and i can't find that either. hee hee.

someone help me out?
always,
amity

syion 03-22-2002 05:07 PM

Will this hack work on my board ?

Thanks

abc 03-28-2002 01:31 AM

I'm having trouble with the name logging component of this hack. It works fine as long as a user only changes their name once, but upon the second name change all records of previous names are wiped out. This was true in the initial hack instructions as well as in the most recent update.

any clues?

CeleronXL 03-30-2002 11:50 PM

Does this work on 2.2.4? I'd really like to use this if it does to keep those people who keep signing up with new names when they get bored of their old ones from doing that.

Webmasta XT 04-04-2002 09:14 AM

sorry but it stopped working.. i installed vb pad and rating hack and now it yust doesnt show up anymore ( username change thing)

help??

*edit* i attached my member.php file *edit*

bart 04-07-2002 01:43 PM

Great hack, thanks.

But look out when you have hacked register.php to not allow certain characters in a name.

After this:
Code:

    $username = trim($username);
    $username = eregi_replace("( ){2,}", " ", $username);

I added this:
Code:

    if (!eregi("^[_a-z0-9-]+([_a-z0-9-]+)*$", $username)) {
            eval("standarderror(\"".gettemplate("error_usernamespecialchars")."\");");
                exit;
        }


Webdude? 04-11-2002 11:45 PM

I installed this hack, now sigs dont show. How do I fix that?

Zachariah 04-12-2002 10:18 PM

nice hack , and it does work.

Q: what did i do wrong ? I have 2 of the settings in the options area.

Wildthinks 04-28-2002 07:44 PM

Hi,

nice hack. I have installed on my 2.2.5 , but I don't see the List of old nciks (show nothing) and the second is, that the names are not updatetd in the forum home, but in the threadview is it ok.
What can I do, that the display be correct?

N9ne 05-09-2002 07:44 PM

May I request a reviewed version for 2.2.5/2.2.6? I have seen many replies with bug reports on 2.2.5 and I have also experienced problems because of the version difference. It's a VERY useful hack and a MUST HAVE for me :) But I really need an updated version for great functionality :)

HughJorgen 05-10-2002 01:26 AM

Have the array error, as well as the change appearing in some places and not others, as well as the old names not appearing in the list if you change the name back to the original...

other than that it's a neat hack.. it definitely does what it says it does... thanx PPN

HughJorgen 05-10-2002 01:15 PM

Also, it was real tough trying to find all the line coordinates in your instructions (eg go to line 1255) since I use Pico. (Yes I am a n00b) Can anyone recommend a good .php editor that shows line position et al?

N9ne 05-10-2002 10:03 PM

BUMP!

PPN PLEASE READ and update this hack please :) I really want this hack to work perfectly :)

Webmasta XT 05-11-2002 04:11 PM

it stops working after some time... ive installed it, and a week later it stopped showing?

N9ne 05-11-2002 10:00 PM

I didn't have that happen, but the problem I have with my 2.2.5 is when I change my username, an error will appear at the top of the page however the username will change. It doesn't update the username around the forum either. In the profiles, their previous usernames are also not listed.

N9ne 05-21-2002 07:39 PM

PLEASE SOMEBODY? I'm having to bump up a lot of topics on this forum now, and none get answered :(

N9ne 05-22-2002 08:14 PM

This is unbelieveable, I've had to bump this topic up about 4 times now.

Lucrecia 05-23-2002 12:37 AM

I'm new at this. Where in your instructions it says to do this

Adding a table to your forums database
---------------------------------------
Now you will need to create this table for logging of the username and last time they updated.

CREATE TABLE namelogs (userid INT (5) not null , usernames LONGTEXT not null , lastchange INT (12) not null )


1) What do you I put in for The name and field of where it says this in my phpmyadmin (Create new table on database )

2) Also there is a screen that comes after and has options:

Field, Type, Length/Values*, Attributes, Null, Default, Extra, Primary Index Unique Fulltext

Table comments : Table type :

What do I put in for these options? Thanks in advance.

Scott MacVicar 05-23-2002 10:40 AM

I'm gonna rewrite this hack as soon as i get time, its mainly the checking in member.php that needs to be done.

Scott MacVicar 05-23-2002 11:40 AM

ok its rewritten and tested
just modification to the code in member.php and you'll need to drop the namelogs table and recreate it.

Will post it in the first post in a few moments.

Lucrecia 05-23-2002 05:04 PM

Thanks PPN

mashby 06-28-2002 11:20 AM

I'm anxious to install this hack on my new board, but I've ran into a small snag. I could be doing something wrong, so I hope someone here can help. :)

When I paste in the SQL queries into phpMyAdmin, I'm getting errors. For example, when I paste in
Code:

CREATE TABLE 'namelogs' (
  'userid' int(5) NOT NULL default '0',
  'username' longtext NOT NULL,
  'time' int(12) NOT NULL default '0'
) TYPE=MyISAM;

I get the following error from phpMyAdmin, "You have an error in your SQL syntax near '\'namelogs\' (
\'userid\' int(5) NOT NULL default \'0\',
\'username\' long' at line 1"

I'm using a text editor (EditPlus) to read the instructions and I'm pasting the info in from there. Anyone have any suggestions on what I'm doing wrong?


All times are GMT. The time now is 12:46 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.01423 seconds
  • Memory Usage 1,831KB
  • 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_code_printable
  • (3)bbcode_php_printable
  • (1)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