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 :: Polls :: Message Navigator
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 21:43 Go to next message
lostpark is currently offline  lostpark   United States
Messages: 4
Registered: September 2010
Location: US
Karma: 0
Junior Member
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 06:00 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
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 11:01 Go to previous messageGo to next message
Ernesto is currently offline  Ernesto   Sweden
Messages: 413
Registered: August 2005
Karma: 0
Senior Member
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 16: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
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 16: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
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 16:16 Go to previous messageGo to next message
Ernesto is currently offline  Ernesto   Sweden
Messages: 413
Registered: August 2005
Karma: 0
Senior Member
users_reg.inc.t

Re: where to modify src for new functionalities? [message #163193 is a reply to message #163191] Wed, 06 October 2010 16:18 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
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 16: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
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 19:15 Go to previous message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
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.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: problem FEED
Next Topic: Globals.php path
Goto Forum:
  

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

Current Time: Sun Apr 28 23:40:59 GMT 2024

Total time taken to generate the page: 0.03947 seconds