ℹ️
Welcome to the archive of the old FlatPress support forum. Browse more than a decade of FlatPress wisdom! Login is disabled.

The current FlatPress support forum is available here: forum.flatpress.org
Extending Flatpress article schema
  • I know this is not what Flatpress is designed for, but please humour me... Is there a way to add additional fields/properties to the article files. E.g. as well as the standard attributes of VERSION|SUBJECT|CONTENT|AUTHOR|DATE|CATEGORIES, I'd like to also be able to add some additional attributes in there. This would allow the Flatpress engine to be used for non-blogging websites where a database would more normally be required - e.g. a searchable real-estate database. Has anyone done this, or know if it's possible? Thanks, Ian
  • no, I'd like it to become more flexible really. the low-level library (bplustree) might be of help, though, it's the best documented part of the project, you can find it under fp-includes/core/core.bplustree.class.php it is fully independent from the rest of the system, it is an implementation of a B+Tree associative index, you can then pair it with whatever storage format you like HTH
  • Thanks for the pointer nowhereman (and, while I'm here, a BIG thanks for giving us Flatpress). Looking at that class, I think that's probably a bit beyond me. I was hoping I'd be able to just add a new variable name in a file somewhere and *magically* (don't laugh) Flatpress would read it out of the entry files and assign the value to a nice $variable name that I could use in tpls.
  • well, you can still do that (there are some downsides, though, but we'll expand on that if needed). What are you trying to accomplish exactly?
  • I've got a client who wants a website that includes a searchable property database alongside a regular blog. So, as well as news entries with the standard flatpress attributes there would ideally be other attributes such as price, type of property, location and sold status. Writing such a database and the pages to manage, search and display results looks pointless when the flatpress engine does so much of it. I think maybe I can do 90% of what I need to using categories - although that would mean that customers would only be able to search by one attribute at a time whereas they'd expect to be able to search for, say, property type x in price band y. I'd also have to hide the 'news' category that she wants to use for her general blog entries (so that 'news' doesn't show up as a property search criterion) but I can do that clientside if I need to. Thanks for any advice. Ian
This discussion has been closed.
All Discussions
Start a New Discussion

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion