Welcome, Guest. Please login or register.
Did you miss your activation email?
May 25, 2012, 02:29:30 PM

Login with username, password and session length
Search:     Advanced search
Interested in joining the WebsiteBaker team?
For more Information read here or on our new website.
155506 Posts in 21711 Topics by 7737 Members
Latest Member: simpleguy
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: Add homepage URL to News Module comments  (Read 359 times)
itsnick

Offline Offline

Posts: 24


WWW
« on: June 29, 2009, 11:42:05 PM »

I would like to be able to add a field to the "Add Comment" page in the News Module.  This field would be for including a link to your own personal home page along with your comment.

As of now I only have two fields one for "Title" and another for "Comment".  I was looking through comment_page.php and I saw several different inputs one being homepage in a hidden paragraph with the class nixhier in it.

What would be the easiest way to include a new field for a homepage link?  Can I make use of any of those hidden inputs?

Any help is greatly appreciated.
Logged
BerndJM

Offline Offline

Posts: 1764



« Reply #1 on: June 30, 2009, 03:09:16 AM »

Hi,
Quote
What would be the easiest way to include a new field for a homepage link?  Can I make use of any of those hidden inputs?
that's not such a good idea, because these fields are for spam-protection. wink
Even if you use one of them the data won't be stored anywhere.

It' not so easy to add additional function to an existing module.
Getting the input field for the data in the view.php (or whatever this file is called) is one thing, but you must store this data in the database - that means you have also to touch the add.php or save.php - you have to extend the database-table with a new field to store the data and last but not least you have to get back the data from the database to display them - you have to touch the view.php.
Depending on your needs you have to touch additional files e.g. to display the "new" data even in the backend.

Doing all this you should have a little bit experience in PHP and MySQL and you should think about the fact, that you modify core-files which will be overwritten by the next update ...

Regards Bernd
Logged

In theory, there is no difference between theory and practice. But, in practice, there is.
Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!