|
Joined: Jun 2001
Posts: 176
Member
|
Member
Joined: Jun 2001
Posts: 176 |
oh hold on I used version 1.3 . just installed this thing tonight
|
|
|
|
Joined: Nov 2001
Posts: 10,369
I type Like navaho
|
I type Like navaho
Joined: Nov 2001
Posts: 10,369 |
Lemme check it. The change above didn't get in and I thought it was.  Might have the instructions not updated like I thought they were. I'll look at it.
|
|
|
|
Joined: Nov 2001
Posts: 10,369
I type Like navaho
|
I type Like navaho
Joined: Nov 2001
Posts: 10,369 |
Yeah, the one that is posted fixes that and uses the whole date. Make sure you properly updated your showprofile.php file to have this bit in it: <br />if (($Birthmonth) && ($BirthDay) && ($BirthYear)) {<br /> $epochbday = mktime (0,0,0,$Birthmonth,$BirthDay,$BirthYear);<br /> $currentday = time();<br /> $epochage = $currentday - $epochbday;<br /> $age = intval($epochage / 31536000);<br /> $ageoutput = "<br /> <tr><br /> <td class=\"darktable\"><br /> Age<br /> </td><br /> <td><br /> $age <br /> </td><br /> </tr><br /> ";<br />}<br />else if ($BirthYear) {<br /> $age = date("Y") - $BirthYear;<br /> $ageoutput = "<br /> <tr><br /> <td class=\"darktable\"><br /> Aprox. Age<br /> </td><br /> <td><br /> $age <br /> </td><br /> </tr><br /> ";<br /><br />}<br />else {<br /> $age = "";<br /> $ageoutput = "";<br />} <br /> 
|
|
|
|
Joined: Nov 2001
Posts: 10,369
I type Like navaho
|
I type Like navaho
Joined: Nov 2001
Posts: 10,369 |
Then also be sure to remove the HTML bits from the showprofile.tmpl file, that earlier version had you add. It's all be replced with an $ageoutput variable. As you see I moved all the HTML into showprofile.php. For the accurate age to be calculated, you have to fill in month, day and year. If all 3 arent' filled out, then it'll say "Aprox. Age"..... and it simply does the differnce in years.... which might be a year off depending on what month your bday falls in. Hope that makes sense. But double check the instructions for showprofile.php AND showprofile.tmpl file. Make sure "$ageoutput" is in the showprofile.tmpl file. This wasn't used in earlier versions. 
|
|
|
|
Joined: Apr 2002
Posts: 1,768
Addict
|
Addict
Joined: Apr 2002
Posts: 1,768 |
[]... Dave's grab birthday fields ... grab the month, day and year, as separate fields ...[/] In the changes to adduser.php in Grab Birthdate 1.0.0: // Store birthdate (part 3 of 2). <br /> ... <br /> @list($dob, $dob_crc) = explode('-', $dob_with_crc); <br /> if (!$dob or ...) { <br /> $html -> not_right('dob invalid', $Cat); <br /> } <br /> [:"red"]$year = substr($dob, 0, 4); <br /> $month = substr($dob, 4, 2); <br /> $day = substr($dob, 6, 2); <br /> if (!checkdate($month, $day, $year)) { <br /> $html -> not_right('dob invalid (2)', $Cat); <br /> }[/] <br /> <br />// ---------------------------------- <br />// Insert this user into the database <br /> $query = " <br /> INSERT INTO {$config['tbprefix']}Users (...) <br /> VALUES (...) <br /> "; <br /> $dbh -> do_query($query); The above is untested, but should work. The added call to checkdate() is not essential, since the date has already been checked, but might be worthwhile in the event that some of the other code for this hack were to get changed. The INSERT INTO would also have to be modified to insert $year, $month and $day instead of, or in addition to, $dob. I was going to stick a delimiter into the DOB query string parameter so that explode() could be used, rather than substr(), but I'm already using "-", and I couldn't think of a different one.
|
|
|
|
Joined: Nov 2001
Posts: 10,369
I type Like navaho
|
I type Like navaho
Joined: Nov 2001
Posts: 10,369 |
These instructions will work for 6.2.1
|
|
|
|
Joined: Feb 2002
Posts: 2,286
Veteran
|
Veteran
Joined: Feb 2002
Posts: 2,286 |
Have I missed something here - is 6.2.1 out?
Ian
Fans Focus - Focusing on Fans of Sport (Okay - mainly football (the British variety at the moment - but expanding all the time....)
|
|
|
|
Joined: May 1999
Posts: 1,715
Addict
|
Addict
Joined: May 1999
Posts: 1,715 |
No, it is still in non-public beta, but will be released when it's deemed stable enough I guess.
|
|
|
|
Joined: Apr 2002
Posts: 1,768
Addict
|
Addict
Joined: Apr 2002
Posts: 1,768 |
Or maybe even earlier. 
|
|
|
|
Joined: May 1999
Posts: 1,715
Addict
|
Addict
Joined: May 1999
Posts: 1,715 |
LOL, could be. Let's hope not though. =]
|
|
|
|
Joined: Aug 2002
Posts: 1,191
Kahuna
|
Kahuna
Joined: Aug 2002
Posts: 1,191 |
I was wondering the same thing Gardener when I saw Josh's posts. I even checked the members area at infopop to make sure...  Warm regards Nikos
Nikos
|
|
|
|
Joined: Nov 2001
Posts: 10,369
I type Like navaho
|
I type Like navaho
Joined: Nov 2001
Posts: 10,369 |
Yeah, sorry.... at first I didn't really realize it wasn't in the member area yet. (I'm a bit slow on the uptake sometimes.  ) But Navaho says it'll be out soon. Any hacks I played with, I just thought I'd verify for people that I tested and it worked. 
|
|
|
|
Joined: Aug 2002
Posts: 1,191
Kahuna
|
Kahuna
Joined: Aug 2002
Posts: 1,191 |
Mr Bug has spoken! weee aaarrree nooottt woooorrrtthhhyyy.... (voice from the croud bowing)  Warm regards Nikos
Nikos
|
|
|
|
Joined: Oct 2000
Posts: 53
Junior Member
|
Junior Member
Joined: Oct 2000
Posts: 53 |
I'm having trouble to use this hack. When user update birthday setting in user cp, it cannot write the birthday information at DB. it write down emty and 0 only. Here's the screenshot of my User DB: [] http://www.doobic.co.kr/birthday.gif[/] What did I wrong? Please help me.... Junhyok
|
|
|
|
Joined: Nov 2001
Posts: 10,369
I type Like navaho
|
I type Like navaho
Joined: Nov 2001
Posts: 10,369 |
Are you getting any sql errors.
Check the steps for changebasic.php. Thats where the fields are written. Make sure the changes are in there, and the modified file has been uploaded to your server.
|
|
|
|
Joined: Oct 2000
Posts: 53
Junior Member
|
Junior Member
Joined: Oct 2000
Posts: 53 |
Okay I'll check all...But I'm already did it over thousand times...T_T!
Is there anything that you can expect?
Thanks
Junhyok
|
|
|
|
Joined: Aug 2002
Posts: 1,191
Kahuna
|
Kahuna
Joined: Aug 2002
Posts: 1,191 |
Junhyok,
Make sure your variables are all with the same name in all changed files (editbasic.php, editbasic.tmpl, changebasic.php). $Birthday is not the same as $BirthDay. This will cause a problem and will output empty or 0 values in your database. From what I see the update query works.
Warm regards
Nikos
Nikos
|
|
|
|
Joined: Oct 2000
Posts: 53
Junior Member
|
Junior Member
Joined: Oct 2000
Posts: 53 |
Thanks a lot...I'm working on it now.
Junhyok
|
|
|
|
Joined: Oct 2000
Posts: 53
Junior Member
|
Junior Member
Joined: Oct 2000
Posts: 53 |
Sorry it doesn't work.....
Junhyok
|
|
|
|
Joined: Aug 2002
Posts: 1,191
Kahuna
|
Kahuna
Joined: Aug 2002
Posts: 1,191 |
Hmmm... Weird.
I will send you a PM with my email address, if you don't mind, send me the files and I will compare them with my own and see what is wrong.
Warm regards
Nikos
Nikos
|
|
|
|
Joined: Oct 2000
Posts: 53
Junior Member
|
Junior Member
Joined: Oct 2000
Posts: 53 |
Thank you so much Nikos! You are the man!
Best regards Junhyok
|
|
|
|
Joined: Nov 2001
Posts: 10,369
I type Like navaho
|
I type Like navaho
Joined: Nov 2001
Posts: 10,369 |
Yes, thanks Nikos. I've been soooo busy lately, I haven't been keeping up here as much as usual. 
|
|
|
|
Joined: Aug 2002
Posts: 1,191
Kahuna
|
Kahuna
Joined: Aug 2002
Posts: 1,191 |
Josh,
It was mainly some typo errors. Nothing too serious. However I will try and rewrite the instructions more clearly so that it becomes a copy and paste job
Warm regards
Nikos
Nikos
|
|
|
|
Joined: Aug 2002
Posts: 111
Journeyman
|
Journeyman
Joined: Aug 2002
Posts: 111 |
I installed this hack and it seems to work fine. However, now my Users List isn't working correctly. It used to be multiple pages, but now it's cut off about a third of the way through the list. Did I edit a file incorrectly?
(It's just the display that isn't working -- all the users are still in the database and visible if you browse via letter rather than trying to browse the entire list).
|
|
|
|
Joined: Nov 2001
Posts: 10,369
I type Like navaho
|
I type Like navaho
Joined: Nov 2001
Posts: 10,369 |
Hmmm..... This mod doesn't affect the showmembers.php file. Not sure why it could affect that. There was a bug in 6.2 that passed the page number variable in the members list incorrectly. This has been fixed in 6.2.1. On a page that it seems you aren't seeing everybody, check the url and make sure it's got page=1 and not page = something else. 
|
|
|
|
Joined: Aug 2002
Posts: 111
Journeyman
|
Journeyman
Joined: Aug 2002
Posts: 111 |
Prior to reading your post, I decided I'd just systematically redo the hack by editing all the files again. I figured I could upload them one by one and try to find the problem. Oddly enough, after I'd re-edited and uploaded the first file, editbasic.php, the complete members list was back.
Oh well... perhaps it was that 6.2 bug affecting it. It *is* working now.
Next hack for me to tackle -- spellcheck!
|
|
|
|
Joined: Aug 2002
Posts: 239
Member
|
Member
Joined: Aug 2002
Posts: 239 |
Hey Josh... Just upgraded to IIP 5.3 from 5.2 and things are still working.... However, there is no box for the birthday listings on the index.php page. They are there, just no box for them so it kind of looks outta place.... Any ideas on this??
Some people read their stars..... I choose to write my own
|
|
|
|
Joined: Nov 2001
Posts: 10,369
I type Like navaho
|
I type Like navaho
Joined: Nov 2001
Posts: 10,369 |
Oh yeah, the table wrapper things have changed. I update my attachment of the pal on the first page of this post with the new table wrappers. Download that pal box, and you should be all set. 
|
|
|
|
Joined: Aug 2002
Posts: 239
Member
|
Member
Joined: Aug 2002
Posts: 239 |
Hiya Josh, Thanks! I did have to add a bit of code down near the bottom to get it to display right.... My users love this hack... I think they change their birthdays just so they can see their names up there... *LOL*  echo "</td></tr><tr><td align="left" valign="top" class="lighttable">"; // Close Header and Open Content
Some people read their stars..... I choose to write my own
|
|
|
|
Joined: Nov 2001
Posts: 10,369
I type Like navaho
|
I type Like navaho
Joined: Nov 2001
Posts: 10,369 |
Glad it worked for ya and that your users like it. 
|
|
|
|
Joined: Jul 2002
Posts: 79
Power User
|
Power User
Joined: Jul 2002
Posts: 79 |
I just tried to install this mod and all looks fine except that it doesn't seem to remember my settings when I go back to edit my profile. I tried setting my birthday to today as well but got the 'No Birthdays This Month' message on the main index. Any help gratefully received 
|
|
|
|
Joined: Aug 2002
Posts: 1,191
Kahuna
|
Kahuna
Joined: Aug 2002
Posts: 1,191 |
Alison, You have two areas where you can have a look at: 1. The actual loading of the data in the editbasic.php script - which then is displayed on screen. Try to access your database and using a tool like phpMyAdmin find your record in the w3t_Users table and edit it. Change the BirthYear for instance and put something like 2003. Open your My Home/Personal Information and have a look whether the 2003 is up there. If yes then your editbasic.php does its job properly. You might want to repeat the test by putting Jan for the BirthMonth and 27 for the day just in case. 2. The changebasic.php file and the query it runs. Two areas to check in this script: First at the top to see whether the variables are passed correctly in the script and last if the SQL statement is constructed properly. What I usually do is put some small print statements which I remove after to see whether a variable has the correct value. In the changebasic.php at the end you have <br />// ---------------------------------------------------<br />// Send them to their start page with the confirmation<br /> $html -> start_page($Cat);<br /> Temporarily change it to <br />print "$query";<br />// ---------------------------------------------------<br />// Send them to their start page with the confirmation<br />// $html -> start_page($Cat);<br /> and go and change your birthdate. You should see that the query will be printed on screen and it will be something like <br />UPDATE w3t_Users SET ........ U_BirthDay='27', U_BirthMonth='Jan', U_BirthYear='2003' WHERE ....<br /> If this is not the case then you have something wrong and you should check the instructions again. NOTE: Remember to change the <br />print "$query";<br />// ---------------------------------------------------<br />// Send them to their start page with the confirmation<br />// $html -> start_page($Cat);<br /> to <br />// ---------------------------------------------------<br />// Send them to their start page with the confirmation<br /> $html -> start_page($Cat);<br /> after you finish I hoipe this helps Warm regards Nikos
Nikos
|
|
|
|
Joined: Jul 2002
Posts: 79
Power User
|
Power User
Joined: Jul 2002
Posts: 79 |
Thanks Nikos but unfortunately it still doesn't work. The result from the print "$query"; is as follows: U_BirthMonth = '', U_BirthDay = '', U_BirthYear = '' I completely redid all the instructions from scratch just in case  Could this be related to the problems i have been having with the other mods? Josh has had to keep making additions for me. I am using 6.2.1.
|
|
|
|
Joined: Nov 2001
Posts: 10,369
I type Like navaho
|
I type Like navaho
Joined: Nov 2001
Posts: 10,369 |
Yes... I think when register globals are on.... we need to add the get_input statment for each variable in use. Give me a bit and I'll post the update. 
|
|
|
|
Joined: Nov 2001
Posts: 10,369
I type Like navaho
|
I type Like navaho
Joined: Nov 2001
Posts: 10,369 |
OK near the top of changebasic.php - you'll see all the get_input statements.... add these to them: <br /> $Birthmonth = get_input("Birthmonth","post");<br /> $Birthday = get_input("Birthday","post");<br /> $Birthyear = get_input("Birthyear","post");<br /> I think that'll fix it for you.  I will update the attachment here shortly.
|
|
|
|
Joined: Jul 2002
Posts: 79
Power User
|
Power User
Joined: Jul 2002
Posts: 79 |
Worked like a charm - as always  Thanks!
|
|
|
|
Joined: Nov 2001
Posts: 10,369
I type Like navaho
|
I type Like navaho
Joined: Nov 2001
Posts: 10,369 |
He he.... we are on to something with you.  Some of these old mods didn't have this new get_input function worked in when they were updated. It works for some, but if you have Register Globals on, it won't work without it.
|
|
|
|
Joined: Aug 2002
Posts: 1,191
Kahuna
|
Kahuna
Joined: Aug 2002
Posts: 1,191 |
True Josh, We have to make provisions to put the get_input functions to grab the variables for all mods just in case. I recently installed Zend studio and they recommended that I turn the globals off so most of my mods didn't work...  Alison: Nice that you got it working in the end. Warm regards Nikos
Nikos
|
|
|
|
Joined: Aug 2002
Posts: 111
Journeyman
|
Journeyman
Joined: Aug 2002
Posts: 111 |
Is there a way to display a small animated gif or other icon (like a birthday cake, fireworks, or similar) next to the birthday greeting?
|
|
|
|
Joined: Nov 2001
Posts: 10,369
I type Like navaho
|
I type Like navaho
Joined: Nov 2001
Posts: 10,369 |
Yeah... in the part that the birthday boy / or girl sees on their birthday: <br /> $BirthdayGreeting = "<div align=\"center\"><b><font size=\"+2\">Happy Birthday $Username!!</font></b></div>";<br /> You could add some HTML in there for an image, like this: $BirthdayGreeting = "<div align=\"center\"><b><font size=\"+2\">Happy Birthday $Username!!</font></b><img src=\"http://www.yourdomain.com/images/bdaygraphic.gif\" alt=\"bday\" border=\"0\"></div>";<br /> Just be sure to put the \ before each quote in the HTML you insert into the string.... or it'll break. 
|
|
|
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.
|
|
badfrog
somewhere on the coast of Maine
Posts: 94
Joined: March 2007
|
|
Forums63
Topics37,575
Posts293,930
Members13,823
|
Most Online6,139 Sep 21st, 2024
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|