Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#685 2010-04-01 17:07:22
Re: glz_custom_fields
Bloke wrote: That means, from the next TXP version onwards, gerhard no longer needs to rely on the max_custom_fields value and can instead call the native
getCustomFields()
function to get an array of the actual custom fields in use, contiguous or not. That should put an end to the errors on the admin side and should make custom fields more robust going forwards.
awesome. big ups! much ‘spect.
Offline
#686 2010-04-02 13:36:50
Re: glz_custom_fields
Hi Gerhard,
I’ve got this code cleanly producing a unix timestamp number for a date in a custom field, I end up with the variable I need (numEvent) (props to Els and Stef).
<txp:variable name="kate" value='<txp:custom_field name="Event date" />' />
<txp:variable name="julie" value='<txp:rah_replace from="/" to="-"><txp:variable name="kate" /></txp:rah_replace>' />
<txp:variable name="numEvent" value='<txp:smd_cal_now format="%s" now=''<txp:variable name="julie" />'' />' />
When an article is saved, I would like a custom field to store this numer — in other words, for this code to run to populate the chosen custom field.
I see I can choose a custom field of type ‘Custom Script’ and I have had a look at your my_images.php example, and got lost.
If this is complex, then it’s a big ask for me to ask you (or anyone) to simply do this code for me, but I’m asking just in case it’s very simple (always the optimist! :)
No worries and thanks anyway if you have no time and/or this is complex, and thanks also if you have time to comment, even if it’s only to say what I want to do can’t be done.
Cheers! -Alan
At LAST I’ve cheerfully donated to the core devs at #TXP. I only wish I were able to give more. Thanks to the devs and ALL fellow TXPers. -A
Offline
#687 2010-04-02 14:59:05
- redbot
- Plugin Author
- Registered: 2006-02-14
- Posts: 1,410
Re: glz_custom_fields
datorhaexa wrote:
meep! Could anyone enlighten me on my question about the limit of textfield? I need to know before I decide on how to go about a website.
textfield limit is 255 (mysql ‘varchar(255)’ data type)
textarea limit should be 65535 (mysql ‘text’ data type)
Offline
#688 2010-04-05 09:15:01
Offline
#689 2010-04-07 22:21:20
- Algaris
- Member
- From: England
- Registered: 2006-01-27
- Posts: 572
Re: glz_custom_fields
After a quick successful experiment with the plugin I’ve started reciving the following error messages.
On the Write page:
Warning: Table ‘custom_fields’ is marked as crashed and should be repaired SELECT `value` FROM `custom_fields` WHERE `name` = ‘custom_1_set’ ORDER BY id ASC in /Users/Ross/Dropbox/Sites/Dev/txp_ts/textpattern/lib/txplib_db.php on line 85
Year Group
Ooops! custom_1 has some problems. Go fix it.
On the plugin extensions page:
Warning: Table ‘custom_fields’ is marked as crashed and should be repaired SELECT `value` FROM `custom_fields` WHERE `name` = ‘custom_1_set’ ORDER BY id ASC in /Users/Ross/Dropbox/Sites/Dev/txp_ts/textpattern/lib/txplib_db.php on line 85
Any suggestions on how to fix this?
Just in case this has any bearing on things, I’m using Dropbox to sync my everything between my iMac and MacBook Pro so I can work on my websites on either computer. I’m using MAMP for the server and have moved the database files out of the MAMP folder (in Applications) and have placed it in my Dropbox folder. In the MAMP folder I have replaced the DB folder with a symbolic link pointing to its location within my Dropbox.
Last edited by Algaris (2010-04-07 22:26:21)
Offline
#690 2010-04-08 02:56:21
Re: glz_custom_fields
Hi Ross, I’m not qualified to speak for the author of glz_custom_fields, but as a user of it I have found it to be polished and reliable. So I would guess the problem lies elsewhere.
Also, I think I read somewhere in the MAMP manual or during install, that for MAMP to work reliably, the database files must stay where MAMP puts them at install — I may be wrong, but perhaps worth checking.
I know DropBox allows you to name an alternate place for it’s folder, so that may help you…
And last but not least, I have been told that copying databases by copying the files that represent the data is not ‘safe’ due to file locking and other issues and the reliable way to get data from a database to another (on another computer) is be export/import, using phpMyadmin or similar.
Hope that’s of some help and good luck, cheers, -Alan
At LAST I’ve cheerfully donated to the core devs at #TXP. I only wish I were able to give more. Thanks to the devs and ALL fellow TXPers. -A
Offline
#691 2010-04-08 07:14:10
- Algaris
- Member
- From: England
- Registered: 2006-01-27
- Posts: 572
Re: glz_custom_fields
It could be related. I did wonder later if the database files hadn’t fully synced between the computers.
Offline
#692 2010-04-08 10:51:35
Re: glz_custom_fields
Yes. You could also ask the question about copying db files on the MAMP forum, I’m not sure how responsive they are, but chances are other people will have tried this and maybe commented there. Cheers, -Alan
At LAST I’ve cheerfully donated to the core devs at #TXP. I only wish I were able to give more. Thanks to the devs and ALL fellow TXPers. -A
Offline
#693 2010-04-08 10:57:38
- Algaris
- Member
- From: England
- Registered: 2006-01-27
- Posts: 572
Re: glz_custom_fields
Thanks for the replies and advice Alan, I’ll have a look over in the MAMP forums see what I can find. In the meantime I’ll leave my Macbook running while working on my iMac so the files can sync as I work and should be fully finished when I need to work else where. It should be fairly quick all being well as dropbox has built in LAN syncing.
Offline
#694 2010-04-08 11:02:03
Re: glz_custom_fields
You’re welcome, good luck!
At LAST I’ve cheerfully donated to the core devs at #TXP. I only wish I were able to give more. Thanks to the devs and ALL fellow TXPers. -A
Offline
#695 2010-04-19 15:50:32
- feragnoli
- Member
- From: the hague
- Registered: 2005-02-10
- Posts: 150
Re: glz_custom_fields
hello, using the custom script option for a custom field I end up getting the following notification:
220 FTP on kasserver.com ready 421 Login Timeout (60 seconds): closing control connection
the notification appears immediately under the ‘override form’ drop-down menu.
has anybody had the same problem?
thanks
what was that again…?
Offline
#696 2010-05-24 11:51:52
Offline