Icy Phoenix

     
 

Trying To Develop New User Profile

Trying To Develop New User Profile

Article
Reply with quote    Download Post  
Post Trying To Develop New User Profile 
 
Okay.  I’m trying to do something big, almost as big as a mod. This is for those who take challenges:

My site is not just a discussion forum, it’s an RPG game, where users are characters, forums are places and topics are events (you guys have probably seen one of those around).
So, for profile, I wanted to extend the fields a little, I mean, since the profile in my site should have the characters AND the players info, there were many fields that I’d have to add, like, Race, Weigh, Blood, Height, Abilities and so on,  and I didn’t wanna use only the regular “custom fields’ option”. So:

1.    I completely changed the structure in view_profile_body.tpl file; I added many new fields and took off those which I didn’t want; (see here)
2.    I invented some new “{} tags” (don’t know how to call them) for the new fields;
3.    I crated a new .tpl file for the form in which users would submit their characters info (see this in .htm here);

Now, the questions are:

1.    Will it be easier if I create a new .php file for the form (just copying preset code from a similar file) or if I extend the profile editing file to have the new fields?

2.    What is the .tpl file for >this page<? (maybe it will be here that I’ll put my new form)

3.    What makes the “{} tags” work? In which file do I have to copy them and that tells them what to do? I'm almost sure there is a file where all the tags like {USERNAME} {AGE} {GENDER} are saved for the files containing them refer to.

4.    Where can I learn more about this?


P.S.: I’m not using the newest version of Icy Phoenix because it’s too late, I mean, I have changed many things on the site (style, html, etc), and I don’t want to lose the changes.



 
Codi - View user's profile Send private message  
Codi [ Tue 26 Jul, 2011 21:46 ]
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.

Support us


Trying To Develop New User Profile

Comments
Reply with quote    Download Post  
Post Re: Trying To Develop New User Profile 
 
hm

for the Tags you should look in includes/constants.php and includes/page_header.php

and then edit your lang files aswell



 
spydie - View user's profile Send private message  
spydie [ Tue 26 Jul, 2011 23:41 ]
Reply with quote    Download Post  
Post Re: Trying To Develop New User Profile 
 
Edit the profile file. It includes includes/usercp_x.php, you might want to use that structure.
2) For the page, I guess it's profile_edit_body
3) it's $template->assign_vars(array( in includes/usercp_editprofile.php (i.e.)



 
Informpro - View user's profile Send private message  
Informpro [ Wed 27 Jul, 2011 01:54 ]
Reply with quote    Download Post  
Post Re: Trying To Develop New User Profile 
 
@ spydie and Informpro

No, I found the already existing vars {PHONE}{ICQ}{OCCUPATION}, etc, in usercp_register.php and in  usercp_viewprofile.php.

Here's what I did:

1. Went to profile_add.tpl and, just for a test, created two new fields above the "Phone" field, and for their input, I set values {FIELDONE} and {FIELDTWO}, let's say.

2. I went then to usercp_register.php and usercp_viewprofile.php and made a "fieldone" and "fieldtwo" copy for everything that had the word "phone", putting those always next to where the "phone" tags existed (there were maaaany of them, each one for a special situation I figure, but all the same I wrote many fieldone, $fieldone, $user_fieldone, FIELDONE and so on, following the pattern of phone always.

3. I then headed to my new view_profile_body.tpl and put the {FIELDONE} and {FIELDTWO} for the fields that I wanted.

4. I changed my profile, putting something random in those new fields.

And...

It yet didn't work. I had an error message, saying that there was found an unknown profile field. Guess the name? $user_fieldone.
There must be somewhere else where to put the vars to call to else than usercp_register.php and usercp_viewprofile.php!

Thanks, anyways. =/



 
Codi - View user's profile Send private message  
Codi [ Wed 27 Jul, 2011 07:42 ]
Reply with quote    Download Post  
Post Re: Trying To Develop New User Profile 
 
try to kill CrTracker in profile, just for testing porposes.

i´m quiet shure, that  it´s something to do with the Tracker



 
spydie - View user's profile Send private message  
spydie [ Wed 27 Jul, 2011 12:43 ]
Reply with quote    Download Post  
Post Re: Trying To Develop New User Profile 
 
Check the file ctracker/engines/ct_security.php line 178. Because, if some fields not in this list contains some result in the previous array (such as just '), ctracker will become crazy and say you're trying to crack the board and so on ...



 
Informpro - View user's profile Send private message  
Informpro [ Wed 27 Jul, 2011 14:17 ]
Reply with quote    Download Post  
Post Re: Trying To Develop New User Profile 
 
One more thing.

These userfield´s have to exist aswell in  usertable in the database, or Icy wan´t find the field and throw an error



 
spydie - View user's profile Send private message  
spydie [ Wed 27 Jul, 2011 14:29 ]
Reply with quote    Download Post  
Post Re: Trying To Develop New User Profile 
 
spydie wrote: [View Post]
One more thing.

These userfield´s have to exist aswell in  usertable in the database, or Icy wan´t find the field and throw an error


Where exactly is that?



 
Codi - View user's profile Send private message  
Codi [ Wed 27 Jul, 2011 20:48 ]
Reply with quote    Download Post  
Post Re: Trying To Develop New User Profile 
 
go to your database with Phpmyadmin and look for prefix_users

you need to create a column in there for each field created



 
spydie - View user's profile Send private message  
spydie [ Wed 27 Jul, 2011 21:53 ]
Reply with quote    Download Post  
Post Re: Trying To Develop New User Profile 
 
No, Icy Phoenix includes profile fields (mod from ptirhiik). I don't know how informations are fetched from this table, though.



 
Informpro - View user's profile Send private message  
Informpro [ Wed 27 Jul, 2011 23:36 ]
Reply with quote    Download Post  
Post Re: Trying To Develop New User Profile 
 
Quote:
So, for profile, I wanted to extend the fields a little, I mean, since the profile in my site should have the characters AND the players info, there were many fields that I’d have to add, like, Race, Weigh, Blood, Height, Abilities and so on,  and I didn’t wanna use only the regular “custom fields’ option”.




 
spydie - View user's profile Send private message  
spydie [ Thu 28 Jul, 2011 00:08 ]
Reply with quote    Download Post  
Post Re: Trying To Develop New User Profile 
 
He don't want to use that option to display them, but why not use that table ?

But thanks, you're right, I didn't saw that.



 
Informpro - View user's profile Send private message  
Informpro [ Thu 28 Jul, 2011 00:36 ]
Reply with quote    Download Post  
Post Re: Trying To Develop New User Profile 
 
Sorry for my ignorance but I don't exactly know what the database file is or where it's located. I figure that if I know it and add the vars there as well, I'll succeed at last.



 
Codi - View user's profile Send private message  
Codi [ Wed 07 Sep, 2011 01:06 ]
Reply with quote    Download Post  
Post Re: Trying To Develop New User Profile 
 
spydie wrote: [View Post]
go to your database with Phpmyadmin and look for prefix_users

you need to create a column in there for each field created


you should be able to find phpMyAdmin in your hosting controlpanel (don't mess with it without having a good backup of it)



 
Joshua203 - View user's profile Send private message  
Joshua203 [ Wed 07 Sep, 2011 01:32 ]
Display posts from previous:    

HideWas this topic useful?

Post new topic  Reply to topic  Page 1 of 1
 
 




 


 

  cron