Comments (3)
Your first question requires some thinking, but I'm sure there's a way that only requires a few simple things to get the "relative to now" thing working. I will write up a proof of concept tomorrow, and explain why it works.
To answer your question in the entry title
field. The links to other data are given captions based on dokuwiki's own useheading setting. I'm guessing your wiki uses the 'Never' setting, so all links show their name as the page ID. Strata respects this setting, so if you change it to 'content' or higher, you'll automatically see nicer links using the entry title field as the caption.
Furthermore, the entry title field is automatically filled based on the title of the page the datablock is on (or the fragment that is used to identify the data block). For example:
<data TODO>
</data>
Would be enough to give the page an entry title. The entry title would then be equal to the page's title as dokuwiki sees it -- which is the first header on the page. You can override this behaviour by giving an entry title yourself, the entry title you give will be used for the block.
from dokuwiki-strata.
The query building is really low-level, and should not really be touched. Unless you want to add either new comparison operators, or to change the semantics of the query language itself, there should be another way get what you want.
For most value-related things, such as the relative times, the only change needed is the implementation of a type. The idea behind types in Strata is that they form a kind of layer around the low-level querying mechanism. The types are used for normalisation of user input (when a string in the query or data entry goes into the database), and for the display of values (when a string comes from a query and goes to the browser).
Your idea of 'TODAY+7days' is a good example of a string of user input. A type can easily handle that by normalizing it to the internal time format (which you correctly found is the unix timestamp).
As a proof of concept, I have written a relativedate
type that allows you to do both the comparison you are looking for, and to also display times relative to the current time (like "in 3 days", "in 4 hours", "2 hours ago", etc.). Because I realised that people leave open their browser tabs a lot, I've also made sure that the displayed time difference updates through a short piece of javascript...
You can find this type in the dokuwiki-plugin-stratatimetypes plugin. The readme over there should get you going.
Let me know if that helps! And if it does, feel free to close this issue.
from dokuwiki-strata.
That's brilliant. Many thanks for doing that so quickly.
I can honestly say that with your strata plugin, dokuwiki is the best thing ever... I'm now using it to organise everything I do at work.
Again, thank you very much.
(Also, thanks for the answer on the useheadings setting... didn't realise strata obeyed that setting).
from dokuwiki-strata.
Related Issues (20)
- Preventing display of input data HOT 3
- How to get data to refresh? HOT 1
- Improved parsing/error messages
- link style and image sizes HOT 7
- hard limit results HOT 3
- Output a single value into another plugin's syntax HOT 1
- Multiple entries on one page HOT 2
- <table> tag not working properly HOT 5
- References with namespace don't work HOT 5
- Multiple values for expressions with * can't be used HOT 2
- ODT export issue HOT 1
- Effect of the "useheading" configuration setting HOT 2
- ~~INFO:stratatypes~~ crashes wiki HOT 4
- Table gives correct result only when predicate not correctly written HOT 4
- Suggestion: Include a query from another page HOT 4
- Type "wiki" does not work HOT 4
- Incorrect output for @sum aggregate HOT 2
- SQLite Access can not access strata tables HOT 2
- Scoped mode HOT 2
- Page title [[]] as part of Fragment HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dokuwiki-strata.