Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2005-07-07 08:21:46
- Niconemo
- Member
- From: Rhône-Alpes, France
- Registered: 2005-04-18
- Posts: 557
[request] total_customfield
Well.. a request that may interest some others :
It would be useful to have a plugin that make an addition of the number written in a chosen custom field (in the whole database) and return it as a tag
Eg.
For an icons download site, I have a custom fields for the number of items (icons) in the linked archive. It would be nice to have in the frontpage “there are currently < txp. total_customfield coustomfield=“myfield” / > icons to download here”.
If someone is interested in making such a plugin… thanks by advance
Nico
Offline
Re: [request] total_customfield
Too specific for a plugin I guess, but iirc you can add PHP code inside a page/form; so you can get that data with a couple lines of code.
Offline
#3 2005-07-07 09:57:24
- Niconemo
- Member
- From: Rhône-Alpes, France
- Registered: 2005-04-18
- Posts: 557
Re: [request] total_customfield
> Jeremie wrote:
> Too specific for a plugin I guess, but iirc you can add PHP code inside a page/form; so you can get that data with a couple lines of code.
Thank you for your answer :)
Not sure it’s so specific. My example is very specific but it can have a lot of other application : a total amount of products or money in a basket, statistic…
I thought about coding it directly in PHP (in a form that can be used anywhere) but, I’m not good in PHP (though that seems a basic operation) and I thought it could be a simple but useful plugin.
[ If I can find out how to make that basic addition on a row in the database in php (that should be possible even for php newbie like me), I have a question : do I need to add a call to the config settings to connect to the database or txp will do that ? ]
Last edited by Niconemo (2005-07-07 09:57:56)
Nico
Offline
Pages: 1