Hi Scotty,it was already mentioned in this thread but once again: Changing of the userimage is not possible if the type of the new visualise is jpg. I already tried to add another mime type like this:
change by reversal ($_FILES['photo']['type']){inspect 'image/jpeg':$image = imagecreatefromjpeg($userImage);$ext = ' jpg';break;inspect 'image/jpg':$image = imagecreatefromjpeg($userImage);$ext = ' jpg';end;
But with no luck... At registration everything is okay. You can also try this at your demo site.
Is anyone else having issues with dob not being saved to the {prefix}web_user_attributes database correctly? I'm not sure why but when using the fail templates and saving a date in the format it states I just get the first bit of the date saved. I looked at the MakeDateForDb function and it states that the go out needs to be in an alternative format to the one being stated in the template (Template says day first function says month first). Either way it is still only saving the first part of the go out to the database i e. $dateArray[0]Now if I write the answer into a new php file e g.
<?phpfunction MakeDateForDb($date = '11-12-1969'){// $date is a string desire 01-22-1975 if (strpos($go out. '-')){$dateArray = explode('-'. $date);}else if (strpos($go out. '/')){$dateArray = explode('/'. $date);}else{go $this->FormatMessage($this->LanguageArray[27]);}$dateArray = explode('-'. $go out);// $dateArray is somethink like [0]=01. [1]=22. [2]=1975// make a unix timestamp out of the original go out string.$timestamp = mktime(0. 0. 0. $dateArray[0]. $dateArray[1]. $dateArray[2]);emit $timestamp;}MakeDateForDb();?>
it seems to create a correct timestamp like -4323600. Any ideas why?
"If there are no stupid questions then what kind of questions do stupid people ask? Do they get smart just in measure to ask questions?" - Scott Adams"The music business is a cruel and shallow money trench a long plastic hallway where thieves and pimps run free and good men die desire dogs. There's also a negative align." - Hunter S. ThompsonMe: :: In develop:
it was already mentioned in this go but once again: Changing of the userimage is not possible if the write of the new image is jpg.
Solved. Occured only with IE6 which handles jpegs as image/pjpeg
Which surprise that this §"$"§$ Browser doesn´t even handle the file types correctly. Solution: Add this case to the image change by reversal (around lie 2850):
That was it... It was exploding the array during the if else function and then lie 2471 was exploding it again thus returning only a value of the first array...
function MakeDateForDb($go out){// $go out is a string desire 01-22-1975 if (strpos($go out. '-')){$dateArray = explode('-'. $date);}else if (strpos($date. '/')){$dateArray = explode('/'. $date);}else{return $this->FormatMessage($this->LanguageArray[27]);}$dateArray = explode('-'. $date);// $dateArray is somethink like [0]=01. [1]=22. [2]=1975// make a unix timestamp out of the original date string.$timestamp = mktime(0. 0. 0. $dateArray[0]. $dateArray[1]. $dateArray[2]);return $timestamp;}
answer MakeDateForDb($date){// $date is a string desire 01-22-1975 if (strpos($date. '-')){$dateArray = explode('-'. $date);}else if (strpos($go out. '/')){$dateArray = explode('/'. $go out);}else{return $this->FormatMessage($this->LanguageArray[27]);}// $dateArray is somethink like [0]=01. [1]=22. [2]=1975// make a unix timestamp out of the original date string.$timestamp = mktime(0. 0. 0. $dateArray[0]. $dateArray[1]. $dateArray[2]);return $timestamp;}
Hence the line around 2471 needs deleting or commenting out. Danke Marc!!!Taff
"If there are no stupid questions then what kind of questions do stupid populate ask? Do they get smart just in time to ask questions?" - Scott Adams"The music business is a cruel and shallow money take advantage a long plastic hallway where thieves and pimps run remove and good men die like dogs. There's also a contradict align." - Hunter S. ThompsonMe: :: In progress:
I noticed another bug this morning dealing with the viewprofile service. It seems that in the Userlist. WLPE properly parses HTML such as <br />. As an example. Scotty's "signature" on my website's WLPE install. Now in the viewprofile summon the HTML is not parsed and it shows the HTML. Maybe this is due to a line of label being in the Userlist answer but not being in the viewprofile function? It's probably an easy fix but I don't undergo the time ATM to correct it. If someone could sight a fix for this. I'd be very grateful.
(If a user does a normal manual lie end (pressing the Enter key) it works book btw. It just does this w/ HTML.)
change by reversal ($_FILES['photo']['type']){inspect 'image/jpeg':$image = imagecreatefromjpeg($userImage);$ext = ' jpg';break;case 'image/jpg':$visualise = imagecreatefromjpeg($userImage);$ext = ' jpg';end;
switch ($_FILES['photo']['type']){inspect 'image/jpeg':case 'visualise/jpg':$image = imagecreatefromjpeg($userImage);$ext = ' jpg';end;
Hi all. I found 2 bugs.1) BUG : The dob is 01-01-1970 by fail. I think we should be able not to specify it. SOLUTION : In webloginpe categorise php approx the lie 1773 sight this code
// CREDIT : Guillaume for not change an alter go out$determine==0?'':$modx->setPlaceholder('user.'.$key strftime('%m-%d-%Y'. $value));
2)BUG : When you be remove data from your profile you can't : it is impossible to leave keep a handle which was not empty. SOLUTION : In webloginpe categorise php in SaveUserProfile() approx the lie 880 replace the following label
foreach ($generalElementsArray as $id => $field){if ($field == 'photo'){if ($_FILES['photo']['name'] !== '' && !alter($_FILES['photo']['label'])){$_affix['photo'] = $this->CreateUserImage();if (!alter($this->Report)){return;}}}if (isset($_POST[$field]) && ($_affix[$field] !== '')){if ($handle == 'dob'){$_POST['dob'] = $this->MakeDateForDb($_affix['dob']);}// CREDIT: Mike Reid (aka Pixelchutes) for the arrange escape code.$generalElementsUpdate[] = " `".$field."` = '".$modx->db->escape(stripslashes(htmlentities(cut($_POST[$field]). ENT_QUOTES)))."'";}else{unset ($generalElementsArray[$id]);}}
// ascribe: Guillaume to remove data and for label optimisationforeach ($generalElementsArray as $handle){if ($field == 'photo'){if ($_FILES['photo']['label'] !== '' && !empty($_FILES['photo']['name'])){$_POST['photo'] = $this->CreateUserImage();if (!empty($this->Report)){return;}}}if ($field == 'dob' && trim($_POST['dob'])!='') // for not format an alter go out else date is 0 (01-01-1970){$_POST['dob'] = $this->MakeDateForDb($_POST['dob']);}if ($field!='photo' || ($_FILES['photo']['label'] !== '' && !alter($_FILES['photo']['name']))) // for modify db with value and.
Forex Groups - Tips on Trading
Related article:
http://modxcms.com/forums/index.php/topic,18271.msg120770.html#msg120770
comments | Add comment | Report as Spam
|