Josh - in Classic, there's a little cake icon that shows next to the user's name in posts when it's their birthday. Is there any chance of getting that to work with this?
OK - if you have this installed - one query may fail when you run the 6.4 altertable. As w already have the U_BirthDay field - the query in 6.4 which adds U_Birthday conflicted on my tests.
Backup your database first! I developed this for my own needs so use at your own risk.
The attached file - download it and raname it from .txt to .php. Upload it to your ubbthreads directory.
Then AFTER you run your 6.4 altertable, run the convertbday.php script.
It will change the name of the old birtday field.... add the new fields (which may have failed with the 6.4 altertable) and convert all the previously entered birthdays with this mod to the new UBB.Threads version 6.4 birthday field.
After the 6.4 altertable, I run convertbday.php and here are some results:
[]// script to convert JoshPet's birthday mod dates to the 6.4 date format // Written by Joshua Pettit www.joshuapettit.com We need to rename the old field. You might get an error here, which is OK.
SQL ERROR: Wed, Dec 10 2003 18:10:35 -0600 Database error only visible to forum administrators We need to create the new birthday fields - in case the 6.4 altertable couldn't do this at the time. You might get an error here too, which is OK.
SQL ERROR: Wed, Dec 10 2003 18:10:35 -0600 Database error only visible to forum administrators Now we will cycle through the users and update their birthday information.
The User Pasqual - had 1-8-1974 for their birthday the new field was set to 1/8/1974 Marcela - No Birthday Information The User Nicole - had 8-31-1977 for their birthday the new field was set to 8/31/1977 Yvonne - No Birthday Information lamlam - No Birthday Information[/]
This seems to work fine, but as you can see in the attached picture, the U_Birthday field is not filled. How come ?
Which SQL command should I use to fill that columm ?
>> SQL ERROR: Wed, Dec 10 2003 18:10:35 -0600 Database error only visible to forum administrators Probably would need to see the SQL Errors to see what's going wrong. They should be in your MySQL Error log - but looks like the script isn't being able to update the new field.
Yeah, this is like an altertable, you can't run it more than once without causing troubles.
The errors you show now are because you already ran it. We still don't know what the real error was when you ran it the first time.
If you need to run it on a db that you already ran it on, you could try commenting out the two queries which alter the tables... the update part of the script should do the trick.
This is sooo weird I tried it once again and I get no errors, but the birthday field doesn't get updated I attached the script I've run and the result page I get.
Main forum index page ends up with a query to match birthdays with no key index on any of the birthday fields added in this mod. Mysql ends up examining all w3t_User records. I noticed this when I did a debug=1 on the main forum index page.
(Saves a fraction of a second on page loads with an index added)
[]JoshPet said: OK - if you have this installed - one query may fail when you run the 6.4 altertable. As w already have the U_BirthDay field - the query in 6.4 which adds U_Birthday conflicted on my tests.
Backup your database first! I developed this for my own needs so use at your own risk. <img src="/forum/images/graemlins/wink.gif" alt="" />
The attached file - download it and raname it from .txt to .php. Upload it to your ubbthreads directory.
Then AFTER you run your 6.4 altertable, run the convertbday.php script.
It will change the name of the old birtday field.... add the new fields (which may have failed with the 6.4 altertable) and convert all the previously entered birthdays with this mod to the new UBB.Threads version 6.4 birthday field. <img src="/forum/images/graemlins/smile.gif" alt="" />
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.