Giter VIP home page Giter VIP logo

dokuwiki-plugin-data's Introduction

Hi there 👋

I'm Andreas Gohr, welcome to my github profile. I'm a web developer and maker living in Berlin, Germany. You probably know me from my work on DokuWiki, but you'll find all kinds of other projects here. Check the links below to get started.

🔨 Check out what I'm currently working on

These are the projects I most recently worked on.

📜 My recent blog posts

I blog at splitbrain.org for nearly two decades now. Here is what I have published recently.

♥️️ These awesome people sponsor me (thank you!)

If you like what I'm doing, you can sponsor me on github. These fine people already do.

:octocat: All the statistics

github stats top languages

🐙 Octo-Ring

I'm a member of Octo-Ring - a webring (remember those?) for github user profiles. Because why wouldn't I?

dokuwiki-plugin-data's People

Contributors

adrianheine avatar alexgearbox avatar annda avatar araname avatar brilanto avatar dom-mel avatar dturkalj avatar einhirn avatar endoanaconda avatar glensc avatar klap-in avatar magistere avatar micgro42 avatar michitux avatar mprins avatar nikopp avatar sawachan avatar schplurtz avatar selfthinker avatar splitbrain avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dokuwiki-plugin-data's Issues

Datatable filter date

Add the ability to filter dates against the current date in a datatable. ie. foo_dt < %now%

Hidden style dd/dt entries?

Some fields of the data entry record shows up with hidden style attributes.
It must be a feature instead of a bug, but cannot find the reason in docs nor in the source.
My only observation is that the field name is the same as an other data entry class name.
But this is still not a reasoning for this behavior, not any sign for it in docs/sources.
Can anyone clarify it?
Thanks.

%now% variable problem

Hello

Having a "database" with events, we'd like to list all coming events (beginning after the current date). The following code doesn't work as expected:

---- datatable ----
cols    : %title%, website, begin_dt, end_dt, deadline_dt, notification_dt, cameraready_dt
headers : Details, Web Site, Start, Finish, DEADLINE, Notification, Camera Ready
filter  : begin_dt>%now%
sort    : deadline
----

Is it a bug with the %now% variable or we did something wrong?

Regards,
wta

SQL warning ind datatable

I tried to create some datatable, but I suffered this PHP warning:
Warning: sqlite_num_rows() expects parameter 1 to be resource, null given in /var/www/dokuwiki/lib/plugins/data/syntax/table.php on line 290.
However, the table is rendered OK.
I see the source code and there si used variable $res, which contains resource reference in global context, but not inside the functions. The patch should be simple.

RFE: "addr" datatype

In the wiki page below "Missing features" there is a line calling for "addr" datatype: This could be done with a type alias for "url" to add a pre- and postfix so it creates the Link to google etc.

Since it's in an discussion area and a RFE I didn't edit the Wiki page but created this issue...

multiple filters on same type of column

I am trying to use the data plugin to store research papers with associated keywords. I find that I cannot filter on multiple keywords with the current implementation. As an example, consider the following entries:

---- dataentry paper ----
title       : title1
keyword_tags: author1, author2, topic1
----

---- dataentry paper ----
title       : title2
keyword_tags: author1, topic2
----

---- dataentry paper ----
title       : title3
keyword_tags: author2, topic2
----

---- dataentry paper ----
title       : title4
keyword_tags: author2, topic1
----

I want to query the database for all papers with keywords author1 and topic1. When using datalist, I can search on keyword=author1 or keyword=topic1 successfully. But I cannot search for both author1 and topic1 as keywords:

---- datalist ----
cols  : title
filter: keyword=author1
----
result: title1, title2

---- datalist ----
cols  : title
filter: keyword=topic1
----
result: title1, title4

---- datalist ----
cols  : title
filter: keyword=topic1
filter: keyword=author1
----
result: nothing

I have investigated the problem a bit and I have found that the _buildSQL function in table.php has this logic for filtering based on hidden columns:

// filter by hidden column?
if(!$tables[$col]){
    $tables[$col] = 'T'.(++$cnt);
    $from  .= ' LEFT JOIN data AS ' ...

In the example I have been working with, a new LEFT JOIN statement will not be added for the second keyword filter because it is the same type of column as the first filter.

nspage behaviour

If I have this entry:
something_page:somewhere:whatever, the result is like [[somewhere:whatever]]
But if I use
something_nspage:somewhere:whatever, the result is like [[something:somewhere:whatever:]]

Is realy what it should be?

'filtered list' message above datatable

When using the taglinks you returns to a page with the datatable (when you create it there of course). This table shows only the entries with contains the tag you clicked. Either i miss some indication that i see now the a filtered list and not the complete list.
I think it would be nice to have a possibility to place a message above the datatable that tells it is a filtered list.

type lbl(s)

On the Happy Users page I noticed an extra type "lbl(s)" which does not seem to be available with the standard data plugin..Is this done with a type alias? Or is there a problem with the plug-in?

SQL error

I have problems with the plugin:

I create 2 test pages with:

---- dataentry ----
título     : Test1
descripción    : Descripción corta del contenido del documento
tipo_documento  : Documento
autor       :  xkill
fecha       :  22/02/2010 12:36
etiquetas   : test, zona_de_pruebas
----

and

---- dataentry ----
título     : Test2
descripción    : Descripción corta del contenido del documento
tipo_documento  : Documento
autor       :  xkill
fecha       :  22/02/2010 12:39
etiquetas   : test2, zona_de_pruebas
----

When I create a data cloud:

---- datacloud ----
field: etiquetas
min: 1
limit: 20
----

And the could appears correct, but when I click on a field, apears an error like:

Warning: sqlite_query() [function.sqlite-query]: near "AND": syntax error in /var/www/doku/lib/plugins/data/syntax/table.php on line 196

Warning: sqlite_fetch_array() expects parameter 1 to be resource, boolean given in /var/www/doku/lib/plugins/data/syntax/table.php on line 225

Warning: sqlite_query() [function.sqlite-query]: near "AND": syntax error in /var/www/doku/lib/plugins/data/syntax/list.php on line 42

Warning: sqlite_fetch_array() expects parameter 1 to be resource, boolean given in /var/www/doku/lib/plugins/data/syntax/list.php on line 49

IE CSS Problem dataentry

The internet explorer messes the dataentries up because of the clear:left; in div.dataplugin_entry dl dt { } in style.css.

I recommend the following changes:
div.dataplugin_entry dl dt {
width: 45%;
}

div.dataplugin_entry dl dd {
    width: 45%;
}

Fatal Error - entry.php

When I inserted my data into the page, I was presented with:

Warning: in_array() expects parameter 2 to be array, string given in /home/.../lib/plugins/data/syntax/entry.php on line 90

Fatal error: [] operator not supported for strings in /home/.../lib/plugins/data/syntax/entry.php on line 90

Any ideas to what could be causing this?

Thanks!

I want to rework SQL used for datatable to seperate filtering from display

Currently the select queries used for a datatable mix grouping with filtering, or group filtered columns. IMHO this leads to unexpected results when displaying a table, filtering on multivalue fields: Only the values matching the filter will be displayed, not all of them.

To correct this I propose a rewrite of the SQL-Code like this example:

SELECT W1.pid,group_concat(distinct T1.value) 
FROM (
    SELECT DISTINCT pages.pid 
    FROM pages 
    LEFT JOIN data AS T1 ON T1.pid=pages.pid AND T1.key='ABC' 
    WHERE T1.value='XYZ'
) AS W1 
LEFT JOIN data AS T1 ON W1.pid=T1.pid AND T1.key='ABC' 
GROUP BY W1.pid;

This first creates a table of matching page-IDs (as a sub-select) to which the values of the queried attributes can be joined an then grouped.

I don't know when I'll be able to produce a patch for this, so if someone is faster than me, it's fine with me.

Rebuild Database

This plugin is incredibly useful, but it seems to be missing a majorly important feature: without the ability to rebuild the database, it seems crippled. I'm not really storing structured data in my wiki pages unless it can be read from them at will.

dataentry edit loses _img types

seems editing data entry (with the data plugin edit form) with type "_img" loses it's "img" type if you use the edit:

avatar_img  : glen.jpg

becames:
avatar : glen.jpg

i'm using efe12f5 and dokuwiki-rc2010-10-27.tgz

sqlite3 support

More and more Distributions are moving away from sqlite2, sqlite helper support for sqlite3 is currently underway. But this plugin still uses sqlite directly so some efforts of the sqlite helper go unnoticed and it still doesn't work properly under SQLite3.

here are two minor patches for the problem

diff -ur helper.php.orig helper.php
--- helper.php.orig 2012-05-03 01:17:26.000000000 +0200
+++ helper.php      2012-07-04 15:47:19.000000000 +0200
@@ -26,7 +26,7 @@
             return false;
         }
         if($db->init('data',dirname(__FILE__).'/db/')){
-            sqlite_create_function($db->db,'DATARESOLVE',array($this,'_resolveData'),2);
+            $db->create_function('DATARESOLVE',array($this,'_resolveData'),2);
             return $db;
         }else{
             return false;
@@ -293,7 +293,9 @@
                 // Clean if there are no asterisks I could kill
                 $val = $this->_cleanData($val, $column['type']);
             }
-            $val = sqlite_escape_string($val); //pre escape
+            $sqlite = $this->_getDB();
+            if(!$sqlite) return false;
+            $val = $sqlite->escape_string($val); //pre escape

             return array('key'     => $column['key'],
                          'value'   => $val,
diff -ur action.php.orig action.php
--- action.php.orig 2012-07-04 15:53:07.000000000 +0200
+++ action.php      2012-07-04 15:49:09.000000000 +0200
@@ -49,7 +49,7 @@

         // get page id
         $res = $sqlite->query('SELECT pid FROM pages WHERE page = ?',$id);
-        $pid = (int) sqlite_fetch_single($res);
+        $pid = (int) $sqlite->res2single($res);
         if(!$pid) return; // we have no data for this page

         $sqlite->query('DELETE FROM data WHERE pid = ?',$pid);

as you can see I have to "_getDB" at one place just to run the "quote" function, that could probably be optimized, but I just wanted to have the plugin running again.

There are more occurences of direct sqlite__-calls in the syntax/_php files, at least one of which I have no clue on how to replace with sqlite helper functions.

Bug in datacloud handling of filters

Setting up a filter for a datacloud generates a SQL error. For instance, using:

filter : Security=public

Returns the error: no such column: pages.pid. The SELECT statement looks like this:
SELECT data.value, COUNT(data.pid) as cnt
FROM data LEFT JOIN data AS T1 ON T1.pid = pages.pid AND T1.key = 'security'
WHERE data.key = 'keyword'
AND T1.value = 'public'
GROUP BY data.value ORDER BY cnt DESC

The error can be resolved by replacing lines 80 and 81 with the following:
$from .= ' LEFT JOIN data AS '.$tables[$col].' ON '.$tables[$col].'.pid = data.pid';
$where .= ' AND '.$tables[$col].".key = '".sqlite_escape_string($col)."'";

i.e. the join should be back to the original table, data, not to pages, and the WHERE clause was mistakenly being appended to the FROM clause.

Aliases - admin - dropdown menu: missing entries (BUG & CODEFIX)

Hi,

when following the instruction
http://www.dokuwiki.org/plugin:data?&#type_aliases

I couldn´t choose the type 'wiki' only following entries in the dropdown menu are available:
,page,title,mail,url,dt

In aliases.php (101-103):
102: array('','page','title','mail','url', 'dt', 'wiki','tag')
all options can be found

In admin.php (84-86):
85: array('','page','title','mail','url', 'dt')
elements are missing

Update second code line with upper one and everything´s fine.

Cheers
deshi

P.S.
Crossposing in DW-page until bug fixed. Please remove there after Updating.

dataentry in code block is interpreted

using Structured Data Plugin 2010-06-08,
a dataentry in a code block is wrongly interpreted as a real dataentry, resulting in bogus entries in a datatable...

doesn't render wiki syntax from amazon plugin

Having the latest release of DokuWiki, data and amazon plugin the following syntax is not rendered:

---- dataentry book ----
cover_wiki: {{amazon>de:0596006977}}
----

Resulting HTML:

<dl><dt class="cover">cover<span class="sep">: </span></dt><dd class="cover"></dd>

datacloud doesn't handle plurals correctly

plugin:data using datacloud:

If a field is plural, the datacloud control does not set up filtration links correctly.

For instance, if source data has:

---- dataentry ----

Speciess : caribou, deer

and a page is set up with:
---- datacloud ----

field: Speciess

The link will be to ...&dataflt[]=species%3D... when it should be to ...&dataflt[]=speciess%3D... As it stands currently, the links will always return null.

Similarly:

Topics_tags : first, second

will link to ...&dataflt[]=topics%3D... instead of ...topics_tags%3D...

Can work around the first by using a field name of Species and accepting that it will display as "Specie" in the table.

Problem with tag links

I installed current version of sqlite plugin and data plugin today. When I clicked on a link from a Tag-Column like
https://host/doku.php?id=key&dataflt=key%3Avalue
I get a warning
Failed to parse filter "key:value"
When I changed code that generates the tag-link so it puts in a '=' instead of the colon, it works ok... My patch in #3 contains that "fix"...

Add also title to _url entries

page and title are now possible entries, where title is page inclusive possibility to add a title after a pipe. Can this also be realised for urls? I have many long urls that break the layout so add there also a title will be great.

(I think it is will be more intuitive that page and title are combined to one kind of entry and that the plugin decises by recognizing the pipe when it should use 'page' or 'title'. Thus the same as links in the general DokuWiki syntax work)

Count column type

Add a count function like a variable in the datatable to allow the ability to count the number of records that match a specific query.

Case sensitivity in datatable and datalist output filters

Filters are currently case sensitive, making things unnecessarily difficult, especially since they were case insensitive in the past. Now I've got a wiki full of mixed case that I have to go back and edit. Can we either revert or add an option for case insensitive matching?

Multiple entries per page is easy!

It should be easy to allow multiple entries per page. Since I'm not a developer on this project, I'll just tell you how.

  1. Allow a special data element that specifies a section name and level:
    section: 3,This is My Data

  2. In the metadata renderer, use that section name along with the page id as the primary key:
    if ($section) {
    $s = array();
    $id = $ID . '#' . sectionID($section, $s);
    }

  3. And use the section name as the title:
    _saveData($data, $id, $section ? $section : $title)

  4. In the handler function, generate a section header:
    if ($section) {
    if ($handler->status['section'])
    $handler->_addCall('section_close',array(),$pos);
    $handler->_addCall('header', array($b['name'], $level, $pos), $pos);
    $handler->_addCall('section_open', array($level), $pos);
    $handler->status['section'] = true;
    }

  5. Currently, the edit action uses faulty logic to determine if a data section has been removed - it just searches for the string "dataentry." Replace that logic with something more complex: Search the entire document for dataentry sections, and compare the list to a SQL request.

I've made my own plugin which overrides the "entry" parser to use my own syntax. It does steps 1-4 without a problem. I'll have to override the action plugin too, in order to do step 5.

Ending with an "s": Countries => Countrie

It would be useful to not strip a trailing "s" but also to keep the "multiple value option". For example, "Countries" would be a comma separated list, but should still be displayed as "Countries" and not "Countrie".

Perhaps adding an asterisk (rather than an underscore) could switch to this behavior.

extension of primary key

Hi,
at present time, the primary key for all data is the page ID. But I want to have multiple data objects with more fields (like interfaces in the computer with model, MAC, IP). Now I either have own page for every interface (which is a bit silly) or I can have evidence of these values separately in -s fields - but no bind between each other.
My idea is that every dataentry would be able to have _id type (_ids not allowed), which would be a part of primary key. In datatable or list _id field would act as normal textfileld. So I would have more dataentries with same fileds on one page, having different _id.

multi-values broken for wiki-type [incl. fix]

Using a field alias based on 'wiki'-type it appears that the wiki-fields cannot parse multi-values. This because there is string concatenate before the array. Moving some parts will restore this functionality.

/**
 * Output the data in a table
 */
function _showData($data,&$R){
    global $ID;
    $ret = '';

    if (method_exists($R, 'startSectionEdit')) {
        $data['classes'] .= ' ' . $R->startSectionEdit($data['pos'], 'plugin_data');
    }
    $ret .= '<div class="inline dataplugin_entry '.$data['classes'].'"><dl>';
    foreach($data['data'] as $key => $val){
        if($val == '' || !count($val)) continue;
        $type = $data['cols'][$key]['type'];
        if (is_array($type)) $type = $type['type'];
        //switch ($type) {
        //case 'pageid':
        //    $type = 'title';
        //case 'wiki':
        //    $val = $ID . '|' . $val;
        //    break;
        //}
        $ret .= '<dt class="' . hsc($key) . '">'.hsc($data['cols'][$key]['title']).'<span class="sep">: </span></dt>';
        if(is_array($val)){
            $cnt = count($val);
            for ($i=0; $i<$cnt; $i++){
                $ret .= '<dd class="' . hsc($key) . '">';
                switch ($type) {
                case 'pageid':
                    $type = 'title';
                case 'wiki':
                    $val[$i] = $ID . '|' . $val[$i];
                    break;
                }
                $ret .= $this->dthlp->_formatData($data['cols'][$key], $val[$i],$R);
                if($i < $cnt - 1) $ret .= '<span class="sep">, </span>';
                $ret .= '</dd>';
            }
        }else{
            switch ($type) {
            case 'pageid':
                $type = 'title';
            case 'wiki':
                $val = $ID . '|' . $val;
                break;
            }
            $ret .= '<dd class="' . hsc($key) . '">'.
                    $this->dthlp->_formatData($data['cols'][$key], $val, $R).'</dd>';
        }
    }
    $ret .= '</dl></div>';
    $R->doc .= $ret;
    if (method_exists($R, 'finishSectionEdit')) {
        $R->finishSectionEdit($data['len'] + $data['pos']);
    }
}

77d8842#syntax/entry.php

dataentry looses _ when column name ends in uppercase S

A data entry like this:

    ---- dataentry ----
    Name         : saturn
    Serialnumber : 123-123-45B
    OS_          : CentOS 5
    CPU          : E5500
    RAM          : 4GB
    ----

When you edit this entry, the line with OS_ becomes:

    OS           : CentOS 5

And is displayed with column name "O" (and can now have multiple values).

Here is the line I changed to fix it:

    --- entry.php_ORIG      2011-04-13 13:45:44.000000000 +0200
    +++ entry.php   2011-04-13 13:46:25.000000000 +0200
    @@ -290,7 +290,7 @@
                 if ($field['title'] === '') continue;
                 $s = syntax_plugin_data_entry::_normalize($field['title']);
                 if (trim($field['type']) !== '' ||
    -                (substr($s, -1, 1) === 's' && $field['multi'] === '')) {
    +               ((substr($s, -1, 1) === 's' || substr($s, -1, 1) === 'S') && $field['multi'] !== 1)) {
                     $s .= '_' . syntax_plugin_data_entry::_normalize($field['type']);
               }
               if ($field['multi'] === '1') {

apply filter to datacloud

I have a table with a filter applied and a datacloud for that table. Now I want to apply the same filter to the datacloud in order to reflect the contents of the table in the cloud, e.g. I don't want to get an empty table after a click on a tag in the cloud.

database lockup

i have quite big database (5mb), and my data plugin constantly locks up itself

only way to fix is this is to stop httpd and start it again

below is obfuscated log, of different errors (they are not neccessarily in sequence)

[Sun Nov 21 17:02:18 2010] [error] [client 127.0.0.101] PHP Fatal error:  Maximum execution time of 120 seconds exceeded in /usr/share/dokuwiki/lib/plugins/data/export.php on line 97
[Sun Nov 21 17:02:47 2010] [error] [client 127.0.0.101] PHP Fatal error:  Maximum execution time of 120 seconds exceeded in /usr/share/dokuwiki/lib/plugins/data/export.php on line 97
[Sun Nov 21 17:05:10 2010] [error] [client 127.0.0.101] PHP Fatal error:  Maximum execution time of 120 seconds exceeded in /usr/share/dokuwiki/lib/plugins/data/export.php on line 97
[Sun Nov 21 17:05:40 2010] [error] [client 127.0.0.88] PHP Warning:  sqlite_query(): database is locked in /usr/share/dokuwiki/lib/plugins/data/syntax/entry.php on line 157
[Sun Nov 21 17:05:50 2010] [error] [client 127.0.0.101] PHP Fatal error:  Maximum execution time of 120 seconds exceeded in /usr/share/dokuwiki/lib/plugins/data/export.php on line 97
[Sun Nov 21 17:06:40 2010] [error] [client 127.0.0.88] PHP Warning:  sqlite_query(): database is locked in /usr/share/dokuwiki/lib/plugins/data/syntax/entry.php on line 157
[Sun Nov 21 17:06:41 2010] [error] [client 127.0.0.88] PHP Warning:  sqlite_query(): database is locked in /usr/share/dokuwiki/lib/plugins/data/syntax/entry.php on line 161
[Sun Nov 21 17:06:58 2010] [error] [client 127.0.0.101] PHP Fatal error:  Maximum execution time of 120 seconds exceeded in /usr/share/dokuwiki/lib/plugins/data/export.php on line 97
[Sun Nov 21 17:07:40 2010] [error] [client 127.0.0.88] PHP Warning:  sqlite_query(): database is locked in /usr/share/dokuwiki/lib/plugins/data/syntax/entry.php on line 157
[Sun Nov 21 17:07:41 2010] [error] [client 127.0.0.88] PHP Warning:  sqlite_query(): database is locked in /usr/share/dokuwiki/lib/plugins/data/syntax/entry.php on line 161
[Sun Nov 21 17:07:41 2010] [error] [client 127.0.0.88] PHP Warning:  sqlite_query(): database is locked in /usr/share/dokuwiki/lib/plugins/data/syntax/entry.php on line 165
[Sun Nov 21 17:08:41 2010] [error] [client 127.0.0.88] PHP Warning:  sqlite_query(): database is locked in /usr/share/dokuwiki/lib/plugins/data/syntax/entry.php on line 161
[Sun Nov 21 17:08:42 2010] [error] [client 127.0.0.88] PHP Warning:  sqlite_query(): database is locked in /usr/share/dokuwiki/lib/plugins/data/syntax/entry.php on line 165
[Sun Nov 21 17:08:42 2010] [error] [client 127.0.0.88] PHP Warning:  sqlite_query(): database is locked in /usr/share/dokuwiki/lib/plugins/data/syntax/entry.php on line 179
[Sun Nov 21 17:09:42 2010] [error] [client 127.0.0.88] PHP Warning:  sqlite_query(): database is locked in /usr/share/dokuwiki/lib/plugins/data/syntax/entry.php on line 165
[Sun Nov 21 17:09:43 2010] [error] [client 127.0.0.88] PHP Warning:  sqlite_query(): database is locked in /usr/share/dokuwiki/lib/plugins/data/syntax/entry.php on line 179
[Sun Nov 21 17:09:43 2010] [error] [client 127.0.0.88] PHP Warning:  sqlite_query(): database is locked in /usr/share/dokuwiki/lib/plugins/data/syntax/entry.php on line 191
[Sun Nov 21 17:09:43 2010] [error] [client 127.0.0.88] PHP Warning:  sqlite_query(): cannot commit - no transaction is active in /usr/share/dokuwiki/lib/plugins/data/syntax/entry.php on line 197
[Sun Nov 21 17:10:24 2010] [error] [client 127.0.0.101] PHP Fatal error:  Maximum execution time of 120 seconds exceeded in /usr/share/dokuwiki/lib/plugins/data/export.php on line 97

datacloud selection and display of values of multiple fields in datatable

If a value in datacloud is selected, which is one entry of a multiple field, then the other values of the multiple field are not shown.

Example:

datatable:
name category
n1 a
n2 a, b

datacloud with field: category and "b" is selected

datatable:
name category
n2 b

So the "a" value in field category is not shown any more although it is in the field.

I would expect this:

datatable:
name category
n2 a, b

Bad behavior of media in dataentry block

Using:

Item_img : :files:myfile.odt

in a dataentry block leads to a strange result when one clicks, in the rendered page containing the dataentry block, on the media file: the media file never opens. Middle clicking i.e. open link in new tab/window works as expected (opening the media file).

oppurtunity to number columns

it would be nice if each row would contain number in first column, so looking at the table i'd know i have 10 entries in table list

perhaps %num% magic column to ----datatable---- syntax?

Remove [ /;] from class names

The column names are used as CSS classes in the final html. If the column names contain characters such as whitespace [;] or such, these become difficult to address with a userstyle.css. It may make sense to remove these characters from the CSS class. In this way even column names such as "Program/ Project plan" can be addressed with a userstyle.css

Target link not used

I set external links to _BLANK , but external links in data display are not set to target _BLANK.

Change the behaviour of datatable Tag links

I created a Patch that checks for the existance of a page called “Object” in the root namespace and in the current namespace. If it doesn't find anything, it checks whether <current_namespace>:start or <id_of_current_namespace> exists as a page and assumes a data table there.

--- data/helper.php     2009-02-13 15:26:25.000000000 +0100
+++ ./helper.php        2009-08-10 16:24:57.000000000 +0200
@@ -88,7 +88,7 @@
      * Return XHTML formated data, depending on type
      */
     function _formatData($key, $value, $type, &$R){
-        global $conf;
+        global $conf,$ID;
     $vals = explode("\n",$value);
     $outs = array();
     foreach($vals as $val){
@@ -120,7 +120,16 @@
             $outs[] = '<a href="'.hsc($val).'" class="urlextern" title="'.hsc($val).'">'.hsc($val).'</a>';
             break;
         case 'tag':
-                    $outs[] = '<a href="'.wl(str_replace('/',':',cleanID($key)),array('dataflt'=>$key.':'.$val )).
+                   $key_id=str_replace('/',':',cleanID($key));
+                   if(page_exists($key_id)) {
+                   } elseif (page_exists(getNS($ID).':'.$key_id)){
+                       $key_id=getNS($ID).':'.$key_id;
+                   } elseif (page_exists(getNS($ID).':'.$conf['start'])){
+                       $key_id=getNS($ID).':'.$conf['start'];
+                   } elseif (page_exists(getNS($ID))){
+                       $key_id=getNS($ID);

Maybe there is a more elegant solution to this problem, perhaps via config option or an option in the datatable syntax. I think that I saw such an option for the Tagcloud syntax...

's' for multiple values separated by commas doesn't seems to work when using with personnal type alias.

's' for multiple values separated by commas doesn't seems to work when using with personnal type alias.

First, I upload icons in a namespace "systeme" (windows.png, linux.png ...).

I create an alias called 'icose' :
Type : wiki
Data Prefix : {{:systeme:
Data Postfix : .png?nolink&16|}}
Valid Values :

When I create an entry like this :

---- dataentry test ----
name : test

systeme_icoses : windows,linux

Only name is displayed, and there's no icon.

In source code I get this :

So I tried this :

---- dataentry test ----
name : test

systeme_icose : windows

image is well displayed

Note that ":systeme:linux.png" exists. I also tried "windows,windows" nothing change.

I also tried "windows, linux" (coma followed by a space), nothing change.

I also tried to set some "valid values", nothing change.

I tried to rename alias, but still not working.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.