Gossamer Forum
Home : Products : Gossamer Forum : Discussion :

Adding a new column to Posts table

Quote Reply
Adding a new column to Posts table
I need to collect the 'X_Forwarded_For' environment variable since most of my users are behind proxy servers. The 'Remote_Addr' environment variable only capture the ip address of the proxy server.

I added a new column to the 'Post' table call 'post_ip_forwarded'. In the template 'include_post_common_write.html' and 'include_post_html_common_write.html', I also add
<input type="hidden" name="post_ip_forwarded" value="<%forward_ip%>"> where <%forward_ip%> has already been set to the 'X_Forwarded_For' environment variable value.

However when I do a posting, this value is not inserted into the database. I have no problem doing the same thing with the 'User' table when I included some new fields to capture birthday and gender and modifying the signup and edit profile templates.

Am I missing something here? Crazy


Quote Reply
Re: [dauhee] Adding a new column to Posts table In reply to
Hi,

It doesn't support custom columns, this is something we will definately fix for the next release. For now, just edit admin/GForum/Post/Write.pm and look around line 627. Should be obvious what to change. =)

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Adding a new column to Posts table In reply to
Hi

Thanks! Yes I see it now.

Cheers.