Page 1 of 1

Changing Comment field name

Posted: Fri Jan 14, 2005 7:05 pm
by CJ000
What would be the best way to change the comment fields names (titles)?

ex: I don't want "homepage" but maybe "location" or something else. I thought probably just the lang file but perhaps a better & more compatible way?

Also, can fields be added subtracted to make the comment area more customizable?

Thx.

Cj

Re: Changing Comment field name

Posted: Sat Jan 15, 2005 3:33 pm
by garvinhicking
Please have a look at our Serendipity 0.8 Development version. We are using Smarty there so you can adjust ALL the HTML output to put into any strings you want.

This way you can also add/change Input fields. But pay attention that we don't store the contents of added input fields into the database, since our database layout is not customizable. You'd need to hack the core code for that...

Regards,
Garvin

Posted: Sat Jan 15, 2005 5:52 pm
by CJ000
I didn't want to use .8 since it isn't in a stable version yet (I'm not that brave or want to live on the edge,,,lol).

I only wanted to change the displayed name of the field "homepage" to something else as this doesn't fit our use of the type of visitors. I figured an easy fix was the lang file. <?>

Thx.

Craig

Posted: Sat Jan 15, 2005 6:38 pm
by garvinhicking
Yes, you can do that via the language file, this would be no problem.

However it's just easier to do with Serendipity 0.8 :-))

Regards,
Garvin

Posted: Tue Jan 25, 2005 8:33 pm
by CJ000
I was able to change the "website" to say "location" from the lang file but comments have the "http://" in front of them. How/what file can I change so that it doesn't add the http and instead maybe have it say 'location'?

Thx.

CJ

Posted: Wed Jan 26, 2005 11:04 am
by garvinhicking
That setting is in many files scattered thorughout the code; I think at least 2-3 occasions. Grep your serendipity files for 'http://' and you'll spot the places. You'll have to modify PHP code then, which you will loose after upgrading and need to do again.

What you want to do would better be done with creating a new database field and creating an event plugin to store the additional data using the 'frontend_saveComment' hook...

Regards,
Garvin

Posted: Wed Jan 26, 2005 5:01 pm
by CJ000
Hmmmm, okay :)

Perhaps best to just leave it as a small inconvenience and wait for 8 to be released.

Thanks Garvin.

Cj