Icy Phoenix

     
 


Post new topic  Reply to topic 
Page 1 of 2
Goto page 1, 2  Next
 
Reply with quote Download Post 
Post SOLVED - Custom Profile Mod 
 
custom profile mod

if you add new field as necessary in registrattion from
this lets send it , if it blank or not
 




____________
jack of all trades, master of none
http://www.mieloma.com/ - http://www.casimedicos.com/ - http://www.egalego.com/ - http://www.casimedicos.com.es/ - http://www.medicosmir.com/
 
casimedicosSend private messageVisit poster's website  
Back to topPage bottom
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.

Support us
 
Reply with quote Download Post 
Post Re: custom profile mod 
 
So necessary fields are not necessary at the moment...

I'll check.
 




____________
Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
 
Mighty GorgonSend private messageSend e-mail to userVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: custom profile mod 
 
I have noticed the same problem recently - people are able to register without filling in added custom fields that have been marked as required... but as I'm using 059rc3 now, I didn't know if it was specific to that, or to 058 or earlier XS as well...

*Edit* As I recall, it used to work well in 049... Ah yes, those were the days...

It used to work fine,
in XS version 049:
as I recall,
no problem at all...
Its only now that it behaves like a swine!
 



 
Last edited by moreteavicar on Sun 24 Sep, 2006 20:03; edited 1 time in total 
moreteavicarSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: custom profile mod 
 
i have xs58 and its the error
 




____________
jack of all trades, master of none
http://www.mieloma.com/ - http://www.casimedicos.com/ - http://www.egalego.com/ - http://www.casimedicos.com.es/ - http://www.medicosmir.com/
 
casimedicosSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: custom profile mod 
 
It used to work fine,
in XS version 049:
as I recall,
no problem at all...
Since 058 it behaves like a swine!
 



 
moreteavicarSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: BUG -custom profile mod 
 
moreteavicar wrote: [View Post]
It used to work fine,
in XS version 049:
as I recall,
no problem at all...
Since 058 it behaves like a swine!

I think that in 049 this bug was there too...

Anyway, I still have to check this... please wait a little bit more!
 




____________
Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
 
Mighty GorgonSend private messageSend e-mail to userVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: BUG -Custom Profile Mod 
 
I had this working in 049 - it never accepted a registration/profile change without the field being completed!
I keep meaning to look into this myself... but like you I've been too busy
 



 
moreteavicarSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: BUG -Custom Profile Mod 
 
Update - I see this problem on sites where XS has been upgraded. It works fine on a fresh install of any version...
 



 
moreteavicarSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: BUG -Custom Profile Mod 
 
moreteavicar wrote: [View Post]
Update - I see this problem on sites where XS has been upgraded. It works fine on a fresh install of any version...

This is strange...

Anyway, when I have some free time, I'll test it. It is in my To Do List.
 




____________
Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
 
Mighty GorgonSend private messageSend e-mail to userVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Custom Profile Mod 
 
This problem seems to have mutated... users are forced to enter a required custom profile field, but it doesn't go into the database. There are no SQL errors displayed though!
 



 
moreteavicarSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Custom Profile Mod 
 
OK, found the problem. Custom Profile fields isn't completely installed... There are no SQL errors, because there are no SQL instructions

You need to do this:

#
#-----[ OPEN ]--------------------
#
includes/usercp_register.php

#
#-----[ FIND (around line 1125)]----------------------
#
Code: [Download] [Hide] [Select]
if( !($result = $db->sql_query($sql, END_TRANSACTION)) )
            {
                message_die(GENERAL_ERROR, 'Could not insert data into user_group table', '', __LINE__, __FILE__, $sql);
            }

#
#-----[ AFTER, ADD ]--------------------
#
Code: [Download] [Hide] [Select]
//
            // Custom Profile Fields MOD
            //
      $profile_data = get_fields('WHERE users_can_view = '.ALLOW_VIEW);
      $profile_names = array();
      $semaphore = 0;
      $sql2 = "UPDATE " . USERS_TABLE . "
          SET ";
      foreach($profile_data as $fields)
      {
        $name = text_to_column($fields['field_name']);
        $type = $fields['field_type'];
        $required = $fields['is_required'] == REQUIRED ? true : false;

        if(isset($HTTP_POST_VARS[$name]))
        {
          $temp = (isset($HTTP_POST_VARS[$name])) ? $HTTP_POST_VARS[$name] : array();
          if($type == CHECKBOX)
          {
            $temp2 = '';
            foreach($temp as $temp3)
              $temp2 .= htmlspecialchars($temp3) . ',';
            $temp2 = substr($temp2,0,strlen($temp2)-1);

            $temp = $temp2;
          }
          else
            $temp = htmlspecialchars($temp);
          $profile_names[$name] = $temp;

          $sql2 .= $name . " = '".str_replace("'","''",$profile_names[$name])."', ";
        }
        $semaphore++;
      }
      $sql2 = substr($sql2,0,strlen($sql2)-2)."
        WHERE user_id = ".$user_id;
      if(!$db->sql_query($sql2) && ($semaphore))
        message_die(GENERAL_ERROR,'Could not update custom profile fields','',__LINE__,__FILE__,$sql2);
            //
            // END Custom Profile Fields MOD
            //


With this added, any new registrations will see the profile field being saved to SQL. It is clear to see why this mod didn't work properly - the above code belongs within an else statement that begins around line 1027. And low and behold this else is the "else" to: if ( $mode == 'editprofile' ) around line 854 - in otherwords, when somebody wants to register, there was no code there to save the fields to the database!
 



 
moreteavicarSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: BUG -Custom Profile Mod 
 
thanks moreteavicar, i'll test it on my xs
 




____________
? Zuker - EDDB - LPM - Sharefields
 
ZukerSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Custom Profile Mod 
 
Thanks Zucker


For the thread - I forgot to mention - I take back what I said earlier about it working on 049 - back then I didn't realise that it wasn't sending data to SQL because there weren't any new people registering on my site at the time - people were only updating the custom fields by editing their profiles! Only recently have I been getting a lot of new registrations, and none of the required profile fields data were being stored! However, since adding the above, I've had some new registrations, and the data was stored in SQL as intended.
 



 
moreteavicarSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: BUG -Custom Profile Mod 
 
Great... I'll fix it...

Thank you.
 




____________
Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
 
Mighty GorgonSend private messageSend e-mail to userVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: BUG -Custom Profile Mod 
 
thanks
i will test it
 




____________
jack of all trades, master of none
http://www.mieloma.com/ - http://www.casimedicos.com/ - http://www.egalego.com/ - http://www.casimedicos.com.es/ - http://www.medicosmir.com/
 
casimedicosSend private messageVisit poster's website  
Back to topPage bottom
Post new topic  Reply to topic  Page 1 of 2
Goto page 1, 2  Next


Display posts from previous:    

HideWas this topic useful?

Link this topic
URL
BBCode
HTML




 
Permissions List
You cannot post new topics
You cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events


  

 

  cron