Page 1 of 1
Recipes entry...
Posted: Thu Feb 02, 2006 6:14 pm
by Hello McFly
I am creating a web log for a vegetarian group in my area, with multiple users. I'd like to create a separate "Create Entry" page for recipes.
I already created a "Recipes" category. Is there a way for me to change the look of the "New Entry" admin panel, so that I can force users to enter data in a specific way. (i.e. a list of ingredients, then a list of directions, then a description of the recipe?)
I'd also like to have a field for the source of the recipe. If it's a book they can add the ISBN. I could then hard code that to generate an amazon link that will monetize the site for me.
Should I write a plugin for this, or is there a simple way to create a new "entry" screen just for recipes?
I appreciate your time.
Re: Recipes entry...
Posted: Thu Feb 02, 2006 6:27 pm
by garvinhicking
You can't do that out of the box. But you can create a plugin for that, like the static page plugin for example. Create your own entry form and then use the s9y api functions like serendipity_updertEntry() to insert/update your recipes.
The other way of course is to work with "Custom Entryproperties" that offer you certain entry properties like ISBN which you can enter for entries that are a recipe. In your entries.tpl frontend template you can then format entries different that have that property set.
Regards,
Garvin
Posted: Thu Feb 02, 2006 6:34 pm
by Hello McFly
Thanks, I'll take a look tonight and see if I can sort it out. Where do I get started with creating plug-ins? The nav-button isn't working on the main sy9.org site.
Thanks again Garvin
Posted: Thu Feb 02, 2006 6:43 pm
by garvinhicking
The best way to get started with plugins, is too look at existing ones.
Then our technical docs at
http://www.s9y.org/40.html offer some pieces of help which I hope you find useful.
What do you mean with the nav-button on s9y.org? It does seem to work for me here?!
Regards,
Garvin
Posted: Thu Feb 02, 2006 6:51 pm
by Hello McFly
When I click the "Plugins/Add-Ons" button on the nav bar of s9y.org I get the following:
Code: Select all
Untreated: XmlSyntaxException
In file: /usr/local/lib/php/cowiki-0.3.4/includes/cowiki/class/parse/class.XmlEventParser.php
Reason: Not given (NULL)
--------------------------------------------------------------------------------
Trace:
* class XmlEventParser throws XmlSyntaxException in line 105
* method XmlEventParser::getItems() rethrows in line 105
* method XmlEventParser::getItems() rethrows in line 86
* method RssFeed::parse() rethrows in line 90
* method RssManager::read() rethrows in line 101
* method CustomRssViewer::readFeed() rethrows in line 120
* method PluginLoader::perform() rethrows in line 217
* method FrontHtmlTransformer::load() rethrows in line 612
* method FrontHtmlTransformer::_transformPlugin() rethrows in line 210
* method FrontHtmlTransformer::preg_replace_callback() rethrows in line 210
* method PrivateFrontDocumentDisplay::transform() rethrows in line 130
* method PluginLoader::perform() rethrows in line 217
* method TemplateProcessor::load() rethrows in line 323
* method TemplateProcessor::processPlugin() rethrows in line 230
* method TemplateProcessor::preg_replace_callback() rethrows in line 230
* method TemplateProcessor::processTemplate() rethrows in line 120
* in file index.php ->parse() rethrows in line 488
* in file index.php processNodeCommand() rethrows in line 558
* in file index.php main() terminates in line 42
--------------------------------------------------------------------------------
Engine: coWiki 0.3.4 (February 24 2005) running PHP 5.0.4
I'll check out the article.
Thanks yet again.
serendipity_updertEntry() ?
Posted: Thu Feb 16, 2006 5:40 pm
by Hello McFly
Wher do I find this: serendipity_updertEntry()
Is that in the TPL? I'm axious to start playing around with this.
Thanks in advance.
Re: serendipity_updertEntry() ?
Posted: Thu Feb 16, 2006 5:49 pm
by garvinhicking
That function is found in include/functions_entries.inc.php.
Regards,
Garvin