Changing Comment field name

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
CJ000
Regular
Posts: 14
Joined: Fri Jan 14, 2005 6:50 pm
Location: Seattle

Changing Comment field name

Post 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
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Changing Comment field name

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
CJ000
Regular
Posts: 14
Joined: Fri Jan 14, 2005 6:50 pm
Location: Seattle

Post 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
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
CJ000
Regular
Posts: 14
Joined: Fri Jan 14, 2005 6:50 pm
Location: Seattle

Post 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
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
CJ000
Regular
Posts: 14
Joined: Fri Jan 14, 2005 6:50 pm
Location: Seattle

Post by CJ000 »

Hmmmm, okay :)

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

Thanks Garvin.

Cj
Post Reply