Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Added more custom_fields > language error
I have added about 20 extra custom fields and everything is working fine (DB updates correctly, all columns & rows are in place etc. etc.) APART from the language pack… I have modified BOTH en-gb.php and en-gb.txt and updated the language file from Install Language but custom_11_set and all others remain the same instead of Custom field 11 name. What did I overlook?!?
I know I am being very fussy… sorry > : ).
p.s.: forgot to mention that I am running RC4
Last edited by gerhard (2005-08-08 21:01:14)
Offline
Offline
#3 2005-08-11 16:51:18
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Added more custom_fields > language error
You have to modify txp_article.php and txp_prefs.php, and there are a few custom field functions floating around in the lib folder.
Offline
Re: Added more custom_fields > language error
Hi Mary, thanks for replying :P. I went through every single “cust” occurence in TXP RC4 (791 occurences btw) and made sure that everything looks right. There were 2 loops (a while one and another one) which had a “hard” limit of 10. I changed both of them to 30 but it stil doesn’t change custom_xx_set to Custom field xx name.
My gut feeling tells me that somewhere, something prevents the loop which changes the name to Custom field xx name to go all the way to 30. If only one of TXP die-hards had more time to reply to this thread… but I suppose everyone is busy with v.1.
Oh, btw, nothing in txp_prefs.php that would even hint to “custom fields”.
Last edited by gerhard (2005-08-11 18:27:31)
Offline
#5 2005-08-11 19:07:26
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Added more custom_fields > language error
Well prefs (txp_prefs.php) builds it from the database (see txpsql.php); custom fields definitions are in the prefs table. If you’re just looking for “custom fields” you’ll miss quite a bit.
I looked, and here’s what you need to add to the database (starting from 11 here as an example).
prefs_id: 1 (all use this number)
name: custom_11_set
val: custom11
type: 1 (all use this number)
event: custom (all use this text)
html: text_input (all use this text)
position: 11
name and position both need to increment by 1 as you go. :)
Offline
Re: Added more custom_fields > language error
Yes Mary, I found the advanced_prefs bit in advanced_prefs.php. I looked @ the mysql queries there and still, everything looks fine to me. The extra custom fields have been added to the db correctly and everything is working fine APART from the actual custom_xx_set on advanced_prefs being replaced by Custom field xx name from #10 upwards.
Anyways, I think that the whole thing is doing my head in and it’s not worth it. It’s a small “glitch” that I will have to live with. Even though annoying, there are tons of other more important things that need to be done. I wouldn’t like to use more of your precious time with silly things so pls forget about this issue.
Thanks Mary ; ), you are a star!
Offline
Re: Added more custom_fields > language error
Hello Gerhard,
I found this post of yours to be of great interest!!
I was scanning all txt files in search of the “roots” of custom fields.
I think custom fields are very useful and its number should be increased.
How is your site running? Considering you have successfully increased the number of custom fields.
Offline
Re: Added more custom_fields > language error
It’s working very well patchwork. I have multiple sites running more custom fields than the out-of-the-box TXP. Check this article for more details > 10 more custom fields please . Katie got my custom fields hack working as well ; ).
Cheers for the TXP tags manual. Will mention it on my website as well.
Last edited by gerhard (2006-01-31 20:59:08)
Offline