FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » FUDforum 3.0+ » where to modify src for new functionalities?
Show: Today's Messages :: Unread Messages :: Show Polls :: Message Navigator
| Subscribe to topic | Bookmark topic 
Switch to threaded view of this topic Create a new topic Submit Reply
where to modify src for new functionalities? [message #163052] Mon, 20 September 2010 17:43 Go to next message
lostpark is currently offline  lostpark   United States
Messages: 4
Registered: September 2010
Location: US
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
Hi,
I want to add a telephone field in the required info part of the user registration form. I want to know where to modify the code in order to get this working. I ask this because although some topics mention related info, some are a little out dated and can not find the files that are mentioned in my install.

I also want to add a new functionality to the project. Basically, I want to email every member of the forum the last registered user's phone, email, and name. I am trying to create a peer pressure forum to quit smoking so I need all the users to have that info.

Finally, I want the previous last registered user to be designated as the new last registered user "supervisor" and to that relationship appear on a list. This person will be the most responsible of supervising the user's correct behavior towards smoke quitting (calling him, emailing, so that he goes to the events, does the activities, etc). I think that I will have to add a "handler" field to the user table so that the supervisor's uid is linked to the new user. Again as the first question, which tables/code do I have to modify?

Thanks.
Re: where to modify src for new functionalities? [message #163056 is a reply to message #163052] Tue, 21 September 2010 02:00 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3624
Registered: December 2004
Karma: 17
Senior Member
Administrator
Core Developer
remove from buddy list
ignore all messages by this user
That would be easy to do if you are a programmer. You need to add the HTML to register.tmpl (/thm/default/tmpl directory) and logic too register.php.t (/src directory).

To make future upgrades easier, I would create a separate table to store the additional info.

To deploy, rebuild the theme from the Theme Manager.

Re: where to modify src for new functionalities? [message #163065 is a reply to message #163056] Wed, 22 September 2010 07:01 Go to previous messageGo to next message
Ernesto is currently offline  Ernesto   Sweden
Messages: 413
Registered: August 2005
Karma: 0
Senior Member
add to buddy list
ignore all messages by this user
Lostpark, make sure the laws of your country allows you to store those private details and if there are any regulations on how it can be accessed by the public, etc.

Re: where to modify src for new functionalities? [message #163190 is a reply to message #163065] Wed, 06 October 2010 12:02 Go to previous messageGo to next message
lostpark is currently offline  lostpark   United States
Messages: 4
Registered: September 2010
Location: US
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
I have modified the template so that a new field is created. Then I rebuilt the template using the theme manager. I have moved on into programming the php to register a new user. However I find the code very confusing. I am looking for the piece of code in which you send the received info into the database.
Could you please help me by indicating the files to modify for the php and where exactly you send the info of the new user for the table update? I am new to php and I am a little overwhelmed by the syntax. Thank you all.
Re: where to modify src for new functionalities? [message #163191 is a reply to message #163190] Wed, 06 October 2010 12:03 Go to previous messageGo to next message
lostpark is currently offline  lostpark   United States
Messages: 4
Registered: September 2010
Location: US
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
Answering Ernesto's comment, this is just for a class project, it will never see real deployment xD
Re: where to modify src for new functionalities? [message #163192 is a reply to message #163191] Wed, 06 October 2010 12:16 Go to previous messageGo to next message
Ernesto is currently offline  Ernesto   Sweden
Messages: 413
Registered: August 2005
Karma: 0
Senior Member
add to buddy list
ignore all messages by this user
users_reg.inc.t

Re: where to modify src for new functionalities? [message #163193 is a reply to message #163191] Wed, 06 October 2010 12:18 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3624
Registered: December 2004
Karma: 17
Senior Member
Administrator
Core Developer
remove from buddy list
ignore all messages by this user
I assume you've added the HTMl to register.tmpl and after the rebuild you can see your field in the registration/profile page?

Next you need to add the required code to register.php.t.
Re: where to modify src for new functionalities? [message #163194 is a reply to message #163193] Wed, 06 October 2010 12:29 Go to previous messageGo to next message
lostpark is currently offline  lostpark   United States
Messages: 4
Registered: September 2010
Location: US
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
Yes, I am able to see the field in the registration/profile page. Should I modify users_reg.inc.t or register.php.t or both? I've looked through register.php.t and don't see where the update is being made. Basically, I should be sending the telephone info when the update is being made, right? I am sorry but php is really new to me.
Re: where to modify src for new functionalities? [message #163201 is a reply to message #163194] Wed, 06 October 2010 15:15 Go to previous message
naudefj is currently offline  naudefj   South Africa
Messages: 3624
Registered: December 2004
Karma: 17
Senior Member
Administrator
Core Developer
remove from buddy list
ignore all messages by this user
Well, register.php.t will initially get control to set defaults.
It will also be called when the form is posted back.
It then instantiates the class in users_reg.inc.t to write the changes back to the DB.

PS: If you can wait for a couple of weeks, we should have Dynamic Customizable Profile Fields in the next release.
Quick Reply
Formatting Tools:   
  Switch to threaded view of this topic Create a new topic
Previous Topic: problem FEED
Next Topic: Globals.php path
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Oct 20 02:45:59 EDT 2017

Total time taken to generate the page: 0.00735 seconds