summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xplatform/bin/contents_compile.sh345
-rwxr-xr-xplatform/bin/doku2md.sh248
-rw-r--r--platform/bin/pandoc/article/Makefile (renamed from platform/bin/Makefile)32
-rw-r--r--platform/bin/pandoc/article/info.tpl10
-rwxr-xr-xplatform/bin/pandoc/article/run.sh20
-rw-r--r--platform/bin/pandoc/book/Makefile70
-rw-r--r--platform/bin/pandoc/book/en.md856
-rw-r--r--platform/bin/pandoc/book/en.pdfbin0 -> 333034 bytes
-rw-r--r--platform/bin/pandoc/book/es.md1097
-rw-r--r--platform/bin/pandoc/book/es.pdfbin0 -> 371534 bytes
-rwxr-xr-xplatform/bin/pandoc/book/run.sh9
-rw-r--r--platform/bin/pandoc/book/template.tex (renamed from platform/bin/template.tex)3
-rw-r--r--platform/i18n/textinsert_strings.php16
-rw-r--r--platform/www/conf/local.php15
-rw-r--r--platform/www/conf/local.php.bak.php16
-rw-r--r--platform/www/conf/plugins.local.php.bak9
-rw-r--r--platform/www/data/media/en/docs/markdown_headers.jpgbin0 -> 33832 bytes
-rw-r--r--platform/www/data/media_meta/en/docs/markdown_headers.jpg.changes1
-rw-r--r--platform/www/data/meta/de/index.changes1
-rw-r--r--platform/www/data/meta/de/index.indexed1
-rw-r--r--platform/www/data/meta/de/index.meta7
-rw-r--r--platform/www/data/meta/en/blog/2021-11-01-the_origins.indexed1
-rw-r--r--platform/www/data/meta/en/blog/2021-11-01-the_origins.meta3
-rw-r--r--platform/www/data/meta/en/blog/2022-02-09-cidoc_recovering_its_past_to_transform_our_present.indexed1
-rw-r--r--platform/www/data/meta/en/blog/2022-02-09-cidoc_recovering_its_past_to_transform_our_present.meta3
-rw-r--r--platform/www/data/meta/en/blog/2022-10-01-xxx.meta3
-rw-r--r--platform/www/data/meta/en/blog/2024-03-04-starting_acervus_progress_reports.indexed1
-rw-r--r--platform/www/data/meta/en/blog/2024-03-04-starting_acervus_progress_reports.meta3
-rw-r--r--platform/www/data/meta/en/blog/2024-03-04-starting_regular_updates.meta3
-rw-r--r--platform/www/data/meta/en/blog/2024-03-05-apr_01.indexed1
-rw-r--r--platform/www/data/meta/en/blog/2024-03-05-apr_01.meta11
-rw-r--r--platform/www/data/meta/en/blog/index.changes4
-rw-r--r--platform/www/data/meta/en/blog/index.meta1
-rw-r--r--platform/www/data/meta/en/docs/index.changes4
-rw-r--r--platform/www/data/meta/en/docs/index.indexed1
-rw-r--r--platform/www/data/meta/en/docs/index.meta14
-rw-r--r--platform/www/data/meta/en/docs/text_format.changes19
-rw-r--r--platform/www/data/meta/en/docs/text_format.indexed1
-rw-r--r--platform/www/data/meta/en/docs/text_format.meta14
-rw-r--r--platform/www/data/meta/en/index.changes43
-rw-r--r--platform/www/data/meta/en/index.indexed2
-rw-r--r--platform/www/data/meta/en/index.meta6
-rw-r--r--platform/www/data/meta/en/tech.changes22
-rw-r--r--platform/www/data/meta/en/tech.indexed1
-rw-r--r--platform/www/data/meta/en/tech.meta12
-rw-r--r--platform/www/data/meta/es/blog/2021-11-01-the_origins.changes2
-rw-r--r--platform/www/data/meta/es/blog/2021-11-01-the_origins.indexed1
-rw-r--r--platform/www/data/meta/es/blog/2021-11-01-the_origins.meta3
-rw-r--r--platform/www/data/meta/es/blog/2022-02-09-cidoc_recovering_its_past_to_transform_our_present.changes1
-rw-r--r--platform/www/data/meta/es/blog/2022-02-09-cidoc_recovering_its_past_to_transform_our_present.indexed1
-rw-r--r--platform/www/data/meta/es/blog/2022-02-09-cidoc_recovering_its_past_to_transform_our_present.meta3
-rw-r--r--platform/www/data/meta/es/blog/2024-03-04-starting_acervus_progress_reports.indexed1
-rw-r--r--platform/www/data/meta/es/blog/2024-03-04-starting_acervus_progress_reports.meta3
-rw-r--r--platform/www/data/meta/es/blog/2024-03-05-apr_01.indexed1
-rw-r--r--platform/www/data/meta/es/blog/2024-03-05-apr_01.meta7
-rw-r--r--platform/www/data/meta/es/index.changes1
-rw-r--r--platform/www/data/meta/es/index.indexed1
-rw-r--r--platform/www/data/meta/es/index.meta5
-rw-r--r--platform/www/data/meta/fr/index.changes1
-rw-r--r--platform/www/data/meta/fr/index.indexed1
-rw-r--r--platform/www/data/meta/fr/index.meta5
-rw-r--r--platform/www/data/meta/it/index.changes1
-rw-r--r--platform/www/data/meta/it/index.indexed1
-rw-r--r--platform/www/data/meta/it/index.meta5
-rw-r--r--platform/www/data/meta/macros/macros.ser2
-rw-r--r--platform/www/data/meta/pt/index.changes1
-rw-r--r--platform/www/data/meta/pt/index.indexed1
-rw-r--r--platform/www/data/meta/pt/index.meta5
-rw-r--r--platform/www/data/pages/de/index.txt28
-rw-r--r--platform/www/data/pages/en/blog/2021-11-01-the_origins.txt15
-rw-r--r--platform/www/data/pages/en/blog/2022-02-09-cidoc_recovering_its_past_to_transform_our_present.txt18
-rw-r--r--platform/www/data/pages/en/blog/2024-03-04-starting_acervus_progress_reports.txt17
-rw-r--r--platform/www/data/pages/en/blog/2024-03-05-apr_01.txt39
-rw-r--r--platform/www/data/pages/en/blog/2024-03-20-apr_02.txt34
-rw-r--r--platform/www/data/pages/en/blog/2024-04-05-apr_03.md30
-rw-r--r--platform/www/data/pages/en/blog/2024-04-20-apr_04.md31
-rw-r--r--platform/www/data/pages/en/docs/index.txt57
-rw-r--r--platform/www/data/pages/en/docs/text_format.txt199
-rw-r--r--platform/www/data/pages/en/index.txt18
-rw-r--r--platform/www/data/pages/es/blog/2021-11-01-the_origins.txt15
-rw-r--r--platform/www/data/pages/es/blog/2022-02-09-cidoc_recovering_its_past_to_transform_our_present.txt18
-rw-r--r--platform/www/data/pages/es/blog/2024-03-04-starting_acervus_progress_reports.txt17
-rw-r--r--platform/www/data/pages/es/blog/2024-03-05-apr_01.txt39
-rw-r--r--platform/www/data/pages/es/blog/2024-03-20-apr_02.md34
-rw-r--r--platform/www/data/pages/es/blog/2024-04-05-apr_03.md30
-rw-r--r--platform/www/data/pages/es/blog/2024-04-20-apr_04.md31
-rw-r--r--platform/www/data/pages/es/index.txt28
-rw-r--r--platform/www/data/pages/fr/index.txt28
-rw-r--r--platform/www/data/pages/it/index.txt28
-rw-r--r--platform/www/data/pages/pt/index.txt28
-rw-r--r--platform/www/lib/plugins/blog/action.php4
-rw-r--r--platform/www/lib/plugins/blog/helper.php2
-rw-r--r--platform/www/lib/plugins/blog/lang/ca/lang.php30
-rw-r--r--platform/www/lib/plugins/blog/lang/ca/settings.php27
-rw-r--r--platform/www/lib/plugins/blog/lang/es/lang.php6
-rw-r--r--platform/www/lib/plugins/blog/lang/es/settings.php10
-rw-r--r--platform/www/lib/plugins/blog/lang/pt-br/lang.php2
-rw-r--r--platform/www/lib/plugins/blog/lang/vi/lang.php30
-rw-r--r--platform/www/lib/plugins/blog/lang/vi/settings.php27
-rw-r--r--platform/www/lib/plugins/blog/manager.dat2
-rw-r--r--platform/www/lib/plugins/blog/plugin.info.txt2
-rw-r--r--platform/www/lib/plugins/blog/syntax/blog.php26
-rw-r--r--platform/www/lib/plugins/include/.github/workflows/phpTestLinux.yml52
-rw-r--r--platform/www/lib/plugins/include/COPYING340
-rw-r--r--platform/www/lib/plugins/include/README11
-rw-r--r--platform/www/lib/plugins/include/_test/locallink_conversion.test.php42
-rw-r--r--platform/www/lib/plugins/include/_test/media_linktitle_conversion.test.php54
-rw-r--r--platform/www/lib/plugins/include/_test/namespace_includes.test.php182
-rw-r--r--platform/www/lib/plugins/include/_test/nested_include.test.php75
-rw-r--r--platform/www/lib/plugins/include/_test/pagemove_support.test.php76
-rw-r--r--platform/www/lib/plugins/include/_test/safeindex.test.php40
-rw-r--r--platform/www/lib/plugins/include/action.php370
-rw-r--r--platform/www/lib/plugins/include/conf/default.php30
-rw-r--r--platform/www/lib/plugins/include/conf/metadata.php33
-rw-r--r--platform/www/lib/plugins/include/deleted.files13
-rw-r--r--platform/www/lib/plugins/include/helper.php941
-rw-r--r--platform/www/lib/plugins/include/images/comment.gifbin0 -> 111 bytes
-rw-r--r--platform/www/lib/plugins/include/images/date.gifbin0 -> 123 bytes
-rw-r--r--platform/www/lib/plugins/include/images/link.gifbin0 -> 125 bytes
-rw-r--r--platform/www/lib/plugins/include/images/user.gifbin0 -> 116 bytes
-rw-r--r--platform/www/lib/plugins/include/lang/ar/lang.php12
-rw-r--r--platform/www/lib/plugins/include/lang/ar/settings.php20
-rw-r--r--platform/www/lib/plugins/include/lang/cs/lang.php10
-rw-r--r--platform/www/lib/plugins/include/lang/cs/settings.php41
-rw-r--r--platform/www/lib/plugins/include/lang/da/lang.php8
-rw-r--r--platform/www/lib/plugins/include/lang/da/settings.php39
-rw-r--r--platform/www/lib/plugins/include/lang/de-informal/lang.php8
-rw-r--r--platform/www/lib/plugins/include/lang/de-informal/settings.php39
-rw-r--r--platform/www/lib/plugins/include/lang/de/lang.php8
-rw-r--r--platform/www/lib/plugins/include/lang/de/settings.php42
-rw-r--r--platform/www/lib/plugins/include/lang/en/lang.php12
-rw-r--r--platform/www/lib/plugins/include/lang/en/settings.php41
-rw-r--r--platform/www/lib/plugins/include/lang/eo/lang.php8
-rw-r--r--platform/www/lib/plugins/include/lang/eo/settings.php38
-rw-r--r--platform/www/lib/plugins/include/lang/es/lang.php12
-rw-r--r--platform/www/lib/plugins/include/lang/es/settings.php41
-rw-r--r--platform/www/lib/plugins/include/lang/fr/lang.php8
-rw-r--r--platform/www/lib/plugins/include/lang/fr/settings.php44
-rw-r--r--platform/www/lib/plugins/include/lang/hr/lang.php8
-rw-r--r--platform/www/lib/plugins/include/lang/hr/settings.php38
-rw-r--r--platform/www/lib/plugins/include/lang/hu/lang.php9
-rw-r--r--platform/www/lib/plugins/include/lang/hu/settings.php39
-rw-r--r--platform/www/lib/plugins/include/lang/it/lang.php10
-rw-r--r--platform/www/lib/plugins/include/lang/it/settings.php29
-rw-r--r--platform/www/lib/plugins/include/lang/ja/lang.php8
-rw-r--r--platform/www/lib/plugins/include/lang/ja/settings.php39
-rw-r--r--platform/www/lib/plugins/include/lang/ko/lang.php8
-rw-r--r--platform/www/lib/plugins/include/lang/ko/settings.php39
-rw-r--r--platform/www/lib/plugins/include/lang/nl/lang.php8
-rw-r--r--platform/www/lib/plugins/include/lang/nl/settings.php40
-rw-r--r--platform/www/lib/plugins/include/lang/pl/lang.php8
-rw-r--r--platform/www/lib/plugins/include/lang/pl/settings.php13
-rw-r--r--platform/www/lib/plugins/include/lang/pt-br/lang.php12
-rw-r--r--platform/www/lib/plugins/include/lang/pt-br/settings.php14
-rw-r--r--platform/www/lib/plugins/include/lang/pt/lang.php13
-rw-r--r--platform/www/lib/plugins/include/lang/ru/lang.php10
-rw-r--r--platform/www/lib/plugins/include/lang/ru/settings.php42
-rw-r--r--platform/www/lib/plugins/include/lang/sk/lang.php8
-rw-r--r--platform/www/lib/plugins/include/lang/sk/settings.php37
-rw-r--r--platform/www/lib/plugins/include/lang/sl/lang.php12
-rw-r--r--platform/www/lib/plugins/include/lang/sl/settings.php16
-rw-r--r--platform/www/lib/plugins/include/lang/sv/lang.php8
-rw-r--r--platform/www/lib/plugins/include/lang/sv/settings.php39
-rw-r--r--platform/www/lib/plugins/include/lang/tr/lang.php8
-rw-r--r--platform/www/lib/plugins/include/lang/tr/settings.php36
-rw-r--r--platform/www/lib/plugins/include/lang/vi/lang.php8
-rw-r--r--platform/www/lib/plugins/include/lang/vi/settings.php38
-rw-r--r--platform/www/lib/plugins/include/lang/zh/lang.php8
-rw-r--r--platform/www/lib/plugins/include/lang/zh/settings.php33
-rw-r--r--platform/www/lib/plugins/include/plugin.info.txt7
-rw-r--r--platform/www/lib/plugins/include/requirements.txt2
-rw-r--r--platform/www/lib/plugins/include/script.js22
-rw-r--r--platform/www/lib/plugins/include/style.css53
-rw-r--r--platform/www/lib/plugins/include/syntax/closelastsecedit.php36
-rw-r--r--platform/www/lib/plugins/include/syntax/editbtn.php43
-rw-r--r--platform/www/lib/plugins/include/syntax/footer.php133
-rw-r--r--platform/www/lib/plugins/include/syntax/header.php95
-rw-r--r--platform/www/lib/plugins/include/syntax/include.php173
-rw-r--r--platform/www/lib/plugins/include/syntax/locallink.php45
-rw-r--r--platform/www/lib/plugins/include/syntax/readmore.php43
-rw-r--r--platform/www/lib/plugins/include/syntax/sorttag.php60
-rw-r--r--platform/www/lib/plugins/include/syntax/wrap.php78
-rw-r--r--platform/www/lib/plugins/meta/_test/rendering.test.php80
-rw-r--r--platform/www/lib/plugins/meta/plugin.info.txt7
-rw-r--r--platform/www/lib/plugins/meta/syntax.php205
-rw-r--r--platform/www/lib/plugins/refnotes/action.php634
-rw-r--r--platform/www/lib/plugins/refnotes/admin.css100
-rw-r--r--platform/www/lib/plugins/refnotes/admin.js1035
-rw-r--r--platform/www/lib/plugins/refnotes/admin.php751
-rw-r--r--platform/www/lib/plugins/refnotes/admin.svg1
-rw-r--r--platform/www/lib/plugins/refnotes/bibtex.php669
-rw-r--r--platform/www/lib/plugins/refnotes/conf/namespaces.dat1
-rw-r--r--platform/www/lib/plugins/refnotes/conf/notes.dat1
-rw-r--r--platform/www/lib/plugins/refnotes/config.php77
-rw-r--r--platform/www/lib/plugins/refnotes/core.php483
-rw-r--r--platform/www/lib/plugins/refnotes/database.php563
-rw-r--r--platform/www/lib/plugins/refnotes/instructions.php318
-rw-r--r--platform/www/lib/plugins/refnotes/lang/en/__template.txt82
-rw-r--r--platform/www/lib/plugins/refnotes/lang/en/intro.txt15
-rw-r--r--platform/www/lib/plugins/refnotes/lang/en/lang.php146
-rw-r--r--platform/www/lib/plugins/refnotes/locale.php92
-rw-r--r--platform/www/lib/plugins/refnotes/namespace.php463
-rw-r--r--platform/www/lib/plugins/refnotes/note.php336
-rw-r--r--platform/www/lib/plugins/refnotes/plugin.info.txt7
-rw-r--r--platform/www/lib/plugins/refnotes/reference.php192
-rw-r--r--platform/www/lib/plugins/refnotes/refnote.php51
-rw-r--r--platform/www/lib/plugins/refnotes/rendering.php1272
-rw-r--r--platform/www/lib/plugins/refnotes/scope.php190
-rw-r--r--platform/www/lib/plugins/refnotes/script.js114
-rw-r--r--platform/www/lib/plugins/refnotes/style.css48
-rw-r--r--platform/www/lib/plugins/refnotes/syntax/notes.php221
-rw-r--r--platform/www/lib/plugins/refnotes/syntax/references.php348
-rw-r--r--platform/www/lib/tpl/acervus/css/basic.less2
-rw-r--r--platform/www/lib/tpl/acervus/css/hacks.css26
-rw-r--r--platform/www/lib/tpl/acervus/images/apple-touch-icon.pngbin23590 -> 38040 bytes
-rw-r--r--platform/www/lib/tpl/acervus/images/favicon.icobin371 -> 1150 bytes
-rw-r--r--platform/www/lib/tpl/acervus/images/logo.pngbin0 -> 1299837 bytes
-rw-r--r--platform/www/lib/tpl/acervus/main.php17
218 files changed, 16468 insertions, 130 deletions
diff --git a/platform/bin/contents_compile.sh b/platform/bin/contents_compile.sh
new file mode 100755
index 0000000..e9979f5
--- /dev/null
+++ b/platform/bin/contents_compile.sh
@@ -0,0 +1,345 @@
+ #!/usr/bin/env bash
+# Contents compilee
+# ./contents_compile.sh <collection> <type>
+# ./contents_compile.sh illich article
+start=`date +%s%N`
+
+cd `dirname $0`
+
+COLLECTION=$1
+TYPE=$2
+
+cd ../../content/$COLLECTION/contents/$TYPE
+
+AUTHOR=`cat ../../conf/local.php | grep author | cut -d "'" -f4`
+COPYRIGHT=`cat ../../conf/local.php | grep copyright | cut -d "'" -f4`
+SITE=`cat ../../conf/local.php | grep title | cut -d "'" -f4`
+CODENAME=`cat ../../conf/local.php | grep codename | cut -d "'" -f4`
+UNIVERSE=`cat ../../conf/local.php | grep universe | cut -d "'" -f4`
+BASEURL=`cat ../../../../platform/www/conf/farm.ini | grep basedomain | cut -d '"' -f 2`
+
+
+echo "#### STARTING TO COMPILE! Collection: $1 Type: $2. Press a key to proceed..."
+read
+
+# Clean previous files
+rm index*
+echo "" > index.txt
+
+# Define languages to generate
+LANGS=("en" "es")
+for lng in ${LANGS[@]}; do
+ echo "Generating files for lang: $lng"
+ echo "" > index.$lng.txt
+ rm -rf ../../data/pages/$lng/$TYPE/*
+ cd ../../data/pages/$lng/$TYPE/
+ ln -s ../../../../contents/$TYPE/index.$lng.txt index.txt
+ cd $OLDPWD
+done
+
+
+
+echo "" > index.es.txt
+for i in `ls -d */`; do
+ echo ""
+ echo ""
+ echo ""
+ echo "#### PROCESSING: $i"
+
+ FOLDER=$i
+ YEAR=`echo $i | cut -d '-' -f1`
+ cd $i
+ rm *.md *.pdf *.info
+ LANGORIG=`cat index | grep langorig | cut -d "@" -f 4 | cut -d "_" -f 3`
+ # echo $LANGORIG
+ TITLEORIG=`cat index | grep titleorig | cut -d "_" -f3`
+ # echo $TITLEORIG
+
+ # echo "************************"
+ # echo "LANGORIG: $LANGORIG"
+ # echo "TYPE: $TYPE"
+ # echo "i: $i"
+ # echo "************************"
+ # echo "************************"
+ # read
+
+
+ if [[ -f $LANGORIG.txt ]]
+ then
+ echo "The version in the original language is already processed"
+ for j in `ls *.txt`; do
+ LANG=`echo $j | cut -d '.' -f1`
+ echo "**** $LANG"
+
+ # Creates the $TYPE directory
+ if [[ ! -d ../../../data/pages/$LANG/$TYPE/$i ]]
+ then
+ echo "Create the $TYPE directory for $i in $LANG"
+ mkdir ../../../data/pages/$LANG/$TYPE/$i
+ fi
+
+ TAGS=()
+ TAGLIST=""
+ EXTRATAGS=""
+
+
+ # Creates the index file
+ echo "Regenerate the index for $i in $LANG"
+ INDEX="../../../data/pages/$LANG/$TYPE/$i/index.txt"
+ TITLE_MD=`head -n1 $LANG.txt`
+ TITLE=`echo $TITLE_MD | sed s/\#\ //`
+ head -n1 $LANG.txt > $INDEX
+ echo "" >> $INDEX
+ TITLELANG=`head -n1 $LANG.txt | sed s/\#\ //`
+ cat index >> $INDEX
+
+ if [[ -f LANG.notes ]]
+ then
+ cat $LANG.notes >> $INDEX
+ fi
+
+
+ if [[ $TYPE != "book" ]]
+ then
+ sed -i "s/\*YEAR\*/$YEAR/g" $INDEX
+ fi
+
+ if [ $(grep -c "LANG_authors" $INDEX) -eq 1 ]
+ # if grep "LANG_authors" $INDEX
+ then
+ sed -i "s/LANG_authors@#:\*\*/LANG_authors\@\#:\*\* $AUTHOR;/g" $INDEX
+ AUTHORS=`grep "LANG_authors" $INDEX | cut -d '*' -f6 | sed s/\;/\ and/g | sed s/^\ // | sed s/:\ //`
+ else
+ # only main author
+ AUTHORS=$AUTHOR
+ fi
+
+ if [ $(grep -c "LANG_publicationdate" $INDEX) -eq 1 ]
+ # if grep "LANG_publicationdate" $INDEX
+ then
+ PUBDATE=`grep "LANG_publicationdate" $INDEX | cut -d '*' -f6 | sed s/\;/\ and/g | sed s/^\ //`
+ else
+ # Use year if full date is not defined
+ PUBDATE=$YEAR
+ fi
+ if [[ $TYPE == "book" ]]
+ then
+ YEAR=$PUBDATE
+ fi
+
+
+ if grep "LANG_translators" $INDEX
+ then
+ TRANSLATORS=`grep "LANG_translators" $INDEX | cut -d '*' -f6 | sed s/\;/\ and/g | sed s/^\ // | sed s/:\ //`
+ else
+ # no translators
+ TRANSLATORS=""
+ fi
+ KEY=`echo $FOLDER | sed 's/\///'`
+ # http://illich.acerv.uz/en:$TYPE:1900-testing:index
+ URL="https://$CODENAME.$BASEURL/$LANG/$TYPE/$KEY:index"
+ URLDATE=`date +"%Y-%m-%d"`
+ echo "" >> $INDEX
+ echo "@ARTICLE{$UNIVERSE-$CODENAME-$KEY-$LANG,
+ author = {$AUTHORS},
+ title = {$TITLE},
+ year = {$YEAR},
+ date = {$PUBDATE},
+ origdate = {$PUBDATE},
+ language = {$LANG},
+ origlanguage = {$LANGORIG},
+ translator = {$TRANSLATORS},
+ url = {$URL},
+ urldate = {$URLDATE}
+}" > $LANG.bib
+ echo "Generated $LANG.bib"
+ cat $LANG.bib >> ../index.$LANG.bib
+ echo "" >> ../index.$LANG.bib
+ echo "\`\`\`" >> $INDEX
+ cat $LANG.bib >> $INDEX
+ echo "\`\`\`" >> $INDEX
+ echo "~~NOTOC~~" >> $INDEX
+
+ echo "
+* Authors: $AUTHORS
+* Rights holder: $COPYRIGHT
+* Original publication: $YEAR
+* Original language: $LANGORIG
+* Translator: $TRANSLATORS
+
+-----
+
+* URL: $URL
+* Generated: $URLDATE
+" > $LANG.md.info
+
+
+ LINES=`wc -l $LANG.txt`
+ if [[ $LINES > 2 ]]; then
+ # If the files contains more than one line, we consider the original $TYPE is complete and not pending
+ TAGS=("${TAGS[@]}" available)
+ else
+ TAGS=("${TAGS[@]}" pending)
+ fi
+
+ for j in "${TAGS[@]}"
+ do
+ if [ -z "$TAGLIST" ]
+ then
+ TAGLIST="$j"
+ else
+ TAGLIST="$TAGLIST $j"
+ fi
+ done
+
+ # Add tags in the tags file in the object folder
+ if [[ -f tags ]]
+ then
+ EXTRATAGS=`cat tags | awk '{print}' ORS=' '`
+ fi
+ echo "{{tag>$TAGLIST $EXTRATAGS}}" >> $INDEX
+
+
+ # Creates the link to the text in the specific language
+ cd ../../../data/pages/$LANG/$TYPE/$i
+ if [[ ! -f text.txt ]]
+ then
+ ln -s ../../../../../contents/$TYPE/$i$LANG.txt text.txt
+ fi
+
+ if [[ ! -f notes.txt ]]
+ then
+ ln -s ../../../../../contents/$TYPE/$i$LANG.notes notes.txt
+ fi
+
+ if [[ ! -f index.bib ]]
+ then
+ ln -s ../../../../../contents/$TYPE/$i$LANG.bib index.bib
+ fi
+
+
+ cd -
+
+ if [[ $TITLELANG == $TITLEORIG ]]
+ then
+ echo "* [[$LANG:$TYPE:$FOLDER:index|$YEAR - $TITLELANG]]" >> ../index.$LANG.txt
+
+ else
+ echo "* [[$LANG:$TYPE:$FOLDER:index|$YEAR - $TITLELANG]] (*$TITLEORIG*)" >> ../index.$LANG.txt
+ fi
+
+
+ done
+ #echo "* $YEAR - $TITLEORIG" >> ../index.txt
+ echo "* [[$LANGORIG:$TYPE:$FOLDER:index|$YEAR - $TITLEORIG]]" >> ../index.txt
+
+ # Creates the $TYPE directory
+ else
+ echo "La version en el idioma original NO esta procesada, entonces marcamos como pendiente y creamos un index"
+
+ echo "LANGORIG: $LANGORIG"
+ echo "TYPE: $TYPE"
+ echo "i: $i"
+
+ # read
+
+ if [[ ! -d ../../../data/pages/$LANGORIG/$TYPE/$i ]]
+ then
+ echo "Create the $TYPE directory for $i in $LANGORIG"
+ mkdir ../../../data/pages/$LANGORIG/$TYPE/$i
+ fi
+
+
+ # Creates the index file
+ echo "Creates the index file for $i in $LANGORIG"
+ INDEX="../../../data/pages/$LANGORIG/$TYPE/$i/index.txt"
+ echo $INDEX
+
+ # TITLEORIG=`cat index | grep titleorig | cut -d "_" -f3`
+ echo "# $TITLEORIG" > $INDEX
+ echo "" >> $INDEX
+ cat index >> $INDEX
+ cat $LANGORIG.notes >> $INDEX
+ echo "" >> $INDEX
+ echo "~~NOTOC~~" >> $INDEX
+ sed -i "s/\*YEAR\*/$YEAR/g" $INDEX
+ sed -i "s/LANG_authors@#:\*\*/LANG_authors\@\#:\*\* $AUTHOR;/g" $INDEX
+
+ TAGS=("${TAGS[@]}" available)
+ for j in "${TAGS[@]}"
+ do
+ if [ -z "$TAGLIST" ]
+ then
+ TAGLIST="$j"
+ else
+ TAGLIST="$TAGLIST $j"
+ fi
+ done
+ # Add tags in the tags file in the object folder
+ if [[ -f tags ]]
+ then
+ EXTRATAGS=`cat tags | awk '{print}' ORS=' '`
+ fi
+ echo "{{tag>$TAGLIST $EXTRATAGS}}" >> $INDEX
+
+ echo "* **[[$LANGORIG:$TYPE:$FOLDER:index|$YEAR - $TITLEORIG]]**" >> ../index.txt
+
+ fi
+
+ echo "*** I will generate the MD files"
+ ../../../../../platform/bin/doku2md.sh $COLLECTION $TYPE $i
+
+ echo "*** I will generate the PDF files"
+ # read
+ cp *.md "../../../../../platform/bin/pandoc/$TYPE"
+ cp *.info "../../../../../platform/bin/pandoc/$TYPE"
+
+ ../../../../../platform/bin/pandoc/$TYPE/run.sh
+ cp ../../../../../platform/bin/pandoc/$TYPE/*.pdf .
+
+ rm ../../../../../platform/bin/pandoc/$TYPE/*.pdf
+ rm ../../../../../platform/bin/pandoc/$TYPE/*.md
+
+ cd ..
+ echo ""
+done
+
+echo "Running decades... "
+
+IFS=$'\n'
+
+case $TYPE in
+ book)
+ for file in `ls index*.txt`; do
+ sort -n -t '|' -k2 -o $file $file
+ sed -i 's/$/\n/' $file
+ done
+ ;;
+ *)
+ for file in `ls index*.txt`; do
+ mv $file $file.old
+ echo "***** $file"
+ for name in `cat $file.old`; do
+ YEAR=`echo $name | cut -d ':' -f 3 | cut -d '-' -f 1`
+ DECADE=${YEAR:0:3}
+ #echo "YEAR: $YEAR"
+ #echo "DECADE: $DECADE"
+
+ if [[ $DECADE_PRE != $DECADE ]]; then
+ echo "" >> $file
+ echo '### '$DECADE'0' >> $file
+ echo "" >> $file
+ fi
+ echo $name >> $file
+ DECADE_PRE=$DECADE
+ echo "" >> $file
+
+ done
+ done
+ rm *.old
+
+ ;;
+esac
+
+end=`date +%s%N`
+echo "Execution time was `expr $end - $start` nanoseconds."
diff --git a/platform/bin/doku2md.sh b/platform/bin/doku2md.sh
index a3f0a13..a7839e8 100755
--- a/platform/bin/doku2md.sh
+++ b/platform/bin/doku2md.sh
@@ -1,116 +1,204 @@
#!/bin/bash
+# USO : ./doku2md.sh ../../content/illich/contents/books/deschooling/en.txt
+# Genera un .md en la misma carpeta del archivo. Luego ese .md se puede usar dentro de la carpeta book para generar un PDF.
+# ./contents_compile.sh <collection> <type> <item>
+# ./contents_compile.sh illich book abc
### Script para dejar listo los .txt de Doku para hacerlos markdown
-url='https://illich.test/'
-IFS=$'\n'
-# Arregla footnotes
+cd `dirname $0`
- dir=`dirname $1`
- name=`echo $1 | sed 's/\.txt//g'`
- lang=${name: -2}
- ## Corta el archivo en dos, empezando por la linea de la primera footnote
+COLLECTION=$1
+TYPE=$2
+ITEM=$3
- n=`grep -n -m 1 ':]' $1 |sed 's/\([0-9]*\).*/\1/'`
+AUTHOR=`cat ../../content/$COLLECTION/conf/local.php | grep author | cut -d "'" -f4`
- csplit -s $1 $n -f $1.tmp.
+FOLDER="../../content/$COLLECTION/contents/$TYPE/$ITEM"
+URL=`cat ../../platform/www/conf/farm.ini | grep basedomain | cut -d '"' -f 2`
+
+IFS=$'\n'
- ## Agrega saltos de linea y elimina corchete final
+DIR=$FOLDER
+name=$ITEM
- grep ':]' $1.tmp.01 | perl -p -e 's/\n/\n\n/' > $1.footer.tmp
- sed -i 's/]$//g' $1.footer.tmp
+#
+# echo "URL: $URL"
+#
+# echo "DIR: $DIR"
+# echo "NAME: $name"
+#
+# read
- ## Unifica todo y corrige corchete de apertura
+cd $DIR
- cat $1.tmp.00 > $1.tmp
+LANGS=("en" "es")
+for lng in ${LANGS[@]}; do
- cat $1.footer.tmp >> $1.tmp
+ FILE="$lng.txt"
+ # Arregla footnotes
+ ## Corta el archivo en dos, empezando por la linea de la primera footnote
+ if [ -f $FILE ]; then
+ echo "---- File $FILE exists."
- sed 's/:]/]:/g' $1.tmp > $name.body.tmp
+ n=`grep -n -m 1 ':]' $FILE |sed 's/\([0-9]*\).*/\1/'`
- ## Borra temporales
+ if [ -z "$n" ]; then
+ cat $FILE > $lng.body.tmp
+ else
+ csplit -s $FILE $n -f $lng.tmp.
+ ## Agrega saltos de linea y elimina corchete final
+ grep ':]' $lng.tmp.01 | perl -p -e 's/\n/\n\n/' > $lng.footer.tmp
+ sed -i 's/]$//g' $lng.footer.tmp
-# agregar cabecera para pandoc!
+ ## Unifica todo y corrige corchete de apertura
-if test -f "$dir/index.txt"; then
- echo "hay index"
- yaml_title=`head -n1 "$dir/index.txt" | sed 's/# //g'`
- yaml_date=`grep 'LANG_publicationdate' "$dir/index.txt" | cut -d ':' -f2 | sed 's/ //'`
- yaml_author=`grep 'LANG_author' "$dir/index.txt" | cut -d ':' -f2 | sed 's/ //'`
- if [ -z "$yaml_author" ]
- then
- yaml_author="Ivan Illich"
- else
- case $lang in
- en)
- yaml_author=`echo $yaml_author | sed 's/, / and /g'`
- ;;
- es)
- yaml_author=`echo $yaml_author | sed 's/, / y /g'`
- ;;
- esac
- fi
+ cat $lng.tmp.00 > $lng.tmp
- meta=`echo "$name.changes" | sed 's/pages/meta/'`
- # el numero de revision es un unix timestamp
- revision=`cat $meta | tail -n1 | cut -f1`
+ cat $lng.footer.tmp >> $lng.tmp
- # ../../content/data/pages/es/book/gender/es
- # http://illich.test/es:book:gender:es?rev=1620353793
- webpage=`echo $name | sed 's/^.*pages\///'| sed 's/\//:/g'`
+ sed 's/:]/]:/g' $lng.tmp > $lng.body.tmp
+ # cat $lng.body.tmp
- echo "
----
-title: \"$yaml_title\"
-author: \"$yaml_author\"
-abstract: \"$url$webpage?rev=$revision\"
-date: \"$yaml_date\"
-lang: \"$lang\"
-titlepage: true
-titlepage-color: \"FFFFFF\"
-titlepage-text-color: \"000000\"
-titlepage-rule-color: \"CCCCCC\"
-titlepage-rule-height: 4
----
- " > $name.head.tmp
-fi
+ fi
-## Hay que cambiar los titulos
-sed -i 1d $name.body.tmp
-sed -i 's/^## /# /g' $name.body.tmp
-sed -i 's/^### /## /g' $name.body.tmp
-sed -i 's/^#### /### /g' $name.body.tmp
-sed -i 's/^##### /#### /g' $name.body.tmp
-sed -i 's/^###### /##### /g' $name.body.tmp
+ ## Borra temporales
-cat $name.head.tmp > $name.md
-cat $name.body.tmp >> $name.md
-# Mas https://github.com/alexeygumirov/pandoc-for-pdf-how-to
-# ---
-# title: "Towards Illich's 'legibility'"
-# subtitle: "Returning to Ivan through the Mirror of the Past"
-# author: "Le Goliard[^fb42]"
-# date: "2020-11-29 / Version 1.3[^b840]"
-# # abstract: "The important thing is love"
-# keywords: "Illich, JIS"
-# bibliography: "illich_legibility-en.bib"
-# lang: "es-ES"
-# rights: "This work is published under the terms of the license 'Do What the Fuck You Want to Public License 2.0' (WTFPL 2.0). For more information see: https://en.wikipedia.org/wiki/WTFPL"
-# ---
+ # agregar cabecera para pandoc!
+ if test -f "index"; then
+ echo "hay index"
+ LANGORIG=`cat "index" | grep langorig | cut -d "@" -f 4 | cut -d "_" -f 3`
+
+ if [[ $lng == $LANGORIG ]]; then
+ echo "Se procesa en idioma original"
+ yaml_title=`grep 'LANG_titleorig' "index" | cut -d '_' -f3 | sed s/\"/\'/g`
+ else
+ echo "No se procesa en idioma original"
+ yaml_title=`head -n1 $FILE | sed s/\#\ // | sed s/\"/\'/g`
+ fi
+
+
+ yaml_date=`grep 'LANG_publicationdate' "index" | cut -d ':' -f2 | sed 's/** //'`
+ if [[ $yaml_date == "*YEAR*" ]]; then
+ # If the Year is not defined, we try to take it from the path
+ yaml_date=`echo $PWD/$FILE | cut -d "-" -f 1 | rev | cut -d '/' -f1 | rev`
+ fi
+ yaml_author=`grep 'LANG_author' "index" | cut -d ':' -f2 | sed 's/ //'`
+ if [ -z "$yaml_author" ]
+ then
+ yaml_author=$AUTHOR
+ else
+ case $lng in
+ en)
+ yaml_author=`echo $yaml_author | sed 's/, / and /g'`
+ ;;
+ es)
+ yaml_author=`echo $yaml_author | sed 's/, / y /g'`
+ ;;
+ esac
+ fi
+
+ # meta=`echo "$name.changes" | sed 's/pages/meta/'`
+ # # el numero de revision es un unix timestamp
+ # revision=`cat $meta | tail -n1 | cut -f1`
+ #
+ # # ../../content/data/pages/es/book/gender/es
+ # # http://illich.test/es:book:gender:es?rev=1620353793
+ # webpage=`echo $name | sed 's/^.*pages\///'| sed 's/\//:/g'`
+
+ case $TYPE in
+ book)
+ echo "---
+ title: \"$yaml_title\"
+ author: \"$yaml_author\"
+ date: \"$yaml_date\"
+ lang: \"$lng\"
+ documentclass: book
+ classoption:
+ - oneside
+ geometry: margin=1.75in
+ fontsize: 12pt
+ fontfamily: ebgaramond-maths
+ newtxmathoptions:
+ - cmintegrals
+ - cmbraces
+ toc: true
+ colorlinks: true
+ linkcolor: RoyalBlue
+ urlcolor: RoyalBlue
+titlepage: true
+---" > $lng.head.tmp
+ ;;
+ article)
+ echo "---
+ title: \"$yaml_title\"
+ author: \"$yaml_author\"
+ date: \"$yaml_date\"
+ lang: \"$lng\"
+ documentclass: article
+ geometry: margin=1.75in
+ fontsize: 12pt
+ fontfamily: ebgaramond-maths
+ colorlinks: true
+ linkcolor: RoyalBlue
+ urlcolor: RoyalBlue
+---" > $lng.head.tmp
+ ;;
+ #...
+ *)
+ comandos
+ ;;
+ esac
+
+
+ fi
+ echo ""
+ echo ""
+
+ # cat $lng.head.tmp
+
+ ## Hay que cambiar los titulos
+
+ sed -i 1d $lng.body.tmp
+ sed -i 's/^## /# /g' $lng.body.tmp
+ sed -i 's/^### /## /g' $lng.body.tmp
+ sed -i 's/^#### /### /g' $lng.body.tmp
+ sed -i 's/^##### /#### /g' $lng.body.tmp
+ sed -i 's/^###### /##### /g' $lng.body.tmp
+
+ cat $lng.head.tmp > $lng.md
+ cat $lng.body.tmp >> $lng.md
+
+
+ # Mas https://github.com/alexeygumirov/pandoc-for-pdf-how-to
+ # ---
+ # title: "Towards Illich's 'legibility'"
+ # subtitle: "Returning to Ivan through the Mirror of the Past"
+ # author: "Le Goliard[^fb42]"
+ # date: "2020-11-29 / Version 1.3[^b840]"
+ # # abstract: "The important thing is love"
+ # keywords: "Illich, JIS"
+ # bibliography: "illich_legibility-en.bib"
+ # lang: "es-ES"
+ # rights: "This work is published under the terms of the license 'Do What the Fuck You Want to Public License 2.0' (WTFPL 2.0). For more information see: https://en.wikipedia.org/wiki/WTFPL"
+ # ---
+ rm *tmp*
+ else
+ echo "---- File $FILE not exists."
+ fi
-rm $dir/*.tmp
-rm $dir/*.tmp.*
+done
diff --git a/platform/bin/Makefile b/platform/bin/pandoc/article/Makefile
index 47b522e..ab0d72a 100644
--- a/platform/bin/Makefile
+++ b/platform/bin/pandoc/article/Makefile
@@ -22,13 +22,11 @@
#
# ============================================================================
+TARGET=sample
-TARGET = sample
-
-SOURCES = $(shell find . -name '*.md')
+all: $(patsubst %.md,%.pdf,$(wildcard *.md))
PANDOC_FLAGS =\
- --template template.tex \
-f markdown+tex_math_single_backslash \
-t latex \
@@ -42,21 +40,31 @@ else
LATEX_FLAGS += --latex-engine=$(PDF_ENGINE)
endif
-all: $(TARGET).pdf
+all: $(patsubst %.md,%.pdf,$(wildcard *.md))
+
+# Generalized rule: how to build a .pdf from each .md
+%.pdf: %.md
+ pandoc $(PANDOC_FLAGS) $(LATEX_FLAGS) -o $@ $<
-$(TARGET).pdf: $(SOURCES) template.tex
- pandoc $(PANDOC_FLAGS) $(LATEX_FLAGS) -o $@ $(SOURCES)
+# Generalized rule: how to build a .tex from each .md
+%.tex: %.md
+ pandoc --standalone $(PANDOC_FLAGS) -o $@ $<
-$(TARGET).tex: $(SOURCES) template.tex
- pandoc --standalone $(PANDOC_FLAGS) -o $@ $(SOURCES)
+touch:
+ touch *.md
+
+again: touch all
clean:
- rm -f *.aux *.log *.nav *.out *.snm *.toc *.vrb tags || true
+ rm -f *.aux *.log *.nav *.out *.snm *.toc *.vrb || true
veryclean: clean
- rm -f $(TARGET).pdf
+ rm -f *.pdf
view: $(TARGET).pdf
if [ "Darwin" = "$(shell uname)" ]; then open $(TARGET).pdf ; else xdg-open $(TARGET).pdf ; fi
-.PHONY: all clean veryclean view
+print: $(TARGET).pdf
+ lpr $(TARGET).pdf
+
+.PHONY: all again touch clean veryclean view print
diff --git a/platform/bin/pandoc/article/info.tpl b/platform/bin/pandoc/article/info.tpl
new file mode 100644
index 0000000..3456356
--- /dev/null
+++ b/platform/bin/pandoc/article/info.tpl
@@ -0,0 +1,10 @@
+\thispagestyle{empty}
+\newpage
+\thispagestyle{empty}
+\vspace*{\fill}
+
+% INSERT
+
+\vspace*{\fill}
+
+\newpage
diff --git a/platform/bin/pandoc/article/run.sh b/platform/bin/pandoc/article/run.sh
new file mode 100755
index 0000000..045ec34
--- /dev/null
+++ b/platform/bin/pandoc/article/run.sh
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+cd `dirname $0`
+rm -f *.pdf *.aux *.log *.nav *.out *.snm *.toc *.vrb
+
+for i in `ls *.md`; do
+ f=`echo $i | cut -d '.' -f1`
+ # echo "F === $f"
+ # read
+ echo "++++ I will generate a PDF of the article"
+ pandoc $f.md.info -o $f.info.tex
+ echo "deberia existir ahora: $f.info.tex"
+ # read
+ sed -e "/% INSERT/r./$f.info.tex" info.tpl > info.tex
+ pandoc -B info.tex --pdf-engine=xelatex -V geometry:margin=1in $f.md -o $f.pdf
+done
+
+rm *.tex *.info
+
+# make
diff --git a/platform/bin/pandoc/book/Makefile b/platform/bin/pandoc/book/Makefile
new file mode 100644
index 0000000..e11d781
--- /dev/null
+++ b/platform/bin/pandoc/book/Makefile
@@ -0,0 +1,70 @@
+#
+# Author: Jake Zimmerman <jake@zimmerman.io>
+#
+# ===== Usage ================================================================
+#
+# NOTE:
+# When running these commands at the command line, replace $(TARGET) with
+# the actual value of the TARGET variable.
+#
+#
+# make Compile all *.md files to PDFs
+# make <filename>.pdf Compile <filename>.md to a PDF
+# make <filename>.tex Generate the intermediate LaTeX for <filename>.md
+#
+# make view Compile $(TARGET).md to a PDF, then view it
+# make again Force everything to recompile
+#
+# make clean Get rid of all intermediate generated files
+# make veryclean Get rid of ALL generated files:
+#
+# make print Send $(TARGET).pdf to the default printer:
+#
+# ============================================================================
+
+TARGET=sample
+
+all: $(patsubst %.md,%.pdf,$(wildcard *.md))
+
+PANDOC_FLAGS =\
+ -f markdown+tex_math_single_backslash \
+ -t latex \
+
+LATEX_FLAGS = \
+
+PDF_ENGINE = xelatex
+PANDOCVERSIONGTEQ2 := $(shell expr `pandoc --version | grep ^pandoc | sed 's/^.* //g' | cut -f1 -d.` \>= 2)
+ifeq "$(PANDOCVERSIONGTEQ2)" "1"
+ LATEX_FLAGS += --pdf-engine=$(PDF_ENGINE)
+else
+ LATEX_FLAGS += --latex-engine=$(PDF_ENGINE)
+endif
+
+all: $(patsubst %.md,%.pdf,$(wildcard *.md))
+
+# Generalized rule: how to build a .pdf from each .md
+%.pdf: %.md
+ pandoc $(PANDOC_FLAGS) $(LATEX_FLAGS) -o $@ $<
+
+# Generalized rule: how to build a .tex from each .md
+%.tex: %.md
+ pandoc --standalone $(PANDOC_FLAGS) -o $@ $<
+
+touch:
+ touch *.md
+
+again: touch all
+
+clean:
+ rm -f *.aux *.log *.nav *.out *.snm *.toc *.vrb || true
+
+veryclean: clean
+ rm -f *.pdf *.md
+
+view: $(TARGET).pdf
+ if [ "Darwin" = "$(shell uname)" ]; then open $(TARGET).pdf ; else xdg-open $(TARGET).pdf ; fi
+
+print: $(TARGET).pdf
+ lpr $(TARGET).pdf
+
+.PHONY: all again touch clean veryclean view print
diff --git a/platform/bin/pandoc/book/en.md b/platform/bin/pandoc/book/en.md
new file mode 100644
index 0000000..4056ebd
--- /dev/null
+++ b/platform/bin/pandoc/book/en.md
@@ -0,0 +1,856 @@
+---
+ title: "Deschooling Society"
+ author: "Ivan Illich"
+ date: "1970"
+ lang: ""
+ documentclass: book
+ classoption:
+ - oneside
+ geometry: margin=1.75in
+ fontsize: 12pt
+ fontfamily: ebgaramond-maths
+ newtxmathoptions:
+ - cmintegrals
+ - cmbraces
+ toc: true
+ colorlinks: true
+ linkcolor: RoyalBlue
+ urlcolor: RoyalBlue
+ titlepage: true
+---
+
+# Introduction
+
+I owe my interest in public education to Everett Reimer. Until we first met in Puerto Rico in 1958, I had never questioned the value of extending obligatory schooling to all people. Together we have come to realize that for most men the right to learn is curtailed by the obligation to attend school. The essays given at CIDOC and gathered in this book grew out of memoranda which I submitted to him, and which we discussed during 1970, the thirteenth year of our dialogue. The last chapter contains my afterthoughts on a conversation with Erich Fromm on Bachofen's Mutterrecht.
+
+Since 1967 Reimer and I have met regularly at the Center for Intercultural Documentation (CIDOC) in Cuernavaca, Mexico. Valentine Borremans, the director of the Center, also joined our dialogue, and constantly urged me to test our thinking against the realities of Latin America and Africa. This book reflects her conviction that the ethos, not just the institutions, of society ought to be "deschooled".
+
+Universal education through schooling is not feasible. It would be no more feasible if it were attempted by means of alternative institutions built on the style of present schools. Neither new attitudes of teachers toward their pupils nor the proliferation of educational hardware or software (in classroom or bedroom), nor finally the attempt to expand the pedagogue's responsibility until it engulfs his pupils' lifetimes will deliver universal education. The current search for new educational funnels must be reversed into the search for their institutional inverse: educational webs which heighten the opportunity for each one to transform each moment of his living into one of learning, sharing, and caring. We hope to contribute concepts needed by those who conduct such counterfoil research on education--and also to those who seek alternatives to other established service industries.
+
+On Wednesday mornings, during the spring and summer of 1970, I submitted the various parts of this book to the participants in our CIDOC programs in Cuernavaca. Dozens of them made suggestions or provided criticisms. Many will recognize their ideas in these pages, especially Paulo Freire, Peter Berger, and Jos? Maria Bulnes, as well as Joseph Fitzpatrick, John Holt, Angel Quintero, Layman Allen, Fred Goodman, Gerhard Ladner, Didier Piveteau, Joel Spring, Augusto Salazar Bondy, and Dennis Sullivan. Among my critics, Paul Goodman most radically obliged me to revise my thinking. Robert Silvers provided me with brilliant editorial assistance on Chapters 1, 3, and 6, which have appeared in The New York Review of Books.
+
+Reimer and I have decided to publish separate views of our joint research. He is working on a comprehensive and documented exposition, which will be subjected to several months of further critical appraisal and be published late in 1971 by Doubleday & Company. Dennis Sullivan, who acted as secretary at the meetings between Reimer and myself, is preparing a book for publication in the spring of 1972 which will place my argument in the context of current debate about public schooling in the United States. I offer this volume of essays now in the hope that it will provoke additional critical contributions to the sessions of a seminar on "Alternatives in Education" planned at CIDOC in Cuernavaca for 1972 and 1973.
+
+I intend to discuss some perplexing issues which are raised once we embrace the hypothesis that society can be deschooled; to search for criteria which may help us distinguish institutions which merit development because they support learning in a deschooled milieu; and to clarify those personal goals which would foster the advent of an Age of Leisure (schole) as opposed to an economy dominated by service industries.
+
+IVAN ILLICH
+
+CIDOC Cuernavaca, Mexico November, 1970
+
+# Why We Must Disestablish School
+
+Many students, especially those who are poor, intuitively know what the schools do for them. They school them to confuse process and substance. Once these become blurred, a new logic is assumed: the more treatment there is, the better are the results; or, escalation leads to success. The pupil is thereby "schooled" to confuse teaching with learning, grade advancement with education, a diploma with competence, and fluency with the ability to say something new. His imagination is "schooled" to accept service in place of value. Medical treatment is mistaken for health care, social work for the improvement of community life, police protection for safety, military poise for national security, the rat race for productive work. Health, learning, dignity, independence, and creative endeavor are defined as little more than the performance of the institutions which claim to serve these ends, and their improvement is made to depend on allocating more resources to the management of hospitals, schools, and other agencies in question.
+
+In these essays, I will show that the institutionalization of values leads inevitably to physical pollution, social polarization, and psychological impotence: three dimensions in a process of global degradation and modernized misery. I will explain how this process of degradation is accelerated when nonmaterial needs are transformed into demands for commodities; when health, education, personal mobility, welfare, or psychological healing are defined as the result of services or "treatments". I do this because I believe that most of the research now going on about the future tends to advocate further increases in the institutionalization of values and that we must define conditions which would permit precisely the contrary to happen. We need research on the possible use of technology to create institutions which serve personal, creative, and autonomous interaction and the emergence of values which cannot be substantially controlled by technocrats. We need counterfoil research to current futurology.
+
+I want to raise the general question of the mutual definition of man's nature and the nature of modern institutions which characterizes our world view and language. To do so, I have chosen the school as my paradigm, and I therefore deal only indirectly with other bureaucratic agencies of the corporate state: the consumer-family, the party, the army, the church, the media. My analysis of the hidden curriculum of school should make it evident that public education would profit from the deschooling of society, just as family life, politics, security, faith, and communication would profit from an analogous process.
+
+I begin my analysis, in this first essay, by trying to convey what the deschooling of a schooled society might mean. In this context, it should be easier to understand my choice of the five specific aspects relevant to this process with which I deal in the subsequent chapters.
+
+Not only education but social reality itself has become schooled. It costs roughly the same to school both rich and poor in the same dependency. The yearly expenditure per pupil in the slums and in the rich suburbs of any one of twenty U.S. cities lies in the same range-and sometimes is favorable to the poor[^n00]. Rich and poor alike depend on schools and hospitals which guide their lives, form their world view, and define for them what is legitimate and what is not. Both view doctoring oneself as irresponsible, learning on one's own as unreliable, and community organization, when not paid for by those in authority, as a form of aggression or subversion. For both groups the reliance on institutional treatment renders independent accomplishment suspect. The progressive underdevelopment of self- and community-reliance is even more typical in Westchester than it is in the northeast of Brazil. Everywhere not only education but society as a whole needs "deschooling".
+
+Welfare bureaucracies claim a professional, political, and financial monopoly over the social imagination, setting standards of what is valuable and what is feasible. This monopoly is at the root of the modernization of poverty. Every simple need to which an institutional answer is found permits the invention of a new class of poor and a new definition of poverty. Ten years ago in Mexico it was the normal thing to be born and to die in one's own home and to be buried by one's friends. Only the soul's needs were taken care of by the institutional church. Now to begin and end life at home become signs either of poverty or of special privilege. Dying and death have come under the institutional management of doctors and undertakers.
+
+Once basic needs have been translated by a society into demands for scientifically produced commodities, poverty is defined by standards which the technocrats can change at will. Poverty then refers to those who have fallen behind an advertised ideal of consumption in some important respect. In Mexico the poor are those who lack three years of schooling, and in New York they are those who lack twelve.
+
+The poor have always been socially powerless. The increasing reliance on institutional care adds a new dimension to their helplessness: psychological impotence, the inability to fend for themselves. Peasants on the high plateau of the Andes are exploited by the landlord and the merchant-once they settle in Lima they are, in addition, dependent on political bosses, and disabled by their lack of schooling. Modernized poverty combines the lack of power over circumstances with a loss of personal potency. This modernization of poverty is a world-wide phenomenon, and lies at the root of contemporary underdevelopment. Of course it appears under different guises in rich and in poor countries.
+
+It is probably most intensely felt in U.S. cities. Nowhere else is poverty treated at greater cost. Nowhere else does the treatment of poverty produce so much dependence, anger, frustration, and further demands. And nowhere else should it be so evident that poverty-once it has become modernized-has become resistant to treatment with dollars alone and requires an institutional revolution.
+
+Today in the United States the black and even the migrant can aspire to a level of professional treatment which would have been unthinkable two generations ago, and which seems grotesque to most people in the Third World. For instance, the U.S. poor can count on a truant officer to return their children to school until they reach seventeen, or on a doctor to assign them to a hospital bed which costs sixty dollars per day-the equivalent of three months' income for a majority of the people in the world. But such care only makes them dependent on more treatment, and renders them increasingly incapable of organizing their own lives around their own experiences and resources within their own communities.
+
+The poor in the United States are in a unique position to speak about the predicament which threatens all the poor in a modernizing world. They are making the discovery that no amount of dollars can remove the inherent destructiveness of welfare institutions, once the professional hierarchies of these institutions have convinced society that their ministrations are morally necessary. The poor in the U.S. inner city can demonstrate from their own experience the fallacy on which social legislation in a "schooled" society is built.
+
+Supreme Court Justice William 0. Douglas observed that "the only way to establish an institution is to finance it". The corollary is also true. Only by channeling dollars away from the institutions which now treat health, education, and welfare can the further impoverishment resulting from their disabling side effects be stopped.
+
+This must be kept in mind when we evaluate federal aid pro-grams. As a case in point, between 1965 and 1968 over three billion dollars were spent in U.S. schools to offset the disadvantages of about six million children. The program is known as Title One. It is the most expensive compensatory program ever attempted anywhere in education, yet no significant improvement can be detected in the learning of these "disadvantaged" children. Compared with their classmates from middle income homes, they have fallen further behind. Moreover, in the course of this program, professionals discovered an additional ten million children laboring under economic and educational handicaps. More reasons for claiming more federal funds are now at hand.
+
+This total failure to improve the education of the poor despite more costly treatment can be explained in three ways:
+
+_1._ Three billion dollars are insufficient to improve the performance of six million children by a measurable amount; or
+
+_2._ The money was incompetently spent: different curricula, better administration, further concentration of the funds on the poor child, and more research are needed and would do the trick; or
+
+_3._ Educational disadvantage cannot be cured by relying on education within the school.
+
+The first is certainly true so long as the money has been spent through the school budget. The money indeed went to the schools which contained most of the disadvantaged children, but it was not spent on the poor children themselves. These children for whom the money was intended comprised only about half of those who were attending the schools that added the federal subsidies to their budgets. Thus the money was spent for custodial care, indoctrination and the selection of social roles, as well as education, all of which functions are inextricably mingled in the physical plants, curricula, teachers, administrators, and other key components of these schools, and, therefore, in their budgets.
+
+The added funds enabled schools to cater disproportionately to the satisfaction of the relatively richer children who were "disadvantaged" by having to attend school in the company of the poor. At best a small fraction of each dollar intended to remedy a poor child's disadvantages in learning could reach the child through the school budget.
+
+It might be equally true that the money was incompetently spent. But even unusual incompetence cannot beat that of the school system. Schools by their very structure resist the concentration of privilege on those otherwise disadvantaged. Special curricula, separate classes, or longer hours only constitute more discrimination at a higher cost.
+
+Taxpayers are not yet accustomed to permitting three billion dollars to vanish from HEW as if it were the Pentagon. The present Administration may believe that it can afford the wrath of educators. Middle-class Americans have nothing to lose if the program is cut. Poor parents think they do, but, even more, they are demanding control of the funds meant for their children. A logical way of cutting the budget and, one hopes, of increasing benefits is a system of tuition grants such as that proposed by Milton Friedman and others. Funds would be channeled to the beneficiary, enabling him to buy his share of the schooling of his choice. If such credit were limited to purchases which fit into a school curriculum, it would tend to provide greater equality of treatment, but would not thereby increase the equality of social claims.
+
+It should be obvious that even with schools of equal quality a poor child can seldom catch up with a rich one. Even if they attend equal schools and begin at the same age, poor children lack most of the educational opportunities which are casually available to the middle-class child. These advantages range from conversation and books in the home to vacation travel and a different sense of oneself, and apply, for the child who enjoys them, both in and out of school. So the poorer student will generally fall behind so long as he depends on school for advancement or learning. The poor need funds to enable them to learn, not to get certified for the treatment of their alleged disproportionate deficiencies.
+
+All this is true in poor nations as well as in rich ones, but there it appears under a different guise. Modernized poverty in poor nations affects more people more visibly but also-for the moment-more superficially. Two-thirds of all children in Latin America leave school before finishing the fifth grade, but these "desertores" are not therefore as badly off as they would be in the United States.
+
+Few countries today remain victims of classical poverty, which was stable and less disabling. Most countries in Latin America have reached the "take-off" point toward economic development and competitive consumption, and thereby toward modernized poverty: their citizens have learned to think rich and live poor. Their laws make six to ten years of school obligatory. Not only in Argentina but also in Mexico or Brazil the average citizen defines an adequate education by North American standards, even though the chance of getting such prolonged schooling is limited to a tiny minority. In these countries the majority is already hooked on school, that is, they are schooled in a sense of inferiority toward the better-schooled. Their fanaticism in favor of school makes it possible to exploit them doubly: it permits increasing allocation of public funds for the education of a few and increasing acceptance of social control by the many.
+
+Paradoxically, the belief that universal schooling is absolutely necessary is most firmly held in those countries where the fewest people have been-and will be-served by schools. Yet in Latin America different paths toward education could still be taken by the majority of parents and children. Proportionately, national savings invested in schools and teachers might be higher than in rich countries, but these investments are totally insufficient to serve the majority by making even four years of school attendance possible. Fidel Castro talks as if he wanted to go in the direction of deschooling when he promises that by 1980 Cuba will be able to dissolve its university since all of life in Cuba will be an educational experience. At the grammarschool and high-school level, however, Cuba, like all other Latin-American countries, acts as though passage through a period defined as the "school age" were an unquestionable goal for all, delayed merely by a temporary shortage of resources.
+
+The twin deceptions of increased treatment, as actually provided in the United States and as merely promised in Latin America complement each other. The Northern poor are being disabled by the same twelve-year treatment whose lack brands the Southern poor as hopelessly backward. Neither in North America nor in Latin America do the poor get equality from obligatory schools. But in both places the mere existence of school discourages and disables the poor from taking control of their own learning. All over the world the school has an anti-educational effect on society: school is recognized as the institution which specializes in education. The failures of school are taken by most people as a proof that education is a very costly, very complex, always arcane, and frequently almost impossible task.
+
+School appropriates the money, men, and good will available for education and in addition discourages other institutions from assuming educational tasks. Work, leisure, politics, city living, and even family life depend on schools for the habits and knowledge they presuppose, instead of becoming themselves the means of education. Simultaneously both schools and the other institutions which depend on them are priced out of the market.
+
+In the United States the per capita costs of schooling have risen almost as fast as the cost of medical treatment. But increased treatment by both doctors and teachers has shown steadily declining results. Medical expenses concentrated on those above forty-five have doubled several times over a period of forty years with a resulting 3 percent increase in life expectancy in men. The increase in educational expenditures has produced even stranger results; otherwise President Nixon could not have been moved this spring to promise that every child shall soon have the "Right to Read" before leaving school.
+
+In the United States it would take eighty billion dollars per year to provide what educators regard as equal treatment for all in grammar and high school. This is well over twice the $36 billion now being spent. Independent cost projections prepared at HEW and the University of Florida indicate that by 1974 the comparable figures will be $107 billion as against the $45 billion now projected, and these figures wholly omit the enormous costs of what is called "higher education," for which demand is growing even faster. The United States, which spent nearly eighty billion dollars in 1969 for "defense" including its deployment in Vietnam, is obviously too poor to provide equal schooling. The President's committee for the study of school finance should ask not how to support or how to trim such increasing costs, but how they can be avoided.
+
+Equal obligatory schooling must be recognized as at least economically unfeasible. In Latin America the amount of public money spent on each graduate student is between 350 and 1,500 times the amount spent on the median citizen (that is, the citizen who holds the middle ground between the poorest and the richest). In the United States the discrepancy is smaller, but the discrimination is keener. The richest parents, some 10 percent, can afford private education for their children and help them to benefit from foundation grants. But in addition they obtain ten times the per capita amount of public funds if this is compared with the per capita expenditure made on the children of the 10 percent who are poorest. The principal reasons for this are that rich children stay longer in school, that a year in a university is disproportionately more expensive than a year in high school, and that most private universities depend-at least indirectly-on tax-derived finances.
+
+Obligatory schooling inevitably polarizes a society; it also grades the nations of the world according to an international caste system. Countries are rated like castes whose educational dignity is determined by the average years of schooling of its citizens, a rating which is closely related to per capita gross national product, and much more painful.
+
+The paradox of the schools is evident: increased expenditure escalates their destructiveness at home and abroad. This paradox must be made a public issue. It is now generally accepted that the physical environment will soon be destroyed by biochemical pollution unless we reverse current trends in the production of physical goods. It should also be recognized that social and personal life is threatened equally by HEW pollution, the inevitable byproduct of obligatory and competitive consumption of welfare.
+
+The escalation of the schools is as destructive as the escalation of weapons but less visibly so. Everywhere in the world school costs have risen faster than enrollments and faster than the GNP; everywhere expenditures on school fall even further behind the expectations of parents, teachers, and pupils. Everywhere this situation discourages both the motivation and the financing for large-scale planning for non-schooled learning. The United States is proving to the world that no country can be rich enough to afford a school system that meets the demands this same system creates simply by existing, because a successful school system schools parents and pupils to the supreme value of a larger school system, the cost of which increases disproportionately as higher grades are in demand and become scarce.
+
+Rather than calling equal schooling temporarily unfeasible, we must recognize that it is, in principle, economically absurd, and that to attempt it is intellectually emasculating, socially polarizing, and destructive of the credibility of the political system which promotes it. The ideology of obligatory schooling admits of no logical limits. The White House recently provided a good example. Dr. Hutschnecker, the "psychiatrist" who treated Mr. Nixon before he was qualified as a candidate, recommended to the President that all children between six and eight be professionally examined to ferret out those who have destructive tendencies, and that obligatory treatment be provided for them. If necessary, their re-education in special institutions should be required. This memorandum from his doctor the President sent for evaluation to HEW. Indeed, preventive concentration camps for predelinquents would be a logical improvement over the school system.
+
+Equal educational opportunity is, indeed, both a desirable and a feasible goal, but to equate this with obligator;' schooling is to confuse salvation with the Church. School has become the world religion of a modernized proletariat, and makes futile promises of salvation to the poor of the technological age. The nation-state has adopted it, drafting all citizens into a graded curriculum leading to sequential diplomas not unlike the initiation rituals and hieratic promotions of former times. The modern state has assumed the duty of enforcing the judgment of its educators through well-meant truant officers and job requirements, much as did the Spanish kings who enforced the judgments of their theologians through the conquistadors and the Inquisition.
+
+Two centuries ago the United States led the world in a movement to disestablish the monopoly of a single church. Now we need the constitutional disestablishment of the monopoly of the school, and thereby of a system which legally combines prejudice with discrimination. The first article of a bill of rights for a modern, humanist society would correspond to the First Amendment to the U.S. Constitution: "The State shall make no law with respect to the establishment of education". There shall be no ritual obligatory for all.
+
+To make this disestablishment effective, we need a law forbidding discrimination in hiring, voting, or admission to centers of learning based on previous attendance at some curriculum. This guarantee would not exclude performance tests of competence for a function or role, but would remove the present absurd discrimination in favor of the person who learns a given skill with the largest expenditure of public funds or what is equally likely has been able to obtain a diploma which has no relation to any useful skill or job. Only by protecting the citizen from being disqualified by anything in his career in school can a constitutional disestablishment of school become psychologically effective.
+
+Neither learning nor justice is promoted by schooling because educators insist on packaging instruction with certification. Learning and the assignment of social roles are melted into schooling. Yet to learn means to acquire a new skill or insight, while promotion depends on an opinion which others have formed. Learning frequently is the result of instruction, but selection for a role or category in the job market increasingly depends on mere length of attendance.
+
+Instruction is the choice of circumstances which facilitate learning. Roles are assigned by setting a curriculum of conditions which the candidate must meet if he is to make the grade. School links instruction but not learning to these roles. This is neither reasonable nor liberating. It is not reasonable because it does not link relevant qualities or competences to roles, but rather the process by which such qualities are supposed to be acquired. It is not liberating or educational because school reserves instruction to those whose every step in learning fits previously approved measures of social control. Curriculum has always been used to assign social rank. At times it could be prenatal: karma ascribes you to a caste and lineage to the aristocracy.
+
+Curriculum could take the form of a ritual, of sequential sacred ordinations, or it could consist of a succession of feats in war or hunting, or further advancement could be made to depend on a series of previous princely favors. Universal schooling was meant to detach role assignment from personal life history: it was meant to give everybody an equal chance to any office. Even now many people wrongly believe that school ensures the dependence of public trust on relevant learning achievements. However, instead of equalizing chances, the school system has monopolized their distribution.
+
+To detach competence from curriculum, inquiries into a man's learning history must be made taboo, like inquiries into his political affiliation, church attendance, lineage, sex habits, or racial background. Laws forbidding discrimination on the basis of prior schooling must be enacted. Laws, of course, cannot stop prejudice against the unschooled-nor are they meant to force anyone to intermarry with an autodidact but they can discourage unjustified discrimination.
+
+A second major illusion on which the school system rests is that most learning is the result of teaching. Teaching, it is true, may contribute to certain kinds of learning under certain circumstances. But most people acquire most of their knowledge outside school, and in school only insofar as school, in a few rich countries, has become their place of confinement during an increasing part of their lives.
+
+Most learning happens casually, and even most intentional learning is not the result of programmed instruction. Normal children learn their first language casually, although faster if their parents pay attention to them. Most people who learn a second language well do so as a result of odd circumstances and not of sequential teaching. They go to live with their grandparents, they travel, or they fall in love with a foreigner. Fluency in reading is also more often than not a result of such extracurricular activities. Most people who read widely, and with pleasure, merely believe that they learned to do so in school; when challenged, they easily discard this illusion.
+
+But the fact that a great deal of learning even now seems to happen casually and as a by-product of some other activity defined as work or leisure does not mean that planned learning does not benefit from planned instruction and that both do not stand in need of improvement. The strongly motivated student who is faced with the task of acquiring a new and complex skill may benefit greatly from the discipline now associated with the old-fashioned schoolmaster who taught reading, Hebrew, catechism, or multiplication by rote. School has now made this kind of drill teaching rare and disreputable, yet there are many skills which a motivated student with normal aptitude can master in a matter of a few months if taught in this traditional way. This is as true of codes as of their encipherment; of second and third languages as of reading and writing; and equally of special languages such as algebra, computer programming, chemical analysis, or of manual skills like typing, watchmaking, plumbing, wiring, TV repair; or for that matter dancing, driving, and diving.
+
+In certain cases acceptance into a learning program aimed at a specific skill might presuppose competence in some other skill, but it should certainly not be made to depend upon the process by which such prerequisite skills were acquired. TV repair presupposes literacy and some math; diving, good swimming; and driving, very little of either.
+
+Progress in learning skills is measurable. The optimum resources in time and materials needed by an average motivated adult can be easily estimated. The cost of teaching a second Western European language to a high level of fluency ranges between four and six hundred dollars in the United States, and for an Oriental tongue the time needed for instruction might be doubled. This would still be very little compared with the cost of twelve years of schooling in New York City (a condition for acceptance of a worker into the Sanitation Department) almost fifteen thousand dollars. No doubt not only the teacher but also the printer and the pharmacist protect their trades through the public illusion that training for them is very expensive.
+
+At present schools preempt most educational funds. Drill instruction which costs less than comparable schooling is now a privilege of those rich enough to bypass the schools, and those whom either the army or big business sends through in-service training. In a program of progressive deschooling of U.S. education, at first the resources available for drill training would be limited. But ultimately there should be no obstacle for anyone at any time of his life to be able to choose instruction among hundreds of definable skills at public expense.
+
+Right now educational credit good at any skill center could be provided in limited amounts for people of all ages, and not just to the poor. I envisage such credit in the form of an educational passport or an "edu-credit card" provided to each citizen at birth. In order to favor the poor, who probably would not use their yearly grants early in life, a provision could be made that interest accrued to later users of cumulated "entitlements". Such credits would permit most people to acquire the skills most in demand, at their convenience, better, faster, cheaper, and with fewer undesirable side effects than in school.
+
+Potential skill teachers are never scarce for long because, on the one hand, demand for a skill grows only with its performance within a community and, on the other, a man exercising a skill could also teach it. But, at present, those using skills which are in demand and do require a human teacher are discouraged from sharing these skills with others. This is done either by teachers who monopolize the licenses or by unions which protect their trade interests. Skill centers which would be judged by customers on their results, and not on the personnel they employ or the process they use, would open unsuspected working opportunities, frequently even for those who are now considered unemployable. Indeed, there is no reason why such skill centers should not be at the work place itself, with the employer and his work force supplying instruction as well as jobs to those who choose to use their educational credits in this way.
+
+In 1956 there arose a need to teach Spanish quickly to several hundred teachers, social workers, and ministers from the New York Archdiocese so that they could communicate with Puerto Ricans. My friend Gerry Morris announced over a Spanish radio station that he needed native speakers from Harlem. Next day some two hundred teenagers lined up in front of his office, and he selected four dozen of them-many of them school dropouts. He trained them in the use of the U.S. Foreign Service Institute (FSI) Spanish manual, designed for use by linguists with graduate training, and within a week his teachers were on their own-each in charge of four New Yorkers who wanted to speak the language. Within six months the mission was accomplished. Cardinal Spellman could claim that he had 127 parishes in which at least three staff members could communicate in Spanish. No school program could have matched these results.
+
+Skill teachers are made scarce by the belief in the value of licenses. Certification constitutes a form of market manipulation and is plausible only to a schooled mind. Most teachers of arts and trades are less skillful, less inventive, and less communicative than the best craftsmen and tradesmen. Most high-school teachers of Spanish or French do not speak the language as correctly as their pupils might after half a year of competent drills. Experiments conducted by Angel Quintero in Puerto Rico suggest that many young teenagers, if given the proper incentives, programs, and access to tools, are better than most schoolteachers at introducing their peers to the scientific exploration of plants, stars, and matter, and to the discovery of how and why a motor or a radio functions.
+
+Opportunities for skill-learning can be vastly multiplied if we open the "market". This depends on matching the right teacher with the right student when he is highly motivated in an intelligent program, without the constraint of curriculum. Free and competing drill instruction is a subversive blasphemy to the orthodox educator. It dissociates the acquisition of skills from "humane" education, which schools package together, and thus it promotes unlicensed learning no less than unlicensed teaching for unpredictable purposes.
+
+There is currently a proposal on record which seems at first to make a great deal of sense. It has been prepared by Christopher Jencks of the Center for the Study of Public Policy and is sponsored by the Office of Economic Opportunity. It proposes to put educational "entitlements" or tuition grants into the hands of parents and students for expenditure in the schools of their choice. Such individual entitlements could indeed be an important step in the right direction. We need a guarantee of the right of each citizen to an equal share of tax-derived educational resources, the right to verify this share, and the right to sue for it if denied. It is one form of a guarantee against regressive taxation.
+
+The Jencks proposal, however, begins with the ominous statement that "conservatives, liberals, and radicals have all complained at one time or another that the American educational system gives professional educators too little incentive to provide high quality education to most children". The proposal condemns itself by proposing tuition grants which would have to be spent on schooling.
+
+This is like giving a lame man a pair of crutches and stipulating that he use them only if the ends are tied together. As the proposal for tuition grants now stands, it plays into the hands not only of the professional educators but of racists, promoters of religious schools, and others whose interests are socially divisive. Above all, educational entitlements restricted to use within schools play into the hands of all those who want to continue to live in a society in which social advancement is tied not to proven knowledge but to the learning pedigree by which it is supposedly acquired. This discrimination in favor of schools which dominates Jencks's discussion on refinancing education could discredit one of the most critically needed principles for educational reform: the return of initiative and accountability for learning to the learner or his most immediate tutor. The deschooling of society implies a recognition of the two-faced nature of learning. An insistence on skill drill alone could be a disaster; equal emphasis must be placed on other kinds of learning. But if schools are the wrong places for learning a skill, they are even worse places for getting an education. School does both tasks badly, partly because it does not distinguish between them. School is inefficient in skill instruction especially because it is curricular. In most schools a program which is meant to improve one skill is chained always to another irrelevant task. History is tied to advancement in math, and class attendance to the right to use the playground.
+
+Schools are even less efficient in the arrangement of the circumstances which encourage the open-ended, exploratory use of acquired skills, for which I will reserve the term "liberal education". The main reason for this is that school is obligatory and becomes schooling for schooling's sake: an enforced stay in the company of teachers, which pays off in the doubtful privilege of more such company. Just as skill instruction must be freed from curricular restraints, so must liberal education be dissociated from obligatory attendance. Both skill-learning and education for inventive and creative behavior can be aided by institutional arrangement, but they are of a different, frequently opposed nature.
+
+Most skills can be acquired and improved by drills, because skill implies the mastery of definable and predictable behavior. Skill instruction can rely, therefore, on the simulation of circumstances in which the skill will be used. Education in the exploratory and creative use of skills, however, cannot rely on drills. Education can be the outcome of instruction, though instruction of a kind fundamentally opposed to drill. It relies on the relationship between partners who already have some of the keys which give access to memories stored in and by the community. It relies on the critical intent of all those who use memories creatively. It relies on the surprise of the unexpected question which opens new doors for the inquirer and his partner.
+
+The skill instructor relies on the arrangement of set circumstances which permit the learner to develop standard responses. The educational guide or master is concerned with helping matching partners to meet so that learning can take place. He matches individuals starting from their own, unresolved questions. At the most he helps the pupil to formulate his puzzlement since only a clear statement will give him the power to find his match, moved like him, at the moment, to explore the same issue in the same context.
+
+Matching partners for educational purposes initially seems more difficult to imagine than finding skill instructors and partners for a game. One reason is the deep fear which school has implanted in us, a fear which makes us censorious. The unlicensed exchange of skills-even undesirable skills-is more predictable and therefore seems less dangerous than the unlimited opportunity for meeting among people who share an issue which for them, at the moment, is socially, intellectually, and emotionally important.
+
+The Brazilian teacher Paulo Freire knows this from experience. He discovered that any adult can begin to read in a matter of forty hours if the first words he deciphers are charged with political meaning. Freire trains his teachers to move into a village and to discover the words which designate current important issues, such as the access to a well or the compound interest on the debts owed to the patron. In the evening the villagers meet for the discussion of these key words. They begin to realize that each word stays on the blackboard even after its sound has faded. The letters continue to unlock reality and to make it manageable as a problem. I have frequently witnessed how discussants grow in social awareness and how they are impelled to take political action as fast as they learn to read. They seem to take reality into their hands as they write it down.
+
+I remember the man who complained about the weight of pencils: they were difficult to handle because they did not weigh as much as a shovel; and I remember another who on his way to work stopped with his Companions and wrote the word they were discussing with his hoe on the ground: "agua". Since 1962 my friend Freire has moved from exile to exile, mainly because he refuses to conduct his sessions around words which are preselected by approved educators, rather than those which his discussants bring to the class. The educational matchmaking among people who have been successfully schooled is a different task. Those who do not need such assistance are a minority, even among the readers of serious journals. The majority cannot and should not be rallied for discussion around a slogan, a word, or a picture. But the idea remains the same: they should be able to meet around a problem chosen and defined by their own initiative. Creative, exploratory learning requires peers currently puzzled about the same terms or problems. Large universities make the futile attempt to match them by multiplying their courses, and they generally fail since they are bound to curriculum, course structure, and bureaucratic administration. In schools, including universities, most resources are spent to purchase the time and motivation of a limited number of people to take up predetermined problems in a ritually defined setting. The most radical alternative to school would be a network or service which gave each man the same opportunity to share his current concern with others motivated by the same concern.
+
+Let me give, as an example of what I mean, a description of how an intellectual match might work in New York City. Each man, at any given moment and at a minimum price, could identify himself to a computer with his address and telephone number, indicating the book, article, film, or recording on which he seeks a partner for discussion. Within days he could receive by mail the list of others who recently had taken the same initiative. This list would enable him by telephone to arrange for a meeting with persons who initially would be known exclusively by the fact that they requested a dialogue about the same subject.
+
+Matching people according to their interest in a particular title is radically simple. It permits identification only on the basis of a mutual desire to discuss a statement recorded by a third person, and it leaves the initiative of arranging the meeting to the individual. Three objections are usually raised against this skeletal purity. I take them up not only to clarify the theory that I want to illustrate by my proposal for they highlight the deep-seated resistance to deschooling education, to separating learning from social control but also because they may help to suggest existing resources which are not now used for learning purposes.
+
+The first objection is: Why cannot self-identification be based also on an idea or an issue? Certainly such subjective terms could also be used in a computer system. Political parties, churches, unions, clubs, neighborhood centers, and professional societies already organize their educational activities in this way and in effect they act as schools. They all match people in order to explore certain "themes"; and these are dealt with in courses, seminars, and curricula in which presumed "common interests" are prepackaged. Such theme-matching is by definition teacher-centered: it requires an authoritarian presence to define for the participants the starting point for their discussion.
+
+By contrast, matching by the title of a book, film, etc., in its pure form leaves it to the author to define the special language, the terms, and the framework within which a given problem or fact is stated; and it enables those who accept this starting point to identify themselves to one another. For instance, matching people around the idea of "cultural revolution" usually leads either to confusion or to demagoguery. On the other hand, matching those interested in helping each other understand a specific article by Mao, Marcuse, Freud, or Goodman stands in the great tradition of liberal learning from Plato's Dialogues, which are built around presumed statements by Socrates, to Aquinas's commentaries on Peter the Lombard. The idea of matching by title is thus radically different from the theory on which the "Great Books" clubs, for example, were built: instead of relying on the selection by some Chicago professors, any two partners can choose any book for further analysis.
+
+The second objection asks: Why not let the identification of match seekers include information on age, background, world view, competence, experience, or other defining characteristics? Again, there is no reason why such discriminatory restrictions could not and should not be built into some of the many universities-with or without walls-which could use title-matching as their basic organizational device. I could conceive of a system designed to encourage meetings of interested persons at which the author of the book chosen would be present or represented; or a system which guaranteed the presence of a competent adviser; or one to which only students registered in a department or school had access; or one which permitted meetings only between people who defined their special approach to the title under discussion. Advantages for achieving specific goals of learning could be found for each of these restrictions. But I fear that, more often than not, the real reason for proposing such restrictions is contempt arising from the presumption that people are ignorant: educators want to avoid the ignorant meeting the ignorant around a text which they may not understand and which they read only because they are interested in it.
+
+The third objection: Why not provide match seekers with incidental assistance that will facilitate their meetings-with space, schedules, screening, and protection? This is now done by schools with all the inefficiency characterizing large bureaucracies. If we left the initiative for meetings to the match seekers themselves, organizations which nobody now classifies as educational would probably do the job much better. I think of restaurant owners, publishers, telephone-answering services, department store managers, and even commuter train executives who could promote their services by rendering them attractive for educational meetings.
+
+At a first meeting in a coffee shop, say, the partners might establish their identities by placing the book under discussion next to their cups. People who took the initiative to arrange for such meetings would soon learn what items to quote to meet the people they sought. The risk that the self-chosen discussion with one or several strangers might lead to a loss of time, disappointment, or even unpleasantness is certainly smaller than the same risk taken by a college applicant. A computer arranged meeting to discuss an article in a national magazine, held in a coffee shop off Fourth Avenue, would obligate none of the participants to stay in the company of his new acquaintances for longer than it took to drink a cup of coffee, nor would he have to meet any of them ever again. The chance that it would help to pierce the opaqueness of life in a modern city and further new friendship, selfchosen work, and critical reading is high. (The fact that a record of personal readings and meetings could be obtained thus by the FBI is undeniable; that this should still worry anybody in 1970 is only amusing to a free man, who willynilly contributes his share in order to drown snoopers in the irrelevancies they gather.)
+
+Both the exchange of skills and matching of partners are based on the assumption that education for all means education by all. Not the draft into a specialized institution but only the mobilization of the whole population can lead to popular culture. The equal right of each man to exercise his competence to learn and to instruct is now pre-empted by certified teachers. The teachers' competence, in turn, is restricted to what may be done in school. And, further, work and leisure are alienated from each other as a result: the spectator and the worker alike are supposed to arrive at the work place all ready to fit into a routine prepared for them. Adaptation in the form of a product's design, instruction, and publicity shapes them for their role as much as formal education by schooling. A radical alternative to a schooled society requires not only new formal mechanisms for the formal acquisition of skills and their educational use. A deschooled society implies a new approach to incidental or informal education.
+
+Incidental education cannot any longer return to the forms which learning took in the village or the medieval town. Traditional society was more like a set of concentric circles of meaningful structures, while modern man must learn how to find meaning in many structures to which he is only marginally related. In the village, language and architecture and work and religion and family customs were consistent with one another, mutually explanatory and reinforcing. To grow into one implied a growth into the others. Even specialized apprenticeship was a by-product of specialized activities, such as shoemaking or the singing of psalms. If an apprentice never became a master or a scholar, he still contributed to making shoes or to making church services solemn. Education did not compete for time with either work or leisure. Almost all education was complex, lifelong, and unplanned.
+
+Contemporary society is the result of conscious designs, and educational opportunities must be designed into them. Our reliance on specialized, full-time instruction through school will now decrease, and we must find more ways to learn and teach: the educational quality of all institutions must increase again. But this is a very ambiguous forecast.
+
+It could mean that men in the modern city will be increasingly the victims of an effective process of total instruction and manipulation once they are deprived of even the tenuous pretense of critical independence which liberal schools now provide for at least some of their pupils. It could also mean that men will shield themselves less behind certificates acquired in school and thus gain in courage to "talk back" and thereby control and instruct the institutions in which they participate. To ensure the latter we must learn to estimate the social value of work and leisure by the educational give-and. take for which they offer opportunity. Effective participation in the politics of a street, a work place, the library, a news program, or a hospital is therefore the best measuring stick to evaluate their level as educational institutions.
+
+I recently spoke to a group of junior-high-school students in the process of organizing a resistance movement to their obligatory draft into the next class. Their slogan was "participation not simulation". They were disappointed that this was understood as a demand for less rather than for more education, and reminded me of the resistance which Karl Marx put up against a passage in the Gotha program which-one hundred years ago wanted to outlaw child labor. He opposed the proposal in the interest of the education of the young, which could happen only at work. If the greatest fruit of man's labor should be the education he receives from it and the opportunity which work gives him to initiate the education of others, then the alienation of modern society in a pedagogical sense is even worse than its economic alienation.
+
+The major obstacle on the way to a society that truly educates was well defined by a black friend of mine in Chicago, who told me that our imagination was "all schooled up". We permit the state to ascertain the universal educational deficiencies of its citizens and establish one specialized agency to treat them. We thus share in the delusion that we can distinguish between what is necessary education for others and what is not, just as former generations established laws which defined what was sacred and what was profane.
+
+Durkheim recognized that this ability to divide social reality into two realms was the very essence of formal religion. There are, he reasoned, religions without the supernatural and without gods, but none which does not subdivide the world into things and persons that are sacred and others that as a consequence are profane. Durkheim's insight can be applied to the sociology of education, for school is radically divisive in a similar way.
+
+The very existence of obligatory schools divides any society into two realms: some time spans and processes and treatments and professions are "academic" or "pedagogic," and others are not. The power of school thus to divide social reality has no boundaries: education becomes unworldly and the world becomes noneducational.
+
+Since Bonhoeffer contemporary theologians have pointed to the confusions now reigning between the Biblical message and institutionalized religion. They point to the experience that Christian freedom and faith usually gain from secularization. Inevitably their statements sound blasphemous to many churchmen. Unquestionably, the educational process will gain from the deschooling of society even though this demand sounds to many schoolmen like treason to the enlightenment. But it is enlightenment itself that is now being snuffed out in the schools.
+
+The secularization fo the Christian faith depends on the dedication to it on the part of Christians rooted in the Church. In much the same way, the deschooling of education depend son the leadership of those brought up in the schools. Their curriculum cannot serve them as an aliby for the task: each of us remains responsible for what has been made of him, even though he may be able to do no more than accept this responsibility and serve as a warning to others.
+
+
+# Phenomenology of School
+
+Some words become so flexible that they cease to be useful "School" and "teaching" are such terms. Like an amoeba they fit into almost any interstice of the language. ABM will teach the Russians, IBM will teach Negro children, and the army can become the school of a nation.
+
+The search for alternatives in education must therefore start with an agreement on what it is we mean by "school". This might be done in several ways. We could begin by listing the latent functions performed by modern school systems, such as custodial care, selection, indoctrination, and learning. We could make a client analysis and verify which of these latent functions render a service or a disservice to teachers, employers, children, parents, or the professions. We could survey the history of Western culture and the information gathered by anthropology in order to find institutions which played a role like that now performed by schooling. We could, finally, recall the many normative statements which have been made since the time of Comenius, or even since Quintilian, and discover which of these the modern school system most closely approaches. But any of these approaches would oblige us to start with certain assumptions about a relationship between school and education. To develop a language in which we can speak about school without such constant recourse to education, I have chosen to begin with something that might be called a phenomenology of public school. For this purpose I shall define "school" as the age-specific, teacher related process requiring full-time attendance at an obligatory curriculum.
+
+_1._ Age School groups people according to age. This grouping rests on three unquestioned premises. Children belong in school.
+
+Children learn in school. Children can be taught only in school. I think these unexamined premises deserve serious questioning. We have grown accustomed to children. We have decided that they should go to school, do as they are told, and have neither income nor families of their own. We expect them to know their place and behave like children. We remember, whether nostalgically or bitterly, a time when we were children, too. We are expected to tolerate the childish behavior of children. Man-kind, for us, is a species both afflicted and blessed with the task of caring for children. We forget, however, that our present concept of "childhood" developed only recently in Western Europe and more recently still in the Americas.* (For parallel histories of modern capitalism and modern childhood see Philippe Aries, Centuries 0f Childhood, Knopf, 1962.)
+
+Childhood as distinct from infancy, adolescence, or youth was unknown to most historical periods. Some Christian centuries did not even have an eye for its bodily proportions. Artists depicted the infant as a miniature adult seated on his mother's arm. Children appeared in Europe along with the pocket watch and the Christian moneylenders of the Renaissance. Before our century neither the poor nor the rich knew of children's dress, children's games, or the child's immunity from the law. Childhood belonged to the bourgeoisie. The worker's child, the peasant's child, and the nobleman's child all dressed the way their fathers dressed, played the way their fathers played, and were hanged by the neck as were their fathers. After the discovery of "childhood" by the bourgeoisie all this changed. Only some churches continued to respect for some time the dignity and maturity of the young. Until the Second Vatican Council, each child was instructed that a Christian reaches moral discernment and freedom at the age of seven, and from then on is capable of committing sins for which he may be punished by an eternity in Hell. Toward the middle of this century, middle-class parents began to try to spare their children the impact of this doctrine, and their thinking about children now prevails in the practice of the Church.
+
+Until the last century, "children" of middle-class parents were made at home with the help of preceptors and private schools. Only with the advent of industrial society did the mass production of "childhood" become feasible and come within the reach of the masses. The school system is a modern phenomenon, as is the childhood it produces.
+
+Since most people today live outside industrial cities, most people today do not experience childhood. In the Andes you till the soil once you have become "useful". Before that, you watch the sheep. If you are well nourished, you should be useful by eleven, and otherwise by twelve. Recently, I was talking to my night watchman, Marcos, about his eleven-year-old son who works in a barbershop. I noted in Spanish that his son was still a "ni-o,” Marcos, surprised, answered with a guileless smile: "Don Ivan, I guess you're right". Realizing that until my remark the father had thought of Marcos primarily as his "son," I felt guilty for having drawn the curtain of childhood between two sensible persons. Of course if I were to tell the New York slum-dweller that his working son is still a "child," he would show no surprise. He knows quite well that his eleven-year-old son should be allowed childhood, and resents the fact that he is not. The son of Marcos has yet to be afflicted with the yearning for childhood; the New Yorker's son feels deprived.
+
+Most people around the world, then, either do not want or cannot get modern childhood for their offspring. But it also seems that childhood is a burden to a good number of those few who are allowed it. Many of them are simply forced to go through it and are not at all happy playing the child's role. Growing up through childhood means being condemned to a process of in-human conflict between self awareness and the role imposed by a society going through its own school age. Neither Stephen Daedalus nor Alexander Portnoy enjoyed childhood, and neither, I suspect, did many of us like to be treated as children. If there were no age-specific and obligatory learning institution, "childhood" would go out of production. The youth of rich nations would be liberated from its destructiveness, and poor nations would cease attempting to rival the childishness of the rich. If society were to outgrow its age of childhood, it would have to become livable for the young. The present disjunction between an adult society which pretends to be humane and a school environment which mocks reality could no longer be maintained.
+
+The disestablishment of schools could also end the present discrimination against infants, adults, and the old in favor of children throughout their adolescence and youth. The social decision to allocate educational resources preferably to those citizens who have outgrown the extraordinary learning capacity of their first four years and have not arrived at the height of their self-motivated learning will, in retrospect, probably appear as bizarre.
+
+Institutional wisdom tells us that children need school. Institutional wisdom tells us that children learn in school. But this institutional wisdom is itself the product of schools because sound common sense tells us that only children can be taught in school. Only by segregating human beings in the category of childhood could we ever get them to submit to the authority of a schoolteacher.
+
+_2._ Teachers and Pupils By definition, children are pupils. The demand for the milieu of childhood creates an unlimited market for accredited teachers. School is an institution built on the axiom that learning is the result of teaching. And institutional wisdom continues to accept this axiom, despite overwhelming evidence to the contrary.
+
+We have all learned most of what we know outside school. Pupils do most of their learning without, and often despite, their teachers. Most tragically, the majority of men are taught their lesson by schools, even though they never go to school.
+
+Everyone learns how to live outside school. We learn to speak, to think, to love, to feel, to play, to curse, to politick, and to work without interference from a teacher. Even children who are under a teacher's care day and night are no exception to the rule. Orphans, idiots, and schoolteachers' sons learn most of what they learn outside the "educational" process planned for them. Teachers have made a poor showing in their attempts at increasing learning among the poor. Poor parents who want their children to go to school are less concerned about what they will learn than about the certificate and money they will earn. And middle-class parents commit their children to a teacher's care to keep them from learning what the poor learn on the streets. Increasingly educational research demonstrates that children learn most of what teachers pretend to teach them from peer groups, from comics, from chance observations, and above all from mere participation in the ritual of school. Teachers, more often than not, obstruct such learning of subject matters as goes on in school.
+
+Half of the people in our world never set foot in school. They have no contact with teachers, and they are deprived of the privilege of becoming dropouts. Yet they learn quite effectively the message which school teaches: that they should have school, and more and more of it. School instructs them in their own inferiority through the tax collector who makes them pay for it, or through the demagogue who raises their expectations of it, or through their children once the latter are hooked on it. So the poor are robbed of their self-respect by subscribing to a creed that grants salvation only through the school. At least the Church gave them a chance to repent at the hour of death. School leaves them with the expectation (a counterfeit hope) that their grandchildren will make it. That expectation is of course still more learning which comes from school but not from teachers.
+
+Pupils have never credited teachers for most of their learning. Bright and dull alike have always relied on rote, reading, and wit to pass their exams, motivated by the stick or by the carrot of a desired career. Adults tend to romanticize their schooling. In retrospect, they attribute their learning to the teacher whose patience they learned to admire. But the same adults would worry about the mental health of a child who rushed home to tell them what he learned from his every teacher. Schools create jobs for schoolteachers, no matter what their pupils learn from them. 3\. Full-Time Attendance Every month I see another list of proposals made by some U.S. industry to AID, suggesting the replacement of Latin-American "classroom practitioners" either by disciplined systems administrators or just by TV. In the United States teaching as a team enterprise of educational researchers, designers, and technicians is gaining acceptance. But, no matter whether the teacher is a schoolmarm or a team of men in white coats, and no matter whether they succeed in teaching the subject matter listed in the catalogue or whether they fail, the professional teacher creates a sacred milieu.
+
+Uncertainty about the future of professional teaching puts the classroom into jeopardy. Were educational professionals to specialize in promoting learning, they would have to abandon a system which calls for between 750 and 1,000 gatherings a year. But of course teachers do a lot more. The institutional wisdom of schools tells parents, pupils, and educators that the teacher, if he is to teach, must exercise his authority in a sacred precinct. This is true even for teachers whose pupils spend most of their school time in a classroom without walls. School, by its very nature, tends to make a total claim on the time and energies of its participants. This, in turn, makes the teacher into custodian, preacher, and therapist.
+
+In each of these three roles the teacher bases his authority on a different claim. The teacher-as-custodian acts as a master of ceremonies, who guides his pupils through a drawn-out labyrinthine ritual. He arbitrates the observance of rules and administers the intricate rubrics of initiation to life. At his best, he sets the stage for the acquisition of some skill as schoolmasters always have. Without illusions of producing any profound learning, he drills his pupils in some basic routines.
+
+The teacher-as-moralist substitutes for parents, God, or the state. He indoctrinates the pupil about what is right or wrong, not only in school but also in society at large. He stands in loco parentis for each one and thus ensures that all feel themselves children of the same state.
+
+The teacher-as-therapist feels authorized to delve into the personal life of his pupil in order to help him grow as a person. When this function is exercised by a custodian and preacher, it usually means that he persuades the pupil to submit to a domestication of his vision of truth and his sense of what is right.
+
+The claim that a liberal society can be founded on the modern school is paradoxical. The safeguards of individual freedom are all canceled in the dealings of a teacher with his pupil. When the schoolteacher fuses in his person the functions of judge, ideologue, and doctor, the fundamental style of society is perverted by the very process which should prepare for life. A teacher who combines these three powers contributes to the warping of the child much more than the laws which establish his legal or economic minority, or restrict his right to free assembly or abode.
+
+Teachers are by no means the only professionals who offer therapy. Psychiatrists, guidance counselors, and job counselors, even lawyers, help their clients to decide, to develop their personalities, and to learn. Yet common sense tells the client that such professionals should abstain from imposing their opinion of what is right or wrong, or from forcing anyone to follow their advice. Schoolteachers and ministers are the only professionals who feel entitled to pry into the private affairs of their clients at the same time as they preach to a captive audience.
+
+Children are protected by neither the First nor the Fifth Amendment when they stand before that secular priest, the teacher. The child must confront a man who wears an invisible triple crown, like the papal tiara, the symbol of triple authority combined in one person. For the child, the teacher pontificates as pastor, prophet, and priest-he is at once guide, teacher, and administrator of a sacred ritual. He combines the claims of medieval popes in a society constituted under the guarantee that these claims shall never be exercised together by one established and obligatory institution--church or state.
+
+Defining children as full-time pupils permits the teacher to exercise a kind of power over their persons which is much less limited by constitutional and consuetudinal restrictions than the power wielded by the guardians of other social enclaves. Their chronological age disqualifies children from safeguards which are routine for adults in a modern asylum-madhouse, monastery, or jail.
+
+Under the authoritative eye of the teacher, several orders of value collapse into one. The distinctions between morality, legal. ity, and personal worth are blurred and eventually eliminated. Each transgression is made to be felt as a multiple offense. The offender is expected to feel that he has broken a rule, that he has behaved immorally, and that he has let himself down. A pupil who adroitly obtains assistance on an exam is told that he is an outlaw, morally corrupt, and personally worthless.
+
+Classroom attendance removes children from the everyday world of Western culture and plunges them into an environment far more primitive, magical, and deadly serious. School could not create such an enclave within which the rules of ordinary reality are suspended, unless it physically incarcerated the young during many successive years on sacred territory. The attendance rule makes it possible for the schoolroom to serve as a magic womb, from which the child is delivered periodically at the school days and school year's completion until he is finally expelled into adult life. Neither universal extended childhood nor the smothering atmosphere of the classroom could exist without schools. Yet schools, as compulsory channels for learning, could exist without either and be more repressive and destructive than anything we have come to know. To understand what it means to deschool society, and not just to reform the educational establishment, we must now focus on the hidden curriculum of schooling. We are not concerned here, directly, with the hidden curriculum of the ghetto streets which brands the poor or with the hidden curriculum of the drawing room which benefits the rich. We are rather concerned to call attention to the fact that the ceremonial or ritual of schooling itself constitutes such a hidden curriculum. Even the best of teachers cannot entirely protect his pupils from it. Inevitably, this hidden curriculum of schooling adds prejudice and guilt to the discrimination which a society practices against some of its members and compounds the privilege of others with a new title to condescend to the majority. Just as inevitably, this hidden curriculum serves as a ritual of initiation into a growth oriented consumer society for rich and poor alike.
+
+
+# Ritualization of Progress
+
+The university graduate has been schooled for selective service among the rich of the world. Whatever his or her claims of solidarity with the Third World, each American college graduate has had an education costing an amount five times greater than the median life income of half of humanity. A Latin American student is introduced to this exclusive fraternity by having at least 350 times as much public money spent on his education as on that of his fellow citizens of median income. With very rare exceptions, the university graduate from a poor country feels more comfortable with his North American and European colleagues than with his non-schooled compatriots, and all students are academically processed to be happy only in the company of fellow consumers of the products of the educational machine.
+
+The modern university confers the privilege of dissent on those who have been tested and classified as potential money-makers or power-holders. No one is given tax funds for the leisure in which to educate himself or the right to educate others unless at the same time he can also be certified for achievement. Schools select for each successive level those who have, at earlier stages in the game, proved themselves good risks for the established order. Having a monopoly on both the resources for learning and the investiture of social roles, the university coopts the discoverer and the potential dissenter. A degree always leaves its indelible price tag on the curriculum of its consumer. Certified college graduates fit only into a world which puts a price tag on their heads, thereby giving them the power to define the level of expectations in their society. In each country the amount of consumption by the college graduate sets the standard for all others; if they would be civilized people on or off the job, they will aspire to the style of life of college graduates.
+
+The university thus has the effect of imposing consumer standards at work and at home, and it does so in every part of the world and under every political system. The fewer university graduates there are in a country, the more their cultivated demands are taken as models by the rest of the population. The gap between the consumption of the university graduate and that of the average citizen is even wider in Russia, China, and Algeria than in the United States. Cars, airplane trips, and tape recorders confer more visible distinction in a socialist country, where only a degree, and not just money, can procure them.
+
+The ability of the university to fix consumer goals is something new. In many countries the university acquired this power only in the sixties, as the delusion of equal access to public education began to spread. Before that the university protected an individual's freedom of speech, but did not automatically convert his knowledge into wealth. To be a scholar in the Middle Ages meant to be poor, even a beggar. By virtue of his calling, the medieval scholar learned Latin, became an outsider worthy of the scorn as well as the esteem of peasant and prince, burgher and cleric. To get ahead in the world, the scholastic first had to enter it by joining the civil service, preferably that of the Church. The old university was a liberated zone for discovery and the discussion of ideas both new and old. Masters and students gathered to read the texts of other masters, now long dead, and the living words of the dead masters gave new perspective to the fallacies of the present day. The university was then a community of academic quest and endemic unrest.
+
+In the modern multiversity this community has fled to the fringes, where it meets in a pad, a professor's office, or the chaplain's quarters. The structural purpose of the modern university has little to do with the traditional quest. Since Gutenberg, the exchange of disciplined, critical inquiry has, for the most part, moved from the "chair" into print. The modern university has forfeited its chance to provide a simple setting for encounters which are both autonomous and anarchic, focused yet unplanned and ebullient, and has chosen instead to manage the process by which so-called research and instruction are produced.
+
+The American university, since Sputnik, has been trying to catch up with the body count of Soviet graduates. Now the Germans are abandoning their academic tradition and are building "campuses" in order to catch up with the Americans. During the present decade they want to increase their expenditure for grammar and high schools from 14 to 59 billion DM, and more than triple expenditures for higher learning. The French propose by 1980 to raise to 10 percent of their GNP the amount spent on schools, and the Ford Foundation has been pushing poor countries in Latin America to raise per capita expenses for "respect-able" graduates toward North American levels. Students see their studies as the investment with the highest monetary return, and nations see them as a key factor in development.
+
+For the majority who primarily seek a college degree, the university has lost no prestige, but since 1968 it has visibly lost standing among its believers. Students refuse to prepare for war, pollution, and the perpetuation of prejudice. Teachers assist them in their challenge to the legitimacy of the government, its foreign policy, education, and the American way of life. More than a few reject degrees and prepare for a life in a counterculture, outside the certified society. They seem to choose the way of medieval Fraticelli and Alumbrados of the Reformation, the hippies and dropouts of their day. Others recognize the monopoly of the schools over the resources which they need to build a counter society. They seek support from each other to live with integrity while submitting to the academic ritual. They form, so to speak, hotbeds of heresy right within the hierarchy.
+
+Large parts of the general population, however, regard the modern mystic and the modern heresiarch with alarm. They threaten the consumer economy, democratic privilege, and the self-image of America. But they cannot be wished away. Fewer and fewer can be reconverted by patience or coopted by subtlety for instance, by appointing them to teach their heresy. Hence the search for means which would make it possible either to get rid of dissident individuals or to reduce the importance of the university which serves them as a base for protest.
+
+The students and faculty who question the legitimacy of the university, and do so at high personal cost, certainly do not feel that they are setting consumer standards or abetting a production system. Those who have founded such groups as the Committee of Concerned Asian Scholars and the North American Congress on Latin America (NACLA) have been among the most effective in changing radically the perceptions of the realities of foreign countries for millions of young people. Still others have tried to formulate Marxian interpretations of American society or have been among those responsible for the flowering of communes. Their achievements add new strength to the argument that the existence of the university is necessary to guarantee continued social criticism.
+
+There is no question that at present the university offers a unique combination of circumstances which allows some of its members to criticize the whole of society. It provides time, mobility, access to peers and information, and a certain impunity-privileges not equally available to other segments of the population. But the university provides this freedom only to those who have already been deeply initiated into the consumer society and into the need for some kind of obligatory public schooling.
+
+The school system today performs the threefold function common to powerful churches throughout history. It is simultaneously the repository of society's myth, the institutionalization of that myth's contradictions, and the locus of the ritual which reproduces and veils the disparities between myth and reality. Today the school system, and especially the university, provides ample opportunity for criticism of the myth and for rebellion against its institutional perversions. But the ritual which demands tolerance of the fundamental contradictions between myth and institution still goes largely unchallenged, for neither ideological criticism nor social action can bring about a new society. Only disenchantment with and detachment from the central social ritual and reform of that ritual can bring about radical change.
+
+The American university has become the final stage of the most all encompassing initiation rite the world has ever known. No society in history has been able to survive without ritual or myth, but ours is the first which has needed such a dull, protracted, destructive, and expensive initiation into its myth. The contemporary world civilization is also the first one which has found it necessary to rationalize its fundamental initiation ritual in the name of education. We cannot begin a reform of education unless we first understand that neither individual learning nor social equality can be enhanced by the ritual of schooling. We cannot go beyond the consumer society unless we first understand that obligatory public schools inevitably reproduce such a society, no matter what is taught in them.
+
+The project of demythologizing which I propose cannot be limited to the university alone. Any attempt to reform the university without attending to the system of which it is an integral part is like trying to do urban renewal in New York City from the twelfth story up. Most current college-level reform looks like the building of high-rise slums. Only a generation which grows up without obligatory schools will be able to recreate the university.
+
+## The Myth of Institutionalized Values
+
+School initiates, too, the Myth of Unending Consumption. This modern myth is grounded in the belief that process inevitably produces something of value and, therefore, production necessarily produces demand. School teaches us that instruction produces learning. The existence of schools produces the demand for schooling. Once we have learned to need school, all our activities tend to take the shape of client relationships to other specialized institutions. Once the self-taught man or woman has been discredited, all nonprofessional activity is rendered suspect. In school we are taught that valuable learning is the result of attendance; that the value of learning increases with the amount of input; and, finally, that this value can be measured and documented by grades and certificates.
+
+In fact, learning is the human activity which least needs manipulation by others. Most learning is not the result of instruction. It is rather the result of unhampered participation in a meaningful setting. Most people learn best by being "with it," yet school makes them identify their personal, cognitive growth with elaborate planning and manipulation.
+
+Once a man or woman has accepted the need for school, he or she is easy prey for other institutions. Once young people have allowed their imaginations to be formed by curricular instruction, they are conditioned to institutional planning of every sort. "Instruction" smothers the horizon of their imaginations. They cannot be betrayed, but only short-changed, because they have been taught to substitute expectations for hope. They will no longer be surprised, for good or ill, by other people, because they have been taught what to expect from every other person who has been taught as they were. This is true in the case of another person or in the case of a machine.
+
+This transfer of responsibility from self to institution guarantees social regression, especially once it has been accepted as an obligation. So rebels against Alma Mater often "make it" into her faculty instead of growing into the courage to infect others with their personal teaching and to assume responsibility for the results. This suggests the possibility of a new Oedipus story-Oedipus the Teacher, who "makes" his mother in order to engender children with her. The man addicted to being taught seeks his security in compulsive teaching. The woman who experiences her knowledge as the result of a process wants to reproduce it in others.
+
+## The Myth of Measurement of Values
+
+The institutionalized values school instills are quantified ones. School initiates young people into a world where everything can be measured, including their imaginations, and, indeed, man himself.
+
+But personal growth is not a measurable entity. It is growth in disciplined dissidence, which cannot be measured against any rod, or any curriculum, nor compared to someone else's achievement. In such learning one can emulate others only in imaginative endeavor, and follow in their footsteps rather than mimic their gait. The learning I prize is immeasurable re-creation.
+
+School pretends to break learning up into subject "matters," to build into the pupil a curriculum made of these prefabricated blocks, and to gauge the result on an international scale. People who submit to the standard of others for the measure of their own personal growth soon apply the same ruler to themselves. They no longer have to be put in their place, but put themselves into their assigned slots, squeeze themselves into the niche which they have been taught to seek,and, in the very process, put their fellows into their places, too, until everybody and everything fits.
+
+People who have been schooled down to size let unmeasured experience slip out of their hands. To them, what cannot be measured becomes secondary, threatening. They do not have to be robbed of their creativity. Under instruction, they have unlearned to "do" their thing or "be" themselves, and value only what has been made or could be made.
+
+Once people have the idea schooled into them that values can be produced and measured, they tend to accept all kinds of rank' ings. There is a scale for the development of nations, another for the intelligence of babies, and even progress toward peace can be calculated according to body count. In a schooled world the road to happiness is paved with a consumer's index.
+
+## The Myth of Packaging Values
+
+School sells curriculum--a bundle of goods made according to the same process and having the same structure as other merchandise. Curriculum production for most schools begins with allegedly scientific research, on whose basis educational engineers predict future demand and tools for the assembly line, within the limits set by budgets and taboos. The distributor-teacher delivers the finished product to the consumer pupil, whose reactions are carefully studied and charted to provide research data for the preparation of the next model, which may be "ungraded," "student-designed," "team-taught," "visually-aided," or "issue-centered".
+
+The result of the curriculum production process looks like any other modern staple. It is a bundle of planned meanings, a package of values, a commodity whose "balanced appeal" makes it marketable to a sufficiently large number to justify the cost of production. Consumer pupils are taught to make their desires conform to marketable values. Thus they are made to feel guilty if they do not behave according to the predictions of consumer research by getting the grades and certificates that will place them in the job category they have been led to expect.
+
+Educators can justify more expensive curricula on the basis of their observation that learning difficulties rise proportionately with the cost of the curriculum. This is an application of Parkinson's Law that work expands with the resources available to do it. This law can be verified on all levels of school: for instance, reading difficulties have been a major issue in French schools only since their per capita expenditures have approached U.S. levels of 1950-when reading difficulties became a major issue in U.S. schools. In fact, healthy students often redouble their resistance to teaching as they find themselves more comprehensively manipulated. This resistance is due not to the authoritarian style of a public school or the seductive style of some free schools, but to the fundamental approach common to all schools-the idea that one person's judgment should determine what and when another person must learn.
+
+## The Myth of Self-Perpetuating Progress
+
+Even when accompanied by declining returns in learning, paradoxically, rising per capita instructional costs increase the value of the pupil in his or her own eyes and on the market. At almost any cost, school pushes the pupil up to the level of competitive curricular consumption, into progress to ever higher levels. Expenditures to motivate the student to stay on in school skyrocket as he climbs the pyramid. On higher levels they are disguised as new football stadiums, chapels, or programs called International Education. If it teaches nothing else, school teaches the value of escalation: the value of the American way of doing things.
+
+The Vietnam war fits the logic of the moment. Its success has been measured by the numbers of persons effectively treated by cheap bullets delivered at immense cost, and this brutal calculus is unashamedly called "body count". Just as business is business, the never-ending accumulation of money, so war is killing, the never-ending accumulation of dead bodies. In like manner, education is schooling, and this open-ended process is counted in pupil-hours. The various processes are irreversible and self-justifying. By economic standards the country gets richer and richer. By death-accounting standards the nation goes on winning its war forever. And by school standards the population becomes increasingly educated.
+
+School programs hunger for progressive intake of instruction, but even if the hunger leads to steady absorption, it never yields the joy of knowing something to one's satisfaction. Each subject comes packaged with the instruction to go on consuming one "offering" after another, and last year's wrapping is always obsolete for this year's consumer. The textbook racket builds on this demand. Educational reformers promise each new generation the latest and the best, and the public is schooled into demanding what they offer. Both the dropout who is forever reminded of what he missed and the graduate who is made to feel inferior to the new breed of student know exactly where they stand in the ritual of rising deceptions and continue to support a society which euphemistically calls the widening frustration gap a "revolution of rising expectations".
+
+But growth conceived as open-ended consumption-eternal progress-can never lead to maturity. Commitment to unlimited quantitative increase vitiates the possibility of organic development.
+
+## Ritual Game and the New World Religion
+
+The school leaving age in developed nations outpaces the rise in life expectancy. The two curves will intersect in a decade and create a problem for Jessica Mitford and professionals concerned with "terminal education". I am reminded of the late Middle Ages, when the demand for Church services outgrew a lifetime, and "Purgatory" was created to purify souls under the pope's control before they could enter eternal peace. Logically, this led first to a trade in indulgences and then to an attempt at Reformation. The Myth of Unending Consumption now takes the place of belief in life everlasting.
+
+Arnold Toynbee has pointed out that the decadence of a great culture is usually accompanied by the rise of a new World Church which extends hope to the domestic proletariat while serving the needs of a new warrior class. School seems eminently suited to be the World Church of our decaying culture. No institution could better veil from its participants the deep discrepancy between social principles and social reality in today's world. Secular, scientific, and death-denying, it is of a piece with the modern mood. Its classical, critical veneer makes it appear pluralist if not antireligious. Its curriculum both defines science and is itself defined by so-called scientific research. No one completes school--yet. It never closes its doors on anyone without first offering him one more chance: at remedial, adult, and continuing education.
+
+School serves as an effective creator and sustainer of social myth because of its structure as a ritual game of graded promotions. Introduction into this gambling ritual is much more important than what or how something is taught. It is the game itself that schools, that gets into the blood and becomes a habit. A whole society is initiated into the Myth of Unending Consumption of services. This happens to the degree that token participation in the open-ended ritual is made compulsory and compulsive everywhere. School directs ritual rivalry into an international game which obliges competitors to blame the world's ills on those who cannot or will not play. School is a ritual of initiation which introduces the neophyte to the sacred race of progressive consumption, a ritual of propitiation whose academic priests mediate between the faithful and the gods of privilege and power, a ritual of expiation which sacrifices its dropouts, branding them as scapegoats of underdevelopment.
+
+Even those who spend at best a few years in school-and this is the overwhelming majority in Latin America, Asia, and Africa-learn to feel guilty because of their underconsumption of schooling. In Mexico six grades of school are legally obligatory. Children born into the lower economic third have only two chances in three to make it into the first grade. If they make it, they have four chances in one hundred to finish obligatory schooling by the sixth grade. If they are born into the middle third group, their chances increase to twelve out of a hundred. With these rules, Mexico is more successful than most of the other twenty-five Latin American republics in providing public education.
+
+Everywhere, all children know that they were given a chance, albeit an unequal one, in an obligatory lottery, and the presumed equality of the international standard now compounds their original poverty with the self-inflicted discrimination accepted by the dropout. They have been schooled to the belief in rising expectations and can now rationalize their growing frustration outside school by accepting their rejection from scholastic grace. They are excluded from Heaven because, once baptized, they did not go to church. Born in original sin, they are baptized into first grade, but go to Gehenna (which in Hebrew means "slum") because of their personal faults. As Max Weber traced the social effects of the belief that salvation belonged to those who accumulated wealth, we can now observe that grace is reserved for those who accumulate years in school.
+
+## The Coming Kingdom: The Universalization of Expectations
+
+School combines the expectations of the consumer expressed in its claims with the beliefs of the producer expressed in its ritual, It is a liturgical expression of a world-wide "cargo cult," reminiscent of the cults which swept Melanesia in the forties, which injected cultists with the belief that if they but put on a black tie over their naked torsos, Jesus would arrive in a steamer bearing an icebox, a pair of trousers, and a sewing machine for each believer.
+
+School fuses the growth in humiliating dependence on a master with the growth in the futile sense of omnipotence that is so typical of the pupil who wants to go out and teach all nations to save themselves. The ritual is tailored to the stern work habits of the hardhats, and its purpose is to celebrate the myth of an earthly paradise of never-ending consumption, which is the only hope for the wretched and dispossessed.
+
+Epidemics of insatiable this-worldly expectations have occurred throughout history, especially among colonized and marginal groups in all cultures. Jews in the Roman Empire had their Essenes and Jewish messiahs, serfs in the Reformation their Thomas Müntzer, dispossessed Indians from Paraguay to Dakota their infectious dancers. These sects were always led by a prophet, and limited their promises to a chosen few. The school-induced expectation of the kingdom, on the other hand, is impersonal rather than prophetic, and universal rather than local. Man has become the engineer of his own messiah and promises the unlimited rewards of science to those who submit to progressive engineering for his reign.
+
+## The New Alienation
+
+School is not only the New World Religion. It is also the world's fastest-growing labor market. The engineering of consumers has become the economy's principal growth sector. As production costs decrease in rich nations, there is an increasing concentration of both capital and labor in the vast enterprise of equipping man for disciplined consumption. During the past decade capital investments directly related to the school system rose even faster than expenditures for defense. Disarmament would only accelerate the process by which the learning industry moves to the center of the national economy. School gives unlimited opportunity for legitimated waste, so long as its destructiveness goes unrecognized and the cost of palliatives goes up.
+
+If we add those engaged in full-time teaching to those in full-time attendance, we realize that this so-called superstructure has become society's major employer. In the United States sixty-two million people are in school and eighty million at work elsewhere. This is often forgotten by neo-Marxist analysts who say that the process of deschooling must be postponed or bracketed until other disorders, traditionally understood as more fundamental, are corrected by an economic and political revolution. Only if school is understood as an industry can revolutionary strategy be planned realistically. For Marx, the cost of producing demands for commodities was barely significant. Today most human labor is engaged in the production of demands that can be satisfied by industry which makes intensive use of capital. Most of this is done in school.
+
+Alienation, in the traditional scheme, was a direct consequence of work's becoming wage-labor which deprived man of the opportunity to create and be recreated. Now young people are prealienated by schools that isolate them while they pretend to be both producers and consumers of their own knowledge, which is conceived of as a commodity put on the market in school. School makes alienation preparatory to life, thus depriving education of reality and work of creativity. School prepares for the alienating institutionalization of life by teaching the need to be taught. Once this lesson is learned, people lose their incentive to grow in independence; they no longer find relatedness attractive, and close themselves off to the surprises which life offers when it is not predetermined by institutional definition. And school directly or indirectly employs a major portion of the population. School either keeps people for life or makes sure that they will fit into some institution.
+
+The New World Church is the knowledge industry, both purveyor of opium and the workbench during an increasing number of the years of an individual's life. Deschooling is, therefore, at the root of any movement for human liberation.
+
+## The Revolutionary Potential of Deschooling
+
+Of course, school is not, by any means, the only modern institution which has as its primary purpose the shaping of man's vision of reality. The hidden curriculum of family life, draft, health care, so-called professionalism, or of the media play an important part in the institutional manipulation of man's world-vision, language, and demands. But school enslaves more profoundly and more systematically, since only school is credited with the principal function of forming critical judgment, and, paradoxically, tries to do so by making learning about oneself, about others, and about nature depend on a prepackaged process. School touches us so intimately that none of us can expect to be liberated from it by something else.
+
+Many self-styled revolutionaries are victims of school. They see even "liberation" as the product of an institutional process. Only liberating oneself from school will dispel such illusions. The discovery that most learning requires no teaching can be neither manipulated nor planned. Each of us is personally responsible for his or her own deschooling, and only we have the power to do it. No one can be excused if he fails to liberate himself from schooling. People could not free themselves from the Crown until at least some of them had freed themselves from the established Church. They cannot free themselves from progressive consumption until they free themselves from obligatory school.
+
+We are all involved in schooling, from both the side of production and that of consumption. We are superstitiously convinced that good learning can and should be produced in us-and that we can produce it in others. Our attempt to withdraw from the concept of school will reveal the resistance we find in ourselves when we try to renounce limitless consumption and the pervasive presumption that others can be manipulated for their own good. No one is fully exempt from the exploitation of others in the schooling process.
+
+School is both the largest and the most anonymous employer of all. Indeed, the school is the best example of a new kind of enterprise, succeeding the guild, the factory, and the corporation. The multinational corporations which have dominated the economy are now being complemented, and may one day be replaced, by super nationally planned service agencies. These enterprises present their services in ways that make all men feel obliged to consume them. They are internationally standardized, redefining the value of their services periodically and everywhere at approximately the same rhythm.
+
+"Transportation" relying on new cars and superhighways serves the same institutionally packaged need for comfort, prestige, speed, and gadgetry, whether its components are produced by the state or not. The apparatus of "medical care" defines a peculiar kind of health, whether the service is paid for by the state or by the individual. Graded promotion in order to obtain diplomas fits the student for a place on the same international pyramid of qualified manpower, no matter who directs the school.
+
+In all these cases employment is a hidden benefit: the driver of a private automobile, the patient who submits to hospitalization, or the pupil in the schoolroom must now be seen as part of a new class of "employees". A liberation movement which starts in school, and yet is grounded in the awareness of teachers and pupils as simultaneously exploiters and exploited, could foreshadow the revolutionary strategies of the future; for a radical program of deschooling could train youth in the new style of revolution needed to challenge a social system featuring obligatory "health," "wealth," and "security".
+
+The risks of a revolt against school are unforeseeable, but they are not as horrible as those of a revolution starting in any other major institution. School is not yet organized for self-protection as effectively as a nation-state, or even a large corporation. Liberation from the grip of schools could be bloodless. The weapons of the truant officer and his allies in the courts and employment agencies might take very cruel measures against the individual offender, especially if he or she were poor, but they might turn out to be powerless against the surge of a mass movement.
+
+School has become a social problem; it is being attacked on all sides, and citizens and their governments sponsor unconventional experiments all over the world. They resort to unusual statistical devices in order to keep faith and save face. The mood among some educators is much like the mood among Catholic bishops after the Vatican Council. The curricula of so-called "free schools" resemble the liturgies of folk and rock masses. The demands of highschool students to have a say in choosing their teachers are as strident as those of parishioners demanding to select their pastors. But the stakes for society are much higher if a significant minority loses its faith in schooling. This would endanger the survival not only of the economic order built on the coproduction of goods and demands, but equally of the political order built on thenation-state into which students are delivered by the school.
+
+Our options are clear enough. Either we continue to believe that institutionalized learning is a product which justifies unlimited investment or we rediscover that legislation and planning and investment, if they have any place in formal education, should be used mostly to tear down the barriers that now impede opportunities for learning, which can only be a personal activity.
+
+If we do not challenge the assumption that valuable knowledge is a commodity which under certain circumstances may be forced into the consumer, society will be increasingly dominated by sinister pseudo schools and totalitarian managers of information. Pedagogical therapists will drug their pupils more in order to teach them better, and students will drug themselves more to gain relief from the pressures of teachers and the race for certificates. Increasingly larger numbers of bureaucrats will presume to pose as teachers. The language of the schoolman has already been coopted by the adman. Now the general and the policeman try to dignify their professions by masquerading as educators. In a schooled society, warmaking and civil repression find an educational rationale. Pedagogical warfare in the style of Vietnam will be increasingly justified as the only way of teaching people the superior value of unending progress.
+
+Repression will be seen as a missionary effort to hasten the coming of the mechanical Messiah. More and more countries will resort to the pedagogical torture already implemented in Brazil and Greece. This pedagogical torture is not used to extract information or to satisfy the psychic needs of sadists. It relies on random terror to break the integrity of an entire population and make it plastic material for the teachings invented by technocrats. The totally destructive and constantly progressive nature of obligatory instruction will fulfill its ultimate logic unless we begin to liberate ourselves right now from our pedagogical hubris, our belief that man can do what God cannot, namely, manipulate others for their own salvation.
+
+Many people are just awakening to the inexorable destruction which present production trends imply for the environment, but individuals have only very limited power to change these trends. The manipulation of men and women begun in school has also reached a point of no return, and most people are still unaware of it. They still encourage school reform, as Henry Ford II proposes less poisonous automobiles.
+
+Daniel Bell says that our epoch is characterized by an extreme disjunction between cultural and social structures, the one being devoted to apocalyptic attitudes, the other to technocratic decision-making. This is certainly true for many educational reformers, who feel impelled to condemn almost everything which characterizes modern schools-and at the same time propose new schools.
+
+In his The Structure of Scientific Revolutions, Thomas Kuhn argues that such dissonance inevitably precedes the emergence of a new cognitive paradigm. The facts reported by those who observed free fall, by those who returned from the other side of the earth, and by those who used the new telescope did not fit the Ptolemaic world view. Quite suddenly, the Newtonian paradigm was accepted. The dissonance which characterizes many of the young today is not so much cognitive as a matter of attitudes--a feeling about what a tolerable society cannot be like. What is surprising about this dissonance is the ability of a very large number of people to tolerate it.
+
+The capacity to pursue incongruous goals requires an explanation. According to Max Gluckman, all societies have procedures to hide such dissonances from their members. He suggests that this is the purpose of ritual. Rituals can hide from their participants even discrepancies and conflicts between social principle and social organization. As long as an individual is not explicitly conscious of the ritual character of the process through which he was initiated to the forces which shape his cosmos, he cannot break the spell and shape a new cosmos. As long as we are not aware of the ritual through which school shapes the progressive consumer--the economy's major resource--we cannot break the spell of this economy and shape a new one.
+
+
+# Institutional Spectrum
+
+Most utopian schemes and futuristic scenarios call for new and costly technologies, which would have to be sold to rich and poor nations alike. Herman Kahn has found pupils in Venezuela, Argentina, and Colombia. The pipe dreams of Sergio Bernardes for his Brazil of the year 2000 sparkle with more new machinery than is now possessed by the United States, which by then will be weighted down with the antiquated missile sites, jetports, and cities of the sixties and seventies. Futurists inspired by Buckminster Fuller would depend on cheaper and more exotic devices. They count on the acceptance of a new but possible technology that would apparently allow us to make more with less lightweight monorails rather than supersonic transport; vertical living rather than horizontal sprawling. All of today's futuristic planners seek to make economically feasible what is technically possible while refusing to face the inevitable social consequence: the increased craving of all men for goods and services that will remain the privilege of a few.
+
+I believe that a desirable future depends on our deliberately choosing a life of action over a life of consumption, on our engendering a life style which will enable us to be spontaneous, independent, yet related to each other, rather than maintaining a life style which only allows us to make and unmake, produce and consume-a style of life which is merely a way station on the road to the depletion and pollution of the environment. The future depends more upon our choice of institutions which support a life of action than on our developing new ideologies and technologies. We need a set of criteria which will permit us to recognize those institutions which support personal growth rather than addiction, as well as the will to invest our techno-logical resources preferentially in such institutions of growth.
+
+The choice is between two radically opposed institutional types, both of which are exemplified in certain existing institutions, although one type so characterizes the contemporary period. as to almost define it. This dominant type I would propose to call the manipulative institution. The other type also exists, but only precariously. The institutions which fit it are humbler and less noticeable; yet I take them as models for a more desirable future. I call them "convivial" and suggest placing them at the left of an institutional spectrum, both to show that there are institutions which fall between the extremes and to illustrate how historical institutions can change color as they shift from facilitating activity to organizing production.
+
+Generally, such a spectrum, moving from left to right, has been used to characterize men and their ideologies, not our social institutions and their styles. This categorization of men, whether as individuals or in groups, often generates more heat than light. Weighty objections can be raised against using an ordinary convention in an unusual fashion, but by doing so I hope to shift the terms of the discussion from a sterile to a fertile plane. It will become evident that men of the left are not always characterized by their opposition to the manipulative institutions, which I locate to the right on the spectrum.
+
+The most influential modern institutions crowd up at the right of the spectrum. Law enforcement has moved there, as it has shifted from the hands of the sheriff to those of the FBI and the Pentagon. Modern warfare has become a highly professional enterprise whose business is killing. It has reached the point where its efficiency is measured in body counts. Its peace-keeping potential depends on its ability to convince friend and foe of the nation's unlimited death-dealing power. Modern bullets and chemicals are so effective that a few cents' worth, properly delivered to the intended "client," unfailingly kill or maim. But delivery costs rise vertiginously; the cost of a dead Vietnamese went from $360,000 in 1967 to $450,000 in 1969. Only economies on a scale approaching race suicide would render modern warfare economically efficient. The boomerang effect in war is becoming more obvious: the higher the body count of dead Vietnamese, the more enemies the United States acquires around the world; likewise, the more the United States must spend to create another manipulative institution--cynically dubbed "pacification" in a futile effort to absorb the side effects of war.
+
+At this same extreme on the spectrum we also find social agencies which specialize in the manipulation of their clients. Like the military, they tend to develop effects contrary to their aims as the scope of their operations increases. These social institutions are equally counterproductive, but less obviously so. Many assume a therapeutic and compassionate image to mask this paradoxical effect. For example, jails, up until two centuries ago, served as a means of detaining men until they were sentenced, maimed, killed, or exiled, and were sometimes deliberately used as a form of torture. Only recently have we begun to claim that locking people up in cages will have a beneficial effect on their character and behavior. Now quite a few people are beginning to understand that jail increases both the quality and the quantity of criminals, that, in fact, it often creates them out of mere nonconformists. Far fewer people, however, seem to understand that mental hospitals, nursing homes, and orphan asylums do much the same thing. These institutions provide their clients with the destructive self-image of the psychotic, the overaged, or the waif, and provide a rationale for the existence of entire professions, just as jails produce income for wardens. Membership in the institutions found at this extreme of the spectrum is achieved in two ways, both coercive: by forced commitment or by selective service.
+
+At the opposite extreme of the spectrum lie institutions distinguished by spontaneous use-the "convivial" institutions. Telephone link-ups, subway lines, mail routes, public markets and exchanges do not require hard or soft sells to induce their clients to use them. Sewage systems, drinking water, parks, and sidewalks are institutions men use without having to be institutionally convinced that it is to their advantage to do so. Of course, all institutions require some regulation. But the operation of institutions which exist to be used rather than to produce something requires rules of an entirely different nature from those required by treatment-institutions, which are manipulative. The rules which govern institutions for use have mainly the purpose of avoiding abuses which would frustrate their general accessibility. Sidewalks must be kept free of obstructions, the industrial use of drinking water must be held within limits, and ball playing must be restricted to special areas within a park. At present we need legislation to limit the abuse of our telephone lines by computers, the abuse of mail service by advertisers, and the pollution of our sewage systems by industrial wastes. The regulation of convivial institutions sets limits to their use; as one moves from the convivial to the manipulative end of the spectrum, the rules progressively call for unwilling consumption or participation. The different cost of acquiring clients is just one of the characteristics which distinguish convivial from manipulative institutions.
+
+At both extremes of the spectrum we find service institutions, but on the right the service is imposed manipulation, and the client is made the victim of advertising, aggression, indoctrination, imprisonment, or electroshock. On the left the service is amplified opportunity within formally defined limits, while the client remains a free agent. Right-wing institutions tend to be highly complex and costly production processes in which much of the elaboration and expense is concerned with convincing consumers that they cannot live without the product or the treatment offered by the institution. Leftwing institutions tend to be networks which facilitate client-initiated communication or cooperation.
+
+The manipulative institutions of the right are either socially or psychologically "addictive". Social addiction, or escalation, consists in the tendency to prescribe increased treatment if smaller quantities have not yielded the desired results. Psycho-logical addiction, or habituation, results when consumers become hooked on the need for more and more of the process or product. The self-activated institutions of the left tend to be self-limiting. Unlike production processes which identify satisfaction with the mere act of consumption, these networks serve a purpose beyond their own repeated use. An individual picks up the telephone when he wants to say something to someone else, and hangs up when the desired communication is over. He does not, teen-agers excepted, use the telephone for the sheer pleasure of talking into the receiver. If the telephone is not the best way to get in touch, people will write a letter or take a trip. Right-wing institutions, as we can see clearly in the case of schools, both invite compulsively repetitive use and frustrate alternative ways of achieving similar results.
+
+Toward, but not at, the left on the institutional spectrum, we can locate enterprises which compete with others in their own field, but have not begun notably to engage in advertising. Here we find hand laundries, small bakeries, hairdressers, and-to speak of professionals-some lawyers and music teachers. Characteristically left of center, then, are self-employed persons who have institutionalized their services but not their publicity. They acquire clients through their personal touch and the comparative quality of their services.
+
+Hotels and cafeterias are somewhat closer to the center. The big chains like Hilton-which spend huge amounts on selling their image-often behave as if they were running institutions of the right. Yet Hilton and Sheraton enterprises do not usually offer anything more-in fact, they often give less-than similarly priced, independently managed lodgings. Essentially, a hotel sign beckons to a traveler in the manner of a road sign. It says, "Stop, here is a bed for you," rather than, "You should prefer a hotel bed to a park bench!"
+
+The producers of staples and most perishable consumer goods belong in the middle of our spectrum. They fill generic demands and add to the cost of production and distribution whatever the market will bear in advertising costs for publicity and special packaging. The more basic the product-be it goods or services-the more does competition tend to limit the sales cost of the item.
+
+Most manufacturers of consumer goods have moved much further to the right. Both directly and indirectly, they produce demands for accessories which boost real purchase price far beyond production cost. General Motors and Ford produce means of transportation, but they also, and more importantly, manipulate public taste in such a way that the need for transportation is expressed as a demand for private cars rather than public buses. They sell the desire to control a machine, to race at high speeds in luxurious comfort, while also offering the fantasy at the end of the road. What they sell, however, is not just a matter of uselessly big motors, superfluous gadgetry, or the new extras forced on the manufacturers by Ralph Nader and the clean-air lobbyists. The list price includes souped-up engines, airconditioning, safety belts, and exhaust controls; but other costs not openly declared to the driver are also involved: the corporation's advertising and sales expenses, fuel, maintenance and parts, insurance, interest on credit, as well as less tangible costs like loss of time, temper, and breathable air in our traffic-congested cities.
+
+An especially interesting corollary to our discussion of socially useful institutions is the system of "public" highways. This major element of the total cost of automobiles deserves lengthier treatment, since it leads directly to the rightist institution in which I am most interested, namely, the school.
+
+## False Public Utilities
+
+The highway system is a network for locomotion across relatively large distances. As a network, it appears to belong on the left of the institutional spectrum. But here we must make a distinction which will clarify both the nature of highways and the nature of true public utilities. Genuinely all-purpose roads are true public utilities. Superhighways are private preserves, the cost of which has been partially foisted upon the public.
+
+Telephone, postal, and highway systems are all networks, and none of them is free. Access to the telephone network is limited by time charges on each call. These rates are relatively small and could be reduced without changing the nature of the system. Use of the telephone system is not in the least limited by what is transmitted, although it is best used by those who can speak coherent sentences in the language of the other party-an ability universally possessed by those who wish to use the network. Postage is usually cheap. Use of the postal system is slightly limited by the price of pen and paper, and somewhat more by the ability to write. Still, when someone who does not know how to write has a relative or friend to whom he can dictate a letter, the postal system is at his service, as it is if he wants to ship a recorded tape.
+
+The highway system does not similarly become available to someone who merely learns to drive. The telephone and postal networks exist to serve those who wish to use them, while the highway system mainly serves as an accessory to the private automobile. The former are true public utilities, whereas the latter is a public service to the owners of cars, trucks, and buses. Public utilities exist for the sake of communication among men; highways, like other institutions of the right, exist for the sake of a product. Auto manufacturers, we have already observed, produce simultaneously both cars and the demand for cars. They also produce the demand for multilane highways, bridges, and oilfields. The private car is the focus of a cluster of right-wing institutions. The high cost of each element is dictated by elaboration of the basic product, and to sell the basic product is to hook society on the entire package.
+
+To plan a highway system as a true public utility would discriminate against those for whom velocity and individualized comfort are the primary transportation values, in favor of those who value fluidity and destination. It is the difference between a far-flung network with maximum access for travelers and one which offers only privileged access to restricted areas.
+
+Transferring a modern institution to the developing nations provides the acid test of its quality. In very poor countries roads are usually just good enough to permit transit by special, high-axle trucks loaded with groceries, livestock, or people. This kind of country should use its limited resources to build a spiderweb of trails extending to every region and should restrict imports to two or three different models of highly durable vehicles which can manage all trails at low speed. This would simplify maintenance and the stocking of spare parts, permit the operation of these vehicles around the clock, and provide maximum fluidity and choice of destination to all citizens. This would require the engineering of all-purpose vehicles with the simplicity of the Model T, making use of the most modern alloys to guarantee durability, with a built-in speed limit of not more than fifteen miles per hour, and strong enough to run on the roughest terrain. Such vehicles are not on the market because there is no demand for them. As a matter of fact, such a demand would have to be cultivated, quite possibly under the protection of strict legislation. At present, whenever such a demand is even slightly felt, it is quickly snuffed out by counterpublicity aimed at universal sales of the machines which currently extract from U.S. taxpayers the money needed for building superhighways.
+
+In order to "improve" transportation, all countries-even the poorest-now plan highway systems designed for the passenger cars and high-speed trailers which fit the velocity-conscious minority of producers and consumers in the elite classes. This approach is frequently rationalized as a saving of the most precious resource of a poor country: the time of the doctor, the school inspector, or the public administrator. These men, of course, serve almost exclusively the same people who have, or hope one day to have, a car. Local taxes and scarce international exchange are wasted on false public utilities.
+
+"Modern" technology transferred to poor countries falls into three large categories: goods, factories which make them, and service institutions -principally schools- which make men into modern producers and consumers. Most countries spend by far the largest proportion of their budget on schools. The school-made graduates then create a demand for other conspicuous utilities, such as industrial power, paved highways, modern hospitals, and airports, and these in turn create a market for the goods made for rich countries and, after a while, the tendency to import obsolescent factories to produce them.
+
+Of all "false utilities," school is the most insidious. Highway systems produce only a demand for cars. Schools create a demand for the entire set of modern institutions which crowd the right end of the spectrum. A man who questioned the need for high. ways would be written off as a romantic; the man who questions the need for school is immediately attacked as either heartless or imperialist.
+
+## Schools as False Public Utilities
+
+Like highways, schools, at first glance, give the impression of being equally open to all comers. They are, in fact, open only to those who consistently renew their credentials. Just as highways create the impression that their present level of cost per year is necessary if people are to move, so schools are presumed essential for attaining the competence required by a society which uses modern technology. We have exposed speedways as spurious public utilities by noting their dependence on private automobiles. Schools are based upon the equally spurious hypothesis that learning is the result of curricular teaching.
+
+Highways result from a perversion of the desire and need for mobility into the demand for a private car. Schools themselves pervert the natural inclination to grow and learn into the demand for instruction. Demand for manufactured maturity is a far greater abnegation of self-initiated activity than the demand for manufactured goods. Schools are not only to the right of highways and cars; they belong near the extreme of the institutional spectrum occupied by total asylums. Even the producers of body counts kill only bodies. By making men abdicate the responsibility for their own growth, school leads many to a kind of spiritual suicide.
+
+Highways are paid for in part by those who use them, since tolls and gasoline taxes are extracted only from drivers. School, on the other hand, is a perfect system of regressive taxation, where the privileged graduates ride on the back of the entire paying public. School puts a head tax on promotion. The under consumption of highway mileage is not nearly so costly as the under consumption of schooling. The man who does not own a car in Los Angeles may be almost immobilized, but if he can somehow manage to reach a work place, he can get and hold a job. The school dropout has no alternative route. The suburbanite with his new Lincoln and his country cousin who drives a beat-up jalopy get essentially the same use out of the highway, even though one man's car costs thirty times more than the other's. The value of a man's schooling is a function of the number of years he has completed and of the costliness of the schools he has attended. The law compels no one to drive, whereas it obliges everyone to go to school.
+
+The analysis of institutions according to their present placement on a left-right continuum enables me to clarify my belief that fundamental social change must begin with a change of consciousness about institutions and to explain why the dimension of a viable future turns on the rejuvenation of institutional style.
+
+During the sixties institutions born in different decades since the French Revolution simultaneously reached old age; public school systems founded in the time of Jefferson or of Atatürk, along with others which started after World War II,all became bureaucratic, self-justifying, and manipulative. The same thing happened to systems of social security, to labor unions, major churches and diplomacies, the care of the aged, and the disposal of the dead.
+
+Today, for instance, the school systems of Colombia, Britain, the U.S.S.R., and the U.S. resemble each other more closely than U.S. schools of the late 1890's resembled either today's or their contemporaries in Russia. Today all schools are obligatory, open-ended, and competitive. The same convergence in institutional style affects health care, merchandising, personnel administration, and political life. All these institutional processes tend to pile up at the manipulative end of the spectrum.
+
+A merger of world bureaucracies results from this convergence of institutions. The style, the ranking systems, and the paraphernalia (from textbook to computer) are standardized on the planning boards of Costa Rica or Afghanistan after the model of Western Europe.
+
+Everywhere these bureaucracies seem to focus on the same task: promoting the growth of institutions of the right. They are concerned with the making of things, the making of ritual rules, and the making-and reshaping--of "executive truth," the ideology or fiat which establishes the current value which should be attributed to their product.
+
+Technology provides these bureaucracies with increasing power on the right hand of society. The left hand of society seems to wither, not because technology is less capable of increasing the range of human action, and providing time for the play of individual imagination and personal creativity, but because such use of technology does not increase the power of an elite which administers it. The postmaster has no control over the substantive use of the mails, the switchboard operator or Bell Telephone executive has no power to stop adultery, murder, or subversion from being planned over his network.
+
+At stake in the choice between the institutional right and left is the very nature of human life. Man must choose whether tobe rich in things or in the freedom to use them. He must choose between alternate styles of life and related production schedules.
+
+Aristotle had already discovered that "making and acting" are different, so different, in fact, that one never includes the other. "For neither is acting a way of making-nor making a way of truly acting. Architecture _techne_ is a way of making - - - of bringing something into being whose origin is in the maker and not in the thing. Making has always an end other than itself, action not; for good action itself is its end. Perfection in making is an art, perfection in acting is a virtue".[^n01] The word which Aristotle employed for making was "poesis," and the word he employed for doing, "praxis". A move to the right implies that an institution is being restructured to increase its ability to "make," while as it moves to the left, it is being restructured to allow increased "doing" or "praxis". Modern technology has increased the ability of man to relinquish the "making" of things to machines, and his potential time for "acting"" has increased.
+
+"Making" the necessities of life has ceased to take up his time. Unemployment is the result of this modernization: it is the idleness of a man for whom there is nothing to "make" and who does not know what to "do"--that is, how to "act". Unemployment is the sad idleness of a man who, contrary to Aristotle, believes that making things, or working, is virtuous and that idleness is bad. Unemployment is the experience of the man who has succumbed to the Protestant ethic. Leisure, according to Weber, is necessary for man to be able to work. For Aristotle, work is necessary for man to have leisure.
+
+Technology provides man with discretionary time he can fill either with making or with doing. The choice between sad unemployment and joyful leisure is now open for the entire culture. It depends on the institutional style the culture chooses. This choice would have been unthinkable in an ancient culture built either on peasant agriculture or on slavery. It has become inevitable for postindustrial man.
+
+One way to fill available time is to stimulate increased demands for the consumption of goods and, simultaneously, for the production of services. The former implies an economy which provides an ever-growing array of ever newer things which can be made, consumed, wasted, and recycled. The latter implies the futile attempt to "make" virtuous actions into the products of "service" institutions. This leads to the identification of schooling and education, of medical service and health, of program watching and entertainment, of speed and effective locomotion. This first option now goes under the name of development.
+
+The radically alternative way to fill available time is a limited range of more durable goods and to provide access to institutions which can increase the opportunity and desirability of human interaction.
+
+A durable-goods economy is precisely the contrary of an economy based on planned obsolescence. A durable-goods economy means a constraint on the bill of goods. Goods would have to be such that they provided the maximum opportunity to "do" something with them: items made for self-assembly, self-help, reuse, and repair.
+
+The complement to a durable, repairable, and reusable bill of goods is not an increase of institutionally produced services, but rather an institutional framework which constantly educates to action, participation, and self-help. The movement of our society from the present--in which all institutions gravitate toward post-industrial bureaucracy--to a future of postindustrial conviviality--in which the intensity of action would prevail over production--must begin with a renewal of style in the service institutions--and, first of all, with a renewal of education. A future which is desirable and feasible depends on our willingness to invest our technological know-how into the growth of convivial institutions. In the field of educational research, this amounts to the request for a reversal of present trends.
+
+
+# Irrational Consistencies
+
+[^n02] I believe that the contemporary crisis of education demands that we review the very idea of publicly prescribed learning, rather than the methods used in its enforcement. The dropout rate--especially of junior-high-school students and elementary-school teachers--points to a grass-roots demand for a completely fresh look. The "classroom practitioner" who considers himself a liberal teacher is increasingly attacked from all sides. The free-school movement, confusing discipline with indoctrination, has painted him into the role of a destructive authoritarian. The educational technologist consistently demonstrates the teacher's inferiority at measuring and modifying behavior. And the school administration for which he works forces him to bow to both Summerhill and Skinner, making it obvious that compulsory learning cannot be a liberal enterprise. No wonder that the desertion rate of teachers is overtaking that of their students.
+
+America's commitment to the compulsory education of its young now reveals itself to be as futile as the pretended American commitment to compulsory democratization of the Vietnamese. Conventional schools obviously cannot do it. The free-school movement entices unconventional educators, but ultimately does so in support of the conventional ideology of schooling. And the promises of educational technologists, that their research and development--if adequately funded--can offer some kind of final solution to the resistance of youth to compulsory learning, sound as confident and prove as fatuous as the analogous promises made by the military technologists.
+
+The criticism directed at the American school system by the behaviorists and that coming from the new breed of radical educators seem radically opposed. The behaviorists apply educational research to the "induction of autotelic instruction through individualized learning packages". Their style clashes with the nondirective cooption of youth into liberated communes established under the supervision of adults. Yet, in historical perspective, these two are just contemporary manifestations of the seemingly contradictory yet really complementary goals of the public school system. From the beginning of this century, the schools have been protagonists of social control on the one hand and free cooperation on the other, both placed at the service of the "good society," conceived of as a highly organized and smoothly working corporate structure. Under the impact of intense urbanization, children became a natural resource to be molded by the schools and fed into the industrial machine. Progressive politics and the cult of efficiency converged in the growth of the U.S. public school.* (See Joel Spring, Education and the Rise of the Corporate State, Cuaderno No. 50. Centro Intercultural de Documentaci6n, Cuernavaca, Mexico, 1971) Vocational guidance and the junior high school were two important results of this kind of thinking.
+
+It appears, therefore, that the attempt to produce specified behavioral changes which can be measured and for which the processor can be held accountable is just one side of a coin, whose other side is the pacification of the new generation within specially engineered enclaves which will seduce them into the dream world of their elders. These pacified in society are well described by Dewey, who wants us to "make each one of our schools an embryonic community life, active with types of occupations that reflect the life of the larger society, and permeate it with the spirit of art, history and science". In this historical perspective, it would be a grave mistake to interpret the current three-cornered controversy between the school establishment, the educational technologists and the free schools as the prelude to a revolution in education. This controversy reflects rather a stage of an attempt to escalate an old dream into fact, and to finally make all valuable learning the result of professional teaching. Most educational alternatives proposed converge toward goals which are immanent in the production of the cooperative man whose individual needs are met by means of his specialization in the American system: They are oriented toward the improvement of what--for lack of a better phrase--I call the schooled society. Even the seemingly radical critics of the school system are not willing to abandon the idea that they have an obligation to the young, especially to the poor, an obligation to process them, whether by love or by fear, into a society which needs disciplined specialization as much from its producers as from its consumers and also their full commitment to the ideology which puts economic growth first.
+
+Dissent veils the contradictions inherent in the very idea of school. The established teachers unions, the technological wizards, and the educational liberation movement reinforce the commitment of the entire society to the fundamental axioms of a schooled world, somewhat in the manner in which many peace and protest movements reinforce the commitments of their members--be they black, female, young, or poor--to seek justice through the growth of the gross national income.
+
+Some of the tenets which now go unchallenged are easy to list. There is, first, the shared belief that behavior which has been acquired in the sight of a pedagogue is of special value to the pupil and of special benefit to society. This is related to the assumption that social man is born only in adolescence, and properly born only if he matures in the school-womb, which some want to gentle by permissiveness, others to stuff with gadgets, and still others to varnish with a liberal tradition. And there is, finally, a shared view of youth which is psychologically romantic and politically conservative. According to this view, changes in society must be brought about by burdening the young with the responsibility of transforming it-but only after their eventual release from school. It is easy for a society founded on such tenets to build up a sense of its responsibility for the education of the new generation, and this inevitably means that some men may set, specify, and evaluate the personal goals of others. In a "passage from an imaginary Chinese encyclopedia," Jorge Luis Borges tries to evoke the sense of giddiness such an attempt must produce. He tells us that animals are divided into the following classes: "(a) those belonging to the emperor, (b) those that are embalmed, (c) those that are domesticated, (d) the suckling pigs, (e) the sirens, (f) fabulous ones, (g) the roaming dogs, (h) those included in the present classification, (i) those that drive themselves crazy, (j) innumerable ones, (k) those painted with a very fine brush of camel hair, (1) etcetera, (m) those who have just broken the jug, (n) those who resemble flies from afar". Now, such a taxonomy does not come into being unless somebody feels it can serve his purpose: in this case, I suppose, that somebody was a tax collector. For him, at least, this taxonomy of beasts must have made sense, the same way in which the taxonomy of educational objectives makes sense to scientific authors.
+
+In the peasant, the vision of men with such inscrutable logic, empowered to assess his cattle, must have induced a chilling sense of impotence. Students, for analogous reasons, tend to feel paranoiac when they seriously submit to a curriculum. Inevitably they are even more frightened than my imaginary Chinese peasant, because it is their life goals rather than their life-stock which is being branded with an inscrutable sign.
+
+This passage of Borges is fascinating, because it evokes the logic of irrational consistency which makes Kafka's and Koestler's bureaucracies so sinister yet so evocative of everyday life. Irrational consistency mesmerizes accomplices who are engaged in mutually expedient and disciplined exploitation. It is the logic generated by bureaucratic behavior. And it becomes the logic of a society which demands that the managers of its educational institutions be held publicly accountable for the behavioral modification they produce in their clients. Students who can be motivated to value the educational packages which their teachers obligate them to consume are comparable to Chinese peasants who can fit their flocks into the tax form provided by Borges.
+
+At some time during the last two generations a commitment to therapy triumphed in American culture, and teachers came to be regarded as the therapists whose ministrations all men need, if they wish to enjoy the equality and freedom with which, according to the Constitution, they are born. Now the teacher-therapists go on to propose lifelong educational treatment as the next step. The style of this treatment is under discussion: Should it take the form of continued adult classroom attendance? Electronic ecstasy? Or periodic sensitivity sessions? All educators are ready to conspire to push out the walls of the classroom, with the goal of transforming the entire culture into a school.
+
+The American controversy over the future of education, behind its rhetoric and noise, is more conservative than the discourse in other areas of public policy. On foreign affairs, at least, an organized minority constantly reminds us that the United States must renounce its role as the world's policeman. Radical economists, and now even their less radical teachers, question aggregate growth as a desirable goal. There are lobbies for prevention over cure in medicine and others in favor of fluidity over speed in transportation. Only in the field of education do the articulate voices demanding a radical deschooling of society remain so dispersed. There is a lack of cogent argument and of mature leadership aiming at the disestablishment of any and all institutions which serve the purpose of compulsory learning. For the moment, the radical deschooling of society is still a cause without a party. This is especially surprising in a time of growing, though chaotic, resistance to all forms of institutionally planned instruction on the part of those aged twelve to seventeen.
+
+Educational innovators still assume that educational institutions function like funnels for the programs they package. For my argument it is irrelevant whether these funnels take the form of a classroom, a TV transmitter, or a "liberated zone". It is equally irrelevant whether the packages purveyed are rich or poor, hot or cold, hard and measurable (like Math III), or impossible to assess (like sensitivity). What counts is that education is assumed to be the result of an institutional process managed by the educator. As long as the relations continue to be those between a supplier and a consumer, educational research will remain a circular process. It will amass scientific evidence in support of the need for more educational packages and for their more deadly accurate delivery to the individual customer, just as a certain brand of social science can prove the need for the delivery of more military treatment.
+
+An educational revolution depends on a twofold inversion: a new orientation for research and a new understanding of the educational style of an emerging counterculture.
+
+Operational research now seeks to optimize the efficiency of an inherited framework--a framework which is itself never questioned. This framework has the syntactic structure of a funnel for teaching packages. The syntactic alternative to it is an educational network or web for the autonomous assembly of resources under the personal control of each learner. This alternative structure of an educational institution now lies within the conceptual blind spot of our operational research. If research were to focus on it, this would constitute a true scientific revolution.
+
+The blind spot of educational research reflects the cultural bias of a society in which technological growth has been confused with technocratic control. For the technocrat the value of an environment increases as more contacts between each man and his milieu can be programmed. In this world the choices which are manageable for the observer or planner converge with the choices possible for the observed so-called beneficiary. Freedom is reduced to a selection among packaged commodities.
+
+The emerging counterculture reaffirms the values of semantic content above the efficiency of increased and more rigid syntax. It values the wealth of connotation above the power of syntax to produce wealth. It values the unpredictable outcome of self-chosen personal encounter above the certified quality of professional instruction. This reorientation toward personal surprise rather than institutionally engineered values will be disruptive of the established order until we dissociate the increasing availability of technological tools which facilitate encounter from the increasing control of the technocrat of what happens when people meet.
+
+Our present educational institutions are at the service of the teacher's goals. The relational structures we need are those which will enable each man to define himself by learning and by contributing to the learning of others.
+
+
+# Learning Webs
+
+In a previous chapter I discussed what is becoming a common complaint about schools, one that is reflected, for example, in the recent report of the Carnegie Commission: In school registered students submit to certified teachers in order to obtain certificates of their own; both are frustrated and both blame insufficient resources--money, time, or buildings--for their mutual frustration.
+
+Such criticism leads many people to ask whether it is possible to conceive of a different style of learning. The same people, paradoxically, when pressed to specify how they acquired what they know and value, will readily admit that they learned it more often outside than inside school. Their knowledge of facts, their understanding of life and work came to them from friendship or love, while viewing TV, or while reading, from examples of peers or the challenge of a street encounter. Or they may have learned what they know through the apprenticeship ritual for admission to a street gang or the initiation to a hospital, newspaper city room, plumber's shop, or insurance office. The alternative to dependence on schools is not the use of public resources for some new device which "makes" people learn; rather it is the creation of a new style of educational relationship between man and his environment. To foster this style, attitudes toward growing up, the tools available for learning, and the quality and structure of daily life will have to change concurrently.
+
+Attitudes are already changing. The proud dependence on school is gone. Consumer resistance increases in the knowledge industry. Many teachers and pupils, taxpayers and employers, economists and policemen would prefer not to depend any longer on schools. What prevents their frustration from shaping new institutions is a lack not only of imagination but frequently also of appropriate language and of enlightened self-interest. They cannot visualize either a deschooled society or educational institutions in a society which has disestablished school.
+
+In this chapter I intend to show that the inverse of school is possible: that we can depend on self-motivated learning instead of employing teachers to bribe or compel the student to find the time and the will to learn; that we can provide the learner with new links to the world instead of continuing to funnel all educational programs through the teacher. I shall discuss some of the general characteristics which distinguish schooling from learning and outline four major categories of educational institutions which should appeal not only to many individuals but also to many existing interest groups. An Objection: Who Can Be Served by Bridges to Nowhere?
+
+We are used to considering schools as a variable, dependent on the political and economic structure. If we can change the style of political leadership, or promote the interests of one class or another, or switch from private to public ownership of the means of production, we assume the school system will change as well. The educational institutions I will propose, however, are meant to serve a society which does not now exist, although the current frustration with schools is itself potentially a major force to set in motion change toward new social arrangements. An obvious objection has been raised to this approach: Why channel energy to build bridges to nowhere, instead of marshaling it first to change not the schools but the political and economic system?
+
+This objection, however, underestimates the fundamental political and economic nature of the school system itself, as well as the political potential inherent in any effective challenge to it.
+
+In a basic sense, schools have ceased to be dependent on the ideology professed by any government or market organization. Other basic institutions might differ from one country to another: family, party, church, or press. But everywhere the school system has the same structure, and everywhere its hidden curriculum has the same effect. Invariably, it shapes the consumer who values institutional commodities above the nonprofessional ministration of a neighbor.
+
+Everywhere the hidden curriculum of schooling initiates the citizen to the myth that bureaucracies guided by scientific knowledge are efficient and benevolent. Everywhere this same curriculum instills in the pupil the myth that increased production will"" provide a better life. And everywhere it develops the habit of self-defeating consumption of services and alienating production, the tolerance for institutional dependence, and the recognition of institutional rankings. The hidden curriculum of school does all this in spite of contrary efforts undertaken by teachers and no matter what ideology prevails.
+
+In other words, schools are fundamentally alike in all countries, be they fascist, democratic or socialist, big or small, rich or poor. This identity of the school system forces us to recognize the profound world-wide identity of myth, mode of production, and method of social control, despite the great variety of mythologies in which the myth finds expression.
+
+In view of this identity, it is illusory to claim that schools are, in any profound sense, dependent variables. This means that to hope for fundamental change in the school system as an effect of conventionally conceived social or economic change is also an illusion. Moreover, this illusion grants the school -the reproductive organ of a consumer society- almost unquestioned immunity.
+
+It is at this point that the example of China becomes important. For three millennia, China protected higher learning through a total divorce between the process of learning and the privilege conferred by mandarin examinations. To become a world power and a modern nation-state, China had to adopt the international style of schooling. Only hindsight will allow us to discover if the Great Cultural Revolution will turn out to have been the first successful attempt at deschooling the institutions of society.
+
+Even the piecemeal creation of new educational agencies which were the inverse of school would be an attack on the most sensitive link of a pervasive phenomenon, which is organized by the state in all countries. A political program which does not explicitly recognize the need for deschooling is not revolutionary; it is demagoguery calling for more of the same. Any major political program of the seventies should be evaluated by this measure: How clearly does it state the need for deschooling -and how clearly does it provide guidelines for the educational quality of the society for which it aims?
+
+The struggle against domination by the world market and big-power politics might be beyond some poor communities or countries, but this weakness is an added reason for emphasizing the importance of liberating each society through a reversal of its educational structure, a change which is not beyond any society's means.
+
+## General Characteristics of New Formal Educational Institutions
+
+A good educational system should have three purposes: it should provide all who want to learn with access to available resources at any time in their lives; empower all who want to share what they know to find those who want to learn it from them; and, finally, furnish all who want to present an issue to the public with the opportunity to make their challenge known. Such a system would require the application of constitutional guarantees to education. Learners should not be forced to submit to an obligatory curriculum, or to discrimination based on whether they possess a certificate or a diploma. Nor should the public be forced to support, through a regressive taxation, a huge professional apparatus of educators and buildings which in fact restricts the public's chances for learning to the services the profession is willing to put on the market. It should use modern technology to make free speech, free assembly, and a free press truly universal and, therefore, fully educational.
+
+Schools are designed on the assumption that there is a secret to everything in life; that the quality of life depends on knowing that secret; that secrets can be known only in orderly successions; and that only teachers can properly reveal these secrets. An individual with a schooled mind conceives of the world as a pyramid of classified packages accessible only to those who carry the proper tags. New educational institutions would break apart this pyramid. Their purpose must be to facilitate access for the learner: to allow him to look into the windows of the control room or the parliament, if he cannot get in by the door. Moreover, such new institutions should be channels to which the learner would have access without credentials or pedigree- public spaces in which peers and elders outside his immediate horizon would become available.
+
+I believe that no more than four -possibly even three- distinct "channels" or learning exchanges could contain all the resources needed for real learning. The child grows up in a world of things, surrounded by people who serve as models for skills and values. He finds peers who challenge him to argue, to compete, to cooperate, and to understand; and if the child is lucky, he is exposed to confrontation or criticism by an experienced elder who really cares. Things, models, peers, and elders are four resources each of which requires a different type of arrangement to ensure that everybody has ample access to it.
+
+I will use the words "opportunity web" for "network" to designate specific ways to provide access to each of four sets of resources. "Network" is often used, unfortunately, to designate the channels reserved to material selected by others for indoctrination, instruction, and entertainment. But it can also be used for the telephone or the postal service, which are primarily accessible to individuals who want to send messages to one another. I wish we had another word to designate such reticular structures for mutual access, a word less evocative of entrapment, less degraded by current usage and more suggestive of the fact that any such arrangement includes legal, organizational, and technical aspects. Not having found such a term, I will try to redeem the one which is available, using it as a synonym of "educational web".
+
+What are needed are new networks, readily available to the public and designed to spread equal opportunity for learning and teaching. To give an example: The same level of technology is used in TV and in tape recorders. All Latin-American countries now have introduced TV: in Bolivia the government has financed a TV station, which was built six years ago, and there are no more than seven thousand TV sets for four million citizens. The money now tied up in TV installations throughout Latin America could have provided every fifth adult with a tape recorder. In addition, the money would have sufficed to provide an almost unlimited library of prerecorded tapes, with outlets even in remote villages, as well as an ample supply of empty tapes.
+
+This network of tape recorders, of course, would be radically different from the present network of TV. It would provideopportunity for free expression: literate and illiterate alike could record, preserve, disseminate, and repeat their opinions. The present investment in TV, instead, provides bureaucrats, whether politicians or educators, with the power to sprinkle the continent with institutionally produced programs which they-or their sponsors--decide are good for or in demand by the people.
+
+Technology is available to develop either independence and learning or bureaucracy and teaching.
+
+## Four Networks
+
+The planning of new educational institutions ought not to begin with the administrative goals of a principal or president, or with the teaching goals of a professional educator, or with the learning goals of any hypothetical class of people. It must not start with the question, "What should someone learn?" but with the question, "What kinds of things and people might learners want to be in contact with in order to learn?"
+
+Someone who wants to learn knows that he needs both information and critical response to its use from somebody else. Information can be stored in things and in persons. In a good educational system access to things ought to be available at the sole bidding of the learner, while access to informants requires, in addition, others' consent. Criticism can also come from two directions: from peers or from elders, that is, from fellow learners whose immediate interests match mine, or from those who will grant me a share in their superior experience. Peers can be colleagues with whom to raise a question, companions for playful and enjoyable (or arduous) reading or walking, challengers at any type of game. Elders can be consultants on which skill to learn, which method to use, what company to seek at a given moment. They can be guides to the right questions to be raised among peers and to the deficiency of the answers they arrive at. Most of these resources are plentiful. But they are neither conventionally perceived as educational resources, nor is access to them for learning purposes easy, especially for the poor. We must conceive of new relational structures which are deliberately set up to facilitate access to these resources for the use of anybody who is motivated to seek them for his education. Administrative, technological, and especially legal arrangements are required to set up such web-like structures.
+
+Educational resources are usually labeled according to educators' curricular goals. I propose to do the contrary, to label four different approaches which enable the student to gain access to any educational resource which may help him to define and achieve his own goals:
+
+_1._ Reference Services to Educational Objects-which facilitate access to things or processes used for formal learning. Some of these things can be reserved for this purpose, stored in libraries, rental agencies, laboratories, and showrooms like museums and theaters; others can be in daily use in factories, airports, or on farms, but made available to students as apprentices or on off hours.
+
+_2._ Skill Exchanges--which permit persons to list their skills, the conditions under which they are willing to serve as models for others who want to learn these skills, and the addresses at which they can be reached.
+
+_3._ Peer-Matching--a communications network which permits persons to describe the learning activity in which they wish to engage, in the hope of finding a partner for the inquiry.
+
+_4._ Reference Services to Educators-at-Large--who can be listed in a directory giving the addresses and self descriptions of professionals, paraprofessionals, and freelancers, along with conditions of access to their services. Such educators, as we will see, could be chosen by polling or consulting their former clients.
+
+## Reference Services to Educational Objects
+
+Things are basic resources for learning. The quality of the environment and the relationship of a person to it will determine how much he learns incidentally. Formal learning requires special access to ordinary things, on the one hand, or, on the other, easy and dependable access to special things made for educational purposes. An example of the former is the special right to operate or dismantle a machine in a garage. An example of the latter is the general right to use an abacus, a computer, a book, a botanical garden, or a machine withdrawn from production and placed at the full disposal of students.
+
+At present, attention is focused on the disparity between rich and poor children in their access to things and in the manner in which they can learn from them. OEO and other agencies, following this approach, concentrate on equalizing chances, by trying to provide more educational equipment for the poor. A more radical point of departure would be to recognize that in the city rich and poor alike are artificially kept away from most of the things that surround them. Children born into the age of plastics and efficiency experts must penetrate two barriers which obstruct their understanding: one built into things and the other around institutions. Industrial design creates a world of things that resist insight into their nature, and schools shut the learner out of the world of things in their meaningful setting.
+
+After a short visit to New York, a woman from a Mexican village told me she was impressed by the fact that stores sold only wares heavily made up with cosmetics". I understood her to mean that industrial products "speak" to their customers about their allurements and not about their nature. Industry has surrounded people with artifacts whose inner workings only specialists are allowed to understand. The nonspecialist is discouraged from figuring out what makes a watch tick, or a tele-phone ring, or an electric typewriter work, by being warned that it will break if he tries. He can be told what makes a transistor radio work, but he cannot find out for himself. This type of design tends to reinforce a noninventive society in which the experts find it progressively easier to hide behind their expertise and beyond evaluation.
+
+The man-made environment has become as inscrutable as nature is for the primitive. At the same time, educational materials have been monopolized by school. Simple educational objects have been expensively packaged by the knowledge industry. They have become specialized tools for professional educators, and their cost has been inflated by forcing them to stimulate either environments or teachers.
+
+The teacher is jealous of the textbook he defines as his professional implement. The student may come to hate the lab because he associates it with schoolwork. The administrator rationalizes his protective attitude toward the library as a defense of costly public equipment against those who would play with it rather than learn. In this atmosphere the student too often uses the map, the lab, the encyclopedia, or the microscope only at the rare moments when the curriculum tells him to do so. Even the great classics become part of "sophomore year" instead of marking a new turn in a person's life. School removes things from everyday use by labeling them educational tools.
+
+If we are to deschool, both tendencies must be reversed. The general physical environment must be made accessible, and those physical learning resources which have been reduced to teaching instruments must become generally available for self-directed learning. Using things only as part of a curriculum can have an even worse effect than just removing them from the general environment. It can corrupt the attitudes of pupils.
+
+Games are a case in point. I do not mean the "games" of the physical education department (such as football and basketball), which the schools use to raise income and prestige and in which they have made a substantial capital investment. As the athletes themselves are well aware, these enterprises, which take the form of warlike tournaments, have undermined the playfulness of sports and are used to reinforce the competitive nature of schools. Rather I have in mind the educational games which can provide a unique way to penetrate formal systems. Set theory, linguistics, propositional logic, geometry, physics, and even chemistry reveal themselves with little effort to certain persons who play these games. A friend of mine went to a Mexican market with a game called "'Wff 'n Proof," which consists of some dice on which twelve logical symbols are imprinted. He showed children which two or three combinations constituted a well-formed sentence, and inductively within the first hour some onlookers also grasped the principle. Within a few hours of playfully conducting formal logical proofs, some children are capable of introducing others to the fundamental proofs of propositional logic. The others just walk away.
+
+In fact, for some children such games are a special form of liberating education, since they heighten their awareness of the fact that formal systems are built on changeable axioms and that conceptual operations have a gamelike nature. They are also simple, cheap, and -to a large extent- can be organized by the players themselves. Used outside the curriculum such games provide an opportunity for identifying and developing unusual talent, while the school psychologist will often identify those who have such talent as in danger of becoming antisocial, sick, or unbalanced. Within school, when used in the form of tournaments, games are not only removed from the sphere of leisure; they often become tools used to translate playfulness into competition, a lack of abstract reasoning into a sign of inferiority. An exercise which is liberating for some character types becomes a straitjacket for others.
+
+The control of school over educational equipment has still another effect. It increases enormously the cost of such cheap materials. Once their use is restricted to scheduled hours, professionals are paid to supervise their acquisition, storage, and use. Then students vent their anger against the school on the equipment, which must be purchased once again.
+
+Paralleling the untouchability of teaching tools is the impenetrability of modern junk. In the thirties any self respecting boy knew how to repair an automobile, but now car makers multiply wires and withhold manuals from everyone except specialized mechanics. In a former era an old radio contained enough coils and condensers to build a transmitter that would make all the neighborhood radios scream in feedback. Transistor radios are more portable, but nobody dares to take them apart. To change this in the highly industrialized countries will be immensely difficult; but at least in the Third World we must insist on built-in educational qualities.
+
+To illustrate my point, let me present a model: By spending ten million dollars it would be possible to connect forty thousand hamlets in a country like Peru with a spiderweb of six-foot-wide trails and maintain these, and, in addition, provide the country with 200,000 three-wheeled mechanical donkeys -five on the average for each hamlet. Few poor countries of this size spend less than this yearly on cars and roads, both of which are now restricted mainly to the rich and their employees, while poor people remain trapped in their villages. Each of these simple but durable little vehicles would cost $l25 - half of which would pay for transmission and a six-horsepower motor. A "donkey" could make 15 mph, and it can carry loads of 850 pounds (that is, most things besides tree trunks and steel beams which are ordinarily moved).
+
+The political appeal of such a transportation system to a peasantry is obvious. Equally obvious is the reason why those who hold power--and thereby automatically have a car--are not interested in spending money on trails and in clogging roads with engine-driven donkeys. The universal donkey could work only if a country's leaders were willing to impose a national speed limit of, say, twenty-five miles an hour and adapt its public institutions to this. The model could not work if conceived only as a stopgap.
+
+This is not the place to elaborate on the political, social, economic, financial, and technical feasibility of this model. I wish only to indicate that educational considerations may be of prime importance when choosing such an alternative to capital. intensive transport. By raising the unit cost per donkey by some 20 percent it would become possible to plan the production of all its parts in such a manner that, as far as possible, each future owner would spend a month or two making and understanding his machine and would be able to repair it. With this additional cost it would also be possible to decentralize production into dispersed plants.
+
+The added benefits would result not only from including educational costs in the construction process. Even more significantly, a durable motor which practically anyone could learn to repair and which could be used as a plow and pump by somebody who understood it would provide much higher educational benefits than the inscrutable engines of the advanced countries.
+
+Not only the junk but also the supposedly public places of the modern city have become impenetrable. In American society, children are excluded from most things and places on the grounds that they are private. But even in societies which have declared an end to private property children are kept away from the same places and things because they are considered the special domain of professionals and dangerous to the uninitiated. Since the last generation the railroad yard has become as inaccessible as the fire station. Yet with a little ingenuity it should not be difficult to provide for safety in such places. To deschool the artifacts of education will require making the artifacts and processes available--and recognizing their educational value. Certainly, some workers would find it inconvenient to be accessible to learners; but this inconvenience must be balanced against the educational gains.
+
+Private cars could be banned from Manhattan. Five years ago it was unthinkable. Now certain New York streets are closed off at odd hours, and this trend will probably continue. Indeed, most cross-streets should be closed to automotive traffic and parking should be forbidden everywhere. In a city opened up to people, teaching materials which are now locked up in store-rooms and laboratories could be dispersed into independently operated storefront depots which children and adults could visit without the danger of being run over.
+
+If the goals of learning were no longer dominated by schools and schoolteachers, the market for learners would be much more various and the definition of "educational artifacts" would be less restrictive. There could be tool shops, libraries, laboratories, and gaming rooms. Photo labs and offset presses would allow neighborhood newspapers to flourish. Some storefront learning centers could contain viewing booths for closed-circuit television, others could feature office equipment for use and for repair. The jukebox or the record player would be commonplace, with some specializing in classical music, others in international folk tunes, others in jazz. Film clubs would compete with each other and with commercial television. Museum outlets could be networks for circulating exhibits of works of art, both old and new, originals and reproductions, perhaps administered by the various metropolitan museums.
+
+The professional personnel needed for this network would be much more like custodians, museum guides, or reference librarians than like teachers. From the corner biology store, they could refer their clients to the shell collection in the museum or indicate the next showing of biology videotapes in a certain viewing booth. They could furnish guides for pest control, diet, and other kinds of preventive medicine. They could refer those who needed advice to "elders" who could provide it.
+
+Two distinct approaches can be taken to financing a network of "learning objects". A community could determine a maximum budget for this purpose and arrange for all parts of the network to be open to all visitors at reasonable hours. Or the community could decide to provide citizens with limited entitlements, according to their age group, which would give them special access to certain materials which are both costly and scarce, while leaving other, simpler materials available to everyone.
+
+Finding resources for materials made specifically for education is only one--and perhaps the least costly--aspect of building an educational world. The money now spent on the sacred paraphernalia of the school ritual could be freed to provide all citizens with greater access to the real life of the city. Special tax incentives could be granted to those who employed children between the ages of eight and fourteen for a couple of hours each day if the conditions of employment were humane ones. We should return to the tradition of the bar mitzvah or confirmation. By this I mean we should first restrict, and later eliminate, the disenfranchisement of the young and permit a boy of twelve to become a man fully responsible for his participation in the life of the community. Many "schoolage" people know more about their neighborhood than social workers or councilmen. Of course, they also ask more embarrassing questions and propose solutions which threaten the bureaucracy. They should be allowed to come of age so that they could put their knowledge and fact finding ability to work in the service of a popular government.
+
+Until recently the dangers of school were easily underestimated in comparison with the dangers of an apprenticeship in the police force, the fire department, or the entertainment industry. It was easy to justify schools at least as a means to protect youth. Often this argument no longer holds. I recently visited a Methodist church in Harlem occupied by a group of armed Young Lords in protest against the death of Julio Rodan, a Puerto Rican youth found hanged in his prison cell. I knew the leaders of the group, who had spent a semester in Cuernavaca. When I wondered why one of them, Juan, was not among them, I was told that he had "gone back on heroin and to the State University".
+
+Planning, incentives, and legislation can be used to unlock the educational potential within our society's huge investment in plants and equipment. Full access to educational objects will not exist so long as business firms are allowed to combine the legal protections which the Bill of Rights reserves to the privacy of individuals with the economic power conferred upon them by their millions of customers and thousands of employees, stockholders, and suppliers. Much of the world's know-how and most of its productive processes and equipment are locked within the walls of business firms, away from their customers, employees, and stockholders, as well as from the general public, whose laws and facilities allow them to function. Money now spent on advertising in capitalist countries could be redirected toward education in and by General Electric, NBC-TV, or Budweiser beer. That is, the plants and offices should be reorganized so that their daily operations could be more accessible to the public in ways that would make learning possible; and, indeed, ways might be found to pay the companies for the learning people acquired from them.
+
+An even more valuable body of scientific objects and data may be withheld from general access--and even from qualified scientists -under the guise of national security. Until recently science was the one forum which functioned like an anarchist's dream. Each man capable of doing research had more or less the same opportunity of access to its tools and to a hearing by the community of peers. Now bureaucratization and organization have placed much of science beyond public reach. Indeed, what used to be an international network of scientific information has been splintered into an arena of competing teams. The members as well as the artifacts of the scientific community have been locked into national and corporate programs oriented toward practical achievement, to the radical impoverishment of the men who support these nations and corporations.
+
+In a world which is controlled and owned by nations and corporations, only limited access to educational objects will ever be possible. But increased access to those objects which can be shared for educational purposes may enlighten us enough to help us to break through these ultimate political barriers. Public schools transfer control over the educational uses of objects from private to professional hands. The institutional inversion of schools could empower the individual to reclaim the right to use them for education. A truly public kind of ownership might begin to emerge if private or corporate control over the educational aspect of "things" were brought to the vanishing point.
+
+## Skill Exchanges
+
+A guitar teacher, unlike a guitar, can be neither classified in a museum nor owned by the public nor rented from an educational warehouse. Teachers of skills belong to a different class of resources from objects needed to learn a skill. This is not to say that they are indispensable in every case. I can rent not only a guitar but also taped guitar lessons and illustrated chord charts, and with these things I can teach myself to play the guitar. Indeed, this arrangement may have advantages--if the available tapes are better than the available teachers, or if the only time I have for learning the guitar is late at night, or if the tunes I wish to play are unknown in my country, or if I am shy and prefer to fumble along in privacy.
+
+Skill teachers must be listed and contacted through a different kind of channel from that of things. A thing is available at the bidding of the user -or could be- whereas a person formally becomes a skill resource only when he consents to do so, and he can also restrict time, place, and method as he chooses.
+
+Skill teachers must be also distinguished from peers from whom one would learn. Peers who wish to pursue a common inquiry must start from common interests and abilities; they get together to exercise or improve a skill they share: basketball, dancing, constructing a camp site, or discussing the next election. The first transmission of a skill, on the other hand, involves bringing together someone who has the skill and someone who does not have it and wants to acquire it.
+
+A "skill model" is a person who possesses a skill and is willing to demonstrate its practice. A demonstration of this kind is frequently a necessary resource for a potential learner. Modern inventions permit us to incorporate demonstration into tape, film, or chart; yet one would hope personal demonstration will remain in wide demand, especially in communication skills. Some ten thousand adults have learned Spanish at our Center at Cuernavaca -mostly highly motivated persons who wanted to acquire near-native fluency in a second language. When they are faced with a choice between carefully programmed instruction in a lab or drill sessions with two other students and a native speaker following a rigid routine, most choose the second. For most widely shared skills, a person who demonstrates the skill is the only human resource we ever need or get. Whether in speaking or driving, in cooking or in the use of communication equipment, we are often barely conscious of formal instruction and learning, especially after our first experience of the materials in question. I see no reason why other complex skills, such as the mechanical aspects of surgery and playing the fiddle, of reading or the use of directories and catalogues, could not be learned in the same way.
+
+A well-motivated student who does not labor under a specific handicap often needs no further human assistance than can be provided by someone who can demonstrate on demand how to do what the learner wants to learn to do. The demand made of skilled people that before demonstrating their skill they be certified as pedagogues is a result of the insistence either that people learn what they do not want to know or that all people-even those with a special handicap--learn certain things, at a given moment in their lives, and preferably under specified circumstances.
+
+What makes skills scarce on the present educational market is the institutional requirement that those who can demonstrate them may not do so unless they are given public trust, through a certificate. We insist that those who help others acquire a skill should also know how to diagnose learning difficulties and be able to motivate people to aspire to learn skills. In short, we demand that they be pedagogues. People who can demonstrate skills will be plentiful as soon as we learn to recognize them outside the teaching profession.
+
+Where princelings are being taught, the parents' insistence that the teacher and the person with skills be combined in one person is understandable, if no longer defensible. But for all parents to aspire to have Aristotle for their Alexander is obviously self-defeating. The person who can both inspire students and demonstrate a technique is so rare, and so hard to recognize, that even princelings more often get a sophist than a true philosopher.
+
+A demand for scarce skills can be quickly filled even if there are only small numbers of people to demonstrate them; but such people must be easily available. During the forties radio repairmen, most of them with no schooling in their work, were no more than two years behind radios in penetrating the interior of Latin America. There they stayed until transistor radios, which are cheap to purchase and impossible to repair, put them out of business. Technical schools now fail to accomplish what repair. men of equally useful, more durable radios could do as a matter of course.
+
+Converging self-interests now conspire to stop a man from sharing his skill. The man who has the skill profits from its scarcity and not from its reproduction. The teacher who specializes in transmitting the skill profits from the artisan's unwillingness to launch his own apprentice into the field. The public is indoctrinated to believe that skills are valuable and reliable only if they are the result of formal schooling. The job market depends on making skills scarce and on keeping them scarce, either by proscribing their unauthorized use and transmission or by making things which can be operated and repaired only by those who have access to tools or information which are kept scarce.
+
+Schools thus produce shortages of skilled persons. A good example is the diminishing number of nurses in the United States, owing to the rapid increase of four-year B.S. programs in nursing. Women from poorer families, who would formerly have enrolled in a two- or three-year program, now stay out of the nursing profession altogether.
+
+Insisting on the certification of teachers is another way of keeping skills scarce. If nurses were encouraged to train nurses, and if nurses were employed on the basis of their proven skill at giving injections, filling out charts, and giving medicine, there would soon be no the lack of trained nurses. Certification now tends to abridge the freedom of education by converting the civil right to share one's knowledge into the privilege of academic freedom, now conferred only on the employees of a school. To guarantee access to an effective exchange of skills, we need legislation which generalizes academic freedom. The right to teach any skill should come under the protection of freedom of speech. Once restrictions on teaching are removed, they will quickly be removed from learning as well.
+
+The teacher of skills needs some inducement to grant his services to a pupil. There are at least two simple ways to begin to channel public funds to noncertified teachers. One way would be to institutionalize the skill exchange by creating free skill centers open to the public. Such centers could and should be established in industrialized areas, at least for those skills which are fundamental prerequisites for entering certain apprenticeships--such skills as reading, typing, keeping accounts, foreign languages, computer programming and number manipulation, reading special languages such as that of electrical circuits, manipulation of certain machinery, etc. Another approach would be to give certain groups within the population educational currency good for attendance at skill centers where other clients would have to pay commercial rates.
+
+A much more radical approach would be to create a "bank" for skill exchange. Each citizen would be given a basic credit with which to acquire fundamental skills. Beyond that minimum, further credits would go to those who earned them by teaching, whether they served as models in organized skill centers or did so privately at home or on the playground. Only those who had taught others for an equivalent amount of time would have a claim on the time of more advanced teachers. An entirely new elite would be promoted, an elite of those who earned their education by sharing it.
+
+Should parents have the right to earn skill credit for their children? Since such an arrangement would give further advantage to the privileged classes, it might be offset by granting a larger credit to the underprivileged. The operation of a skill exchange would depend on the existence of agencies which would facilitate the development of directory information and assure its free and inexpensive use. Such an agency might also provide supplementary services of testing and certification and might help to enforce the legislation required to break up and prevent monopolistic practices.
+
+Fundamentally, the freedom of a universal skill exchange must be guaranteed by laws which permit discrimination only on the basis of tested skills and not on the basis of educational pedigree. Such a guarantee inevitably requires public control over tests which may be used to qualify persons for the job market. Otherwise, it would be possible to surreptitiously reintroduce complex batteries of tests at the work place itself which would serve for social selection. Much could be done to make skill-testing objective, e.g., allowing only the operation of specific machines or systems to be tested. Tests of typing (measured according to speed, number of errors, and whether or not the typist can work from dictation), operation of an accounting system or of a hydraulic crane, driving, coding into COBOL, etc., can easily be made objective.
+
+In fact, many of the true skills which are of practical importance can be so tested. And for the purposes of manpower management a test of a current skill level is much more useful than the information that twenty years ago a person satisfied his teacher in a curriculum in which typing, stenography, and accounting were taught. The very need for official skill-testing can, of course, be questioned: I personally believe that freedom from undue hurt to a man's reputation through labeling is better guaranteed by restricting than by forbidding tests of competence.
+
+## Peer-Matching
+
+At their worst, schools gather classmates into the same room and subject them to the same sequence of treatment in math, citizenship, and spelling. At their best, they permit each student to choose one of a limited number of courses. In any case, groups of peers form around the goals of teachers. A desirable educational system would let each person specify the activity for which he sought a peer.
+
+School does offer children an opportunity to escape their homes and meet new friends. But, at the same time, this process indoctrinates children with the idea that they should select their friends from among those with whom they are put together. Providing the young from their earliest age with invitations to meet, evaluate, and seek out others would prepare them for a lifelong interest in seeking new partners for new endeavors.
+
+A good chess player is always glad to find a close match, and one novice to find another. Clubs serve their purpose. People who want to discuss specific books or articles would probably pay to find discussion partners. People who want to play games, go on excursions, build fish tanks, or motorize bicycles will go to considerable lengths to find peers. The reward for their efforts is finding those peers. Good schools try to bring out the common interests of their students registered in the same program. The inverse of school would be an institution which increased the chances that persons who at a given moment shared the same specific interest could meet--no matter what else they had in common.
+
+Skill-teaching does not provide equal benefits for both parties, as does the matching of peers. The teacher of skills, as I have pointed out, must usually be offered some incentive beyond the rewards of teaching. Skill-teaching is a matter of repeating drills over and over and is, in fact, all the more dreary for those pupils who need it most. A skill exchange needs currency or credits or other tangible incentives in order to operate, even if the exchange itself were to generate a currency of its own. A peer-match. ing system requires no such incentives, but only a communications network.
+
+Tapes, retrieval systems, programmed instruction, and reproduction of shapes and sounds tend to reduce the need for recourse to human teachers of many skills; they increase the efficiency of teachers and the number of skills one can pick up in a lifetime. Parallel to this runs an increased need to meet people interested in enjoying the newly acquired skill. A student who has picked up Greek before her vacation would like to discuss in Greek Cretan politics when she returns. A Mexican in New York wants to find other readers of the paper Siempre---or of "Los Agachados,” the most popular comic book. Somebody else wants to meet peers who, like himself, would like to increase their interest in the work of James Baldwin or of Bolivar.
+
+The operation of a peer-matching network would be simple. The user would identify himself by name and address and describe the activity for which he sought a peer. A computer would send him back the names and addresses of all those who had inserted the same description. It is amazing that such a simple utility has never been used on a broad scale for publicly valued activity.
+
+In its most rudimentary form, communication between client and computer could be established by return mail. In big cities typewriter terminals could provide instantaneous responses. The only way to retrieve a name and address from the computer would be to list an activity for which a peer was sought. People using the system would become known only to their potential peers.
+
+A complement to the computer could be a network of bulletin boards and classified newspaper ads, listing the activities for which the computer could not produce a match. No names would have to be given. Interested readers would then introduce their names into the system. A publicly supported peer-match network might be the only way to guarantee the right of free assembly and to train people in the exercise of this most fundamental civic activity.
+
+The right of free assembly has been politically recognized and culturally accepted. We should now understand that this right is curtailed by laws that make some forms of assembly obligatory. This is especially the case with institutions which conscript according to age group, class, or sex, and which are very time-consuming. The army is one example. School is an even more outrageous one.
+
+To deschool means to abolish the power of one person to oblige another person to attend a meeting. It also means recognizing the right of any person, of any age or sex, to call a meeting. This right has been drastically diminished by the institutionalization of meetings. "Meeting" originally referred to the result of an individual's act of gathering. Now it refers to the institutional product of some agency.
+
+The ability of service institutions to acquire clients has far outgrown the ability of individuals to be heard independently of institutional media, which respond to individuals only if they are salable news. Peer-matching facilities should be available for individuals who want to bring people together as easily as the village bell called the villagers to council. School buildings--of doubtful value for conversion to other uses--could often serve this purpose.
+
+The school system, in fact, may soon face a problem which churches have faced before: what to do with surplus space emptied by the defection of the faithful. Schools are as difficult to sell as temples. One way to provide for their continued use would be to give over the space to people from the neighborhood. Each could state what he would do in the classroom and when, and a bulletin board would bring the available programs to the attention of the inquirers. Access to "class" would be free--or purchased with educational vouchers. The "teacher" could even be paid according to the number of pupils he could attract for any full two-hour period. I can imagine that very young leaders and great educators would be the two types most prominent in such a system. The same approach could be taken toward higher education. Students could be furnished with educational vouchers which entitled them to ten hours' yearly private consultation with the teacher of their choice--and, for the rest of their learning, depend on the library, the peer-matching network, and apprenticeships.
+
+We must, of course, recognize the probability that such public matching devices would be abused for exploitative and immoral purposes, just as the telephone and the mails have been so abused. As with those networks, there must be some protection. I have proposed elsewhere a matching system which would allow only pertinent printed information, plus the name and address of the inquirer, to be used. Such a system would be virtually foolproof against abuse. Other arrangements could allow the addition of any book, film, TV program, or other item quoted from a special catalogue. Concern about the dangers of the system should not make us lose sight of its far greater benefits.
+
+Some who share my concern for free speech and assembly will argue that peer-matching is an artificial means of bringing people together and would not be used by the poor -who need it most. Some people become genuinely agitated when one suggests the setting up of ad hoc encounters which are not rooted in the life of a local community. Others react when one suggests using a computer to sort and match client-identified interests. People cannot be drawn together in such an impersonal manner, they say. Common inquiry must be rooted in a history of shared experience at many levels, and must grow out of this experience-the development of neighborhood institutions, for example.
+
+I sympathize with these objections, but I think they miss my point as well as their own. In the first place, the return to neighborhood life as the primary center of creative expression might actually work against the reestablishment of neighborhoods as political units. Centering demands on the neighborhood may, in fact, neglect an important liberating aspect of urban life -the ability of a person to participate simultaneously in several peer groups. Also, there is an important sense in which people who have never lived together in a physical community, may occasionally have far more experiences to share than those who have known each other from childhood. The great religions have always recognized the importance of far-off encounters, and the faithful have always found freedom through them; pilgrimage, monasticism, the mutual support of temples and sanctuaries reflect this awareness. Peer-matching could significantly help in making explicit the many potential but suppressed communities of the city.
+
+Local communities are valuable. They are also a vanishing reality as men progressively let service institutions define their circles of social relationship. Milton Kotler in his recent book has shown that the imperialism of "downtown" deprives the neighborhood of its political significance. The protectionist attempt to resurrect the neighborhood as a cultural unit only supports this bureaucratic imperialism. Far from artificially removing men from their local contexts to join abstract groupings, peer-matching should encourage the restoration of local life to cities from which it is now disappearing. A man who recovers his initiative to call his fellows into meaningful conversation may cease to settle for being separated from them by office protocol or suburban etiquette. Having once seen that doing things together depends on deciding to do so, men may even insist that their local communities become more open to creative political exchange.
+
+We must recognize that city life tends to become immensely costly as city-dwellers must be taught to rely for every one of their needs on complex institutional services. It is extremely expensive to keep it even minimally livable. Peer-matching in the city could be a first step toward breaking down the dependence of citizens on bureaucratic civic services.
+
+It would also be an essential step to providing new means of establishing public trust. In a schooled society we have come to rely more and more on the professional judgment of educators on the effect of their own work in order to decide whom we can or cannot trust: we go to the doctor, lawyer, or psychologist because we trust that anybody with the required amount of specialized educational treatment by other colleagues deserves our confidence.
+
+In a deschooled society professionals could no longer claim the trust of their clients on the basis of their curricular pedigree, or ensure their standing by simply referring their clients to other professionals who approved of their schooling. Instead of placing trust in professionals, it should be possible, at any time, for any potential client to consult with other experienced clients of a professional about their satisfaction with him by means of another peer network easily set up by computer, or by a number of other means. Such networks could be seen as public utilities which permitted students to choose their teachers or patients their healers.
+
+## Professional Educators
+
+As citizens have new choices, new chances for learning, their willingness to seek leadership should increase. We may expect that they will experience more deeply both their own independence and their need for guidance. As they are liberated from manipulation by others, they should learn to profit from the discipline others have acquired in a lifetime. Deschooling education should increase--rather than stifle--the search for men with practical wisdom who would be willing to sustain the newcomer in his educational adventure. As masters of their art abandon the claim to be superior informants or skill models, their claim to superior wisdom will begin to ring true.
+
+With an increasing demand for masters, their supply should also increase. As the schoolmaster vanishes, conditions will arise which should bring forth the vocation of the independent educator. This may seem almost a contradiction in terms, so thoroughly have schools and teachers become complementary. Yet this is exactly what the development of the first three educational exchanges would tend to result in -and what would be required to permit their full exploitation- for parents and other '"natural educators" need guidance, individual learners need assistance, and the networks need people to operate them.
+
+Parents need guidance in directing their children on the road that leads to responsible educational independence. Learners need experienced leadership when they encounter rough terrain. These two needs are quite distinct: the first is a need for pedagogy, the second for intellectual leadership in all other fields of knowledge. The first calls for knowledge of human learning and of educational resources, the second for wisdom based on experience in any kind of exploration. Both kinds of experience are indispensable for effective educational endeavor. Schools package these functions into one role--and render the independent exercise of any of them if not disreputable at least suspect.
+
+Three types of special educational competence should, in fact, be distinguished: one to create and operate the kinds of educational exchanges or networks outlined here; another to guide students and parents in the use of these networks; and a third to act as primus inter pares in undertaking difficult intellectual exploratory journeys. Only the former two can be conceived of as branches of an independent profession: educational administrators and pedagogical counselors. To design and operate the networks I have been describing would not require many people, but it would require people with the most profound understanding of education and administration, in a perspective quite different from and even opposed to that of schools.
+
+While an independent educational profession of this kind would welcome many people whom the schools exclude, it would also exclude many whom the schools qualify. The establishment and operation of educational networks would require some designers and administrators, but not in the numbers or of the type required by the administration of schools. Student discipline, public relations, hiring, supervising, and firing teachers would have neither place nor counterpart in the networks I have been describing. Neither would curriculum-making, textbook-purchasing, the maintenance of grounds and facilities, or the supervision of interscholastic athletic competition. Nor would child custody, lesson-planning, and record-keeping, which now take up so much of the time of teachers, figure in the operation of educational networks. Instead, the operation of learning webs would require some of the skills and attitudes now expected from the staff of a museum, a library, an executive employment agency, or a maître d'hôtel.
+
+Today's educational administrators are concerned with controlling teachers and students to the satisfaction of others-trustees, legislatures, and corporate executives. Network builders and administrators would have to demonstrate genius at keeping themselves, and others, out of people's way, at facilitating en-counters among students, skill models, educational leaders, and educational objects. Many persons now attracted to teaching are profoundly authoritarian and would not be able to assume this task: building educational exchanges would mean making it easy for people--especially the young--to pursue goals which might contradict the ideals of the traffic manager who makes the pursuit possible.
+
+If the networks I have described could emerge, the educational path of each student would be his own to follow, and only in retrospect would it take on the features of a recognizable program. The wise student would periodically seek professional advice: assistance to set a new goal, insight into difficulties encountered, choice between possible methods. Even now, most persons would admit that the important services their teachers have rendered them are such advice or counsel, given at a chance meeting or in a tutorial. Pedagogues, in an unschooled world, would also come into their own, and be able to do what frustrated teachers pretend to pursue today.
+
+While network administrators would concentrate primarily on the building and maintenance of roads providing access to resources, the pedagogue would help the student to find the path which for him could lead fastest to his goal. If a student wanted to learn spoken Cantonese from a Chinese neighbor, the pedagogue would be available to judge their proficiency, and to help them select the textbook and methods most suitable to their talents, character, and the time available for study. He could counsel the would-be airplane mechanic on finding the best places for apprenticeship. He could recommend books to somebody who wanted to find challenging peers to discuss African history. Like the network administrator, the pedagogical counselor would conceive of himself as a professional educator. Access to either could be gained by individuals through the use of educational vouchers.
+
+The role of the educational initiator or leader, the master or "true" leader, is somewhat more elusive than that of the professional administrator or the pedagogue. This is so because leadership is itself hard to define. In practice, an individual is a leader if people follow his initiative and become apprentices in his progressive discoveries. Frequently, this involves a prophetic vision of entirely new standards -quite understandable today- in which present "wrong" will turn out to be "right". In a society which would honor the right to call assemblies through peermatching, the ability to take educational initiative on a specific subject would be as wide as access to learning itself. But, of course, there is a vast difference between the initiative taken by someone to call a fruitful meeting to discuss this essay and the ability of someone to provide leadership in the systematic exploration of its implications.
+
+Leadership also does not depend on being right. As Thomas Kuhn points out, in a period of constantly changing paradigms most of the very distinguished leaders are bound to be proven wrong by the test of hindsight. Intellectual leadership does depend on superior intellectual discipline and imagination and the willingness to associate with others in their exercise. A learner, for example, may think that there is an analogy between the U.S. antislavery movement or the Cuban Revolution and what is happening in Harlem. The educator who is himself a historian can show him how to appreciate the flaws in such an analogy. He may retrace his own steps as a historian. He may invite the learner to participate in his own research. In both cases he will apprentice his pupil in a critical art--which is rare in school--and which money or other favors cannot buy.
+
+The relationship of master and disciple is not restricted to intellectual discipline. It has its counterpart in the arts, in physics, in religion, in psychoanalysis, and in pedagogy. It fits mountain-climbing, silverworking and politics, cabinetmaking and personnel administration. What is common to all true master-pupil relationships is the awareness both share that their relationship is literally priceless and in very different ways a privilege for both.
+
+Charlatans, demagogues, proselytizers, corrupt masters, and simoniacal priests, tricksters, miracle workers, and messiahs have proven capable of assuming leadership roles and thus show the dangers of any dependence of a disciple on the master. Different societies have taken different measures to defend themselves against these counterfeit teachers. Indians relied on caste-lineage, Eastern Jews on the spiritual discipleship of rabbis, high periods of Christianity on an exemplary life of monastic virtue, other periods on hierarchical orders. Our society relies on certification by schools. It is doubtful that this procedure provides a better screening, but if it should be claimed that it does, then the counterclaim can be made that it does so at the cost of making personal discipleship almost vanish.
+
+In practice, there will always be a fuzzy line between the teacher of skills and the educational leaders identified above, and there are no practical reasons why access to some leaders could not be gained by discovering the "master" in the drill teacher who introduces students to his discipline.
+
+On the other hand, what characterizes the true master disciple relationship is its priceless character. Aristotle speaks of it as a "moral type of friendship, which is not on fixed terms: it makes a gift, or does whatever it does, as to a friend". Thomas Aquinas says of this kind of teaching that inevitably it is an act of love and mercy. This kind of teaching is always a luxury for the teacher and a form of leisure (in Greek, "schole") for him and his pupil: an activity meaningful for both, having no ulterior purpose.
+
+To rely for true intellectual leadership on the desire of gifted people to provide it is obviously necessary even in our society, but it could not be made into a policy now. We must first construct a society in which personal acts themselves reacquire a value higher than that of making things and manipulating people. In such a society exploratory, inventive, creative teaching would logically be counted among the most desirable forms of leisurely "unemployment". But we do not have to wait until the advent of utopia. Even now one of the most important consequences of deschooling and the establishment of peer-matching facilities would be the initiative which "masters" could take to assemble congenial disciples. It would also, as we have seen, provide ample opportunity for potential disciples to share information or to select a master.
+
+Schools are not the only institutions which pervert professions by packaging roles. Hospitals render home care increasingly impossible--and then justify hospitalization as a benefit to the sick. At the same time, the doctor's legitimacy and ability to work come increasingly to depend on his association with a hospital, even though he is still less totally dependent on it than are teachers on schools. The same could be said about courts, which overcrowd their calendars as new transactions acquire legal solemnity, and thus delay justice. Or it could be said about churches, which succeed in making a captive profession out of a free vocation. The result in each case is scarce service at higher cost, and greater income to the less competent members of the profession.
+
+So long as the older professions monopolize superior income and prestige it is difficult to reform them. The profession of the schoolteacher should be easier to reform, and not only because it is of more recent origin. The educational profession now claims a comprehensive monopoly; it claims the exclusive competence to apprentice not only its own novices but those of other professions as well. This overexpansion renders it vulnerable to any profession which would reclaim the right to teach its own apprentices. Schoolteachers are overwhelmingly badly paid and frustrated by the tight control of the school system. The most enterprising and gifted among them would probably find more congenial work, more independence, and even higher incomes by specializing as skill models, network administrators, or guidance specialists.
+
+Finally, the dependence of the registered student on the certified teacher can be broken more easily than his dependence on other professionals--for instance, that of a hospitalized patient on his doctor. If schools ceased to be compulsory, teachers who find their satisfaction in the exercise of pedagogical authority in the classroom would be left only with pupils who were attracted by their style. The disestablishment of our present professional structure could begin with the dropping out of the schoolteacher.
+
+The disestablishment of schools will inevitably happen- and it will happen surprisingly fast. It cannot be retarded very much longer, and it is hardly necessary to promote it vigorously, for this is being done now. What is worthwhile is to try to orient it in a hopeful direction, for it could take place in either of two diametrically opposed ways.
+
+The first would be the expansion of the mandate of the pedagogue and his increasing control over society even outside school. With the best of intentions and simply by expanding the rhetoric now used in school, the present crisis in the schools could provide educators with an excuse to use all the networks of contemporary society to funnel their messages to us--for our own good. Deschooling, which we cannot stop, could mean the advent of a ""brave new world" dominated by well-intentioned administrators of programmed instruction.
+
+On the other hand, the growing awareness on the part of governments, as well as of employers, taxpayers, enlightened pedagogues, and school administrators, that graded curricular teaching for certification has become harmful could offer large masses of people an extraordinary opportunity: that of preserving the right of equal access to the tools both of learning and of sharing with others what they know or believe. But this would require that the educational revolution be guided by certain goals:
+
+_1._ To liberate access to things by abolishing the control which persons and institutions now exercise over their educational values.
+
+_2._ To liberate the sharing of skills by guaranteeing freedom to teach or exercise them on request.
+
+_3._ To liberate the critical and creative resources of people by returning to individual persons the ability to call and hold meetings--an ability now increasingly monopolized by institutions which claim to speak for the people.
+
+_4._ To liberate the individual from the obligation to shape his expectations to the services offered by any established profession--by providing him with the opportunity to draw on the experience of his peers and to entrust himself to the teacher, guide, adviser, or healer of his choice. Inevitably the deschooling of society will blur the distinctions between economics, education, and politics on which the stability of the present world order and the stability of nations now rest.
+
+Our review of educational institutions leads us to a review of our image of man. The creature whom schools need as a client has neither the autonomy nor the motivation to grow on his own. We can recognize universal schooling as the culmination of a Promethean enterprise, and speak about the alternative as a world fit to live in for Epimethean man. While we can specify that the alternative to scholastic funnels is a world made transparent by true communication webs, and while we can specify very concretely how these could function, we can only expect the Epimethean nature of man to re-emerge; we can neither plan nor produce it.
+
+
+# Rebirth of Epimethean Man
+
+Our society resembles the ultimate machine which I once saw in a New York toy shop. It was a metal casket which, when you touched a switch, snapped open to reveal a mechanical hand. Chromed fingers reached out for the lid, pulled it down, and locked it from the inside. It was a box; you expected to be able to take something out of it; yet all it contained was a mechanism for closing the cover. This contraption is the opposite of Pandora's "box".
+
+The original Pandora, the All-Giver, was an Earth goddess in prehistoric matriarchal Greece. She let all ills escape from her amphora (pythos). But she closed the lid before Hope could escape. The history of modern man begins with the degradation of Pandora's myth and comes to an end in the self-sealing casket. It is the history of the Promethean endeavor to forge institutions in order to corral each of the rampant ills. It is the history of fading hope and rising expectations.
+
+To understand what this means we must rediscover the distinction between hope and expectation. Hope, in its strong sense, means trusting faith in the goodness of nature, while expectation, as I will use it here, means reliance on results which are planned and controlled by man. Hope centers desire on a person from whom we await a gift. Expectation looks forward to satisfaction from a predictable process which will produce what we have the right to claim. The Promethean ethos has now eclipsed hope. Survival of the human race depends on its rediscovery as a social force.
+
+The original Pandora was sent to Earth with a jar which contained all ills; of good things, it contained only hope. Primitive man lived in this world of hope. He relied on the munificence of nature, on the handouts of gods, and on the instincts of his tribe to enable him to subsist. Classical Greeks began to replace hope with expectations. In their version of Pandora she released both evils and goods. They remembered her mainly for the ills she had unleashed. And, most significantly, they forgot that the All-Giver was also the keeper of hope.
+
+The Greeks told the story of two brothers, Prometheus and Epimetheus. The former warned the latter to leave Pandora alone. Instead, he married her. In classical Greece the name "Epimetheus," which means "hindsight," was interpreted to mean "dull" or "dumb". By the time Hesiod retold the story in its classical form, the Greeks had become moral and misogynous patriarchs who panicked at the thought of the first woman. They built a rational and authoritarian society.
+
+Men engineered institutions through which they planned to cope with the rampant ills. They became conscious of their power to fashion the world and make it produce services they also learned to expect. They wanted their own needs and the future demands of their children to be shaped by their artifacts. They became lawgivers, architects, and authors, the makers of constitutions, cities, and works of art to serve as examples for their offspring. Primitive man had relied on mythical participation in sacred rites to initiate individuals into the lore of society, but the classical Greeks recognized as true men only those citizens who let themselves be fitted by paideIa (education) into the institutions their elders had planned.
+
+The developing myth reflects the transition from a world in which dreams were interpreted to a world in which oracles were made. From immemorial time, the Earth Goddess had been worshipped on the slope of Mount Parnassus, which was the center and navel of the Earth. There, at Delphi (from deiphys, the womb), slept Gaia, the sister of Chaos and Eros. Her son, Python the dragon, guarded her moonlit and dewy dreams, until Apollo the Sun God, the architect of Troy, rose from the east, slew the dragon, and became the owner of Gaia's cave. His priests took over her temple. They employed a local maiden, sat her on a tripod over Earth's smoking navel, and made her drowsy with fumes. They then rhymed her ecstatic utterances into hexameters of self-fulfilling prophecies. From all over the Peloponnesus men brought their problems to Apollo's sanctuary. The oracle was consulted on social options, such as measures to be taken to stop a plague or a famine, to choose the right constitution for Sparta or the propitious sites for cities which later became Byzantium and Chalcedon. The never-erring arrow became Apollo's symbol. Everything about him became purposeful and useful.
+
+In the Republic, describing the ideal state, Plato already excludes popular music. Only the harp and Apollo's lyre would be permitted in towns because their harmony alone creates "the strain of necessity and the strain of freedom, the strain of the unfortunate and the strain of the fortunate, the strain of courage and the strain of temperance which befit the citizen". City-dwellers panicked before Pan's flute and its power to awaken the instincts. Only "the shepherds may play Pan's pipes and they only in the country".
+
+Man assumed responsibility for the laws under which he wanted to live and for the casting of the environment into his own image. Primitive initiation by Mother Earth into mythical life was transformed into the education (paideia) of the citizen who would feel at home in the forum.
+
+To the primitive the world was governed by fate, fact, and necessity. By stealing fire from the gods, Prometheus turned facts into problems, called necessity into question, and defied fate. Classical man framed a civilized context for human perspective. He was aware that he could defy fate-nature-environment, but only at his own risk. Contemporary man goes further; he attempts to create the world in his image, to build a totally man-made environment, and then discovers that he can do so only on the condition of constantly remaking himself to fit it. We now must face the fact that man himself is at stake.
+
+Life today in New York produces a very peculiar vision of what is and what can be, and without this vision life in New York is impossible. A child on the streets of New York never touches anything which has not been scientifically developed, engineered, planned, and sold to someone. Even the trees are there because the Parks Department decided to put them there. The jokes the child hears on television have been programmed at a high cost. The refuse with which he plays in the streets of Harlem is made of broken packages planned for somebody else. Even desires and fears are institutionally shaped. Power and violence are organized and managed: the gangs versus the police. Learning itself is defined as the consumption of subject matter, which is the result of researched, planned, and promoted programs. Whatever good there is, is the product of some specialized institution. It would be foolish to demand something which some institution cannot produce. The child of the city cannot expect anything which lies outside the possible development of institutional process. Even his fantasy is prompted to produce science fiction. He can experience the poetic surprise of the unplanned only through his encounter with "dirt," blunder, or failure: the orange peel in the gutter, the puddle in the street, the breakdown of order, program, or machine are the only take-offs for creative fancy. "Goofing off" becomes the only poetry at hand.
+
+Since there is nothing desirable which has not been planned, the city child soon concludes that we will always be able to design an institution for our every want. He takes for granted the power of process to create value. Whether the goal is meeting a mate, integrating a neighborhood, or acquiring reading skills, it will be defined in such a way that its achievement can be engineered. The man who knows that nothing in demand is out of production soon expects that nothing produced can be out of demand. If a moon vehicle can be designed, so can the demand to go to the moon. Not to go where one can go would be subversive. It would unmask as folly the assumption that every satisfied demand entails the discovery of an even greater unsatisfied one. Such insight would stop progress. Not to produce what is possible would expose the law of "rising expectations" as a euphemism for a growing frustration gap, which is the motor of a society built on the coproduction of services and increased demand.
+
+The state of mind of the modern city-dweller appears in the mythical tradition only under the image of Hell: Sisyphus, who for a while had chained Thanatos (death), must roll a heavy stone up the hill to the pinnacle of Hell, and the stone always slips from his grip just when he is about to reach the top. Tantalus, who was invited by the gods to share their meal, and on that occasion stole their secret of how to prepare all-healing ambrosia, which bestowed immortality, suffers eternal hunger and thirst standing in a river of receding waters, overshadowed by fruit trees with receding branches. A world of ever-rising demands is not just evil-it can be spoken of only as Hell.
+
+Man has developed the frustrating power to demand anything because he cannot visualize anything which an institution cannot do for him. Surrounded by all-powerful tools, man is reduced to a tool of his tools. Each of the institutions meant to exorcise one of the primeval evils has become a fail-safe, self-sealing coffin for man. Man is trapped in the boxes he makes to contain the ills Pandora allowed to escape. The blackout of reality in the smog produced by our tools has enveloped us. Quite suddenly we find ourselves in the darkness of our own trap.
+
+Reality itself has become dependent on human decision. The same President who ordered the ineffective invasion of Cambodia could equally well order the effective use of the atom. The "Hiroshima switch" now can cut the navel of the Earth. Man has acquired the power to make Chaos overwhelm both Eros and Gaia. This new power of man to cut the navel of the Earth is a constant reminder that our institutions not only create their own ends, but also have the power to put an end to themselves and to us. The absurdity of modern institutions is evident in the case of the military. Modern weapons can defend freedom, civilization, and life only by annihilating them. Security in military language means the ability to do away with the Earth.
+
+The absurdity that underlies nonmilitary institutions is no less manifest. There is no switch in them to activate their destructive power, but neither do they need a switch. Their grip is already fastened to the lid of the world. They create needs faster than they can create satisfaction, and in the process of trying to meet the needs they generate, they consume the Earth. This is true for agriculture and manufacturing, and no less for medicine and education. Modern agriculture poisons and exhausts the soil. The "green revolution" can, by means of new seeds, triple the output of an acre--but only with an even greater proportional increase of fertilizers, insecticides, water, and power. Manufacturing of these, as of all other goods, pollutes the oceans and the atmosphere and degrades irreplaceable resources. If combustion continues to increase at present rates, we will soon consume the oxygen of the atmosphere faster than it can be replaced. We have no reason to believe that fission or fusion can replace combustion without equal or higher hazards. Medicine men replace midwives and promise to make man into something else: genetically planned, pharmacologically sweetened, and capable of more protracted sickness. The contemporary ideal is a pan-hygienic world: a world in which all contacts between men, and between men and their world, are the result of foresight and manipulation. School has become the planned process which tools man for a planned world, the principal tool to trap man in man s trap. It is sup-posed to shape each man to an adequate level for playing a part in this world game. Inexorably we cultivate, treat, produce, and school the world out of existence.
+
+The military institution is evidently absurd. The absurdity of nonmilitary institutions is more difficult to face. It is even more frightening, precisely because it operates inexorably. We know which switch must stay open to avoid an atomic holocaust. No switch detains an ecological Armageddon.
+
+In classical antiquity, man had discovered that the world could be made according to man's plans, and with this insight he perceived that it was inherently precarious, dramatic and comical. Democratic institutions evolved and man was presumed worthy of trust within their framework. Expectations from due process and confidence in human nature kept each other in balance. The traditional professions developed and with them the institutions needed for their exercise.
+
+Surreptitiously, reliance on institutional process has replaced dependence on personal good will. The world has lost its humane dimension and reacquired the factual necessity and fatefulness which were characteristic of primitive times. But while the chaos of the barbarian was constantly ordered in the name of mysterious, anthropomorphic gods, today only man's planning can be given as a reason for the world being as it, is. Man has become the plaything of scientists, engineers, and planners.
+
+We see this logic at work in ourselves and in others. I know a Mexican village through which not more than a dozen cars drive each day. A Mexican was playing dominoes on the new hard-surface road in front of his house--where he had probably played and sat since his youth. A car sped through and killed him. The tourist who reported the event to me was deeply upset, and yet he said: "The man had it coming to him".
+
+At first sight, the tourist's remark is no different from the statement of some primitive bushman reporting the death of a fellow who had collided with a taboo and had therefore died. But the two statements carry opposite meanings. The primitive can blame some tremendous and dumb transcendence, while the tourist is in awe of the inexorable logic of the machine. The primitive does not sense responsibility; the tourist senses it, but denies it. In both the primitive and the tourist the classical mode of drama, the style of tragedy, the logic of personal endeavor and rebellion is absent. The primitive man has not become conscious of it, and the tourist has lost it. The myth of the Bushman and the myth of the American are made of inert, inhuman forces. Neither experiences tragic rebellion. For the Bushman, the event follows the laws of magic; for the American, it follows the laws of science. The event puts him under the spell of the laws of mechanics, which for him govern physical, social, and psychological events.
+
+The mood of 1971 is propitious for a major change of direction in search of a hopeful future. Institutional goals continuously contradict institutional products. The poverty program produces more poor, the war in Asia more Vietcong, technical assistance more underdevelopment. Birth control clinics increase survival rates and boost the population; schools produce more dropouts; and the curb on one kind of pollution usually increases another.
+
+Consumers are faced with the realization that the more they can buy, the more deceptions they must swallow. Until recently it seemed logical that the blame for this pandemic inflation of dysfunctions could be laid either on the limping of scientific discovery behind the technological demands or on the perversity of ethnic, ideological, or class enemies. Both the expectations of a scientific millennium and of a war to end all wars have declined.
+
+For the experienced consumer, there is no way back to a naïve reliance on magical technologies. Too many people have had bad experiences with neurotic computers, hospital-bred infections, and jams wherever there is traffic on the road, in the air, or on the phone. Only ten years ago conventional wisdom anticipated a better life based on an increase in scientific discovery. Now scientists frighten children. The moon shots provide a fascinating demonstration that human failure can be almost eliminated among the operators of complex systems-yet this does not allay our fears that the human failure to consume according to instruction might spread out of control.
+
+For the social reformer there is no way back, either, to the assumptions of the forties. The hope has vanished that the problem of justly distributing goods can be sidetracked by creating an abundance of them. The cost of the minimum package capable of satisfying modern tastes has skyrocketed, and what makes tastes modern is their obsolescence prior even to satisfaction.
+
+The limits of the Earth's resources have become evident. No breakthrough in science or technology could provide every man in the world with the commodities and services which are now available to the poor of rich countries. For instance, it would take the extraction of one hundred times the present amounts of iron, tin, copper, and lead to achieve such a goal, with even the "lightest" alternative technology.
+
+Finally, teachers, doctors, and social workers realize that their distinct professional ministrations have one aspect-at least-in common. They create further demands for the institutional treatments they provide, faster than they can provide service institutions.
+
+Not just some part, but the very logic, of conventional wisdom is becoming suspect. Even the laws of economy seem unconvincing outside the narrow parameters which apply to the social, geographic area where most of the money is concentrated. Money is, indeed, the cheapest currency, but only in an economy geared to efficiency measured in monetary terms. Both capitalist and Communist countries in their various forms are committed to measuring efficiency in cost-benefit ratios expressed in dollars. Capitalism flaunts a higher standard of living as its claim to superiority. Communism boasts of a higher growth rate as an index of its ultimate triumph. But under either ideology the total cost of increasing efficiency increases geometrically. The largest institutions compete most fiercely for resources which are not listed in any inventory: the air, the ocean, silence, sunlight, and health. They bring the scarcity of these resources to public attention only when they are almost irremediably degraded. Everywhere nature becomes poisonous, society inhumane, and the inner life is invaded and personal vocation smothered.
+
+A society committed to the institutionalization of values identifies the production of goods and services with the demand for such. Education which makes you need the product is included in the price of the product. School is the advertising agency which makes you believe that you need the society as it is. In such a society marginal value has become constantly self-transcendent. It forces the few largest consumers to compete for the power to deplete the earth, to fill their own swelling bellies, to discipline smaller consumers, and to deactivate those who still find satisfaction in making do with what they have. The ethos of nonsatiety is thus at the root of physical depredation, social polarization, and psychological passivity.
+
+When values have been institutionalized in planned and engineered processes, members of modern society believe that the good life consists in having institutions which define the values that both they and their society believe they need. Institutional value can be defined as the level of output of an institution. The corresponding value of man is measured by his ability to consume and degrade these institutional outputs, and thus create a new-even higher demand. The value of institutionalized man depends on his capacity as an incinerator. To use an image--he has become the idol of his handiworks. Man now defines himself as the fur-nace which burns up the values produced by his tools. And there is no limit to his capacity. His is the act of Prometheus carried to an extreme.
+
+The exhaustion and pollution of the earth's resources is, above all, the result of a corruption in man's self-image, of a regression in his consciousness. Some would like to speak about a mutation of collective consciousness which leads to a conception of man as an organism dependent not on nature and individuals, but rather on institutions. This institutionalization of substantive values, this belief that a planned process of treatment ultimately gives results desired by the recipient, this consumer ethos, is at the heart of the Promethean fallacy.
+
+## Efforts to find a new balance in the global milieu depend on the deinstitutionalization of values
+
+The suspicion that something is structurally wrong with the vision of _homo faber_ is common to a growing minority in capitalist, Communist, and "underdeveloped" countries alike. This suspicion is the shared characteristic of a new elite. To it belong people of all classes, incomes, faiths, and civilizations. They have 'become wary of the myths of the majority: of scientific utopias, of ideological diabolism, and of the expectation of the distribution of goods and services with some degree of equality. They share with the majority the sense of being trapped. They share with the majority the awareness that most new policies adopted by broad consensus consistently lead to results which are glaringly opposed to their stated aims. Yet whereas the Promethean majority of would-be spacemen still evades the structural issue, the emergent minority is critical of the scientific _deus ex machina_, the ideological panacea, and the hunt for devils and witches. This minority begins to formulate its suspicion that our constant deceptions tie us to contemporary institutions as the chains bound Prometheus to his rock. Hopeful trust and classical irony (eironeia) must conspire to expose the Promethean fallacy.
+
+Prometheus is usually thought to mean "foresight," or sometimes even "he who makes the North Star progress". He tricked the gods out of their monopoly of fire, taught men to use it in the forging of iron, became the god of technologists, and wound up in iron chains.
+
+The Pythia of Delphi has now been replaced by a computer which hovers above panels and punch cards. The hexameters of the oracle have given way to sixteen-bit codes of instructions. Man the helmsman has turned the rudder over to the cybernetic machine. The ultimate machine emerges to direct our destinies. Children phantasize flying their spacecrafts away from a crepuscular earth.
+
+From the perspectives of the Man on the Moon, Prometheus could recognize sparkling blue Gaia as the planet of Hope and as the Arc of Mankind. A new sense of the finiteness of the Earth and a new nostalgia now can open man's eyes to the choice of his brother Epimetheus to wed the Earth with Pandora.
+
+At this point the Greek myth turns into hopeful prophecy because it tells us that the son of Prometheus was Deucalion, the Helmsman of the Ark who like Noah outrode the Flood to become the father of a new mankind which he made from the earth with Pyrrha, the daughter of Epimetheus and Pandora. We are gaining insight into the meaning of the Pythos which Pandora brought from the gods as being the inverse of the Box: our Vessel and Ark.
+
+We now need a name for those who value hope above expectations. We need a name for those who love people more than products, those who believe that
+
+```
+No people are uninteresting.
+Their fate is like the chronicle of planets.
+
+Nothing in them is not particular,
+and planet is dissimilar from planet.
+```
+
+We need a name for those who love the earth on which each can meet the other,
+
+```
+And if a man lived in obscurity
+making his friends in that obscurity,
+obscurity is not uninteresting.
+```
+
+We need a name for those who collaborate with their Promethean brother in the lighting of the fire and the shaping of iron, but who do so to enhance their ability to tend and care and wait upon the other, knowing that[^n03]
+
+```
+to each his world is private,
+and in that world one excellent minute.
+And in that world one tragic minute.
+These are private.
+```
+
+I suggest that these hopeful brothers and sisters be called Epimethean men.
+
+----
+
+[^n00]: Penrose B. Jackson, _Trends in Elementary and Secondary Education Expenditures: Central City and Suburban Comparisons 1965 to 1968_, U.S. Office of Education, Office of Program and Planning Evaluation, June 1969.
+
+[^n01]: "Nichomachean Ethics", 1 140.
+
+[^n02]: This chapter was presented originally at a meeting of the American Educational Research Association, in New York City, February 6, 1971.)
+
+[^n03]: The three quotations are from "People" from the book Selected Poems by Yevgeny Yevtushenko. Translated and with Introduction by Robin Milner Gulland and Peter Levi. Published by E. P. Dutton & Co. Inc., 1962, and reprinted with their permission.
+
diff --git a/platform/bin/pandoc/book/en.pdf b/platform/bin/pandoc/book/en.pdf
new file mode 100644
index 0000000..ea1ce84
--- /dev/null
+++ b/platform/bin/pandoc/book/en.pdf
Binary files differ
diff --git a/platform/bin/pandoc/book/es.md b/platform/bin/pandoc/book/es.md
new file mode 100644
index 0000000..61b286c
--- /dev/null
+++ b/platform/bin/pandoc/book/es.md
@@ -0,0 +1,1097 @@
+---
+ title: "La sociedad desescolarizada"
+ author: "Ivan Illich"
+ date: "1970"
+ lang: ""
+ documentclass: book
+ classoption:
+ - oneside
+ geometry: margin=1.75in
+ fontsize: 12pt
+ fontfamily: ebgaramond-maths
+ newtxmathoptions:
+ - cmintegrals
+ - cmbraces
+ toc: true
+ colorlinks: true
+ linkcolor: RoyalBlue
+ urlcolor: RoyalBlue
+ titlepage: true
+---
+
+
+# Introducción
+
+Debo a Everett Reimer el interés que tengo por la educación pública hasta el día de 1958 en que nos conocimos en Puerto Rico jamás había yo puesto en duda el valor de hacer obligatoria la escuela para todos. Conjuntamente, hemos llegado a percatarnos de que para la mayoría de los seres humanos, el derecho a aprender se ve restringido por la obligación de asistir a la escuela.
+
+Desde 1966 en adelante, Valentina Borremans, cofundadora y directora del CIDOC (Centro Intercultural de Documentación) de Cuernavaca, organizó anualmente dos seminarios alrededor de mi diálogo con Reimer. Centenares de personas de todo el mundo participaron en estos encuentros. Quiero recordar en este lugar a dos de ellos que contribuyeron particularmente a nuestro análisis y que en el entretiempo murieron: Augusto Salazar Bondy y Paul Goodman. Los ensayos escritos para el boletín _Cidoc Informa_ y reunidos en este libro se desarrollaron a partir de mis notas de seminario. El último capítulo contiene ideas que me surgieron después de mis conversaciones con Erich Fromm en torno al Mutterrecht de Bachofen.
+
+Durante estos años Valentina Borremans constantemente me urgía a poner a prueba nuestro pensar enfrentándolo a las realidades de América Latina y de África. Este libro refleja su convencimiento de que no sólo las instituciones sino el _ethos_ de la sociedad deben ser “desescolarizados”.
+
+La educación universal por medio de la escolarización no es factible. No sería más factible si se intentara mediante instituciones alternativas construidas según el estilo de las escuelas actuales. Ni nuevas actitudes de los maestros hacia sus alumnos, ni la proliferación de nuevas herramientas y métodos físicos o mentales (en el aula o en el dormitorio), ni, finalmente, el intento de ampliar la responsabilidad del pedagogo hasta que englobe las vidas completas de sus alumnos, dará por resultado la educación universal. La búsqueda actual de nuevos _embudos_ educacionales debe revertirse hacia la búsqueda de su antípoda institucional: _tramas_ educacionales que aumenten la oportunidad para que cada cual transforme cada momento de su vida en un momento de aprendizaje, de compartir, de interesarse. Confiamos en estar aportando conceptos necesarios para aquellos que realizan investigaciones sobre la educación —y asimismo para aquellos que buscan alternativas para otras industrias de servicio establecidas—.
+
+Me propongo examinar algunas cuestiones inquietantes que surgen una vez que adoptamos como hipótesis que la sociedad puede desescolarizarse, buscar pautas que puedan ayudarnos a discernir instituciones dignas de desarrollo por cuanto apoyan el aprendizaje en un medio desescolarizado, y esclarecer las metas personales que ampararían el advenimiento de una Edad de Ocio _(schole)_ opuesta como tal a una economía dominada por las industrias de servicio.
+
+IVÁN ILLICH
+
+_Ocotepec, Morelos, enero de 1978_
+
+# Por qué debemos privar de apoyo oficial a la escuela
+
+Muchos estudiantes en especial los que son pobres saben intuitivamente qué hacen por ellos las escuelas los adiestran a confundir proceso y sustancia. Una vez que estos dos términos se hacen indistintos, se adopta una nueva lógica: cuanto más tratamiento haya, tanto mejor serán los resultados. Al alumno se le “escolariza” de ese modo para confundir enseñanza con saber, promoción al curso siguiente con educación, diploma con competencia, y fluidez con capacidad para decir algo nuevo. A su imaginación se la “escolariza” para que acepte servicio en vez de valor. Se confunde el tratamiento médico tomándolo por cuidado de la salud, el trabajo social por mejoramiento de la vida comunitaria, la protección policiaca por tranquilidad, el equilibrio militar por seguridad nacional, la mezquina lucha cotidiana por trabajo productivo. La salud, el saber, la dignidad, la independencia y el quehacer creativo quedan definidos como poco más que el desempeño de las instituciones que afirman servir a estos fines, y su mejoramiento se hace dependiente de la asignación de mayores recursos a la administración de hospitales, escuelas y demás organismos correspondientes.
+
+En estos ensayos mostraré que la institucionalización de los valores conduce inevitablemente a la contaminación física, a la polarización social y a la impotencia psicológica: tres dimensiones en un proceso de degradación global y de miseria modernizada. Explicaré cómo este proceso de degradación se acelera cuando unas necesidades no materiales se transforman en demanda de bienes; cuando a la salud, a la educación, a la movilidad personal, al bienestar o a la cura psicológica se las define como el resultado de servicios o de “tratamientos”. Hago esto porque creo que la mayoría de las investigaciones actualmente en curso acerca del futuro tienden a abogar por incrementos aún mayores en la institucionalización de valores y que debemos definir algunas condiciones que permitieran que ocurriese lo contrario. Precisamos investigaciones sobre el posible uso de la tecnología para crear instituciones que atiendan a la acción recíproca, creativa y autónoma entre personas y a la emergencia de valores que los tecnócratas no puedan controlar sustancialmente. Necesitamos investigación en líneas generales para la futurología actual.
+
+Quiero suscitar la cuestión general acerca de la mutua definición, de la naturaleza del hombre y de la naturaleza de las instituciones modernas, que caracteriza nuestra visión del mundo y nuestro lenguaje. Para hacerlo, he elegido a la escuela como mi paradigma, y por consiguiente trato sólo indirectamente de otros organismos burocráticos del Estado corporativo: la familia consumidora, el partido, el ejército, la Iglesia, los medios informativos. Mi análisis del currículum oculto de la escuela debería poner en evidencia que la educación pública se beneficiaría con la desescolarización de la sociedad, tal como la vida familiar, la política, la seguridad, la fe y la comunicación se beneficiarían con un proceso análogo.
+
+Quiero comenzar este estudio esforzándome en hacer comprender qué es lo que la desescolarización de una sociedad escolarizada podría significar. En este contexto debiera ser más fácil entender mi elección de los cinco aspectos específicos pertinentes respecto de este proceso, los cuales abordaré en los capítulos siguientes.
+
+No sólo la educación sino la propia realidad social se han escolarizado. Cuesta más o menos lo mismo escolarizar tanto al rico como al pobre en igual dependencia. El gasto anual por alumno en los arrabales y los suburbios ricos de cualquiera de 20 ciudades de Estados Unidos está comprendido dentro de unos mismos márgenes —y hasta es favorable al pobre en ciertos casos—.[^n01]
+
+Tanto el pobre como el rico dependen de escuelas y hospitales que guían sus vidas, forman su visión del mundo y definen para ellos qué es legítimo y qué no. Ambos consideran irresponsable medicarse uno mismo, y ven a la organización comunitaria, cuando no la pagan quienes detentan la autoridad, como una forma de agresión y subversión. Para ambos grupos, apoyarse en el tratamiento institucional hace sospechoso el logro independiente. El subdesarrollo progresivo de la confianza en sí mismo y en la comunidad es incluso más típico en Westchester que en el norte de Brasil. Por doquiera, no tan sólo la educación sino la sociedad en conjunto, necesitan “desescolarización”.
+
+Las burocracias del bienestar social pretenden un monopolio profesional, político y financiero sobre la imaginación social, fijando normas sobre qué es valedero y qué es factible. Este monopolio está en las raíces de la modernización de la pobreza. Cada necesidad simple para la que se halla una respuesta institucional permite la invención de una nueva clase de pobres y una nueva definición de la pobreza. Hace 10 años, lo normal en México era nacer y morir en su propia casa, y ser enterrado por sus amigos. Sólo las necesidades del alma las atendía la Iglesia institucionalizada. Ahora, comenzar y acabar la vida en casa se convierten en _signos_ , ya sea de pobreza, ya sea de privilegio especial. El morir y la muerte han quedado bajo la administración institucional del médico y de los empresarios de pompas fúnebres.
+
+Una vez que una sociedad ha convertido ciertas necesidades básicas en demandas de bienes producidos científicamente, la pobreza queda definida por normas que los tecnócratas pueden cambiar a voluntad. “Pobre” es quien no llega a satisfacer ciertas normas del consumo obligatorio. En México son pobres aquellos que carecen de tres años de escolaridad, y en Nueva York aquellos que carecen de doce.
+
+Los pobres siempre han sido socialmente impotentes. Apoyarse cada vez más en la atención y el cuidado institucionales agrega una nueva dimensión a su indefensión: la impotencia psicológica, la incapacidad de valerse por sí mismos. Los campesinos del altiplano andino son explotados por el terrateniente y el comerciante —una vez que se asientan en Lima llegan a depender, además, de los jefazos políticos y están desarmados por su falta de escolaridad—. La pobreza moderna conjuga la pérdida del poder sobre las circunstancias con una pérdida de la potencia personal. Esta modernización de la pobreza es un fenómeno mundial y está en el origen del subdesarrollo contemporáneo. Adopta aspectos diferentes, por supuesto, en países ricos y países pobres.
+
+Probablemente se siente más intensamente en las ciudades estadunidenses. En ninguna otra parte se da un tratamiento más costoso a la pobreza. En ninguna otra parte el tratamiento de la pobreza produce tanta dependencia, ira, frustración y nuevos requerimientos. Y en ninguna otra parte es tan evidente que la pobreza —una vez modernizada— ha llegado a hacerse resistente al tratamiento con dólares y requiere de una revolución institucional.
+
+Hoy en día, en Estados Unidos, el negro y hasta el vagabundo pueden aspirar a un nivel de tratamiento profesional que habría sido inconcebible hace dos generaciones y que a la mayoría de la gente del Tercer Mundo le parece grotesca. Por ejemplo, los pobres de Estados Unidos pueden contar con un vigilante escolar que lleve a sus hijos de regreso a la escuela hasta que lleguen a los 17 años o con un médico que les remita a una cama de hospital que cuesta 60 dólares diarios —el equivalente al ingreso de tres meses para la mayor parte de la gente en el mundo—. Pero ese cuidado los hace sólo más dependientes de un tratamiento ulterior, y los hace cada vez más incapaces de organizar sus propias vidas en torno a sus propias experiencias y recursos dentro de sus propias comunidades.
+
+Los estadunidenses pobres están en una posición singular para hablar sobre el predicamento que amenaza a todos los pobres de un mundo en vías de modernización. Están descubriendo que no hay cantidad alguna de dólares que pueda eliminar la destructividad inherente de las instituciones de bienestar social, una vez que las jerarquías profesionales de estas instituciones han convencido a la sociedad de que sus servicios son moralmente necesarios. Los pobres de los núcleos urbanos centrales de Estados Unidos pueden demostrar con su propia experiencia la falacia sobre la que está construida la legislación social en una sociedad “escolarizada”.
+
+William O. Douglas, miembro de la Suprema Corte de Justicia, hizo la observación de que “la única manera de establecer una observación es financiarla”. El corolario es asimismo verdadero. Sólo al desviar los dólares que ahora afluyen a las instituciones que actualmente tratan la salud, la educación y el bienestar social, podrá detenerse el progresivo empobrecimiento que ahora proviene del aspecto paralizante de las mismas instituciones.
+
+Debemos tener esto presente al evaluar los programas de ayuda federales. A modo de ejemplo: entre 1965 y 1968, en las escuelas de Estados Unidos se gastaron más de 3 000 millones de dólares para compensar las desventajas de unos seis millones de niños. Al programa se le conoce con el nombre de _Title One_ (Artículo Primero). Es el programa compensatorio más costoso que jamás se haya intentado en parte alguna en materia de educación y, sin embargo, no es posible discernir ningún mejoramiento significativo en el aprendizaje de estos niños “desfavorecidos”. En comparación con sus condiscípulos del mismo curso que provienen de hogares de ingresos medios, han quedado aún más retrasados. Por lo demás, a lo largo de este programa, los profesionales descubrieron otros 10 millones de niños que se esforzaban sometidos a desventajas económicas y educativas. Se dispone ahora de nuevas razones para reclamar nuevos fondos federales.
+
+Este fracaso total en el intento de mejorar la educación de los pobres a pesar de un tratamiento más costoso puede explicarse de tres maneras:
+
+_1)_ Tres mil millones de dólares son insuficientes para mejorar el aprovechamiento de seis millones de niños de modo apreciable; o bien,
+
+_2)_ el dinero se gastó de manera incompetente: se requieren diferentes planes de estudio, una mejor administración, una concentración aún mayor de fondos sobre el niño pobre, y más investigaciones. Con ello se lograría el objetivo: o bien,
+
+_3)_ la desventaja educativa no puede curarse apoyándose en una educación dentro de la escuela.
+
+Lo primero es sin duda cierto en cuanto que el dinero se ha gastado a través del presupuesto escolar. El dinero se destinó efectivamente a las escuelas donde estaban la mayoría de los niños desfavorecidos, pero no se gastó en los niños mismos. Estos niños, a los que estaba destinado el dinero, constituían sólo alrededor de la mitad de los que asistían a las escuelas que añadieron el subsidio federal a sus presupuestos. De modo que el dinero se gastó en inspección y custodia, en indoctrinación y selección de papeles sociales, como también en educación, todo ello inextricablemente mezclado con los edificios e instalaciones, planes de estudio, profesores, administradores y otros componentes básicos de estas escuelas y, por consiguiente, con sus presupuestos.
+
+Los fondos adicionales permitieron a las escuelas atender desproporcionadamente a los niños relativamente más ricos que estaban “desfavorecidos” por tener que asistir a la escuela en compañía de los pobres. En el mejor de los casos, una pequeña proporción de cada dólar destinado a remediar las desventajas del niño pobre en su aprendizaje podía llegar hasta ese niño a través del presupuesto de la escuela.
+
+Podría ser igualmente cierto que el dinero se gastó de manera incompetente. Pero ni siquiera la incompetencia poco común puede superar la del sistema escolar. Las escuelas resisten, por su estructura misma, la concentración del privilegio en quienes son, por otra parte, desfavorecidos. Los planes especiales de estudio, las clases separadas o más horas de estudio constituyen tan sólo más discriminación a un coste más elevado.
+
+Los contribuyentes no se han acostumbrado aún a ver que 3 000 millones de dólares se desvanezcan en el Ministerio de Salud, Educación y Bienestar como si se tratara del Pentágono. El gobierno actual tal vez estime que puede afrontar la ira de los educadores. Los estadunidenses de clase media no tienen nada que perder si se interrumpe el programa. Los padres pobres creen que sí pierden, pero, más todavía, están exigiendo el control de los fondos destinados a sus hijos. Un sistema lógico de recortar el presupuesto y, sería de esperar, de aumentar sus beneficios, consistiría en un sistema de becas escolares como el propuesto por Milton Friedman y otros. Los fondos se canalizarían al beneficiario, permitiéndole comprar su parte de escolaridad que elija. Si dicho crédito se limitara a unas compras que se ajustasen a un plan escolar de estudios, tendería a proporcionar una mayor igualdad de tratamiento, pero no aumentaría por ello la igualdad de las exigencias sociales.
+
+Debería ser obvio que incluso con escuelas de igual calidad un niño pobre rara vez se pondrá a la par de uno rico. Incluso si asisten a las mismas escuelas y comienzan a la misma edad, los niños pobres carecen de la mayoría de las oportunidades educativas que, al parecer, dispone el niño de clase media. Estas ventajas van desde la conversación y los libros en el hogar hasta el viaje de vacaciones y un sentido diferente de sí mismo, y actúan, para el niño que goza de ellas, tanto dentro de la escuela como fuera de ella. De modo que el estudiante más pobre se quedará atrás en tanto dependa de la escuela para progresar o aprender. Los pobres necesitan fondos que les permitan aprender y no obtener certificados del tratamiento de sus deficiencias presuntamente desproporcionadas.
+
+Todo esto es válido para naciones tanto ricas como pobres, pero aparece con aspecto diferente. En las naciones pobres, la pobreza modernizada afecta a más gente y más visiblemente, pero también —por ahora— más superficialmente. Dos de cada tres del total de niños latinoamericanos dejan la escuela antes de terminar el quinto grado, pero estos _desertores_[^n02] no están tan mal, como lo estarían en Estados Unidos.
+
+Hoy en día son pocos los países víctimas de la pobreza clásica, que era estable y menos paralizante. La mayoría de los países de América Latina han llegado al punto de “despegue” hacia el desarrollo económico y el consumo competitivo y, por lo tanto, hacia la pobreza modernizada: sus ciudadanos aprenden a pensar como ricos y a vivir como pobres. Sus leyes establecen un periodo escolar obligatorio de seis a 10 años. No sólo en Argentina, sino también en México o en Brasil, el ciudadano medio define una educación adecuada según las pautas estadunidenses, aun cuando la posibilidad de lograr esa prolongada escolarización esté restringida a una diminuta minoría. En estos países la mayoría ya está enviciada con la escuela, es decir, ha sido “escolarizada” para sentirse inferior respecto de quienes tienen una mejor escolaridad. Su fanatismo en favor de la escuela hace posible explotarlos por partida doble: permite aumentar la asignación de fondos públicos para la educación de unos pocos y aumentar la aceptación del control social por parte de la mayoría.
+
+Es paradójico que la creencia en la escolarización universal se mantenga más firme en los países en que el menor número de personas ha sido —y será— servido por las escuelas. Sin embargo, en América Latina la mayoría de los padres y de los hijos podrían seguir aún senderos diferentes hacia la educación. La proporción del ahorro nacional invertido en escuelas y maestros tal vez sea mayor que en los países ricos, pero estas inversiones son totalmente insuficientes para atender a la mayoría haciendo posible siquiera cuatro años de asistencia a la escuela. Fidel Castro habla como si quisiese avanzar directo a la desescolarización, cuando promete que para 1980 Cuba estará en condiciones de disolver su universidad, puesto que toda la vida cubana será una _experiencia educativa_. Sin embargo, en los niveles de primaria y secundaria, Cuba, al igual que otros países latinoamericanos, actúa como si el paso a través de un periodo definido como “la edad escolar” fuese una meta incuestionable para todos, sólo postergada por una escasez momentánea de recursos.
+
+Los dos engaños gemelos de un tratamiento más a fondo, tal como de hecho se proporciona en Estados Unidos —y como tan sólo se promete en América Latina— se complementan entre sí. Los pobres del Norte están siendo tullidos por el mismo tratamiento de 12 años cuya carencia marca a los pobres del Sur como irremediablemente retrasados. Ni en Norteamérica ni en América Latina logran los pobres igualdad a partir de escuelas obligatorias. Pero en ambas partes la sola existencia de la escuela desanima al pobre y lo invalida para asir el control de su propio aprendizaje. En todo el mundo la escuela tiene un efecto antieducacional sobre la sociedad: se le reconoce como la institución que se especializa en educación. La mayoría de las personas considera los fracasos de la escuela como una prueba de que la educación es una tarea muy costosa, muy compleja, siempre arcana y frecuentemente casi imposible.
+
+La escuela se apropia del dinero, de los hombres y de la buena voluntad disponibles para educación, y fuera de eso desalienta a otras instituciones respecto a asumir tareas educativas. El trabajo, el tiempo libre, la política, la vida ciudadana e incluso la vida familiar dependen de las escuelas, en lo concerniente a los hábitos y conocimientos que presuponen, en vez de convertirse ellos mismos en medios de educación. Tanto las escuelas como las otras instituciones que dependen de aquéllas llegan simultáneamente a tener un precio imposible.
+
+En Estados Unidos, los costes per cápita de la escolaridad han aumentado casi con igual rapidez que el coste del tratamiento médico. Pero este tratamiento más completo impartido por doctores y maestros ha mostrado resultados en continua declinación. Los gastos médicos concentrados sobre los mayores de 45 años se han duplicado varias veces durante un periodo de 40 años, dando como fruto un aumento de 3% en las probabilidades de vida de los varones. El incremento de los gastos educativos ha producido resultados aún más extraños; de otra manera el presidente Nixon no se habría sentido inclinado a prometer esta primavera que todo niño tendrá pronto el “derecho a leer” antes de dejar la escuela.
+
+En Estados Unidos se precisarían 80 000 millones de dólares por año para proporcionar lo que los educadores consideran como tratamiento igualitario para todos en escuelas primaria y secundaria. Esto es bastante más del doble de los 36 000 millones que se están gastando ahora. Las predicciones de costes preparadas de modo independiente en el Ministerio de Salud, Educación y Bienestar y en la Universidad de Florida indican que para 1974 las cifras comparables serán de 107 000 millones contra los 45 000 millones proyectados ahora, y estas cifras omiten totalmente los enormes costes de lo que se denomina “educación superior”, cuya demanda está creciendo de manera más veloz. Estados Unidos, que en 1969 gastó casi 80 000 millones de dólares en “defensa”, incluyendo su despliegue en Vietnam, es obviamente demasiado pobre como para proporcionar igual escolaridad. El comité nombrado por el presidente para el estudio del financiamiento de las escuelas debiera preguntar no cómo mantener o cómo recortar tales costes, crecientes, sino cómo evitarlos.
+
+La escuela igual y obligatoria para todos debiera reconocerse por lo menos como algo económicamente impracticable. En América Latina, la cantidad de erario que se gasta en cada estudiante graduado oscila entre 350 y 1 500 veces el monto gastado en el ciudadano medio (es decir, el ciudadano que está en un término medio entre el más pobre y el más rico). En Estados Unidos la discrepancia es menor, pero la discriminación más aguda. Los padres más ricos, cerca de 10%, pueden permitirse proporcionar a sus hijos educación privada y ayudarles a beneficiarse de las donaciones de fundaciones. Pero además consiguen 10 veces el monto per cápita de fondos públicos si éste se compara con el gasto per cápita que se efectúa en los hijos de 10% de los más pobres. Las razones principales de que esto ocurra son que los muchachos ricos permanecen más tiempo en la escuela, que un año de universidad es desproporcionadamente más costoso que un año de escuela secundaria, y que la mayoría de las universidades privadas dependen —al menos indirectamente— de un financiamiento derivado de desgravámenes.
+
+La escuela obligatoria polariza inevitablemente a una sociedad y califica asimismo a las naciones del mundo según un sistema internacional de castas. A los países se los califica como castas cuya dignidad la determina el promedio de años de escolaridad de sus ciudadanos, tabla de calificación que se relaciona íntimamente con el producto nacional bruto per cápita y es mucho más dolorosa.
+
+La paradoja de las escuelas es evidente: el gasto creciente hace aumentar su destructividad en su propio país y en el extranjero. Esta paradoja debe convertirse en tema de debate público. Hoy por hoy se reconoce de manera general que el medio ambiente físico quedará destruido dentro de poco por la contaminación bioquímica a menos que invirtamos las tendencias actuales de producción de bienes físicos. Debería reconocerse asimismo que la vida social y personal está igualmente amenazada por la contaminación del Ministerio de Salud, Educación y Bienestar, subproducto inevitable del consumo obligatorio y competitivo del bienestar.
+
+La escalada de las escuelas es tan destructiva como la de las armas, si bien de manera menos visible. En todo el mundo, los costes de la escuela han aumentado con mayor velocidad que las matrículas y más velozmente por el producto nacional bruto (PNB); en todas partes los gastos en la escuela se quedan cada vez más cortos frente a las expectativas de padres, maestros y alumnos. Por doquiera, esta situación desalienta tanto la motivación como el financiamiento para una planificación en gran escala del aprendizaje no escolar. Estados Unidos está demostrando al mundo que ningún país puede ser lo bastante rico como para permitirse un sistema escolar que satisfaga las demandas que este mismo sistema crea con sólo existir, porque un sistema escolar que logre su meta escolariza a padres y alumnos en el valor supremo de un sistema escolar aún mayor, cuyo coste crece desproporcionadamente conforme se crea una demanda de grados superiores y éstos se hacen escasos.
+
+En vez de decir que una escolaridad pareja es impracticable por el momento, debemos reconocer que, en principio, es económicamente absurda, y que intentarla es intelectualmente castrante, socialmente polarizante y destruye la verosimilitud del sistema político que la promueve.
+
+La ideología de la escolaridad obligatoria no admite límites lógicos. La Casa Blanca proporcionó hace poco un buen ejemplo. El doctor Hutschnecker, el “psiquiatra” que atendió al señor Nixon antes de que fuese admitido como candidato, recomendó al presidente que todos los niños de seis a ocho años fueran examinados profesionalmente para cazar a aquellos que tuviesen tendencias destructivas, y que se les proporcionase a éstos tratamiento obligatorio. En caso necesario se exigiría su reeducación en instituciones especiales. Este memorándum enviado al presidente por su doctor pasó al Ministerio de Salud, Educación y Bienestar para que examinaran su valía. En efecto, unos campos de concentración preventivos para predelincuentes serían un adelanto lógico respecto del sistema escolar.
+
+El que todos tengan iguales oportunidades de educarse es una meta deseable y factible, pero identificar con ello la escolaridad obligatoria es confundir la salvación con la Iglesia. La escuela ha llegado a ser la religión del proletariado modernizado, y hace promesas huecas a los pobres de la era tecnológica. La nación-Estado la ha adoptado, reclutando a todos los ciudadanos dentro de un currículum graduado que conduce a diplomas consecutivos no distintos a los rituales de iniciación y promociones hieráticas de antaño. El Estado moderno se ha arrogado el deber de hacer cumplir el juicio de sus educadores mediante vigilantes bien intencionados y cualificaciones exigidas para conseguir trabajos, de modo muy semejante al que siguieron los reyes españoles que hicieron cumplir los juicios de sus teólogos mediante los conquistadores y la Inquisición.
+
+Hace dos siglos Estados Unidos dio al mundo la pauta en un movimiento para privar de apoyo oficial al monopolio de una sola Iglesia. Ahora necesitamos la separación constitucional respecto del monopolio de la escuela quitando de esa manera el apoyo oficial a un sistema que conjuga legalmente el prejuicio con la discriminación. El primer artículo de una Declaración de los Derechos del Hombre apropiada para una sociedad moderna, humanista, concordaría con la Primera Enmienda de la Constitución de Estados Unidos: “El Estado no dictará ley alguna respecto del establecimiento de la educación”. No habrá ningún ritual obligatorio para todos.
+
+Para poner en vigencia esta separación entre Estado y escuela, necesitamos una ley que prohíba la discriminación en la contratación de personal, en las votaciones o en la admisión a los centros de enseñanza fundados en la previa asistencia a algún plan de estudios. Esta garantía no excluiría pruebas de competencia para una función o cargo, pero eliminaría la absurda discriminación actual en favor de una persona que aprende una destreza determinada con el mayor de los gastos del erario público o —lo que es igualmente probable— que ha podido obtener un diploma que no tiene relación con ninguna habilidad o trabajo útiles. Una separación constitucional del Estado y la escuela puede llegar a ser psicológicamente eficaz sólo si protege al ciudadano de la posibilidad de ser descalificado por cualquier aspecto de su carrera escolar.
+
+Con la escolaridad no se fomenta ni el deber ni la justicia porque los educadores insisten en aunar la instrucción y la certificación. El aprendizaje y la asignación de funciones sociales se funden en la escolarización. No obstante que aprender significa adquirir una nueva habilidad o entendimiento, la promoción depende de la opinión que otros se hayan formado de uno. Aprender es con frecuencia el resultado de una instrucción, pero ser elegido para una función o categoría en el mercado del trabajo depende cada vez más del tiempo que se ha asistido a un centro de instrucción.
+
+Instrucción es la selección de circunstancias que facilitan el aprendizaje. Las funciones se asignan fijando un currículum de condiciones que el candidato debe satisfacer para pasar la valla. La escuela vincula la instrucción —pero no el aprendizaje— con estas funciones. Esto no es ni razonable ni liberador. No es razonable porque no liga unas cualidades o competencias sobresalientes con las funciones por desempeñar, sino con el proceso mediante el cual se supone que habrán de adquirirse dichas cualidades. No libera ni educa porque la escuela reserva la instrucción para aquellos cuyos pasos en el aprendizaje se ajustan a unas medidas aprobadas de control social.
+
+El currículum se ha empleado siempre para asignar el rango social. En ocasiones podía ser prenatal: el karma le adjudica a uno a determinada casta y el linaje a la aristocracia. El currículum podía adoptar la forma de un ritual de ordenaciones sacras y secuenciales, o bien podía consistir en una sucesión de hazañas guerreras o cinegéticas, o bien las promociones ulteriores podían depender de una serie de previos favores regios. La escolaridad universal tenía por objeto separar la adjudicación de las funciones de la historia personal de cada uno: se ideó para dar a todos una oportunidad igual de obtener cualquier cargo. Aún ahora muchos creen erróneamente que la escuela asegura que la confianza pública dependa de unos logros sobresalientes en el saber. Pero en vez de haber igualado las posibilidades, el sistema escolar ha monopolizado su distribución.
+
+Para separar la competencia del currículum, debe convertirse en tabú toda indagación acera del historial de aprendizaje de cada persona, tal como las indagaciones acerca de su filiación política, su asistencia a la iglesia, linaje, hábitos sexuales o antecedentes raciales. Deben dictarse leyes que prohíban la discriminación basada en una previa escolaridad. Evidentemente, las leyes no pueden impedir el prejuicio contra el no escolarizado —ni se pretende con ellas obligar a nadie a casarse con un autodidacta—, pero pueden desaprobar la discriminación justificada.
+
+Otra gran ilusión en la que se apoya el sistema escolar es la creencia de que la mayor parte del saber es el resultado de la enseñanza. La enseñanza puede, en verdad, contribuir a ciertos tipos de aprendizaje en ciertas circunstancias. Pero la mayoría de las personas adquieren la mayor parte de su conocimiento fuera de la escuela, y cuando este conocimiento se da en ella, sólo es en la medida en que, en unos cuantos países ricos, la escuela se ha convertido en el lugar de confinamiento de las personas durante una parte cada vez mayor de sus vidas.
+
+Lo principal del aprendizaje sobreviene casualmente, e incluso el aprendizaje más intelectual no es el resultado de una instrucción programada. Los niños normales aprenden su lenguaje de manera informal, aunque con mayor rapidez si sus padres les prestan atención. La mayoría de las personas que aprenden bien un segundo idioma lo hacen a consecuencia de circunstancias aleatorias y no de una enseñanza ordenada. Llegan a vivir con sus abuelos, o viajan o se enamoran de algún extranjero. La lectura fácil proviene con igual frecuencia de la escuela o de actividades extracurriculares de este tipo. La mayoría de quienes leen profusamente y con placer tan sólo creen que aprendieron a hacerlo en la escuela; cuando se les discute esto, descartan fácilmente este espejismo.
+
+Pero el hecho de que aún ahora gran parte del aprendizaje parece suceder al azar y como subproducto de alguna otra actividad definida como trabajo u ocio no significa que el aprendizaje planificado no beneficie la instrucción planificada. Al estudiante poderosamente motivado que se enfrenta con la tarea de adquirir una habilidad nueva y compleja puede aprovecharle mucho la disciplina que hoy en día se asocia mentalmente con el maestro de viejo cuño que antaño enseñaba lectura, hebreo, catecismo o multiplicación de memoria. La escuela ha hecho que este tipo de enseñanza rutinaria sea escasa y mal reputada; no obstante hay muchas destrezas que un estudiante motivado puede dominar en pocos meses si se le enseña de este modo tradicional. Esto vale tanto para los códigos como para su desciframiento; tanto para los segundos o terceros idiomas como para la lectura y la escritura, e igualmente para lenguajes especiales como el álgebra, la programación de computadoras, el análisis químico, o para destrezas manuales como la mecanografía, la relojería, la fontanería, las instalaciones domésticas de electricidad, la reparación de televisores, o para bailar, conducir vehículos y bucear.
+
+En algunos casos, ser aceptado en un programa de aprendizaje dirigido a una determinada habilidad podría presuponer competencia en alguna otra habilidad, pero ciertamente no se haría depender del proceso mediante el cual se hubieran adquirido tales habilidades previamente requeridas. La reparación de televisores presupone saber leer y algo de matemáticas; el bucear, ser buen nadador, y el conducir, muy poco de ambas cosas.
+
+El progreso en el aprendizaje es mensurable. Es fácil calcular los recursos óptimos de tiempo y materiales que un adulto corriente motivado necesita. El coste de enseñar un segundo idioma europeo occidental hasta un elevado nivel de fluidez oscila entre 400 y 600 dólares en Estados Unidos, y para una lengua oriental el tiempo requerido de instrucción podría duplicarse. Esto sería todavía poquísimo en comparación con el coste de 12 años de escolaridad en la ciudad de Nueva York (condición para ingresar en el Departamento de Higiene) —casi 15 000 dólares—. Sin duda no sólo el maestro, sino también el impresor y el farmacéutico protegen sus oficios mediante el espejismo público de que el adiestramiento para aprenderlos es muy costoso.
+
+En la actualidad, las escuelas se apropian de antemano de la mayor parte de los fondos para educación. La instrucción rutinaria, que cuesta menos que una escolarización comparable, es ahora un privilegio de quienes son lo bastante ricos como para pasarse por alto las escuelas, y de aquellos a quienes el ejército o las grandes firmas les proporcionan un adiestramiento en el trabajo mismo. En un programa de desescolarización progresiva para Estados Unidos, en un comienzo habría escasez de recursos para el adiestramiento rutinario. Pero finalmente no habría impedimento alguno para cualquiera que en cualquier momento de su vida quisiese elegir una instrucción entre centenares de habilidades definibles y a cargo del Estado.
+
+Ahora mismo podrían proporcionarse calificaciones educativas aceptables en cualquier centro de enseñanza de oficios en cantidades limitadas para personas de cualquier edad, y no sólo para pobres. Yo concibo dicha calificación (o crédito) en forma de un pasaporte educativo o de una “tarjeta de educrédito” entregada a cada ciudadano al nacer. A fin de favorecer a los pobres, que probablemente no usarían sus cuotas anuales a temprana edad, podría estipularse que los usuarios tardíos de tales “títulos” acumulados ganasen interés. Dichos créditos permitirían a la mayoría adquirir las habilidades de mayor demanda, cuando les conviene, de manera mejor, más rápida, más barata y con menos efectos subsidiarios desfavorables que en la escuela.
+
+Se me objetará la falta de profesores, pero esto es plantear mal el problema, pues, por una parte, la demanda de una habilidad crece sólo al ponerse en práctica en una comunidad y, por otra, un hombre que ejerza una habilidad puede también enseñarla. Pero, actualmente, aquellos que usan una habilidad que está en demanda y que precisan un profesor humano tienen estímulos negativos para compartir con otros estas habilidades. Esto lo hacen o maestros que monopolizan las licencias, o sindicatos que protegen sus intereses gremiales. Unos centros de enseñanza de oficios o habilidades a los que los clientes juzgaran por sus resultados, y no por el personal que empleasen o por el proceso que se utilizasen, abrirían oportunidades insospechables de trabajo, frecuentemente incluso para aquellos que hoy se consideran inempleables. Verdaderamente no hay motivo para que tales centros no estuviesen en el lugar mismo de trabajo; el patrono y su personal proporcionarían tanto la instrucción como trabajos a quienes eligiesen utilizar sus créditos educativos de esta manera.
+
+En 1956 se suscitó la necesidad de enseñar rápidamente español a varios centenares de maestros, trabajadores sociales y curas de la arquidiócesis de Nueva York, de modo que pudiesen comunicarse con los puertorriqueños. Mi amigo Gerry Morris anunció en español por una radioemisora que necesitaba hispanohablantes nativos que viviesen en Harlem. Al día siguiente unos 200 adolescentes se alineaban frente a su oficina; de entre ellos eligió cuatro docenas —muchos de ellos desertores escolares—. Los instruyó en el uso del Manual de Instrucción del Instituto del Servicio Exterior de Estados Unidos, para español, concebido para el uso de lingüistas con licenciatura, y al cabo de una semana sus profesores se manejaban solos —cada uno de ellos a cargo de cuatro neoyorkinos que querían hablar el idioma—. En el plazo de seis meses se había cumplido la misión. El cardenal Spellman podía afirmar que tenía 127 parroquias en cada una de las cuales había por lo menos tres miembros de su personal que podían conversar en español. Ningún programa escolar podría haber logrado iguales resultados.
+
+Los profesores de habilidades escasean por la creencia en el valor de los títulos. La certificación es una manera de manipular el mercado y es concebible sólo para una mente escolarizada. La mayoría de los profesores de artes y oficios son menos diestros, tienen menor inventiva y son menos comunicativos que los mejores artesanos y maestros. La mayoría de los profesores de español o de francés de bachillerato no hablan esos idiomas con la corrección con que lo harían alumnos después de un semestre de rutinas competentes. Unos experimentos llevados a cabo por Ángel Quintero en Puerto Rico sugieren que muchos adolescentes, si se les dan los adecuados incentivos, programas y acceso a las herramientas, son mejores que la mayoría de los maestros de escuela para iniciar a los de su edad en la exploración científica de las plantas, las estrellas y la materia, y en el descubrimiento de cómo y por qué funciona un motor o un radio.
+
+Las oportunidades para el aprendizaje de habilidades pueden multiplicarse enormemente si abrimos el “mercado”. Esto depende de reunir al maestro correcto con el alumno correcto cuando éste está altamente motivado dentro de un programa inteligente, sin la restricción del currículum.
+
+La instrucción libre y rutinaria es una blasfemia subversiva para el educador ortodoxo. Ella desliga la adquisición de destrezas de la educación “humana”, que la escuela empaca conjuntamente, y fomenta así el aprendizaje sin título no menos que la enseñanza sin título para fines imprevisibles.
+
+Hay actualmente una propuesta registrada que a primera vista parece sumamente sensata. La preparó Christopher Jencks, del Center for the Study of Public Policy, y está patrocinada por la Office of Economic Opportunity. Propone poner unos “bonos” o “títulos” educativos o donaciones, para pagar el coste de los estudios, en manos de padres y estudiantes para que los gasten en las escuelas que elijan. Tales bonos individuales podrían ser un importante avance en la dirección correcta. Necesitamos que se garantice a cada ciudadano el derecho a una parte igual de los recursos educativos derivados de los impuestos, el derecho a verificar esa parte, y el derecho a entablar juicio si le es denegada. Es una forma de garantía contra la tributación regresiva.
+
+Pero la propuesta de Jencks comienza con la ominosa declaración de que “los conservadores, los liberales y los radicales se han quejado en una u otra ocasión de que el sistema educativo estadunidense da a los educadores profesionales un incentivo demasiado pequeño para que proporcionen una educación de gran calidad a la mayoría de los niños”. La propuesta se condena sola al proponer donaciones para pagar unos estudios que tendrían que gastar en escolarizarse.
+
+Esto es como dar a un inválido un par de muletas, advirtiéndole que las use sólo si les amarra los extremos. En su forma actual, la propuesta de estos bonos educativos hace el juego no sólo a los educadores profesionales sino también a los racistas, a los promotores de escuelas religiosas y a otros cuyos intereses son socialmente disociantes. Sobre todo, los bonos educativos, cuyo uso se restrinja a las escuelas, hace el juego de quienes quieren continuar viviendo en una sociedad en la que el progreso social está ligado no al conocimiento comprobado, sino al historial de aprendizaje mediante el cual presuntamente se adquiere. Esta discriminación en favor de las escuelas que domina la exposición de Jencks sobre el refinamiento de la educación podría desacreditar uno de los principios que más perentoriamente se precisan para la reforma educativa: el retorno de la iniciativa y la responsabilidad del aprendizaje al aprendiz o a su tutor más inmediato.
+
+La desescolarización de la sociedad implica el reconocimiento de la naturaleza ambivalente del aprendizaje. La insistencia en la sola rutina podría ser un desastre; igual énfasis debe hacerse en otros tipos de aprendizaje. Pero si las escuelas son el lugar inapropiado para aprender una destreza, son lugares aún peores para adquirir una educación. La escuela realiza mal ambas tareas, en parte porque no distingue entre ellas. La escuela es ineficiente para instruir en destrezas por ser curricular. En la mayoría de las escuelas, un programa cuyo objetivo es mejorar una habilidad está siempre concatenado con otra tarea no pertinente. La historia está amarrada al derecho de usar el patio de juegos.
+
+Las escuelas son todavía menos eficientes en la creación de circunstancias que alienten el uso irrestricto, exploratorio, de habilidades adquiridas, para lo cual reservaré el término de “educación liberal”. El principal motivo es que la escuela es obligatoria y llega a convertirse en la escolaridad por la escolaridad: una estadía forzosa en compañía de profesores, que paga con el dudoso privilegio de continuar en dicha compañía. Así como la instrucción de destrezas debe ser liberada de restricciones curriculares, a la educación liberal debe desligársela de la asistencia obligatoria. Mediante dispositivos institucionales puede ayudarse tanto al aprendizaje de habilidades como a la educación encaminada a un comportamiento creativo e inventivo, pero ambas cosas son de naturaleza diferente y frecuentemente contraria.
+
+La mayoría de las destrezas pueden adquirirse y perfeccionarse mediante rutinas; porque la destreza o habilidad implica el dominio de una conducta definible y predecible. La instrucción de una destreza puede apoyarse, por consiguiente, en la simulación de las circunstancias en que se utilizará dicha destreza. En cambio, la educación en el empleo exploratorio y creativo de destrezas no puede descansar en sistemas rutinarios. La educación puede ser el resultado de la instrucción, aunque de una instrucción fundamentalmente opuesta a la rutina. Se apoya en la relación entre asociaciones que ya poseen algunas de la llaves que dan acceso a memorias almacenadas en la comunidad y por la comunidad. Se apoya en la sorpresa de la pregunta inesperada que abre nuevas puertas al cuestionario y a su asociado.
+
+El instructor de destrezas utiliza un conjunto de condiciones dadas que permiten al aprendiz desarrollar ciertas reacciones o respuestas precisas y definidas. El guía o maestro en educación se ocupa de ayudar a unos asociados a que se reúnan de modo que se dé el aprendizaje. Reúne a personas que parten de sus propias y no resueltas interrogantes. A lo más, ayuda al alumno a formular su perplejidad puesto que sólo un planteamiento claro le dará el poder de encontrar a su pareja, moverse como ella, explorar en ese momento la misma cuestión en el mismo contexto.
+
+En un comienzo parecería más difícil imaginar unos asociados o compañeros para fines educativos que hallar instructores de destrezas y compañeros para un juego. Una de las razones de que esto ocurra es el profundo temor que la escuela nos ha inculcado, un miedo que nos pone criticones. El intercambio intitulado de destrezas —a menudo destrezas inconvenientes— es más predecible y por tanto parece menos peligroso que las oportunidades ilimitadas de reunión para personas que comparten una cuestión en debate que es, en ese momento, social, intelectual y emocionalmente importante para ellas.
+
+El profesor brasileño Paulo Freire sabe esto por experiencia. Descubrió que cualquier adulto puede comenzar a leer en cosa de 40 horas si las primeras palabras que descifra están cargadas de significado político. Freire adiestra a sus maestros para trasladarse a una aldea y descubrir las palabras que designan asuntos actuales importantes, tales como el acceso a un pozo, o el interés compuesto de las deudas que han contraído con el _patrón_. Por la tarde, los aldeanos se reúnen para conversar sobre esas palabras clave. Comienzan a percatarse de que cada palabra permanece en el pizarrón incluso después de haberse desvanecido su sonido. Las letras continúan abriendo, como llaves, la realidad y haciéndola manejable como problema. Frecuentemente he presenciado cómo en unos participantes crece la conciencia social y cómo se ven impelidos a actuar políticamente con la misma velocidad con que aprenden a leer. Parecen tomar la realidad en sus manos conforme la escriben.
+
+Recuerdo a un hombre que se quejó del peso de los lápices: eran difíciles de manipular porque no pesaban como una pala, y recuerdo a otro que camino al trabajo se detuvo con sus compañeros y escribió con su azadón en el suelo la palabra de la que venía conversando: _agua_.[^n03] Desde 1962, mi amigo Freire ha pasado de exilio en exilio, principalmente porque rehúsa llevar a cabo sus sesiones en torno a palabras que hayan sido preseleccionadas por educadores aprobados y prefiere utilizar aquellas que los participantes llevan consigo a las clases.
+
+La reunión de personas con fines educativos sólo es posible cuando se han beneficiado de una verdadera escolaridad. Los que no necesitan de esa ayuda son una minoría, incluso entre aquellos que leen revistas serias. La mayoría no puede ni debe ser congregada en torno a una consigna, a una palabra, a una imagen, sino en torno a un problema elegido y definido por iniciativa de los participantes. El aprendizaje creativo, exploratorio, requiere sujetos de igual perplejidad ante los mismos términos o problemas. Las grandes universidades realizan el vano intento de aparejarlos multiplicando sus cursos y por lo general fracasan en la medida en que están ligados al currículum, a la estructura de cursos y a una administración burocrática. En las escuelas, tal como en las universidades, la mayoría de los recursos se gasta en comprar el tiempo y la motivación de un número reducido de personas para encarar problemas predeterminados en un escenario definido de forma ritual. La alternativa más radical para la escuela sería una red o servicio que diera a cada hombre la misma oportunidad de compartir sus intereses actuales con otros motivados por iguales cuestiones.
+
+Permítaseme dar, como ejemplo de mi planteamiento, una descripción de cómo podría funcionar esta “unión” intelectual en la ciudad de Nueva York. Cada hombre, en cualquier momento y a un precio mínimo, podría identificarse ante una computadora con su dirección y su número de teléfono, indicando libro, artículos, película o grabación acerca de los cuales busca un compañero con el cual conversar. En un plazo de días podría recibir por correo la lista de otros que hubieran tomado recientemente la misma iniciativa. Esta lista le permitiría concertar por teléfono una reunión con personas que inicialmente se conocerían exclusivamente por el hecho de haber solicitado un diálogo sobre el mismo tema.
+
+Juntar personas de acuerdo con el interés que tengan sobre un título dado es radicalmente simple. Permite la identificación sobre la base de un deseo mutuo de conversar sobre una afirmación registrada por un tercero, y deja al individuo la iniciativa de concertar la reunión. Normalmente se hacen tres objeciones contra esta pureza esquelética. Las recojo no sólo para esclarecer la teoría que quiero ilustrar mediante mi propuesta —pues destacan la acendrada resistencia a desescolarizar la educación, a separar el aprendizaje del control social—, sino también porque pueden ayudar a sugerir unos recursos que no se emplean ahora para fines de aprendizaje.
+
+La primera objeción es: ¿por qué no podría la identificación de cada uno basarse en una idea o en un tema de debate? Ciertamente dichos términos subjetivos podrían usarse también en un sistema informático. Los partidos políticos, Iglesias, sindicatos, clubes, centros vecinales y sociedades profesionales organizan ya sus actividades educativas de este modo y, en efecto, actúan como escuelas. Todos ellos reúnen personas con el fin de explorar ciertos “temas”, que se abordan en cursos, seminarios y planes de estudio en los que unos presuntos “intereses comunes” están preen-vasados. Dicha “reunión por tema” está, por definición, centrado en el profesor: precisa una presencia autoritaria para definir ante los participantes el punto de partida de su debate.
+
+Por el contrario, reunirse para hablar de un libro, de una película, etc., sin otra explicación que un título o una referencia, deja al autor definir el lenguaje especial, los términos y el marco de referencia dentro del cual se plantea un determinado problema o hecho, y permite a quienes acepten este punto de partida identificarse uno con otro. Por ejemplo, reunir gente en torno a la idea de “revolución cultural” conduce generalmente o a la confusión o a la demagogia. Por otra parte, reunir a quienes se interesen en ayudarse mutuamente a entender un determinado artículo de Mao, Marcuse, Freud o Goodman se inscribe en la gran tradición del aprendizaje liberal, desde los _Diálogos_ de Platón, que están construidos en torno a presuntas declaraciones de Sócrates, hasta los comentarios de Tomás de Aquino sobre Pedro Lombardo. La idea de reunir a las personas alrededor de un título es pues radicalmente diferente de la teoría sobre la que se fundaban, por ejemplo, los clubes de los “Grandes Libros”: en vez de apoyarse en la selección realizada por algunos catedráticos de Chicago, cualquier par de personas puede, como compañero de juego, elegir cualquier libro para analizarlo.
+
+La segunda objeción pregunta: ¿por qué la identificación de quienes buscan compañero no podría incluir información sobre edad, antecedentes, visión del mundo, competencia, experiencia y otras características definitorias? No hay en este caso razón alguna para que tales restricciones discriminatorias no pudiesen (y no debiesen) incorporarse en algunas de las numerosas universidades —con o sin muros— que podrían usar la reunión alrededor de títulos como el dispositivo básico para organizarse. Puedo imaginar un sistema ideal para fomentar las reuniones de personas interesadas en las que el autor del libro elegido podría estar presente o representado, o un sistema que garantice la presencia de un asesor competente, o uno al que tuviesen acceso sólo estudiantes matriculados en una facultad o escuela, o personas capaces de presentar una investigación específica sobre la obra que se discute. Cada una de estas restricciones, se me dirá, serviría a metas específicas de aprendizaje. Pero me temo que, en la mayoría de los casos, el motivo real para proponer tales restricciones es el desdén que proviene de presuponer que la gente es ignorante: los educadores quieren evitar que el ignorante se junte con el ignorante en torno a un texto que podrían no entender y que leen _sólo_ porque están interesados en él.
+
+La tercera objeción: ¿por qué no proporcionar a quienes buscan compañero una ayuda incidental que facilite sus reuniones —espacio, horarios, selección de participantes, protección—? Esto lo hacen actualmente las escuelas con toda la ineficiencia que caracteriza a las grandes burocracias. Si dejáramos la iniciativa de las reuniones a los interesados en reunirse, unas organizaciones que nadie clasifica hoy como educativas harían mucho mejor este trabajo. Pienso en dueños de restaurantes, editores, servicios de recados telefónicos, directivos de trenes suburbanos que podrían promover sus servicios al hacerlos atractivos para reuniones educativas.
+
+En una primera reunión en, digamos, un café, los interesados podrían establecer sus identidades colocando el libro en debate junto a sus tazas. Las personas que tomaran la iniciativa de concertar tales reuniones aprenderían pronto qué elementos citar para encontrarse con la gente que buscan. El riesgo de que una conversación que uno mismo ha elegido le lleve a una pérdida de tiempo, a una decepción, e incluso a un desagrado es ciertamente menor que el riesgo que corre quien solicita ingresar en una universidad. Una reunión concertada por computadora para debatir un artículo de una revista de circulación nacional, celebrada en un café de la Cuarta Avenida, no obligaría a ninguno de los participantes a permanecer en compañía de sus nuevos conocidos por más tiempo del necesario para beber una taza de café, ni tendría que encontrarse con ellos de nuevo. La probabilidad de que ello le ayudara a disipar la opacidad de la vida en una ciudad moderna, a fomentar nuevas amistades, a abrir nuevos horizontes y profundizar en un trabajo elegido, es elevada. (El hecho de que de este modo el FBI podría conseguir un registro de las reuniones y lecturas que se hacen es innegable; el que esto pueda aún preocupar a alguien en 1970 es sólo divertido para un hombre libre, quien, quiéralo o no, aporta su cuota para ahogar a los espías en las nimiedades que recolectan.)
+
+Tanto el intercambio de destrezas como el encuentro con copartícipes se fundan en el supuesto de que educación _para todos_ significa educación _por parte de todos_. No es el reclutamiento en una institución especializada, sino sólo la movilización de toda la población lo que puede conducir a una cultura popular. Los maestros titulados se han apropiado del derecho que todo hombre tiene de ejercer su competencia para aprender e instruir igualmente. La competencia del maestro está a su vez restringida a lo que pueda hacerse en la escuela. Además, el trabajo y el tiempo libre están, a consecuencia de ello, alienados el uno del otro: tanto del trabajador como del espectador se espera que lleguen al lugar de trabajo prestos a encajar en una rutina preparada para ellos. La adaptación en forma de diseño, instrucción y publicidad de un producto los moldea para desempeñar su papel de modo muy semejante a como lo hace la educación mediante la escolaridad. Una alternativa radical para una sociedad escolarizada exige no sólo mecanismos para la adquisición formal de destrezas y el uso educativo de éstas, implica un nuevo modo de encarar la educación informal o incidental.
+
+La educación incidental ya no puede regresar a las formas que el aprendizaje adoptó en la aldea o en la ciudad medieval. Mientras la sociedad tradicional se asemejaba más a un grupo de círculos concéntricos de estructuras significativas, el hombre moderno debe aprender cómo hallar significación en muchas estructuras con las que está relacionado de manera sólo marginal. En la aldea, el lenguaje, la arquitectura, el trabajo, la religión y las costumbres familiares eran compatibles entre sí, se explicaban y reforzaban mutuamente. Desarrollarse en una implicaba un desarrollo en las otras. Incluso el aprendizaje especializado era el subproducto de actividades especializadas, tales como la fabricación de zapatos o el canto de los salmos. Si un aprendiz no llegaba jamás a ser maestro o erudito, contribuía sin embargo a la fabricación de zapatos o a hacer solemnes los servicios litúrgicos. La educación no competía en tiempo ni con el trabajo ni con el ocio. Casi toda la educación era compleja, vitalicia y no planificada.
+
+La sociedad contemporánea es el resultado de diseños e intenciones conscientes, y las oportunidades educativas han de ser incorporadas a esos diseños. Ahora disminuirá la confianza que depositamos en la instrucción especializada y de tiempo completo a través de la escuela, y hemos de hallar nuevas maneras de aprender y enseñar: la calidad educativa de todas las instituciones debe aumentar una vez más. Pero ésta es una previsión muy ambigua. Podría significar que los hombres de la ciudad moderna serán cada día más las víctimas de un proceso eficaz de instrucción total y manipulación una vez que estén privados incluso del tenue asomo de independencia crítica que proporcionan hoy en día las escuelas liberales, cuando menos a algunos de sus alumnos.
+
+Podría significar también que los hombres se escudarán menos tras certificados adquiridos en la escuela y adquirirán así valor para ser “respondones” y controlar e instruir de ese modo a las instituciones en que participen. Para lograr esto último debemos darnos cuenta del valor social del trabajo y del ocio por el intercambio educativo que permiten. La participación efectiva en la política de una calle, de un puesto de trabajo o de un hospital es por lo tanto el mejor patrón para evaluar el valor de las diferentes instituciones en el plan de la educación.
+
+Hace poco dirigí la palabra a un grupo de estudiantes de los primeros años de bachillerato, empeñados en organizar un movimiento de resistencia a su enrolamiento obligatorio en la clase siguiente. Tenían por consigna “participación-no simulación”. Les decepcionaba que esto se entendiera como una petición de menos educación en vez de lo contrario, y me hicieron recordar la resistencia que opuso Karl Marx a un párrafo en el programa de Gotha que —hace 100 años— quería hacer ilegal el trabajo infantil. Se opuso a la proposición diciendo que la ecuación de los jóvenes solo podía producirse en el trabajo. Si el mayor fruto del trabajo del hombre debiera ser la educación que se deriva de éste y la oportunidad que el trabajo le da para iniciar la educación de otros, entonces la alimentación de la sociedad moderna en un sentido pedagógico es aún peor que su alienación económica.
+
+El mayor obstáculo en el camino de una sociedad que educa verdaderamente lo definió muy bien un amigo mío, negro de Chicago, quien me dijo que nuestra imaginación estaba “totalmente escuelada”. Permitimos al Estado verificar las deficiencias educativas universales de sus ciudadanos y establecer un organismo especializado para tratarlos. Compartimos así la ilusión de que podemos distinguir entre qué es educación necesaria para otros y qué no lo es, tal como generaciones anteriores establecieron leyes que definían qué era sagrado y qué profano.
+
+Durkheim reconoció que esta capacidad para dividir la realidad social en dos ámbitos era la esencia misma de la religión formal. Existen —razonó— religiones sin lo sobrenatural y religiones sin Dios, pero no hay ninguna que no subdivida el mundo en cosas, tiempo y personas que son sagradas y en otras que por consecuencia son profanas. Este penetrante alcance de Durkheim puede aplicarse a la sociología de la educación, pues la escuela es radicalmente divisoria de manera parecida.
+
+La existencia misma de las escuelas obligatorias divide cualquier sociedad en dos ámbitos: ciertos lapsos, procesos, tratamientos y profesiones son “académicos” y “pedagógicos”, y otros no lo son. Así, el poder de la escuela para dividir la realidad social no conoce límites: la educación se hace no terrenal, en tanto que el mundo se hace no educacional.
+
+A partir de Bonhoeffer, los teólogos contemporáneos han señalado la confusión que reina hoy en día entre el mensaje bíblico y la religión institucionalizada. Señalan la experiencia que la libertad y la fe cristianas suelen ganar con la secularización. Sus afirmaciones suenan inevitablemente blasfemas para muchos clérigos. En incuestionable que el proceso educativo ganará con la desescolarización de la sociedad aun cuando esta exigencia les suene a muchos escolares como una traición a la cultura. Pero es la cultura misma la que está siendo apagada hoy en las escuelas.
+
+La secularización de la fe cristiana depende de la dedicación que pongan en ello los cristianos arraigados en la Iglesia. De manera muy parecida, la desescolarización de la educación depende del liderazgo de quienes se criaron en las escuelas. El currículum que cumplieron no puede servirles como excusa para la tarea: cada uno de nosotros sigue siendo responsable de lo que se ha hecho por él, aun cuando puede que no sea capaz sino de aceptar esta responsabilidad y servir de advertencia para otros.
+
+# Fenomenología de la escuela
+
+Algunas palabras llegan a ser tan flexibles que pierden cualquier significación precisa y se usan para cualquier cosa entre éstas se cuentan “escuela” y “enseñanza”. Se filtran, como una amiba, por cualquier intersticio del lenguaje. Así, decimos que el ABM[^n04] enseñará a los rusos, la IBM enseñará a los niños negros, y el ejército puede llegar a ser la escuela de la nación.
+
+Por consiguiente, la búsqueda de alternativas en educación debe comenzar por un acuerdo acerca de lo que entendemos por “escuela”. Esto puede hacerse de varias maneras. Podemos comenzar por anotar las funciones latentes desempeñadas por los sistemas escolares modernos, tales como los de custodia, selección, adoctrinamiento y aprendizaje. Podríamos hacer un análisis de clientela y verificar cuál de estas funciones latentes favorece o desfavorece a maestros, patronos, niños, padres o a las profesiones. Podríamos repasar la historia de la cultura occidental y la información reunida por la antropología a fin de encontrar instituciones que desempeñaron un papel semejante al que hoy cumple la escolarización. Podríamos finalmente recordar los numerosos dictámenes normativos que se han hecho desde el tiempo de Comenius, o incluso desde Quintiliano, y descubrir a cuál de éstos se aproxima más el moderno sistema escolar. Pero cualquiera de estos enfoques nos obligaría a comenzar con ciertos supuestos acerca de una relación entre escuela y educación.
+
+Para crear un lenguaje en el que podamos hablar sobre la escuela sin ese incesante recurrir a la educación, he querido comenzar por algo que podría llamarse fenomenología de la escuela pública. Con este objeto definiré “escuela” como el proceso que especifica edad, se relaciona con maestros y exige asistencia de tiempo completo y un currículum obligatorio.
+
+1\. _Edad_. La escuela agrupa a las personas según sus edades. Este agrupamiento se funda en tres premisas indiscutidas. A los niños les corresponde estar en la escuela. Los niños aprenden en la escuela. A los niños puede enseñárseles solamente en la escuela. Creo que estas tres premisas no sometidas a examen merecen ser seriamente puestas en duda.
+
+Nos hemos ido acostumbrando a los niños. Hemos decidido que deberían ir a la escuela, hacer lo que se les dice y no tener ingresos propios. Esperamos que sepan el lugar que ocupan y se comporten como niños. Recordamos, ya sea con nostalgia o con amargura, el tiempo en que también fuimos niños. Se espera de nosotros que toleremos la conducta infantil de los niños. La humanidad es, para nosotros, una especie simultáneamente atribulada y bendecida con la tarea de cuidar niños. No obstante, olvidamos que nuestro actual concepto de “niñez” sólo se desarrolló recientemente en Europa occidental, y hace aún menos en América.[^n05]
+
+La niñez como algo diferente de la infancia, la adolescencia o la juventud fue algo desconocido para la mayoría de los periodos históricos. Algunos siglos del cristianismo no tuvieron ni siquiera una idea de sus proporciones corporales. Los artistas pintaban al niño como un adulto en miniatura sentado en el brazo de su madre. Los niños aparecieron en Europa junto con el reloj de bolsillo y los prestamistas cristianos del Renacimiento. Antes de nuestro siglo ni los ricos ni los pobres supieron nada acerca de vestidos para niños, juegos para niños o de la inmunidad del niño ante la ley. Esas ideas comenzaron a desarrollarse en la burguesía. El hijo del obrero, el del campesino y el del noble vestían todos como lo hacían sus padres, jugaban como éstos y eran ahorcados igual que ellos. Después de que la burguesía descubriera la “niñez”, todo esto cambió. Sólo algunas Iglesias continuaron respetando por algún tiempo la dignidad y la madurez de los menores. Hasta el Concilio Vaticano II, se le decía a cada niño que un cristiano llega a tener discernimiento moral y libertad a la edad de siete años y a partir de entonces es capaz de caer en pecados por los cuales podrá ser castigado por toda una eternidad en el infierno. A mediados de este siglo, los padres de clase media comenzaron a tratar de evitar a sus niños el impacto de esta doctrina, y su modo de pensar sobre los niños es el que hoy prevalece en la Iglesia.
+
+Hasta el siglo pasado, los “niños” de padres de clase media se fabricaban en casa con la ayuda de preceptores y escuelas privadas. Sólo con el advenimiento de la sociedad industrial la producción en masa de la “niñez” comenzó a ser factible y a ponerse al alcance de la multitud. El sistema escolar es un fenómeno moderno, como lo es la niñez que lo produce.
+
+Puesto que hoy en día la mayoría de las personas viven fuera de las ciudades industriales, la mayoría de la gente no experimenta la niñez. En los Andes, uno labra la tierra cuando ha llegado a ser “útil”. Antes de esa edad, uno cuida las ovejas. Si se está bien nutrido, debe llegar a ser útil hacia los 11 años de edad, y de otro modo a los 12. Estaba yo conversando hace poco con Marcos, mi celador nocturno, sobre su hijo de 11 años que trabaja en una barbería. Hice en español la observación de que su hijo era todavía un _niño_. Marcos, sorprendido, contestó con inocente sonrisa: “Don Iván, creo que usted tiene razón”. Percatándome de que hasta el momento de mi observación Marcos había pensado en el muchacho en primer lugar como su “hijo”, me sentí culpable de haber hecho surgir el fantasma de la niñez entre dos personas sensatas. Naturalmente que si yo fuese a decir a un habitante de los barrios bajos de Nueva York que su hijo que trabaja es todavía un “niño”, no mostraría ninguna sorpresa. Sabe muy bien que a su hijo de 11 años debería permitírsele su niñez, y se resiente de que no sea así. El hijo de Marcos no ha sido afectado aún por el anhelo de tener niñez, el hijo del neoyorkino se siente desposeído.
+
+Así pues, la mayoría de la gente en el mundo o no quiere o no puede conceder una niñez moderna a sus críos. Pero también parece que la niñez es una carga para esos pocos a quienes se les concede. A muchos simplemente se les obliga a pasar por ella y no están en absoluto felices de desempeñar el papel de niños. Crecer pasando por la niñez significa estar condenado a un proceso de conflicto inhumano entre la conciencia de sí y el papel que impone una sociedad que está pasando por su propia edad escolar. Ni Stephen Dédalus ni Alexander Portnoy gozaron de la niñez y, según sospecho, tampoco nos gustó a muchos de nosotros ser tratados como niños.
+
+Si no existiese una institución de aprendizaje obligatorio y para una edad determinada, la “niñez” dejaría de fabricarse. Los menores de los países ricos se librarían de su destructividad, y los países pobres dejarían de rivalizar con la niñería de los ricos. Para que la sociedad pudiese sobreponerse a su edad de la niñez, tendría que hacerse vivible para los menores. La disyunción actual entre una sociedad adulta que pretende ser humanitaria y un ambiente escolar que remeda la realidad no puede seguir manteniéndose.
+
+El hecho de privar de apoyo oficial a las escuelas podría terminar también con la discriminación contra los nenes, los adultos y los ancianos en favor de los niños durante su adolescencia y juventud. Es probable que la decisión social de asignar recursos educativos preferentemente a aquellos ciudadanos que han dejado atrás la extraordinaria capacidad de aprendizaje de sus primeros años y no han llegado a la cúspide de su aprendizaje automotivado parezca grotesca cuando se vea retrospectivamente.
+
+La sabiduría institucional nos dice que los niños necesitan la escuela. La sabiduría institucional nos dice que los niños aprenden en la escuela. Pero esta sabiduría institucional es en sí el producto de escuelas, porque el sólido sentido común nos dice que sólo a niños se les puede enseñar en la escuela. Sólo segregando a los seres humanos en la categoría de la niñez podremos someterlos alguna vez a la autoridad de un maestro de escuela.
+
+2\. _Profesores y alumnos_. Por definición, los niños son alumnos. La demanda por el medio ambiente escolar crea un mercado ilimitado para los profesores titulados. La escuela es una institución construida sobre el axioma de que el aprendizaje es el resultado de la enseñanza. Y la sabiduría institucional continúa aceptando este axioma, pese a las pruebas abrumadoras en sentido contrario.
+
+Todos hemos aprendido la mayor parte de lo que sabemos fuera de la escuela. Los alumnos hacen la mayor parte de su aprendizaje sin sus maestros y, a menudo, a pesar de éstos. Lo que es más trágico es que a la mayoría de los hombres las escuelas les enseñan su lección, aun cuando nunca vayan _a_ la escuela.
+
+Toda persona aprende a vivir fuera de la escuela. Aprendemos a hablar, a pensar, a amar, a sentir, a jugar, a blasfemar, a politiquear y a trabajar sin la interferencia de un profesor. Ni siquiera los niños que están día y noche bajo la tutela de un maestro constituyen excepciones a la regla. Los huérfanos, los cretinos y los hijos de maestros de escuela aprenden la mayor parte de lo que aprenden fuera del proceso “educativo” programado para ellos. Los profesores han quedado mal parados en sus intentos de aumentar el aprendizaje entre los pobres. A los padres pobres que quieren que sus hijos vayan a la escuela no les preocupa tanto lo que aprendan como el certificado y el dinero que obtendrán. Y los padres de clase media confían sus hijos a un profesor para evitar que aprendan aquello que los pobres aprenden en la calle. Las investigaciones sobre educación están demostrando cada día más que los niños aprenden aquello que sus maestros pretenden enseñarles, no de éstos, sino de sus iguales, de las tiras cómicas, de la simple observación al pasar y, sobre todo, del solo hecho de participar en el ritual de la escuela. Las más de las veces los maestros obstruyen el aprendizaje de materias de estudio conforme se dan en la escuela.
+
+La mitad de la gente en nuestro mundo jamás ha estado en una escuela. No se han topado con profesores y están privados del privilegio de llegar a ser desertores escolares. No obstante, aprenden eficazmente el mensaje que la escuela enseña: que deben tener escuela y más y más escuela. La escuela les instruye acerca de su propia inferioridad mediante el cobrador de impuestos que les hace pagar por ella, mediante el demagogo que les suscita las esperanzas de tenerla, o bien mediante sus niños cuando éstos se ven enviciados por ella. De modo que a los pobres se les quita su respeto por sí mismos al suscribirse a un credo que concede la salvación sólo a través de la escuela. La Iglesia les da al menos la posibilidad de arrepentirse en la hora de su muerte. La escuela les deja con la esperanza (una esperanza falsificada) de que sus nietos la conseguirán. Esa esperanza es, por cierto, otro aprendizaje más que proviene de la escuela, pero no de los profesores.
+
+Los alumnos jamás han atribuido a sus maestros lo que han aprendido. Tanto los brillantes como los lerdos han confiado siempre en la memorización, la lectura y el ingenio para pasar sus exámenes, movidos por el garrote o por la obtención de una carrera ambicionada.
+
+Los adultos tienden a crear fantasías románticas sobre su periodo de escuela. Atribuyen retrospectivamente su aprendizaje al maestro cuya paciencia aprendieron a admirar. Pero esos mismos adultos se preocuparán por la salud mental de un niño que corriera a casa a contarles qué ha aprendido de cada uno de sus profesores. Las escuelas crean trabajos para maestros de escuela, independientemente de lo que aprendan de ellos sus alumnos.
+
+3\. _Asistencia a jornada completa_. Cada mes veo una nueva lista de propuestas que hace al AID[^n06] alguna industria estadunidense, sugiriéndole reemplazar a los “practicantes del aula” latinoamericanos por unos disciplinados administradores de sistemas o simplemente por la televisión. Pero, aunque el profesor sea una maestra de primaria o un equipo de tipos con delantales blancos, y que logren enseñar la materia indicada en el catálogo o fracasen en el intento, el maestro profesional crea un entorno sagrado.
+
+La incertidumbre acerca del futuro de la enseñanza profesional pone al aula en peligro. Si los educadores profesionales se especializan en fomentar el aprendizaje tendrían que abandonar un sistema que exige entre 750 y 1 500 reuniones por año. Pero naturalmente los profesores hacen mucho más que eso. La sabiduría institucional de la escuela dice a los padres, a los alumnos y a los educadores que el profesor, para que pueda enseñar, debe ejercer su autoridad en un recinto sagrado. Esto es válido incluso para profesores cuyos alumnos pasan la mayor parte de su tiempo escolar en un aula sin muros.
+
+La escuela, por su naturaleza misma, tiende a reclamar la totalidad del tiempo y las energías de sus participantes. Esto a su vez hace del profesor un custodio, un predicador y un terapeuta.
+
+El maestro funda su autoridad sobre una pretensión diferente en cada uno de estos tres papeles. _El profesor-como-custodio_ actúa como maestro de ceremonias que guía a sus alumnos a lo largo de un ritual dilatado y laberíntico. Es árbitro del cumplimiento de las normas y administra las intrincadas rúbricas de iniciación a la vida. En el mejor de los casos, monta la escena para la adquisición de una habilidad como siempre han hecho los maestros de escuela. Sin hacerse ilusiones acerca de producir ningún saber profundo, somete a sus alumnos a ciertas rutinas básicas.
+
+El _profesor-como-moralista_ reemplaza a los padres, a Dios, al Estado. Adoctrina al alumno acerca de lo bueno y lo malo, no sólo en la escuela, sino en la sociedad en general. Se presenta _in loco parentis_ para cada cual y asegura así que todos se sientan hijos del mismo Estado.
+
+El _profesor-como-terapeuta_ se siente autorizado a inmiscuirse en la vida privada de su alumno a fin de ayudarle a desarrollarse como persona. Cuando esta función la desempeña un custodio y predicador, significa por lo común que persuade al alumno a someterse a una domesticación de su visión de la verdad y de su sentido de lo justo.
+
+La afirmación de que una sociedad liberal puede basarse en la escuela moderna, es paradójica. Todas las defensas de la libertad individual quedan anuladas en los tratos de un maestro de escuela con su alumno. Cuando el maestro funde en su persona las funciones de juez, ideólogo y médico, el estilo fundamental de la sociedad es pervertido por el proceso mismo que debiera preparar para la vida. Un maestro que combine estos tres poderes contribuye mucho más a la deformación del niño que las leyes que dictan su menor edad legal o económica, o que restringen su libertad de reunión o de vivienda.
+
+Los maestros no son en absoluto los únicos en ofrecer servicios terapéuticos. Los psiquiatras, los consejeros vocacionales y laborales, y hasta los abogados ayudan a sus clientes a decidir, a desarrollar sus personalidades y a aprender. Pero el sentido común le dice al cliente que dichos profesionales deben abstenerse de imponer sus opiniones sobre lo bueno y lo malo, o de obligar a nadie a seguir su consejo. Los maestros de escuelas y los curas son los únicos profesionales que se sienten con derecho para inmiscuirse en los asuntos privados de sus clientes al mismo tiempo que predican a un público obligado.
+
+Los niños no están protegidos ni por la Primera ni por la Quinta Enmienda[^n07] cuando están frente a ese sacerdote secular, el profesor. El niño tiene que enfrentarse con un hombre que usa una triple corona invisible y que, como la tiara papal, es el símbolo de la triple autoridad conjugada en una persona. Para el niño, el maestro pontifica como pastor, profeta y sacerdote —es a un mismo tiempo guía, maestro y administrador de un ritual sagrado—. Conjuga las pretensiones de los papas medievales en una sociedad constituida bajo la garantía de que tales pretensiones no serán jamás ejercidas conjuntamente por una institución establecida y obligatoria —la Iglesia o el Estado—.
+
+Definir a los niños como alumnos a jornada completa permite al profesor ejercer sobre sus personas una especie de poder que está mucho menos limitado por restricciones constitucionales o consuetudinarias que el poder detentado por el guardián de otros enclaves sociales. La edad cronológica de los niños los descalifica respecto de las salvaguardas que son de rutina para adultos situados en un asilo moderno —un manicomio, un monasterio o una cárcel—.
+
+Bajo la mirada autoritaria del maestro, los valores se confunden y las diferencias se borran. Las distinciones entre moralidad, legalidad y valor personal se difuminan y eventualmente se eliminan. Se hace sentir cada transgresión como un delito múltiple. Se cuenta con que el delincuente sienta que ha quebrantado una norma, que se ha comportado de modo inmoral y se ha abandonado. A un alumno que ha conseguido hábilmente ayuda en un examen se le dice que es un delincuente, un corrompido y un mequetrefe.
+
+La asistencia a clases saca a los niños del mundo cotidiano de la cultura occidental y los sumerge en un ambiente mucho más primitivo, mágico y mortalmente serio. La escuela no podría crear un enclave como éste, dentro del cual se suspende físicamente a los menores durante muchos años sucesivos de las normas de la realidad ordinaria, si no tuviera el poder de encarcelar físicamente a los menores durante esos años en su territorio sagrado. La norma de asistencia posibilita que el aula sirva de útero mágico, del cual el niño es dado periódicamente a luz al terminar el día escolar y el año escolar, hasta que es finalmente lanzado a la vida adulta. Ni la niñez universalmente prolongada ni la atmósfera sofocante del aula podrían existir sin las escuelas. Sin embargo, las escuelas, como canales obligatorios de aprendizaje, podrían existir sin ninguna de ambas y ser más represivas y destructivas que todo lo que hayamos podido conocer hasta la fecha. Para entender lo que significa desescolarizar la sociedad y no tan sólo reformar el sistema educativo establecido, debemos concentrarnos ahora en el currículum oculto de la escolarización. No nos ocupamos en este caso, y directamente, del currículum oculto de las calles del gueto, que deja marcado al pobre, o del currículum camuflado de salón, que beneficia al rico. Nos interesa más bien llamar la atención sobre el hecho de que el ceremonial o ritual de la escolarización misma constituye un currículum escondido de este tipo. Incluso el mejor de los maestros no puede proteger del todo a sus alumnos contra él. Este currículum oculto de la escolarización añade inevitablemente prejuicio y culpa a la discriminación que una sociedad practica contra algunos de sus miembros y realza el privilegio de otros con un nuevo título con el cual tener en menos a la mayoría. De modo igualmente inevitable, este currículum oculto sirve como ritual de iniciación a una sociedad de consumo orientada hacia el crecimiento, tanto para ricos como para pobres.
+
+# Ritualización del progreso
+
+El graduado en una universidad ha sido escolarizado para cumplir un servicio selectivo entre los ricos del mundo sean cuales fueren sus afirmaciones de solidaridad con el Tercer Mundo, cada estadunidense que ha conseguido su título universitario ha tenido una educación que cuesta una cantidad cinco veces mayor que los ingresos medios de toda una vida en el seno de la mitad desheredada de la humanidad. A un estudiante latinoamericano se le introduce en esta exclusiva fraternidad acordándole para su educación un gasto por lo menos 350 veces mayor que el de sus conciudadanos de clase media. Salvo muy raras excepciones, el graduado universitario de un país pobre se siente más a gusto con sus colegas norteamericanos o europeos que con sus compatriotas no escolarizados, y a todos los estudiantes se les somete a un proceso académico que les hace sentirse felices sólo en compañía de otros consumidores de los productos de la máquina educativa.
+
+La universidad moderna sólo confiere el privilegio de disentir a aquellos que han sido comprobados y clasificados como fabricantes de dinero o detentadores de poder en potencia. A nadie se le conceden fondos provenientes de impuestos para que tengan así tiempo libre para autoeducarse o el derecho de educar a otros, a menos que al mismo tiempo puedan certificarse sus logros. Las escuelas eligen para cada nivel superior sucesivo a aquellos que en las primeras etapas del juego hayan demostrado ser buenos riesgos[^n08] para el orden establecido. Al tener un monopolio sobre los recursos para el aprendizaje y sobre la investidura de los papeles por desempeñar en la sociedad, la universidad invita a sus filas al descubridor y al disidente en potencia. Un grado siempre deja su tinta indeleble con el precio en el currículum de su consumidor. Los graduados universitarios diplomados encajan sólo en un mundo que pone un marbete con el precio en sus cuellos dándoles así el poder de pertenecer a un mundo donde todo recibe un valor mercantil. En cada país, el monto que consume el graduado universitario fija la pauta para todos los demás; si fueran gente civilizada con trabajo o cesantes habrán de aspirar al estilo de vida de los graduados universitarios.
+
+De este modo, la universidad tiene por efecto imponer normas de consumo en el trabajo o en el hogar, y lo hace en todo el mundo y bajo todos los sistemas políticos. Cuanto menos graduados universitarios hay en un país, tanto más sirven de modelo para el resto de la población sus ilustradas exigencias. La brecha entre el consumo de un graduado universitario y el de un ciudadano corriente es incluso más ancha en Rusia, China y Argelia que en Estados Unidos. Los coches, los viajes en avión y los magnetófonos confieren una distinción más notoria en un país socialista en donde únicamente un título, y no tan sólo el dinero, puede procurarlos.
+
+La capacidad de la universidad para fijar metas de consumo es algo nuevo. En muchos países la universidad adquirió este poder sólo en la década de los años sesenta, conforme la ilusión de acceso parejo a la educación pública comenzó a difundirse. Antes de entonces la universidad protegía la libertad de expresión de un individuo, pero no convertía automáticamente su conocimiento en riqueza. Durante la Edad Media, ser un estudioso significaba ser pobre y hasta mendicante. En virtud de su vocación, el estudioso medieval aprendía latín, se convertía en un _outsider_ digno tanto de la mofa como de la estimación del campesino y del príncipe, del burgués y del clérigo.
+
+Para triunfar en el mundo, el escolástico tenía que ingresar primero en él, entrando en la carrera funcionaria, preferiblemente la eclesiástica. La universidad antigua era una zona liberada para el descubrimiento y el debate de ideas nuevas y viejas. Los maestros y los estudiantes se reunían para leer los textos de otros maestros, muertos mucho antes, y las palabras vivas de los maestros difuntos daban nuevas perspectivas a las falacias del mundo presente. La universidad era entonces una comunidad de búsqueda académica y de inquietud endémica.
+
+En la universidad multidisciplinaria moderna esta comunidad ha huido hacia las márgenes, en donde se junta en un apartamento, en la oficina de un profesor o en los aposentos del capellán. El propósito estructural de la universidad moderna guarda poca relación con la búsqueda tradicional. Desde los días de Gutenberg, el intercambio de la indagación disciplinada y crítica se ha trasladado en su mayor parte de la “cátedra” a la imprenta. La universidad moderna ha perdido por incumplimiento su posibilidad de ofrecer un escenario simple para encuentros que sean autónomos y anárquicos, enfocados hacia un interés y sin embargo espontáneos y vivaces, y ha elegido en cambio administrar el proceso mediante el cual se produce lo que ha dado en llamarse investigación y enseñanza.
+
+Desde el _Sputnik_ , la universidad estadunidense ha estado tratando de ponerse a la par con el número de graduados que sacan los soviéticos. Ahora los alemanes están abandonando su tradición académica y están construyendo unos _campus_ para ponerse a la par con los estadunidenses. Durante esta década quieren aumentar sus erogaciones en escuelas primarias y secundarias de 14 000 a 59 000 millones de marcos alemanes y triplicar los desembolsos para la instrucción superior. Los franceses se proponen elevar para 1980 a 10% de su PNB el monto gastado en escuelas, y la Fundación Ford ha estado empujando a países pobres de América Latina a elevar sus desembolsos per cápita para los graduados “respetables” a los niveles estadunidenses. Los estudiantes consideran sus estudios como la inversión que produce el mayor rédito monetario, y las naciones los ven como un factor clave para el desarrollo.
+
+Para la mayoría que va en pos de un grado universitario, la universidad no ha perdido prestigio, pero desde 1968 ha perdido notoriamente categoría entre sus creyentes. Los estudiantes se niegan a prepararse para la guerra, la contaminación y la perpetuación del prejuicio. Los profesores les ayudan en su recusación de la legitimidad del gobierno, de su política exterior, de la educación y del sistema de vida norteamericano. No pocos rechazan títulos y se preparan para una vida en una contracultura, fuera de la sociedad diplomada. Parecen elegir la vía de los Fraticelli medievales o de los Alumbrados de la Reforma, que fueron los _hippies_ y desertores escolares de su época. Otros reconocen el monopolio de las escuelas sobre los recursos que ellos necesitan para construir una contrasociedad. Buscan apoyo el uno en el otro para vivir con integridad mientras se someten al ritual académico. Forman, por así decirlo, focos de herejía en medio de la jerarquía.
+
+No obstante, grandes sectores de la población general miran al místico moderno y al heresiarca moderno con alarma. Éstos amenazan la economía consumista, el privilegio democrático y la imagen que de sí mismo tiene Estados Unidos. Pero no es posible eliminarlos con sólo desearlo. Son cada vez menos aquellos a los que es posible reconvertir y reincorporar en las filas mediante sutilezas —como, por ejemplo, darles el cargo de enseñar como profesores su herejía—. De aquí la búsqueda de medios que hagan posible ya sea librarse de disidentes, ya sea disminuir la importancia de la universidad que les sirve de base para protestar.
+
+A los estudiantes y a la facultad que ponen en tela de juicio la legitimidad de la universidad, y lo hacen pagando un alto costo personal, no les parece por cierto estar fijando normas de consumo ni favoreciendo un sistema determinado de producción. Aquellos que han fundado grupos tales como el Committee of Concerned Asian Scholars y el North American Congress of Latin America (NACLA) han sido de los más eficaces para cambiar radicalmente la visión que millones de personas jóvenes tenían de países extranjeros. Otros más han tratado de formular interpretaciones marxistas de la sociedad norteamericana o han figurado entre los responsables de la creación de comunas. Sus logros dan nuevo vigor al argumento de que la existencia de la universidad es necesaria para una crítica social sostenida.
+
+No cabe duda de que en este momento la universidad ofrece una combinación singular de circunstancias que permite a algunos de sus miembros criticar el conjunto de la sociedad. Proporciona tiempo, movilidad, acceso a los iguales y a la información, así como cierta impunidad —privilegios de que no disponen igualmente otros sectores de la población—. Pero la universidad permite esta libertad sólo a quienes ya han sido profundamente iniciados en la sociedad de consumo y en la necesidad de alguna especie de escolaridad pública obligatoria.
+
+El sistema escolar de hoy en día desempeña la triple función que ha sido común a las Iglesias poderosas a lo largo de la historia. Es simultáneamente el depósito del mito de la sociedad, la institucionalización de las contradicciones de ese mito y el lugar donde ocurre el ritual que reproduce y encubre las disciplinas entre el mito y la realidad. El sistema escolar, y en particular la universidad, proporciona hoy grandes oportunidades para criticar el mito y para rebelarse contra las perversiones institucionales. Pero el ritual que exige tolerancia para con las contradicciones fundamentales entre mito e institución pasa todavía por lo general sin ponerse en tela de juicio, pues ni la crítica ideológica ni la acción social pueden dar a luz una nueva sociedad. Sólo el desencanto del ritual social central, el desligarse del mismo y reformarlo pueden llevar a cabo un cambio radical.
+
+La universidad estadunidense ha llegado a ser la etapa final del rito de iniciación más global que el mundo haya conocido. Ninguna sociedad histórica ha logrado sobrevivir sin ritual o mito, pero la nuestra es la primera que ha necesitado una iniciación tan aburrida, morosa, destructiva y costosa a su mito. La civilización mundial contemporánea es también la primera que estimó necesario racionalizar su ritual fundamental de iniciación en nombre de la educación. No podemos iniciar una reforma de la educación a menos que entendamos primero que ni el aprendizaje individual ni la igualdad social pueden acrecentarse mediante el ritual de la escolarización. No podremos ir más allá de la sociedad de consumo a menos que entendamos primero que las escuelas públicas obligatorias reproducen inevitablemente dicha sociedad, independientemente de lo que se enseñe en ellas.
+
+El proyecto de desmitologización que propongo no puede limitarse tan sólo a la universidad. Cualquier intento de reformar la universidad sin ocuparse del sistema del que forma parte integral es como tratar de hacer la reforma urbana en Nueva York, desde el piso decimosegundo hacia arriba. La mayor parte de las reformas introducidas en la enseñanza superior, equivalen a rascacielos construidos sobre chozas. Sólo una generación que se críe sin escuelas obligatorias será capaz de recrear la universidad.
+
+
+## El mito de los valores institucionalizados
+
+La escuela inicia asimismo el Mito del Consumo Sin Fin. Este mito moderno se funda en la creencia según la cual el sistema de producción produce inevitablemente algo de valor y que, por consiguiente, la producción produce necesariamente demanda. La escuela nos enseña que la instrucción produce aprendizaje. La existencia de las escuelas produce la demanda de escolaridad. Una vez que hemos aprendido a necesitar la escuela, todas nuestras actividades tienden a tomar la forma de relaciones de clientes respecto de otras instituciones especializadas. Una vez que se ha desacreditado al hombre o a la mujer autodidactos, toda actividad no profesional se hace sospechosa. En la escuela se nos enseña que el resultado de la asistencia es un aprendizaje valioso; que el valor del aprendizaje aumenta con el monto de la información de entrada y, finalmente, que este valor puede medirse y documentarse mediante grados y diplomas.
+
+De hecho, el aprendizaje es la actividad humana que menos manipulación de terceros necesita. La mayor parte del aprendizaje no es la consecuencia de una instrucción. Es más bien el resultado de una participación a la que no se estorba en un entorno significativo. La mayoría de la gente aprende mejor “metiendo la cuchara” y, sin embargo, la escuela les hace identificar su desarrollo cognoscitivo personal con una programación y una manipulación complicadas.
+
+Una vez que un hombre o una mujer ha aceptado la necesidad de la escuela, es presa fácil de otras instituciones. Una vez que los jóvenes han permitido que a su imaginación la forme la instrucción curricular, están condicionados para las planificaciones institucionales de toda especie. La “institución” les ahoga el horizonte imaginativo. No se les puede traicionar, sólo engañar en el precio, porque se les ha enseñado a reemplazar la esperanza por las expectativas. Para bien o para mal, ya no serán sorprendidos por terceros, pues se les ha enseñado qué pueden esperar de cualquier otra persona que ha sido enseñada como ellos. Esto es válido para el caso de otra persona o de una máquina.
+
+Esta transferencia de responsabilidad desde sí mismo a una institución garantiza la regresión social, especialmente desde el momento en que se ha aceptado como una obligación. Así, los rebeldes contra el _Alma Mater_ a menudo “la consiguen” e ingresan en su facultad en vez de desarrollar la valentía de infectar a otros con su enseñanza personal y de asumir la responsabilidad de las consecuencias de tal enseñanza. Esto sugiere la posibilidad de una nueva historia de Edipo —Edipo Profesor, que “consigue” a su madre a fin de engendrar hijos de ella—. El hombre adicto a ser enseñado busca su seguridad en la enseñanza compulsiva. La mujer que experimenta su conocimiento como el resultado de un proceso quiere reproducirlo en otros.
+
+
+## El mito de la medición de los valores
+
+Los valores institucionalizados que infunde la escuela son valores cuantificados. La escuela inicia a los jóvenes en un mundo en el que todo puede medirse, incluso su imaginación y hasta el hombre mismo.
+
+Pero el desarrollo personal no es una entidad mensurable. Es crecimiento en disensión disciplinada, que no puede medirse respecto a ningún cartabón, a ningún currículum, ni compararse con lo logrado por algún otro. En ese aprendizaje podemos emular a otros sólo en el empeño imaginativo, y seguir sus huellas más bien que remedar sus maneras de andar. El aprendizaje que yo aprecio es una recreación inmensurable.
+
+Las escuelas pretenden desglosar el aprendizaje en “materias”, para incorporar en el alumno un currículum hecho con estos ladrillos prefabricados y para medir el resultado con una escala internacional. Las personas que se someten a la norma de otros para la medida de su propio desarrollo personal pronto se aplican el mismo cartabón a sí mismos. Ya no es necesario ponerlos en su lugar, pues se colocan solos en sus casilleros correspondientes, se comprimen en el nicho que se les ha enseñado a buscar y, en el curso de este mismo proceso, colocan asimismo a sus prójimos en sus lugares, hasta que todo y todos encajan.
+
+Las personas que han sido escolarizadas hasta su talla dejan que la experiencia no mensurada se les escape entre los dedos. Para ellas, lo que no puede medirse se hace secundario, amenazante. No es necesario robarles su creatividad. Con la instrucción, han desaprendido a “hacer” lo suyo o a “ser” ellas mismas, y valoran sólo aquello que ha sido fabricado o podría fabricarse.
+
+Una vez que se ha escolarizado a las personas con la idea de que los valores pueden producirse y medirse, tienden a aceptar toda clase de clasificaciones jerárquicas. Existe una escala para el desarrollo de las naciones, otra para la inteligencia de los nenes, e incluso el avance hacia la paz puede medirse según un recuento de personas. En un mundo escolarizado, el camino hacia la felicidad está pavimentado con un índice de precios para el consumidor.
+
+
+## El mito de los valores envasados
+
+La escuela vende currículum: un atado de mercancías hecho con el mismo proceso y con la misma estructura que cualquier otra mercancía. La producción del currículum para la mayoría de las escuelas comienza con la investigación presuntamente científica; fundados en ella los ingenieros de la educación predicen la demanda futura y las herramientas para la línea de montaje, dentro de los límites establecidos por presupuestos y tabúes. El distribuidor-profesor entrega el producto terminado al consumidor-alumno, cuyas reacciones son cuidadosamente estudiadas y tabuladas a fin de proporcionar datos para la investigación que servirán para preparar el modelo siguiente que podrá ser “desgraduado”, “concebido para alumnado”, “concebido para un trabajo en equipo”, “con ayudas visuales” o “centrado en temas”.
+
+El resultado del proceso de producción de un currículum se asemeja a cualquier otro artículo moderno de primera necesidad. Es un paquete de significados planificados, una mercancía cuyo “atractivo equilibrado” la hace comercializable para una clientela lo bastante grande como para justificar su elevado coste de producción. A los consumidores-alumnos se les enseña a ajustar sus deseos a valores comercializables. De modo que se les hace sentir culpables si no se comportan en conformidad con los resultados de los análisis de mercado y si no obtienen los grados y diplomas que los colocarán en la categoría laboral que se les ha inducido a esperar.
+
+Los educadores pueden justificar unos currícula más costosos fundándose en lo que han observado, a saber, que las dificultades de aprendizaje se elevan en proporción al costo del currículum. Ésta es una aplicación de aquella ley de Parkinson que dice que una labor se expande junto con los recursos disponibles para ejecutarla. Esta ley puede verificarse en todos los niveles de la escuela: por ejemplo, las dificultades de lectura han sido un tema principal de debate en que los grados per cápita en ellas se han aproximado a los niveles estadunidenses de 1950 —año en el cual las dificultades para aprender a leer llegaron a ser tema de importancia en las escuelas de Estados Unidos.
+
+De hecho, los estudiantes saludables redoblan su resistencia a la enseñanza conforme se ven más cabalmente manipulados. Su resistencia no se debe al estilo autoritario de una escuela pública o al estilo seductor de algunas escuelas libres, sino al planteamiento fundamental común a todas las escuelas —la idea de que el juicio de una persona debiera determinar qué y cuándo debe aprender otra persona—.
+
+
+## El mito del progreso que se perpetúa a sí mismo
+
+Los crecientes costes per cápita de la instrucción, aun cuando vayan acompañados por réditos de aprendizaje decrecientes, aumentan paradójicamente el valor del alumno o alumna ante sus propios ojos y su valor en el mercado. La escuela, casi al coste que sea, iza a empellones al alumno hasta el nivel del consumo curricular competitivo, hasta meterlo en el progreso hacia unos niveles cada vez más elevados. Los gastos que motivan al alumno a permanecer en la escuela se desbocan conforme asciende la pirámide. En niveles más altos adoptan el disfraz de nuevos estadios de futbol o programas llamados de Educación Internacional. Aunque no enseña ninguna otra cosa, la escuela enseña al menos el valor de la escalada: el valor de la manera estadunidense de hacer las cosas.
+
+La guerra de Vietnam se ajusta a la lógica prevaleciente. Su éxito se ha medido por el número de personas efectivamente tratadas con balas baratas descargadas a un coste inmenso, y a este cálculo salvaje se le llama desvergonzadamente “recuento de cuerpos”. Así como los negocios son los negocios, la acumulación inacabable de dinero, así también la guerra es el matar, la acumulación inacabable de cuerpos muertos. De manera semejante, la educación es escolarización, y este proceso sin término se cuenta en alumnos-hora. Los diferentes procesos son irreversibles y se justifican por sí mismos. Según las normas económicas, el país se hace cada vez más rico. Según las normas de la contabilidad mortal, la nación continúa ganando perennemente sus guerras. Y conforme a las normas escolares, la población se va haciendo cada vez más educada.
+
+El programa escolar está hambriento de un bocado cada vez mayor de instrucción, pero aun cuando esta hambre conduzca a una absorción sostenida, nunca da el gozo de saber algo a satisfacción. Cada tema llega envasado con la instrucción de continuar consumiendo una “oferta” tras otra, y el envase del año anterior es siempre anticuado para el consumidor del año en curso. El fraudulento negocio de los libros de texto está construido sobre esta demanda. Los reformadores de la educación prometen a cada generación lo último y lo mejor, y al público se le escolariza para pedir lo que ellos ofrecen. Tanto el desertor, a quien se le hace recordar a perpetuidad lo que se perdió, como el graduado, a quien se le hace sentir inferior a la nueva casta de estudiantes, saben exactamente dónde están situados en el ritual de engaños crecientes, y continúan apoyando una sociedad que, para denominar la brecha cada vez más ancha de frustración, usa el eufemismo de “revolución de expectativas crecientes”.
+
+Pero el crecimiento concebido como un consumo sin términos —el progreso eterno— no puede conducir jamás a la madurez. El compromiso con un ilimitado aumento cuantitativo vicia la posibilidad de un desarrollo orgánico.
+
+
+## El juego ritual y la nueva religión mundial
+
+En las naciones desarrolladas, la edad para salir de la escuela excede el aumento de los años de vida probable. Dentro de una década se cortarán ambas curvas y crearán un problema para Jessica Mitford y para los profesionales que se interesan por la “educación terminal”. Me hace recordar la Edad Media tardía, cuando la demanda por los servicios de la Iglesia sobrepasó la duración de la vida, y se creó el “purgatorio” para purificar a las almas bajo el control papal antes de que pudiesen ingresar en la paz eterna. Lógicamente, esto condujo primero a un tráfico de indulgencias y luego a un intento de Reforma. El Mito del Consumo Sin Fin ocupa ahora el lugar de la creencia en la vida eterna.
+
+Arnold Toynbee señaló que la decadencia de una gran cultura suele ir acompañada por el surgimiento de una nueva Iglesia Universal que lleva la esperanza al proletariado interior mientras atiende al mismo tiempo las necesidades de una nueva casta guerrera. La escuela parece eminentemente apta para ser la Iglesia Universal de nuestra decadente cultura. Ninguna institución podría ocultar mejor a sus participantes la profunda discrepancia entre los principios sociales y la realidad social en el mundo de hoy. Secular, científica y negadora de la muerte, se ciñe estrechamente al ánimo moderno. Su apariencia clásica, crítica, la hace aparecer, si no antirreligiosa, al menos pluralista. Su currículum define la ciencia y la define a ella misma mediante la llamada investigación científica. Nadie completa la escuela —todavía—. No cierra sus puertas a nadie sin antes ofrecerle una oportunidad más: educación de recuperación, para adultos y de continuación.
+
+La escuela sirve como una eficaz creadora y preservadora del mito social debido a su estructura como juego ritual de promociones graduadas. La introducción a este ritual es mucho más importante que el asunto enseñado o el cómo se enseña. Es el juego mismo el que escolariza, el que se mete en la sangre y se convierte en hábito. Se inicia a una sociedad entera en el Mito del Consumo Sin Fin de servicios. Esto ocurre hasta tal punto que la formalidad de participar en el ritual sin término se hace obligatoria y compulsiva por doquier. La escuela ordena una rivalidad ritual en forma de juego internacional que obliga a los competidores a achacar los males del mundo a aquellos que no pueden o no quieren jugar. La escuela es un ritual de iniciación que introduce al neófito en la sagrada carrera del consumo progresivo, un ritual propiciatorio cuyos sacerdotes académicos son mediadores entre los creyentes y los dioses del privilegio y del poder, un ritual de expiación que sacrifica a sus desertores, marcándolos a fuego como chivos expiatorios del subdesarrollo.
+
+Incluso aquellos que en el mejor de los casos pasan unos pocos años en la escuela —y éste es el caso de la abrumadora mayoría en América Latina, Asia y África— aprenden a sentirse culpables debido a su subconsumo de escolarización. En México es obligatorio aprobar seis grados de escuela. Los niños nacidos en el tercio económico inferior tienen sólo dos posibilidades sobre tres de aprobar el primer grado. Si lo aprueban, tienen cuatro probabilidades sobre 100 de terminar la escolaridad obligatoria en el sexto grado. Si nacen en el tercio medio, sus probabilidades aumentan a 12 sobre 100. Con estas pautas, México ha tenido más éxito que la mayoría de las otras 26 repúblicas latinoamericanas en cuanto a proporcionar educación pública.
+
+Todos los niños saben, en todas partes, que se les ha dado una posibilidad, aunque desigual, en una lotería obligatoria, y la supuesta igualdad de la norma internacional realza ahora la pobreza original de esos niños con la discriminación autoinfligida que el desertor acepta. Se les ha escolarizado en la creencia de las expectativas crecientes y pueden racionalizar ahora su creciente frustración fuera de la escuela aceptando el rechazo de la gracia escolástica que les ha caído en suerte. Se les expulsa del paraíso porque, habiendo sido bautizados, no fueron a la Iglesia. Nacidos en pecado original, se les bautiza en el primer grado, pero van al Gehenna (que en hebreo significa “conventillo”) debido a sus faltas personales. Así como Max Weber examinó los efectos sociales de la creencia en que la salvación pertenecía a quienes acumulaban riqueza, podemos observar ahora que la gracia está reservada para aquellos que acumulan años de escuela.
+
+
+## El reino venidero la universalización de las expectativas
+
+La escuela conjuga las expectativas del consumidor expresadas en sus pretensiones, con las creencias del productor expresadas en su ritual. Es una expresión litúrgica del _cargocult_[^n09] que recorrió la Melanesia en la década de 1940-1950, que inyectaba en sus cultores la creencia de que si se colocaban una corbata negra sobre el torso desnudo, Jesús llegaría en un vapor trayendo una nevera, un par de pantalones y una máquina de coser para cada creyente.
+
+La escuela funde el crecimiento en humillante dependencia de un maestro con el crecimiento en el vano sentido de omnipotencia que es tan típico del alumno que quiere ir a enseñar a todas las naciones a salvarse. El ritual está moldeado según los severos hábitos de trabajo de los obreros de la construcción, y su finalidad es celebrar el mito de un paraíso terrestre de consumo sin fin, que es la única esperanza del desgraciado y el desposeído.
+
+A lo largo de la historia ha habido epidemias de insaciables expectativas en este mundo, especialmente entre grupos colonizados y marginales en todas las culturas. Los judíos tuvieron durante el Imperio romano sus Esenios y Mesías judíos, los siervos en la Reforma tuvieron su Thomas Münzer, los desposeídos indios desde el Paraguay hasta Dakota sus contagiosos bailarines. Estas sectas estaban siempre dirigidas por un profeta, y limitaban sus promesas a unos pocos elegidos. En cambio la espera del reino a que induce la escuela es impersonal más que profética, y universal más que local. El hombre ha llegado a ser el ingeniero de su propio Mesías y promete las limitadas recompensas de la ciencia a aquellos que somete a una progresiva tecnificación para su reino.
+
+
+## La nueva alienación
+
+La escuela no sólo es la Nueva Religión Mundial. Es también el mercado de trabajo de crecimiento más veloz del mundo. La tecnificación de los consumidores ha llegado a ser el principal sector de crecimiento de la economía. Conforme el coste de la producción disminuye en las naciones ricas, se produce una concentración creciente de capital y trabajo en la vasta empresa de equipar al hombre para un consumo disciplinario. Durante la década pasada las inversiones de capital relacionadas directamente con el sistema escolar aumentaron con velocidad incluso mayor que los gastos para defensa. El desarme tan sólo aceleraría el proceso por el cual la industria del aprendizaje se encamina al centro de la economía nacional. La escuela proporciona oportunidades ilimitadas para el derroche legitimizado, mientras su destructividad pasa inadvertida y crece el coste de los paliativos.
+
+Si a quienes asisten a jornada completa agregamos los que enseñan a jornada completa, nos percatamos de que esta llamada superestructura ha llegado a ser el principal patrono de la sociedad. En Estados Unidos hay 62 millones en la escuela y 80 millones trabajando en otras cosas. Esto a menudo lo han olvidado los analistas neomarxistas cuando dicen que el proceso de desescolarización debe posponerse o dejarse pendiente hasta que otros desórdenes, considerados tradicionalmente como más importantes, los haya corregido una revolución económica y política. Pero hay que comprender que la escuela es una industria antes de querer edificar una estrategia revolucionaria realista. Para Marx, el coste de producir las demandas de bienes apenas si era significativo. Actualmente, la mayor parte de la mano de obra está empleada en la producción de demandas que puede satisfacer la industria que hace un uso intenso del capital. La mayor parte de este trabajo se realiza en la escuela.
+
+En el esquema tradicional, la alienación era una consecuencia directa de que el trabajo se convirtiera en labor asalariada que privaba al hombre de su oportunidad para crear y recrearse. Ahora a los menores los prealienan las escuelas que los aíslan del mundo mientras juegan a ser productores y consumidores de su propio conocimiento, al que se concibe como una mercancía en el mercado en la escuela. La escuela hace de la alienación una preparación para la vida, privando así a la educación de realidad y al trabajo de creatividad. La escuela prepara para la alienante institucionalización de la vida al enseñar la necesidad de ser enseñado. Una vez que se aprende esta lección, la gente pierde su incentivo para desarrollarse con independencia; ya no encuentra atractivos en relacionarse y se cierra a las sorpresas que la vida ofrece cuando no está predeterminada por la definición institucional. La escuela emplea directa o indirectamente a una mayor parte de la población. La escuela o bien guarda a la gente de por vida o asegura el que encaje en alguna otra institución.
+
+La Nueva Iglesia Mundial es la industria del conocimiento, proveedora de opio y banco de trabajo durante un número creciente de años de la vida de un individuo. La desescolarización es por consiguiente fundamental para cualquier movimiento de liberación del hombre.
+
+
+## La potencialidad revolucionaria de la desescolarización
+
+La escuela no es de ningún modo, por cierto, la única institución moderna cuya finalidad primaria es moldear la visión de la realidad en el hombre. El currículum escondido de la vida familiar, de la conscripción militar, del llamado profesionalismo o de los medios informativos desempeña un importante papel en la manipulación institucional de la visión del mundo que tiene el hombre, de su lenguaje y de sus demandas. Pero la escuela esclaviza más profunda y sistemáticamente, puesto que sólo a ella se le acredita la función principal de formar el juicio crítico y, paradójicamente, trata de hacerlo haciendo que el aprender sobre sí mismo, sobre los demás y sobre la naturaleza dependa de un proceso preempacado. La escuela nos alcanza de manera tan íntima que ninguno puede esperar liberarse de ella mediante algo externo.
+
+Muchos de los que se autodenominan revolucionarios son víctimas de la escuela. Incluso ven la “liberación” como el producto de algo institucional. Sólo al librarse uno mismo de la escuela se disipa esa ilusión. El descubrimiento de que la mayor parte del aprendizaje no requiere enseñanza no puede ser ni manipulado ni planificado. Cada uno de nosotros es responsable de su propia desescolarización, y sólo nosotros tenemos el poder de hacerlo. No puede excusarse a nadie si no logra liberarse de la escolarización. El pueblo no pudo liberarse de la Corona sino hasta que al menos algunos de ellos se liberaron de la Iglesia establecida. No pueden liberarse del consumo progresivo hasta que no se liberen de la escuela obligatoria.
+
+Todos estamos metidos en la escolarización, tanto desde el aspecto de la producción como desde el del consumo. Estamos supersticiosamente convencidos de que el buen aprendizaje puede y debería producirse en nosotros —y de que podemos producirlo en otros—. Nuestro intento de desligarnos del concepto de escuela hará surgir las resistencias que hallamos en nosotros mismos cuando tratamos de renunciar al consumo ilimitado y a la ubicua suposición de que a los otros se les puede manipular por su propio bien. Nadie está totalmente exento de explotar a otros en el proceso de escolarización.
+
+La escuela es el más grande y más anónimo de todos los patrones. De hecho es el mejor empleo de un nuevo tipo de empresa, sucesora del gremio, de la fábrica y de la sociedad anónima. Las empresas multinacionales que han dominado la economía están siendo complementadas ahora, y puede que algún día sean suplantadas por organismos de servicio con planificación supranacional. Estas empresas presentan sus servicios de manera que hacen que todos los hombres se sientan obligados a consumirlos. Se rigen por una normativa internacional, redefiniendo el valor de sus servicios periódicamente y por doquiera a un ritmo aproximadamente parejo.
+
+El “transporte” que se apoya en nuevos coches y supercarreteras atiende a la misma necesidad institucionalmente envasada de comodidad, prestigio, velocidad y equipamiento, independientemente de que sus componentes los produzca o no el Estado. El aparato de la “atención médica” define una especie peculiar de salud, poco importa que sea el individuo o el Estado quien pague el servicio. La promoción graduada a fin de obtener diplomas ajusta al estudiante para ocupar un lugar en la misma pirámide internacional de mano de obra cualificada, independientemente de quien dirija la escuela.
+
+En todos estos casos el empleo es un beneficio oculto: el chofer de un automóvil privado, el paciente que se somete a hospitalización o el alumno en el aula deben considerase como parte de una nueva clase de “empleados”. Un movimiento de liberación que se inicie en la escuela y, sin embargo, esté fundado en maestros y alumnos como explotados y explotadores simultáneamente, podría anticiparse a las estrategias revolucionarias del futuro; pues un programa radical de desescolarización podría adiestrar a la juventud en el nuevo estilo de revolución necesaria para desafiar a un sistema social que exhibe una “salud”, una “riqueza” y una “seguridad” obligatorias.
+
+Los riesgos de una rebelión contra la escuela son imprevisibles, pero no son tan horribles como los de una revolución que se inicie en cualquier otra institución principal. La escuela no está todavía organizada para defenderse con tanta eficacia como una nación-Estado, o incluso como una gran sociedad anónima. La liberación de la opresión de las escuelas podría ser incruenta. Las armas del vigilante escolar[^n10] y de sus aliados en los tribunales y en las agencias de empleo podrían tomar medidas muy crueles contra el o la delincuente individual, especialmente si fuese pobre, pero podrían ser a su vez impotentes si surgiera un movimiento de masas.
+
+La escuela se ha convertido en un problema social; se le ataca por todas partes, y los ciudadanos y los gobiernos patrocinan experimentos no convencionales en todo el mundo. Recurren a insólitos expedientes estadísticos a fin de preservar la fe y salvar las apariencias. El ánimo que existe entre algunos educadores es muy parecido al ánimo de los obispos católicos después del Concilio Vaticano. Los planes de estudio de las llamadas “escuelas libres” se parecen a las liturgias de las misas con música folclórica y rock. Las exigencias de los estudiantes de bachillerato para tener voz y voto en la elección de sus profesores son tan estridentes como las de los feligreses que exigen seleccionar a sus párrocos. Pero para la sociedad está en juego algo mucho mayor si una minoría significativa pierde su fe en la escolaridad. Esto pondría en peligro la supervivencia no sólo del orden económico construido sobre la coproducción de bienes y demandas, sino igualmente del orden político construido sobre la nación-Estado dentro del cual los estudiantes son dados a la luz por la escuela.
+
+Nuestras alternativas posibles son harto claras. O continuamos creyendo que el aprendizaje institucionalizado es un producto que justifica una inversión ilimitada, o redescubrimos que la legislación, la planificación y la inversión, si de alguna manera encajan en la educación formal, debieran usarse principalmente para derribar las barreras que ahora obstaculizan las posibilidades de aprendizaje, el cual sólo puede ser una actividad personal.
+
+Si no ponemos en tela de juicio el supuesto de que el conocimiento valedero es una mercancía que en ciertas circunstancias puede metérsele a la fuerza al consumidor, la sociedad se verá cada día más dominada por siniestras seudoescuelas y totalitarios administradores de la información. Los terapeutas pedagógicos drogarán más a sus alumnos a fin de enseñarles mejor, y los estudiantes se drogarán más a fin de conseguir aliviarse de las presiones de los profesores y de la carrera por diplomas. Ejércitos cada día mayores de burócratas presumirán de maestros. El lenguaje del escolar ya se lo ha apropiado el publicista. Ahora el general y el policía tratarán de dignificar sus profesiones disfrazándose de educadores. En una sociedad escolarizada, las guerras y la represión civil encuentran una justificación racional educativa. La guerra pedagógica al estilo Vietnam se justificará cada vez más como la única manera de enseñar a la gente el valor superior del progreso inacabable.
+
+La represión se considerará como un empeño de misioneros por apresurar la venida del Mesías mecánico. Más y más países recurrirán a la tortura pedagógica puesta ya en práctica en Brasil y Grecia. Esta tortura pedagógica no se usa para extraer información o para satisfacer las necesidades psíquicas de unos sádicos. Se apoya en el terror aleatorio para romper la integridad de toda una población y convertirla en un material plástico para las enseñanzas inventadas por tecnócratas. La naturaleza totalmente destructiva y en constante progreso de la instrucción obligatoria cumplirá cabalmente su lógica final a menos que comencemos a librarnos desde ahora de nuestra _hybris_ pedagógica, nuestra creencia de que el hombre puede hacer lo que no puede Dios, a saber, manipular a otros para salvarlos.
+
+Muchos comienzan recientemente a darse cuenta de la inexorable destrucción que las tendencias actuales de producción implican para el medio ambiente, pero las personas aisladas tienen un poder muy restringido para cambiar estas tendencias. La manipulación de hombres y mujeres iniciada en la escuela ha llegado también a un punto sin retorno, y la mayoría de las personas aún no se han percatado de ello. Fomentan todavía la reforma escolar, tal como Henry Ford II propone unos nuevos automóviles ponzoñosos.
+
+Daniel Bell dice que nuestra época se caracteriza por una extrema disyunción entre las estructuras cultural y social; una dedicada a actitudes apocalípticas y la otra a la toma tecnocrática de decisiones. Esto es sin duda verdadero respecto de muchos reformadores de la educación que se sienten impulsados a condenar casi todo aquello que caracteriza a las escuelas modernas —y proponen simultáneamente nuevas escuelas—.
+
+En su _Estructura de las revoluciones científicas_ , Thomas Kuhn aduce que dicha disonancia precede inevitablemente a la aparición de un nuevo paradigma cognoscitivo. Los hechos que informaban aquellos que observaban la caída libre, aquellos que volvían del otro lado de la Tierra y aquellos que usaban el nuevo telescopio, no se ajustaban a la visión cósmica tolemaica. Súbitamente, se aceptó el paradigma newtoniano. La disonancia que caracteriza a muchos jóvenes de hoy no es tanto cognoscitiva como un asunto de actitudes —un sentimiento acerca de cómo _no_ puede ser una sociedad tolerable—. Lo sorprendente respecto de esta disonancia es la capacidad de un número muy grande de personas para tolerarla.
+
+La capacidad para ir tras metas incongruentes exige una explicación. Según Max Gluckman, todas las sociedades poseen procedimientos para ocultar tales disonancias de sus miembros. Los rituales pueden ocultar a sus participantes incluso discrepancias y conflictos entre principio social y organización social. Mientras un individuo no sea explícitamente consciente del carácter ritual del proceso a través del cual se le inició en las fuerzas que moldean su cosmos, no puede romper el conjuro y moldear un nuevo cosmos. Mientras no nos percatemos del ritual a través del cual la escuela moldea al consumidor progresivo —el recurso principal de la economía—, no podremos romper el conjuro de esta economía y dar forma a una nueva.
+
+# Espectro institucional
+
+La mayoría de los esquemas utópicos y escenarios futurísticos requieren nuevas y costosas tecnologías que habrían de venderse a las naciones ricas y pobres por igual. Herman Kahn ha encontrado alumnos en Venezuela, Argentina y Colombia. Las fantasías de Sergio Bernardes para su Brasil del año 2000 centellean con más maquinaria nueva de la que hoy posee Estados Unidos, que para entonces estará recargado con los obsoletos emplazamientos para misiles, aeropuertos para reactores y ciudades de las décadas de los años sesenta-setenta. Los futuristas inspirados en Buckminster Fuller se apoyarían más bien en dispositivos más baratos y exóticos. Cuentan con que se acepte una tecnología nueva pero posible, que al parecer nos permitiría hacer más con menos —monorrieles ligeros en vez de transporte supersónico, viviendas verticales en vez de dispersión horizontal—. Todos los planificadores futuristas de hoy tratan de hacer económicamente factible lo técnicamente posible, negándose a la vez a enfrentar las inevitables consecuencias sociales: el creciente anhelo de todos los hombres por bienes y servicios que seguirán siendo privilegio de unos pocos.
+
+Creo que un futuro deseable depende, en primer lugar, de nuestra voluntad de elegir una vida de acción en vez de una vida de consumo, de que engendremos un estilo de vida que nos permita ser espontáneos, independientes y, sin embargo, relacionarnos uno con otro, en vez de mantener un estilo de vida que sólo nos permite hacer y deshacer, producir y consumir —un estilo de vida que es sólo una estación en el camino hacia el agotamiento y la contaminación del entorno—. El futuro depende más de nuestra elección de instituciones que mantengan una vida de acción y menos de que desarrollemos nuevas ideologías y tecnologías. Necesitamos un conjunto de pautas que nos permitan reconocer aquellas instituciones que apoyan el desarrollo personal en vez del enviciamiento, como también la voluntad de dedicar nuestros recursos tecnológicos preferentemente a dichas instituciones de desarrollo.
+
+La elección se sitúa entre dos tipos institucionales radicalmente opuestos, ejemplificados ambos en ciertas instituciones existentes, aunque uno de esos tipos caracteriza de tal manera la época contemporánea que casi la define. A este tipo dominante yo propondría llamarlo la institución manipulativa. El otro tipo existe, pero sólo precariamente. Las instituciones que se ajustan a él son más humildes y menos notorias. No obstante, las tomo como modelos de un futuro más deseable. Las llamo “convivenciales” y sugiero colocarlas a la izquierda institucional, para mostrar que hay instituciones situadas entre ambos extremos y para ilustrar cómo las instituciones históricas pueden cambiar de color conforme se desplazan desde un facilitar la actividad a un organizar la producción.
+
+Dicho espectro, que se desplaza de izquierda a derecha, se ha usado por lo general para caracterizar a los hombres y sus ideologías, y no a nuestras instituciones sociales y a sus estilos. Esta categorización de los hombres, sea como individuos o como grupos, suele producir más calor que luz. Pueden suscitarse poderosas objeciones contra el uso de una convención corriente, pero al hacerlo espero desplazar los términos del debate de un plano estéril a uno fértil. Se evidenciará que los hombres de izquierda no siempre se caracterizan por su oposición a las instituciones manipulativas, a las que coloco en el extremo derecho del espectro.
+
+Las instituciones modernas más influyentes se agolpan al lado derecho del espectro. Hacia él se ha desplazado la coerción legal, conforme ha pasado de las manos del _sheriff_ a las del FBI y del Pentágono. La guerra moderna se ha convertido en una empresa sumamente profesional cuyo negocio es matar. Ha llegado al punto en que su eficiencia se mide por el recuento de cuerpos. Sus capacidades pacificadoras dependen de su poder para convencer a amigos y enemigos de la ilimitada potencia letal de la nación. Las balas y los productos químicos modernos son tan eficaces que a un ínfimo precio son capaces de matar o mutilar infaliblemente al “cliente”. Pero los costos de entrega aumentan vertiginosamente; el coste de un vietnamita muerto subió de 360 000 dólares en 1967 a 450 000 dólares en 1969. Sólo economías a una escala cercana al suicidio de la raza harían económicamente eficiente el arte militar moderno. Se está haciendo más obvio el efecto _boomerang_ en la guerra: cuanto mayor es el recuento de cuerpos de vietnamitas muertos, tantos más enemigos consigue Estados Unidos por todo el mundo; asimismo, tanto más debe gastar Estados Unidos en crear otra institución manipulativa —motejada cínicamente como de “pacificación”— en un vano intento por absorber los efectos secundarios de la guerra.
+
+En este mismo lado del espectro hallamos también organismos sociales que se especializan en la manipulación de sus clientes. Semejante a la organización militar, tienden a crear efectos contrarios a sus objetivos conforme crece el ámbito de sus operaciones. Estas instituciones sociales son igualmente contraproductivas, pero lo son de manera menos evidente. Muchas adoptan una imagen simpática y terapéutica para encubrir este efecto paradójico. Por ejemplo, hasta hace un par de siglos, las cárceles servían como medio para detener a las personas hasta que se les sentenciaba, se les mutilaba, se les mataba o se les exiliaba; en ocasiones se usaban deliberadamente como forma de tortura. Sólo recientemente comenzamos a pretender que encerrar a la gente en jaulas tendrá un efecto benéfico sobre su carácter y comportamiento. Ahora, más que unos pocos están empezando a entender que la cárcel incrementa tanto la calidad de los criminales como su cantidad, que es perfectamente capaz de hacer de un simple inconforme un criminal endurecido. No obstante, es mucho menor el número de los que al parecer entienden que las clínicas psiquiátricas, hogares de reposo y orfanatos hacen algo muy parecido. Estas instituciones proporcionan a sus clientes la destructiva autoimagen del psicótico, del excedido en años o del niño abandonado, y proveen la justificación lógica para la existencia de ciertas profesiones, tal como las cárceles poseen sus guardias. La afiliación a instituciones que se encuentran en este extremo del espectro se consigue de dos maneras, ambas coercitivas: mediante compromiso obligado o mediante servicio selectivo.
+
+En el extremo opuesto del espectro se sitúan unas instituciones que se distinguen por el uso espontáneo —las instituciones “convivenciales”—. Las conexiones telefónicas, las líneas de metro, los recorridos de los carteros, los mercados y lonjas no tienen necesidad de convencernos de su necesidad. Los sistemas de alcantarillado, de agua potable, los parques y veredas son instituciones que los hombres usan sin tener que estar institucionalmente convencidos de que les conviene hacerlo. Todas las instituciones exigen, por cierto, cierta reglamentación. Pero el funcionamiento de instituciones que existen para usarse más que para producir algo, requiere de normas cuya índole es totalmente diferente de la que exigen las instituciones-tratamiento, que son manipulativas. Las normas que rigen a las instituciones para uso tienen por fin principal evitar abusos que frustrarían su accesibilidad general. Las veredas deben mantenerse libres de obstrucciones, el uso industrial de agua potable debe someterse a ciertos límites y el juego de pelota debe restringirse a zonas especiales dentro de un parque. Actualmente necesitamos una legislación especial para evitar el abuso de nuestras líneas telefónicas por parte de computadoras, el abuso del servicio de correo por parte de los anunciantes y la contaminación de nuestros sistemas de alcantarillado por los desechos industriales. La reglamentación de las instituciones convivenciales fija límites para su empleo; conforme uno pasa del extremo convivencial del espectro al manipulativo, las normas van exigiendo cada vez más un consumo o participación no queridos. El diferente coste de la adquisición de clientes es precisamente una de las características que distingue a las instituciones conviviales de las manipulativas.
+
+En ambos extremos del espectro encontramos instituciones de servicio, pero a la derecha, el servicio es una manipulación impuesta y al cliente se le convierte en víctima de la publicidad, la agresión, el adoctrinamiento, la prisión o el electrochoque. A la izquierda, el servicio es una mayor oportunidad de límites definidos formalmente, mientras el cliente sigue siendo un agente libre. Las instituciones del ala derecha tienden a procesos de producción altamente complejos y costosos en los que gran parte de la complicación y el gasto se ocupan en convencer a los consumidores de que no pueden vivir sin el producto o tratamiento ofrecido por la institución. Las instituciones del ala izquierda tienden a redes que facilitan la composición o cooperación iniciada por el cliente.
+
+Las instituciones manipulativas de la derecha son formadoras de hábito, “adictivas”, social y psicológicamente. La adicción social, o escalada, consiste en la tendencia a prescribir un tratamiento intensificado si dosis menores no han rendido los resultados deseados. La adicción psicológica, o habituamiento, se produce cuando los consumidores se envician con la necesidad de una cantidad cada vez mayor del proceso o del producto. Las instituciones de la izquierda que uno mismo pone en actividad tienden a autolimitarse. Al revés de los procesos de producción que identifican la satisfacción con el mero acto del consumo, estas redes sirven a un objetivo que va más allá de su uso repetido. Una persona levanta el teléfono cuando quiere decir algo a otra, y cuelga una vez terminada la comunicación deseada. A excepción hecha de los adolescentes, no usa el teléfono por el puro placer de hablar ante el receptor. Si el teléfono no es el mejor modo de ponerse en comunicación, las personas escribirán una carta o harán un viaje. Las instituciones de la derecha, como podemos ver claramente en el caso de las escuelas, invitan compulsivamente al uso repetitivo y frustran las maneras alternativas de lograr resultados similares.
+
+Hacia la izquierda del espectro institucional, pero no en el extremo mismo, podemos colocar a las empresas que compiten entre sí en la actividad que les es propia, pero que no han empezado a ocupar la publicidad de manera notable. Encontramos aquí las lavanderías manuales, las pequeñas panaderías, los peluqueros y, para hablar de profesionales, algunos abogados y profesores de música. Son por consiguiente característicamente del ala izquierda las personas que han institucionalizado sus servicios, pero no su publicidad. Consiguen clientes mediante su contacto personal y la calidad relativa de sus servicios.
+
+Los hoteles y las cafeterías se acercan algo más al centro. Las grandes cadenas hoteleras como la Hilton que gastan inmensas cantidades en vender su imagen, a menudo se comportan como si estuvieran dirigiendo instituciones de la derecha. No obstante, las empresas Hilton y Sheraton no ofrecen nada más —de hecho dan frecuentemente menos— que alojamientos de precio similar y dirigidos independientemente. En lo esencial, un letrero de hotel atrae al viajero como lo hace un signo caminero. Dice más bien: “Detente, aquí hay una cama para ti”, y no: “¡Deberías preferir una cama de hotel a una banca en el parque!”
+
+Los productores de artículos de primera necesidad y de la mayoría de los bienes efímeros pertenecen a la parte central de nuestro espectro. Satisfacen demandas genéricas y agregan al costo de producción y distribución todo lo que el mercado soporte en costos publicitarios, en anuncios y envases. Cuanto más básico sea el producto —trátese de bienes o de servicios— tanto más tiende la competencia a limitar el costo de venta del artículo.
+
+La mayoría de los fabricantes de bienes de consumo se han ido mucho más a la derecha. Tanto directa como indirectamente, producen demandas de accesorios que hinchan el precio real de compra muy por encima del coste de producción. La General Motors y la Ford producen medios de transporte, pero también, y esto es más importante, manipulan el gusto del público de manera tal que la necesidad de transporte se expresa como una demanda de coches privados y no de autobuses públicos. Venden el deseo de controlar una máquina, correr a grandes velocidades con lujosa comodidad, al tiempo que ofrecen el espejismo de la evasión. Pero lo que venden no es tan sólo un asunto de motores inútilmente poderosos, de artilugios superfluos o de suplementos nuevos que los fabricantes han tenido que agregar obligados por Ralph Nader y los grupos que presionan en pro de un aire limpio. La lista de precios incluye dispositivos anticontaminantes, cinturones de seguridad, climatización; pero también comprende otros costes que no se le declaran abiertamente al conductor: los gastos de publicidad y de ventas de la empresa, el combustible, el mantenimiento y las refacciones, el seguro, el interés sobre el crédito, como también costes menos tangibles, como la pérdida de tiempo, el buen humor y el aire respirable en nuestras congestionadas ciudades.
+
+Un corolario particularmente interesante de nuestro examen de instituciones socialmente útiles es el sistema de carreteras “públicas”. Este importante elemento del coste total de los automóviles merece un análisis más dilatado, pues conduce directamente a la institución derechista en la que estoy más interesado, a saber, la escuela.
+
+
+## Falsos servicios de utilidad pública
+
+El sistema de carreteras es una red para la locomoción a través de distancias relativamente grandes. En su condición de red, parecería corresponderle estar a la izquierda en el espectro institucional. Pero en este caso debemos hacer una distinción que esclarecerá tanto la naturaleza de las carreteras como la naturaleza de los verdaderos servicios de utilidad pública. Los caminos que son genuinamente para todos, son verdaderos servicios de utilidad pública. Las supercarreteras son cotos privados, cuyo coste se le encaja parcialmente al público.
+
+Los sistemas de teléfonos, correos y caminos son redes, y ninguno es gratis. El acceso a la red de teléfonos está limitado por cobros sobre tiempo ocupado en cada llamada. Estas tarifas son relativamente bajas y podrían reducirse sin cambiar la naturaleza del sistema. El uso del sistema telefónico no está en absoluto limitado por lo que se transmita, aunque lo emplean mejor quienes pueden hablar frases coherentes en el lenguaje del interlocutor, una capacidad que poseen todos los que desean usar la red. El franqueo suele ser barato. El uso del sistema postal se ve ligeramente limitado por el precio de la pluma y el papel, y algo más por la capacidad de escribir. Aún así, cuando alguien que no sabe escribir tiene un pariente o un amigo a quien pueda dictarle una carta, el sistema postal está a su disposición, tal como lo está si quiere despachar una cinta grabada.
+
+El sistema de carreteras no llega a estar disponible de manera similar para alguien que tan sólo aprenda a conducir. Las redes telefónica y postal existen para servir a quienes deseen usarlas, mientras el sistema de carreteras sirve principalmente como accesorio del automóvil privado. Las primeras son verdaderos servicios de utilidad pública, mientras el último es un servicio público para los dueños de coches, camiones y autobuses. Los servicios de utilidad pública existen en pro de la comunicación entre los hombres: las carreteras, como otras instituciones de la derecha, existen en pro de un producto. Tal como hicimos notar, los fabricantes de automóviles _producen_ simultáneamente tanto los coches como la demanda de coches. Asimismo _producen_ la demanda de carreteras de varias vías, puentes y campos petrolíferos. El coche privado es el foco de una constelación de instituciones del ala derecha. El elevado coste de cada elemento lo dicta la complicación del producto básico, y vender el producto básico es enviciar a la sociedad en el paquete conjunto.
+
+Planificar un sistema vial como un verdadero servicio de utilidad pública discriminaría a aquellos para quienes la velocidad y el confort individualizado son los valores primarios de transporte, y favorecería a aquellos que valoran la fluidez y el lugar de destino. Es la diferencia entre una red extendidísima con acceso máximo para los viajeros y otra que ofrezca sólo un acceso privilegiado a una zona restringida.
+
+La transferencia de una institución moderna a las naciones en desarrollo permite probar esto con mejor claridad. En los países muy pobres, los caminos suelen ser apenas lo bastante buenos como para permitir el tránsito mediante camiones especiales de eje elevado, cargados de víveres, reses o personas. Este tipo de país debería usar sus limitados recursos para construir una telaraña de pistas que llegaran a todas sus regiones y debería restringir la importancia de vehículos a dos o tres modelos diferentes muy duraderos que puedan transitar por malos caminos a baja velocidad. Esto simplificaría el mantenimiento continuo de estos vehículos y proporcionaría una máxima fluidez y elección de puntos de destino a todos los ciudadanos. Esto exigiría proyectar vehículos para todo servicio con la simplicidad del Ford T, utilizando las aleaciones más modernas para garantizar su durabilidad, con un límite de velocidad incorporado de unos 25 kilómetros por hora a lo más, y lo bastante firme como para rodar por el terreno más áspero. No se ofrecen estos vehículos en el mercado porque no hay demanda de ellos. De hecho sería preciso cultivar esa demanda, muy posiblemente al amparo de una legislación estricta. Actualmente, cada vez que una demanda de esta especie se hace sentir un poco, se le descarta rápida y desdeñosamente mediante una publicidad contraria, encaminada a la venta universal de las máquinas que extraen hoy de los contribuyentes estadunidenses el dinero necesario para construir supercarreteras.
+
+Para “mejorar” el transporte, todos los países, hasta los más pobres, proyectan ahora sistemas viales concebidos para coches de pasajeros y remolques de alta velocidad que se ajustan a la minoría, pendiente del velocímetro, compuesta por productores y consumidores en las clases selectas. Este planteamiento a menudo se justifica racionalmente pintándolo como un ahorro del recurso más precioso de un país pobre: el tiempo del médico, del inspector escolar o del funcionario público. Estos hombres, naturalmente, sirven casi exclusivamente a la misma gente que posee un coche o espera tenerlo algún día. Los impuestos locales y las escasas divisas se derrochan en _falsos servicios de utilidad pública_.
+
+La tecnología “moderna” transferida a los países pobres puede dividirse en tres categorías: bienes, fábricas que los hacen e instituciones de servicios —principalmente escuelas— que convierten a los hombres en productores y consumidores modernos. La mayor parte de los países gastan la mayor proporción de su presupuesto, y con mucho, en escuelas. Los graduados fabricados con escuelas crean entonces una demanda de otros servicios conspicuos de utilidad pública, tales como potencia industrial, carreteras pavimentadas, hospitales modernos y aeropuertos, y éstos crean a su vez un mercado para los bienes hechos para países ricos y, al cabo de un tiempo, la tendencia a importar fábricas anticuadas para producirlos.
+
+De todos los “falsos servicios de utilidad pública”, la escuela es el más insidioso. Los sistemas de carreteras producen sólo demanda de coches. Las escuelas crean una demanda para el conjunto completo de instituciones modernas que llenan el extremo derecho del espectro. A un hombre que pusiera en duda la necesidad de carreteras se le tacharía de romántico; al que ponga en tela de juicio la necesidad de escuelas se le ataca de inmediato: un ser sin entrañas o un imperialista.
+
+
+## Las escuelas como falsos servicios de utilidad pública
+
+Al igual que las carreteras, las escuelas dan a primera vista la impresión de estar igualmente abiertas para todos los interesados. De hecho están abiertas sólo para quienes renueven sin cejar sus credenciales. Así como las carreteras crean la impresión de que su nivel actual de costes anuales es necesario para que la gente pueda moverse, así se supone que las escuelas son indispensables para alcanzar la competencia que exige una sociedad que use la tecnología moderna. Hemos expuesto las autopistas como servicios de utilidad pública espurios observando cómo dependen de los automóviles privados. Las escuelas se fundan en la hipótesis igualmente espuria de que el aprendizaje es el resultado de la enseñanza curricular.
+
+Las carreteras son las consecuencias del deseo y la necesidad de movilizarse que se pervierten para convertirlos en demanda de coches privados. Las escuelas pervierten la natural inclinación a desarrollarse y aprender convirtiéndola en demanda de instrucción. La demanda de una madurez manufacturada es mucho más la abnegación de la actividad iniciada por uno mismo que la demanda de bienes manufacturados. Las escuelas no sólo están a la derecha de las carreteras y los coches, tienen su lugar cerca del extremo del espectro institucional ocupado por los asilos totales. Incluso los productores de recuentos de cuerpos matan solamente cuerpos. Al hacer que los hombres abdiquen de la responsabilidad de su propio desarrollo, la escuela conduce a muchos a una especie de suicidio espiritual.
+
+Las carreteras las pagan en parte quienes las utilizan, puesto que los peajes e impuestos al combustible se obtienen sólo de los conductores. La escuela, en cambio, es un sistema perfecto de tributación regresiva, en el que los privilegios cabalgan sobre el lomo de todo público pagador. La escuela fija un gravamen por cabeza sobre la promoción. El subconsumo de distancias recorridas por carretera no es nunca tan costoso como el subconsumo de escolarización. El hombre que no posea un coche en Los Ángeles posiblemente esté casi inmovilizado, pero si se ingenia de algún modo para llegar a su lugar de trabajo, podrá conseguir y conservar un empleo. El desertor escolar carece de vía alternativa. El habitante suburbano en su Lincoln nuevo y su primo campesino que conduce una vieja carcacha se aprovechan más o menos igual de la carretera, aunque el vehículo del uno cueste 30 veces más que el del otro. El valor de la escolarización de un hombre es función del número de años que ha permanecido en escuelas y de la carestía de éstas. La ley no obliga a conducir, en cambio obliga a ir a la escuela.
+
+El análisis de las instituciones según su actual emplazamiento en un espectro continuo izquierda-derecha me permite esclarecer mi convicción de que el cambio social fundamental debe comenzar con un cambio en la conciencia que se tiene de las instituciones y explicar por qué la dimensión de un futuro viable recae en el rejuvenecimiento del estilo institucional.
+
+Durante la década 1960-1970, unas instituciones, nacidas en diversas épocas después de la Revolución francesa, llegaron a su vejez; los sistemas de escuelas públicas fundados en la época de Jefferson o de Atatürk, junto con otros que se iniciaron después de la segunda Guerra Mundial, se hicieron todos burocráticos, autojustificantes y manipulativos. Lo mismo les ocurrió a los sistemas de seguridad social, a los sindicatos, a las principales Iglesias y cuerpos diplomáticos, a la atención de los ancianos y a los servicios funerarios.
+
+Por ejemplo, hoy en día hay un mayor parecido ente los sistemas escolares de Colombia, Inglaterra, la Unión Soviética y Estados Unidos, que entre las escuelas de este último de fines del siglo pasado y las de hoy o las de Rusia en ese tiempo. Las escuelas son hoy obligatorias, sin término definido y competitivo. Esa misma convergencia en el estilo institucional afecta la atención médica, la comercialización, la administración de personal y la vida política. Todos estos procesos institucionales tienden a apilarse en el extremo manipulativo del espectro.
+
+La consecuencia de esta convergencia de instituciones es la fusión de burocracias mundiales. El estilo, el sistema de ordenamiento jerárquico y la parafernalia (desde el libro de texto a la computadora) se normalizan en los consejos de planificación de Costa Rica o de Afganistán, según los modelos de Europa occidental.
+
+Las burocracias parecen centrarse en todas partes en la misma tarea: promover el crecimiento de las instituciones de la derecha. Se ocupan de la fabricación de cosas, la fabricación de normas rituales y la fabricación —y remodelación— de la “verdad ejecutiva”, la ideología o el _fiat_ que establece el valor presente que debiera atribuirse a lo que ellas producen. La tecnología proporciona a estas burocracias un poder creciente a la mano derecha de la sociedad. La mano izquierda parece marchitarse y no porque la tecnología sea menos capaz de aumentar el ámbito de la actividad humana y de proporcionar tiempo para el despliegue de la imaginación individual y para la creatividad personal, sino porque ese uso de la tecnología no aumenta el poder de la élite que la administra. El director de correos no tiene control sobre el uso esencial de ese servicio; la telefonista o el directivo de la compañía telefónica carecen de poder para impedir que se preparen adulterios, asesinatos o subversiones usando sus líneas.
+
+En la elección entre la derecha y la izquierda institucional está en juego la naturaleza misma de la vida humana. El hombre debe elegir entre ser rico en cosas o tener libertad para usarlas. Debe elegir entre estilos alternativos de vida y programas conexos de producción.
+
+Aristóteles ya había descubierto que “hacer y actuar” son diferentes, y de hecho tan diferentes que lo uno jamás incluye lo otro. “Porque ni es el actuar una manera de hacer, ni el hacer una manera del verdadero actuar. La arquitectura _techne_ es una manera de hacer… dar nacimiento a algo cuyo origen está en su hacedor y no en la cosa. El hacer siempre tiene una finalidad que no es él mismo, y no así la acción, puesto que la buena acción es en sí misma un fin. La perfección en el hacer es un arte; la perfección en el actuar, una virtud.”[^n11] La palabra que Aristóteles usó para hacer fue _poesis_ , y la que usó para actuar, _praxis_. El movimiento hacia la derecha de una institución indica que se la está reestructurando para aumentar su capacidad de “hacer”, mientras que si se desplaza hacia la izquierda indica que se la está reestructurando para permitir un mayor “actuar” o “praxis”. La tecnología moderna ha aumentado la capacidad del hombre para dejar a las máquinas el “hacer” cosas y ha aumentado el tiempo que puede dedicar a “actuar”. El “hacer” las cosas cotidianas imprescindibles ha dejado de ocupar su tiempo. El desempleo es la consecuencia de esta modernización: es la ociosidad del hombre para quien no hay nada que “hacer” y que no sabe cómo “actuar”. El desempleo es la triste ociosidad del hombre que, al revés de Aristóteles, cree que hacer cosas o trabajar es virtuoso y que la ociosidad es mala. El desempleo es la experiencia del hombre que ha sucumbido a la ética protestante. Según Weber, el hombre necesita el ocio para poder trabajar. Según Aristóteles, el trabajo es necesario para poder tener ocio.
+
+La tecnología proporciona al hombre tiempo discrecional que puede llenar ya sea haciendo, ya sea actuando. Toda nuestra cultura tiene abierta ahora la opción entre un triste desempleo o un ocio feliz. Depende del estilo institucional que la cultura elija. Esta elección habría sido inconcebible en una cultura antigua fundada en la agricultura campesina o en la esclavitud. Ha llegado a ser inevitable para el hombre posindustrial.
+
+Una manera de llenar el tiempo disponible es estimular mayores demandas de consumo de bienes y, simultáneamente, de producción de servicios. Lo primero implica una economía que proporciona una falange cada vez mayor de cosas siempre novedosas que pueden hacerse, consumirse y someterse a reciclaje. Lo segundo implica el vano intento de “hacer” acciones virtuosas, haciendo aparecer como tales los productos de las instituciones de “servicios”. Esto conduce a la identificación de la escolaridad con la educación, del servicio médico con la salud, de los programas con la recreación, de la velocidad con la locomoción eficaz. La primera opción lleva ahora el apodo de _desarrollo._
+
+La manera radicalmente alternativa de llenar el tiempo disponible consiste en una gama limitada de bienes más durables y en proporcionar acceso a instituciones que puedan aumentar la oportunidad y apetencia de las acciones humanas recíprocas.
+
+Una economía de bienes duraderos es exactamente lo contrario de una economía fundada en la obsolescencia programada. Una economía de bienes duraderos significa una restricción en la lista de mercancías. Los bienes habrían de ser de tal especie que diesen un máximo de oportunidad para “actuar” en algo con ellos: artículos hechos para montarlos uno mismo, para autoayudarse, para su reempleo y reparación.
+
+El complemento de una lista de bienes durables, reparables y reutilizables no es un aumento de servicios producidos institucionalmente, sino más bien una estructura institucional que eduque constantemente en la acción, en la participación, en la autoayuda. El movimiento de nuestra sociedad desde el presente —en el que todas las instituciones gravitan hacia una burocracia posindustrial— a un futuro de convivencialidad posindustrial —en el que la intensidad de la acción sería preponderante sobre la producción— debe comenzar con una renovación del estilo de las instituciones de servicio y, antes que nada, por una renovación de la educación. Un futuro deseable y factible depende de nuestra disposición a invertir nuestro saber tecnológico en el desarrollo de instituciones convivenciales. En el terreno de las investigaciones sobre educación, esto equivale a exigir que se trastroquen las tendencias actuales.
+
+# Compatibilidades irracionales
+
+[^n12] Creo que la crisis contemporánea de la educación nos obliga más bien a modificar la idea de un aprendizaje públicamente prescrito y no los métodos usados para hacerlo cumplir. La proporción de desertores —especialmente de alumnos de los primeros años de bachillerato y de maestros de primaria— señala que las bases están pidiendo un enfoque totalmente nuevo. Al “practicante del aula” que se estima un profesor liberal se le ataca cada vez más por todos lados. El movimiento pro escuela libre, que confunde disciplina con adoctrinamiento, le ha adjudicado el papel de elemento destructivo y autoritario. El tecnólogo educativo demuestra sostenidamente la inferioridad del profesor para medir y modificar la conducta. Y la administración escolar para la que trabaja lo obliga a inclinarse tanto ante Summerhill como ante Skinner, poniendo en evidencia que el aprendizaje obligatorio no puede ser una empresa liberal. No debe asombrar que el índice de maestros desertores esté superando el de los alumnos.
+
+El compromiso que Estados Unidos ha contraído de educar obligatoriamente a sus menores se demuestra tan vano como el pretendido compromiso norteamericano de democratizar obligatoriamente a los vietnamitas. Las escuelas convencionales obviamente no pueden hacerlo. El movimiento pro escuela libre seduce a los educadores no convencionales, pero en definitiva lo hace en apoyo de la ideología convencional de la escolarización. Y lo que prometen los tecnólogos de la educación, a saber, que sus investigaciones y desarrollo —si se les dota de fondos suficientes— pueden ofrecer alguna especie de solución final a la resistencia de la juventud contra el aprendizaje obligatorio, suena tan confiado y demuestra ser tan fatuo como las promesas hechas por los tecnólogos militares.
+
+Las críticas dirigidas contra el sistema escolar estadunidense por parte de los conductistas, y las que provienen de la nueva raza de educadores raciales, parecen diametralmente opuestas. Los conductistas aplican las investigaciones sobre educación a la “inducción de instrucción autotélica mediante paquetes de aprendizaje individualizados”. El estilo conductista choca con la idea de hacer que los jóvenes ingresen por voluntad propia en unas comunas liberadas que les invitan a ingresar, las cuales estarían supervisadas por adultos. No obstante, bajo una perspectiva histórica, ambas no son sino manifestaciones contemporáneas de las metas, aparentemente contradictorias, pero en verdad complementarias, del sistema escolar público. Desde los comienzos de este siglo, las escuelas han sido protagonistas del control social por una parte y de la cooperación libre por la otra, poniéndose ambos aspectos al servicio de la “buena sociedad” a la que se concibe como una estructura corporativa altamente organizada y de suave funcionamiento. Sometidos al impacto de una urbanización intensa, los niños se convierten en un recurso natural que las escuelas han de moldear para luego alimentar la máquina industrial. Las políticas progresistas y el culto a la eficiencia coincidieron con el crecimiento de la escuela pública estadunidense.[^n13] La orientación vocacional y la _junior highschool_[^n14] fueron dos importantes resultados de este tipo de conceptos.
+
+Parece, por consiguiente, que el intento de producir cambios específicos en el comportamiento, que puedan medirse y de los que pueda responsabilizarse al encargado del proceso, es sólo el anverso de la medalla, cuyo reverso es la pacificación de la nueva generación dentro de enclaves especialmente proyectados que los inducirán a entrar en el sueño de sus mayores. Estos seres pacificados en sociedad están bien descritos por Dewey, quien quiere que “hagamos de cada una de nuestras escuelas una vida comunitaria en embrión, activa, con tipos de ocupaciones que reflejen la vida de la sociedad en pleno, y la _impregnen_ con el espíritu del arte, de la historia, de la ciencia”. Bajo esta perspectiva histórica, sería un grave error interpretar la actual controversia a tres bandas entre el establecimiento escolar, los tecnólogos de la educación y las escuelas libres como el preludio de una revolución en la educación. Esta controversia refleja más bien una etapa de un intento para convertir a grandes trancos un viejo sueño en hecho y convertir finalmente todo aprendizaje valedero en el resultado de una enseñanza profesional. La mayoría de las alternativas educativas propuestas convergen hacia metas que son inmanentes a la producción del hombre cooperativo cuyas necesidades individuales se satisfacen mediante su especialización en el sistema estadunidense: están orientadas hacia el mejoramiento de lo que yo llamo —a falta de una mejor expresión— la sociedad escolarizada. Incluso los críticos aparentemente radicales del sistema escolar no están dispuestos a abandonar la idea de que tienen una obligación para con los jóvenes, especialmente para con los pobres, la obligación de hacerlos pasar por el proceso, sea mediante amor o mediante odio, para meterlos en una sociedad que necesita especialización disciplinada tanto de sus productores como de sus consumidores y, asimismo, el pleno compromiso de todos ellos con la ideología que antepone a todo el crecimiento económico.
+
+La disensión enmascara la contradicción inherente a la idea misma de escuela. Los sindicatos establecidos de profesores, los brujos de la tecnología y los movimientos de liberación escolar refuerzan el compromiso de la sociedad entera con los axiomas fundamentales de un mundo escolarizado, más o menos del modo en que muchos movimientos pacifistas y de protesta refuerzan el compromiso de sus miembros —sean negros, mujeres, jóvenes o pobres— con la búsqueda de justicia mediante el crecimiento del ingreso nacional bruto.
+
+Es fácil anotar algunos de los postulados que ahora pasan inadvertidos a la crítica. En primer lugar está la creencia compartida de que la conducta que se ha adquirido ante los ojos de un pedagogo es de especial valor para el alumno y de especial provecho para la sociedad. Esto está relacionado con el supuesto de que el hombre social nace sólo en la adolescencia, y que nace adecuadamente sólo si madura en la escuela-matriz, que algunos desean hacer dulce mediante el _laissez-faire,_[^n15] otros quieren llenar de artilugios mecánicos y unos terceros buscan barnizar con una tradición liberal. Está finalmente una visión común de la juventud, psicológicamente romántica y políticamente conservadora. Según esta visión, los cambios de la sociedad deben llevarse a cabo agobiando a los jóvenes con la responsabilidad de transformarla —pero sólo después de que en su momento se han liberado de la escuela—. Para una sociedad fundada en tales postulados es fácil ir creando un sentido de su responsabilidad respecto de la educación de la nueva generación, y esto inevitablemente significa que algunos hombres pueden fijar, especificar y evaluar las metas personales de otros. En un “párrafo tomado de una enciclopedia china imaginaria” Jorge Luis Borges trata de evocar el mareo que debe producir ese intento. Nos dice que los animales están divididos en las clases siguientes: “ _a)_ pertenecientes al Emperador, _b)_ embalsamados, _c)_ amaestrados, _d)_ lechones, _e)_ sirenas, _f)_ fabulosos, _g)_ perros sueltos, _h)_ incluidos en esta clasificación, _i)_ que se agitan como locos, _j)_ innumerables, _k)_ dibujados con un pincel finísimo de pelo de camello, _l)_ etcétera, _m)_ que acaban de romper el jarrón, _n)_ que de lejos parecen moscas”. Ahora bien, semejante taxonomía no aparece a menos que alguien estime que puede servir para sus fines: en este caso, supongo, ese alguien era un cobrador de impuestos. Para él, al menos, esta taxonomía bestiaria _tiene_ que haber tenido sentido, tal como la taxonomía de objetivos educativos tiene sentido para los autores científicos.
+
+La visión de hombres dotados de una lógica tan inescrutable, y autorizados para evaluar su ganado, debe haber producido en el campesino un helado sentimiento de impotencia. Los estudiantes, por motivos parecidos, tienden a sentirse paranoicos cuando se someten seriamente a un currículum. Inevitablemente se asustan aún más que mi imaginario campesino chino, porque no es su ganado, sino sus objetivos vitales los que están siendo marcados con un signo inescrutable.
+
+Este pasaje de Borges es fascinante, porque evoca la lógica de la _compatibilidad irracional_ que hace a las burocracias de Kafka y de Koestler tan siniestras y no obstante tan evocadoras de la vida cotidiana. El encadenamiento implacable de las reglas parece embrujar a quienes se vuelven cómplices de ellas y los empuja a hacer prueba de una disciplina todavía más ciega. Es la lógica creada por la conducta burocrática. Y se convierte en la lógica de una sociedad que exige que a los administradores de sus instituciones educativas se les considere públicamente responsables de la modificación del comportamiento que producen en sus clientes. Los estudiantes a los que se puede motivar para valorar los paquetes educativos que sus profesores les obligan a consumir son comparables a los campesinos chinos que pueden ajustar sus rebaños al formulario de impuestos que ofrece Borges.
+
+Durante el transcurso de las dos últimas generaciones triunfó en algún momento en la cultura norteamericana un compromiso con la terapia, y vino a considerarse a los profesores como los terapeutas cuyas recetas todos los hombres necesitan, si es que desean gozar de la libertad y la igualdad con las cuales, según la Constitución, han nacido.
+
+Ahora los profesores-terapeutas siguen adelante al proponer como paso siguiente el tratamiento educativo vitalicio. El _estudio_ de este tratamiento está sujeto a discusión: ¿debiera adoptar la forma de una asistencia constante de los adultos al aula? ¿O la de éxtasis electrónico? ¿O de sesiones periódicas de sensibilización? Todos los educadores están prontos a conspirar para extender los muros del aula y agrandarla, con la meta de transformar la cultura completa en una escuela.
+
+Detrás de la retórica y del alboroto, la controversia sobre el futuro de la educación que tiene lugar en Estados Unidos es más conservadora que el debate en otros ámbitos de la política común. Respecto de las relaciones exteriores, por lo menos, una minoría organizada nos recuerda constantemente que el país debe renunciar a su papel de policía del mundo. Los economistas radicales, y ahora incluso sus profesores, menos radicales, ponen en duda la convivencia del crecimiento conjunto como meta. Hay grupos de presión para favorecer la medicina preventiva y no la curativa y otros propugnan por la fluidez en vez de la velocidad en el transporte. Sólo en el ámbito de la educación permanecen dispersas las voces articuladas que piden una desescolarización radical de la sociedad. Existe una carencia de argumentación persuasiva y de un liderazgo maduro encaminados a quitar el apoyo oficial a todas y cada una de las instituciones que tienen por fin el _aprendizaje_ obligatorio. Por el momento, la desescolarización radical de la sociedad es todavía una causa sin partido. Esto sorprende especialmente en un periodo de resistencia creciente, aunque caótica, a todas las formas de instrucción planificada institucionalmente, por parte de los jóvenes de 12 a 17 años.
+
+Los innovadores educativos siguen suponiendo que las instituciones educativas funcionan como embudos para los programas que ellos envasan. Para los fines de mi argumento da lo mismo que estos embudos tengan la forma de un aula, de un transmisor de televisión o de una “zona liberada”. Es igualmente ajeno al asunto si los envases suministrados son ricos o pobres, calientes o fríos, duros y mensurables (como Matemáticas III) o imposibles de evaluar (como la sensibilización). Lo que interesa es que se suponga que la educación es el resultado de un proceso institucional dirigido por el educador. Mientras las relaciones continúen siendo aquellas que existen entre un proveedor y un consumidor, el trabajo de investigación sobre educación continuará siendo un proceso circular. Acumulará pruebas científicas en apoyo de la necesidad de más paquetes educativos y del perfeccionamiento de los métodos de entrega, tal como cierta rama de las ciencias sociales puede probar la necesidad de acrecentar la distribución de los productos de la institución militar.
+
+Una revolución educativa se apoya en una doble inversión: una nueva orientación del trabajo de investigación y una nueva comprensión del estilo educativo de una contracultura emergente.
+
+La investigación operativa trata ahora de optimizar la eficiencia de una estructura heredada —un marco de referencia que jamás se pone en tela de juicio—. Este marco de referencia tiene la estructura sintáctica de un embudo para paquetes de enseñanza. La alternativa sintáctica respecto del mismo es una red o trama educativa para el montaje autónomo de recursos bajo el control personal de cada aprendiz. Esta estructura alternativa de una institución educativa yace ahora en el punto ciego conceptual de nuestra investigación operativa. Si la investigación se enfocara en él, ello constituiría una auténtica revolución científica.
+
+El punto ciego de los trabajos de investigación en educación refleja la parcialidad cultural de una sociedad en la que el crecimiento tecnológico se ha confundido con el control tecnocrático. Para el tecnócrata, el valor de un entorno aumenta conforme pueda programarse un mayor número de contactos entre un hombre y su medio ambiente. Es este mundo, las elecciones abiertas para el observador o el planificador deben estar acordes con los deseos de quienes están sometidos a una observación y a quienes se denomina los “beneficiarios”. La libertad se reduce a la elección entre unas mercancías envasadas.
+
+La contracultura emergente afirma los valores del contenido semántico por encima de la eficiencia de una sintaxis mayor y más rígida. Valora la riqueza de la connotación por encima del poder de la sintaxis para producir riquezas. Valora la consecuencia imprevisible de la instrucción profesional. Esta reorientación hacia la sorpresa personal, y no hacia los valores producidos por la institución, es capaz de perturbar el orden establecido hasta que podamos separar la creciente disponibilidad de las herramientas tecnológicas que facilitan el encuentro del creciente control del tecnócrata sobre lo que ocurre cuando la gente se reúne.
+
+Nuestras actuales instituciones educativas están al servicio de las metas del profesor. Las estructuras de relación que necesitamos son las que permitan a cada hombre definirse él mismo aprendiendo y contribuyendo al aprendizaje de otros.
+
+# Tramas del aprendizaje
+
+En un capítulo anterior examiné aquello que se está convirtiendo en una queja común acerca de las escuelas una queja que se hace sentir por ejemplo, en un informe reciente de la Carnegie Commission: en las escuelas los alumnos matriculados se someten ante maestros diplomados a fin de obtener sus propios diplomas; ambos quedan frustrados y ambos culpan a los recursos insuficientes —dinero, tiempo o edificios— de su mutua frustración.
+
+Una crítica semejante conduce a muchos a pensar si no será posible concebir un estilo diferente de aprendizaje. Paradójicamente, si a esas mismas personas se les insta a especificar cómo adquirieron lo que saben y estiman, admitirán prontamente que con mayor frecuencia lo aprendieron fuera y no dentro de la escuela. Su conocimiento de hechos, lo que entienden de la vida y de su trabajo les vino de la amistad o del amor, de leer, del ejemplo de sus iguales o de la incitación de un encuentro callejero. O tal vez aprendieron lo que saben por medio del ritual de iniciación de una pandilla callejera, de un hospital, de la redacción de un periódico, de un taller de fontanería o de una oficina de seguros. La alternativa a la dependencia respecto de las escuelas no es el uso de recursos públicos para algún nuevo dispositivo que “haga” aprender a la gente; es más bien la creación de un nuevo estilo de relación educativa entre el hombre y su medio. Para propiciar este estilo será necesaria una modificación de la idea que nos hacemos del crecimiento, de los útiles necesarios para aprender y de la calidad y estructura de la vida cotidiana.
+
+Las actitudes ya están cambiando. Ha desaparecido la orgullosa dependencia respecto de la escuela. En la industria del conocimiento se acrecienta la resistencia del consumidor. Muchos profesores y alumnos, contribuyentes y patronos, economistas y policías, preferirían no seguir dependiendo de las escuelas. Lo que impide que su frustración dé forma a otras instituciones es una carencia no sólo de imaginación, sino también, con frecuencia, de un lenguaje apropiado y de un interés personal ilustrado. No pueden visualizar ya sea una sociedad desescolarizada, ya sean unas instituciones educativas en una sociedad que haya privado de apoyo oficial a la escuela.
+
+En este capítulo me propongo mostrar que lo contrario de la escuela es posible: que podemos apoyarnos en el aprendizaje automotivado en vez de contratar profesores para sobornar u obligar al estudiante a hallar el tiempo y la voluntad de aprender, que podemos proporcionar al aprendiz nuevos vínculos con el mundo en vez de continuar canalizando todos los programas educativos por medio del profesor. Examinaré algunas de las características que distinguen la escolarización del aprendizaje y esbozaré cuatro categorías principales de instituciones que serían atractivas no sólo para muchas personas, sino también para muchos grupos de intereses comunes.
+
+
+## Una objeción a quién pueden servirle unos puentes hacia la nada
+
+Estamos acostumbrados a considerar las escuelas como una variable que depende de la estructura política y económica. Si podemos cambiar el estilo de la dirección política o promover los intereses de una clase u otra, suponemos que el sistema escolar cambiará también. En cambio, las instituciones educativas que propondré están ideadas para servir a una sociedad que no existe ahora, aunque la actual frustración respecto de las escuelas tiene en sí el potencial de una fuerza importante para poner en movimiento un cambio hacia nuevas configuraciones sociales. Contra este planteamiento se ha suscitado una objeción de peso: ¿por qué canalizar energías para construir puentes hacia ninguna parte, en vez de organizarlas primero para cambiar no las escuelas, sino el sistema político y económico?
+
+No obstante, esta objeción subestima la naturaleza política y económica del sistema escolar en sí, así como el potencial político inherente a cualquier oposición eficaz a ella.
+
+En un sentido fundamental, las escuelas han dejado de ser dependientes de la ideología profesada por cualquier gobierno u organización de mercados. Otras instituciones pueden diferir de un país a otro: la familia, el partido, la Iglesia, la prensa. Pero el sistema escolar tiene por doquier la misma estructura, y en todas partes el currículum oculto tiene el mismo efecto. De modo invariable, modela al consumidor que valora los bienes institucionales sobre los servicios no profesionales de un prójimo.
+
+El currículum oculto de la escolarización inicia en todas partes al ciudadano en el mito de que algunas burocracias guiadas por el conocimiento científico son eficientes y benevolentes. Por doquiera, este mismo currículum inculca en el alumno el mito de que la mayor producción proporcionará una vida mejor. Y por doquiera crea el hábito —que se contradice a sí mismo— de consumo de servicios y de producción enajenante, la tolerancia ante la dependencia institucional y el reconocimiento de los escalafones institucionales. El currículum oculto sustenta la tolerancia ante la dependencia institucional, el reconocimiento por los profesores y cualquiera que sea la ideología preponderante.
+
+En otras palabras, las escuelas son fundamentalmente semejantes en todos los países, sean éstos fascistas, democráticos o socialistas, grandes o pequeños, ricos o pobres. La identidad del sistema escolar nos obliga a reconocer la profunda identidad en todo el mundo, del mito, del modo de producción y del método de control social, pese a la gran variedad de mitologías en las cuales encuentra expresión el mito.
+
+En vista de esta identidad, es ilusorio pretender que las escuelas son, en algún sentido profundo, unas variables dependientes. Esto significa que esperar un cambio social o económico concebido convencionalmente, es también una ilusión. Más aún, esta ilusión concede a la escuela —el órgano de reproducción de la sociedad de consumo— una inmunidad casi indiscutida.
+
+Al llegar a este punto es cuando adquiere importancia el ejemplo de China. Durante tres milenios, China protegió el aprendizaje superior por medio de un divorcio total entre el proceso del aprendizaje y el privilegio conferido por los exámenes para optar a altos cargos públicos. Para llegar a ser una potencia mundial y una nación-Estado moderno, China tuvo que adoptar el estilo internacional de escolarización. Sólo una mirada retrospectiva nos permitirá descubrir si la Gran Revolución Cultural resultará haber sido el primer intento logrado de desescolarizar las instituciones de la sociedad.
+
+Incluso la creación a retazos de nuevos organismos educativos que fuesen lo inverso de la escuela sería un ataque sobre el eslabón más sensible de un fenómeno ubicuo, el cual es organizado por el Estado en todos los países. Un programa político que no reconozca explícitamente la necesidad de la desescolarización no es revolucionario; es demagogia que pide más de lo mismo. Todo programa político importante de esta década debiera medirse con este rasero: ¿hasta dónde es claro afirmar la necesidad de la desescolarización —y qué directrices ofrece para asignar la calidad educativa de la sociedad hacia la cual se encamina—?
+
+La lucha contra el dominio que ejercen el mercado mundial y la política de las grandes potencias puede estar fuera del alcance de ciertas comunidades o países pobres, pero esta debilidad es una razón más para hacer hincapié en la importancia que tiene liberar a cada sociedad mediante una inversión de su estructura educativa, cambio este que no está más allá de los medios de ninguna sociedad.
+
+
+## Características generales de unas nuevas instituciones educativas formales
+
+Un buen sistema educativo debería tener tres objetivos: proporcionar a todos aquellos que lo quieren el acceso a recursos disponibles en cualquier momento de sus vidas; dotar a todos los que quieran compartir lo que saben del poder de encontrar a quienes quieran aprender de ellos, y, finalmente, dar a todo aquel que quiera presentar al público un tema de debate la oportunidad de dar a conocer su argumento. Un sistema como éste exigiría que se aplicaran a la educación unas garantías constitucionales. Los aprendices no podrían ser sometidos a un currículum obligatorio o a una discriminación fundada en la posesión o carencia de un certificado o diploma. Ni se obligaría tampoco al público a mantener, mediante una retribución regresiva, un gigantesco aparato profesional de educadores y edificios que de hecho disminuye las posibilidades que el público tiene de acceder a los servicios que la profesión está dispuesta a ofrecer en el mercado. Debería usar la tecnología moderna para lograr que la libre expresión, la libre reunión y la prensa libre fuesen universales y, por consiguiente, plenamente educativas.
+
+Las escuelas están proyectadas a partir del supuesto de que cada cosa en la vida tiene un secreto; de que la calidad de la vida depende de conocer ese secreto; de que los secretos pueden conocerse en ordenadas sucesiones, y de que sólo los profesores pueden revelar adecuadamente esos secretos. Una persona de mente escolarizada concibe el mundo como una pirámide de paquetes clasificados accesible sólo a aquellos que llevan los rótulos apropiados. Las nuevas instituciones educativas destrozarían esta pirámide. Su propósito debe ser facilitar el acceso al aprendiz, permitirle mirar al interior de la sala de control o del parlamento, si no puede entrar por la puerta. Además, esas nuevas instituciones deberían ser canales a los que el aprendiz tuviese acceso sin credenciales ni títulos de linaje —espacios públicos en los que iguales y mayores situados fuera de su horizonte inmediato se harían accesibles—.
+
+Pienso que no más de cuatro —y posiblemente hasta tres— “canales” distintos o centros de intercambio podrían contener todos los recursos necesarios para el aprendizaje real. El niño crece en un mundo de cosas, rodeado de personas que sirven de modelos para habilidades y valores. Encuentra seres como él, sus iguales, que le incitan a discutir, a competir, a cooperar, a entender, y si el niño es afortunado, se ve expuesto a la confrontación o a la crítica de un mayor experimentado que realmente se preocupe. Cosas, modelos, iguales y mayores son cuatro recursos, cada uno de los cuales requiere un tipo diferente de ordenamiento para asegurar que todos tengan acceso a él.
+
+Usaré las palabras “trama de oportunidad” en vez de “red” para designar las maneras específicas de proporcionar acceso a cada uno de los cuatro conjuntos de recursos. Desafortunadamente, “red” se emplea con frecuencia para designar los canales reservados a los materiales seleccionados por terceros para el adoctrinamiento, la instrucción y la recreación. Pero también puede usarse para los servicios postal o telefónico, que son primariamente accesibles para personas que quieren enviarse mensajes entre sí. Ojalá tuviésemos otra palabra para designar tales estructuras reticulares a fin de tener un acceso recíproco, una palabra que no evocase tanto una trampa, menos degradada por el uso corriente, y que sugiriese más el hecho de que cualquier ordenamiento de esta especie abarca aspectos legales, organizativos y técnicos. No habiendo hallado dicho término, trataré de redimir el único disponible, usándolo como sinónimo de “trama educativa”.
+
+Lo que se precisa son nuevas redes, de la cuales el público pueda disponer fácilmente y que estén concebidas para difundir una igualdad de oportunidades para aprender y enseñar.
+
+Para dar un ejemplo: en la televisión y en los magnetófonos se usa el mismo nivel de tecnología. Todos los países latinoamericanos han introducido la televisión: en Bolivia, el gobierno financió una estación transmisora de televisión, que se construyó hace siete años, y no hay más de 7 000 televisores para cuatro millones de ciudadanos. El dinero empozado hoy en instalaciones de televisión por toda América Latina podría haber dotado de magnetófonos a un ciudadano de cada cinco. Además, el dinero habría bastado para proporcionar un número casi ilimitado de cintas grabadas, con puestos de entrega incluso en aldeas perdidas, como también para un amplio suministro de cintas no grabadas.
+
+Esta red de magnetófonos sería, por supuesto, radicalmente diferente de la red actual de televisión. Proporcionaría oportunidades a la libre expresión: letrados y analfabetos podrían, por igual, registrar, preservar, difundir y repetir sus opiniones. La inversión actual en televisión, en cambio, proporciona a los burócratas, sean políticos o educadores, el poder de rociar el continente con programas producidos institucionalmente, que ellos —o sus patrocinadores— deciden que son buenos para el pueblo o que éste los pide.
+
+
+## Cuatro redes
+
+El planteamiento de nuevas instituciones educativas no debiera comenzar por las metas administrativas de un rector director, ni por las metas pedagógicas de un educador profesional, ni por las metas de aprendizaje de una clase hipotética de personas. No debe iniciarse con la pregunta: “¿Qué debiera aprender alguien?”, sino con la pregunta: “¿Con qué tipos de cosas y personas podrían querer ponerse en contacto los que buscan aprender a fin de aprender?”
+
+Alguien que quiera aprender sabe que necesita tanto información como reacción crítica respecto del uso de esta información por parte de otra persona. La información puede almacenarse en personas y en cosas. En un buen sistema educativo el acceso a las cosas debiera estar disponible con sólo pedirlo el aprendiz, mientras el acceso a los informantes requeriría además el conocimiento de terceros. La crítica puede asimismo provenir de dos direcciones: de los iguales o de los mayores, esto es, de compañeros de aprendizaje cuyos intereses inmediatos concuerden con los míos, o de aquellos que me concederán una parte de su experiencia superior. Los iguales pueden ser colegas con quienes suscitar un debate, compañeros para una caminata o lectura juguetona y deleitable (o ardua), retadores en cualquier clase de juegos. Los mayores pueden ser asesores acerca de qué destreza aprender, qué método usar, qué compañía buscar en un momento dado. Pueden ser guías respecto a la pregunta correcta que hay que plantear entre iguales y a la deficiencia de las respuestas a que lleguen. La mayoría de estos recursos son abundantes. Pero convencionalmente ni se les percibe como recursos educativos, ni es fácil el acceso a ellos para fines de aprendizaje, especialmente para los pobres. Debemos idear nuevas estructuras de relación que se monten con el deliberado propósito de facilitar el acceso a estos recursos para el uso de cualquiera que esté motivado a buscarlos para su educación. Para montar estas estructuras tramadas se requieren disposiciones administrativas, tecnológicas y especialmente legales.
+
+Los recursos educativos suelen rotularse según las metas curriculares de los educadores. Propongo hacer lo contrario, y rotular cuatro enfoques diferentes que permitan al estudiante conseguir el acceso a cualquier recurso educativo que pueda ayudarle a definir y lograr sus propias metas:
+
+_1_. Servicios de referencia respecto de Objetos Educativos. Que faciliten el acceso a cosas o procesos usados para el aprendizaje formal. Algunas de estas cosas pueden reservarse para ese fin, almacenadas en bibliotecas, agencias de alquiler, laboratorios y salas de exposición, tales como museos y teatros; otras pueden estar en uso cotidiano en fábricas, aeropuertos o puestas en granjas, pero a disposición de estudiantes como aprendices o en horas de descanso.
+
+_2_. Servicios de habilidades. Que permitan a unas personas hacer una lista de sus habilidades, las condiciones según las cuales están dispuestas a servir de modelos a otros que quieran aprender esas habilidades y las direcciones en que se les puede hallar.
+
+_3_. Servicio de búsqueda de Compañero. Una red de comunicaciones que permita a las personas describir la actividad de aprendizaje a la que desean dedicarse, con la esperanza de hallar un compañero para la búsqueda.
+
+_4_. Servicios de referencia respecto de Educadores Independientes, los cuales pueden figurar en un catálogo que indique las direcciones y las descripciones —hechas por ellos mismos— de profesionales, paraprofesionales e independientes, conjuntamente con las condiciones de acceso a sus servicios. Tales educadores, como veremos, podrían elegirse mediante encuestas o consultando a sus clientes anteriores.
+
+
+## Servicios de referencia respecto de objetos educativos
+
+Las cosas son recursos básicos para aprender. La calidad del entorno y la relación de una persona con él determinarán cuánto aprenderá incidentalmente. El aprendizaje formal exige el acceso especial a cosas corrientes, por una parte o, por la otra, el acceso fácil y seguro a cosas especiales hechas con fines educativos. Un ejemplo del primer caso es el derecho especial a hacer funcionar o a desarmar una máquina en un garaje. Un ejemplo del segundo caso es el derecho general a usar un ábaco, una computadora, un libro, un jardín botánico o una máquina retirada de la producción y puesta a plena disposición de unos estudiantes.
+
+En la actualidad, la atención se centra en la disparidad entre niños ricos y pobres en cuanto a su acceso a cosas y en la manera en que pueden aprender de ellas. La OEO[^n16] y otros organismos, siguiendo este planteamiento, se concentran en igualar las posibilidades de cada cual, tratando de proveer de un mayor instrumental educativo a los pobres. Un punto de partida más radical sería reconocer que, en la ciudad, a ricos y pobres se les mantiene igualmente alejados de manera artificial de las cosas que los rodean. Los niños nacidos en la era de los plásticos y de los expertos en eficiencia deben traspasar dos barreras que obstaculizan sus entendimientos: una incorporada a las cosas y la otra construida en torno a las instituciones. El diseño industrial crea un mundo de cosas que ofrecen resistencia a la comprensión de su naturaleza interna, y las escuelas tapian al aprendiz respecto del mundo de las cosas en su escenario significativo.
+
+Después de una breve visita a Nueva York, una mujer de una aldea mexicana me dijo que le había impresionado que las tiendas vendiesen “solamente productos muy maquillados con cosméticos”. Entendí que ella quería decir que los productos industriales “hablan” a sus clientes acerca de sus encantos y no acerca de su naturaleza. La industria ha rodeado a la gente de artefactos hechos de manera que sólo a los especialistas les está permitido entender su mecanismo interno. Al no especialista que intenta hacer marchar el reloj o hacer sonar el teléfono o hacer funcionar la máquina de escribir, se le desalienta con la advertencia de que se romperá si lo intenta. Puede que se le diga qué hace funcionar un radio de transistores, pero no puede descubrirlo por sí mismo. Este tipo de diseño tiende a reforzar una sociedad no inventiva, en la que los expertos encuentran cada vez más fácil esconderse detrás de su pericia y más allá de una evaluación.
+
+El entorno creado por el hombre ha llegado a ser tan inescrutable como la naturaleza lo es para el primitivo. Al mismo tiempo, los materiales educativos los ha monopolizado la escuela. Los objetos educativos simples han sido costosamente empacados por la industria del conocimiento. Se han convertido en herramientas especializadas para los educadores profesionales, y se ha inflado su coste al obligarles a estimular ya sea entornos, ya sea profesores.
+
+El profesor es celoso del libro de texto al que define como su instrumento profesional. El estudiante puede llegar a odiar el laboratorio porque lo asocia con tareas escolares. El administrador racionaliza su actitud protectora hacia la biblioteca como una defensa de un instrumental público costoso contra quienes quisieran jugar con ella más bien que aprender. En esta atmósfera, el estudiante usa con excesiva frecuencia el mapa, el laboratorio, la enciclopedia o el microscopio sólo en los escasos momentos en que el currículum le dice que debe hacerlo. Incluso los grandes clásicos se convierten en arte de la “novatada” universitaria, en vez de señalar una nueva dirección en la vida de una persona. La escuela aparta las cosas del uso cotidiano al rotularlas como instrumentos educativos.
+
+Para que podamos desescolarizar será preciso invertir ambas tendencias. El entorno físico general debe hacerse accesible, y aquellos recursos físicos de aprendizaje que han sido reducidos a instrumentos de enseñanza deben llegar a estar disponibles para el aprendizaje autodirigido. Usar cosas sólo como partes de un currículum puede tener un efecto incluso peor que apartarlas del entorno general. Puede corromper las actitudes de los alumnos.
+
+Los juegos son un caso de este tipo. No me refiero a los “juegos” del departamento de educación física (tales como el futbol o el baloncesto), que las escuelas usan para generar ingresos y prestigio y en los que han hecho sustanciosas inversiones de capital. Como lo saben muy bien los mismos atletas, estas empresas, que adoptan la forma de torneos guerreros, han minado el aspecto juguetón de los deportes y se usan para reforzar la naturaleza competitiva de las escuelas. Hablo más bien de los juegos educativos que pueden proporcionar una manera singular de entender los sistemas formales. Un amigo mío fue a un mercado mexicano con un juego llamado _Wff’n Proff_ , que consta de varios dados en los que están impresos 12 símbolos lógicos. Mostró a unos niños qué combinaciones formaban una frase bien hecha —unas dos o tres de las muchas posibles— e, inductivamente, al cabo de la primera hora, algunos mirones también captaron el principio. A las pocas horas, jugando pruebas lógicas formales, algunos niños eran capaces de iniciar a otros en las pruebas formales de la lógica de proposiciones. Los otros simplemente se fueron.
+
+Para algunos niños dichos juegos son en efecto una forma especial de liberar la educación, puesto que les permite descubrir que los sistemas formales se fundan en axiomas mutables y que las operaciones conceptuales tienen un carácter lúdico. Son asimismo simples, baratos y en buena parte pueden organizarlos los jugadores mismos. Cuando se usan fuera del currículum, tales juegos dan una oportunidad para identificar y desarrollar el talento poco común, mientras que el psicólogo escolar identificará a menudo a quienes posean dicho talento como a personas en peligro de llegar a ser antisociales, enfermas o desequilibradas. Dentro de la escuela, cuando se usan en forma de torneos, a los juegos no sólo se les saca de la esfera de la recreación, a menudo se convierten en instrumentos para transformar al alumno juguetón en un espíritu competitivo y la falta de razonamiento abstracto en signo de inferioridad. Un ejercicio que para ciertos tipos de carácter es liberador, se convierte en camisa de fuerza para otros.
+
+El control de la escuela sobre el instrumental educativo tiene además otro efecto. Aumenta enormemente el coste de esos materiales baratos. Una vez que su uso se restringe a unas horas programadas, se paga a profesionales que supervisen su adquisición, almacenamiento y uso. Entonces los estudiantes descargan su rabia contra la escuela sobre el instrumental, que es preciso adquirir nuevamente.
+
+Algo paralelo a la intocabilidad de los útiles educativos es la impenetrabilidad de la moderna chatarra. En la década de 1930 cualquier muchacho que se respetara sabía reparar un automóvil, pero ahora los fabricantes de coches multiplican los alambres y apartan los manuales de todo el que no sea un mecánico especializado. En un periodo anterior un radio viejo contenía suficientes bobinas y condensadores como para construir un transmisor que hiciera chillar por realimentación a todos los radios del vecindario. Los radios de transistores son más portátiles, pero nadie se atreve a desarmarlos. En los países altamente industrializados sería inmensamente difícil cambiar esto, pero al menos en los países del Tercer Mundo debemos insistir en ciertas cualidades educativas incorporadas al objeto.
+
+Para ilustrar mi argumento, permítaseme presentar un modelo: gastando 10 millones de dólares sería posible conectar 40 000 aldeas de un país como Perú mediante una telaraña de pistas de un metro ochenta de ancho y mantenerlas funcionando; además, dotar al país de 200 000 burros mecánicos de tres ruedas —cinco por aldea como promedio—. Pocos países pobres de ese tamaño gastan menos de esa cantidad cada año en coches y caminos, cuyo uso, el de ambos, se limita principalmente a los ricos y a sus empleados, mientras la gente pobre queda atrapada en sus aldeas. Cada uno de estos pequeños vehículos, simples pero duraderos, equipados con un motor de seis caballos de fuerza, costaría 125 dólares. Un “burro” podría andar a 24 kilómetros por hora, y trasladaría cargas de unos 400 kilogramos (es decir, la mayoría de las cosas que suelen moverse, aparte de troncos y vigas de acero).
+
+El atractivo político que dicho sistema de transporte tendría para el campesinado es obvio. Igualmente obvio es el motivo por el cual quienes detentan el poder —y por tanto poseen, automáticamente, un coche— no están interesados en gastar dinero en pistas semejantes y en obstruir los caminos con burros motorizados. El burro universal podría funcionar sólo si los dirigentes de un país impusieran un límite de, digamos, 40 kilómetros por hora y adaptaran sus instituciones públicas a ese límite. El modelo no podría funcionar si estuviese concebido sólo como un parche.
+
+No es éste el lugar apropiado para examinar en detalle la factibilidad política, social, económica, financiera y técnica de este modelo. Deseo solamente indicar que los considerandos educativos pueden ser de primordial importancia cuando se elige una alternativa semejante frente a un transporte que usa relativamente más capital que mano de obra. Aumentando el coste unitario de cada burro 20% se haría posible planificar la producción de todas sus piezas de modo que, hasta donde fuera posible, cada futuro dueño pasase de uno a dos meses haciendo y entendiendo su máquina y fuese capaz de repararla. Con este coste adicional sería asimismo posible descentralizar la producción en fábricas dispersas. Las ventajas adicionales provendrían no sólo de incluir los costes educativos en el proceso de construcción. Más significativo todavía, un motor duradero que prácticamente cualquiera podría aprender a reparar y que podría usar como arado y como bomba aquel que lo entendiera, produciría unos beneficios educativos mucho más elevados que los inescrutables motores de los países avanzados.
+
+No sólo la chatarra, sino los lugares presuntamente públicos de la ciudad moderna se han vuelto impenetrables. En la sociedad estadunidense se excluye a los niños de la mayoría de las cosas y lugares con el argumento de que son privados. Pero incluso en las sociedades que han declarado el fin de la propiedad privada se aparta a los niños de las mismas cosas y lugares porque estos últimos se consideran un ámbito especial y peligroso para el no iniciado. A partir de la pasada generación el patio de los ferrocarriles se hizo tan inaccesible como el cuartel de bomberos. Sin embargo, con un poco de ingenio no sería difícil eliminar los peligros en esos lugares. El desescolarizar los artefactos de la educación haría necesario poner a disposición los artefactos y procesos —y reconocer su valor educativo—. Algunos trabajadores, sin duda, encontrarían molesto hacerlos accesibles a los aprendices, pero esta molestia debe valorarse comparándola con las ventajas educativas.
+
+Los automóviles privados podrían desterrarse de Manhattan. Hace cinco años esto era impensable. Ahora, ciertas calles de Nueva York se cierran a ciertas horas, y esta tendencia probablemente continuará. De hecho, la mayoría de las calles transversales deberían cerrarse al tránsito automotriz y el estacionamiento debería prohibirse en todas partes. En una ciudad abierta al pueblo, los materiales de enseñanza, que ahora se encierran en almacenes y laboratorios, podrían diseminarse en depósitos abiertos a la calle y gestionarse de manera independiente para que los adultos y los niños pudiesen visitarlos sin peligro de que los atropellen.
+
+Si las metas de la educación ya no estuviesen dominadas por las escuelas y los maestros de escuela, el mercado para los aprendices sería mucho más variado y la definición de “artefactos educativos” sería menos restrictiva. Podría haber talleres de herramientas, bibliotecas, laboratorios y salas de juegos. Los laboratorios fotográficos y prensas offset permitirían el florecimiento de diarios vecinales. Algunos centros de aprendizaje abiertos a la calle podrían contener cabinas para mirar programas de televisión en circuito cerrado, otros podrían poseer útiles de oficina para usar y para reparar. Los tocadiscos del tipo tragamonedas y de tipo corriente serían de uso diario, especializándose algunos en música clásica, otros en melodías folclóricas internacionales, otros en jazz. Las filmotecas competirían entre sí y con la televisión comercial. Los locales de museos abiertos al público podrían ser redes para poner en circulación muestras de arte antiguo y moderno, originales y reproducciones, tal vez administradas por los diversos museos metropolitanos.
+
+El personal profesional necesario para esta red se parecería mucho más a unos custodios, guardias de museo o bibliotecarios de servicio público que a unos profesores. Desde la tienda de biología de la esquina podrían dirigir a sus clientes a la colección de caracoles del museo o señalarles cuándo habría una exhibición de videocintas de biología en determinadas cabinas de televisión. Podrían dar indicaciones para el control de plagas, dietas y otras clases de medicina preventiva. Podrían remitir a quienes necesitaran consejos a “mayores” que pudiesen proporcionarlo.
+
+El financiamiento de una red de “objetos de aprendizaje” puede encararse de dos maneras. Una comunidad podría fijar un presupuesto máximo para este fin y disponer que todas las partes de la red estuviesen abiertas a todos los visitantes a ciertas horas razonables. O bien la comunidad podría decidir proporcionar a los ciudadanos unos bonos o derechos limitados, según sus edades, que les darían acceso especial a ciertos materiales costosos y escasos, dejando en cambio otros materiales más simples a disposición de todos.
+
+Encontrar recursos para materiales hechos específicamente para educar es sólo un aspecto —y tal vez el menos costoso— de la construcción de un mundo educativo. El dinero que hoy se gasta en la parafernalia sagrada del ritual escolar podría liberarse para proporcionar a todos los ciudadanos un mejor acceso a la vida real de la ciudad. Podrían otorgarse incentivos tributarios especiales a quienes emplearan niños de ocho a 14 años durante un par de horas diarias si las condiciones de empleo fuesen humanas. Deberíamos volver a la tradición de la _bar mitzvah_ o de la confirmación. Quiero decir con esto que debiéramos primero restringir y luego eliminar la privación de derechos y deberes civiles de los menores, y permitir que un muchacho de 12 años llegue a ser plenamente responsable de su participación en la vida de la comunidad. Muchas personas de “edad escolar” saben más acerca de su vecindario que los trabajadores sociales o los concejales. Naturalmente que hacen también preguntas más incómodas y proponen soluciones que amenazan a la burocracia. Debería permitírseles llegar a la mayoría de edad de modo que pusieran sus conocimientos y capacidad de indagación al servicio de un gobierno popular.
+
+Hasta hace poco era fácil subestimar los peligros de la escuela en comparación con los peligros de un periodo de aprendizaje en la policía, en el cuerpo de bomberos o en la industria del espectáculo. Este argumento deja de ser válido con gran frecuencia. Visité recientemente una iglesia metodista de Harlem ocupada por un grupo de los llamados _Young Lords_ como protesta por la muerte de Julio Rodan, un muchacho puertorriqueño al que se encontró ahorcado en su celda carcelaria. Yo conocía a los líderes del grupo, que habían pasado un semestre en Cuernavaca. Cuando me sorprendí al no hallar a uno de ellos, Juan, en el grupo, me dijeron: “Volvió a la heroína y a la Universidad del Estado”.
+
+Para desencadenar el potencial educativo encerrado en la gigantesca inversión de nuestra sociedad en instalaciones y útiles pueden usarse el planteamiento, los incentivos y la legislación. No existirá el acceso pleno a los objetos educativos mientras se permita a empresas comerciales conjugar las defensas legales que la Carta Fundamental reserva a la vida privada de las personas con el poder económico que les confieren sus millones de clientes y miles de empleados, accionistas y proveedores. Una parte considerable de los conocimientos prácticos y teóricos del mundo y la mayoría de sus procesos y equipos de producción están encerrados entre los muros de firmas comerciales, apartados de sus clientes, empleados y accionistas, como también del público en general, cuyas leyes e instalaciones les permiten funcionar. El dinero que se gasta en publicidad en los países capitalistas podrían canalizarse hacia la educación en y por parte de la General Electric, NBC-TV o cervezas Budweiser. Es decir, las fábricas y oficinas deberían reorganizarse de forma tal que su funcionamiento cotidiano fuese más accesible al público y de maneras que hiciesen posible el aprendizaje, y, en verdad, podrían hallarse modos de pagar a las compañías lo que la gente aprendiese en ellas.
+
+Es posible que un conjunto de objetos e informaciones científicas aún más valioso esté apartado del acceso general —e incluso de los científicos competentes— bajo el pretexto de la seguridad nacional. Hasta hace poco la ciencia era el único foro que funcionaba como el sueño de un anarquista. Cada hombre capaz de realizar investigaciones tenía más o menos las mismas oportunidades que otros en cuanto a acceso a su instrumental y a ser escuchado por la comunidad de iguales. Ahora la burocratización y la organización han puesto a gran parte de la ciencia fuera del alcance del público. En efecto, lo que solía ser una red internacional de información científica ha sido escindida en una lid de grupos competidores. Tanto a los miembros como a los artefactos de la comunidad científica se les ha encerrado en programas nacionales y corporativos para logros prácticos y para el radical empobrecimiento de los hombres que mantienen estas naciones y corporaciones.
+
+En un mundo que controlan y poseen naciones y compañías, nunca será posible sino un acceso limitado a los objetos educativos. Pero un mejor acceso a aquellos objetos que pueden compartirse para fines educativos puede ilustrarnos lo suficiente como para traspasar estas barreras políticas finales. Las escuelas públicas transfieren el control sobre los usos educativos de los objetos de manos privadas a manos profesionales. La inversión institucional de las escuelas podría dar al individuo el poder de volver a exigir el derecho a usarlos para su educación. Si el control privado o corporativo sobre el aspecto educativo de las “cosas” se lograse extinguir gradualmente, podría comenzar a aparecer un tipo de propiedad realmente pública.
+
+
+## Servicios de habilidades
+
+Al revés de lo que ocurre con una guitarra, a un profesor de ese instrumento no se le puede clasificar en un museo, ni lo puede poseer el público, ni se le puede tomar en alquiler en un almacén de elementos educativos. Los profesores de habilidades pertenecen a una clase de recursos que es diferente de la de los objetos necesarios para aprender una habilidad. Esto no quiere decir que sean indispensables en todos los casos. Puedo alquilar no sólo una guitarra, sino también lecciones de guitarra grabadas en cintas y gráficos que ilustren los acordes, y con estos elementos puedo enseñarme yo mismo a tocar la guitarra. De hecho, este sistema puede presentar ventajas si las cintas disponibles son mejores que los profesores disponibles, o si las únicas horas en que puedo aprender guitarra son nocturnas o si las melodías que quiero interpretar son desconocidas en mi país o si soy tímido y prefiero meter la pata sin testigos.
+
+El canal que se usa para registrar a los profesores de habilidades y comunicarse con ellos debe ser diferente al descrito para objetos. Una cosa está disponible a petición del usuario —o podría estarlo— mientras una persona llega formalmente a ser una fuente de enseñanza de habilidades sólo cuando considere serlo y pueda asimismo restringir la ocasión, el lugar y el método a su tamaño.
+
+Es también necesario distinguir a los profesores de los iguales de los que uno desearía aprender. Los iguales que desean seguir una búsqueda común deben partir de capacidades o intereses comunes; se juntan para ejercitar o mejorar una habilidad que comparten: baloncesto, baile, construcción de un campamento, debate sobre las próximas elecciones. Por otra parte, la primera transmisión de una habilidad supone el reunir a alguien que posea una destreza con alguien que no la posea y quiera adquirirla.
+
+Un “modelo de habilidad” es una persona que posee una habilidad y está dispuesta a demostrar su práctica. Frecuentemente el aprendiz en potencia precisa el recurso de una demostración de esta clase. Los inventos modernos nos permiten registrar demostraciones en cinta, en película o en gráficos; no obstante, sería de esperar que la demostración personal continuase gozando de gran demanda, especialmente en las habilidades de comunicación. En nuestro Centro, en Cuernavaca, han aprendido español unos 10 000 adultos —en su mayoría personas muy motivadas que deseaban obtener una cuasi-fluidez en un segundo idioma—. Cuando se les plantea la elección entre una instrucción cuidadosamente programada en un laboratorio de idiomas o sesiones rutinarias con otros dos estudiantes y una persona cuyo idioma nativo es el español y que se ciñe a una rutina rígida, la mayoría prefiere la segunda alternativa.
+
+Respecto de la mayor parte de las habilidades ampliamente compartidas, que una persona demuestre su habilidad es el único recurso humano que llegamos a necesitar u obtener. Ya sea para hablar o para conducir, para cocinar o para usar equipos de comunicaciones, a menudo apenas nos damos cuenta de la instrucción y el aprendizaje formales, especialmente después de nuestra primera experiencia con los materiales en cuestión. No veo razón por la cual no pudiesen aprenderse de igual manera otras habilidades complejas, tales como los aspectos mecánicos de la cirugía, tocar el violín, leer o usar listas y catálogos.
+
+Un estudiante bien motivado que no lucha contra una desventaja determinada a menudo no necesita más ayuda humana que la que puede proporcionar alguien que puede demostrar a quien lo solicite cómo hacer lo que el aprendiz quiere hacer. Aquello de insistir a personas diestras en que antes de demostrar su habilidad certifiquen que son pedagogos es el resultado de la insistencia de una de dos alternativas: o que la gente aprenda lo que no quiere saber, o bien que todos —incluso quienes sufren de alguna desventaja especial— aprendan ciertas cosas, en un momento dado de sus vidas, y preferentemente en circunstancias específicas.
+
+Lo que crea una escasez de habilidades en el mercado educativo de hoy es el requisito institucional de que quienes pueden demostrarlas no pueden hacerlo a menos de otorgárseles pública confianza por medio de un certificado. Insistimos en que aquellos que ayudan a terceros a adquirir una habilidad habrían de saber también diagnosticar las dificultades de aprendizaje y ser capaces de motivar a la gente a aprender habilidades. En resumen, les exigimos ser pedagogos. Habría abundancia de personas que pueden demostrar habilidades tan pronto aprendiéramos a reconocerlas fuera de la profesión de la enseñanza.
+
+Cuando se está enseñando a unos principitos, es comprensible, aunque ha dejado de ser justificable, la insistencia de sus padres en que el profesor y la persona dotada de habilidades se conjuguen en una misma persona. Pero el que todos los padres aspiren a tener un Aristóteles para su Alejandro es obviamente insostenible. Las personas que pueden inspirar a los estudiantes y demostrar una técnica son tan escasas, y tan difíciles de reconocer, que hasta los principitos consiguen con mayor frecuencia un sofista y no un verdadero filósofo.
+
+Una demanda de habilidades escasas puede satisfacerse rápidamente aun cuando hay un número pequeño de personas que las demuestren, pero debe facilitarse el acceso a dichas personas. Durante la década de 1940-1950, los reparadores de radios, la mayoría de los cuales no estudiaron su trabajo en escuelas, penetraron en el interior de América con no más de dos años de retraso respecto a la llegada de los radios a la región. Permanecieron allí hasta que los radios de transistores, baratos e imposibles de reparar, los dejaron cesantes. Las escuelas técnicas no logran realizar lo que algunos reparadores de radios podrían hacer sin problemas: restauraciones útiles y duraderas.
+
+Ciertos intereses privados y convergentes conspiran hoy para impedir que una persona comparta su habilidad. A quien posee la habilidad le beneficia su escasez y no su reproducción. Al maestro que se especializa en transmitir la habilidad le beneficia la renuencia del artesano a ofrecer su propio taller para aprendices. Al público se le adoctrina con la creencia de que las habilidades son valiosas y de fiarse sólo si son el resultado de una escolarización formal. El mercado de trabajo depende de hacer escasas las habilidades y de mantenerlas escasas, ya sea proscribiendo su uso a transmisión no autorizada, o bien haciendo cosas que puedan operar y reparar sólo quienes tengan acceso a herramientas o informaciones que se mantienen en déficit.
+
+De este modo, las escuelas producen escasez de personas especializadas. Un buen ejemplo de esto es el número decreciente de enfermeras en Estados Unidos, debido al rápido aumento de programas universitarios de cuatro años en ese ramo. Las mujeres de familias más pobres que anteriormente se habrían alistado en un programa de dos o tres años, se han alejado por completo de dicha profesión.
+
+Otra manera de mantener la escasez de habilidades es insistir en maestros diplomados. Si se alentara a las enfermeras a adiestrar a otras enfermeras, y si a las enfermeras se les empleara de acuerdo con su habilidad demostrada para poner inyecciones, trazar gráficos y dar medicinas, pronto se terminaría la escasez de enfermeras capacitadas. Los certificados tienden hoy a coartar la libertad de la educación al convertir el derecho civil de compartir conocimientos en el privilegio de la libertad académica que ahora se confiere sólo a los empleados de alguna escuela. Para garantizar el acceso a un intercambio eficaz de habilidades necesitamos leyes que generalicen la libertad académica. El derecho a enseñar cualquier habilidad debería estar amparado por la libertad de expresión. Una vez que se eliminen las restricciones sobre la enseñanza, pronto desaparecerán también las relativas al aprendizaje.
+
+El profesor de habilidades necesita algún incentivo para otorgar sus servicios a un alumno. Hay por lo menos dos maneras sencillas de comenzar a canalizar fondos públicos hacia profesores no diplomados. Una sería institucionalizar los servicios de habilidades mediante la creación de centros de habilidades, libres y abiertos al público. Dichos centros podrían y deberían establecerse en zonas industriales, al menos para habilidades que son un requisito indispensable para ingresar en ciertos noviciados o aprendizajes —habilidades tales como la lectura, la mecanografía, la contabilidad, los idiomas extranjeros, la programación de computadoras y la manipulación de números, la lectura de lenguajes especiales (como el de los circuitos eléctricos), la manipulación de ciertas máquinas, etc.—. Otro planteamiento sería proporcionar a ciertos grupos de la población una moneda educativa válida para asistir a centros de habilidades en los que otros clientes habrían de pagar tarifas comerciales.
+
+Un planteamiento mucho más radical consistiría en crear un “banco” para el intercambio de habilidades. A cada ciudadano se le abriría un crédito básico con el que pudiese adquirir habilidades fundamentales. Luego, se beneficiaría con créditos adicionales enseñando, ya fuera en centros de habilidades organizados, en casa o sobre la marcha. Sólo aquellos que hubiesen enseñado a otros durante un lapso equivalente podrían solicitar el tiempo de profesores más avanzados. Se promovería una élite enteramente nueva, una élite formada por quienes hubiesen ganado su educación compartiéndola.
+
+¿Deberían los padres tener el derecho a ganar crédito educativo para sus hijos? Como una disposición de este tipo daría nuevas ventajas a las clases privilegiadas, podría compensarse otorgando un crédito mayor a los desfavorecidos. El funcionamiento de un servicio de habilidades dependería de la existencia de organismos que facilitarían el desarrollo de información —listas de personas— y asegurarían su uso libre y barato. Dicho organismo podría proporcionar servicios auxiliares de prueba y certificación y ayudaría a poner en vigor la legislación necesaria para quebrar e impedir las prácticas monopólicas.
+
+La libertad de un servicio universal de habilidades podría estar garantizada fundamentalmente por leyes que permitiesen la discriminación sólo de acuerdo con habilidades verificadas y no según el historial educativo. Una garantía semejante requiere inevitablemente un control público sobre las pruebas que puedan usarse para determinar quiénes están capacitados para el mercado laboral. De otra manera sería posible reintroducir subrepticiamente complejas baterías de _test_ en el lugar mismo de trabajo que servirían para selección social. Mucho podría hacerse a fin de lograr objetividad en las pruebas de competencia en habilidades, como por ejemplo permitir que se comprobara sólo el manejo de máquinas o sistemas específicos. Las pruebas de mecanografía (en las que se mediría la velocidad, el número de errores y se valoraría el saber tomar dictados), el dominio de un sistema contable o de una grúa hidráulica, la codificación en Cobol,[^n17] etc., pueden fácilmente hacerse objetivas.
+
+De hecho, muchas de las verdaderas habilidades de importancia práctica pueden verificarse de ese modo. Y para los fines de administración de personal es mucho más útil una prueba sobre el nivel presente de competencia en determinada habilidad que la información sobre el hecho de que 20 años atrás una persona dejó satisfecho a su profesor respecto de un currículum en el que se enseñaba mecanografía, taquigrafía y contabilidad. Naturalmente puede ponerse en duda la necesidad misma de una comprobación oficial de habilidades: yo tengo la convicción de que el hecho de imponer ciertas restricciones constituye una mejor garantía para el derecho que un hombre tiene a que su reputación no sufra daños indebidos provenientes de una rotulación, que la garantía lograda al prohibir pruebas de competencia.
+
+
+## Servicio de búsqueda de compañero
+
+En el peor de los casos, las escuelas reúnen condiscípulos en la misma habitación y los someten a la misma secuencia de tratamiento en matemáticas, educación cívica y lenguaje. En el mejor, permiten a cada estudiante elegir un curso de entre un número limitado de ellos. En cualquier caso, se forman grupos de iguales en torno a las metas de los profesores. Un sistema conveniente de educación permitiría a cada persona especificar la actividad para la cual busca un compañero.
+
+La escuela ofrece efectivamente a los niños una oportunidad para escapar de sus casas y encontrar nuevos amigos. Pero al mismo tiempo, este proceso inculca en ellos la idea de que deberían elegir sus amigos entre aquellos con quienes han sido congregados. El invitar a los menores desde su más tierna infancia a conocer, evaluar y buscar a otros los prepararía para mantener durante toda su vida el interés por buscar nuevos asociados para nuevos empeños.
+
+A un buen jugador de ajedrez siempre le gusta hallar un buen adversario, y a un novato le alegra hallar otro. Los clubes les sirven para este fin. Las personas que quieren conversar sobre determinados libros o artículos probablemente pagarían por hallar compañeros de debate. Los que quieren practicar juegos, ir de excursión, construir estanques para peces o motorizar bicicletas se tomarán molestias considerables para hallar compañeros para ello. El premio de sus esfuerzos es encontrar esos compañeros. Las buenas escuelas tratan de poner al descubierto los intereses comunes de los estudiantes matriculados en los mismos programas. Lo inverso de la escuela sería una institución que aumentase las posibilidades de que las personas que en un determinado momento compartiesen el mismo interés específico, pudiesen encontrarse independientemente de que tuviesen otra cosa en común.
+
+La enseñanza de habilidades no proporciona beneficios iguales a ambas partes, como lo hace la reunión de iguales. Tal como he señalado, al profesor de habilidades debe ofrecérsele algún otro incentivo aparte de las satisfacciones de enseñar. La enseñanza de habilidades es un asunto de repetir una y otra vez ciertas rutinas y de hecho es más tediosa para los alumnos que más la necesitan. Un servicio de habilidades necesita dinero o créditos u otros incentivos tangibles para funcionar, aun cuando el servicio mismo produjese su propia moneda. Un sistema de búsqueda de compañero no precisaría tales incentivos, sino sólo una red de comunicaciones.
+
+Las cintas, los sistemas de informática, la instrucción programada y la reproducción de formas y de sonidos tienden a disminuir la necesidad de recurrir a profesores humanos para muchas habilidades; aumentan la eficiencia de los profesores y el número de habilidades que uno puede conseguir a lo largo de su vida. Paralelamente a este aspecto se ha creado la necesidad creciente de encontrarse con gente interesada en disfrutar de la habilidad recientemente adquirida. Una estudiante que haya aprendido griego antes de sus vacaciones querrá conversar en griego sobre política cretense cuando regrese. Un mexicano de Nueva York quiere hallar a otros lectores de la revista _Siempre!_ o de _Los Agachados_ , la más popular de las historietas. Algún otro quiere encontrar compañeros que, como él, desearían aumentar su interés en la obra de James Baldwin o de Bolívar.
+
+El funcionamiento de una red para búsqueda de compañeros sería simple. El usuario se identificaría por su nombre y dirección y describiría la actividad para la cual estuviese buscando compañero. Una computadora le remitiría los nombres y direcciones de todos aquellos que hubiesen introducido la misma descripción. Es asombroso que un servicio público tan sencillo no se haya usado nunca en gran escala para actividades de valor público.
+
+En su forma más rudimentaria, la comunicación entre cliente y computadora podría establecerse por correo. En las grandes ciudades, unas máquinas de escribir conectadas a una computadora podrían proporcionar respuestas instantáneas. La única manera de conseguir que la computadora entregase un nombre y dirección sería anotar una actividad para la cual se buscase un compañero. Las personas que utilizasen el sistema llegarían a ser conocidas únicamente por sus posibles compañeros de actividad.
+
+Un complemento de la computadora podría ser una red de pizarras o cuadros de anuncios y de avisos clasificados de periódico, consistentes en listas de actividades para las cuales no se hubiese hallado compañero mediante la computadora. No sería necesario dar nombres. Los lectores interesados introducirían entonces sus nombres en el sistema. Es posible que un sistema de búsqueda de compañero, con patrocinio público, sea la única manera de garantizar la libertad de reunión y de adiestrar a la gente en el ejercicio de esta actividad cívica tan fundamental.
+
+El derecho a la libre reunión ha sido reconocido políticamente y aceptado socialmente. Deberíamos entender ahora que este derecho está restringido por leyes que hacen obligatorias ciertas formas de reunión. Éste es en particular el caso de las instituciones que reclutan según edad, clase o sexo, y que consumen muchísimo tiempo. El ejército es un ejemplo. La escuela es otro aún más ofensivo.
+
+Desescolarizar significa abolir el poder de una persona para obligar a otra a asistir a una reunión. Significa también reconocer el derecho de cualquier persona, de cualquier edad o sexo, a convocar una reunión. Este derecho se ha visto drásticamente disminuido por la institucionalización de las reuniones. “Reunión” se refería originalmente al resultado del acto individual de juntarse. Ahora se refiere al producto institucional de algún organismo.
+
+La capacidad de las instituciones de servicio para adquirir clientes ha sobrepasado con mucho la capacidad de las personas para ser oídas con independencia de los medios de información institucional, que reaccionan ante personas individuales sólo si son noticias vendibles. Deberían existir servicios de búsqueda de compañero para personas que quisiesen reunir a otras, de modo que fuese tan fácil como la campana de la aldea que convocaba a los aldeanos a un cabildo. Los edificios escolares —dudosamente adaptables para otros fines— podrían cumplir en muchos casos este objetivo.
+
+De hecho, el sistema escolar puede encontrarse pronto con un problema que las Iglesias han enfrentado anteriormente: qué hacer con el espacio sobrante que ha quedado con la defección de los fieles. Las escuelas son difíciles de vender como templos. Una manera de continuar manteniéndolas en uso sería entregar esos edificios al vecindario. Cada cual podría manifestar lo que haría en el aula y cuándo, y algunos anuncios pondrían los programas disponibles en conocimiento de quien indagara. El acceso a “clase” sería gratis —o se compraría con bonos educativos—. El “profesor” podría incluso pagarse según el número de alumnos que atrajese por cualquier periodo completo de dos horas. Me imagino que los líderes muy jóvenes y los grandes educadores serían los dos tipos de persona más destacados en semejante sistema. Podría seguirse igual planteamiento respecto de la educación superior. Podría dotarse a los estudiantes de bonos educativos que los hicieran acreedores a 10 horas anuales de consulta con el profesor de su elección y, para el resto de su aprendizaje, se apoyaría en la biblioteca, la red para búsqueda de compañeros y los periodos de aprendiz.
+
+Naturalmente, debemos reconocer la probabilidad de que se abuse de esos dispositivos públicos de búsqueda para fines inmorales y de explotación, tal como se ha abusado de los teléfonos y del correo. Se requeriría cierta protección semejante a la que se usa para esas redes. En otras páginas he propuesto un sistema de búsqueda de compañero que permitiría usar sólo una información impresa pertinente, más el nombre y la dirección del averiguador. Un sistema de esta especie sería prácticamente a prueba de abusos. Otra medida sería permitir que se agregase cualquier libro, película, programa de televisión u otro artículo que figurase en un catálogo especial. La preocupación acerca de los peligros del sistema no debe hacernos perder de vista sus beneficios, tanto mayores.
+
+Algunos que comparten mi preocupación por la libertad de expresión y la reunión alegarán que el sistema de búsqueda de compañero es un medio artificial de juntar personas y que no lo utilizarían los pobres —que son quienes más lo necesitan—. Hay personas que auténticamente se alborotan cuando uno sugiere montar encuentros _ad hoc_ que no tengan su raíz en la vida de una comunidad local. Otros reaccionan cuando uno sugiere usar una computadora para entresacar y conjuntar intereses que algunos clientes del sistema hayan definido. No es posible reunir a las personas de una manera tan impersonal, dicen. La búsqueda en común debe estar arraigada en una historia de experiencias compartidas a muchos niveles, y debe nacer de esta experiencia —el desarrollo de instituciones vecinales, por ejemplo—.
+
+Simpatizo con estas objeciones, pero creo que no comprenden el verdadero sentido de lo que persigo y no dan tampoco con lo que ellos mismos persiguen. En primer lugar, el retorno a la vida vecinal como centro primario de expresión creativa podría de hecho ser contraproducente para volver a establecer los vecindarios como unidades políticas. Centrar las demandas sobre el barrio o vecindario podría, en efecto, descuidar un importante aspecto liberador de la vida urbana —el que una persona pueda participar simultáneamente en varios grupos de sus iguales—. Además, existe un sentido importante: personas que jamás han vivido juntas en una comunidad física pueden tener ocasionalmente muchas más experiencias por compartir que quienes se han conocido desde la infancia. Las grandes religiones han reconocido siempre la importancia de estos encuentros lejanos, y los fieles han hallado siempre libertad mediante ellos: los peregrinajes, el monacato y el mutuo apoyo de templos y santuarios son reflejos de este reconocimiento. La conjunción de iguales podría ayudar significativamente a hacer explícitas las numerosas comunidades en potencia, aunque reprimidas, que existen en la ciudad.
+
+Las comunidades locales son valiosas. Son también una realidad que se desvanece conforme los hombres dejan que las instituciones definan cada vez más sus círculos de relación social. En un libro reciente, Milton Kotler mostró que el imperialismo del “centro” de la ciudad priva al barrio de su significación política. El intento proteccionista de resucitar la barriada como unidad cultural sólo sirve de apoyo a este imperialismo burocrático. Lejos de apartar artificialmente a la gente de su contexto local para unirla con grupos abstractos, el servicio de búsqueda de compañero alentaría un renacer de la vida local en las ciudades de las cuales está desapareciendo hoy en día. Un hombre que recupere su iniciativa para llamar a sus prójimos a sostener una conversación significativa, puede dejar de conformarse con estar separado de ellos por el protocolo oficinesco o por la etiqueta suburbana. Habiendo visto por una vez que el hacer cosas en conjunto depende del decidir hacerlo, la gente posiblemente insista incluso en que su comunidad local se haga más abierta al intercambio político creativo.
+
+Debemos reconocer que la vida urbana tiende a hacerse inmensamente costosa conforme a los habitantes de la ciudad se les enseña a confiar en complejos servicios institucionales para satisfacer cada una de sus necesidades. Es extraordinariamente costoso incluso mantenerla en un nivel mínimo de habitabilidad. El servicio de búsqueda de compañero de aprendizaje en la ciudad podría ser un primer paso para romper la dependencia de los ciudadanos respecto de servicios burocráticos.
+
+Sería también una medida esencial para proporcionar nuevos medios de establecer la confianza pública. En una sociedad escolarizada hemos llegado a confiar cada día más en el juicio profesional de educadores sobre el efecto de su propia labor para decidir en quién podemos o no confiar: vamos al médico, al abogado o al psicólogo porque confiamos en que cualquiera que ha tenido la cantidad requerida de tratamiento educativo especializado a manos de otros colegas merece nuestra confianza.
+
+En una sociedad desescolarizada, los profesionales ya no pueden reclamar la confianza de sus clientes a partir de su historial curricular o asegurar su prestigio con sólo remitir a sus clientes a otros profesionales que dieron aprobación a su escolarización. En vez de depositar su confianza en profesionales, debería ser posible, en cualquier momento, que cualquier presunto cliente consultase con otros clientes experimentados sobre la calidad del servicio prestado por un profesional mediante otra red de comunicación de intereses comunes fácilmente montada en una computadora o mediante muchos otros medios. Podría considerarse a tales redes como servicios de utilidad pública que permitiesen a los estudiantes elegir a sus profesores o a los pacientes, sus médicos.
+
+
+## Educadores profesionales
+
+Conforme los ciudadanos tengan nuevas posibilidades de elección, nuevas posibilidades de aprendizaje, su disposición a buscar directivos debiera aumentar. Podemos contar con que experimentarán más hondamente tanto su propia independencia como su necesidad de guía. Conforme estén liberados de la manipulación por parte de terceros, debieran aprender a beneficiarse de la disciplina que otros han adquirido durante toda su vida. El desescolarizar la educación debiera más bien aumentar, y no ahogar, la búsqueda de hombres de sabiduría práctica que estuviesen dispuestos a apoyar al recién llegado en su aventura educativa. Conforme los maestros en su arte abandonan la pretensión de ser informantes superiores o modelos de habilidades, comenzará a parecer verdadera la sabiduría superior que parecen poseer.
+
+Al aumentar la demanda de maestros debiera aumentar también la oferta. Conforme se desvanezca el maestro de escuela, se suscitarán condiciones que harán aparecer la vocación del educador independiente. Esto puede parecer casi contradictorio; a tal punto han llegado a ser complementarios escuelas y profesores. Sin embargo éste es exactamente el resultado a que tendería el desarrollo de los primeros servicios educativos —y lo que se precisaría para hacer posible el aprovecharlos plenamente—, pues los padres y otros “educadores naturales” necesitan un guía, las personas que aprenden necesitan ayuda, y las redes necesitan personas que las hagan funcionar.
+
+Los padres necesitan orientación para dirigir a sus hijos por el camino que conduce a la independencia educativa responsable. Los aprendices necesitan líderes experimentados cuando se topan con un terreno arduo. Estas dos necesidades son muy distintas: la primera es una necesidad de pedagogía, la segunda una necesidad de dirección intelectual en todas las demás ramas del conocimiento. La primera exige conocimiento del aprendizaje humano y de los recursos educativos, la segunda exige sabiduría fundada en la experiencia en cualquier clase de exploración. Ambos tipos de experiencia son indispensables para una empresa educativa eficaz. Las escuelas envasan estas funciones en un solo papel —y hacen que el ejercicio independiente de cualquiera de ellas se vuelva, si no algo lleno de desdoro, al menos sospechoso—.
+
+De hecho deberían distinguirse tres tipos de competencia educativa especial: una, crear y manejar los tipos de servicios o redes educativas esbozadas aquí; otra, guiar a estudiantes y padres en el uso de estas redes, y una tercera, actuar como _primus inter pares_ al emprender difíciles viajes de exploración intelectual. Sólo las dos primeras pueden concebirse como ramas de una profesión independiente: administradores educativos y consejeros pedagógicos. No se precisaría mucha gente para proyectar y gestionar las redes que he estado describiendo, pero sí gente con un profundo entendimiento de la educación y la administración, con una perspectiva muy diferente y hasta opuesta a la de las escuelas.
+
+Si bien una profesión educativa independiente de esta especie daría la bienvenida a muchas personas que las escuelas excluyen, excluiría asimismo a muchas que las escuelas declaran aptas. El establecimiento y gestión de redes educativas precisaría de algunos proyectistas y administradores, pero no en la cantidad ni del tipo que exige la administración de escuelas. La disciplina estudiantil, las relaciones públicas, la contratación, supervisión y despido de profesores no tendrían lugar ni equivalente en las redes que he estado describiendo. Tampoco la creación de currícula, la compra de libros de texto, el entretenimiento de lugares e instalaciones, ni la supervisión de competencias atléticas interescolares. La custodia de niños, el planteamiento de lecciones y la anotación de datos archivables, que ocupan ahora tanto tiempo de los profesores, tampoco figurarían en la gestión de las redes educativas. En cambio, para el funcionamiento de las tramas de aprendizaje se necesitarían algunas de las habilidades y actitudes que se esperan actualmente del personal de un museo, de una biblioteca, de una agencia para contratación de directivos o de un _maître d’hôtel_.[^n18]
+
+Los administradores educativos de hoy en día se preocupan de controlar a profesores y estudiantes de modo que queden satisfechos unos terceros —fideicomisarios, legislaturas y jefes de empresas—. Los constructores y administradores de las redes antedichas tendrían que demostrar tener genio para ponerse a sí mismos y a terceras personas donde no estorbasen a la gente, para facilitar encuentros entre estudiantes, modelos de habilidades, líderes educativos y objetos educativos. Muchas de las personas a las que hoy atrae la enseñanza son profundamente autoritarias y no serían capaces de hacerse cargo de esta tarea: construir servicios o bolsas de intercambio educativo significaría facilitar a la gente —en especial a los jóvenes— el ir en pos de metas que pudieren contradecir los ideales del gerente que hiciese posible tal empeño.
+
+Si pudiesen hacer su aparición las redes que he descrito, el recorrido educativo que siguiese cada estudiante sería cosa suya o propia, y sólo mirado retrospectivamente podría adquirir las características de un programa reconocible. El estudiante sensato buscaría periódicamente el consejo profesional: ayuda para fijarse una nueva meta, comprensión penetrante de las dificultades habidas, elección entre algunos métodos posibles. Incluso ahora, la mayoría de las personas admitirán que los servicios importantes que les prestaron sus profesores fueron consejos o asesoramiento de esta especie, dados en una reunión casual o durante una conversación personal. En un mundo desescolarizado, los pedagogos también harían valer sus métodos y serían capaces de realizar aquello que los profesores frustrados pretenden emprender hoy en día.
+
+Mientras los administradores de redes se concentrarían principalmente en la construcción y el mantenimiento de cambios que dieran acceso a recursos, el pedagogo ayudaría al estudiante a hallar el sendero que le pudiese conducir a mayor velocidad hacia su meta. Si un estudiante quisiese aprender cantonés hablado de un vecino chino, el pedagogo estaría a mano para juzgar el aprovechamiento y pericia de ambos y para ayudarles a elegir el libro de texto y los métodos más adecuados para sus talentos, caracteres y tiempo disponible para estudiar. Podría aconsejar al mecánico de aviación en ciernes sobre los mejores lugares para practicar como aprendiz. Podría recomendar libros o alguno que quisiese hallar compañeros con garra para debatir sobre historia de África. Al igual que el administrador de redes, el consejero pedagógico se vería a sí mismo como un educador profesional. El acceso a cualquiera de ambos podrían lograrlo las personas usando sus bonos educativos.
+
+El papel del iniciador o líder educativo, del maestro o “verdadero” líder es algo más elusivo que el de administrador profesional o de pedagogo. Esto se debe a que el liderazgo es en sí algo difícil de definir. En la práctica, una persona es un líder si la gente sigue su iniciativa y se convierten en aprendices de sus descubrimientos progresivos. Esto frecuentemente presupone una visión profética de normas enteramente nuevas —muy comprensibles en el presente— en las cuales el “error” actual se convertirá en “acierto”. En una sociedad que respetaría el derecho a convocar asambleas a través del sistema de búsqueda de compañero, la capacidad de tomar la iniciativa educativa sobre un tema específico sería tan amplia como el acceso mismo al aprendizaje. Pero, naturalmente, hay una enorme diferencia entre la iniciativa que toma alguien para convocar una provechosa reunión para debatir este ensayo y la capacidad de alguien para servir de líder en la exploración sistemática de sus implicaciones.
+
+El liderazgo tampoco depende del hecho de estar en lo cierto. Tal como señala Thomas Kuhn, en un periodo de paradigmas en constante variación, la mayoría de los más distinguidos líderes tiene la probabilidad de haber incurrido en error cuando se someten a una prueba retrospectiva. La condición de líder intelectual se funda en una disciplina intelectual y una imaginación superiores, y en la disposición a asociarse con otros en el ejercicio de aquéllas. Por ejemplo, el aprendiz puede pensar que existe una analogía entre el Movimiento Antiesclavista de Estados Unidos o la Revolución cubana y lo que está ocurriendo en Harlem. El educador que sea al mismo tiempo historiador podría mostrarle cómo advertir las fallas de dicha analogía. Puede recorrer de nuevo su camino como historiador. Puede invitar al aprendiz a participar en las investigaciones que realice. En ambos casos iniciará a su alumno en el aprendizaje de un arte crítico —que es escaso en la escuela— y que no puede comprarse ni con dinero ni con favores.
+
+La relación entre maestro y discípulo no se limita a la disciplina intelectual. Tiene su equivalente en las artes, en física, en religión, en psicoanálisis y en pedagogía. Encaja en el montañismo, en la platería y en política, en ebanistería y en administración de personal. Lo que es común en todas las verdaderas relaciones maestro-discípulo es el hecho de que ambos tienen conciencia de que su mutua relación es literalmente inapreciable y de maneras muy diferentes constituye un privilegio para ambos.
+
+Los charlatanes, los demagogos, los proselitistas, los maestros corrompidos, los sacerdotes simoniacos, los pillos, los taumaturgos y los mesías han demostrado ser capaces de asumir el papel de líderes y han demostrado así los peligros que para un discípulo tiene la dependencia respecto del maestro. Las diversas sociedades han adoptado diversas medidas para protegerse de estos maestros falsificados. Los hindúes se apoyaron en el sistema de castas. Los judíos orientales, en la condición de discípulo espiritual de los rabinos, los grandes periodos de la cristiandad en una vida ejemplar de virtud monástica, y otros periodos en el orden jerárquico. Nuestra sociedad confía en los certificados dados por escuelas. Es dudoso que ese procedimiento constituya una criba más eficaz, pero si se pretendiese que lo es, podría alegarse en contra que lo hace al costo de casi hacer desaparecer la condición de discípulo personal.
+
+En la práctica el límite entre el profesor de habilidades y los líderes educadores antes señalados será siempre confuso, y no hay razones prácticas para que no pueda lograrse el acceso a ciertos líderes descubriendo al “maestro” en el profesor rutinario que inicia a unos estudiantes en su disciplina.
+
+Por otra parte, lo que caracteriza la verdadera relación maestro-discípulo es su carácter de inapreciable. Aristóteles dice de ella: “Es un tipo de amistad moral, no fundada en términos fijos: hace un regalo, o hace lo que hace, como a un amigo”. Tomás de Aquino dice de este tipo de enseñanza que inevitablemente es un acto de amor y de compasión. Este tipo de enseñanza es siempre un lujo para el profesor y una forma de recreación (en griego, _schole_) para él y para su discípulo: una actividad significativa para ambos, sin propósito ulterior.
+
+Contar con que haya personas dotadas dispuestas a proveer una auténtica dirección intelectual es obviamente necesario incluso en nuestra sociedad, pero podría dictarse como norma ahora. Debemos construir primero una sociedad en la cual los actos profesionales mismos recuperen un valor más elevado que el de hacer cosas y manipular gente. En una sociedad así, la enseñanza exploratoria, inventiva, creativa, se contaría lógicamente entre las formas más elevadas del “ocio”. Pero no es necesario esperar hasta el advenimiento de la utopía. Incluso ahora, una de las consecuencias más importantes de la desescolarización y del establecimiento de sistemas para búsqueda de compañero sería la iniciativa que algunos “maestros” pudiesen tomar para congregar discípulos que congeniasen. Daría también, como hemos visto, oportunidades amplias para que los discípulos en potencia compartiesen informaciones o seleccionasen un maestro.
+
+Las escuelas no son las únicas instituciones que pervierten una profesión al meter en un solo paquete varios papeles por desempeñar. Los hospitales hacen cada vez más imposible la atención en el hogar —y luego justifican la hospitalización como un beneficio para el enfermo—. Simultáneamente, la legitimidad y las posibilidades de ejercer de un médico vienen a depender de modo creciente de su asociación con un hospital, si bien su dependencia es mucho menor que la de los profesores respecto de las escuelas. Igual cosa podría decirse de los tribunales, que atiborran sus calendarios conforme nuevas transacciones adquieren solemnidad legal, demorando así la justicia. En cada uno de estos casos el resultado es un servicio escaso a un coste mayor, y un mayor ingreso para los miembros menos competentes de la profesión.
+
+Mientras las profesiones más antiguas monopolicen los mayores ingresos y prestigio, será difícil reformarlas. La profesión de maestro de escuela debiera ser fácil de reformar, no sólo debido a su origen más reciente. La profesión educativa pretende ahora un monopolio global; reclama ser la única competente para impartir el aprendizaje no sólo a sus propios novicios sino también a los de otras profesiones. Esta expansión excesiva la hace vulnerable ante cualquier otra profesión que reclame el derecho a enseñar a sus propios aprendices. Los maestros de escuela están abrumadoramente mal pagados y frustrados por la estrecha fiscalización del sistema escolar. Los más emprendedores y dotados de entre ellos hallarían probablemente un trabajo más simpático, una mayor independencia y hasta mejores ingresos al especializarse como modelos de habilidades, administradores de redes o especialistas en orientación.
+
+Finalmente, es más fácil romper la dependencia del alumno matriculado respecto del profesor diplomado que su dependencia de otros profesionales —por ejemplo, que la de un paciente hospitalizado respecto de su médico—. Si las escuelas dejaran de ser obligatorias, aquellos profesores cuya satisfacción reside en el ejercicio de la autoridad pedagógica en el aula se quedarían sólo con los alumnos para quienes fuese atractivo ese estilo. La desaparición de nuestra actual estructura profesional podría comenzar con la deserción del maestro de escuela.
+
+La desaparición de las escuelas ocurriría inevitablemente —y ocurriría a velocidad sorprendente—. No puede postergarse por más tiempo, y no hace ninguna falta promoverlo vigorosamente, porque ya está ocurriendo. Lo que vale la pena es tratar de orientarla en una dirección prometedora, pues puede dirigirse en dos direcciones diametralmente opuestas.
+
+La primera sería la ampliación del mandato del pedagogo y su control creciente sobre la sociedad, incluso fuera de la escuela. Con la mejor intención y tan sólo ampliando la retórica usada hoy como en las aulas, la crisis actual de las escuelas podría proporcionar a los educadores la excusa para usar todas las redes de la sociedad contemporánea para enviarnos sus mensajes —para nuestro bien—. La desescolarización que no podemos detener, podría significar el advenimiento de un “mundo feliz” dominado por algunos bien intencionados administradores de instrucción programada.
+
+Por otra parte, el hecho de que tanto los gobiernos como los empleados, los contribuyentes, los pedagogos despiertos y los administradores escolares advierten con creciente claridad que la enseñanza graduada de currícula en pro de unos certificados se ha hecho perjudicial, podría ofrecer a grandes masas humanas una oportunidad única: la de preservar el derecho de tener un acceso parejo a los instrumentos tanto para aprender, como para competir con otros lo que saben o creen. Pero esto exigiría que la revolución educativa estuviese guiada por ciertas metas:
+
+_1._ Liberar el acceso a las cosas, mediante la abolición del control que hoy ejercen unas personas e instituciones sobre sus valores educativos.
+
+_2._ Liberar la coparticipación de habilidades al garantizar la libertad de enseñarlas o de ejercitarlas a pedido.
+
+_3._ Liberar los recursos críticos y creativos de la gente por medio de un regreso a la capacidad de las personas para convocar y organizar reuniones —capacidad crecientemente monopolizada por instituciones que afirman estar al servicio del público—.
+
+_4._ Liberar al individuo de la obligación de moldear sus expectativas según los servicios ofrecidos por cualquier profesión establecida —proporcionándole la oportunidad de aprovechar la experiencia de sus iguales y de confiarse al profesor, guía, consejero o curandero de su elección—. La desescolarización de la sociedad difuminará inevitablemente las distinciones entre economía, educación y política, sobre las que se funda ahora la estabilidad del orden mundial y de las naciones.
+
+Nuestra reseña de las instituciones educativas nos lleva a modificar nuestra imagen del hombre. La criatura que las escuelas necesitan como cliente no tiene ni la autonomía ni la motivación para crecer por su cuenta. Podemos reconocer la escolarización como la culminación de una empresa prometeica, y hablar acerca de su alternativa refiriéndonos a un mundo adecuado para que en él viva un hombre epimeteico. Ya que nos es posible imaginar el reemplazo del embudo escolástico por una trama de intercambios y hacer que el mundo vuelva a ser visible mediante múltiples posibilidades de comunicación, sólo nos queda, al final de este esfuerzo, esperar que la naturaleza epimeteica del hombre aparezca, porque este renacimiento no depende de nuestros proyectos ni de nuestra voluntad.
+
+# Renacimiento del hombre epimeteico
+
+Nuestra sociedad se parece a la máquina implacable que una vez vi en una juguetería neoyorquina consistía en un cofrecillo metálico con un interruptor que, al tocarlo se abría de golpe descubriendo una mano mecánica. Unos dedos cromados se estiraban hacia la tapa y la cerraban desde el interior. Era una caja; uno esperaba poder sacar algo de ella, pero no contenía sino un mecanismo para cerrarla. Este artilugio es lo opuesto a la “caja” de Pandora.
+
+La Pandora original, “la dadora de todo”, era una diosa de la Tierra en la Grecia prehistórica y matriarcal que dejó escapar todos los males de su ánfora (_pythos_). Pero cerró la tapa antes de que pudiera escapar la esperanza. La historia del hombre moderno comienza con la degradación del mito de Pandora y llega a su término con el cofrecillo que se cierra solo. Es la historia del empeño prometeico por forjar instituciones a fin de encerrar los males desencadenados. Es la historia de una esperanza que declina y de unas expectativas crecientes.
+
+Para comprender lo que esto significa debemos redescubrir la diferencia entre expectativa y esperanza. Esperanza, en su sentido vigoroso, significa fe confiada en la bondad de la naturaleza; mientras expectativa, tal como la emplearé aquí, significa fiarse en resultados planificados y controlados por el hombre. La esperanza centra el deseo en una persona de la que aguardamos un regalo. La expectativa promete una satisfacción que proviene de un proceso predecible que producirá aquello que tenemos el derecho de exigir. El _ethos_ prometeico ha eclipsado actualmente la esperanza. La supervivencia de la raza humana depende de que se la descubra como fuerza social.
+
+La Pandora original fue enviada a la Tierra con un frasco que contenía todos los males; de las cosas buenas, contenía sólo la esperanza. El hombre primitivo vivía en este mundo de la esperanza. Para subsistir confiaba en la munificencia de la naturaleza, en los regalos de los dioses y en los instintos de su tribu. Los griegos del periodo clásico comenzaron a reemplazar la esperanza por las expectativas. En la versión que dieron de Pandora, ésta soltó tanto males como bienes. La recordaban principalmente por los males que había desencadenado. Y, lo que es más significativo, olvidaron que “la dadora de todo” era también la custodia de la esperanza.
+
+Los griegos contaban la historia de dos hermanos, Prometeo y Epimeteo. El primero advirtió al segundo que no se metiera con Pandora. Éste, en cambio, casó con ella. En la Grecia clásica, al nombre Epimeteo, que significa “percepción tardía” o “visión ulterior”, se le daba el significado de “lerdo” o “tonto”. Para la época en que Hesíodo relataba el cuento en su forma clásica, los griegos se habían convertido en patriarcas moralistas y misóginos que se espantaban ante el pensamiento de la primera mujer. Construyeron una sociedad racional y autoritaria. Los hombres proyectaron instituciones mediante las cuales programaron enfrentarse a todos los males desencadenados. Llegaron a percatarse de su poder para conformar el mundo y hacerlo producir servicios que aprendieron también a esperar. Querían que sus artefactos moldearan sus propias necesidades y las exigencias futuras de sus hijos. Se convirtieron en legisladores, arquitectos y autores, hacedores de constituciones, ciudades y obras de arte que sirviesen de ejemplo para su progenie. El hombre primitivo contaba con la participación mística en ritos sagrados para iniciar a los individuos en las tradiciones de la sociedad, pero los griegos clásicos reconocieron como verdaderos hombres sólo a aquellos ciudadanos que permitían que la _paideia_ (educación) los hiciera aptos para ingresar en las instituciones que sus mayores habían proyectado.
+
+El mito en desarrollo refleja la transición desde un mundo en que se _interpretaban_ los sueños a un mundo en que _se hacían_ oráculos. Desde tiempos inmemoriales, se había adorado a la diosa de la Tierra en las laderas del monte Parnaso, que era el centro y el ombligo de la tierra. Allí, en Delphos (de _delphys_ , la matriz), dormía Gaia, hermana de Caos y de Eros. Su hijo, Pitón, el dragón, cuidaba sus sueños lunares y húmedos de rocío, hasta que Apolo, el dios del Sol, el arquitecto de Troya, se alzó al Oriente, mató al dragón y se apoderó de la cueva de Gaia. Los sacerdotes de Apolo se hicieron cargo del templo de la diosa. Emplearon a una doncella de la localidad, la sentaron en un trípode, sobre el ombligo humeante de la tierra, y la adormecieron con emanaciones. Luego pusieron sus declaraciones extáticas en hexámetros rimados de profecías que se cumplían por la misma influencia que ejercían. De todo el Peloponeso venían hombres a traer sus problemas ante Apolo. Se consultaba el oráculo sobre posibles alternativas sociales, tales como las medidas que se debían adoptar frente a una peste o una hambruna, sobre cuál era la constitución conveniente para Esparta o cuáles los emplazamientos propicios para ciudades que más tarde se llamaron Bizancio y Caledonia. La flecha que nunca yerra se convirtió en un símbolo de Apolo. Todo lo referente a él adquirió un fin determinado y útil.
+
+En la _República_ , al describir el Estado ideal, Platón ya excluye la música popular. En las ciudades se permitiría sólo el arpa y la lira de Apolo, porque únicamente la armonía de éstas crea “la tensión de la necesidad y la tensión de la libertad, la tensión de lo infortunado y la tensión de lo afortunado, la tensión del valor y la tensión de la templanza, dignas del ciudadano”. Los habitantes de la ciudad se espantaron ante la flauta de Pan y su poder para despertar los instintos. Sólo “los pastores pueden tocar las flautas (de Pan) y esto sólo en el campo”.
+
+El hombre se hizo responsable de las leyes bajo las cuales quería vivir y de moldear el medio ambiente a su propia semejanza. La iniciación primitiva que daba la Madre Tierra a una vida mítica se transformó en la educación (_paideia_) del ciudadano que se sentiría a gusto en el foro.
+
+Para el primitivo, el mundo estaba regido por el destino, los hechos y la necesidad. Al robar el fuego de los dioses, Prometeo convirtió los hechos en problemas, puso en tela de juicio la necesidad y desafió al destino. El hombre clásico tramó un contexto civilizado para la perspectiva humana. Se percataba de que podía desafiar al trío destino-naturaleza-entorno, pero sólo bajo su propio riesgo. El hombre contemporáneo va aún más lejos; intenta crear el mundo a su semejanza, contribuir y planificar su entorno, y descubre entonces que sólo puede hacerlo a condición de rehacerse continuamente para ajustarse a él. Debemos enfrentarnos ahora al hecho de que es el hombre mismo el que está en juego.
+
+La vida en Nueva York produce una visión peculiar de lo que es y de lo que podría ser, y sin esta visión, la vida en Nueva York se hace imposible. En las calles de Nueva York, un niño jamás toca nada que no haya sido ideado, proyectado, planificado y vendido científicamente a alguien. Hasta los árboles están allí porque el Departamento de Parques así lo decidió. Los chistes que el niño escucha por televisión han sido programados a gran coste. La basura con que juega en las calles de Harlem está hecha de paquetes deshechos ideados para un tercero. Hasta los deseos y los temores están moldeados institucionalmente. El poder y la violencia están organizados y administrados: las pandillas, frente a la policía. El aprendizaje mismo se define como el consumo de una materia, que es el resultado de programas investigados, planificados y promocionados. Lo que allí haya de bueno, es el producto de alguna institución especializada. Sería tonto pedir algo que no pudiese producir alguna institución. El niño de la ciudad no puede esperar nada que esté más allá del posible desarrollo del proceso institucional. Hasta a su fantasía se le urge a producir ciencia ficción. Puede experimentar la sorpresa poética de lo no planificado sólo a través de sus encuentros con la “mugre”, el desatino o el fracaso: la cáscara de naranja en la cuneta, el charco en la calle, el quebrantamiento del orden, del programa o de la máquina son los únicos despegues para el vuelo de la fantasía creadora. El “viaje” se convierte en la única poesía al alcance de la mano.
+
+Como nada deseable hay que no haya sido planificado, el niño ciudadano pronto llega a la conclusión de que siempre podremos idear una institución para cada una de nuestras apetencias. Toma por descontado el poder del proceso para crear valor. Ya sea que la meta fuere juntarse con un compañero, integrar un barrio o adquirir habilidades de lectura, se la definirá de tal modo que su logro pueda proyectarse técnicamente. El hombre que sabe que nada que está en demanda deja de producirse llega pronto a esperar que nada de lo que se produce pueda carecer de demanda. Si puede proyectarse un vehículo lunar, también puede proyectarse la demanda de viajes a la Luna. No ir donde uno puede sería subversivo. Desenmascararía, mostrándola como una locura, la suposición de que cada demanda satisfecha trae consigo el descubrimiento de otra, mayor aún, e insatisfecha. Esa percepción detendría el progreso. No producir lo que es posible dejaría a la ley de las “expectativas crecientes” al descubierto, en calidad de eufemismo para expresar una brecha creciente de frustración, que es el motor de la sociedad, fundado en la coproducción de servicios y en la demanda creciente.
+
+El estado mental del habitante de la ciudad moderna aparece en la tradición mitológica sólo bajo la imagen del Infierno: Sísifo, que por un tiempo había encadenado a Tánatos (la muerte), debe empujar una pesada roca cerro arriba hasta el pináculo del Infierno, y la piedra siempre se escapa de sus manos cuando está a punto de llegar a la cima. Tántalo, a quien los dioses invitaron a compartir la comida olímpica, y que aprovechó la ocasión para robarles el secreto de la preparación de la ambrosía que todo lo cura, sufre hambre y sed eternas, de pie en un río cuyas aguas se le escapan y a la sombra de árboles cuyos frutos no alcanza. Un mundo de demandas siempre crecientes no sólo es malo; el único término adecuado para nombrarlo es “Infierno”.
+
+El hombre ha desarrollado la frustradora capacidad de pedir cualquier cosa porque no puede visualizar nada que una institución no pueda hacer por él. Rodeado por herramientas todopoderosas, el hombre queda reducido a ser instrumento de sus instrumentos. Cada una de las instituciones ideadas para exorcizar alguno de los males primordiales se ha convertido en un ataúd a prueba de errores y de cierre automático y hermético para el hombre. El hombre está atrapado en las cajas que fabrica para encerrar los males que Pandora dejó escapar. El oscurecimiento de la realidad por el _smog_ producido por nuestras propias herramientas nos rodea. Súbitamente nos hallamos en la oscuridad de nuestra propia trampa.
+
+Hasta la realidad ha llegado a depender de la decisión humana. El mismo presidente que ordenó la ineficaz invasión de Camboya podría ordenar de igual manera el uso eficaz del átomo. El “interruptor Hiroshima” puede cortar hoy el ombligo de la tierra. El hombre ha adquirido el poder de hacer que Caos anonade a Eros y a Gaia. Esta nueva capacidad del hombre, el poder cortar el ombligo de la tierra, es un recuerdo constante de que nuestras instituciones no sólo crean sus propios fines, sino que tienen también el poder de señalar su propio fin y el nuestro. El absurdo de las instituciones modernas se evidencia en el caso de la institución militar. Las armas modernas pueden defender la libertad, la civilización y la vida únicamente aniquilándolas. En lenguaje militar, seguridad significa la capacidad de eliminar la Tierra.
+
+El absurdo subyacente en las instituciones no militares no es menos manifiesto. No hay en ellas un interruptor que active sus poderes destructores, pero tampoco lo necesitan. Sus dedos ya atenazan la tapa del mundo. Crean a mayor velocidad necesidades que satisfacciones, y en el proceso de tratar de satisfacer las necesidades que engendran, consumen la tierra. Esto vale para la agricultura y la manufactura, y no menos para la medicina y la educación. La agricultura moderna envenena y agota el suelo. La “revolución verde” puede, mediante nuevas semillas, triplicar la producción de una hectárea —pero sólo con un aumento proporcionalmente mayor de fertilizantes, insecticidas, agua y energía—. Fabricar estas cosas, como los demás bienes, contamina los océanos y la atmósfera y degrada recursos irreemplazables. Si la combustión continúa aumentando según los índices actuales, pronto consumiremos el oxígeno de la atmósfera sin poder reemplazarlo con igual presteza. No tenemos razones para creer que la fisión o la fusión puedan reemplazar la combustión sin peligros iguales o mayores. Los expertos en medicina reemplazan a las parteras y prometen convertir al hombre en otra cosa: genéticamente planificado, farmacológicamente endulzado y capaz de enfermedades más prolongadas. El ideal contemporáneo es un mundo panhigiénico: un mundo en el que todos los contactos entre los hombres, y entre los hombres y su mundo, sean el resultado de la previsión y la manipulación. La escuela se ha convertido en el proceso planificado que labra al hombre para un mundo planificado, en la trampa principal para entrampar al hombre en la trampa humana. Se supone que moldea a cada hombre a un nivel adecuado para desempeñar un papel en este juego mundial. De manera inexorable, cultivamos, elaboramos, producimos y escolarizamos el mundo hasta acabar con él.
+
+La institución militar es evidentemente absurda. Más difícil se hace enfrentar el absurdo de las instituciones no militares. Es aún más aterrorizante, precisamente porque funciona inexorablemente. Sabemos qué interruptor debe quedar abierto para evitar un holocausto atómico. No hay interruptor para detener un apocalipsis ecológico.
+
+En la antigüedad clásica, el hombre descubrió que el mundo podía forjarse según los planes del hombre, y, junto con este descubrimiento, advirtió que ello era inherentemente precario, dramático y cómico. Fueron creándose las instituciones democráticas y dentro de su estructura se supuso que el hombre era digno de confianza. Lo que se esperaba del debido proceso legal y la confianza en la naturaleza humana se mantenía en equilibrio recíproco. Se desarrollaron las profesiones tradicionales y con ellas las instituciones necesarias para el ejercicio de aquéllas.
+
+Subrepticiamente, la confianza en el proceso institucional ha reemplazado la dependencia respecto de la buena voluntad humana personal. El mundo ha perdido su dimensión humana y ha readquirido la necesidad de los tiempos primitivos. Pero mientras el caos de los bárbaros estaba constantemente ordenado en nombre de dioses misteriosos y antropomórficos, hoy en día la única razón que puede ofrecerse para que el mundo esté como está es la planificación del hombre. El hombre se ha convertido en el juguete de científicos, ingenieros y planificadores.
+
+Vemos esta lógica en otros y en nosotros mismos. Conozco una aldea mexicana en la que no pasa más de media docena de autos cada día. Un mexicano estaba jugando al dominó sobre la nueva carretera asfaltada frente a su casa —en donde probablemente se había sentado y había jugado desde muchacho—. Un coche pasó velozmente y lo mató. El turista que me informó del hecho estaba profundamente conmovido y, sin embargo, dijo: “Tenía que sucederle”.
+
+A primera vista, la observación del turista no difiere de la de un bosquimano que relata la muerte de algún fulano que se hubiera topado con un tabú y por consiguiente hubiera muerto. Pero las dos afirmaciones poseen significados diferentes. El primitivo puede culpar a alguna entidad trascendente, tremenda y ciega, mientras el turista está pasmado ante la inexorable lógica de la máquina. El primitivo no siente responsabilidad; el turista la siente, pero la niega. Tanto en el primitivo como en el turista están ausentes la modalidad clásica del drama, el estilo de la tragedia, la lógica del empeño individual y de la rebelión. El hombre primitivo no ha llegado a tener conciencia de ello, y el turista la ha perdido. El mito del bosquimano y el mito del norteamericano están compuestos ambos de fuerzas inertes, inhumanas. Ninguno de los dos experimenta una rebeldía trágica. Para el bosquimano, el suceso se ciñe a las leyes de la magia, para el norteamericano se ciñe a las leyes de la ciencia. El suceso le pone bajo el hechizo de las leyes de la mecánica, que para él gobiernan los sucesos físicos, sociales y psicológicos.
+
+El estado de ánimo de 1971 es propicio para un cambio importante de dirección en busca de un futuro esperanzador. A las metas institucionales las contradicen continuamente los resultados institucionales. El programa para la pobreza produce más pobres, la guerra en Asia acrecienta los Vietcong, la ayuda técnica engendra más subdesarrollo. Las clínicas para control de nacimientos incrementan los índices de supervivencia y provocan aumentos de población; las escuelas producen más desertores, y el atajar un tipo de contaminación suele aumentar otro tipo.
+
+Los consumidores se enfrentan al claro hecho de que cuanto más pueden comprar, tanto más engaño han de tragar. Hasta hace poco parecía lógico que pudiera echarse la culpa de esta inflación pandémica de disfunciones ya fuese al retraso de los descubrimientos científicos respecto de las exigencias tecnológicas, ya fuese a la perversidad de los enemigos étnicos, ideológicos o de clase. Han declinado las expectativas tanto respecto de un milenario científico como de una guerra que acabe con las guerras.
+
+Para el consumidor avezado no hay manera de regresar a una ingenua confianza en las tecnologías mágicas. Demasiadas personas han tenido la experiencia de computadoras que se descomponen, infecciones hospitalarias y saturación dondequiera que haya tráfico en la carretera, en el aire o en el teléfono. Hace apenas 10 años, la sabiduría convencional preveía una mejor vida fundada en los descubrimientos científicos. Ahora, los científicos asustan a los niños. Los viajes a la Luna proporcionan una fascinante demostración de que el fallo humano puede casi eliminarse entre los operarios de sistemas complejos —sin embargo, esto no mitiga los temores ante la posibilidad de que un fallo humano que consista en no consumir conforme a las instrucciones pueda escapar a todo control—.
+
+Para el reformador social tampoco hay modo de regresar a las premisas de la década de los años cuarenta. Se ha desvanecido la esperanza de que el problema de distribuir con justicia los bienes pueda evadirse creándolos en abundancia. El coste de la cesta mínima que satisfaga los gustos contemporáneos se ha ido a las nubes, y lo que hace que un gusto sea moderno es el hecho de que aparezca como anticuado antes de haber sido satisfecho.
+
+Los límites de los recursos de la tierra ya se han evidenciado. Ninguna nueva avenida de la ciencia o la tecnología podría proveer a cada hombre del mundo de los bienes y servicios de que disponen ahora los pobres de los países ricos. Por ejemplo, se precisaría extraer 100 veces las cantidades actuales de hierro, estaño, cobre y plomo para lograr esa meta, incluso con la alternativa tecnológica más “liviana”.
+
+Por fin, los profesores, médicos y trabajadores sociales caen en la cuenta de que sus diversos tratamientos profesionales tienen un aspecto —por lo menos— en común: crean nuevas demandas para los tratamientos profesionales que proporcionan, a una mayor rapidez con la que pueden proporcionar instituciones de servicio.
+
+Se está haciendo sospechosa no sólo una parte, sino la lógica misma de la sabiduría convencional. Incluso las leyes de la economía parecen poco convincentes fuera de los estrechos parámetros aplicables a la región social y geográfica en la que se encuentra la mayor parte del dinero. En efecto, el dinero es el circulante más barato, pero sólo en una economía encaminada hacia una eficiencia medida en términos monetarios. Tanto los países capitalistas como los comunistas en sus diversas formas están dedicados a medir la eficiencia en relación con el coste/beneficio expresado en dólares. El capitalismo se jacta de un nivel más elevado de vida para afirmar su superioridad. El comunismo hace alarde de una mayor tasa de crecimiento como índice de su triunfo final. Pero bajo cualquiera de ambas ideologías el coste total de aumentar la eficiencia se incrementa geométricamente. Las instituciones de mayor tamaño compiten con fiereza por los recursos que no están anotados en ningún inventario: el aire, el océano, el silencio, la luz del sol y la salud. Ponen en evidencia la escasez de estos recursos ante la opinión pública sólo cuando están casi irremediablemente degradados. Por doquiera, la naturaleza se vuelve ponzoñosa, la sociedad inhumana, la vida interior se ve invadida y la vocación personal ahogada.
+
+Una sociedad dedicada a la institucionalización de los valores identifica la producción de bienes y servicios con la demanda de los mismos. La educación que le hace a uno necesitar el producto está incluida en el precio del producto. La escuela es la agencia de publicidad que le hace a uno creer que necesita la sociedad tal y como está. En dicha sociedad el valor marginal ha llegado a ser constantemente autotrascendente. Obliga a los consumidores más grandes —son pocos— a competir por tener el poder de agotar la tierra, por llenarse sus propias panzas hinchadas, por disciplinar a los consumidores de menor tamaño, y por poner fuera de acción a quienes aún encuentran satisfacción en arreglárselas con lo que tienen. El _ethos_ de la insaciabilidad es por tanto la fuente misma de la depredación física, de la polarización social y de la pasividad psicológica.
+
+Cuando los valores se han institucionalizado en procesos planificados y técnicamente construidos, los miembros de la sociedad moderna creen que la buena vida consiste en tener instituciones que definan los valores que tanto ellos como su sociedad creen que necesitan. El valor institucional puede definirse como el nivel de producción de una institución. El valor correspondiente del hombre se mide por su capacidad para consumir y degradar estas producciones institucionales y crear así una demanda nueva —y aún mayor—. El valor del hombre institucionalizado depende de su capacidad como incinerador. Para emplear una imagen, ha llegado a ser el ídolo de sus artesanías. El hombre se autodefiende ahora como el horno en que se queman los valores producidos por sus herramientas. Y no hay límites para su voracidad. Su acto es el acto de Prometeo llevado al extremo.
+
+El agotamiento y la contaminación de los recursos de la tierra es, por encima de todo, el resultado de una corrupción de la imagen que el hombre tiene de sí mismo, de una regresión en su conciencia. Algunos tienden a hablar acerca de una mutación de la conciencia colectiva que conduce a concebir al hombre como un organismo que no depende de la naturaleza y de las personas, sino más bien de instituciones. Esta institucionalización de valores esenciales, esta creencia en que un proceso planificado de tratamiento da finalmente unos resultados deseados por quien recibe el tratamiento, este _ethos_ de consumidor, se halla en el núcleo mismo de la falacia prometeica.
+
+Los empeños por encontrar un nuevo equilibrio en el medio ambiente global dependen de la desinstitucionalización de los valores. La sospecha de que algo estructural anda mal en la visión del _homo faber_ es común en una creciente minoría de países tanto capitalistas como comunistas y “subdesarrollados”. Esta sospecha es la característica compartida por una nueva élite. A ella pertenece gente de todas las clases, ingresos, creencias y civilizaciones. Se han vuelto suspicaces respecto de los mitos de la mayoría: de las utopías científicas, del diabolismo ideológico y de la expectativa de que la distribución de bienes y servicios se hará con igualdad. Comparten con la mayoría la sensación de estar atrapados, de percatarse de que la mayor parte de las nuevas pautas adoptadas por amplio consenso conducen a resultados que se oponen descaradamente a sus metas propuestas. No obstante, mientras la mayoría de los prometeicos astronautas en ciernes sigue evadiendo el problema fundamental, la minoría emergente se muestra crítica respecto del _deus ex machina_ científico, de la panacea ideológica y de la cacería de diablos y brujas. Esta minoría comienza a dar forma a su sospecha de que nuestros constantes engaños nos atan a las instituciones contemporáneas como las cadenas ataban a Prometeo a su roca. La esperanza, la confianza y la ironía (_eironeia_) clásica deben conspirar para dejar al descubierto la falacia prometeica.
+
+Solía pensarse que Prometeo significaba “previsión” y aun llegó a traducirse por “aquel que hace avanzar la Estrella Polar”. Privó astutamente a los dioses del monopolio del fuego, enseñó a los hombres a usarlo para forjar el hierro, se convirtió en el dios de los tecnólogos y terminó con cadenas de hierro.
+
+La Pitonisa de Delfos fue reemplazada por una computadora que se cierne sobre cuadros de instrumentos y tarjetas perforadas. Los exámenes del oráculo cedieron el paso a los códigos de programación. El timonel humano entregó el rumbo a la máquina cibernética. Emerge la máquina definitiva para dirigir nuestros destinos. Los niños se imaginan volando en sus máquinas espaciales, lejos de una Tierra crepuscular.
+
+Mirando desde las perspectivas del Hombre de la Luna, Prometeo pudo reconocer a Gaia como el planeta de la Esperanza y como el Arco de la Humanidad. Un sentido nuevo de la finitud de la Tierra y una nueva nostalgia pueden ahora abrir los ojos del hombre y hacerle ver por qué su hermano Epimeteo, al desposar a Pandora, eligió desposar a la Tierra.
+
+Al llegar aquí el mito griego se convierte en esperanzada profecía, pues nos dice que el hijo de Prometeo fue Deucalión, el Timonel del Arca, quien, como Noé, navegó sobre el Diluvio para convertirse en el padre de la humanidad nueva que, con ayuda de Pirra, hija de Epimeteo y de Pandora, sacó de la tierra. Por ello nos es necesario comprender el sentido de ese Pithos que Pandora obtuvo de los dioses y que es el inverso de la Caja: nuestro Vaso y nuestra Arca.
+
+Necesitamos ahora un nombre para quienes valoran más la esperanza que las expectativas. Necesitamos un nombre para quienes aman más a la gente que a los productos, para aquellos que creen que
+
+```
+No hay personas sin interés.
+Sus destinos son como la crónica de los planetas.
+
+Nada en ellos deja de ser peculiar
+y los planetas son distintos unos y otros.
+```
+
+Necesitamos un nombre para aquellos que aman la tierra en la que podemos encontrarnos unos con otros,
+
+```
+Y si un hombre viviese en la oscuridad
+haciendo amistades en esa oscuridad,
+la oscuridad no carecería de interés.
+```
+
+Necesitamos un nombre para aquellos que colaboran con su hermano Prometeo en alumbrar el fuego y en dar forma al hierro, pero que lo hacen para acrecentar así su capacidad de entender y cuidar y ser guardián del prójimo, sabiendo que
+
+```
+para cada cual su mundo es privado,
+y en ese mundo la maravilla de un minuto,
+y en ese mundo lo trágico de un minuto,
+que son mis propios bienes.
+```
+
+[^n19] A esto hermanos y hermanas esperanzados sugiero llamarlos hombres epimeteicos.
+
+# Apéndice: una elección que hacer
+
+De generación en generación nos hemos esforzado por llegar a la educación de un mundo mejor y para hacerlo hemos desarrollado sin cesar la escolaridad. Hasta ahora, la empresa se ha pagado con un fracaso. ¿Y qué hemos aprendido si no es a constreñir a los niños para que suban la escalera sin fin de la educación que, lejos de conducir a la igualdad buscada, sólo favorece al que se adelantó a los otros o al que tiene mejor salud o al que se beneficia de una mejor preparación? Peor aún, la enseñanza obligatoria parece minar la voluntad personal de aprender. Por último, al saber considerado como una mercancía, que hay que almacenar y distribuir, pronto se le considera como un bien sometido a las garantías de la propiedad individual y, por lo mismo, tiende a volverse escaso.
+
+Comenzamos a percibir que este esfuerzo por desarrollar la educación pública mediante una escolaridad obligatoria está a punto de perder su legitimidad desde el punto de vista social, pedagógico y económico. Frente a esta crisis, los espíritus críticos no se contentan ya con remedios clásicos, ¡sino que proponen unos mucho más violentos! Imaginan, por ejemplo, sistemas de crédito educativo que permitirían a cada uno comprar la educación de su elección en un mercado no controlado, o bien, proponen retirarle a las escuelas la responsabilidad en materia de educación para dársela a los medios modernos de información y al aprendizaje en los sitios de trabajo. Algunos, aislados, entrevén la necesidad de destruir los fundamentos institucionales de la escuela, como le sucedió a la Iglesia en el transcurso de los dos últimos siglos. Ciertos reformadores proponen reemplazar la escuela universal por nuevos y diferentes sistemas que pretenden preparar mejor para la vida en una sociedad moderna… En síntesis, estamos frente a una elección: podemos contentarnos con desmantelar las escuelas o podemos ir más lejos y desescolarizar por completo la sociedad.
+
+Todas esas proposiciones en favor de instituciones educativas nuevas se reparten, de hecho, en tres categorías: las reformas que llevan al “salón de clases” sin tocar el sistema escolar; luego, la dispersión de clases “liberadas” en toda la sociedad; por último, la transformación de la misma sociedad en un inmenso salón de clases. Pero estos tres enfoques del problema —clase reformada, liberada o que englobe al mundo entero— los consideramos como tres etapas de la escalada del proceso educativo a través de las cuales se afirmará la empresa de un control todavía más sutil y más invasor del que habrá reemplazado.
+
+Si por mi parte estoy convencido de que conviene poner un término al reino de la escuela (desenlace que, por otra parte, creo ineluctable), es porque me parece que esta desaparición de una convicción ilusoria nos debería llenar de esperanza. Sin embargo, no estoy por ello menos consciente de que, llegados a este término de la “era escolar”, podríamos muy bien entrar en la de una escuela totalitaria que sólo el nombre distinguiría del asilo de alienados o de un campo de concentración donde educación, corrección y reajuste serían por fin sinónimos. Creo, en consecuencia, que el desmantelamiento de la escuela nos fuerza a ver más allá de su inminente desaparición y nos constriñe a enfrentar las posibilidades fundamentales de elección en materia de educación: ya sea que elijamos trabajar en la constitución de un arsenal educativo aterrador, con el objeto de acrecentar de golpe la fuerza de una enseñanza que trata de un mundo sin cesar más ensombrecido, más amenazador para el hombre; ya sea que intentemos poner en orden las condiciones necesarias para el surgimiento de una nueva era donde la tecnología se pondrá al servicio de una sociedad más simple, más transparente, de suerte que todos los hombres puedan descubrir lo que los rodea y servirse de las herramientas que hoy en día dan forma a sus propias vidas.
+
+
+## La enseñanza oculta de las escuelas
+
+Debemos distinguir entre “educación” y “escolaridad” si queremos ver surgir más claramente esa elección que se nos ofrece. Comprendo que conviene distinguir entre los objetivos humanistas del profesor y los efectos inherentes a la estructura inalterable de la escuela. Con toda seguridad esta estructura no es evidente a primera vista, pero sólo su existencia explica cierta forma de instrucción transmitida a todos y que escapa al control del docente o del consejo de profesores. En efecto, un mensaje se inscribe indeleble: sólo la escolaridad es capaz de preparar la entrada en la sociedad. Por ello, lo que no se enseña en la escuela se le retira su valor y, por lo mismo ¡lo que se aprende fuera de ella no vale la pena conocerse! Eso es lo que llamo la enseñanza oculta de las escuelas que define los límites en los cuales se efectúan los pretendidos cambios de programas.
+
+Sin defendernos de ella, esta enseñanza no varía de una escuela a otra ni de un lugar a otro. En todas partes los niños deben congregarse en grupos, según la edad; luego, alrededor de 30 toman su lugar frente a un profesor diplomado en razón de 150, incluso 1 000 horas, al año o más, No importa si el programa oficial intenta enseñar los principios del fascismo o del liberalismo, del catolicismo o del socialismo, o si pretende ponerse al servicio de una “liberación”, ya que en todos los casos la institución se arroga el derecho de definir las actividades propias que conducen a una “educación” legitima. Poco importa, igualmente, si el objetivo confesado de la escuela es producir ciudadanos soviéticos o norteamericanos, mecánicos o médicos, en la medida en que sin el diploma no se es un ciudadano verdadero o un doctor reconocido… Aunque todas las reuniones no se hagan en el mismo recinto, aunque incluso se consideren, de una manera o de otra, necesarias (cortar caña es trabajo del cañero; reformarse, el del prisionero, y seguir una parte del programa, el de los estudiantes), no hay en lo anterior ninguna diferencia.
+
+Nos enfrentamos a una especie de directiva secreta que quiere que los estudiantes aprendan antes que nada que la educación sólo tiene valor una vez que se adquirió en el seno de la universidad mediante un método graduado de consumo, y se le promete que el éxito social dependerá de la cantidad de saber consumido, Están convencidos de que vale mucho más instruirse a distancia de lo que es el mundo. El hecho de que la escolaridad imponga esta regla secreta en un programa educativo la distingue inmediatamente de otras formas de educación planificada. Todos los sistemas escolares del planeta tienen características comunes en relación con su rendimiento institucional y la razón de ello es ese “programa oculto” común a todas las escuelas.
+
+Hay que entender bien que ese programa oculto modifica la concepción que tenemos de la adquisición del saber y hace de la actividad personal una mercancía de la que la escuela cree detentar el monopolio. A un bien de consumo le damos hoy en día el nombre de “educación”: un producto cuya fabricación la asegura una institución oficial llamada “escuela”. En consecuencia, henos ahí con el fin de medir la duración y el costo del tratamiento aplicado al estudiante (en Estados Unidos, el diplomado de una pequeña universidad regional y el de uno de los colegios de la “liga de la hieda”[^n20] tienen cubiertos los mismos 135 “créditos”,[^n21] ¡pero están plenamente conscientes de la diferente cotización de sus “títulos” en la bolsa de valores educativos!).
+
+En todos los países convertidos al ideal escolar, el saber se considera como un bien de primera necesidad, como un asunto de sobrevivencia y, de la misma forma, como una moneda de cambio más fácilmente convertible que los rublos y los dólares. Cuando hablamos de alienación estamos de tal manera habituados al vocabulario marxista que sólo pensamos frecuentemente en la del trabajador en relación con su trabajo desde la perspectiva de una sociedad de clases; hoy en día nos sería necesario reconocer otra forma de la alienación, la del hombre frente al saber cuando este último, transformado en producto de un servicio, hace de quien lo adquiere un consumidor.
+
+Entre más educación “consume” un ser humano, más hace fructificar su posesión y se eleva en la jerarquía de los capitalistas del conocimiento. La educación definió una nueva pirámide de clases, en la medida en que los grandes consumidores de saber —esos portadores de bonos del tesoro del conocimiento— pueden inmediatamente pretender dar servicios de un valor más eminente a su sociedad. Ellos representan las inversiones seguras en el portafolio del capital humano de una sociedad y sólo ellos tienen un pronto acceso a las herramientas más poderosas o menos extendidas de la producción.
+
+De esa manera, ese programa secreto definió implícitamente la naturaleza de la educación: permite medirla y establecer qué nivel de productividad da derecho a su consumo. Disponemos entonces de la posibilidad de justificar la creciente correlación entre los empleos y los privilegios que manan de ellos. En ciertas sociedades esos privilegios se conocerán bajo la forma de ingresos personales más considerables; en otras, será un acceso fácil a servicios todavía poco desarrollados o a una formación más favorecida, sin olvidar un creciente prestigio (por otra parte, en el momento mismo en que, en nombre de la educación, se reclaman crecientes privilegios, la fosa entre la formación y la competencia profesional se acrecienta, como lo muestran ciertos estudios, en particular el de Ivar Berg, _La educación y los empleos, la gran estafa de la formación_).
+
+Querer hacer pasar a todos los seres humanos por las etapas sucesivas de la adquisición del saber nos lleva a recordar la búsqueda de los alquimistas y a mirar bien ahí: en el “gran arte” del final de la Edad Media encontraremos con toda seguridad los orígenes profundos de la idea de escolaridad. Consideramos a justo título que Jan Amos Komensky fue uno de los grandes precursores de las teorías de la escuela moderna. Más conocido con el nombre de Comenius, Jan Amos era obispo de Moravia y se decía “pansofista” y pedagogo. En su _Didactica Magna_ describe las escuelas como medios para “enseñar todo a todo el mundo” y podemos ver en él como un anteproyecto de la producción en la cadena del saber, ya que quería hacer la educación a la vez mejor y menos costosa, con el fin de permitir a todos el acceso a la condición de hombre. Pero sería insuficiente ver en Comenius una suerte de predecesor de nuestros expertos en métodos pedagógicos. Experto en alquimia, utilizaba su jerga para describir el arte de educar a los niños. Como se sabe, los alquimistas buscaban trasmutar el plomo vil, los elementos vulgares, en oro, haciendo pasar sus espíritus destilados por las 12 etapas del enriquecimiento. Es evidente que si veían en eso una manera de enriquecerse a sí mismos, pretendían trabajar en nombre del interés general, y sus sucesivos fracasos no los desalentaban, ya que su “ciencia” les permitía encontrar en ella las razones y justificar la continuación de sus esfuerzos.
+
+En esta perspectiva, la pedagogía abría un nuevo capítulo en la historia de la _Ars Magna_ : la educación se volvía, en efecto, la búsqueda de una especie de método alquímico destinado a hacer surgir un nuevo tipo de hombre capaz de adaptarse a un medio creado por la magia científica. Y, al igual que en la alquimia, cualquiera que fuera la suma consagrada a cada generación para edificar escuelas, el resultado es que la mayoría de aquellos a los que se les enseña no responden a esa “afinación” y pronto hay que rechazarlos como no aptos para existir en un mundo concebido por el hombre.
+
+Los reformadores en materia de educación que admiten el fracaso de las escuelas se reparten en tres categorías. Los más respetables son seguramente los grandes maestros en alquimia que prometen mejores escuelas; los más seductores, esos magos populares que anuncian la transformación de cada cocina en un laboratorio alquímico; los más aterradores, esos nuevos “masones” del universo que buscan transformar el mundo en un vasto templo de la enseñanza.
+
+Veamos, en particular, entre esos maestros alquimistas del momento, a los directores de investigación que emplean o patrocinan las grandes fundaciones. Están persuadidos de que las escuelas, si pudieran de alguna manera mejorarse, se volverían empresas más económicamente viables que venderían un más vasto conjunto de servicios. En cuanto a aquellos cuyo interés se dirige hacia los programas, pretenden que éstos no están adaptados o están sobrepasados. De esa manera se conciben nuevos programas en los que se introducen mercancías al gusto del momento: cultura africana, imperialismo norteamericano, liberación femenina, contaminación o sociedad de consumo. Se denuncia la pasividad (con toda seguridad es un mal) y, para remediarla, se concede a los estudiantes que ellos mismos decidan lo que quieren que se les enseñe y de qué manera. Algunos dicen que las escuelas son prisiones y, en consecuencia, se aconseja a los jefes de establecimientos dar su asentimiento a salidas educativas: un horizonte de pupitres y de muros se sustituye, por ejemplo, por una calle de Harlem cuidadosamente delimitada. Por último, la psicología está de moda y se instaura la terapia de grupos en el salón de clases. La escuela, que se consideraba el todo aprender de todos, se vuelve hoy en día el universo de todos los niños.
+
+Otros críticos se levantan para subrayar que las escuelas no utilizan suficientemente los recursos de la ciencia moderna. Surge el deseo de que los hombres de ciencia inventen algún medicamento que consuman los niños para que el instructor pueda modificar más fácilmente sus comportamientos. Se habla de transformar las escuelas en casinos educativos. Hay quienes quisieran “electrificar” el salón de clases y, por poco que crean ser buenos discípulos de McLuhan, helos ahí reemplazando el pizarrón y los manuales por _happenings_ en los que se ofrece toda la batería de aparatos de comunicación. Si admiran a Skinner, afirman que la aplicación de sus teorías permitirá una acción más eficaz sobre el comportamiento de los estudiantes que la de los antiguos maestros, hoy pasados de moda.
+
+Que algunas de estas reformas tengan efectos felices, es innegable. La práctica de la escuela tradicional está en un fuerte proceso de disminución en las escuelas experimentales. A veces los padres tienen un sentimiento mayor de participación. Los alumnos designados por sus profesores para seguir cursillos de aprendizaje adquieren frecuentemente un mayor _savoir faire_[^n22] que el de sus camaradas que permanecen en clase (conocí niños que mejoraban sus conocimientos de español en el laboratorio de lengua, porque preferían jugar con los botones de las grabadoras que conversar con sus iguales puertorriqueños). Sin embargo, todas esas mejoras intervienen en límites estrechos y previsibles, ya que no llegan al programa oculto de las escuelas.
+
+A algunos reformadores les gustaría liberarse de esa regla secreta de las escuelas públicas, pero sólo lo logran raras veces. Las escuelas “activas”, que conducen al desarrollo de otras escuelas del mismo tipo, sólo crean una engañosa ilusión: la liberación permanece como un espejismo, incluso si la constricción a los cursos obligatorios se interrumpe con frecuencia por periodos de ociosidad. Que se busque agradar a alguien para convencerlo de asistir a los cursos es, bien mirado, ¡más insidioso todavía que la obligación legal y el apoyo de la brigada de los menores! Mejor que una presencia consentida a disgusto, la que embauca lleva más fácilmente a creer en la necesidad del tratamiento educativo. El docente tolerante hace al alumno correr un creciente riesgo de sentirse incapaz de vivir fuera del refugio acolchado.
+
+¿En qué difiere la enseñanza suministrada en las nuevas escuelas? Aunque se facilite por el consenso de un grupo, más que por los decretos del cuerpo docente, se trata siempre de adquirir competencias que la sociedad reconoce, lo que no cambia en nada el problema. La apariencia cambia; la realidad profunda permanece.
+
+Para ser verdaderas escuelas de libertad, les sería necesario llenar dos condiciones. En primer lugar, deben administrarse de tal suerte que no permitan a la regla secreta de la enseñanza aplicarse, es decir, que los escolares, definidos como tales, ubicados frente a profesores reconocidos, no asistan a una sucesión de cursos graduados. En segundo lugar, esas escuelas deberían proporcionar un marco en el que todos los participantes, docentes y alumnos, puedan liberarse de los postulados sobre los que reposa, sin que lo sepamos, una sociedad escolarizada. A veces escuchamos enunciar la primera condición en los objetivos que se propone una escuela “activa”. En cuanto a la segunda, por lo general no se le pone atención, y ciertamente no es el objetivo de esas escuelas.
+
+
+## Los postulados secretos de la educación
+
+No es necesario, en esta fase, distinguir entre la regla secreta y aquélla sobre la que, sin darnos cuenta, se funda la idea de la escolaridad. El programa oculto constituye una especie de ritual iniciático que podemos concebir como un preparativo para el ingreso en la sociedad moderna. Por intermedio de la escuela el programa adquiere su dimensión institucional. Detrás del velo de la ceremonia ritual, las contradicciones se encuentran disimuladas para los participantes. ¿Cómo, en efecto, conciliar el mito de una sociedad igualitaria y la realidad social fundada en el reconocimiento de un orden jerárquico que finalmente el rito impone? Pero una vez reconocidos en lo que son, los ritos ya no llegan a mantener la ilusión; ese fenómeno es aparente en el caso de la escolaridad. No obstante, la ceremonia reposa sobre postulados aceptados inconscientemente a los que las escuelas “privadas” podrían dar nuevo vigor.
+
+A primera vista, se nos reprochará que hagamos un juicio de orden general sobre las escuelas “activas” y más precisamente, en 1971, sobre las de Estados Unidos, las de Canadá y las de Alemania del Oeste en donde ellas parecen querer ser el más hermoso adorno de un renacimiento. A decir verdad, nuestra generalización sólo se dirige a las empresas experimentales que pretenden ser instituciones educativas. Para evitar cualquier menosprecio debemos examinar con más atención la relación que hay entre “educación” y “escolaridad”.
+
+Con mucha frecuencia olvidamos que la educación no es una invención antigua. Ese sustantivo se desconocía antes de la Reforma. En Francia se habla por vez primera de la educación de los niños en un manuscrito de 1498. Era el año en que Erasmo llegó a residir en Oxford, en que a Savonarola lo quemaron en Florencia, en que Durero trazaba los primeros apuntes de su _Apocalipsis_ , que todavía hoy evoca con fuerza la atmósfera sombría, la impresión de un inminente desastre que pesaba sobre ese periodo. En inglés, la palabra _educación_ apareció por primera vez en 1530. Ese año, Enrique VIII repudiaba a Catalina de Aragón y la Iglesia luterana se separaba de Roma con la dieta de Augsburgo. Hay que esperar todavía un siglo para que la idea de “educación” se manifieste en el imperio español. En 1611, Lope de Vega habla de la educación como de una novedad. Ese año, la universidad de San Marcos en Lima celebraba su 60 aniversario. Centros de saber existían antes de que la palabra “educación” formara parte del lenguaje familiar. Se “leía” a los autores clásicos; se estudiaba el derecho; no se enseñaba a vivir…
+
+En el siglo XVI, en el corazón de todas las disputas teológicas se encontraba la necesidad de encontrar justificaciones, de las que la política supo servirse bien para explicar las grandes masacres de la época. En la Iglesia, cismas intervinieron y se hizo posible sostener convicciones diferentes sobre el punto de saber en qué medida el hombre nace pecador, corrompido o sometido a la predestinación. Desde el siglo XVII, el acuerdo se rehizo sobre un punto: el hombre nace no apto para la vida social, en consecuencia es necesario prepararlo proponiéndole una educación. Así, la educación se volvió lo opuesto de la competencia adquirida en la vida cotidiana y terminó por significar un método de tratamiento más que el simple saber de hechos de la existencia y la capacidad de servirse de herramientas que dan forma a la vida concreta del hombre. Progresivamente la educación se transformó en un servicio que había que producir, para el bien de todos, mercancía intangible que se recibía de la misma manera en que la Iglesia visible había conferido anteriormente la gracia invisible. El hombre, nacido en la estupidez original, debía ahora presentar cartas de creencia a la sociedad.
+
+La escuela y la educación mantuvieron relaciones comparables a las de la Iglesia y la religión o, en una perspectiva más general, a las que se establecen entre el rito y el mito; el rito crea y sostiene al mito; detenta una función mitopoiética. El mito inspira el “programa” por el que se perpetúa. La educación representa a la vez todo un conjunto de justificaciones sobre el plano social y un concepto para el que no podemos encontrar análogos específicos en otras culturas (fuera de la teología cristiana). La educación por el método de la escolaridad distingue fundamentalmente a las escuelas de otras instituciones de enseñanza que existieron en otras épocas. Ése es un aspecto que no hay que despreciar si queremos hacer aparecer las insuficiencias de las “escuelas” llamadas privadas, no estructuradas o independientes.
+
+Con el fin de sobrepasar una simple reforma de la clase, una escuela activa debe todavía rechazar el programa secreto de la escolaridad descrito anteriormente. Una escuela activa ideal intentaría proporcionar una educación esforzándose en evitar que esa educación se utilice para establecer o justificar una estructura de clase y se vuelva un patrón maestro para medir al alumno con cierto rasero. Debería, en consecuencia, no someter a este último a una represión, a un control o intentar definirlo de cualquier manera. Pero mientras las escuelas activas intenten proporcionar una “educación general”, no están en condiciones de sobrepasar una concepción fundada en los postulados secretos de la escuela.
+
+Entre sus principios, hay uno que Peter Schrag, en una perspectiva particular, definió como el “síndrome de inmigración”, que nos incita a tratar a todos los seres humanos como si fueran recién llegados que deben someterse a un proceso de naturalización. Sólo los consumidores garantizados del saber se admiten en la ciudadanía. Los hombres no nacen iguales, sólo por el periodo de gestación en el seno del _Alma mater_ podrán acceder a esta igualdad.
+
+Otro postulado conduce a creer que el hombre, nacido inmaduro, debe adquirir su “madurez” en el transcurso del primer periodo de su existencia para después formar parte de una sociedad civilizada. Esta idea de una “maduración” es, con toda seguridad, contraria a otra convicción que define al hombre como el mamífero que, por el mecanismo de la evolución y con el concurso de la selección natural entre sus maestros primates, adquirió el carácter específico de permanecer durante toda su vida “inmaduro” —lo que constituye su “gracia” particular—. Pero, en conformidad con la fijación ideológica sobre la madurez, nos persuadimos de que es necesario, después de su nacimiento, mantener al ser humano apartado de su medio natural y hacerlo pasar por una matriz social para que adquiera las cualidades necesarias para la vida cotidiana. Las escuelas activas son capaces de llenar esta función frecuentemente mucho mejor que escuelas de un modelo menos atractivo.
+
+Los establecimientos educativos liberados comparten con quienes lo son menos otra característica: despersonalizan la responsabilidad de la educación. Ponen una institución _in loco parentis_. Perpetúan la idea de que la enseñanza, si se realiza fuera del círculo familiar, debe estar asegurada por una “agencia” cuyo docente es sólo un representante. En una sociedad escolarizada, la misma familia se reduce a ser sólo una “agencia de aculturación”. En cuanto a los organismos educativos que emplean profesores para promover la política de su consejo administrativo, se vuelven instrumentos al servicio de una despersonalización de las relaciones entre personas privadas.
+
+Naturalmente, numerosas escuelas activas funcionan sin profesores acreditados. Al hacerlo representan una amenaza seria para los sindicatos de maestros, pero, no por ello, ponen en peligro la estructura social fundada en un reconocimiento de las profesiones. Una escuela en la que los miembros del consejo administrativo eligen y nombran a los profesores, sin preocuparse de saber si detentan certificados, una licencia o una credencial sindical, no atenta contra la legitimidad de la profesión de enseñante; no más que una encargada de un prostíbulo clandestino, en un país donde un trabajo así, para ser legal, debe hacerse bajo el control de la policía, ¡no cuestiona la legitimidad de la profesión más antigua del mundo!
+
+La mayoría de los que enseñan en escuelas activas no tienen la oportunidad de trabajar en su nombre. Aseguran la tarea de la enseñanza en nombre de un consejo; en nombre de sus alumnos asumen la función menos evidente de la enseñanza y sirven a la educación bajo su aspecto casi místico en nombre de toda “la sociedad”. La mejor prueba de ello es que pasan todavía más tiempo que sus colegas de la enseñanza pública reuniéndose en comisiones con el objeto de planificar el método por el cual la escuela debería educar. La duración de esas reuniones ha incitado a muchos docentes de alma generosa, una vez que sus ilusiones se han disipado, a pasar de la escuela pública a la enseñanza privada, para luego ir todavía más allá…
+
+Todos los establecimientos de enseñaza pretenden “formar hombres” en una tarea de mejoramiento del futuro, pero no les permiten cumplirla antes de que hayan adquirido una sólida tolerancia frente a las maneras de vivir de sus mayores. Es siempre una educación que prepara para la vida, más que adquirida en la vida cotidiana. Muy pocas escuelas activas pueden evitar esa trampa. Sin embargo, hay que reconocer que contribuyen a la aparición de un nuevo estilo de vida, no por el efecto que tendrán sus diplomas sobre la sociedad, sino más bien porque los padres que eligen educar a sus hijos sin beneficiarse de los servicios de enseñanza “ordenados según la regla” pertenecen frecuentemente a una minoría radical, y porque el interés que aportan a ese problema, el gusto que tienen de educar a sus hijos, los mantiene en su modo de vida.
+
+
+## Las influencias ocultas en el mercado de la educación
+
+La especie más peligrosa entre los reformadores en materia de educación es la que pretende demostrar que el saber puede producirse y venderse de manera mucho más eficaz en un mercado libre que en el que controla la escuela. Pretenden que una capacidad puede fácilmente adquirirse por medio de un modelo, aunque el aprendiz considere poco esta adquisición como de interés evidente. Afirman también que un sistema de asignación individualizado proporciona un poder de compra más igualitario en materia de educación. Piden, por último, que se distinga entre el método de adquisición y el que mide los resultados (lo que me parece una necesidad muy evidente). Pero sería erróneo creer que la instauración de un mercado abierto del saber representaría una solución opuesta a la de hoy en día.
+
+Esta sustitución aboliría, ciertamente, lo que llamamos el programa secreto de la escolaridad (el hecho de que hay que seguir a determinadas edades programas graduados). Un mercado abierto daría, en primer lugar, la impresión de que vamos al encuentro de esos principios en los que reposa una sociedad escolarizada: el “síndrome de la inmigración”, el monopolio institucional de la enseñanza y el rito de la integración progresiva. Pero, por lo mismo, un mercado libre de educación proporcionaría al alquimista innumerables ocasiones para influir en secreto, con el fin de encerrar a cada hombre en los múltiples y pequeños compartimentos que una tecnocracia todavía más desarrollada podría crear.
+
+La confianza puesta desde hace decenios en la escolarización del ser humano ha hecho del saber una mercancía de una especie particular. Como lo hemos visto, todos consideran ahora el saber como un artículo de primera necesidad y, al mismo tiempo, como la moneda de cambio más preciosa de la sociedad. Esta transformación del saber en bien de consumo se refleja, igualmente, en nuestro comportamiento de todos los días, incluso en el lenguaje familiar. Así, verbos que describen una actividad personal, como “aprender”, “alojarse”, “sanarse”, nos hacen irresistiblemente pensar en servicios cuya distribución está más o menos asegurada. Pensamos que es necesario resolver los problemas de la habitación, de los cuidados médicos, etc., sin recordar un solo instante que los hombres podrían curarse o edificar sus casas por ellos mismos. Todo es cuestión de servicios y el adolescente, en lugar de aprender, por ejemplo, a ocuparse de su abuela, aprende a manifestarse frente al asilo de ancianos donde no hay camas disponibles. ¿El desmantelamiento de la escuela sería, pues, suficiente para conducir a la desaparición de esas actitudes? (Mucho después de la adopción de la Primera Enmienda de la Constitución norteamericana se continuaba exigiendo la filiación a una Iglesia como condición para cualquier candidatura a un puesto oficial). Con mayor razón, ¿el cierre de las escuelas permitiría evitar que tuviéramos acceso a baterías de pruebas para medir el nivel de educación? Si ése no es el caso, esta nueva situación conduciría a la obligación, para cada uno, de adquirir un mínimo de mercancías en el depósito del saber. La ambición de medir científicamente el valor de cada hombre se vincula sin dificultad con el sueño del alquimista de hacer a todo hombre “educable” con el fin de guiarlo hacia una humanidad “verdadera”. Bajo la apariencia de un mercado libre, llegaremos a un entorno sometido al control de los terapeutas-pedagogos, a una matriz universal donde cada hombre se alimentaría con fluidos elegidos.
+
+Las escuelas limitan por ahora la competencia del profesor al salón de clases. No le permiten reivindicar la existencia del hombre para una región. Desde esta perspectiva, renunciar a la escuela haría desaparecer esta frágil barrera y conferiría una legitimidad semejante a la invasión pedagógica de la vida privada de cada uno. Podría conducir a una lucha encarnizada por la adquisición del saber en un mercado libre del conocimiento y a la edificación, bajo apariencias igualitarias, de una meritocracia.
+
+Las escuelas no son las únicas instituciones (ni incluso las más eficaces) que pretenden hacer de la información, de la comprensión y de la sabiduría rasgos d comportamiento susceptibles de contrastarse (y medirlos conduce a detentar la llave que abre las puertas del éxito y del poder). El sistema chino, por ejemplo, ofrecía, en el plano de la educación, una estimulante eficacia definiendo una clase relativamente abierta, cuyos privilegios dependían de la adquisición de un saber mesurable. Alrededor de 2 000 años antes de Cristo, parece que el emperador de China interrogaba cada tres años a sus administradores. Después de tres veces, les daba responsabilidades mayores o los echaba para siempre. Algunos 1 000 años más tarde, el primer emperador Chang estableció un verdadero examen para sus funcionarios. Música, tiro con arco y aritmética constituían los temas impuestos. Cada tres años, los concursos se abrían a los candidatos. Uno sobre 100 lograba franquear las tres series de pruebas que le conferían sucesivamente los títulos de “genio en hierbas”, de “perfecto letrado” y de “dispuesto para el servicio del emperador”. La selección era, pues, muy severa, y se le dedicaba la mayor importancia a los examinadores; así, por ejemplo, en el segundo nivel, en el que era necesario redactar una composición, el texto del candidato lo volvía a copiar un secretario antes de dárselo al jurado, a fin de que sus miembros no pudieran reconocer la caligrafía del autor.
+
+Más tarde, la promoción a rango de mandarín no daba necesariamente derecho a uno de los puestos deseados. Permitía solamente participar en el sorteo de esos empleos. Ninguna escuela apareció en China antes de la época de las luchas con los poderes europeos. El caso del imperio chino es único entre las grandes naciones, ya que no poseía ni Iglesia oficial ni sistema escolar, pero pudo durante cerca de 3 000 años reclutar su élite gubernamental sin fundar una vasta aristocracia hereditaria. El acceso a esa élite estaba reservado a la familia del emperador y a los que pasaban los exámenes.
+
+Voltaire y sus contemporáneos elogiaron el sistema chino, donde la promoción se fundaba en las pruebas dadas de un saber. Los exámenes de ingreso en la administración aparecieron en Francia en 1791; después, Napoleón los abolió. ¿Qué habría sucedido si, para propagar las ideas de la Revolución, se hubiera elegido el mandarinato en lugar del sistema escolar que inevitablemente sostiene al nacionalismo y a la disciplina militar? De hecho, Napoleón se erigió en el defensor de la escuela politécnica y del colegio de pensionados… Más que inspirarse en el mandarinato, las instituciones educativas se calcaron del modelo jesuita de la promoción ritual en el interior de una estructura jerárquica cerrada; de esa forma, las sociedades occidentales eligieron legitimar a sus élites.
+
+Los jefes de establecimientos escolares se volvieron, de alguna forma, los abades de una cadena mundial de monasterios en donde todos se dedicaron a acumular conocimientos que les permitieran acceder a la tierra prometida, paraíso terrestre sometido a las leyes del envejecimiento planificado que se desborda sin cesar. Eso nos recuerda el esfuerzo de los calvinistas que arrasaron todos los monasterios para, finalmente, transformar Ginebra en un vasto claustro. Tenemos, por lo tanto, razones para temer que el desmantelamiento de la escuela permita la aparición de una fábrica del saber a escala mundial. A menos que transformemos la idea que nos hemos hecho de la enseñanza o del saber, la desaparición de la escuela corre el riesgo de conducir a una situación donde, de un lado, se utilizará el sistema del mandarinato para separar el aprendizaje del saber de la prueba de control y, del otro, la sociedad se comprometerá a proporcionar la terapéutica necesaria a cualquier hombre para que pueda entrar en la “edad de oro”.
+
+Ni los alquimistas, ni los magos, ni los masones pueden resolver el problema que nos plantea la crisis de la enseñanza, La desescolarización de nuestra concepción del mundo exige que reconozcamos la naturaleza, a la vez, ilegítima y religiosa de la empresa educativa porque busca hacer del hombre un ser social sometiéndolo a un tratamiento con métodos técnicos apropiados.
+
+Adherirse al _ethos_ tecnocrático nos conduce a querer poner en marcha todo lo que es técnicamente realizable, poco importa si sus beneficiarios son forzosamente poco numerosos o si no experimentan su deseo. Sobre todo la privatización o la frustración de la mayoría de los seres humanos nunca entran en la línea de cuenta. Si, por ejemplo, es posible concebir el tratamiento mediante la bomba de cobalto, es necesario que la ciudad de Tegucigalpa disponga de aparatos adaptados en cada uno de sus dos grandes hospitales. Con todos esos créditos puestos ahí se habría podido luchar en toda Honduras contra la proliferación de parásitos… Las velocidades supersónicas sugieren que conviene inmediatamente acelerar los viajes de algunos. ¿Los vuelos a Marte? ¡Se encontrará siempre una razón para que parezcan indispensables! En el _ethos_ tecnocrático la pobreza está modernizada: ¿existían soluciones antiguas? Nuevos monopolios vienen a prohibirlas. A la penuria de los bienes de primera necesidad se agrega la conciencia de la diferencia sin cesar cada vez más grande entre los servicios técnicamente realizables y los que en la práctica son accesibles a las mayorías.
+
+Un profesor se vuelve “educador” desde el momento en que se incorpora a ese _ethos_ tecnocrático. Actúa inmediatamente como si la educación fuera una empresa tecnológica concebida para insertar al hombre en el entorno que crea el “progreso” de la ciencia. Se niega a ver la evidencia: el envejecimiento de todos los bienes programados se paga muy caro (el costo de la formación del personal capaz de adaptarse a las técnicas nuevas es sin cesar más alto). Parece olvidar que el precio creciente de las herramientas tiene consecuencias igualmente graves en el plano de la educación: en el momento mismo en que los horarios de trabajo disminuyen, se vuelve imposible el aprendizaje en los lugares de empleo donde se ha hecho de él el privilegio de un pequeño número. En todo el mundo el precio del coste de la educación de los hombres para la sociedad crece más rápidamente que la productividad de la economía en su conjunto, mientras menos y menos hombres experimentan el sentimiento de hacerse razonablemente útiles a la comunidad.
+
+
+## La escuela instrumento del progreso technocrático
+
+Educar para una sociedad de consumo resulta en formar consumidores. La reforma de la clase, su desaparición o su crecimiento no son ni más ni menos que métodos que, a pesar de sus diferencias aparentes, se dirigen a la formación de consumidores de bienes inmediatamente pasados de moda. La sobrevivencia de una sociedad en la que las tecnocracias pueden definir constantemente la dicha del hombre asimilado al consumo de los productos más recientes depende de las instituciones educativas (desde las escuelas hasta las agencias publicitarias) que transforman la educación en un medio de control social.
+
+En países ricos como Estados Unidos, Canadá o la URSS, las considerables inversiones en materia de enseñanza hacen más evidentes las contradicciones institucionales del progreso tecnocrático. En esos países, el aumento ideológico del progreso ilimitado reposa en la idea de que el efecto igualitario de una formación permanente contrabalancea la influencia inversa de la regla del envejecimiento perpetuo. La legitimidad de la sociedad industrial depende de la credibilidad de la escuela, cualquiera que sea el partido en el poder. En tales condiciones, el público manifiesta un interés súbito por libros como el reporte de Charles Silberman a la comisión Carnegie, publicado bajo el título _Crisis en el salón de clases (Crisis in the Classroom)_ ; esta investigación inspira confianza en la medida en que la acusación que el autor lanza contra la escuela está apoyada sólidamente. Pero tales estudios se dirigen a salvar el sistema tratando de corregir sus fallas más evidentes. Por lo mismo, pueden suscitar un nuevo ascenso de esperanzas engañosas.
+
+Por todas partes crecientes inversiones consagradas a las escuelas vuelven la absurdidad de la empresa escolar más evidente. Puede parecer paradójico que los pobres sean sus primeras víctimas. En el fondo, eso es lo que muestra el reporte de la comisión de encuestas Wright en Ontario: a propósito de la enseñanza superior, los miembros de la comisión señalan que las capas pobres de la población las subvencionaban desde el punto de vista de la imposición de manera desproporcionada, ya que los ricos eran casi los únicos beneficiarios.
+
+Esta observación podría inmediatamente hacerse en otra parte. En la URSS, un sistema de cuota aplicado durante muchos decenios parece favorecer la admisión a la universidad de los hijos de los trabajadores a expensas de las hijas e hijos de universitarios. Actualmente estos últimos son sobrerrepresentados en las clases superiores y terminales de la enseñanza rusa y en una proporción todavía más grande que en Estados Unidos.
+
+El 8 de marzo de 1971, el juez Warren E. Burger hacía público el veredicto unánime de la corte en el caso Griggs contra la sociedad Duke Power. Fundándose en la voluntad expresada por el Congreso en el artículo que concierne a la igualdad de oportunidades en la ley de 1964, la corte resolvió por unanimidad que cualquier “diploma” exigido a un candidato por un empleo (o cualquier prueba seguida) debía “medir al hombre en relación con un trabajo dado” y no “al hombre mismo en un plano abstracto”. Además, correspondía al empresario probar que sus exigencias en materia de diplomas constituía una “medida razonable de la calificación requerida”. Mediante estas consideraciones, los jueces querían evitar que las pruebas y diplomas exigidos no se utilizaran en provecho de una discriminación racial, pero la lógica del razonamiento podría también aplicarse a cualquier exigencia de un “ _pedigree_ educativo” en materia de empleo. Es tiempo de formar causa contra la “gran estafa de la formación profesional” denunciada tan justamente por Ivar Berg.
+
+En los países pobres, las escuelas sirven para justificar el atraso económico de una nación: a la mayoría de los ciudadanos se le mantiene apartada de los magros medios modernos de producción y de consumo, pero todos sueñan con beneficiarse de los favores de la economía franqueando el umbral de una escuela. La repartición jerárquica de los privilegios y del poder ya no depende, en nuestros días y en el plano de la legitimidad, de una descendencia de ancestros, de la herencia, del favor del príncipe, incluso de una lucha sin cuartel en el mercado económico o en el campo de batalla. Su verdadera legitimidad la encuentra en una forma más sutil del capitalismo donde la institución encargada de conferirla se encuentra en la escolaridad obligatoria. Quien aprovechó los servicios de la escuela vuelve entonces al subprivilegiado responsable de su desgracia: es un mal consumidor del saber. Esta justificación de la desigualdad social no resiste siempre el examen de los hechos y los regímenes populares tienen cada vez más dificultades para disimular las contradicciones entre la propaganda y la realidad.
+
+Desde hace 10 años, Cuba se esfuerza por promover el crecimiento rápido de la educación popular dando confianza a la mano de obra disponible sin tomar en cuenta la calificación profesional. Al principio, el éxito de esta campaña (en particular la disminución espectacular del número de analfabetos) se ha citado como prueba de que las tasas de crecimiento limitadas de los otros sistemas escolares latinoamericanos eran imputables a la corrupción, al militarismo y a la economía de mercado capitalista.
+
+Sin embargo, la lógica de la escolarización se hace sentir manifiestamente a consecuencia de los esfuerzos de Castro por “reproducir” al hombre nuevo mediante la escuela. Incluso si los estudiantes pasan la mitad del año en la zafra y sostienen activamente los ideales igualitarios del _compañero_ Fidel, la universidad cultiva cada año una nueva cosecha de consumidores conscientes de su saber, prontos a acceder a nuevos niveles de consumo. Al mismo tiempo, el doctor Castro debe enfrentarse a la evidencia de que el sistema escolar nunca producirá suficiente mano de obra técnica diplomada. Esos diplomados que obtienen los nuevos empleos destruyen por su conservadurismo los resultados conseguidos por los cuadros no diplomados que llegaron a su posición mediante una formación en el taller. No basta con acusar a los docentes para explicar los fracasos de un gobierno revolucionario que quiere con todas sus fuerzas una institucionalización de la mano de obra siguiendo un programa secreto que garantice la producción de una burguesía universal.
+
+
+## Enseñar instruirse responsabilidades personales
+
+Contra esta voluntad de adquirir privilegios y poder que poseen quienes detentan la competencia profesional en nombre de sus pretendidos derechos, no sabríamos imaginar una revolución sin acusar a la concepción misma de la adquisición del saber. Lo que nos conduce, en primer lugar, a considerar la cuestión de la responsabilidad en ese ámbito, ya se trate de enseñar o de instruir. Dar a conocer una mercancía sólo se consigue si imaginamos que resulta de la acción institucional o que satisface objetivos institucionales
+
+Para disipar este mal encantamiento, el hombre debe volver a encontrar el sentido de su responsabilidad personal cuando aprende o enseña. De esa forma se pondrá un término a esta nueva alienación donde vivir e instruirse no se toparán.
+
+Recobrar el poder de aprender o de enseñar tiene como consecuencia que el profesor, al tomar el riesgo de inmiscuirse en la vida privada de otros, debe asumir la responsabilidad de sus resultados; de la misma manera, el estudiante que se pone bajo la influencia de un profesor debe sentirse responsable de su propia educación. En esa perspectiva, las instituciones educativas —si realmente son necesarias— irán teniendo el aspecto de centros abiertos a todos, donde cada uno pueda encontrar lo que busca, donde uno, por ejemplo, tenga acceso a un piano, el otro, a un horno de cerámica o a registros, libros, diapositivas, etc. Hoy en día, las escuelas, los estudios de televisión y otros sitios similares están concebidos para que los profesionales los utilicen. Desescolarizar la sociedad quiere decir, ante todo, rechazar el estatus profesional del oficio que, por orden de antigüedad, viene, justo después, del más viejo del mundo, por el que entiendo la enseñanza. La calificación de los profesores constituye ahora una traba al derecho a la palabra, de igual forma que la estructura corporativa y la credencial profesional de los periodistas representan una traba al derecho de la libertad de información. La regla de la presencia obligatoria es contraria a la libertad de reunión. La desescolarización de la sociedad sólo sabría concebirse como una mutación cultural por la que un pueblo vuelve a encontrar el poder de gozar de sus libertades constitucionales.
+
+Instruirse, enseñar, concierne a hombres que saben que nacieron libres y que no tienen, para adquirir esa libertad, que recurrir a un tratamiento apropiado. ¿Cuándo, por lo general, aprendemos? Cuando hacemos lo que nos interesa. ¿No somos, la mayor parte de nosotros, curiosos? Queremos comprender, darle un sentido a lo que se encuentra frente a nosotros, a lo que nos concierne. ¿No somos capaces de una relación personal con otros a menos de que seamos embrutecidos por un trabajo inhumano o fascinados por el ideal escolar?
+
+El hecho de que los habitantes de países ricos apenas se instruyan por sí mismos no constituye una prueba de lo contrario. Es más bien la consecuencia de una vida en un entorno donde paradójicamente no encuentran nada que aprender en la medida en que su medio está en gran parte “programado”. Están sin cesar frustrados por la estructura de una sociedad contemporánea en la que lo real, sobre lo que las decisiones podrían apoyarse, se ha vuelto de una naturaleza inasible. Viven, efectivamente, en un medio donde las herramientas que sería posible utilizar con fines creadores se vuelven productos de lujo, donde los canales de comunicación pertenecen a algunos que únicamente pueden hablar a la multitud.
+
+
+## Una tecnología nueva más que una nueva educación
+
+Un mito moderno quisiera hacemos creer que el sentimiento de impotencia que hoy en día experimenta la mayoría de los hombres sería consecuencia de la tecnología capaz de crear solamente vastos sistemas. Pero no es sólo la tecnología la que inventa esos sistemas, la que crea herramientas inmensamente poderosas, la que teje canales de comunicación en sentido único; por el contrario, mejor utilizada, la tecnología podría proporcionar a cada hombre la posibilidad de entender mejor su medio, de trabajarlo con sus propias manos, de comunicar mejor que en el pasado. Esta utilización de la tecnología, contrariamente a las tendencias actuales, constituye la verdadera alternativa al problema de la educación.
+
+Para que un hombre pueda crecer, lo que necesita es el libre acceso a las cosas, a los sitios, a los métodos, a los acontecimientos, a los documentos. Tiene necesidad de ver, de tocar, de manipular, gustoso de asir todo lo que le rodea en un medio que no esté desprovisto de sentido. Ese acceso se le rehúsa hoy en día. Cuando el saber se ha vuelto un producto, adquiere la protección que se dispensa a la propiedad privada, De esa forma, un principio que se concibió para preservar la vida personal de cada uno se utiliza para justificar las prohibiciones que se lanzan contra aquellos que no portan los documentos necesarios. En las escuelas los profesores conservan sus propios conocimientos, a menos que esos conocimientos se inserten en el programa del momento. Los media informan, pero omiten todo lo que se considera impropio para la difusión. Los especialistas se encierran en su jerga y se necesitan vulgarizadores para asegurar su traducción. Los cuerpos profesionales protegen los diplomas y la burocracia los secretos. Todas las profesiones detentan el poder de echar de su ámbito a las personas no autorizadas; sucede lo mismo con las instituciones y las naciones.
+
+Ni la estructura política ni la estructura profesional de nuestras sociedades, tanto en el Oeste como en el Este, podrían resistir la desaparición de estas prohibiciones, el trastrocamiento de esta posibilidad de tener a capas enteras de la población apartadas de lo que podría servirles. El acceso a los hechos que preconizamos no se satisface con una simple operación “etiquetas-verdad”. Es necesario construir este acceso a la realidad (y todo lo que pedimos de la publicidad es una garantía que no sea mentirosa). El acceso a la realidad constituye la alternativa fundamental en materia de educación frente a un sistema de enseñanza que sólo se propone hablar de él.
+
+Abolir el derecho al secreto profesional (incluso cuando la opinión del hombre profesional es que ese secreto sirve al bien común) representa, como hemos querido demostrarlo, un objetivo político mucho más radical que la reivindicación tradicional de nacionalizar o de controlar democráticamente las herramientas de producción. La socialización de las herramientas, sin la socialización efectiva de los conocimientos técnicos, tiende a poner el “capital del saber” en la posición que anteriormente ocupaba el financiero. Si el tecnócrata pretende apoderarse del poder es que él detenta una parte capital en la sociedad del saber secreto y reservado al pequeño número. Para proteger el valor de sus acciones y para aumentarlo, imagina una vasta organización que hace difícil, incluso imposible, el acceso al saber técnico.
+
+El hombre motivado necesita un tiempo relativamente corto para adquirir una capacidad que quiere utilizar —lo que tendemos a olvidar en una sociedad donde los profesores monopolizan la posibilidad de acceder a cualquier actividad y detentan el poder de acusar de charlatanería a todos aquellos que no se someten—. ¿En las industrias y en la investigación se requieren muchas capacidades que sean tan terribles, complejas y peligrosas como manejar un coche? Ese saber se adquiere muy pronto con la ayuda de un igual. No todos los seres están dotados para el ejercicio de la lógica matemática, pero quienes lo están hacen progresos rápidos desafiándose mutuamente en partidos de juegos educativos. En Cuernavaca uno de 20 niños es capaz de vencerme en esos juegos después de 15 días de entrenamiento. En cuatro meses, la gran mayoría de los adultos que vinieron a nuestro centro a aprender español llegaron a un nivel de conocimiento suficiente para atacar problemas abstractos.
+
+Una primera etapa de acceso a conocimientos consistiría en encontrar ventajas diversas para aquellos que, poseedores de una capacidad, quisieran compartirla. Eso, inevitablemente, chocaría con intereses de grupos profesionales y sindicatos. Esta multiplicidad de posibles aprendizajes tiene, sin embargo, con qué seducirnos. ¿Está prohibido imaginar a alguien que sabe a la vez conducir, reparar el teléfono, instalar plomería, actuar como partera y dibujar planos arquitectónicos? A esos, como decimos, se opondrían los grupos de interés y los consumidores disciplinados, diciendo muy alto que el público no podría prescindir de una garantía profesional (argumento cuya validez es cada vez menos evidente a los ojos de las asociaciones de defensa del consumidor). Debemos tomar mucho más en serio la objeción que los economistas harían de esta socialización de las capacidades: el “progreso”, dirían, se frenaría si el saber (títulos, capacidades y todo lo demás…) se democratiza. La mejor respuesta ¿no sería mostrar las tasas de crecimiento de los absurdos en materia económica que engendra el sistema escolar?
+
+Poder aproximar a quienes están deseosos de compartir sus conocimientos no es garantía de que haya adquisición de un saber. Dicho acceso está limitado no sólo por el monopolio de los programas educativos y el de los sindicatos, sino también por una tecnología de penuria. Las capacidades que hoy en día valen son las que se aplican al funcionamiento de “herramientas” concebidas de tal manera que no puedan generalizarse. Efectivamente, esas “herramientas” sirven para producir bienes o servicios de los que todos quieren gozar, pero esto último sólo se concede a un pequeño número y sólo pocos saben utilizarlas. Únicamente algunos privilegiados, por ejemplo, sobre el conjunto de los que sufren una determinada enfermedad, pueden beneficiarse de los descubrimientos de una investigación médica compleja, y todavía son menos los médicos que obtienen los conocimientos necesarios para utilizar dichas tecnologías.
+
+Sin embargo, la investigación médica ha permitido crear un maletín de auxilios que permite a los enfermeros de la armada, después de sólo algunos meses de formación, obtener en el campo de batalla resultados muy superiores a los de los verdaderos médicos de la segunda Guerra Mundial. A un nivel todavía más inmediato, ¿no podría cualquier campesina aprender a reconocer y a curar las enfermedades infecciosas más comunes si investigadores médicos prepararan los remedios y las instrucciones necesarias para un determinado sector geográfico?
+
+Todos estos ejemplos buscan ilustrar el hecho de que simples consideraciones educativas bastan para exigir una importante reducción de la importancia dada a las profesiones que se oponen a las relaciones entre los hombres de ciencia y la mayoría de quienes quieren tener acceso a esta ciencia. Si se prestara atención a esta demanda, todos los hombres podrían aprender a utilizar las herramientas de ayer, vueltas más eficaces y más durables gracias a la ciencia de hoy, para crear el mundo de mañana.
+
+Por desgracia, es la tendencia contraria la que impera. Conozco una zona costera de América del Sur donde la mayoría de los habitantes viven de la pesca. Disponen de pequeñas embarcaciones y la introducción del motor auxiliar ha representado para ellos una verdadera revolución, de consecuencias a veces dramáticas. En el sector que estudié, la mitad de los motores comprados entre 1945 y 1950 funcionan todavía gracias a constante mantenimiento; por el contrario, los que se compraron en 1965 ya no funcionan porque no se concibieron para repararse. El progreso técnico proporciona a la mayoría de los seres humanos instrumentos inútiles, demasiado costosos, privándolos de las herramientas más simples que necesitan.
+
+Desde 1940, considerables progresos se han realizado en el ámbito de los materiales metálicos, plásticos y de fibrocemento que se utilizan en la construcción, lo que debería darle a muchos seres humanos la posibilidad de construir sus propias casas. Pero en Estados Unidos, por ejemplo, mientras que en 1948 más de 30% de las habitaciones individuales las habían construido sus propietarios, a fines de 1960 ese porcentaje había caído a menos de 20 puntos.
+
+El descenso del nivel de las capacidades por efecto de lo que se llama el “desarrollo económico” es aún más visible en América Latina. Ahí, la mayoría de los habitantes construyen todavía ellos mismos sus casas. Utilizan frecuentemente adobe y cal, materiales cuya utilidad es muy alta en clima cálido y húmedo. En otros sitios edifican casas con placas de chapa, cartón y otros desperdicios de la civilización industrial… En lugar de proporcionar a los habitantes herramientas simples y elementos estandarizados, sólidos, fácilmente reemplazables o reparables, los gobernantes de esos países se lanzaron a una política de producción masiva de habitaciones de interés social. Es, sin embargo, evidente que ninguno de ellos puede darse el lujo de proporcionar unidades habitacionales modernas a la mayoría de los habitantes. Por todas partes esta política prohibí a las masas adquirir los conocimientos y las habilidades necesarias para la construcción de casas más decentes.
+
+
+## Una pobreza libremente consentida
+
+Darse cuenta de las posibilidades de educación nos permite ver que cualquier sociedad posindustrial debe disponer de un herramental de base cuya misma naturaleza no permita el desarrollo del control tecnocrático. Debemos, en efecto, esforzarnos por hacer surgir una sociedad donde el saber científico pueda estar, de alguna forma, abierto a las herramientas útiles, a las piezas de ensamble en unidades de dimensiones limitadas, para que sean comprensibles a los hombres. Dicho herramental permite asociarse para cumplir una tarea o, como todo mil usos lo sabe instintivamente, descubrirlas sirviéndose de ellas para nuevas posibilidades de uso. Por la combinación de posibilidades de acceso siempre abiertas a lo que sucede a nuestro alrededor y por los límites impuestos al poder de las herramientas será posible visualizar una “economía de subsistencia” capaz de utilizar las ventajas de la ciencia moderna.
+
+Desarrollar dicha economía servirá a los intereses de la aplastante mayoría de los habitantes de países pobres, pero también es la única alternativa posible en los países ricos frente a la creciente contaminación, la explotación, la construcción de un mundo cada vez más ensombrecido. Como lo hemos señalado, derribar el mito del “producto nacional bruto” no se concibe sin atacar al mismo tiempo el de la “educación nacional bruta” (que conduce a la capitalización de la mano de obra). Una economía igualitaria no podría existir en una sociedad en la que el derecho de producir lo confieren las escuelas.
+
+Construir una economía de subsistencia moderna no depende de invenciones científicas nuevas. Su edificación pasa por una elección deliberada del conjunto de la sociedad que debe definir límites fundamentales al desarrollo de las burocracias y de las tecnocracias.
+
+Estos límites pueden definirse de diferente manera, pero su utilidad dependerá de que se tomen en cuenta las verdaderas dimensiones de la existencia. (La posición del Congreso contra el desarrollo del transporte supersónico va en buena dirección.) Estas restricciones que se impondría voluntariamente la sociedad deben dirigirse a problemas simples, accesibles a todos; podríamos aquí retomar el ejemplo de los aviones supersónicos. Lo que guiaría la elección sería la conciencia de la necesidad de un disfrute igual de los frutos del saber científico. Los franceses dicen que se necesitarían mil años para enseñarle a un país a ocuparse de una vaca; no se necesitarían dos generaciones para ayudar a todos los habitantes de América Latina o de África a utilizar (o a reparar) motores auxiliares de vehículos simplificados, de bombas, de maletines médicos, de construcciones de hormigón, si la concepción de esos equipamientos no cambiara casi cada año. Obtener igual provecho de las adquisiciones de la técnica conduciría, sin duda, a una vida donde el gozo estaría presente, gozo, con sentido, de las relaciones establecidas entre los hombres, y como al mismo tiempo los hombres vivirían en un medio en donde el absurdo ya no tendría sitio, el derecho igual a los bienes de la sociedad se confundiría finalmente con la igualdad en materia de educación.
+
+Hoy en día es difícil imaginar un consenso sobre la austeridad. La razón que por costumbre se da para explicar la impotencia actual de la mayoría se sitúa en una perspectiva (económica o política) de clases, y por lo general no nos damos cuenta de que las nuevas estructuras de clase impuestas por una sociedad escolarizada son más fácilmente controladas por los intereses establecidos. Sin duda alguna, una organización imperialista y capitalista de la sociedad definió un conjunto social en el interior del cual una minoría posee una influencia desproporcionada sobre la opinión de la mayoría. Pero en una sociedad tecnocrática, el poder de un pequeño número de “capitalistas del saber” es capaz de impedir la formación de una verdadera opinión pública por el control de las técnicas científicas y de los medios de comunicación entre los hombres.
+
+Las garantías constitucionales dadas a la libertad de expresión, de prensa, de reunión, se dirigían a asegurar el acceso del gobierno por el pueblo. La electrónica moderna, las prensas offset, las computadoras, los teléfonos podrían representar un equipamiento capaz de dar un sentido completamente nuevo a esas libertades. Por desgracia, todas esas conquistas técnicas se utilizan para acrecentar el poder de los banqueros del conocimiento, en lugar de servir para tejer las verdaderas redes que proporcionarían oportunidades iguales de encuentro a la mayoría de los seres humanos.
+
+Desescolarizar la estructura social y cultural exige utilizar la tecnología para hacer posible una política de participación. Sobre la base de una coalición de la mayoría se podrían determinar los límites del secreto y del poder creciente sin que exista dictadura.
+
+Necesitamos un entorno nuevo en el cual crecer para conocer una sociedad sin clases o entraremos en el “mundo feliz” donde el _big brother_[^n23] estará ahí para educarnos a todos.
+
+[^n01]: Penrose B. Jackson, _Trends in Elementary Education Expenditures. Central City and Suburban Comparisons 1965 to 1968_ , U. S. Office of Education, Office of Program and Planning Evaluation, junio de 1969.
+
+[^n02]: En español en el original.
+
+[^n03]: _Agua_ , _tierra_ , _casa_ son algunas de las palabras generadoras que Paulo Freire incluye en la relación educador-educando.
+
+[^n04]: _Atomic Ballistic Missile_. (T.)
+
+[^n05]: Respecto a las historias paralelas del capitalismo moderno y la niñez moderna véase Philippe Ariès, _L’Enfant et la vie familiale sous l’Ancien Régime,_ Seuil, 1973.
+
+[^n06]: Agency for International Development: organismo del Departamento de Estado de Estados Unidos. (T.)
+
+[^n07]: El autor se refiere a las Enmiendas a la Constitución de Estados Unidos (1971), que establecen, respectivamente: _a)_ las libertades de religión, expresión, reunión y de ser oídos para pedir justicia, y _b)_ de no ser llamado a responder por delitos graves sin ser declarado reo, de no ser condenado dos veces a muerte por una misma causa, ni a testimoniar contra sí mismo, de no ser privado de la libertad o de las propiedades sin un debido proceso legal, ni a ser expropiado sin justa compensación. (T.)
+
+[^n08]: Buen riesgo: en el lenguaje de los aseguradores, el que tiene muy pocas oportunidades de concretarse en una pérdida. (T.)
+
+[^n09]: Culto creado por indígenas de Nueva Guinea, que atribuye un origen mágico a los artículos occidentales (aviones, radios, relojes, plásticos, etc.). (T.)
+
+[^n10]: _Truant officer_. El que lleva a la escuela a quienes deben cumplir con la instrucción legal obligatoria. (T.)
+
+[^n11]: _Ética a Nicómaco_ , 1140.
+
+[^n12]: Este capítulo fue presentado originalmente en una sesión de la American Educational Research Association, en la ciudad de Nueva York, el 6 de febrero de 1971.
+
+[^n13]: Véase Joel Spring, _Education and the Rise of the Corporate State_ , Cuaderno núm. 50, Centro Intercultural de Documentación, Cuernavaca, México, 1971.
+
+[^n14]: Equivalente a los grados primero, segundo y tercero de secundaria, o los antiguos tres primeros años de bachillerato —cuando había seis—. (T.)
+
+[^n15]: En francés, en el original.
+
+[^n16]: Office of Economic Opportunity, organismo oficial en Estados Unidos. (T.)
+
+[^n17]: Lenguaje usado en informática para fines comerciales. (T.)
+
+[^n18]: En el francés, en el original.
+
+[^n19]: Las tres citas provienen de “People” (“Gente”), del libro _Poemas escogidos_ de Yevgeny Yevtushenko. Traducidos por Robin Milner-Gulland y Peter Levi, y con una introducción de los traductores. Publicado por E. P. Dutton & Co., 1962, y reimpreso con su autorización.
+
+[^n20]: Las 14 más célebres universidades de Estados Unidos constituyen esta “liga de la hiedra” _(ivy league)_. (Son miembros de ella, por ejemplo, Yale, Harvard, Princeton…) Es una asociación sin objetivo definido, pero que conserva la tradición de grandeza. Saca su nombre de la hiedra que recubre los edificios más antiguos. (T.)
+
+[^n21]: El hecho de asistir a los cursos representa cierto número de créditos por semestre. Para tener acceso al diploma es necesario haber cubierto un número de 135 en cuatro años. (T.)
+
+[^n22]: En francés, en el original. (T.)
+
+[^n23]: Alusiones al libro de Aldous Huxley, _Un mundo feliz_ , y al de George Orwell, _1984._
+
diff --git a/platform/bin/pandoc/book/es.pdf b/platform/bin/pandoc/book/es.pdf
new file mode 100644
index 0000000..8a1fd33
--- /dev/null
+++ b/platform/bin/pandoc/book/es.pdf
Binary files differ
diff --git a/platform/bin/pandoc/book/run.sh b/platform/bin/pandoc/book/run.sh
new file mode 100755
index 0000000..ea0af01
--- /dev/null
+++ b/platform/bin/pandoc/book/run.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+cd `dirname $0`
+
+echo "++++ I will generate a PDF of the book"
+
+rm -f *.pdf *.aux *.log *.nav *.out *.snm *.toc *.vrb
+
+make
diff --git a/platform/bin/template.tex b/platform/bin/pandoc/book/template.tex
index 1faea77..6a41354 100644
--- a/platform/bin/template.tex
+++ b/platform/bin/pandoc/book/template.tex
@@ -16,7 +16,6 @@
$if(newtxmathoptions)$
\usepackage[$for(newtxmathoptions)$$newtxmathoptions$$sep$,$endfor$]{newtxmath}
-\let\Bbbk\relax
$endif$
$if(fontfamily)$
\usepackage[$for(fontfamilyoptions)$$fontfamilyoptions$$sep$,$endfor$]{$fontfamily$}
@@ -27,7 +26,7 @@ $if(linestretch)$
\usepackage{setspace}
\setstretch{$linestretch$}
$endif$
-\usepackage{amssymb,amsmath}
+% \usepackage{amssymb,amsmath}
\usepackage{ifxetex,ifluatex}
\usepackage{fixltx2e} % provides \textsubscript
\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
diff --git a/platform/i18n/textinsert_strings.php b/platform/i18n/textinsert_strings.php
index 369ee7b..d0dd23c 100644
--- a/platform/i18n/textinsert_strings.php
+++ b/platform/i18n/textinsert_strings.php
@@ -2,8 +2,11 @@
// this is initially defined in textinsert database: /index?do=admin&page=textinsert
// the database is stored in /www/data/meta/macros/macros.ser
-$lang_en['authors'] = 'Authors';
-$lang_es['authors'] = 'Autores';
+$lang_en['authors'] = 'Co-Authors';
+$lang_es['authors'] = 'Co-Autores';
+
+$lang_en['translators'] = 'Translators';
+$lang_es['translators'] = 'Traductores';
$lang_en['textfull'] = 'Full text';
$lang_es['textfull'] = 'Texto completo';
@@ -11,6 +14,9 @@ $lang_es['textfull'] = 'Texto completo';
$lang_en['titleorig'] = 'Original title';
$lang_es['titleorig'] = 'Título original';
+$lang_en['langorig'] = 'Original language';
+$lang_es['langorig'] = 'Idioma original';
+
$lang_en['publicationdate'] = 'Original publication';
$lang_es['publicationdate'] = 'Primera publicación';
@@ -22,3 +28,9 @@ $lang_es['versions'] = 'Otras versiones';
$lang_en['translations'] = 'Translations';
$lang_es['translations'] = 'Traducciones';
+
+$lang_en['lang_en'] = 'English';
+$lang_es['lang_en'] = 'Inglés';
+
+$lang_en['lang_es'] = 'Spanish';
+$lang_es['lang_es'] = 'Español';
diff --git a/platform/www/conf/local.php b/platform/www/conf/local.php
index 976def9..6b074ca 100644
--- a/platform/www/conf/local.php
+++ b/platform/www/conf/local.php
@@ -3,10 +3,10 @@
* Dokuwiki's Main Configuration File - Local Settings
* Auto-generated by config plugin
* Run for user: admin
- * Date: Sat, 12 Mar 2022 20:10:08 +0000
+ * Date: Mon, 26 Jun 2023 12:02:54 -0300
*/
-$conf['title'] = 'The Acervus Project';
+$conf['title'] = 'Acervus';
$conf['start'] = 'index';
$conf['template'] = 'acervus';
$conf['license'] = '';
@@ -18,9 +18,18 @@ $conf['disableactions'] = 'register';
$conf['htmlok'] = 1;
$conf['target']['extern'] = '_blank';
$conf['mailfrom'] = 'info@acerv.us';
+$conf['updatecheck'] = 0;
$conf['userewrite'] = '1';
$conf['plugin']['authldap']['attributes'] = array();
+$conf['plugin']['blog']['formposition'] = 'none';
+$conf['plugin']['include']['showfooter'] = 0;
+$conf['plugin']['include']['showdate'] = 0;
+$conf['plugin']['include']['showuser'] = 0;
+$conf['plugin']['include']['showcomments'] = 0;
+$conf['plugin']['include']['showlinkbacks'] = 0;
+$conf['plugin']['include']['showtags'] = 0;
$conf['plugin']['pageredirect']['show_note'] = 0;
+#$conf['plugin']['translation']['translations'] = 'en es de fr it pt';
$conf['plugin']['translation']['translations'] = 'en es';
$conf['plugin']['translation']['display'] = 'langcode,name';
$conf['plugin']['translation']['translateui'] = 1;
@@ -29,4 +38,6 @@ $conf['plugin']['translation']['copytrans'] = 1;
$conf['tpl']['acervus']['numberedHeading'] = 1;
$conf['tpl']['acervus']['tocPosition'] = 'dokuwiki';
$conf['tpl']['acervus']['footer'] = 'footer';
+$conf['plugin']['mdpage']['flavor'] = 'markdown-extra';
+$conf['plugin']['mdpage']['markdown_default'] = '1';
$conf['plugin']['fastwiki']['save'] = '1';
diff --git a/platform/www/conf/local.php.bak.php b/platform/www/conf/local.php.bak.php
index d4bc65f..02d9b84 100644
--- a/platform/www/conf/local.php.bak.php
+++ b/platform/www/conf/local.php.bak.php
@@ -3,7 +3,7 @@
* Dokuwiki's Main Configuration File - Local Settings
* Auto-generated by config plugin
* Run for user: admin
- * Date: Mon, 07 Mar 2022 01:33:50 +0000
+ * Date: Wed, 14 Jun 2023 14:32:18 -0300
*/
$conf['title'] = 'The Acervus Project';
@@ -16,9 +16,18 @@ $conf['useacl'] = 1;
$conf['superuser'] = 'admin';
$conf['disableactions'] = 'register';
$conf['htmlok'] = 1;
+$conf['target']['extern'] = '_blank';
+$conf['mailfrom'] = 'info@acerv.us';
+$conf['updatecheck'] = 0;
$conf['userewrite'] = '1';
$conf['plugin']['authldap']['attributes'] = array();
-$conf['plugin']['fastwiki']['save'] = 1;
+$conf['plugin']['include']['showfooter'] = 0;
+$conf['plugin']['include']['showdate'] = 0;
+$conf['plugin']['include']['showuser'] = 0;
+$conf['plugin']['include']['showcomments'] = 0;
+$conf['plugin']['include']['showlinkbacks'] = 0;
+$conf['plugin']['include']['showtags'] = 0;
+$conf['plugin']['pageredirect']['show_note'] = 0;
$conf['plugin']['translation']['translations'] = 'en es';
$conf['plugin']['translation']['display'] = 'langcode,name';
$conf['plugin']['translation']['translateui'] = 1;
@@ -27,3 +36,6 @@ $conf['plugin']['translation']['copytrans'] = 1;
$conf['tpl']['acervus']['numberedHeading'] = 1;
$conf['tpl']['acervus']['tocPosition'] = 'dokuwiki';
$conf['tpl']['acervus']['footer'] = 'footer';
+$conf['plugin']['mdpage']['flavor'] = 'markdown-extra';
+$conf['plugin']['mdpage']['markdown_default'] = '1';
+$conf['plugin']['fastwiki']['save'] = '1';
diff --git a/platform/www/conf/plugins.local.php.bak b/platform/www/conf/plugins.local.php.bak
new file mode 100644
index 0000000..fe50358
--- /dev/null
+++ b/platform/www/conf/plugins.local.php.bak
@@ -0,0 +1,9 @@
+<?php
+/*
+ * Local plugin enable/disable settings
+ * Auto-generated through plugin/extension manager
+ *
+ * NOTE: Plugins will not be added to this file unless there is a need to override a default setting. Plugins are
+ * enabled by default.
+ */
+$plugins['blog'] = 0;
diff --git a/platform/www/data/media/en/docs/markdown_headers.jpg b/platform/www/data/media/en/docs/markdown_headers.jpg
new file mode 100644
index 0000000..16b89e1
--- /dev/null
+++ b/platform/www/data/media/en/docs/markdown_headers.jpg
Binary files differ
diff --git a/platform/www/data/media_meta/en/docs/markdown_headers.jpg.changes b/platform/www/data/media_meta/en/docs/markdown_headers.jpg.changes
new file mode 100644
index 0000000..4bb7c11
--- /dev/null
+++ b/platform/www/data/media_meta/en/docs/markdown_headers.jpg.changes
@@ -0,0 +1 @@
+1707259176 192.168.56.1 C en:docs:markdown_headers.jpg admin created 33832
diff --git a/platform/www/data/meta/de/index.changes b/platform/www/data/meta/de/index.changes
new file mode 100644
index 0000000..68b7396
--- /dev/null
+++ b/platform/www/data/meta/de/index.changes
@@ -0,0 +1 @@
+1687791829 192.168.56.1 C de:index admin created 1919
diff --git a/platform/www/data/meta/de/index.indexed b/platform/www/data/meta/de/index.indexed
new file mode 100644
index 0000000..7070c46
--- /dev/null
+++ b/platform/www/data/meta/de/index.indexed
@@ -0,0 +1 @@
+8+plugin_include=0.1.safeindex=1+plugin_tag=0.2.deaccent=1 \ No newline at end of file
diff --git a/platform/www/data/meta/de/index.meta b/platform/www/data/meta/de/index.meta
new file mode 100644
index 0000000..c9b5a7b
--- /dev/null
+++ b/platform/www/data/meta/de/index.meta
@@ -0,0 +1,7 @@
+a:2:{s:7:"current";a:8:{s:4:"date";a:2:{s:7:"created";i:1687791829;s:8:"modified";i:1687791829;}s:7:"creator";s:5:"admin";s:4:"user";s:5:"admin";s:11:"last_change";a:8:{s:4:"date";i:1687791829;s:2:"ip";s:12:"192.168.56.1";s:4:"type";s:1:"C";s:2:"id";s:8:"de:index";s:4:"user";s:5:"admin";s:3:"sum";s:7:"created";s:5:"extra";s:0:"";s:10:"sizechange";i:1919;}s:5:"title";s:19:"Das Acervus-Projekt";s:11:"description";a:2:{s:15:"tableofcontents";a:2:{i:0;a:4:{s:3:"hid";s:19:"das_acervus-projekt";s:5:"title";s:19:"Das Acervus-Projekt";s:4:"type";s:2:"ul";s:5:"level";i:1;}i:1;a:4:{s:3:"hid";s:7:"updates";s:5:"title";s:7:"Updates";s:4:"type";s:2:"ul";s:5:"level";i:2;}}s:8:"abstract";s:504:"~
+
+Das Acervus-Projekt
+
+Eine kollektive Wiederherstellung der Werke von Denkern und Aktivisten, die aus der Konvivialitätskonstellation um Ivan Illich hervorgegangen sind
+
+Die Initiative verfolgt ein doppeltes Ziel: einen Beitrag zum Verständnis der kritischen gegenwärtigen Situation und zur Analyse und Debatte der bestehenden Optionen zu leisten, basierend auf den Beiträgen des Kreises um Ivan Illich, und eine vollständige digitale Bibliothek seines Werks mit allgemeinem Zugang zu schaffen.…";}s:8:"internal";a:2:{s:5:"cache";b:1;s:3:"toc";b:0;}s:8:"relation";a:1:{s:10:"firstimage";s:0:"";}}s:10:"persistent";a:4:{s:4:"date";a:1:{s:7:"created";i:1687791829;}s:7:"creator";s:5:"admin";s:4:"user";s:5:"admin";s:11:"last_change";a:8:{s:4:"date";i:1687791829;s:2:"ip";s:12:"192.168.56.1";s:4:"type";s:1:"C";s:2:"id";s:8:"de:index";s:4:"user";s:5:"admin";s:3:"sum";s:7:"created";s:5:"extra";s:0:"";s:10:"sizechange";i:1919;}}} \ No newline at end of file
diff --git a/platform/www/data/meta/en/blog/2021-11-01-the_origins.indexed b/platform/www/data/meta/en/blog/2021-11-01-the_origins.indexed
new file mode 100644
index 0000000..7070c46
--- /dev/null
+++ b/platform/www/data/meta/en/blog/2021-11-01-the_origins.indexed
@@ -0,0 +1 @@
+8+plugin_include=0.1.safeindex=1+plugin_tag=0.2.deaccent=1 \ No newline at end of file
diff --git a/platform/www/data/meta/en/blog/2021-11-01-the_origins.meta b/platform/www/data/meta/en/blog/2021-11-01-the_origins.meta
new file mode 100644
index 0000000..386d173
--- /dev/null
+++ b/platform/www/data/meta/en/blog/2021-11-01-the_origins.meta
@@ -0,0 +1,3 @@
+a:2:{s:7:"current";a:7:{s:4:"date";a:2:{s:7:"created";i:1635735600;s:8:"modified";i:1687790957;}s:4:"user";s:0:"";s:7:"creator";s:0:"";s:5:"title";s:34:"The origins of the Acervus Project";s:11:"description";a:2:{s:15:"tableofcontents";a:2:{i:0;a:4:{s:3:"hid";s:34:"the_origins_of_the_acervus_project";s:5:"title";s:34:"The origins of the Acervus Project";s:4:"type";s:2:"ul";s:5:"level";i:1;}i:1;a:4:{s:3:"hid";s:7:"section";s:5:"title";s:0:"";s:4:"type";s:2:"ul";s:5:"level";i:2;}}s:8:"abstract";s:507:"The origins of the Acervus Project
+
+In early 2020, we began to envision the need for an intergenerational effort to recover the work of Ivan Illich. We thought of “recovering” in a broad sense of the term, not only giving access, but also making intelligible and facilitating the navigation through the complex layers of his thought. Together with Gustavo Esteva and Franco Augusto, we began to outline the idea of providing open access, non-commercial and collaborative access to all of Ivan's work,…";}s:8:"internal";a:2:{s:5:"cache";b:1;s:3:"toc";b:1;}s:8:"relation";a:1:{s:10:"firstimage";s:0:"";}}s:10:"persistent";a:3:{s:4:"date";a:1:{s:7:"created";i:1687467078;}s:4:"user";s:0:"";s:7:"creator";s:0:"";}} \ No newline at end of file
diff --git a/platform/www/data/meta/en/blog/2022-02-09-cidoc_recovering_its_past_to_transform_our_present.indexed b/platform/www/data/meta/en/blog/2022-02-09-cidoc_recovering_its_past_to_transform_our_present.indexed
new file mode 100644
index 0000000..7070c46
--- /dev/null
+++ b/platform/www/data/meta/en/blog/2022-02-09-cidoc_recovering_its_past_to_transform_our_present.indexed
@@ -0,0 +1 @@
+8+plugin_include=0.1.safeindex=1+plugin_tag=0.2.deaccent=1 \ No newline at end of file
diff --git a/platform/www/data/meta/en/blog/2022-02-09-cidoc_recovering_its_past_to_transform_our_present.meta b/platform/www/data/meta/en/blog/2022-02-09-cidoc_recovering_its_past_to_transform_our_present.meta
new file mode 100644
index 0000000..c41ac45
--- /dev/null
+++ b/platform/www/data/meta/en/blog/2022-02-09-cidoc_recovering_its_past_to_transform_our_present.meta
@@ -0,0 +1,3 @@
+a:2:{s:7:"current";a:7:{s:4:"date";a:2:{s:7:"created";i:1644375600;s:8:"modified";i:1709629601;}s:4:"user";s:0:"";s:7:"creator";s:0:"";s:5:"title";s:104:"Centro Intercultural de Documentación de Cuernava (CIDOC): Recovering its past to transform our present";s:11:"description";a:2:{s:15:"tableofcontents";a:3:{i:0;a:4:{s:3:"hid";s:99:"centro_intercultural_de_documentacion_de_cuernava_cidocrecovering_its_past_to_transform_our_present";s:5:"title";s:104:"Centro Intercultural de Documentación de Cuernava (CIDOC): Recovering its past to transform our present";s:4:"type";s:2:"ul";s:5:"level";i:1;}i:1;a:4:{s:3:"hid";s:7:"section";s:5:"title";s:0:"";s:4:"type";s:2:"ul";s:5:"level";i:2;}i:2;a:4:{s:3:"hid";s:7:"details";s:5:"title";s:7:"Details";s:4:"type";s:2:"ul";s:5:"level";i:2;}}s:8:"abstract";s:401:"Centro Intercultural de Documentación de Cuernava (CIDOC): Recovering its past to transform our present
+
+In this first public activity we will present the initiative to recover the history, intellectual production and textual, visual and oral memory of the Intercultural Center of Cuernavaca (CIDOC), which existed in the years 1966 and 1976 in Mexico. This mythical institution operated as a sort of";}s:8:"internal";a:2:{s:5:"cache";b:1;s:3:"toc";b:0;}s:8:"relation";a:1:{s:10:"firstimage";s:0:"";}}s:10:"persistent";a:3:{s:4:"date";a:1:{s:7:"created";i:1693346192;}s:4:"user";s:0:"";s:7:"creator";s:0:"";}} \ No newline at end of file
diff --git a/platform/www/data/meta/en/blog/2022-10-01-xxx.meta b/platform/www/data/meta/en/blog/2022-10-01-xxx.meta
new file mode 100644
index 0000000..67da07c
--- /dev/null
+++ b/platform/www/data/meta/en/blog/2022-10-01-xxx.meta
@@ -0,0 +1,3 @@
+a:2:{s:7:"current";a:7:{s:4:"date";a:2:{s:7:"created";i:1664593200;s:8:"modified";i:1686764546;}s:4:"user";s:0:"";s:7:"creator";s:0:"";s:5:"title";s:19:"Title of blog entry";s:11:"description";a:2:{s:15:"tableofcontents";a:2:{i:0;a:4:{s:3:"hid";s:19:"title_of_blog_entry";s:5:"title";s:19:"Title of blog entry";s:4:"type";s:2:"ul";s:5:"level";i:1;}i:1;a:4:{s:3:"hid";s:12:"more_details";s:5:"title";s:12:"More details";s:4:"type";s:2:"ul";s:5:"level";i:2;}}s:8:"abstract";s:266:"Title of blog entry
+
+Lorem Lorem Lorem Lorem Lorem Lorem Lorem Lorem Lorem Lorem Lorem Lorem Lorem Lorem Lorem Lorem Lorem Lorem Lorem Lorem Lorem Lorem Lorem Lorem Lorem Lorem Lorem Lorem Lorem Lorem Lorem Lorem Lorem Lorem Lorem Lorem Lorem Lorem Lorem Lorem Lorem";}s:8:"internal";a:2:{s:5:"cache";b:1;s:3:"toc";b:1;}s:8:"relation";a:1:{s:10:"firstimage";s:0:"";}}s:10:"persistent";a:3:{s:4:"date";a:1:{s:7:"created";i:1687371597;}s:4:"user";s:0:"";s:7:"creator";s:0:"";}} \ No newline at end of file
diff --git a/platform/www/data/meta/en/blog/2024-03-04-starting_acervus_progress_reports.indexed b/platform/www/data/meta/en/blog/2024-03-04-starting_acervus_progress_reports.indexed
new file mode 100644
index 0000000..7070c46
--- /dev/null
+++ b/platform/www/data/meta/en/blog/2024-03-04-starting_acervus_progress_reports.indexed
@@ -0,0 +1 @@
+8+plugin_include=0.1.safeindex=1+plugin_tag=0.2.deaccent=1 \ No newline at end of file
diff --git a/platform/www/data/meta/en/blog/2024-03-04-starting_acervus_progress_reports.meta b/platform/www/data/meta/en/blog/2024-03-04-starting_acervus_progress_reports.meta
new file mode 100644
index 0000000..61f2f30
--- /dev/null
+++ b/platform/www/data/meta/en/blog/2024-03-04-starting_acervus_progress_reports.meta
@@ -0,0 +1,3 @@
+a:2:{s:7:"current";a:7:{s:4:"date";a:2:{s:7:"created";i:1709521200;s:8:"modified";i:1709629433;}s:4:"user";s:0:"";s:7:"creator";s:0:"";s:5:"title";s:40:"We started the Acervus Progress Reports!";s:11:"description";a:2:{s:15:"tableofcontents";a:2:{i:0;a:4:{s:3:"hid";s:39:"we_started_the_acervus_progress_reports";s:5:"title";s:40:"We started the Acervus Progress Reports!";s:4:"type";s:2:"ul";s:5:"level";i:1;}i:1;a:4:{s:3:"hid";s:7:"section";s:5:"title";s:0:"";s:4:"type";s:2:"ul";s:5:"level";i:2;}}s:8:"abstract";s:279:"We started the Acervus Progress Reports!
+
+With the intention of generating a more fluid communication with the collaborators and beneficiaries of the Project, we have decided to start publishing regular reports summarizing the progress in the different work areas of the project.";}s:8:"relation";a:2:{s:10:"references";a:1:{s:25:"en:blog:2024-03-05-apr_01";b:1;}s:10:"firstimage";s:0:"";}s:8:"internal";a:2:{s:5:"cache";b:1;s:3:"toc";b:0;}}s:10:"persistent";a:3:{s:4:"date";a:1:{s:7:"created";i:1709626419;}s:4:"user";s:0:"";s:7:"creator";s:0:"";}} \ No newline at end of file
diff --git a/platform/www/data/meta/en/blog/2024-03-04-starting_regular_updates.meta b/platform/www/data/meta/en/blog/2024-03-04-starting_regular_updates.meta
new file mode 100644
index 0000000..4ff2cdb
--- /dev/null
+++ b/platform/www/data/meta/en/blog/2024-03-04-starting_regular_updates.meta
@@ -0,0 +1,3 @@
+a:2:{s:7:"current";a:7:{s:4:"date";a:2:{s:7:"created";i:1710039600;s:8:"modified";i:1709626235;}s:4:"user";s:0:"";s:7:"creator";s:0:"";s:5:"title";s:35:"Comenzamos los reportes de progreso";s:11:"description";a:2:{s:15:"tableofcontents";a:2:{i:0;a:4:{s:3:"hid";s:35:"comenzamos_los_reportes_de_progreso";s:5:"title";s:35:"Comenzamos los reportes de progreso";s:4:"type";s:2:"ul";s:5:"level";i:1;}i:1;a:4:{s:3:"hid";s:7:"section";s:5:"title";s:0:"";s:4:"type";s:2:"ul";s:5:"level";i:2;}}s:8:"abstract";s:275:"Comenzamos los reportes de progreso
+
+Con la intención de generar una comunicación mas fluida con los colaboradores y beneficiarios del Proyecto, hemos decidido empezar a publicar reportes regulares que resuman los progresos en las diferentes áreas de trabajo del proyecto.";}s:8:"internal";a:2:{s:5:"cache";b:1;s:3:"toc";b:0;}s:8:"relation";a:1:{s:10:"firstimage";s:0:"";}}s:10:"persistent";a:3:{s:4:"date";a:1:{s:7:"created";i:1709626111;}s:4:"user";s:0:"";s:7:"creator";s:0:"";}} \ No newline at end of file
diff --git a/platform/www/data/meta/en/blog/2024-03-05-apr_01.indexed b/platform/www/data/meta/en/blog/2024-03-05-apr_01.indexed
new file mode 100644
index 0000000..7070c46
--- /dev/null
+++ b/platform/www/data/meta/en/blog/2024-03-05-apr_01.indexed
@@ -0,0 +1 @@
+8+plugin_include=0.1.safeindex=1+plugin_tag=0.2.deaccent=1 \ No newline at end of file
diff --git a/platform/www/data/meta/en/blog/2024-03-05-apr_01.meta b/platform/www/data/meta/en/blog/2024-03-05-apr_01.meta
new file mode 100644
index 0000000..ef1ffa6
--- /dev/null
+++ b/platform/www/data/meta/en/blog/2024-03-05-apr_01.meta
@@ -0,0 +1,11 @@
+a:2:{s:7:"current";a:7:{s:4:"date";a:2:{s:7:"created";i:1709607600;s:8:"modified";i:1709629118;}s:4:"user";s:0:"";s:7:"creator";s:0:"";s:5:"title";s:27:"Acervus Progress Report #01";s:11:"description";a:2:{s:15:"tableofcontents";a:5:{i:0;a:4:{s:3:"hid";s:26:"acervus_progress_report_01";s:5:"title";s:27:"Acervus Progress Report #01";s:4:"type";s:2:"ul";s:5:"level";i:1;}i:1;a:4:{s:3:"hid";s:14:"illich_acervus";s:5:"title";s:14:"Illich Acervus";s:4:"type";s:2:"ul";s:5:"level";i:2;}i:2;a:4:{s:3:"hid";s:8:"articles";s:5:"title";s:8:"Articles";s:4:"type";s:2:"ul";s:5:"level";i:3;}i:3;a:4:{s:3:"hid";s:10:"interviews";s:5:"title";s:10:"Interviews";s:4:"type";s:2:"ul";s:5:"level";i:3;}i:4;a:4:{s:3:"hid";s:12:"audiovisuals";s:5:"title";s:12:"Audiovisuals";s:4:"type";s:2:"ul";s:5:"level";i:3;}}s:8:"abstract";s:329:"Acervus Progress Report #01
+
+This report covers the updates that took place during the last two weeks (2024-02-20 to 2024-03-05).
+
+Illich Acervus
+
+We added the following source materials to the pile of materials to be processed:
+
+Articles
+
+ * 1958 - The End of Human Life: an interpretation of Death as the Supreme Form of Prayer";}s:8:"internal";a:2:{s:5:"cache";b:1;s:3:"toc";b:0;}s:8:"relation";a:1:{s:10:"firstimage";s:0:"";}}s:10:"persistent";a:3:{s:4:"date";a:1:{s:7:"created";i:1709626504;}s:4:"user";s:0:"";s:7:"creator";s:0:"";}} \ No newline at end of file
diff --git a/platform/www/data/meta/en/blog/index.changes b/platform/www/data/meta/en/blog/index.changes
new file mode 100644
index 0000000..e6f16a7
--- /dev/null
+++ b/platform/www/data/meta/en/blog/index.changes
@@ -0,0 +1,4 @@
+1693346819 192.168.56.1 C en:blog:index admin created 40
+1693346848 192.168.56.1 E en:blog:index admin 0
+1693346860 192.168.56.1 E en:blog:index admin 0
+1693346887 192.168.56.1 D en:blog:index admin removed -40
diff --git a/platform/www/data/meta/en/blog/index.meta b/platform/www/data/meta/en/blog/index.meta
new file mode 100644
index 0000000..48ee089
--- /dev/null
+++ b/platform/www/data/meta/en/blog/index.meta
@@ -0,0 +1 @@
+a:2:{s:7:"current";a:8:{s:4:"date";s:0:"";s:7:"creator";s:0:"";s:4:"user";s:0:"";s:11:"last_change";s:0:"";s:11:"contributor";s:0:"";s:8:"relation";s:0:"";s:8:"internal";s:0:"";s:11:"description";s:0:"";}s:10:"persistent";a:5:{s:4:"date";a:2:{s:7:"created";i:1693346819;s:8:"modified";i:1693346860;}s:7:"creator";s:5:"admin";s:4:"user";s:5:"admin";s:11:"last_change";a:8:{s:4:"date";i:1693346860;s:2:"ip";s:12:"192.168.56.1";s:4:"type";s:1:"E";s:2:"id";s:13:"en:blog:index";s:4:"user";s:5:"admin";s:3:"sum";s:0:"";s:5:"extra";s:0:"";s:10:"sizechange";i:0;}s:11:"contributor";a:1:{s:5:"admin";s:5:"admin";}}} \ No newline at end of file
diff --git a/platform/www/data/meta/en/docs/index.changes b/platform/www/data/meta/en/docs/index.changes
new file mode 100644
index 0000000..60266e7
--- /dev/null
+++ b/platform/www/data/meta/en/docs/index.changes
@@ -0,0 +1,4 @@
+1707363304 127.0.0.1 E en:docs:index external edit 1956
+1708032217 192.168.56.1 E en:docs:index admin 137
+1708518144 192.168.56.1 E en:docs:index admin [Features] 118
+1708518697 192.168.56.1 E en:docs:index admin [Features] 97
diff --git a/platform/www/data/meta/en/docs/index.indexed b/platform/www/data/meta/en/docs/index.indexed
new file mode 100644
index 0000000..7070c46
--- /dev/null
+++ b/platform/www/data/meta/en/docs/index.indexed
@@ -0,0 +1 @@
+8+plugin_include=0.1.safeindex=1+plugin_tag=0.2.deaccent=1 \ No newline at end of file
diff --git a/platform/www/data/meta/en/docs/index.meta b/platform/www/data/meta/en/docs/index.meta
new file mode 100644
index 0000000..430f9a3
--- /dev/null
+++ b/platform/www/data/meta/en/docs/index.meta
@@ -0,0 +1,14 @@
+a:2:{s:7:"current";a:9:{s:4:"date";a:2:{s:7:"created";i:1707253874;s:8:"modified";i:1708518697;}s:4:"user";s:0:"";s:7:"creator";s:0:"";s:11:"last_change";a:8:{s:4:"date";i:1708518697;s:2:"ip";s:12:"192.168.56.1";s:4:"type";s:1:"E";s:2:"id";s:13:"en:docs:index";s:4:"user";s:5:"admin";s:3:"sum";s:11:"[Features] ";s:5:"extra";s:0:"";s:10:"sizechange";i:97;}s:11:"contributor";a:1:{s:5:"admin";s:5:"admin";}s:5:"title";s:22:"Internal documentation";s:11:"description";a:2:{s:15:"tableofcontents";a:10:{i:0;a:4:{s:3:"hid";s:22:"internal_documentation";s:5:"title";s:22:"Internal documentation";s:4:"type";s:2:"ul";s:5:"level";i:1;}i:1;a:4:{s:3:"hid";s:23:"technical_documentation";s:5:"title";s:23:"Technical documentation";s:4:"type";s:2:"ul";s:5:"level";i:1;}i:2;a:4:{s:3:"hid";s:17:"design_principles";s:5:"title";s:17:"Design principles";s:4:"type";s:2:"ul";s:5:"level";i:2;}i:3;a:4:{s:3:"hid";s:10:"operations";s:5:"title";s:10:"Operations";s:4:"type";s:2:"ul";s:5:"level";i:2;}i:4;a:4:{s:3:"hid";s:23:"status_of_the_materials";s:5:"title";s:23:"Status of the materials";s:4:"type";s:2:"ul";s:5:"level";i:3;}i:5;a:4:{s:3:"hid";s:34:"translating_string_of_the_platform";s:5:"title";s:34:"Translating string of the platform";s:4:"type";s:2:"ul";s:5:"level";i:2;}i:6;a:4:{s:3:"hid";s:15:"text_management";s:5:"title";s:15:"Text management";s:4:"type";s:2:"ul";s:5:"level";i:2;}i:7;a:4:{s:3:"hid";s:22:"audiovidual_management";s:5:"title";s:22:"Audiovidual management";s:4:"type";s:2:"ul";s:5:"level";i:2;}i:8;a:4:{s:3:"hid";s:12:"useful_tools";s:5:"title";s:12:"Useful tools";s:4:"type";s:2:"ul";s:5:"level";i:3;}i:9;a:4:{s:3:"hid";s:8:"features";s:5:"title";s:8:"Features";s:4:"type";s:2:"ul";s:5:"level";i:2;}}s:8:"abstract";s:503:"Internal documentation
+
+Technical documentation
+
+This pages contains the Acervus technical documentation.
+
+Design principles
+
+This platform is centered on a model based on a design that seeks to be simple and based on more or less stable criteria. That is:
+* keep complexity to a minimum;
+* the web platform is a way to navigate and edit a content
+* we separate the content from its identifiers/metadata
+* everything is stored in folders and in plain text files, we do not use databases
+* content col…";}s:8:"relation";a:2:{s:10:"references";a:3:{s:13:"en:docs:index";b:1;s:19:"en:docs:text_format";b:1;s:19:"en:docs:d3-graphviz";b:0;}s:10:"firstimage";s:0:"";}s:8:"internal";a:2:{s:5:"cache";b:1;s:3:"toc";b:1;}}s:10:"persistent";a:5:{s:4:"date";a:2:{s:7:"created";i:1707253874;s:8:"modified";i:1708518697;}s:4:"user";s:0:"";s:7:"creator";s:0:"";s:11:"last_change";a:8:{s:4:"date";i:1708518697;s:2:"ip";s:12:"192.168.56.1";s:4:"type";s:1:"E";s:2:"id";s:13:"en:docs:index";s:4:"user";s:5:"admin";s:3:"sum";s:11:"[Features] ";s:5:"extra";s:0:"";s:10:"sizechange";i:97;}s:11:"contributor";a:1:{s:5:"admin";s:5:"admin";}}} \ No newline at end of file
diff --git a/platform/www/data/meta/en/docs/text_format.changes b/platform/www/data/meta/en/docs/text_format.changes
new file mode 100644
index 0000000..d876cf5
--- /dev/null
+++ b/platform/www/data/meta/en/docs/text_format.changes
@@ -0,0 +1,19 @@
+1707256754 192.168.56.1 C en:docs:text_format admin created 987
+1707256873 192.168.56.1 E en:docs:text_format admin -196
+1707257019 192.168.56.1 E en:docs:text_format admin 285
+1707257044 192.168.56.1 E en:docs:text_format admin -65
+1707257097 192.168.56.1 E en:docs:text_format admin [Elements] 93
+1707257107 192.168.56.1 E en:docs:text_format admin 1
+1707257124 192.168.56.1 E en:docs:text_format admin [Headers] -73
+1707257172 192.168.56.1 E en:docs:text_format admin 93
+1707257205 192.168.56.1 E en:docs:text_format admin 79
+1707257221 192.168.56.1 E en:docs:text_format admin -8
+1707257257 192.168.56.1 E en:docs:text_format admin 0
+1707257365 192.168.56.1 E en:docs:text_format admin [Elements] 225
+1707258349 127.0.0.1 E en:docs:text_format external edit 1365
+1707258423 192.168.56.1 E en:docs:text_format admin -1
+1707259129 127.0.0.1 E en:docs:text_format external edit -25
+1707259199 192.168.56.1 E en:docs:text_format admin 41
+1707259245 127.0.0.1 E en:docs:text_format external edit -3
+1707259281 192.168.56.1 E en:docs:text_format admin [Headers] 42
+1708050388 192.168.56.1 E en:docs:text_format admin ` 461
diff --git a/platform/www/data/meta/en/docs/text_format.indexed b/platform/www/data/meta/en/docs/text_format.indexed
new file mode 100644
index 0000000..7070c46
--- /dev/null
+++ b/platform/www/data/meta/en/docs/text_format.indexed
@@ -0,0 +1 @@
+8+plugin_include=0.1.safeindex=1+plugin_tag=0.2.deaccent=1 \ No newline at end of file
diff --git a/platform/www/data/meta/en/docs/text_format.meta b/platform/www/data/meta/en/docs/text_format.meta
new file mode 100644
index 0000000..375c7df
--- /dev/null
+++ b/platform/www/data/meta/en/docs/text_format.meta
@@ -0,0 +1,14 @@
+a:2:{s:7:"current";a:9:{s:4:"date";a:2:{s:7:"created";i:1707256754;s:8:"modified";i:1708050388;}s:7:"creator";s:5:"admin";s:4:"user";s:5:"admin";s:11:"last_change";a:8:{s:4:"date";i:1708050388;s:2:"ip";s:12:"192.168.56.1";s:4:"type";s:1:"E";s:2:"id";s:19:"en:docs:text_format";s:4:"user";s:5:"admin";s:3:"sum";s:1:"`";s:5:"extra";s:0:"";s:10:"sizechange";i:461;}s:11:"contributor";a:1:{s:5:"admin";s:5:"admin";}s:5:"title";s:15:"Formatting text";s:11:"description";a:2:{s:15:"tableofcontents";a:12:{i:0;a:4:{s:3:"hid";s:15:"formatting_text";s:5:"title";s:15:"Formatting text";s:4:"type";s:2:"ul";s:5:"level";i:1;}i:1;a:4:{s:3:"hid";s:7:"headers";s:5:"title";s:7:"Headers";s:4:"type";s:2:"ul";s:5:"level";i:2;}i:2;a:4:{s:3:"hid";s:15:"text_formatting";s:5:"title";s:15:"Text formatting";s:4:"type";s:2:"ul";s:5:"level";i:2;}i:3;a:4:{s:3:"hid";s:8:"elements";s:5:"title";s:8:"Elements";s:4:"type";s:2:"ul";s:5:"level";i:2;}i:4;a:4:{s:3:"hid";s:11:"blockquotes";s:5:"title";s:11:"Blockquotes";s:4:"type";s:2:"ul";s:5:"level";i:3;}i:5;a:4:{s:3:"hid";s:13:"ordered_lists";s:5:"title";s:13:"Ordered lists";s:4:"type";s:2:"ul";s:5:"level";i:3;}i:6;a:4:{s:3:"hid";s:15:"unordered_lists";s:5:"title";s:15:"Unordered lists";s:4:"type";s:2:"ul";s:5:"level";i:3;}i:7;a:4:{s:3:"hid";s:12:"nested_lists";s:5:"title";s:12:"Nested lists";s:4:"type";s:2:"ul";s:5:"level";i:3;}i:8;a:4:{s:3:"hid";s:22:"mono-spaced_block_text";s:5:"title";s:22:"Mono-spaced block text";s:4:"type";s:2:"ul";s:5:"level";i:2;}i:9;a:4:{s:3:"hid";s:5:"lines";s:5:"title";s:5:"Lines";s:4:"type";s:2:"ul";s:5:"level";i:2;}i:10;a:4:{s:3:"hid";s:5:"links";s:5:"title";s:5:"Links";s:4:"type";s:2:"ul";s:5:"level";i:2;}i:11;a:4:{s:3:"hid";s:9:"footnotes";s:5:"title";s:9:"Footnotes";s:4:"type";s:2:"ul";s:5:"level";i:2;}}s:8:"abstract";s:366:"Formatting text
+
+In Acervus we use Markdown syntax to format all the contents. Here is a simple guideline on how to apply it:
+
+Headers
+
+
+
+# Header level 1 (only for main titles)
+## Header level 2 (Sections)
+### Header level 3 (Sub sections)
+#### Header level 4 (SubSub sections)
+##### Header level 5 (SubSubSub sections)
+###### Header level 6 (SubSubSubSub sections)";}s:8:"relation";a:2:{s:5:"media";a:1:{s:28:"en:docs:markdown_headers.jpg";b:1;}s:10:"firstimage";s:28:"en:docs:markdown_headers.jpg";}s:8:"internal";a:2:{s:5:"cache";b:1;s:3:"toc";b:1;}}s:10:"persistent";a:5:{s:4:"date";a:2:{s:7:"created";i:1707256754;s:8:"modified";i:1708050388;}s:7:"creator";s:5:"admin";s:4:"user";s:5:"admin";s:11:"last_change";a:8:{s:4:"date";i:1708050388;s:2:"ip";s:12:"192.168.56.1";s:4:"type";s:1:"E";s:2:"id";s:19:"en:docs:text_format";s:4:"user";s:5:"admin";s:3:"sum";s:1:"`";s:5:"extra";s:0:"";s:10:"sizechange";i:461;}s:11:"contributor";a:1:{s:5:"admin";s:5:"admin";}}} \ No newline at end of file
diff --git a/platform/www/data/meta/en/index.changes b/platform/www/data/meta/en/index.changes
index ea28e0b..0d752e4 100644
--- a/platform/www/data/meta/en/index.changes
+++ b/platform/www/data/meta/en/index.changes
@@ -2,3 +2,46 @@
1646767088 192.168.56.1 E en:index admin 1938
1656726728 127.0.0.1 E en:index external edit 1981
1660778261 192.168.56.1 E en:index admin -539
+1686687955 192.168.56.1 E en:index admin 19
+1686688041 192.168.56.1 E en:index admin 3
+1686688121 192.168.56.1 E en:index admin 1
+1686688178 192.168.56.1 E en:index admin 3
+1686688208 192.168.56.1 E en:index admin 12
+1686688425 192.168.56.1 E en:index admin 12
+1686688454 192.168.56.1 E en:index admin 1
+1686688469 192.168.56.1 E en:index admin [Blog] -10
+1686688474 192.168.56.1 E en:index admin 11
+1686688481 192.168.56.1 E en:index admin 1
+1686750898 192.168.56.1 E en:index admin [Blog] 14
+1686750919 192.168.56.1 E en:index admin 1
+1686754741 192.168.56.1 E en:index admin -6
+1686754773 192.168.56.1 E en:index admin -13
+1686754798 192.168.56.1 E en:index admin 6
+1686754820 192.168.56.1 E en:index admin -13
+1686754840 192.168.56.1 E en:index admin 11
+1686754875 192.168.56.1 E en:index admin 11
+1686754902 192.168.56.1 E en:index admin 11
+1686754937 192.168.56.1 E en:index admin -2
+1686764012 192.168.56.1 E en:index admin -13
+1686764037 192.168.56.1 E en:index admin -7
+1686764074 192.168.56.1 E en:index admin 15
+1686764315 192.168.56.1 E en:index admin 5
+1686764326 192.168.56.1 E en:index admin -9
+1686764484 192.168.56.1 E en:index admin 6
+1686764493 192.168.56.1 E en:index admin 1
+1686764509 192.168.56.1 E en:index admin -7
+1686764559 192.168.56.1 E en:index admin 7
+1687361166 192.168.56.1 E en:index admin -7
+1687371997 192.168.56.1 E en:index admin -5
+1687372028 192.168.56.1 E en:index admin [Blog] -20
+1687372085 192.168.56.1 R en:index admin old revision restored (2023/06/21 15:26) 1687371997 -16
+1687372090 192.168.56.1 E en:index admin 36
+1687372112 192.168.56.1 E en:index admin -36
+1687372118 192.168.56.1 E en:index admin 36
+1687372236 192.168.56.1 E en:index admin 2
+1687372430 192.168.56.1 E en:index admin -2
+1687372454 192.168.56.1 E en:index admin 9
+1687372480 192.168.56.1 E en:index admin -5
+1687378171 192.168.56.1 E en:index admin 77
+1687466966 192.168.56.1 E en:index admin 71
+1687466972 192.168.56.1 E en:index admin 1
diff --git a/platform/www/data/meta/en/index.indexed b/platform/www/data/meta/en/index.indexed
index ecc2267..7070c46 100644
--- a/platform/www/data/meta/en/index.indexed
+++ b/platform/www/data/meta/en/index.indexed
@@ -1 +1 @@
-8+plugin_tag=0.2.deaccent=1 \ No newline at end of file
+8+plugin_include=0.1.safeindex=1+plugin_tag=0.2.deaccent=1 \ No newline at end of file
diff --git a/platform/www/data/meta/en/index.meta b/platform/www/data/meta/en/index.meta
index 486c9be..ee90fa3 100644
--- a/platform/www/data/meta/en/index.meta
+++ b/platform/www/data/meta/en/index.meta
@@ -1,5 +1,5 @@
-a:2:{s:7:"current";a:9:{s:4:"date";a:2:{s:7:"created";i:1646766450;s:8:"modified";i:1660778261;}s:7:"creator";s:5:"admin";s:4:"user";s:5:"admin";s:11:"last_change";a:8:{s:4:"date";i:1660778261;s:2:"ip";s:12:"192.168.56.1";s:4:"type";s:1:"E";s:2:"id";s:8:"en:index";s:4:"user";s:5:"admin";s:3:"sum";s:0:"";s:5:"extra";s:0:"";s:10:"sizechange";i:-539;}s:11:"contributor";a:1:{s:5:"admin";s:5:"admin";}s:5:"title";s:31:"Welcome to The Acervus Project!";s:11:"description";a:2:{s:15:"tableofcontents";a:1:{i:0;a:4:{s:3:"hid";s:30:"welcome_to_the_acervus_project";s:5:"title";s:31:"Welcome to The Acervus Project!";s:4:"type";s:2:"ul";s:5:"level";i:1;}}s:8:"abstract";s:386:"Welcome to The Acervus Project!
+a:2:{s:7:"current";a:9:{s:4:"date";a:2:{s:7:"created";i:1646766450;s:8:"modified";i:1687466972;}s:7:"creator";s:5:"admin";s:4:"user";s:5:"admin";s:11:"last_change";b:0;s:11:"contributor";a:1:{s:5:"admin";s:5:"admin";}s:5:"title";s:19:"The Acervus Project";s:11:"description";a:2:{s:15:"tableofcontents";a:2:{i:0;a:4:{s:3:"hid";s:19:"the_acervus_project";s:5:"title";s:19:"The Acervus Project";s:4:"type";s:2:"ul";s:5:"level";i:1;}i:1;a:4:{s:3:"hid";s:7:"updates";s:5:"title";s:7:"Updates";s:4:"type";s:2:"ul";s:5:"level";i:2;}}s:8:"abstract";s:457:"The Acervus Project
-This project is under development, more news very soon!
+A collective recovery of the works of thinkers and activists that emerged out of the constellation of conviviality surrounding Ivan Illich
-The initiative has a double purpose: to contribute to the understanding of the critical current condition and to the analysis and debate of the existing options, based on the contributions of Ivan Illich’s circle, and to constitute a complete digital library of his work of general open access.";}s:8:"internal";a:2:{s:5:"cache";b:1;s:3:"toc";b:1;}s:8:"relation";a:1:{s:10:"firstimage";s:0:"";}}s:10:"persistent";a:5:{s:4:"date";a:2:{s:7:"created";i:1646766450;s:8:"modified";i:1660778261;}s:7:"creator";s:5:"admin";s:4:"user";s:5:"admin";s:11:"last_change";a:8:{s:4:"date";i:1660778261;s:2:"ip";s:12:"192.168.56.1";s:4:"type";s:1:"E";s:2:"id";s:8:"en:index";s:4:"user";s:5:"admin";s:3:"sum";s:0:"";s:5:"extra";s:0:"";s:10:"sizechange";i:-539;}s:11:"contributor";a:1:{s:5:"admin";s:5:"admin";}}} \ No newline at end of file
+The initiative has a double purpose: to contribute to the understanding of the critical current condition and to the analysis and debate of the existing options, based on the contributions of Ivan Illich’s circle, and to constitute a complete digital library of his work of general open access.";}s:8:"relation";a:2:{s:7:"haspart";a:2:{s:69:"en:blog:2022-02-09-cidoc_recovering_its_past_to_transform_our_present";b:1;s:30:"en:blog:2021-11-01-the_origins";b:1;}s:10:"firstimage";s:0:"";}s:8:"internal";a:2:{s:5:"cache";b:1;s:3:"toc";b:0;}}s:10:"persistent";a:5:{s:4:"date";a:2:{s:7:"created";i:1646766450;s:8:"modified";i:1687466972;}s:7:"creator";s:5:"admin";s:4:"user";s:5:"admin";s:11:"last_change";b:0;s:11:"contributor";a:1:{s:5:"admin";s:5:"admin";}}} \ No newline at end of file
diff --git a/platform/www/data/meta/en/tech.changes b/platform/www/data/meta/en/tech.changes
new file mode 100644
index 0000000..c6e177a
--- /dev/null
+++ b/platform/www/data/meta/en/tech.changes
@@ -0,0 +1,22 @@
+1660781040 192.168.56.1 C en:tech admin created 602
+1661997029 127.0.0.1 E en:tech external edit 906
+1663093868 192.168.56.1 E en:tech admin 177
+1663094129 192.168.56.1 E en:tech admin 59
+1663095336 192.168.56.1 E en:tech admin [Footnotes] 43
+1663096017 192.168.56.1 E en:tech admin -42
+1663096678 192.168.56.1 E en:tech admin [Footnotes] -1
+1663096687 192.168.56.1 E en:tech admin 1
+1663098932 192.168.56.1 E en:tech admin 2
+1663099023 192.168.56.1 E en:tech admin -7
+1663099741 192.168.56.1 E en:tech admin [Footnotes] -162
+1663099758 192.168.56.1 E en:tech admin [Footnotes] -2
+1663104217 192.168.56.1 E en:tech admin 53
+1663104839 192.168.56.1 E en:tech admin [Translating string of the platform] 139
+1663104958 192.168.56.1 E en:tech admin -192
+1663105012 192.168.56.1 E en:tech admin [Footnotes] -1
+1663105111 192.168.56.1 E en:tech admin [Footnotes] 2
+1663105135 192.168.56.1 E en:tech admin [Footnotes] 0
+1663105231 192.168.56.1 E en:tech admin [Footnotes] 0
+1663105271 192.168.56.1 E en:tech admin [Footnotes] -1
+1663105314 192.168.56.1 E en:tech admin [Footnotes] 0
+1663105367 192.168.56.1 E en:tech admin [Footnotes] 0
diff --git a/platform/www/data/meta/en/tech.indexed b/platform/www/data/meta/en/tech.indexed
new file mode 100644
index 0000000..7070c46
--- /dev/null
+++ b/platform/www/data/meta/en/tech.indexed
@@ -0,0 +1 @@
+8+plugin_include=0.1.safeindex=1+plugin_tag=0.2.deaccent=1 \ No newline at end of file
diff --git a/platform/www/data/meta/en/tech.meta b/platform/www/data/meta/en/tech.meta
new file mode 100644
index 0000000..cfbcb1e
--- /dev/null
+++ b/platform/www/data/meta/en/tech.meta
@@ -0,0 +1,12 @@
+a:2:{s:7:"current";a:9:{s:4:"date";a:2:{s:7:"created";i:1660781040;s:8:"modified";i:1663105367;}s:7:"creator";s:5:"admin";s:4:"user";s:5:"admin";s:11:"last_change";b:0;s:11:"contributor";a:1:{s:5:"admin";s:5:"admin";}s:5:"title";s:23:"Technical documentation";s:11:"description";a:2:{s:15:"tableofcontents";a:7:{i:0;a:4:{s:3:"hid";s:23:"technical_documentation";s:5:"title";s:23:"Technical documentation";s:4:"type";s:2:"ul";s:5:"level";i:1;}i:1;a:4:{s:3:"hid";s:17:"design_principles";s:5:"title";s:17:"Design principles";s:4:"type";s:2:"ul";s:5:"level";i:2;}i:2;a:4:{s:3:"hid";s:10:"operations";s:5:"title";s:10:"Operations";s:4:"type";s:2:"ul";s:5:"level";i:2;}i:3;a:4:{s:3:"hid";s:23:"status_of_the_materials";s:5:"title";s:23:"Status of the materials";s:4:"type";s:2:"ul";s:5:"level";i:3;}i:4;a:4:{s:3:"hid";s:34:"translating_string_of_the_platform";s:5:"title";s:34:"Translating string of the platform";s:4:"type";s:2:"ul";s:5:"level";i:2;}i:5;a:4:{s:3:"hid";s:15:"text_management";s:5:"title";s:15:"Text management";s:4:"type";s:2:"ul";s:5:"level";i:2;}i:6;a:4:{s:3:"hid";s:9:"footnotes";s:5:"title";s:9:"Footnotes";s:4:"type";s:2:"ul";s:5:"level";i:2;}}s:8:"abstract";s:503:"Technical documentation
+
+This pages contains the Acervus technical documentation.
+
+Design principles
+
+This platform is centered on a model based on a design that seeks to be simple and based on more or less stable criteria. That is:
+* keep complexity to a minimum;
+* the web platform is a way to navigate and edit a content
+* we separate the content from its identifiers/metadata
+* everything is stored in folders and in plain text files, we do not use databases
+* content collections (books, article…";}s:8:"relation";a:2:{s:10:"references";a:1:{s:8:"en:index";b:1;}s:10:"firstimage";s:0:"";}s:8:"internal";a:2:{s:5:"cache";b:1;s:3:"toc";b:1;}}s:10:"persistent";a:5:{s:4:"date";a:2:{s:7:"created";i:1660781040;s:8:"modified";i:1663105367;}s:7:"creator";s:5:"admin";s:4:"user";s:5:"admin";s:11:"last_change";b:0;s:11:"contributor";a:1:{s:5:"admin";s:5:"admin";}}} \ No newline at end of file
diff --git a/platform/www/data/meta/es/blog/2021-11-01-the_origins.changes b/platform/www/data/meta/es/blog/2021-11-01-the_origins.changes
new file mode 100644
index 0000000..21b326c
--- /dev/null
+++ b/platform/www/data/meta/es/blog/2021-11-01-the_origins.changes
@@ -0,0 +1,2 @@
+1687790654 192.168.56.1 C es:blog:2021-11-01-the_origins admin creado 2085
+1687790995 192.168.56.1 E es:blog:2021-11-01-the_origins admin 4
diff --git a/platform/www/data/meta/es/blog/2021-11-01-the_origins.indexed b/platform/www/data/meta/es/blog/2021-11-01-the_origins.indexed
new file mode 100644
index 0000000..7070c46
--- /dev/null
+++ b/platform/www/data/meta/es/blog/2021-11-01-the_origins.indexed
@@ -0,0 +1 @@
+8+plugin_include=0.1.safeindex=1+plugin_tag=0.2.deaccent=1 \ No newline at end of file
diff --git a/platform/www/data/meta/es/blog/2021-11-01-the_origins.meta b/platform/www/data/meta/es/blog/2021-11-01-the_origins.meta
new file mode 100644
index 0000000..54782b6
--- /dev/null
+++ b/platform/www/data/meta/es/blog/2021-11-01-the_origins.meta
@@ -0,0 +1,3 @@
+a:2:{s:7:"current";a:9:{s:4:"date";a:2:{s:7:"created";i:1635735600;s:8:"modified";i:1687790995;}s:7:"creator";s:5:"admin";s:4:"user";s:5:"admin";s:11:"last_change";b:0;s:11:"contributor";a:1:{s:5:"admin";s:5:"admin";}s:5:"title";s:34:"Los orígenes del Proyecto Acervus";s:11:"description";a:2:{s:15:"tableofcontents";a:2:{i:0;a:4:{s:3:"hid";s:33:"los_origenes_del_proyecto_acervus";s:5:"title";s:34:"Los orígenes del Proyecto Acervus";s:4:"type";s:2:"ul";s:5:"level";i:1;}i:1;a:4:{s:3:"hid";s:7:"section";s:5:"title";s:0:"";s:4:"type";s:2:"ul";s:5:"level";i:2;}}s:8:"abstract";s:511:"Los orígenes del Proyecto Acervus
+
+A comienzos del año 2020, comenzamos a vislumbrar la necesidad de llevar adelante un esfuerzo intergeneracional para recuperar la obra de Ivan Illich. Pensamos en “recuperar” en un sentido amplio del término, no solo dar acceso, también volver inteligible y facilitar el navegar por las complejas capas de su pensamiento. Junto a Gustavo Esteva y Franco Augusto, comenzamos a esbozar la idea de dar acceso abierto, sin fines comerciales y de forma colaborativa a to…";}s:8:"internal";a:2:{s:5:"cache";b:1;s:3:"toc";b:1;}s:8:"relation";a:1:{s:10:"firstimage";s:0:"";}}s:10:"persistent";a:5:{s:4:"date";a:2:{s:7:"created";i:1687790654;s:8:"modified";i:1687790995;}s:7:"creator";s:5:"admin";s:4:"user";s:5:"admin";s:11:"last_change";b:0;s:11:"contributor";a:1:{s:5:"admin";s:5:"admin";}}} \ No newline at end of file
diff --git a/platform/www/data/meta/es/blog/2022-02-09-cidoc_recovering_its_past_to_transform_our_present.changes b/platform/www/data/meta/es/blog/2022-02-09-cidoc_recovering_its_past_to_transform_our_present.changes
new file mode 100644
index 0000000..afebe12
--- /dev/null
+++ b/platform/www/data/meta/es/blog/2022-02-09-cidoc_recovering_its_past_to_transform_our_present.changes
@@ -0,0 +1 @@
+1693370948 192.168.56.1 C es:blog:2022-02-09-cidoc_recovering_its_past_to_transform_our_present admin creado 1660
diff --git a/platform/www/data/meta/es/blog/2022-02-09-cidoc_recovering_its_past_to_transform_our_present.indexed b/platform/www/data/meta/es/blog/2022-02-09-cidoc_recovering_its_past_to_transform_our_present.indexed
new file mode 100644
index 0000000..7070c46
--- /dev/null
+++ b/platform/www/data/meta/es/blog/2022-02-09-cidoc_recovering_its_past_to_transform_our_present.indexed
@@ -0,0 +1 @@
+8+plugin_include=0.1.safeindex=1+plugin_tag=0.2.deaccent=1 \ No newline at end of file
diff --git a/platform/www/data/meta/es/blog/2022-02-09-cidoc_recovering_its_past_to_transform_our_present.meta b/platform/www/data/meta/es/blog/2022-02-09-cidoc_recovering_its_past_to_transform_our_present.meta
new file mode 100644
index 0000000..67c1398
--- /dev/null
+++ b/platform/www/data/meta/es/blog/2022-02-09-cidoc_recovering_its_past_to_transform_our_present.meta
@@ -0,0 +1,3 @@
+a:2:{s:7:"current";a:8:{s:4:"date";a:2:{s:7:"created";i:1644375600;s:8:"modified";i:1693370948;}s:7:"creator";s:5:"admin";s:4:"user";s:5:"admin";s:11:"last_change";a:8:{s:4:"date";i:1693370948;s:2:"ip";s:12:"192.168.56.1";s:4:"type";s:1:"C";s:2:"id";s:69:"es:blog:2022-02-09-cidoc_recovering_its_past_to_transform_our_present";s:4:"user";s:5:"admin";s:3:"sum";s:6:"creado";s:5:"extra";s:0:"";s:10:"sizechange";i:1660;}s:5:"title";s:107:"Centro Intercultural de Documentación de Cuernavaca: recuperar su pasado para transformar nuestro presente";s:11:"description";a:2:{s:15:"tableofcontents";a:3:{i:0;a:4:{s:3:"hid";s:104:"centro_intercultural_de_documentacion_de_cuernavacarecuperar_su_pasado_para_transformar_nuestro_presente";s:5:"title";s:107:"Centro Intercultural de Documentación de Cuernavaca: recuperar su pasado para transformar nuestro presente";s:4:"type";s:2:"ul";s:5:"level";i:1;}i:1;a:4:{s:3:"hid";s:7:"section";s:5:"title";s:0:"";s:4:"type";s:2:"ul";s:5:"level";i:2;}i:2;a:4:{s:3:"hid";s:8:"detalles";s:5:"title";s:8:"Detalles";s:4:"type";s:2:"ul";s:5:"level";i:2;}}s:8:"abstract";s:416:"Centro Intercultural de Documentación de Cuernavaca: recuperar su pasado para transformar nuestro presente
+
+En esta primera actividad pública presentaremos la iniciativa para recuperar la historia, producción intelectual y memoria textual, visual y oral del Centro Intercultural de Cuernavaca (CIDOC), que tuviera existencia en los años 1966 y 1976 en México. Esta mítica institución operó como una suerte de";}s:8:"internal";a:2:{s:5:"cache";b:1;s:3:"toc";b:0;}s:8:"relation";a:1:{s:10:"firstimage";s:0:"";}}s:10:"persistent";a:4:{s:4:"date";a:1:{s:7:"created";i:1693370948;}s:7:"creator";s:5:"admin";s:4:"user";s:5:"admin";s:11:"last_change";a:8:{s:4:"date";i:1693370948;s:2:"ip";s:12:"192.168.56.1";s:4:"type";s:1:"C";s:2:"id";s:69:"es:blog:2022-02-09-cidoc_recovering_its_past_to_transform_our_present";s:4:"user";s:5:"admin";s:3:"sum";s:6:"creado";s:5:"extra";s:0:"";s:10:"sizechange";i:1660;}}} \ No newline at end of file
diff --git a/platform/www/data/meta/es/blog/2024-03-04-starting_acervus_progress_reports.indexed b/platform/www/data/meta/es/blog/2024-03-04-starting_acervus_progress_reports.indexed
new file mode 100644
index 0000000..7070c46
--- /dev/null
+++ b/platform/www/data/meta/es/blog/2024-03-04-starting_acervus_progress_reports.indexed
@@ -0,0 +1 @@
+8+plugin_include=0.1.safeindex=1+plugin_tag=0.2.deaccent=1 \ No newline at end of file
diff --git a/platform/www/data/meta/es/blog/2024-03-04-starting_acervus_progress_reports.meta b/platform/www/data/meta/es/blog/2024-03-04-starting_acervus_progress_reports.meta
new file mode 100644
index 0000000..a8f9f93
--- /dev/null
+++ b/platform/www/data/meta/es/blog/2024-03-04-starting_acervus_progress_reports.meta
@@ -0,0 +1,3 @@
+a:2:{s:7:"current";a:7:{s:4:"date";a:2:{s:7:"created";i:1709607600;s:8:"modified";i:1709629791;}s:4:"user";s:0:"";s:7:"creator";s:0:"";s:5:"title";s:35:"Comenzamos los Reportes de Progreso";s:11:"description";a:2:{s:15:"tableofcontents";a:2:{i:0;a:4:{s:3:"hid";s:35:"comenzamos_los_reportes_de_progreso";s:5:"title";s:35:"Comenzamos los Reportes de Progreso";s:4:"type";s:2:"ul";s:5:"level";i:1;}i:1;a:4:{s:3:"hid";s:7:"section";s:5:"title";s:0:"";s:4:"type";s:2:"ul";s:5:"level";i:2;}}s:8:"abstract";s:275:"Comenzamos los Reportes de Progreso
+
+Con la intención de generar una comunicación mas fluida con los colaboradores y beneficiarios del Proyecto, hemos decidido empezar a publicar reportes regulares que resuman los progresos en las diferentes áreas de trabajo del proyecto.";}s:8:"relation";a:2:{s:10:"references";a:1:{s:25:"es:blog:2024-03-05-apr_01";b:1;}s:10:"firstimage";s:0:"";}s:8:"internal";a:2:{s:5:"cache";b:1;s:3:"toc";b:0;}}s:10:"persistent";a:3:{s:4:"date";a:1:{s:7:"created";i:1709626436;}s:4:"user";s:0:"";s:7:"creator";s:0:"";}} \ No newline at end of file
diff --git a/platform/www/data/meta/es/blog/2024-03-05-apr_01.indexed b/platform/www/data/meta/es/blog/2024-03-05-apr_01.indexed
new file mode 100644
index 0000000..7070c46
--- /dev/null
+++ b/platform/www/data/meta/es/blog/2024-03-05-apr_01.indexed
@@ -0,0 +1 @@
+8+plugin_include=0.1.safeindex=1+plugin_tag=0.2.deaccent=1 \ No newline at end of file
diff --git a/platform/www/data/meta/es/blog/2024-03-05-apr_01.meta b/platform/www/data/meta/es/blog/2024-03-05-apr_01.meta
new file mode 100644
index 0000000..b717ed1
--- /dev/null
+++ b/platform/www/data/meta/es/blog/2024-03-05-apr_01.meta
@@ -0,0 +1,7 @@
+a:2:{s:7:"current";a:7:{s:4:"date";a:2:{s:7:"created";i:1709607600;s:8:"modified";i:1709629710;}s:4:"user";s:0:"";s:7:"creator";s:0:"";s:5:"title";s:31:"Acervus Reporte de Progreso #01";s:11:"description";a:2:{s:15:"tableofcontents";a:5:{i:0;a:4:{s:3:"hid";s:30:"acervus_reporte_de_progreso_01";s:5:"title";s:31:"Acervus Reporte de Progreso #01";s:4:"type";s:2:"ul";s:5:"level";i:1;}i:1;a:4:{s:3:"hid";s:14:"illich_acervus";s:5:"title";s:14:"Illich Acervus";s:4:"type";s:2:"ul";s:5:"level";i:2;}i:2;a:4:{s:3:"hid";s:9:"articulos";s:5:"title";s:10:"Artículos";s:4:"type";s:2:"ul";s:5:"level";i:3;}i:3;a:4:{s:3:"hid";s:11:"entrevistas";s:5:"title";s:11:"Entrevistas";s:4:"type";s:2:"ul";s:5:"level";i:3;}i:4;a:4:{s:3:"hid";s:13:"audiovisuales";s:5:"title";s:13:"Audiovisuales";s:4:"type";s:2:"ul";s:5:"level";i:3;}}s:8:"abstract";s:249:"Acervus Reporte de Progreso #01
+
+Este informe cubre las actualizaciones que han tenido lugar durante las dos últimas semanas (2024-02-20 to 2024-03-05).
+
+Illich Acervus
+
+Hemos añadido los siguientes materiales a la pila de materiales por procesar:";}s:8:"internal";a:2:{s:5:"cache";b:1;s:3:"toc";b:0;}s:8:"relation";a:1:{s:10:"firstimage";s:0:"";}}s:10:"persistent";a:3:{s:4:"date";a:1:{s:7:"created";i:1709629710;}s:4:"user";s:0:"";s:7:"creator";s:0:"";}} \ No newline at end of file
diff --git a/platform/www/data/meta/es/index.changes b/platform/www/data/meta/es/index.changes
new file mode 100644
index 0000000..7b52249
--- /dev/null
+++ b/platform/www/data/meta/es/index.changes
@@ -0,0 +1 @@
+1686764614 192.168.56.1 C es:index admin creado 1561
diff --git a/platform/www/data/meta/es/index.indexed b/platform/www/data/meta/es/index.indexed
new file mode 100644
index 0000000..7070c46
--- /dev/null
+++ b/platform/www/data/meta/es/index.indexed
@@ -0,0 +1 @@
+8+plugin_include=0.1.safeindex=1+plugin_tag=0.2.deaccent=1 \ No newline at end of file
diff --git a/platform/www/data/meta/es/index.meta b/platform/www/data/meta/es/index.meta
new file mode 100644
index 0000000..a5a8177
--- /dev/null
+++ b/platform/www/data/meta/es/index.meta
@@ -0,0 +1,5 @@
+a:2:{s:7:"current";a:8:{s:4:"date";a:2:{s:7:"created";i:1686764614;s:8:"modified";i:1687791681;}s:7:"creator";s:5:"admin";s:4:"user";s:5:"admin";s:11:"last_change";b:0;s:5:"title";s:19:"El Proyecto Acervus";s:11:"description";a:2:{s:15:"tableofcontents";a:2:{i:0;a:4:{s:3:"hid";s:19:"el_proyecto_acervus";s:5:"title";s:19:"El Proyecto Acervus";s:4:"type";s:2:"ul";s:5:"level";i:1;}i:1;a:4:{s:3:"hid";s:9:"novedades";s:5:"title";s:9:"Novedades";s:4:"type";s:2:"ul";s:5:"level";i:2;}}s:8:"abstract";s:452:"El Proyecto Acervus
+
+Una recuperación colectiva de las obras de pensadores y activistas surgidos de la constelación de convivencia en torno a Ivan Illich
+
+La iniciativa tiene un doble propósito: contribuir a la comprensión de la crítica condición actual y al análisis y debate de las opciones existentes, a partir de las aportaciones del círculo de Ivan Illich, y constituir una completa biblioteca digital de su obra de acceso abierto general.";}s:8:"relation";a:2:{s:7:"haspart";a:4:{s:25:"es:blog:2024-03-05-apr_01";b:1;s:52:"es:blog:2024-03-04-starting_acervus_progress_reports";b:1;s:69:"es:blog:2022-02-09-cidoc_recovering_its_past_to_transform_our_present";b:1;s:30:"es:blog:2021-11-01-the_origins";b:1;}s:10:"firstimage";s:0:"";}s:8:"internal";a:2:{s:5:"cache";b:1;s:3:"toc";b:0;}}s:10:"persistent";a:4:{s:4:"date";a:1:{s:7:"created";i:1686764614;}s:7:"creator";s:5:"admin";s:4:"user";s:5:"admin";s:11:"last_change";b:0;}} \ No newline at end of file
diff --git a/platform/www/data/meta/fr/index.changes b/platform/www/data/meta/fr/index.changes
new file mode 100644
index 0000000..779f3b2
--- /dev/null
+++ b/platform/www/data/meta/fr/index.changes
@@ -0,0 +1 @@
+1687791864 192.168.56.1 C fr:index admin created 1787
diff --git a/platform/www/data/meta/fr/index.indexed b/platform/www/data/meta/fr/index.indexed
new file mode 100644
index 0000000..7070c46
--- /dev/null
+++ b/platform/www/data/meta/fr/index.indexed
@@ -0,0 +1 @@
+8+plugin_include=0.1.safeindex=1+plugin_tag=0.2.deaccent=1 \ No newline at end of file
diff --git a/platform/www/data/meta/fr/index.meta b/platform/www/data/meta/fr/index.meta
new file mode 100644
index 0000000..f07ad6f
--- /dev/null
+++ b/platform/www/data/meta/fr/index.meta
@@ -0,0 +1,5 @@
+a:2:{s:7:"current";a:8:{s:4:"date";a:2:{s:7:"created";i:1687791864;s:8:"modified";i:1687791864;}s:7:"creator";s:5:"admin";s:4:"user";s:5:"admin";s:11:"last_change";a:8:{s:4:"date";i:1687791864;s:2:"ip";s:12:"192.168.56.1";s:4:"type";s:1:"C";s:2:"id";s:8:"fr:index";s:4:"user";s:5:"admin";s:3:"sum";s:7:"created";s:5:"extra";s:0:"";s:10:"sizechange";i:1787;}s:5:"title";s:17:"Le projet Acervus";s:11:"description";a:2:{s:15:"tableofcontents";a:2:{i:0;a:4:{s:3:"hid";s:17:"le_projet_acervus";s:5:"title";s:17:"Le projet Acervus";s:4:"type";s:2:"ul";s:5:"level";i:1;}i:1;a:4:{s:3:"hid";s:12:"mises_a_jour";s:5:"title";s:13:"Mises à jour";s:4:"type";s:2:"ul";s:5:"level";i:2;}}s:8:"abstract";s:459:"Le projet Acervus
+
+Une récupération collective des travaux de penseurs et d'activistes qui ont émergé de la constellation de convivialité autour d'Ivan Illich.
+
+L'initiative a un double objectif : contribuer à la compréhension de la condition critique actuelle et à l'analyse et au débat des options existantes, sur la base des contributions du cercle d'Ivan Illich, et constituer une bibliothèque numérique complète de son œuvre en libre accès.";}s:8:"internal";a:2:{s:5:"cache";b:1;s:3:"toc";b:0;}s:8:"relation";a:1:{s:10:"firstimage";s:0:"";}}s:10:"persistent";a:4:{s:4:"date";a:1:{s:7:"created";i:1687791864;}s:7:"creator";s:5:"admin";s:4:"user";s:5:"admin";s:11:"last_change";a:8:{s:4:"date";i:1687791864;s:2:"ip";s:12:"192.168.56.1";s:4:"type";s:1:"C";s:2:"id";s:8:"fr:index";s:4:"user";s:5:"admin";s:3:"sum";s:7:"created";s:5:"extra";s:0:"";s:10:"sizechange";i:1787;}}} \ No newline at end of file
diff --git a/platform/www/data/meta/it/index.changes b/platform/www/data/meta/it/index.changes
new file mode 100644
index 0000000..3fd03eb
--- /dev/null
+++ b/platform/www/data/meta/it/index.changes
@@ -0,0 +1 @@
+1687791887 192.168.56.1 C it:index admin created 1670
diff --git a/platform/www/data/meta/it/index.indexed b/platform/www/data/meta/it/index.indexed
new file mode 100644
index 0000000..7070c46
--- /dev/null
+++ b/platform/www/data/meta/it/index.indexed
@@ -0,0 +1 @@
+8+plugin_include=0.1.safeindex=1+plugin_tag=0.2.deaccent=1 \ No newline at end of file
diff --git a/platform/www/data/meta/it/index.meta b/platform/www/data/meta/it/index.meta
new file mode 100644
index 0000000..c785382
--- /dev/null
+++ b/platform/www/data/meta/it/index.meta
@@ -0,0 +1,5 @@
+a:2:{s:7:"current";a:8:{s:4:"date";a:2:{s:7:"created";i:1687791887;s:8:"modified";i:1687791887;}s:7:"creator";s:5:"admin";s:4:"user";s:5:"admin";s:11:"last_change";a:8:{s:4:"date";i:1687791887;s:2:"ip";s:12:"192.168.56.1";s:4:"type";s:1:"C";s:2:"id";s:8:"it:index";s:4:"user";s:5:"admin";s:3:"sum";s:7:"created";s:5:"extra";s:0:"";s:10:"sizechange";i:1670;}s:5:"title";s:19:"Il Progetto Acervus";s:11:"description";a:2:{s:15:"tableofcontents";a:2:{i:0;a:4:{s:3:"hid";s:19:"il_progetto_acervus";s:5:"title";s:19:"Il Progetto Acervus";s:4:"type";s:2:"ul";s:5:"level";i:1;}i:1;a:4:{s:3:"hid";s:13:"aggiornamenti";s:5:"title";s:13:"Aggiornamenti";s:4:"type";s:2:"ul";s:5:"level";i:2;}}s:8:"abstract";s:432:"Il Progetto Acervus
+
+Recupero collettivo delle opere di pensatori e attivisti emerse dalla costellazione di convivialità intorno a Ivan Illich
+
+L'iniziativa ha un duplice scopo: contribuire alla comprensione della condizione critica attuale e all'analisi e al dibattito delle opzioni esistenti, sulla base dei contributi della cerchia di Ivan Illich, e costituire una biblioteca digitale completa della sua opera di libero accesso.";}s:8:"internal";a:2:{s:5:"cache";b:1;s:3:"toc";b:0;}s:8:"relation";a:1:{s:10:"firstimage";s:0:"";}}s:10:"persistent";a:4:{s:4:"date";a:1:{s:7:"created";i:1687791887;}s:7:"creator";s:5:"admin";s:4:"user";s:5:"admin";s:11:"last_change";a:8:{s:4:"date";i:1687791887;s:2:"ip";s:12:"192.168.56.1";s:4:"type";s:1:"C";s:2:"id";s:8:"it:index";s:4:"user";s:5:"admin";s:3:"sum";s:7:"created";s:5:"extra";s:0:"";s:10:"sizechange";i:1670;}}} \ No newline at end of file
diff --git a/platform/www/data/meta/macros/macros.ser b/platform/www/data/meta/macros/macros.ser
index cee3e6c..1c3afcf 100644
--- a/platform/www/data/meta/macros/macros.ser
+++ b/platform/www/data/meta/macros/macros.ser
@@ -1 +1 @@
-a:7:{s:12:"LANG_authors";s:12:"LANG_authors";s:13:"LANG_comments";s:13:"LANG_comments";s:20:"LANG_publicationdate";s:20:"LANG_publicationdate";s:13:"LANG_textfull";s:13:"LANG_textfull";s:14:"LANG_titleorig";s:14:"LANG_titleorig";s:13:"LANG_versions";s:13:"LANG_versions";s:17:"LANG_translations";s:17:"LANG_translations";} \ No newline at end of file
+a:11:{s:12:"LANG_authors";s:12:"LANG_authors";s:13:"LANG_comments";s:13:"LANG_comments";s:12:"LANG_lang_en";s:12:"LANG_lang_en";s:12:"LANG_lang_es";s:12:"LANG_lang_es";s:13:"LANG_langorig";s:13:"LANG_langorig";s:20:"LANG_publicationdate";s:20:"LANG_publicationdate";s:13:"LANG_textfull";s:13:"LANG_textfull";s:14:"LANG_titleorig";s:14:"LANG_titleorig";s:17:"LANG_translations";s:17:"LANG_translations";s:13:"LANG_versions";s:13:"LANG_versions";s:16:"LANG_translators";s:16:"LANG_translators";} \ No newline at end of file
diff --git a/platform/www/data/meta/pt/index.changes b/platform/www/data/meta/pt/index.changes
new file mode 100644
index 0000000..cec7d56
--- /dev/null
+++ b/platform/www/data/meta/pt/index.changes
@@ -0,0 +1 @@
+1687791907 192.168.56.1 C pt:index admin created 1676
diff --git a/platform/www/data/meta/pt/index.indexed b/platform/www/data/meta/pt/index.indexed
new file mode 100644
index 0000000..7070c46
--- /dev/null
+++ b/platform/www/data/meta/pt/index.indexed
@@ -0,0 +1 @@
+8+plugin_include=0.1.safeindex=1+plugin_tag=0.2.deaccent=1 \ No newline at end of file
diff --git a/platform/www/data/meta/pt/index.meta b/platform/www/data/meta/pt/index.meta
new file mode 100644
index 0000000..338a85a
--- /dev/null
+++ b/platform/www/data/meta/pt/index.meta
@@ -0,0 +1,5 @@
+a:2:{s:7:"current";a:8:{s:4:"date";a:2:{s:7:"created";i:1687791907;s:8:"modified";i:1687791907;}s:7:"creator";s:5:"admin";s:4:"user";s:5:"admin";s:11:"last_change";a:8:{s:4:"date";i:1687791907;s:2:"ip";s:12:"192.168.56.1";s:4:"type";s:1:"C";s:2:"id";s:8:"pt:index";s:4:"user";s:5:"admin";s:3:"sum";s:7:"created";s:5:"extra";s:0:"";s:10:"sizechange";i:1676;}s:5:"title";s:17:"O Projeto Acervus";s:11:"description";a:2:{s:15:"tableofcontents";a:2:{i:0;a:4:{s:3:"hid";s:17:"o_projeto_acervus";s:5:"title";s:17:"O Projeto Acervus";s:4:"type";s:2:"ul";s:5:"level";i:1;}i:1;a:4:{s:3:"hid";s:13:"actualizacoes";s:5:"title";s:15:"Actualizações";s:4:"type";s:2:"ul";s:5:"level";i:2;}}s:8:"abstract";s:434:"O Projeto Acervus
+
+Uma recuperação colectiva das obras de pensadores e activistas que emergiram da constelação de convívio em torno de Ivan Illich
+
+A iniciativa tem um duplo objetivo: contribuir para a compreensão da condição crítica atual e para a análise e debate das opções existentes, com base nos contributos do círculo de Ivan Illich, e constituir uma biblioteca digital completa da sua obra de acesso aberto geral.";}s:8:"internal";a:2:{s:5:"cache";b:1;s:3:"toc";b:0;}s:8:"relation";a:1:{s:10:"firstimage";s:0:"";}}s:10:"persistent";a:4:{s:4:"date";a:1:{s:7:"created";i:1687791907;}s:7:"creator";s:5:"admin";s:4:"user";s:5:"admin";s:11:"last_change";a:8:{s:4:"date";i:1687791907;s:2:"ip";s:12:"192.168.56.1";s:4:"type";s:1:"C";s:2:"id";s:8:"pt:index";s:4:"user";s:5:"admin";s:3:"sum";s:7:"created";s:5:"extra";s:0:"";s:10:"sizechange";i:1676;}}} \ No newline at end of file
diff --git a/platform/www/data/pages/de/index.txt b/platform/www/data/pages/de/index.txt
new file mode 100644
index 0000000..2a78b12
--- /dev/null
+++ b/platform/www/data/pages/de/index.txt
@@ -0,0 +1,28 @@
+~~NOTOC~~~
+
+# Das Acervus-Projekt
+
+**Eine kollektive Wiederherstellung der Werke von Denkern und Aktivisten, die aus der Konvivialitätskonstellation um Ivan Illich hervorgegangen sind**
+
+
+Die Initiative verfolgt ein doppeltes Ziel: einen Beitrag zum Verständnis der kritischen gegenwärtigen Situation und zur Analyse und Debatte der bestehenden Optionen zu leisten, basierend auf den Beiträgen des Kreises um Ivan Illich, und eine vollständige digitale Bibliothek seines Werks mit allgemeinem Zugang zu schaffen.
+
+Die Initiative zielt darauf ab, einen digitalen Acervus von verschiedenen Autoren wie Ivan Illich, Jean Robert, Gustavo Esteva und anderen zu erstellen. Das gesamte Material wird auf einer digitalen Plattform präsentiert, die speziell für den einfachen Zugang, das Nachschlagen, die Lektüre auf verschiedenen Trägern/Formaten und die Neuauflage in Papierform durch unabhängige Gruppen mit gemeinnützigen Zwecken konzipiert ist.
+
+Dieser virtuelle Raum wird unter Verwendung von Open-Source-Technologien entwickelt, die auf Zusammenarbeit, dezentralisierte Selbstveröffentlichung und Interaktion mit den Inhalten auf vielfältige Weise ausgerichtet sind. Auf diese Weise wird es möglich sein, eine zuverlässige, lesbare und dauerhafte Quelle zu schaffen, die sowohl den Zugang zu jedem Werk als auch den Verweis auf bestimmte Teile und Auszüge ermöglicht.
+
+Die Bibliothek wird aus Büchern, ihren verschiedenen Versionen in unterschiedlichen Sprachen (mit der Angabe, ob es sich um direkte Übersetzungen anderer Versionen handelt), Zusammenstellungen, Artikeln, Interviews, Audio- und Videoaufnahmen bestehen. Es wird eine dynamische und kollaborative Veröffentlichungsplattform sein.
+
+**Wenn Sie uns erreichen wollen, schreiben Sie bitte an <info@acerv.us>**
+
+## Updates
+
+{{blog>de:blog?5&firstseconly&readmore}}
+
+<html>
+<style>
+::before {
+ display: none !important;
+}
+</style>
+</html>
diff --git a/platform/www/data/pages/en/blog/2021-11-01-the_origins.txt b/platform/www/data/pages/en/blog/2021-11-01-the_origins.txt
new file mode 100644
index 0000000..8cabc13
--- /dev/null
+++ b/platform/www/data/pages/en/blog/2021-11-01-the_origins.txt
@@ -0,0 +1,15 @@
+~~META:
+date created = 2021-11-01
+~~
+
+# The origins of the Acervus Project
+
+In early 2020, we began to envision the need for an intergenerational effort to recover the work of Ivan Illich. We thought of "recovering" in a broad sense of the term, not only giving access, but also making intelligible and facilitating the navigation through the complex layers of his thought. Together with Gustavo Esteva and Franco Augusto, we began to outline the idea of providing open access, non-commercial and collaborative access to all of Ivan's work, starting with the original texts. At the beginning we informally called this effort _"Illich's Archives"_.
+
+##
+
+In the midst of the COVID-19 pandemic, we exchanged emails with hundreds of people linked to his work, to CIDOC in Cuernavaca, and we searched every possible corner of the web to put together what began to be an enormous digital collection of works written by Ivan himself, his friends and collaborators. We not only found texts, but also sound material, old documents rusted by time and we began to understand that ours would be an effort of several years devoted to rebuild an intellectual building scattered in several cities around the world.
+
+At the same time, we knew that this was not just an archival exercise. Our search, from the beginning, was guided by the need to find clues that would help us understand the convulsed present, the struggles of those from below, the need to invent here and now ways out of the civilizational crises. Our project would be like that crab that sought to advance with its eyes fixed on the past.
+
+The ideas and hypotheses that we advanced during this year were condensed in a collective text entitled ["Towards Illich's 'Legibility': Returning to Ivan through the Mirror of the Past"](https://journals.psu.edu/illichstudies/article/view/62315/61623), which was published in Vol. 7 No. 1 of ["The International Journal of Illich Studies"](https://journals.psu.edu/illichstudies).
diff --git a/platform/www/data/pages/en/blog/2022-02-09-cidoc_recovering_its_past_to_transform_our_present.txt b/platform/www/data/pages/en/blog/2022-02-09-cidoc_recovering_its_past_to_transform_our_present.txt
new file mode 100644
index 0000000..f7027ee
--- /dev/null
+++ b/platform/www/data/pages/en/blog/2022-02-09-cidoc_recovering_its_past_to_transform_our_present.txt
@@ -0,0 +1,18 @@
+~~META:
+date created = 2022-02-09
+~~
+~~NOTOC~~
+
+
+# Centro Intercultural de Documentación de Cuernava (CIDOC): Recovering its past to transform our present
+
+In this first public activity we will present the initiative to recover the history, intellectual production and textual, visual and oral memory of the Intercultural Center of Cuernavaca (CIDOC), which existed in the years 1966 and 1976 in Mexico. This mythical institution operated as a sort of "alternative university" and was the origin of reflections and intellectual productions that forever changed education in Latin America and the world.
+
+##
+
+A series of dialogues, debates and writings took place there, featuring Ivan Illich, John Holt, Everett Reimer, Paul Goodman, Paulo Freire and many other theoreticians of education and social change. CIDOC had a decisive impact in its time and its effects are still strongly felt today in ways that we are only now beginning to understand. It was the cradle of a series of revolutionary ideas that today, in the global context of the so-called "post-pandemic", take on an unusual relevance: unschooling; education without school; liberation pedagogy; degrowth; limits to development; ecosocialism; critique of institutionalized medicine; deprofessionalization; appropriable technologies; open source; the hacker movement; decoloniality; conviviality; among so many others, have in CIDOC their undeniable mark of origin.
+
+## Details
+
+* Date and time: Wednesday 9th at 4:30 pm (UTC)
+* Place: Virtual and in place (Unitierra Oaxaca)
diff --git a/platform/www/data/pages/en/blog/2024-03-04-starting_acervus_progress_reports.txt b/platform/www/data/pages/en/blog/2024-03-04-starting_acervus_progress_reports.txt
new file mode 100644
index 0000000..8d4069c
--- /dev/null
+++ b/platform/www/data/pages/en/blog/2024-03-04-starting_acervus_progress_reports.txt
@@ -0,0 +1,17 @@
+~~META:
+date created = 2024-03-04
+~~
+~~NOTOC~~
+
+
+# We started the Acervus Progress Reports!
+
+With the intention of generating a more fluid communication with the collaborators and beneficiaries of the Project, we have decided to start publishing regular reports summarizing the progress in the different work areas of the project.
+
+##
+
+So far, those of us involved in the Acervus Project have been working quietly, working hard to process and organize the enormous amount of material we have collected. We continue to make progress in the recovery of content for the different collections, focusing especially on Illich's and CIDOC's collections. We have accessed new articles, interviews and audio recordings. Since we have already made substantial progress in the construction of the index of sources, in the coming weeks we will be publishing regular updates with the progress we are making. We expect these updates to be published every 2 weeks.
+
+In these brief reports we plan to share new acquisitions, status of digitizations, progress in the development of the web platform and other issues that we consider valuable to inform those who follow closely this collaborative initiative.
+
+Without further ado, we share with you the link to access the [[2024-03-05-apr_01|first report]].
diff --git a/platform/www/data/pages/en/blog/2024-03-05-apr_01.txt b/platform/www/data/pages/en/blog/2024-03-05-apr_01.txt
new file mode 100644
index 0000000..4562370
--- /dev/null
+++ b/platform/www/data/pages/en/blog/2024-03-05-apr_01.txt
@@ -0,0 +1,39 @@
+~~META:
+date created = 2024-03-05
+~~
+~~NOTOC~~
+
+# Acervus Progress Report #01
+
+This report covers the updates that took place during the last two weeks (2024-02-20 to 2024-03-05).
+
+## Illich Acervus
+
+We added the following source materials to the pile of materials to be processed:
+
+### Articles
+
+* 1958 - The End of Human Life: an interpretation of Death as the Supreme Form of Prayer
+* 1960 - Problemas teológicos de Latino América
+* 1966 - Financial Aid for Latin America
+* 1969 - Between Jail and Campus: The Chaplain's Halfway House
+* 1969 - The need for counterfoil research
+* 1971 - The Alternative to Schooling; Extended Version
+* 1971 - Ivan Illich Challenges Education
+* 1971 - Look Out Practitioners
+* 1972 - A Convivial Society for Melanesia?
+* 1972 - Gradual change or violent revolution in Latin America?
+* 1972 - The illusion of unlimited health insurance
+* 1972 - Bibliografía Límites; agosto-septiembre de 1972
+* 1972 - Growth: myth and reality
+
+### Interviews
+
+* 1974 - On Growth: Interview with Ivan Illich
+
+### Audiovisuals
+
+* 1978 - The Art of Suffering
+* 1968 - Elspeth Chisholm visits Ivan Illich in Cuernavaca
+* 1968 - Elspeth Chisholm interviews Ivan Illich in Cuernavaca
+* 1969 - CBC Tuesday Night - Visit to Cuernavaca
diff --git a/platform/www/data/pages/en/blog/2024-03-20-apr_02.txt b/platform/www/data/pages/en/blog/2024-03-20-apr_02.txt
new file mode 100644
index 0000000..f9b64f2
--- /dev/null
+++ b/platform/www/data/pages/en/blog/2024-03-20-apr_02.txt
@@ -0,0 +1,34 @@
+~~META:
+date created = 2024-03-20
+~~
+~~NOTOC~~
+
+# Acervus Progress Report #02
+
+This report covers the updates that took place during the last two weeks (2024-03-06 to 2024-03-20).
+
+## Illich Acervus
+
+We added the following source materials to the pile of materials to be processed:
+
+### Articles
+
+* 1973 - Energy and Equity: final draft
+* 1973 - Energie, Vitesse et Justice Sociale
+* 1974 - Energy and Equity
+* 1974 - Les coûts de l'education a vie
+* 1975 - Les enseignants sont-ils necessaires?
+* 1975 - Le piège de l'école à vie
+* 1976 - Imprisoned in the Global Classroom
+* 1976 - Bibliographical Supplement To: Medical Nemesis, Pantheon, 1976 & Limits To Medicine, Boyars, 1976
+* 1976 - Disabling Professions: notes for a lecture
+* 1977 - Useful Unemployment and its Professional Enemies
+* 1977 - L’incompétence spécialisée
+* 1978 - Introducción a "Lo inverso de la salud administrada" de Valentina Borremans
+* 1979 - Von ende des entwicklungsverhabens
+* 1979 - Allocution prononcée lors de la séance de clôture du Colloque International sur l'Informatique et la Société
+
+### Audiovisuals
+
+* 1970 - Ivan Illich at conference called Milieu 70 held in Winnipeg
+* 1971 - The Institutionalization of Truth
diff --git a/platform/www/data/pages/en/blog/2024-04-05-apr_03.md b/platform/www/data/pages/en/blog/2024-04-05-apr_03.md
new file mode 100644
index 0000000..9cb5cf1
--- /dev/null
+++ b/platform/www/data/pages/en/blog/2024-04-05-apr_03.md
@@ -0,0 +1,30 @@
+~~META:
+date created = 2024-04-05
+~~
+~~NOTOC~~
+
+# Acervus Progress Report #03
+
+This report covers the updates that took place during the last two weeks (2024-03-21 to 2024-04-05).
+
+## Illich Acervus
+
+We added the following source materials to the pile of materials to be processed:
+
+### Articles
+
+* 1980 - Alternativas del desarrollo
+* 1980 - Salud y calidad de vida
+* 1980 - Shadow-Work, a draft
+* 1980 - Vernacular Virtue
+* 1980 - Erziehung für ein leben im 7? Stock? Danke, nein!
+* 1981 - Vernacular Gender
+* 1982 - The Right to Dignified Silence
+* 1983 - Dank as die Gastfreunde
+* 1983 - La reivindicación de la casa
+* 1984 - La salud y la calidad de vida en la escasez
+* 1984 - El hedor de la ciudad y sus aguas
+
+### Audiovisuals
+
+* 1971 - Balance and Biosphere
diff --git a/platform/www/data/pages/en/blog/2024-04-20-apr_04.md b/platform/www/data/pages/en/blog/2024-04-20-apr_04.md
new file mode 100644
index 0000000..1a36407
--- /dev/null
+++ b/platform/www/data/pages/en/blog/2024-04-20-apr_04.md
@@ -0,0 +1,31 @@
+~~META:
+date created = 2024-04-20
+~~
+~~NOTOC~~
+
+# Acervus Progress Report #04
+
+This report covers the updates that took place during the last two weeks (2024-04-06 to 2024-04-20).
+
+## Illich Acervus
+
+We added the following source materials to the pile of materials to be processed:
+
+### Articles
+
+* 1984 - Newspeak and uniquack in 1984
+* 1984 - Phaidros
+* 1985 - Tecnológica verde
+* 1985 - La búsqueda de nuevos commons
+* 1985 - Pilgernder und kriegender Individualismus
+* 1985 - Hacia una historia de las necesidades
+* 1985 - Development: metaphor, myth, threat
+* 1986 - My Affair with Education
+* 1987 - Reflections on Jaques Ellul, La subversion du christianisme
+* 1992 - Reading the Intangible
+* 1992 - Lectio divina
+
+### Audiovisuals
+
+* 1971 - Ivan Illich Challenges Education
+* 1972 - Ideas. The Law and Society
diff --git a/platform/www/data/pages/en/docs/index.txt b/platform/www/data/pages/en/docs/index.txt
new file mode 100644
index 0000000..7011cb8
--- /dev/null
+++ b/platform/www/data/pages/en/docs/index.txt
@@ -0,0 +1,57 @@
+# Internal documentation
+
+# Technical documentation
+
+This pages contains the Acervus technical documentation.
+
+## Design principles
+
+This platform is centered on a model based on a design that seeks to be simple and based on more or less stable criteria. That is:
+* keep complexity to a minimum;
+* the web platform is a way to navigate and edit a content
+* we separate the content from its identifiers/metadata
+* everything is stored in folders and in plain text files, we do not use databases
+* content collections (books, articles, etc) have priority, and must be usable without the platform.
+
+## Operations
+
+### Status of the materials
+
+We defined three categories to describe the status of an item of the collection:
+
+* **Available**: item is fully processed and available in the online platform. Tag definition is ```{{tag>available}}```.
+* **Pending**: item is available in some digital format, but is pending to be processed to accomplish the platform technical requirements. Tag definition is ```{{tag>pending}}```.
+* **Missing**: item is not available yet in any digital format. Tag definition is ```{{tag>missing}}```.
+
+## Translating string of the platform
+
+Two files needs to be edited:
+
+* ```i18n/textinsert_strings.php```
+* ```www/data/meta/macros/macros.ser```
+
+First add the reference to the array in ```www/data/meta/macros/macros.ser```. This also can be done in the webinterface ([[/index?do=admin&page=textinsert|this link]]). Then edit ```i18n/textinsert_strings.php``` to incorporate the localized string text.
+
+## Text management
+
+Here are some docs related to the way we manage the text contents
+
+* [[text_format|Text format]]
+
+## Audiovidual management
+
+### Useful tools
+
+To generate a subtitle from a video, using AI:
+
+```/home/yaco/python/bin/whisper_autosrt -S es -D en 2022_02_09-Acervus_CIDOC_presentacion.mp4```
+
+More information about ```whisper_autosrt```, it's available here: https://github.com/botbahlul/whisper_autosrt
+
+## Features
+
+Ideas to consider:
+
+* Improve diff visualizations of text versions using [[https://diff2html.xyz/index.html|diff2html.js]]
+
+* Implement some type of visualization of pages using GraphViz DOT and D3, see: [[d3-graphviz|https://github.com/magjac/d3-graphviz]] and [[https://github.com/mountainstorm/jquery.graphviz.svg|jquery.graphviz.svg]] \ No newline at end of file
diff --git a/platform/www/data/pages/en/docs/text_format.txt b/platform/www/data/pages/en/docs/text_format.txt
new file mode 100644
index 0000000..d295772
--- /dev/null
+++ b/platform/www/data/pages/en/docs/text_format.txt
@@ -0,0 +1,199 @@
+# Formatting text
+
+In Acervus we use [Markdown](https://en.wikipedia.org/wiki/Markdown) syntax to format all the contents. Here is a simple guideline on how to apply it:
+
+## Headers
+
+```
+# Header level 1 (only for main titles)
+## Header level 2 (Sections)
+### Header level 3 (Sub sections)
+#### Header level 4 (SubSub sections)
+##### Header level 5 (SubSubSub sections)
+###### Header level 6 (SubSubSubSub sections)
+```
+
+{{:en:docs:markdown_headers.jpg?nolink|}}
+
+## Text formatting
+
+```*This text will be italic*```
+
+*This text will be italic*
+
+----
+
+```_This text will be italic_```
+
+_This text will be italic_
+
+----
+
+```**This text will be bold**```
+
+**This text will be bold**
+
+----
+
+```***This text will be bold and italic***```
+
+***This text will be bold and italic***
+
+
+
+## Elements
+
+### Blockquotes
+
+```> This is a blockquote. We use it for quotes and also for poems.```
+
+> This is a blockquote. We use it for quotes and also for poems.
+
+
+### Ordered lists
+
+```
+1. Item 1
+2. Item 2
+3. Item 3
+```
+
+1. Item 1
+2. Item 2
+3. Item 3
+
+```
+1. Item 1
+1. Item 2
+1. Item 3
+```
+
+1. Item 1
+1. Item 2
+1. Item 3
+
+
+### Unordered lists
+
+```
+* Item 1
+* Item 2
+* Item 3
+```
+
+* Item 1
+* Item 2
+* Item 3
+
+```
+- Item 4
+- Item 5
+- Item 6
+```
+
+- Item 4
+- Item 5
+- Item 6
+
+### Nested lists
+
+#### Unsorted
+
+```
+* Item 1
+ * Item 1.1
+ * Item 1.1.1
+ * Item 1.1.2
+ * Item 1.2
+* Item 2
+ * Item 2.1
+* Item 3
+```
+
+
+* Item 1
+ * Item 1.1
+ * Item 1.1.1
+ * Item 1.1.2
+ * Item 1.2
+* Item 2
+ * Item 2.1
+* Item 3
+
+
+#### Sorted
+
+```
+1. Item 1
+ 1. Item 1.1
+ 1. Item 1.1.1
+ 1. Item 1.1.2
+ 1. Item 1.2
+1. Item 2
+ 1. Item 2.1
+1. Item 3
+```
+
+
+1. Item 1
+ 1. Item 1.1
+ 1. Item 1.1.1
+ 1. Item 1.1.2
+ 1. Item 1.2
+1. Item 2
+ 1. Item 2.1
+1. Item 3
+
+##### Avoiding numbered bullet formatting
+
+In certain cases, we want to start a sentence with a numeration. To avoid this to be recognized as a numbered bullet and getting a left margin, we use the following code that replaces regular whitespace with a [[https://en.wikipedia.org/wiki/Non-breaking_space#Width_variation|"Narrw No-Break Space"]]. This is the result that can be copy-pasted:
+
+```1. ```
+
+1. This is a numbered sentence without buller format
+
+
+## Mono-spaced block text
+
+```
+```We can mark text in monospaced font using this format```
+```
+
+```
+We can mark text in monospaced font using this format
+```
+
+## Lines
+
+* ```--``` becomes --
+* ```---``` becomes ---
+* ```----``` becomes a full width horizontal lines, useful to divide elements, below you can see it:
+
+----
+
+## Links
+
+```[Text of the link](https://acerv.us).```
+
+[Text of the link](https://acerv.us).
+
+## Footnotes
+
+```
+This a paragraph with some footnotes. We put the reference like this[^n01]. And we can other reference at the end of this sentence[^n02]. Then at the end of the article, we list the reference and write a footnote in a single line each of them.
+
+...
+
+[^n01:] This is the first footnote. ]
+
+[^n02:] This is the second footnote. .]
+```
+
+
+This a paragraph with some footnotes. We put the reference like this[^n01]. And we can other reference at the end of this sentence[^n02]. Then at the end of the article, we list the reference and write a footnote in a single line each of them.
+
+...
+
+[^n01:] This is the first footnote. ]
+
+[^n02:] This is the second footnote. .]
diff --git a/platform/www/data/pages/en/index.txt b/platform/www/data/pages/en/index.txt
index 6bbce37..915b2f7 100644
--- a/platform/www/data/pages/en/index.txt
+++ b/platform/www/data/pages/en/index.txt
@@ -1,6 +1,9 @@
-# Welcome to The Acervus Project!
+~~NOTOC~~
+
+# The Acervus Project
+
+**A collective recovery of the works of thinkers and activists that emerged out of the constellation of conviviality surrounding Ivan Illich**
-**This project is under development, more news very soon!**
The initiative has a double purpose: to contribute to the understanding of the critical current condition and to the analysis and debate of the existing options, based on the contributions of Ivan Illich’s circle, and to constitute a complete digital library of his work of general open access.
@@ -12,3 +15,14 @@ The library will consist of the books, their various versions in different langu
**If you want to reach us, please write to <info@acerv.us>**
+## Updates
+
+{{blog>en:blog?5&firstseconly&readmore}}
+
+<html>
+<style>
+::before {
+ display: none !important;
+}
+</style>
+</html>
diff --git a/platform/www/data/pages/es/blog/2021-11-01-the_origins.txt b/platform/www/data/pages/es/blog/2021-11-01-the_origins.txt
new file mode 100644
index 0000000..669954f
--- /dev/null
+++ b/platform/www/data/pages/es/blog/2021-11-01-the_origins.txt
@@ -0,0 +1,15 @@
+~~META:
+date created = 2021-11-01
+~~
+
+# Los orígenes del Proyecto Acervus
+
+A comienzos del año 2020, comenzamos a vislumbrar la necesidad de llevar adelante un esfuerzo intergeneracional para recuperar la obra de Ivan Illich. Pensamos en "recuperar" en un sentido amplio del término, no solo dar acceso, también volver inteligible y facilitar el navegar por las complejas capas de su pensamiento. Junto a Gustavo Esteva y Franco Augusto, comenzamos a esbozar la idea de dar acceso abierto, sin fines comerciales y de forma colaborativa a toda la obra de Ivan, empezando por los textos originales. Al comienzo denominamos informalmente a este esfuerzo como _"Illich's Archives"_.
+
+##
+
+En plena pandemia del COVID-19 intercambiamos correos con cientos de personas vinculadas a su obra, al CIDOC de Cuernavaca y rastreamos todos los rincones posibles de la red para confeccionar lo que comenzó a ser un enorme acervo digital de obras escritos por el mismísimo Iván, sus amigos y colaboradores. No solo dimos con textos, también con material sonoro, antiguos documentos oxidados por el tiempo y comenzamos a comprender que el nuestro sería un esfuerzo de varios años abocados a reconstruir un edificio intelectual disperso en varias ciudades del mundo.
+
+Al mismo tiempo, sabíamos que no se trataba solamente de un ejercicio archivística. Nuestra búsqueda, desde el comienzo, estuvo guiada por la necesidad de encontrar pistas que nos ayudaran a comprender el convulsionado presente, las luchas de los de abajo, la necesidad de inventar aquí y ahora salidas frente a las crisis civilizatorias. Nuestro proyecto sería como aquel cangrejo que buscaba avanzar con los ojos puestos fijamente en el pasado.
+
+Las ideas e hipótesis que avanzamos en este año se condensaron en un texto colectivo titulado _["Towards Illich's 'Legibility': Returning to Ivan through the Mirror of the Past"](https://journals.psu.edu/illichstudies/article/view/62315/61623)_, que fue publicado en el Vol. 7 No. 1 del _["The International Journal of Illich Studies"](https://journals.psu.edu/illichstudies)_.
diff --git a/platform/www/data/pages/es/blog/2022-02-09-cidoc_recovering_its_past_to_transform_our_present.txt b/platform/www/data/pages/es/blog/2022-02-09-cidoc_recovering_its_past_to_transform_our_present.txt
new file mode 100644
index 0000000..2da449c
--- /dev/null
+++ b/platform/www/data/pages/es/blog/2022-02-09-cidoc_recovering_its_past_to_transform_our_present.txt
@@ -0,0 +1,18 @@
+~~META:
+date created = 2022-02-09
+~~
+~~NOTOC~~
+
+
+# Centro Intercultural de Documentación de Cuernavaca: recuperar su pasado para transformar nuestro presente
+
+En esta primera actividad pública presentaremos la iniciativa para recuperar la historia, producción intelectual y memoria textual, visual y oral del Centro Intercultural de Cuernavaca (CIDOC), que tuviera existencia en los años 1966 y 1976 en México. Esta mítica institución operó como una suerte de "universidad alternativa" y fue el origen de reflexiones y producciones intelectuales que cambiaron para siempre la educación en América Latina y el mundo.
+
+##
+
+Allí tuvieron lugar una serie de diálogos, debates y escritos protagonizados por Ivan Illich, John Holt, Everett Reimer, Paul Goodman, Paulo Freire y otrxs tantxs teóricxs de la educación y el cambio social. El CIDOC tuvo un impacto decisivo en su tiempo y sus efectos llegan con fuerza a hasta nuestro días de formas que apenas ahora empezamos a comprender. Fue la cuna de una de serie de ideas revolucionarias que hoy, en el contexto global de la llamada "post-pandemia", cobran una relevancia inusitada: la desescolarización; la educación sin escuela; la pedagogía de la liberación; el decrecimiento; los límites al desarrollo; el ecosocialismo; la crítica a la medicina institucionalizada; la desprofesionalización; las tecnologías apropiables; el código abierto; el movimiento hacker; la decolonialidad; la convivencialidad; entre tantos otros, tienen en el CIDOC su marca de origen innegable.
+
+## Detalles
+
+* Fecha y tiempo: Miércoles 9 a las 4:30 pm (UTC)
+* Lugar: Virtual y presencial (Unitierra Oaxaca)
diff --git a/platform/www/data/pages/es/blog/2024-03-04-starting_acervus_progress_reports.txt b/platform/www/data/pages/es/blog/2024-03-04-starting_acervus_progress_reports.txt
new file mode 100644
index 0000000..16a8814
--- /dev/null
+++ b/platform/www/data/pages/es/blog/2024-03-04-starting_acervus_progress_reports.txt
@@ -0,0 +1,17 @@
+~~META:
+date created = 2024-03-05
+~~
+~~NOTOC~~
+
+
+# Comenzamos los Reportes de Progreso
+
+Con la intención de generar una comunicación mas fluida con los colaboradores y beneficiarios del Proyecto, hemos decidido empezar a publicar reportes regulares que resuman los progresos en las diferentes áreas de trabajo del proyecto.
+
+##
+
+Hasta ahora quienes hacemos el Proyecto Acervus hemos estado trabajando silenciosamente, abocados fuertemente a procesar y ordernar la enorme cantidad de material hemos recopilado. Seguimos avanzando en la recuperación de contenidos para las diferentes colecciones, abocados especialmente a la de Illich y la del CIDOC. Hemos accedido a nuevos artículos, entrevistas y grabaciones de audio. Siendo que ya tenemos un avance sustancial en la construcción del índice de fuentes, en las próximas semanas iremos publicando actualizaciones regulares con los avances que vayamos realizando. Esperamos que estas novedades se publiquen cada 2 semanas.
+
+En estos breves reportes pensamos compartir las nuevas adquisiciones, estado de las digitalizaciones, avances en el desarrollo de la plataforma web y otras cuestiones que consideremos valioso de informar a quienes siguen de cerca esta iniciativa colaborativa.
+
+Sin más que agregar, les compartimos el enlace para acceder al [[2024-03-05-apr_01|primer reporte]].
diff --git a/platform/www/data/pages/es/blog/2024-03-05-apr_01.txt b/platform/www/data/pages/es/blog/2024-03-05-apr_01.txt
new file mode 100644
index 0000000..b5d5010
--- /dev/null
+++ b/platform/www/data/pages/es/blog/2024-03-05-apr_01.txt
@@ -0,0 +1,39 @@
+~~META:
+date created = 2024-03-05
+~~
+~~NOTOC~~
+
+# Acervus Reporte de Progreso #01
+
+Este informe cubre las actualizaciones que han tenido lugar durante las dos últimas semanas (2024-02-20 to 2024-03-05).
+
+## Illich Acervus
+
+Hemos añadido los siguientes materiales a la pila de materiales por procesar:
+
+### Artículos
+
+* 1958 - The End of Human Life: an interpretation of Death as the Supreme Form of Prayer
+* 1960 - Problemas teológicos de Latino América
+* 1966 - Financial Aid for Latin America
+* 1969 - Between Jail and Campus: The Chaplain's Halfway House
+* 1969 - The need for counterfoil research
+* 1971 - The Alternative to Schooling; Extended Version
+* 1971 - Ivan Illich Challenges Education
+* 1971 - Look Out Practitioners
+* 1972 - A Convivial Society for Melanesia?
+* 1972 - Gradual change or violent revolution in Latin America?
+* 1972 - The illusion of unlimited health insurance
+* 1972 - Bibliografía Límites; agosto-septiembre de 1972
+* 1972 - Growth: myth and reality
+
+### Entrevistas
+
+* 1974 - On Growth: Interview with Ivan Illich
+
+### Audiovisuales
+
+* 1978 - The Art of Suffering
+* 1968 - Elspeth Chisholm visits Ivan Illich in Cuernavaca
+* 1968 - Elspeth Chisholm interviews Ivan Illich in Cuernavaca
+* 1969 - CBC Tuesday Night - Visit to Cuernavaca
diff --git a/platform/www/data/pages/es/blog/2024-03-20-apr_02.md b/platform/www/data/pages/es/blog/2024-03-20-apr_02.md
new file mode 100644
index 0000000..f9b64f2
--- /dev/null
+++ b/platform/www/data/pages/es/blog/2024-03-20-apr_02.md
@@ -0,0 +1,34 @@
+~~META:
+date created = 2024-03-20
+~~
+~~NOTOC~~
+
+# Acervus Progress Report #02
+
+This report covers the updates that took place during the last two weeks (2024-03-06 to 2024-03-20).
+
+## Illich Acervus
+
+We added the following source materials to the pile of materials to be processed:
+
+### Articles
+
+* 1973 - Energy and Equity: final draft
+* 1973 - Energie, Vitesse et Justice Sociale
+* 1974 - Energy and Equity
+* 1974 - Les coûts de l'education a vie
+* 1975 - Les enseignants sont-ils necessaires?
+* 1975 - Le piège de l'école à vie
+* 1976 - Imprisoned in the Global Classroom
+* 1976 - Bibliographical Supplement To: Medical Nemesis, Pantheon, 1976 & Limits To Medicine, Boyars, 1976
+* 1976 - Disabling Professions: notes for a lecture
+* 1977 - Useful Unemployment and its Professional Enemies
+* 1977 - L’incompétence spécialisée
+* 1978 - Introducción a "Lo inverso de la salud administrada" de Valentina Borremans
+* 1979 - Von ende des entwicklungsverhabens
+* 1979 - Allocution prononcée lors de la séance de clôture du Colloque International sur l'Informatique et la Société
+
+### Audiovisuals
+
+* 1970 - Ivan Illich at conference called Milieu 70 held in Winnipeg
+* 1971 - The Institutionalization of Truth
diff --git a/platform/www/data/pages/es/blog/2024-04-05-apr_03.md b/platform/www/data/pages/es/blog/2024-04-05-apr_03.md
new file mode 100644
index 0000000..9cb5cf1
--- /dev/null
+++ b/platform/www/data/pages/es/blog/2024-04-05-apr_03.md
@@ -0,0 +1,30 @@
+~~META:
+date created = 2024-04-05
+~~
+~~NOTOC~~
+
+# Acervus Progress Report #03
+
+This report covers the updates that took place during the last two weeks (2024-03-21 to 2024-04-05).
+
+## Illich Acervus
+
+We added the following source materials to the pile of materials to be processed:
+
+### Articles
+
+* 1980 - Alternativas del desarrollo
+* 1980 - Salud y calidad de vida
+* 1980 - Shadow-Work, a draft
+* 1980 - Vernacular Virtue
+* 1980 - Erziehung für ein leben im 7? Stock? Danke, nein!
+* 1981 - Vernacular Gender
+* 1982 - The Right to Dignified Silence
+* 1983 - Dank as die Gastfreunde
+* 1983 - La reivindicación de la casa
+* 1984 - La salud y la calidad de vida en la escasez
+* 1984 - El hedor de la ciudad y sus aguas
+
+### Audiovisuals
+
+* 1971 - Balance and Biosphere
diff --git a/platform/www/data/pages/es/blog/2024-04-20-apr_04.md b/platform/www/data/pages/es/blog/2024-04-20-apr_04.md
new file mode 100644
index 0000000..1a36407
--- /dev/null
+++ b/platform/www/data/pages/es/blog/2024-04-20-apr_04.md
@@ -0,0 +1,31 @@
+~~META:
+date created = 2024-04-20
+~~
+~~NOTOC~~
+
+# Acervus Progress Report #04
+
+This report covers the updates that took place during the last two weeks (2024-04-06 to 2024-04-20).
+
+## Illich Acervus
+
+We added the following source materials to the pile of materials to be processed:
+
+### Articles
+
+* 1984 - Newspeak and uniquack in 1984
+* 1984 - Phaidros
+* 1985 - Tecnológica verde
+* 1985 - La búsqueda de nuevos commons
+* 1985 - Pilgernder und kriegender Individualismus
+* 1985 - Hacia una historia de las necesidades
+* 1985 - Development: metaphor, myth, threat
+* 1986 - My Affair with Education
+* 1987 - Reflections on Jaques Ellul, La subversion du christianisme
+* 1992 - Reading the Intangible
+* 1992 - Lectio divina
+
+### Audiovisuals
+
+* 1971 - Ivan Illich Challenges Education
+* 1972 - Ideas. The Law and Society
diff --git a/platform/www/data/pages/es/index.txt b/platform/www/data/pages/es/index.txt
new file mode 100644
index 0000000..f0572c6
--- /dev/null
+++ b/platform/www/data/pages/es/index.txt
@@ -0,0 +1,28 @@
+~~NOTOC~~
+
+# El Proyecto Acervus
+
+**Una recuperación colectiva de las obras de pensadores y activistas surgidos de la constelación de convivencia en torno a Ivan Illich**
+
+
+La iniciativa tiene un doble propósito: contribuir a la comprensión de la crítica condición actual y al análisis y debate de las opciones existentes, a partir de las aportaciones del círculo de Ivan Illich, y constituir una completa biblioteca digital de su obra de acceso abierto general.
+
+La iniciativa pretende constituir un acervo digital de diferentes autores como Ivan Illich, Jean Robert, Gustavo Esteva y otros. Todo el material se presentará en una plataforma digital especialmente diseñada para facilitar su acceso, referenciación, lectura en diferentes soportes/formatos y reedición en papel por grupos independientes sin ánimo de lucro.
+
+Este espacio virtual se desarrollará utilizando tecnologías de código abierto orientadas a la colaboración, la autopublicación descentralizada y la interacción con los contenidos de diversas formas. Esto permitirá consolidar una fuente fiable, legible y duradera que permitirá acceder a cada obra así como referirse a porciones y extractos específicos.
+
+La biblioteca estará compuesta por los libros, sus diversas versiones en distintos idiomas (identificando si son traducciones directas de otras versiones), recopilaciones, artículos, entrevistas, grabaciones de audio y vídeo. Será una plataforma de publicación dinámica y colaborativa.
+
+**Si desea ponerse en contacto con nosotros, escriba a <info@acerv.us>**
+
+## Novedades
+
+{{blog>es:blog?5&firstseconly&readmore}}
+
+<html>
+<style>
+::before {
+ display: none !important;
+}
+</style>
+</html>
diff --git a/platform/www/data/pages/fr/index.txt b/platform/www/data/pages/fr/index.txt
new file mode 100644
index 0000000..fe0a0c7
--- /dev/null
+++ b/platform/www/data/pages/fr/index.txt
@@ -0,0 +1,28 @@
+~~NOTOC~~
+
+# Le projet Acervus
+
+**Une récupération collective des travaux de penseurs et d'activistes qui ont émergé de la constellation de convivialité autour d'Ivan Illich**.
+
+
+L'initiative a un double objectif : contribuer à la compréhension de la condition critique actuelle et à l'analyse et au débat des options existantes, sur la base des contributions du cercle d'Ivan Illich, et constituer une bibliothèque numérique complète de son œuvre en libre accès.
+
+L'initiative vise à constituer un acervus numérique de différents auteurs comme Ivan Illich, Jean Robert, Gustavo Esteva et d'autres. Tout le matériel sera présenté sur une plateforme numérique spécialement conçue pour faciliter l'accès, le référencement, la lecture sur différents supports/formats et la réédition sur papier par des groupes indépendants à but non lucratif.
+
+Cet espace virtuel sera développé à l'aide de technologies open source orientées vers la collaboration, l'auto-publication décentralisée et l'interaction avec le contenu de diverses manières. Il sera ainsi possible de consolider une source fiable, lisible et durable qui permettra d'accéder à chaque ouvrage et de se référer à des parties et des extraits spécifiques.
+
+La bibliothèque comprendra les livres, leurs différentes versions dans différentes langues (en identifiant s'il s'agit de traductions directes d'autres versions), des compilations, des articles, des interviews, des enregistrements audio et vidéo. Il s'agira d'une plateforme de publication dynamique et collaborative.
+
+**Si vous souhaitez nous contacter, écrivez-nous à <info@acerv.us>***.
+
+## Mises à jour
+
+{{blog>fr:blog?5&firstseconly&readmore}}
+
+<html>
+<style>
+::before {
+ display : none !important ;
+}
+</style>
+</html>
diff --git a/platform/www/data/pages/it/index.txt b/platform/www/data/pages/it/index.txt
new file mode 100644
index 0000000..e251332
--- /dev/null
+++ b/platform/www/data/pages/it/index.txt
@@ -0,0 +1,28 @@
+~~NOTOC~~
+
+# Il Progetto Acervus
+
+**Recupero collettivo delle opere di pensatori e attivisti emerse dalla costellazione di convivialità intorno a Ivan Illich**
+
+
+L'iniziativa ha un duplice scopo: contribuire alla comprensione della condizione critica attuale e all'analisi e al dibattito delle opzioni esistenti, sulla base dei contributi della cerchia di Ivan Illich, e costituire una biblioteca digitale completa della sua opera di libero accesso.
+
+L'iniziativa mira a costituire un acervus digitale di diversi autori come Ivan Illich, Jean Robert, Gustavo Esteva e altri. Tutto il materiale sarà presentato in una piattaforma digitale appositamente progettata per un facile accesso, consultazione, lettura in diversi supporti/formati e riedizione cartacea da parte di gruppi indipendenti senza scopo di lucro.
+
+Questo spazio virtuale sarà sviluppato utilizzando tecnologie open source orientate alla collaborazione, all'autopubblicazione decentralizzata e all'interazione con i contenuti in una serie di modi diversi. Ciò consentirà di consolidare una fonte affidabile, leggibile e duratura che permetterà di accedere a ogni opera e di fare riferimento a porzioni ed estratti specifici.
+
+La biblioteca sarà costituita dai libri, dalle loro varie versioni in diverse lingue (identificando se si tratta di traduzioni dirette di altre versioni), da compilazioni, articoli, interviste, registrazioni audio e video. Sarà una piattaforma editoriale dinamica e collaborativa.
+
+**Se volete contattarci, scrivete a <info@acerv.us>**
+
+## Aggiornamenti
+
+{{blog>it:blog?5&firstseconly&readmore}}
+
+<html>
+<style>
+::before {
+ display: none !important;
+}
+</style>
+</html>
diff --git a/platform/www/data/pages/pt/index.txt b/platform/www/data/pages/pt/index.txt
new file mode 100644
index 0000000..96d2d89
--- /dev/null
+++ b/platform/www/data/pages/pt/index.txt
@@ -0,0 +1,28 @@
+~~NOTOC~~
+
+# O Projeto Acervus
+
+**Uma recuperação colectiva das obras de pensadores e activistas que emergiram da constelação de convívio em torno de Ivan Illich**
+
+
+A iniciativa tem um duplo objetivo: contribuir para a compreensão da condição crítica atual e para a análise e debate das opções existentes, com base nos contributos do círculo de Ivan Illich, e constituir uma biblioteca digital completa da sua obra de acesso aberto geral.
+
+A iniciativa pretende constituir um acervo digital de diferentes autores como Ivan Illich, Jean Robert, Gustavo Esteva e outros. Todo o material será apresentado numa plataforma digital especialmente concebida para facilitar o acesso, a referenciação, a leitura em diferentes suportes/formatos e a reedição em papel por grupos independentes sem fins lucrativos.
+
+Este espaço virtual será desenvolvido com recurso a tecnologias open source orientadas para a colaboração, auto-publicação descentralizada e interação com os conteúdos de diversas formas. Isto permitirá consolidar uma fonte fiável, legível e duradoura que permitirá o acesso a cada obra, bem como a referência a partes e extractos específicos.
+
+A biblioteca será constituída pelos livros, as suas várias versões em diferentes línguas (identificando se são traduções directas de outras versões), compilações, artigos, entrevistas, gravações áudio e vídeo. Será uma plataforma de publicação dinâmica e colaborativa.
+
+**Se quiser contactar-nos, por favor escreva para <info@acerv.us>**
+
+## Actualizações
+
+{{blog>pt:blog?5&firstseconly&readmore}}
+
+<html>
+<style>
+::before {
+ display: none !important;
+}
+</style>
+</html>
diff --git a/platform/www/lib/plugins/blog/action.php b/platform/www/lib/plugins/blog/action.php
index 61ffd9e..2328399 100644
--- a/platform/www/lib/plugins/blog/action.php
+++ b/platform/www/lib/plugins/blog/action.php
@@ -88,8 +88,7 @@ class action_plugin_blog extends DokuWiki_Action_Plugin {
global $ID, $INFO;
$ns = cleanID($_REQUEST['ns']);
- $title = str_replace(':', '', $_REQUEST['title']);
- $ID = $this->_newEntryID($ns, $title);
+ $ID = $this->_newEntryID($ns, $_REQUEST['title']);
$INFO = pageinfo();
// check if we are allowed to create this file
@@ -210,6 +209,7 @@ class action_plugin_blog extends DokuWiki_Action_Plugin {
);
}
$pre = strftime($dateprefix);
+ $title = str_replace([':', ';', '#', '&', '%', '/', '\\', '?'], '', $title);
return cleanID(($ns ? $ns.':' : '').$pre.$title);
}
diff --git a/platform/www/lib/plugins/blog/helper.php b/platform/www/lib/plugins/blog/helper.php
index 9dd8b9a..f29dc7b 100644
--- a/platform/www/lib/plugins/blog/helper.php
+++ b/platform/www/lib/plugins/blog/helper.php
@@ -70,7 +70,7 @@ class helper_plugin_blog extends DokuWiki_Plugin {
// skip drafts unless for users with create priviledge
$meta = p_get_metadata($id, '', false);
- $draft = ($meta['type'] == 'draft');
+ $draft = isset($meta['type']) && ($meta['type'] == 'draft');
if ($draft && ($perm < AUTH_CREATE)) continue;
// filter by author
diff --git a/platform/www/lib/plugins/blog/lang/ca/lang.php b/platform/www/lib/plugins/blog/lang/ca/lang.php
new file mode 100644
index 0000000..9acf319
--- /dev/null
+++ b/platform/www/lib/plugins/blog/lang/ca/lang.php
@@ -0,0 +1,30 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Marc Zulet <marczulet@gmail.com>
+ */
+$lang['blog'] = 'Bloc';
+$lang['older'] = 'Entrades anteriors';
+$lang['newer'] = 'Entrades noves';
+$lang['newentry'] = 'Nova entrada al bloc:';
+$lang['missing_includeplugin'] = 'El plugin Include ha d\'estar instal·lat perquè el bloc funcioni correctament.';
+$lang['missing_pagelistplugin'] = 'El plugin Pagelist ha d\'estar instal·lat perquè funcionin els llistats d\'arxiu.';
+$lang['missing_tagplugin'] = 'El plugin Tag ha d\'estar instal·lat perquè funcionin les etiquetes.';
+$lang['autoarchive'] = '%1$d Publicació(ns) de %2$s %3$s';
+$lang['month_01'] = 'Gener';
+$lang['month_02'] = 'Febrer';
+$lang['month_03'] = 'Març';
+$lang['month_04'] = 'Abril';
+$lang['month_05'] = 'Maig';
+$lang['month_06'] = 'Juny';
+$lang['month_07'] = 'Juliol';
+$lang['month_08'] = 'Agost';
+$lang['month_09'] = 'Setembre';
+$lang['month_10'] = 'Octubre';
+$lang['month_11'] = 'Novembre';
+$lang['month_12'] = 'Desembre';
+$lang['entries'] = 'entrades';
+$lang['entry'] = 'entrada';
+$lang['archive_title'] = 'Històric';
diff --git a/platform/www/lib/plugins/blog/lang/ca/settings.php b/platform/www/lib/plugins/blog/lang/ca/settings.php
new file mode 100644
index 0000000..0f9a49d
--- /dev/null
+++ b/platform/www/lib/plugins/blog/lang/ca/settings.php
@@ -0,0 +1,27 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Marc Zulet <marczulet@gmail.com>
+ */
+$lang['namespace'] = 'namespace predeterminat per al bloc';
+$lang['formposition'] = 'posició del formulari de nova entrada';
+$lang['formposition_o_top'] = 'amunt';
+$lang['formposition_o_bottom'] = 'avall';
+$lang['formposition_o_none'] = 'cap';
+$lang['newentrytitle'] = 'títol del formulari de nova entrada';
+$lang['dateprefix'] = 'afegir un prefix de data a les publicacions noves';
+$lang['sortkey'] = 'ordenar entrades per';
+$lang['sortkey_o_cdate'] = 'data de creació';
+$lang['sortkey_o_mdate'] = 'data de modificació';
+$lang['sortkey_o_pagename'] = 'nom de la pàgina';
+$lang['sortkey_o_id'] = 'ID de la pàgina';
+$lang['sortkey_o_title'] = 'títol';
+$lang['sortorder'] = 'ordre';
+$lang['sortorder_o_ascending'] = 'ascendent';
+$lang['sortorder_o_descending'] = 'descendent';
+$lang['excluded_pages'] = 'exclou determinades pàgines de la llista de blocs (es requereix una expressió regular)';
+$lang['showhistogram'] = 'Mostra l\'histograma en la representació de l\'arxiu';
+$lang['max_months'] = 'Màxim de mesos per mostrar a l\'histograma';
+$lang['histogram_height'] = 'Alçada de l\'histograma (en píxels)';
diff --git a/platform/www/lib/plugins/blog/lang/es/lang.php b/platform/www/lib/plugins/blog/lang/es/lang.php
index 68ef65a..6eba94a 100644
--- a/platform/www/lib/plugins/blog/lang/es/lang.php
+++ b/platform/www/lib/plugins/blog/lang/es/lang.php
@@ -2,8 +2,9 @@
/**
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
- *
- * @author Herman Fabián Sandoval Manrique <hfsandovalm@emzac.com>
+ *
+ * @author Marc Zulet <marczulet@gmail.com>
+ * @author Herman Fabián Sandoval Manrique <hfsandovalm@emzac.com>
* @author r0sk <r0sk10@gmail.com>
*/
$lang['blog'] = 'Blog';
@@ -13,6 +14,7 @@ $lang['newentry'] = 'Nueva entrada en el blog:';
$lang['missing_includeplugin'] = 'El plugin Include debe estar instalado para que el blog funcione.';
$lang['missing_pagelistplugin'] = 'El plugin Pagelist debe estar instalado para que funcionen los listados de archivo.';
$lang['missing_tagplugin'] = 'El plugin Tag debe estar instalado para que funcionen los tags.';
+$lang['autoarchive'] = '%1$d Entrada(s) de %2$s %3$s';
$lang['month_01'] = 'Enero';
$lang['month_02'] = 'Febrero';
$lang['month_03'] = 'Marzo';
diff --git a/platform/www/lib/plugins/blog/lang/es/settings.php b/platform/www/lib/plugins/blog/lang/es/settings.php
index d86f15a..05d62f0 100644
--- a/platform/www/lib/plugins/blog/lang/es/settings.php
+++ b/platform/www/lib/plugins/blog/lang/es/settings.php
@@ -2,8 +2,9 @@
/**
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
- *
- * @author Herman Fabián Sandoval Manrique <hfsandovalm@emzac.com>
+ *
+ * @author Marc Zulet <marczulet@gmail.com>
+ * @author Herman Fabián Sandoval Manrique <hfsandovalm@emzac.com>
* @author r0sk <r0sk10@gmail.com>
*/
$lang['namespace'] = 'namespace predeterminado para el blog';
@@ -12,6 +13,7 @@ $lang['formposition_o_top'] = 'arriba';
$lang['formposition_o_bottom'] = 'abajo';
$lang['formposition_o_none'] = 'ninguna';
$lang['newentrytitle'] = 'título del formulario de nueva entrada';
+$lang['dateprefix'] = 'prefijar la fecha a los ID de entradas nuevas';
$lang['sortkey'] = 'ordenar entradas por';
$lang['sortkey_o_cdate'] = 'fecha de creación';
$lang['sortkey_o_mdate'] = 'fecha de modificación';
@@ -21,3 +23,7 @@ $lang['sortkey_o_title'] = 'título';
$lang['sortorder'] = 'ordenamiento';
$lang['sortorder_o_ascending'] = 'ascendente';
$lang['sortorder_o_descending'] = 'descendente';
+$lang['excluded_pages'] = 'excluir ciertas páginas de la lista de blogs (se requiere una expresión regular)';
+$lang['showhistogram'] = 'Mostrar histograma en la página del archivo';
+$lang['max_months'] = 'Máximo de meses para mostrar en el histograma';
+$lang['histogram_height'] = 'Altura del histograma (en píxeles)';
diff --git a/platform/www/lib/plugins/blog/lang/pt-br/lang.php b/platform/www/lib/plugins/blog/lang/pt-br/lang.php
index bd219ba..a163727 100644
--- a/platform/www/lib/plugins/blog/lang/pt-br/lang.php
+++ b/platform/www/lib/plugins/blog/lang/pt-br/lang.php
@@ -3,6 +3,7 @@
/**
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
*
+ * @author Felipo Antonoff <contato@codemarket.com.br>
* @author Flávio Roberto Santos <flavio.barata@gmail.com>
* @author Samory Pereira Santos <samory.santos@gmail.com>
*/
@@ -13,6 +14,7 @@ $lang['newentry'] = 'Novo registro do blog:';
$lang['missing_includeplugin'] = 'O plugin Inlude deve estar instalado para que o blog funcione.';
$lang['missing_pagelistplugin'] = 'O plugin Pagelist deve estar instalado para que a listagem de arquivo funcione,';
$lang['missing_tagplugin'] = 'O plugin Tag deve estar instalado para usar refinamentos de etiquetagem.';
+$lang['autoarchive'] = '%1$d Postagem(s) para %2$s %3$s';
$lang['month_01'] = 'Janeiro';
$lang['month_02'] = 'Fevereiro';
$lang['month_03'] = 'Março';
diff --git a/platform/www/lib/plugins/blog/lang/vi/lang.php b/platform/www/lib/plugins/blog/lang/vi/lang.php
new file mode 100644
index 0000000..a397709
--- /dev/null
+++ b/platform/www/lib/plugins/blog/lang/vi/lang.php
@@ -0,0 +1,30 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Minh <phandinhminh@protonmail.ch>
+ */
+$lang['blog'] = 'Blog';
+$lang['older'] = 'Những bài viết cũ hơn';
+$lang['newer'] = 'Những bài viết mới hơn';
+$lang['newentry'] = 'Mục blog mới:';
+$lang['missing_includeplugin'] = 'Tiện ích Plugin \'Bao gồm\' phải được cài đặt để blog hoạt động.';
+$lang['missing_pagelistplugin'] = 'Tiện ích Plugin \'Danh sách trang\' phải được cài đặt để danh sách lưu trữ hoạt động.';
+$lang['missing_tagplugin'] = 'Tiện ích Plugin \'Tag\' phải được cài đặt để sử dụng sàng lọc Tag.';
+$lang['autoarchive'] = '%1$d (các) bài đăng cho %2$s %3$s';
+$lang['month_01'] = 'Tháng Một';
+$lang['month_02'] = 'Tháng Hai';
+$lang['month_03'] = 'Tháng Ba';
+$lang['month_04'] = 'Tháng Tư';
+$lang['month_05'] = 'Tháng Năm';
+$lang['month_06'] = 'Tháng Sáu';
+$lang['month_07'] = 'Tháng Bảy';
+$lang['month_08'] = 'Tháng Tám';
+$lang['month_09'] = 'Tháng Chín';
+$lang['month_10'] = 'Tháng Mười';
+$lang['month_11'] = 'Tháng Mười Một';
+$lang['month_12'] = 'Tháng Mười Hai';
+$lang['entries'] = 'các mục bài viết';
+$lang['entry'] = 'nhập';
+$lang['archive_title'] = 'Lịch sử Blog';
diff --git a/platform/www/lib/plugins/blog/lang/vi/settings.php b/platform/www/lib/plugins/blog/lang/vi/settings.php
new file mode 100644
index 0000000..a0b7d49
--- /dev/null
+++ b/platform/www/lib/plugins/blog/lang/vi/settings.php
@@ -0,0 +1,27 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Minh <phandinhminh@protonmail.ch>
+ */
+$lang['namespace'] = 'không gian tên namespace mặc định cho blog';
+$lang['formposition'] = 'vị trí của mẫu nhập mới';
+$lang['formposition_o_top'] = 'đầu';
+$lang['formposition_o_bottom'] = 'cuối';
+$lang['formposition_o_none'] = 'trống';
+$lang['newentrytitle'] = 'tiêu đề của mẫu nhập mới';
+$lang['dateprefix'] = 'ngày tiền tố cho ID mục nhập mới';
+$lang['sortkey'] = 'sắp xếp các bài đăng blog theo';
+$lang['sortkey_o_cdate'] = 'ngày tạo';
+$lang['sortkey_o_mdate'] = 'ngày chỉnh sửa';
+$lang['sortkey_o_pagename'] = 'tên trang';
+$lang['sortkey_o_id'] = 'ID trang';
+$lang['sortkey_o_title'] = 'tiêu đề';
+$lang['sortorder'] = 'sắp xếp vị trí';
+$lang['sortorder_o_ascending'] = 'tăng dần';
+$lang['sortorder_o_descending'] = 'giảm dần';
+$lang['excluded_pages'] = 'loại trừ một số trang nhất định khỏi danh sách blog (yêu cầu diễn đạt thông thường)';
+$lang['showhistogram'] = 'Hiển thị biểu đồ trên báo cáo kết xuất lưu trữ';
+$lang['max_months'] = 'Số tháng tối đa để hiển thị trong biểu đồ';
+$lang['histogram_height'] = 'Chiều cao của biểu đồ (tính bằng pixel)';
diff --git a/platform/www/lib/plugins/blog/manager.dat b/platform/www/lib/plugins/blog/manager.dat
deleted file mode 100644
index 1eadc20..0000000
--- a/platform/www/lib/plugins/blog/manager.dat
+++ /dev/null
@@ -1,2 +0,0 @@
-downloadurl=https://github.com/dokufreaks/plugin-blog/archive/master.zip
-installed=Sat, 19 Mar 2022 15:05:39 +0000
diff --git a/platform/www/lib/plugins/blog/plugin.info.txt b/platform/www/lib/plugins/blog/plugin.info.txt
index 73bd83c..8f35668 100644
--- a/platform/www/lib/plugins/blog/plugin.info.txt
+++ b/platform/www/lib/plugins/blog/plugin.info.txt
@@ -2,7 +2,7 @@
base blog
author Michael Hamann, Michael Klier, Gina Haeussge
email michael@content-space.de
-date 2022-02-20
+date 2023-01-12
name Blog
desc Use DokuWiki as blogging tool. (previous authors: Esther Brunner)
url https://www.dokuwiki.org/plugin:blog
diff --git a/platform/www/lib/plugins/blog/syntax/blog.php b/platform/www/lib/plugins/blog/syntax/blog.php
index 2ca56d8..10ab45d 100644
--- a/platform/www/lib/plugins/blog/syntax/blog.php
+++ b/platform/www/lib/plugins/blog/syntax/blog.php
@@ -22,11 +22,11 @@ class syntax_plugin_blog_blog extends DokuWiki_Syntax_Plugin {
global $ID;
$match = substr($match, 7, -2); // strip {{blog> from start and }} from end
- list($match, $flags) = explode('&', $match, 2);
+ list($match, $flags) = array_pad(explode('&', $match, 2), 2, null);
$flags = explode('&', $flags);
array_unshift($flags, 'link'); // always make the first header of a blog entry a permalink (unless nolink is set)
- list($match, $refine) = explode(' ', $match, 2);
- list($ns, $num) = explode('?', $match, 2);
+ list($match, $refine) = array_pad(explode(' ', $match, 2), 2, null);
+ list($ns, $num) = array_pad(explode('?', $match, 2), 2, null);
if (!is_numeric($num)) {
if (is_numeric($ns)) {
@@ -46,9 +46,11 @@ class syntax_plugin_blog_blog extends DokuWiki_Syntax_Plugin {
}
function render($mode, Doku_Renderer $renderer, $data) {
+ global $INPUT;
+
list($ns, $num, $flags, $refine) = $data;
- $first = $_REQUEST['first'];
+ $first = $INPUT->int('first');
if (!is_numeric($first)) $first = 0;
// get the blog entries for our namespace
@@ -114,16 +116,24 @@ class syntax_plugin_blog_blog extends DokuWiki_Syntax_Plugin {
// close current section
if ($clevel && !$include_flags['inline']) $renderer->doc .= '</div>'.DOKU_LF;
- $renderer->doc .= '<div class="hfeed">'.DOKU_LF;
+ $renderer->doc .= '<div class="bloglist hfeed">'.DOKU_LF;
+
+
}
// now include the blog entries
foreach ($entries as $entry) {
if ($mode == 'xhtml' || $mode == 'code') {
- if(auth_quickaclcheck($entry['id']) >= AUTH_READ) {
- // prevent blog include loops
- if(!$this->included_pages[$entry['id']]) {
+ if(isset($entry['id']) && (auth_quickaclcheck($entry['id']) >= AUTH_READ)) {
+ // prevent blog include loop
+
+ // hack to disply formated dates per blog post
+ $d = strftime("%d", $entry['date']);
+ $m = strftime("%m", $entry['date']);
+ $y = strftime("%Y", $entry['date']);
+ $renderer->doc .= "<div class='date-frontpage date'><div class='date-dm'>$d/$m</div><div class='date-y'>$y</div>";
+ if(!array_key_exists($entry['id'], $this->included_pages) || !$this->included_pages[$entry['id']]) {
$this->included_pages[$entry['id']] = true;
$renderer->nest($include->_get_instructions($entry['id'], '', 'page', $clevel, $include_flags));
$this->included_pages[$entry['id']] = false;
diff --git a/platform/www/lib/plugins/include/.github/workflows/phpTestLinux.yml b/platform/www/lib/plugins/include/.github/workflows/phpTestLinux.yml
new file mode 100644
index 0000000..d76e2a9
--- /dev/null
+++ b/platform/www/lib/plugins/include/.github/workflows/phpTestLinux.yml
@@ -0,0 +1,52 @@
+name: PHP Tests on Linux
+
+on: [push, pull_request]
+
+jobs:
+ testLinux:
+ name: PHP ${{ matrix.php-versions }} DokuWiki ${{ matrix.dokuwiki-branch }}
+ runs-on: ubuntu-latest
+ if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
+
+ strategy:
+ matrix:
+ php-versions: ['7.2', '7.3', '7.4', '8.0']
+ dokuwiki-branch: [ 'master', 'stable']
+ exclude:
+ - dokuwiki-branch: 'stable'
+ php-versions: '8.0'
+ fail-fast: false
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+
+ - name: Setup PHP
+ uses: shivammathur/setup-php@v2
+ with:
+ php-version: ${{ matrix.php-versions }}
+ extensions: mbstring, intl, PDO, pdo_sqlite, bz2
+
+ - name: Setup problem matchers
+ run: |
+ echo ::add-matcher::${{ runner.tool_cache }}/php.json
+ echo ::add-matcher::${{ runner.tool_cache }}/phpunit.json
+
+ - name: Download DokuWiki Test-setup
+ run: wget https://raw.github.com/splitbrain/dokuwiki-travis/master/travis.sh
+
+ - name: Run DokuWiki Test-setup
+ env:
+ CI_SERVER: 1
+ DOKUWIKI: ${{ matrix.dokuwiki-branch }}
+ run: sh travis.sh
+
+ - name: Setup PHPUnit
+ run: |
+ php _test/fetchphpunit.php
+ cd _test
+
+ - name: Run PHPUnit
+ run: |
+ cd _test
+ php phpunit.phar --verbose --stderr --group plugin_include
diff --git a/platform/www/lib/plugins/include/COPYING b/platform/www/lib/plugins/include/COPYING
new file mode 100644
index 0000000..d60c31a
--- /dev/null
+++ b/platform/www/lib/plugins/include/COPYING
@@ -0,0 +1,340 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/platform/www/lib/plugins/include/README b/platform/www/lib/plugins/include/README
new file mode 100644
index 0000000..0fb6119
--- /dev/null
+++ b/platform/www/lib/plugins/include/README
@@ -0,0 +1,11 @@
+====== Include Plugin for DokuWiki ======
+
+All documentation for the Include Plugin is available online at:
+
+ * http://dokuwiki.org/plugin:include
+
+(c) 2005 - 2007 by Esther Brunner <wikidesign@gmail.com> and Christopher
+Smith <chris@jalakai.co.uk>
+(c) 2008 - 2009 by Gina Häußge, Michael Klier <dokuwiki@chimeric.de>
+(c) 2010 - 2012 by Michael Hamann <michael@content-space.de>, Gina Häußge and Michael Klier <dokuwiki@chimeric.de>
+See COPYING for license info.
diff --git a/platform/www/lib/plugins/include/_test/locallink_conversion.test.php b/platform/www/lib/plugins/include/_test/locallink_conversion.test.php
new file mode 100644
index 0000000..e4c95a3
--- /dev/null
+++ b/platform/www/lib/plugins/include/_test/locallink_conversion.test.php
@@ -0,0 +1,42 @@
+<?php
+
+if (!defined('DOKU_INC')) die();
+
+/**
+ * Test the conversion of local links to internal links if the page hasn't been fully included
+ *
+ * @group plugin_include
+ * @group plugins
+ */
+class plugin_include_locallink_conversion_test extends DokuWikiTest {
+ /** @var helper_plugin_include $helper */
+ private $helper;
+
+ public function setUp() : void
+ {
+ $this->pluginsEnabled[] = 'include';
+ parent::setUp();
+
+ $this->helper = plugin_load('helper', 'include');
+
+ saveWikiText('included', 'Example content with link [[#jump]]', 'Test setup');
+ idx_addPage('test:included');
+
+ saveWikiText('test:includefull', '{{page>..:included}}', 'Test setup');
+ idx_addPage('test:includefull');
+
+ saveWikiText('test:includefirst', '{{page>..:included&firstseconly}}', 'Test setup');
+ idx_addPage('test:includefirst');
+ }
+
+ public function testLocalConverted() {
+ $html = p_wiki_xhtml('test:includefirst');
+ $this->assertContains('href="'.wl('included').'#jump"', $html);
+ $this->assertNotContains('href="#jump"', $html);
+ }
+
+ public function testLocalExistsIfIncluded() {
+ $html = p_wiki_xhtml('test:includefull');
+ $this->assertContains('href="#jump"', $html);
+ }
+}
diff --git a/platform/www/lib/plugins/include/_test/media_linktitle_conversion.test.php b/platform/www/lib/plugins/include/_test/media_linktitle_conversion.test.php
new file mode 100644
index 0000000..ea7787f
--- /dev/null
+++ b/platform/www/lib/plugins/include/_test/media_linktitle_conversion.test.php
@@ -0,0 +1,54 @@
+<?php
+
+if (!defined('DOKU_INC')) die();
+
+/**
+ * Test the conversion of media references in link titles
+ *
+ * @group plugin_include
+ * @group plugins
+ */
+class plugin_include_media_linktitle_conversion_test extends DokuWikiTest {
+ /** @var helper_plugin_include $helper */
+ private $helper;
+
+ public function setUp() : void
+ {
+ $this->pluginsEnabled[] = 'include';
+ parent::setUp();
+
+ $this->helper = plugin_load('helper', 'include');
+
+ saveWikiText('wiki:included', <<<EOF
+ * [[test|{{dokuwiki.png}}]]
+ * [[#test|{{dokuwiki.png?w=200}}]]
+ * [[doku>test|{{dokuwiki.png?w=300}}]]
+ * [[test|{{https://www.dokuwiki.org/lib/tpl/dokuwiki/images/logo.png}}]]
+EOF
+ , 'Test setup');
+ idx_addPage('wiki:included');
+
+ saveWikiText('test:include', '{{page>..:wiki:included}}', 'Test setup');
+ idx_addPage('test:include');
+ }
+
+ public function testInternalLinkTitleConversion() {
+ $html = p_wiki_xhtml('test:include');
+ $this->assertContains('src="'.ml('wiki:dokuwiki.png').'"', $html);
+ }
+
+ public function testLocalLinkTitleConversion() {
+ $html = p_wiki_xhtml('test:include');
+ $this->assertContains('src="'.ml('wiki:dokuwiki.png', array('w' => '200')).'"', $html);
+ }
+
+ public function testInterWikiLinkTitleConversion() {
+ $html = p_wiki_xhtml('test:include');
+ $this->assertContains('src="'.ml('wiki:dokuwiki.png', array('w' => '300')).'"', $html);
+ }
+
+ public function testExternalMediaNotConverted() {
+ $html = p_wiki_xhtml('test:include');
+ $this->assertContains('src="'.ml('https://www.dokuwiki.org/lib/tpl/dokuwiki/images/logo.png').'"', $html);
+ }
+}
diff --git a/platform/www/lib/plugins/include/_test/namespace_includes.test.php b/platform/www/lib/plugins/include/_test/namespace_includes.test.php
new file mode 100644
index 0000000..1da3234
--- /dev/null
+++ b/platform/www/lib/plugins/include/_test/namespace_includes.test.php
@@ -0,0 +1,182 @@
+<?php
+
+if (!defined('DOKU_INC')) die();
+
+/**
+ * Test namespace includes
+ *
+ * @group plugin_include
+ * @group plugins
+ */
+class plugin_include_namespaces_includes_test extends DokuWikiTest {
+ /**
+ * @var helper_plugin_include $helper
+ */
+ private $helper;
+
+ /**
+ * Setup - enable and load the include plugin and create the test pages
+ */
+ public function setUp() : void
+ {
+ $this->pluginsEnabled[] = 'include';
+ parent::setUp(); // this enables the include plugin
+ $this->helper = plugin_load('helper', 'include');
+
+ global $conf;
+ $conf['hidepages'] = 'inclhidden:hidden';
+
+ // for testing hidden pages
+ saveWikiText('inclhidden:hidden', 'Hidden page', 'Created hidden page');
+ saveWikiText('inclhidden:visible', 'Visible page', 'Created visible page');
+
+ // pages on different levels
+ saveWikiText('incltest:level1', 'Page on level 1', 'Created page on level 1');
+ saveWikiText('incltest:ns:level2', 'Page on level 2', 'Created page on level 2');
+ saveWikiText('incltest:ns:ns:level3', 'Page on level 3', 'Created page on level 3');
+
+ // for page ordering
+ saveWikiText('inclorder:page1', 'Page 1', 'Created page 1');
+ saveWikiText('inclorder:page2', 'Page 2', 'Created page 2');
+ saveWikiText('inclorder:page3', '{{include_n>10}} Page 3/10', 'created page 3/1');
+ saveWikiText('inclorder:page4', '{{include_n>2}} Page 4/2', 'created page 4/0');
+ }
+
+ /**
+ * Helper function to read dir content
+ */
+ protected function getDirContent ($dir) {
+ if (is_dir($dir)) {
+ $pages = array();
+ if ($handle = opendir($dir)) {
+ while (($file = readdir($handle)) !== false) {
+ if ($file != '.' && $file != '..') {
+ $pages [] = $file;
+ }
+ }
+ closedir($handle);
+ return $pages;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Test hiding of hidden pages in namespace includes
+ */
+ public function test_hidden() {
+ $flags = $this->helper->get_flags(array());
+ $pages = $this->helper->_get_included_pages('namespace', 'inclhidden:', '', '', $flags);
+ $this->assertEquals(array(
+ array('id' => 'inclhidden:visible', 'exists' => true, 'parent_id' => ''),
+ ), $pages);
+ }
+
+ /**
+ * Test include depth limit
+ */
+ public function test_depth() {
+ $flags = $this->helper->get_flags(array());
+ $pages = $this->helper->_get_included_pages('namespace', 'incltest:', '', '', $flags);
+ $this->assertEquals(array(
+ array('id' => 'incltest:level1', 'exists' => true, 'parent_id' => ''),
+ ), $pages);
+ $flags = $this->helper->get_flags(array('depth=2'));
+ $pages = $this->helper->_get_included_pages('namespace', 'incltest:', '', '', $flags);
+ $this->assertEquals(array(
+ array('id' => 'incltest:level1', 'exists' => true, 'parent_id' => ''),
+ array('id' => 'incltest:ns:level2', 'exists' => true, 'parent_id' => ''),
+ ), $pages);
+ $flags = $this->helper->get_flags(array('depth=2'));
+ $pages = $this->helper->_get_included_pages('namespace', 'incltest:ns', '', '', $flags);
+ $this->assertEquals(array(
+ array('id' => 'incltest:ns:level2', 'exists' => true, 'parent_id' => ''),
+ array('id' => 'incltest:ns:ns:level3', 'exists' => true, 'parent_id' => ''),
+ ), $pages);
+ $flags = $this->helper->get_flags(array('depth=0'));
+ $pages = $this->helper->_get_included_pages('namespace', 'incltest:', '', '', $flags);
+ $this->assertEquals(array(
+ array('id' => 'incltest:level1', 'exists' => true, 'parent_id' => ''),
+ array('id' => 'incltest:ns:level2', 'exists' => true, 'parent_id' => ''),
+ array('id' => 'incltest:ns:ns:level3', 'exists' => true, 'parent_id' => ''),
+ ), $pages);
+
+ // test include of the root namespace
+ $flags = $this->helper->get_flags(array());
+ $pages = $this->helper->_get_included_pages('namespace', ':', '', '', $flags);
+ $this->assertEquals(array(array('id' => 'mailinglist', 'exists' => true, 'parent_id' => '')), $pages);
+ $flags = $this->helper->get_flags(array('depth=2'));
+ $pages = $this->helper->_get_included_pages('namespace', ':', '', '', $flags);
+ $expected = array(
+ array('id' => 'inclhidden:visible', 'exists' => true, 'parent_id' => ''),
+ array('id' => 'inclorder:page1', 'exists' => true, 'parent_id' => ''),
+ array('id' => 'inclorder:page2', 'exists' => true, 'parent_id' => ''),
+ array('id' => 'inclorder:page3', 'exists' => true, 'parent_id' => ''),
+ array('id' => 'inclorder:page4', 'exists' => true, 'parent_id' => ''),
+ array('id' => 'incltest:level1', 'exists' => true, 'parent_id' => ''),
+ array('id' => 'mailinglist', 'exists' => true, 'parent_id' => ''),
+ //array('id' => 'wiki:dokuwiki', 'exists' => true, 'parent_id' => ''),
+ //array('id' => 'wiki:syntax', 'exists' => true, 'parent_id' => ''),
+ //$wikiPages,
+ );
+
+ // page int:editandsavetest exists in DokuWiki after September 2017
+ if (page_exists('int:editandsavetest')) {
+ $expected [] = array('id' => 'int:editandsavetest', 'exists' => true, 'parent_id' => '');
+ }
+
+ // Add pages in namespace wiki
+ $dir = $this->getDirContent(dirname(__FILE__).'/../../../../_test/data/pages/wiki');
+ $this->assertTrue($dir !== null);
+ foreach ($dir as $page) {
+ $page = substr($page, 0, -4);
+ $expected [] = array('id' => 'wiki:'.$page, 'exists' => true, 'parent_id' => '');
+ }
+
+ array_multisort($expected);
+ array_multisort($pages);
+ $this->assertEquals($expected, $pages);
+ }
+
+ /**
+ * Test ordering of namespace includes
+ */
+ public function test_order() {
+
+ $flags = $this->helper->get_flags(array());
+ $pages = $this->helper->_get_included_pages('namespace', 'inclorder:', '', '', $flags);
+
+ $this->assertEquals(array(
+ array('id' => 'inclorder:page1', 'exists' => true, 'parent_id' => ''),
+ array('id' => 'inclorder:page2', 'exists' => true, 'parent_id' => ''),
+ array('id' => 'inclorder:page3', 'exists' => true, 'parent_id' => ''),
+ array('id' => 'inclorder:page4', 'exists' => true, 'parent_id' => ''),
+ ), $pages);
+
+ $flags = $this->helper->get_flags(array('rsort'));
+ $pages = $this->helper->_get_included_pages('namespace', 'inclorder:', '', '', $flags);
+ $this->assertEquals(array(
+ array('id' => 'inclorder:page4', 'exists' => true, 'parent_id' => ''),
+ array('id' => 'inclorder:page3', 'exists' => true, 'parent_id' => ''),
+ array('id' => 'inclorder:page2', 'exists' => true, 'parent_id' => ''),
+ array('id' => 'inclorder:page1', 'exists' => true, 'parent_id' => ''),
+ ), $pages);
+ $flags = $this->helper->get_flags(array('order=custom'));
+ $pages = $this->helper->_get_included_pages('namespace', 'inclorder:', '', '', $flags);
+ $this->assertEquals(array(
+ array('id' => 'inclorder:page4', 'exists' => true, 'parent_id' => ''),
+ array('id' => 'inclorder:page3', 'exists' => true, 'parent_id' => ''),
+ array('id' => 'inclorder:page1', 'exists' => true, 'parent_id' => ''),
+ array('id' => 'inclorder:page2', 'exists' => true, 'parent_id' => ''),
+ ), $pages);
+
+ $flags = $this->helper->get_flags(array('order=custom', 'rsort'));
+ $pages = $this->helper->_get_included_pages('namespace', 'inclorder:', '', '', $flags);
+ $this->assertEquals(array(
+ array('id' => 'inclorder:page2', 'exists' => true, 'parent_id' => ''),
+ array('id' => 'inclorder:page1', 'exists' => true, 'parent_id' => ''),
+ array('id' => 'inclorder:page3', 'exists' => true, 'parent_id' => ''),
+ array('id' => 'inclorder:page4', 'exists' => true, 'parent_id' => ''),
+ ), $pages);
+ }
+}
diff --git a/platform/www/lib/plugins/include/_test/nested_include.test.php b/platform/www/lib/plugins/include/_test/nested_include.test.php
new file mode 100644
index 0000000..745f180
--- /dev/null
+++ b/platform/www/lib/plugins/include/_test/nested_include.test.php
@@ -0,0 +1,75 @@
+<?php
+
+/**
+ * Class plugin_include_nested_test
+ *
+ * @group plugin_include
+ * @group plugins
+ */
+class plugin_include_nested_test extends DokuWikiTest {
+ private $ids = array(
+ 'test:plugin_include:nested:start',
+ 'test:plugin_include:nested:second',
+ 'test:plugin_include:nested:third'
+ );
+
+ public function setUp() : void
+ {
+ $this->pluginsEnabled[] = 'include';
+ parent::setUp();
+ }
+
+ public function test_outer_to_inner() {
+ $this->_createPages();
+ $mainHTML = p_wiki_xhtml('test:plugin_include:nested:start');
+ $secondHTML = p_wiki_xhtml('test:plugin_include:nested:second');
+ $thirdHTML = p_wiki_xhtml('test:plugin_include:nested:third');
+ $this->_validateContent($mainHTML, $secondHTML, $thirdHTML);
+ }
+
+ public function test_inner_to_outer() {
+ $this->_createPages();
+ $thirdHTML = p_wiki_xhtml('test:plugin_include:nested:third');
+ $secondHTML = p_wiki_xhtml('test:plugin_include:nested:second');
+ $mainHTML = p_wiki_xhtml('test:plugin_include:nested:start');
+ $this->_validateContent($mainHTML, $secondHTML, $thirdHTML);
+ }
+
+ private function _validateContent($mainHTML, $secondHTML, $thirdHTML) {
+ $this->assertTrue(strpos($mainHTML, 'Main Content') !== false, 'Main content contains "Main Content"');
+ $this->assertTrue($this->_matchHeader('1', 'Main Test Page', $mainHTML), 'Main page header is h1');
+ $this->assertTrue(strpos($mainHTML, 'Second Content') !== false, 'Main content contains "Second Content"');
+ $this->assertTrue($this->_matchHeader('2', 'Second Test Page', $mainHTML), 'Second page header on main page is h2');
+ $this->assertTrue(strpos($mainHTML, 'Third Content') !== false, 'Main content contains "Third Content"');
+ $this->assertTrue($this->_matchHeader('3', 'Third Test Page', $mainHTML), 'Third page header on main page is h3');
+ $this->assertTrue(strpos($secondHTML, 'Second Content') !== false, 'Second content contains "Second Content"');
+ $this->assertTrue($this->_matchHeader('1', 'Second Test Page', $secondHTML), 'Second page header on second page is h1');
+ $this->assertTrue(strpos($secondHTML, 'Third Content') !== false, 'Second content contains "Third Content"');
+ $this->assertTrue($this->_matchHeader('2', 'Third Test Page', $secondHTML), 'Third page header on second page is h2');
+ $this->assertTrue(strpos($thirdHTML, 'Third Content') !== false, 'Third content contains "Third Content"');
+ $this->assertTrue($this->_matchHeader('1', 'Third Test Page', $thirdHTML), 'Third page header on third page is h1');
+ }
+
+ private function _matchHeader($level, $text, $html) {
+ return preg_match('/<h'.$level.'[^>]*>(<a[^>]*>)?'.$text.'/', $html) > 0;
+ }
+
+ private function _createPages() {
+ saveWikiText('test:plugin_include:nested:start',
+ '====== Main Test Page ======'.DOKU_LF.DOKU_LF
+ .'Main Content'.rand().DOKU_LF.DOKU_LF
+ .'{{page>second}}'.DOKU_LF,
+ 'setup for test');
+ saveWikiText('test:plugin_include:nested:second',
+ '====== Second Test Page ======'.DOKU_LF.DOKU_LF
+ .'Second Content'.rand().DOKU_LF.DOKU_LF
+ .'{{page>third}}'.DOKU_LF,
+ 'setup for test');
+ saveWikiText('test:plugin_include:nested:third',
+ '====== Third Test Page ======'.DOKU_LF.DOKU_LF
+ .'Third Content'.rand().DOKU_LF.DOKU_LF
+ .'{{page>third}}'.DOKU_LF,
+ 'setup for test');
+ }
+}
+
diff --git a/platform/www/lib/plugins/include/_test/pagemove_support.test.php b/platform/www/lib/plugins/include/_test/pagemove_support.test.php
new file mode 100644
index 0000000..58c9425
--- /dev/null
+++ b/platform/www/lib/plugins/include/_test/pagemove_support.test.php
@@ -0,0 +1,76 @@
+<?php
+
+/**
+ * Tests the move support for adapting the syntax of the include plugin
+ *
+ * @group plugin_include
+ * @group plugins
+ */
+class plugin_include_pagemove_support_test extends DokuWikiTest {
+ public function setUp() : void
+ {
+ $this->pluginsEnabled[] = 'move';
+ $this->pluginsEnabled[] = 'include';
+ parent::setUp();
+ }
+
+ public function test_relative_include() {
+ /** @var $move helper_plugin_move_op */
+ $move = plugin_load('helper', 'move_op');
+ if (!$move) {
+ $this->markTestSkipped('the move plugin is not installed');
+ return;
+ }
+ saveWikiText('editx', '{{page>start#start}} %%{{page>start}}%% {{section>wiki:syntax#tables&nofooter}} {{page>:}} {{section>test:start#test}}', 'Testcase created');
+ idx_addPage('editx');
+ $this->assertTrue($move->movePage('editx', 'test:editx'));
+ $this->assertEquals('{{page>:start#start}} %%{{page>start}}%% {{section>wiki:syntax#tables&nofooter}} {{page>:}} {{section>test:start#test}}',rawWiki('test:editx'));
+ }
+
+ public function test_rename() {
+ /** @var $move helper_plugin_move_op */
+ $move = plugin_load('helper', 'move_op');
+ if (!$move) {
+ $this->markTestSkipped('the move plugin is not installed');
+ return;
+ }
+ saveWikiText('editx', 'Page to rename', 'Testcase create');
+ saveWikiText('links', '{{section>links#foo}} {{page>editx}} {{page>:eDitX&nofooter}} {{section>editx#test}} {{page>editx&nofooter}}', 'Testcase created');
+ idx_addPage('editx');
+ idx_addPage('links');
+
+ $this->assertTrue($move->movePage('editx', 'test:edit'));
+ $this->assertEquals('{{section>links#foo}} {{page>test:edit}} {{page>test:edit&nofooter}} {{section>test:edit#test}} {{page>test:edit&nofooter}}', rawWiki('links'));
+ }
+
+ public function test_relative_include_adaption() {
+ /** @var $move helper_plugin_move_op */
+ $move = plugin_load('helper', 'move_op');
+ if (!$move) {
+ $this->markTestSkipped('the move plugin is not installed');
+ return;
+ }
+
+ $text = '====== Main ======
+
+This is a test page
+
+[[.1:page_1|link]]
+
+{{page>.1:page_1&nofooter&noeditbutton}}
+
+{{page>.1:page_2&nofooter&noeditbutton}}';
+
+ saveWikiText('old:namespace:main', $text, 'Created');
+ saveWikiText('old:namespace:1:page_1', 'Page 1', 'Created');
+ saveWikiText('old:namespace:1:page_2', 'Page 2', 'Created');
+ idx_addPage('old:namespace:main');
+ idx_addPage('old:namespace:1:page_1');
+ idx_addPage('old:namespace:1:page_2');
+
+ $this->assertTrue($move->movePage('old:namespace:main', 'new:namespace:main'));
+ $this->assertTrue($move->movePage('old:namespace:1:page_1', 'new:namespace:1:page_1'));
+ $this->assertTrue($move->movePage('old:namespace:1:page_2', 'new:namespace:1:page_2'));
+ $this->assertEquals($text, rawWiki('new:namespace:main'));
+ }
+}
diff --git a/platform/www/lib/plugins/include/_test/safeindex.test.php b/platform/www/lib/plugins/include/_test/safeindex.test.php
new file mode 100644
index 0000000..247c7e6
--- /dev/null
+++ b/platform/www/lib/plugins/include/_test/safeindex.test.php
@@ -0,0 +1,40 @@
+<?php
+/*
+ * @group plugin_include
+ * @group plugins
+ */
+class plugin_include_safeindex_test extends DokuWikiTest {
+ public function setUp() : void
+ {
+ $this->pluginsEnabled[] = 'include';
+ parent::setUp();
+ }
+
+ public function test_safeindex() {
+ global $conf;
+ global $AUTH_ACL;
+ $conf['superuser'] = 'john';
+ $conf['useacl'] = 1;
+
+ $AUTH_ACL = array(
+ '* @ALL 0',
+ '* @user 8',
+ 'public @ALL 1',
+ );
+
+ $_SERVER['REMOTE_USER'] = 'john';
+
+ saveWikiText('parent', "{{page>child}}\n\n[[public_link]]\n\n{{page>public}}", 'Test parent created');
+ saveWikiText('child', "[[foo:private]]", 'Test child created');
+ saveWikiText('public', "[[foo:public]]", 'Public page created');
+
+ idx_addPage('parent');
+ idx_addPage('child');
+ idx_addPage('public');
+
+ $this->assertEquals(array('parent', 'public'), ft_backlinks('foo:public'));
+ $this->assertEquals(array('child'), ft_backlinks('foo:private'));
+ $this->assertEquals(array('parent'), ft_backlinks('public_link'));
+ }
+}
+
diff --git a/platform/www/lib/plugins/include/action.php b/platform/www/lib/plugins/include/action.php
new file mode 100644
index 0000000..b5388ba
--- /dev/null
+++ b/platform/www/lib/plugins/include/action.php
@@ -0,0 +1,370 @@
+<?php
+/**
+ * Include Plugin: Display a wiki page within another wiki page
+ *
+ * Action plugin component, for cache validity determination
+ *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author Christopher Smith <chris@jalakai.co.uk>
+ * @author Michael Klier <chi@chimeric.de>
+ */
+
+/**
+ * All DokuWiki plugins to extend the parser/rendering mechanism
+ * need to inherit from this class
+ */
+class action_plugin_include extends DokuWiki_Action_Plugin {
+
+ /* @var helper_plugin_include $helper */
+ var $helper = null;
+
+ function __construct() {
+ $this->helper = plugin_load('helper', 'include');
+ }
+
+ /**
+ * plugin should use this method to register its handlers with the dokuwiki's event controller
+ */
+ function register(Doku_Event_Handler $controller) {
+ /* @var Doku_event_handler $controller */
+ $controller->register_hook('INDEXER_PAGE_ADD', 'BEFORE', $this, 'handle_indexer');
+ $controller->register_hook('INDEXER_VERSION_GET', 'BEFORE', $this, 'handle_indexer_version');
+ $controller->register_hook('PARSER_CACHE_USE','BEFORE', $this, '_cache_prepare');
+ $controller->register_hook('HTML_EDITFORM_OUTPUT', 'BEFORE', $this, 'handle_form'); // todo remove
+ $controller->register_hook('FORM_EDIT_OUTPUT', 'BEFORE', $this, 'handle_form');
+ $controller->register_hook('HTML_CONFLICTFORM_OUTPUT', 'BEFORE', $this, 'handle_form'); // todo remove
+ $controller->register_hook('FORM_CONFLICT_OUTPUT', 'BEFORE', $this, 'handle_form');
+ $controller->register_hook('HTML_DRAFTFORM_OUTPUT', 'BEFORE', $this, 'handle_form'); // todo remove
+ $controller->register_hook('FORM_DRAFT_OUTPUT', 'BEFORE', $this, 'handle_form');
+ $controller->register_hook('ACTION_SHOW_REDIRECT', 'BEFORE', $this, 'handle_redirect');
+ $controller->register_hook('PARSER_HANDLER_DONE', 'BEFORE', $this, 'handle_parser');
+ $controller->register_hook('PARSER_METADATA_RENDER', 'AFTER', $this, 'handle_metadata');
+ $controller->register_hook('HTML_SECEDIT_BUTTON', 'BEFORE', $this, 'handle_secedit_button');
+ $controller->register_hook('PLUGIN_MOVE_HANDLERS_REGISTER', 'BEFORE', $this, 'handle_move_register');
+ }
+
+ /**
+ * Add a version string to the index so it is rebuilt
+ * whenever the handler is updated or the safeindex setting is changed
+ */
+ public function handle_indexer_version($event, $param) {
+ $event->data['plugin_include'] = '0.1.safeindex='.$this->getConf('safeindex');
+ }
+
+ /**
+ * Handles the INDEXER_PAGE_ADD event, prevents indexing of metadata from included pages that aren't public if enabled
+ *
+ * @param Doku_Event $event the event object
+ * @param array $params optional parameters (unused)
+ */
+ public function handle_indexer(Doku_Event $event, $params) {
+ global $USERINFO;
+
+ // check if the feature is enabled at all
+ if (!$this->getConf('safeindex')) return;
+
+ // is there a user logged in at all? If not everything is fine already
+ if (is_null($USERINFO) && !isset($_SERVER['REMOTE_USER'])) return;
+
+ // get the include metadata in order to see which pages were included
+ $inclmeta = p_get_metadata($event->data['page'], 'plugin_include', METADATA_RENDER_UNLIMITED);
+ $all_public = true; // are all included pages public?
+ // check if the current metadata indicates that non-public pages were included
+ if ($inclmeta !== null && isset($inclmeta['pages'])) {
+ foreach ($inclmeta['pages'] as $page) {
+ if (auth_aclcheck($page['id'], '', array()) < AUTH_READ) { // is $page public?
+ $all_public = false;
+ break;
+ }
+ }
+ }
+
+ if (!$all_public) { // there were non-public pages included - action required!
+ // backup the user information
+ $userinfo_backup = $USERINFO;
+ $remote_user = $_SERVER['REMOTE_USER'];
+ // unset user information - temporary logoff!
+ $USERINFO = null;
+ unset($_SERVER['REMOTE_USER']);
+
+ // metadata is only rendered once for a page in one request - thus we need to render manually.
+ $meta = p_read_metadata($event->data['page']); // load the original metdata
+ $meta = p_render_metadata($event->data['page'], $meta); // render the metadata
+ p_save_metadata($event->data['page'], $meta); // save the metadata so other event handlers get the public metadata, too
+
+ $meta = $meta['current']; // we are only interested in current metadata.
+
+ // check if the tag plugin handler has already been called before the include plugin
+ $tag_called = isset($event->data['metadata']['subject']);
+
+ // Reset the metadata in the renderer. This removes data from all other event handlers, but we need to be on the safe side here.
+ $event->data['metadata'] = array('title' => $meta['title']);
+
+ // restore the relation references metadata
+ if (isset($meta['relation']['references'])) {
+ $event->data['metadata']['relation_references'] = array_keys($meta['relation']['references']);
+ } else {
+ $event->data['metadata']['relation_references'] = array();
+ }
+
+ // restore the tag metadata if the tag plugin handler has been called before the include plugin handler.
+ if ($tag_called) {
+ $tag_helper = $this->loadHelper('tag', false);
+ if ($tag_helper) {
+ if (isset($meta['subject'])) {
+ $event->data['metadata']['subject'] = $tag_helper->_cleanTagList($meta['subject']);
+ } else {
+ $event->data['metadata']['subject'] = array();
+ }
+ }
+ }
+
+ // restore user information
+ $USERINFO = $userinfo_backup;
+ $_SERVER['REMOTE_USER'] = $remote_user;
+ }
+ }
+
+ /**
+ * Used for debugging purposes only
+ */
+ function handle_metadata(&$event, $param) {
+ global $conf;
+ if($conf['allowdebug'] && $this->getConf('debugoutput')) {
+ dbglog('---- PLUGIN INCLUDE META DATA START ----');
+ dbglog($event->data);
+ dbglog('---- PLUGIN INCLUDE META DATA END ----');
+ }
+ }
+
+ /**
+ * Supplies the current section level to the include syntax plugin
+ *
+ * @author Michael Klier <chi@chimeric.de>
+ * @author Michael Hamann <michael@content-space.de>
+ */
+ function handle_parser(Doku_Event $event, $param) {
+ global $ID;
+
+ $level = 0;
+ $ins =& $event->data->calls;
+ $num = count($ins);
+ for($i=0; $i<$num; $i++) {
+ switch($ins[$i][0]) {
+ case 'plugin':
+ switch($ins[$i][1][0]) {
+ case 'include_include':
+ $ins[$i][1][1][4] = $level;
+ break;
+ /* FIXME: this doesn't work anymore that way with the new structure
+ // some plugins already close open sections
+ // so we need to make sure we don't close them twice
+ case 'box':
+ $this->helper->sec_close = false;
+ break;
+ */
+ }
+ break;
+ case 'section_open':
+ $level = $ins[$i][1][0];
+ break;
+ }
+ }
+ }
+
+ /**
+ * Add a hidden input to the form to preserve the redirect_id
+ */
+ function handle_form(Doku_Event $event, $param)
+ {
+ if (!array_key_exists('redirect_id', $_REQUEST)) return;
+
+ if(is_a($event->data, \dokuwiki\Form\Form::class)) {
+ $event->data->setHiddenField('redirect_id', cleanID($_REQUEST['redirect_id']));
+ } else {
+ // todo remove when old FORM events are no longer supported
+ $event->data->addHidden('redirect_id', cleanID($_REQUEST['redirect_id']));
+ }
+ }
+
+ /**
+ * Modify the data for the redirect when there is a redirect_id set
+ */
+ function handle_redirect(Doku_Event &$event, $param) {
+ if (array_key_exists('redirect_id', $_REQUEST)) {
+ // Render metadata when this is an older DokuWiki version where
+ // metadata is not automatically re-rendered as the page has probably
+ // been changed but is not directly displayed
+ $versionData = getVersionData();
+ if ($versionData['date'] < '2010-11-23') {
+ p_set_metadata($event->data['id'], array(), true);
+ }
+ $event->data['id'] = cleanID($_REQUEST['redirect_id']);
+ $event->data['title'] = '';
+ }
+ }
+
+ /**
+ * prepare the cache object for default _useCache action
+ */
+ function _cache_prepare(Doku_Event &$event, $param) {
+ global $conf;
+
+ /* @var cache_renderer $cache */
+ $cache =& $event->data;
+
+ if(!isset($cache->page)) return;
+ if(!isset($cache->mode) || $cache->mode == 'i') return;
+
+ $depends = p_get_metadata($cache->page, 'plugin_include');
+
+ if($conf['allowdebug'] && $this->getConf('debugoutput')) {
+ dbglog('---- PLUGIN INCLUDE CACHE DEPENDS START ----');
+ dbglog($depends);
+ dbglog('---- PLUGIN INCLUDE CACHE DEPENDS END ----');
+ }
+
+ if (!is_array($depends)) return; // nothing to do for us
+
+ if (!is_array($depends['pages']) ||
+ !is_array($depends['instructions']) ||
+ $depends['pages'] != $this->helper->_get_included_pages_from_meta_instructions($depends['instructions']) ||
+ // the include_content url parameter may change the behavior for included pages
+ $depends['include_content'] != isset($_REQUEST['include_content'])) {
+
+ $cache->depends['purge'] = true; // included pages changed or old metadata - request purge.
+ if($conf['allowdebug'] && $this->getConf('debugoutput')) {
+ dbglog('---- PLUGIN INCLUDE: REQUESTING CACHE PURGE ----');
+ dbglog('---- PLUGIN INCLUDE CACHE PAGES FROM META START ----');
+ dbglog($depends['pages']);
+ dbglog('---- PLUGIN INCLUDE CACHE PAGES FROM META END ----');
+ dbglog('---- PLUGIN INCLUDE CACHE PAGES FROM META_INSTRUCTIONS START ----');
+ dbglog($this->helper->_get_included_pages_from_meta_instructions($depends['instructions']));
+ dbglog('---- PLUGIN INCLUDE CACHE PAGES FROM META_INSTRUCTIONS END ----');
+
+ }
+ } else {
+ // add plugin.info.txt to depends for nicer upgrades
+ $cache->depends['files'][] = dirname(__FILE__) . '/plugin.info.txt';
+ foreach ($depends['pages'] as $page) {
+ if (!$page['exists']) continue;
+ $file = wikiFN($page['id']);
+ if (!in_array($file, $cache->depends['files'])) {
+ $cache->depends['files'][] = $file;
+ }
+ }
+ }
+ }
+
+ /**
+ * Handle special section edit buttons for the include plugin to get the current page
+ * and replace normal section edit buttons when the current page is different from the
+ * global $ID.
+ */
+ function handle_secedit_button(Doku_Event &$event, $params) {
+ // stack of included pages in the form ('id' => page, 'rev' => modification time, 'writable' => bool)
+ static $page_stack = array();
+
+ global $ID, $lang;
+
+ $data = $event->data;
+
+ if ($data['target'] == 'plugin_include_start' || $data['target'] == 'plugin_include_start_noredirect') {
+ // handle the "section edits" added by the include plugin
+ $fn = wikiFN($data['name']);
+ $perm = auth_quickaclcheck($data['name']);
+ array_unshift($page_stack, array(
+ 'id' => $data['name'],
+ 'rev' => @filemtime($fn),
+ 'writable' => (page_exists($data['name']) ? (is_writable($fn) && $perm >= AUTH_EDIT) : $perm >= AUTH_CREATE),
+ 'redirect' => ($data['target'] == 'plugin_include_start'),
+ ));
+ } elseif ($data['target'] == 'plugin_include_end') {
+ array_shift($page_stack);
+ } elseif ($data['target'] == 'plugin_include_editbtn') {
+ if ($page_stack[0]['writable']) {
+ $params = array('do' => 'edit',
+ 'id' => $page_stack[0]['id']);
+ if ($page_stack[0]['redirect']) {
+ $params['redirect_id'] = $ID;
+ $params['hid'] = $data['hid'];
+ }
+ $event->result = '<div class="secedit">' . DOKU_LF .
+ html_btn('incledit', $page_stack[0]['id'], '',
+ $params, 'post',
+ $data['name'],
+ $lang['btn_secedit'].' ('.$page_stack[0]['id'].')') .
+ '</div>' . DOKU_LF;
+ }
+ } elseif (!empty($page_stack)) {
+
+ // Special handling for the edittable plugin
+ if ($data['target'] == 'table' && !plugin_isdisabled('edittable')) {
+ /* @var action_plugin_edittable_editor $edittable */
+ $edittable = plugin_load('action', 'edittable_editor');
+ if (is_null($edittable))
+ $edittable = plugin_load('action', 'edittable');
+ $data['name'] = $edittable->getLang('secedit_name');
+ }
+
+ if ($page_stack[0]['writable'] && isset($data['name']) && $data['name'] !== '') {
+ $name = $data['name'];
+ unset($data['name']);
+
+ $secid = $data['secid'];
+ unset($data['secid']);
+
+ if ($page_stack[0]['redirect'])
+ $data['redirect_id'] = $ID;
+
+ $event->result = "<div class='secedit editbutton_" . $data['target'] .
+ " editbutton_" . $secid . "'>" .
+ html_btn('secedit', $page_stack[0]['id'], '',
+ array_merge(array('do' => 'edit',
+ 'rev' => $page_stack[0]['rev'],
+ 'summary' => '['.$name.'] '), $data),
+ 'post', $name) . '</div>';
+ } else {
+ $event->result = '';
+ }
+ } else {
+ return; // return so the event won't be stopped
+ }
+
+ $event->preventDefault();
+ $event->stopPropagation();
+ }
+
+ public function handle_move_register(Doku_Event $event, $params) {
+ $event->data['handlers']['include_include'] = array($this, 'rewrite_include');
+ }
+
+ public function rewrite_include($match, $pos, $state, $plugin, helper_plugin_move_handler $handler) {
+ $syntax = substr($match, 2, -2); // strip markup
+ $replacers = explode('|', $syntax);
+ $syntax = array_shift($replacers);
+ list($syntax, $flags) = array_pad(explode('&', $syntax, 2), 2, "");
+
+ // break the pattern up into its parts
+ list($mode, $page, $sect) = array_pad(preg_split('/>|#/u', $syntax, 3), 3, "");
+
+ if (method_exists($handler, 'adaptRelativeId')) { // move plugin before version 2015-05-16
+ $newpage = $handler->adaptRelativeId($page);
+ } else {
+ $newpage = $handler->resolveMoves($page, 'page');
+ $newpage = $handler->relativeLink($page, $newpage, 'page');
+ }
+
+ if ($newpage == $page) {
+ return $match;
+ } else {
+ $result = '{{'.$mode.'>'.$newpage;
+ if ($sect) $result .= '#'.$sect;
+ if ($flags) $result .= '&'.$flags;
+ if ($replacers) $result .= '|'.$replacers;
+ $result .= '}}';
+ return $result;
+ }
+ }
+}
+// vim:ts=4:sw=4:et:
diff --git a/platform/www/lib/plugins/include/conf/default.php b/platform/www/lib/plugins/include/conf/default.php
new file mode 100644
index 0000000..c619005
--- /dev/null
+++ b/platform/www/lib/plugins/include/conf/default.php
@@ -0,0 +1,30 @@
+<?php
+/**
+ * Options for the Include Plugin
+ */
+$conf['noheader'] = 0; // Don't display the header of the inserted section
+$conf['firstseconly'] = 0; // limit entries on main blog page to first section
+$conf['showtaglogos'] = 0; // display image for first tag
+$conf['showfooter'] = 1; // display meta line below blog entries
+$conf['showlink'] = 0; // link headlines of blog entries
+$conf['showpermalink'] = 0; // show permalink below blog entries
+$conf['showdate'] = 1; // show date below blog entries
+$conf['showmdate'] = 0; // show modification date below blog entries
+$conf['showuser'] = 1; // show username below blog entries
+$conf['showcomments'] = 1; // show number of comments below blog entries
+$conf['showlinkbacks'] = 1; // show number of linkbacks below blog entries
+$conf['showtags'] = 1; // show tags below blog entries
+$conf['showeditbtn'] = 1; // show the edit button
+$conf['doredirect'] = 1; // redirect back to original page after an edit
+$conf['doindent'] = 1; // indent included pages relative to the page they get included
+$conf['linkonly'] = 0; // link only to the included pages instead of including the content
+$conf['title'] = 0; // use first header of page in link
+$conf['pageexists'] = 0; // no link if page does not exist
+$conf['parlink'] = 1; // paragraph around link
+$conf['safeindex'] = 1; // prevent indexing of protected metadata
+$conf['order'] = 'id'; // order in which the pages are included in the case of multiple pages
+$conf['rsort'] = 0; // reverse sort order
+$conf['depth'] = 1; // maximum depth of namespace includes, 0 for unlimited depth
+$conf['readmore'] = 1; // Show readmore link in case of firstsection only
+$conf['debugoutput'] = 0; // print debug information to debuglog if global allowdebug is enabled
+//Setup VIM: ex: et ts=2 :
diff --git a/platform/www/lib/plugins/include/conf/metadata.php b/platform/www/lib/plugins/include/conf/metadata.php
new file mode 100644
index 0000000..a0fa7b1
--- /dev/null
+++ b/platform/www/lib/plugins/include/conf/metadata.php
@@ -0,0 +1,33 @@
+<?php
+/**
+ * Metadata for configuration manager plugin
+ * Additions for the Include Plugin
+ *
+ * @author Esther Brunner <wikidesign@gmail.com>
+ */
+$meta['noheader'] = array('onoff');
+$meta['firstseconly'] = array('onoff');
+$meta['showtaglogos'] = array('onoff');
+$meta['showlink'] = array('onoff');
+$meta['showfooter'] = array('onoff');
+$meta['showpermalink'] = array('onoff');
+$meta['showdate'] = array('onoff');
+$meta['showmdate'] = array('onoff');
+$meta['showuser'] = array('onoff');
+$meta['showcomments'] = array('onoff');
+$meta['showlinkbacks'] = array('onoff');
+$meta['showtags'] = array('onoff');
+$meta['showeditbtn'] = array('onoff');
+$meta['doredirect'] = array('onoff');
+$meta['doindent'] = array('onoff');
+$meta['linkonly'] = array('onoff');
+$meta['title'] = array('onoff');
+$meta['pageexists'] = array('onoff');
+$meta['parlink'] = array('onoff');
+$meta['safeindex'] = array('onoff');
+$meta['order'] = array('multichoice', '_choices' => array('id', 'title', 'created', 'modified', 'indexmenu', 'custom'));
+$meta['rsort'] = array('onoff');
+$meta['depth'] = array('numeric', '_min' => 0);
+$meta['readmore'] = array('onoff');
+$meta['debugoutput'] = array('onoff');
+//Setup VIM: ex: et ts=2 :
diff --git a/platform/www/lib/plugins/include/deleted.files b/platform/www/lib/plugins/include/deleted.files
new file mode 100644
index 0000000..518236e
--- /dev/null
+++ b/platform/www/lib/plugins/include/deleted.files
@@ -0,0 +1,13 @@
+.travis.yaml
+lang/sl-si/lang.php
+lang/sl-si/settings.php
+_test/editx_support.test.php
+_test/include.group.php
+syntax/close_last_secedit.php
+syntax/div.php
+syntax/meta.php
+VERSION
+syntax.php
+images/tag.gif
+inc/include.php
+.travis.yml
diff --git a/platform/www/lib/plugins/include/helper.php b/platform/www/lib/plugins/include/helper.php
new file mode 100644
index 0000000..ebde44f
--- /dev/null
+++ b/platform/www/lib/plugins/include/helper.php
@@ -0,0 +1,941 @@
+<?php
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author Esther Brunner <wikidesign@gmail.com>
+ * @author Christopher Smith <chris@jalakai.co.uk>
+ * @author Gina Häußge, Michael Klier <dokuwiki@chimeric.de>
+ * @author Michael Hamann <michael@content-space.de>
+ */
+
+/**
+ * Helper functions for the include plugin and other plugins that want to include pages.
+ */
+class helper_plugin_include extends DokuWiki_Plugin { // DokuWiki_Helper_Plugin
+
+ var $defaults = array();
+ var $sec_close = true;
+ /** @var helper_plugin_tag $taghelper */
+ var $taghelper = null;
+ var $includes = array(); // deprecated - compatibility code for the blog plugin
+
+ /**
+ * Constructor loads default config settings once
+ */
+ function __construct() {
+ $this->defaults['noheader'] = $this->getConf('noheader');
+ $this->defaults['firstsec'] = $this->getConf('firstseconly');
+ $this->defaults['editbtn'] = $this->getConf('showeditbtn');
+ $this->defaults['taglogos'] = $this->getConf('showtaglogos');
+ $this->defaults['footer'] = $this->getConf('showfooter');
+ $this->defaults['redirect'] = $this->getConf('doredirect');
+ $this->defaults['date'] = $this->getConf('showdate');
+ $this->defaults['mdate'] = $this->getConf('showmdate');
+ $this->defaults['user'] = $this->getConf('showuser');
+ $this->defaults['comments'] = $this->getConf('showcomments');
+ $this->defaults['linkbacks'] = $this->getConf('showlinkbacks');
+ $this->defaults['tags'] = $this->getConf('showtags');
+ $this->defaults['link'] = $this->getConf('showlink');
+ $this->defaults['permalink'] = $this->getConf('showpermalink');
+ $this->defaults['indent'] = $this->getConf('doindent');
+ $this->defaults['linkonly'] = $this->getConf('linkonly');
+ $this->defaults['title'] = $this->getConf('title');
+ $this->defaults['pageexists'] = $this->getConf('pageexists');
+ $this->defaults['parlink'] = $this->getConf('parlink');
+ $this->defaults['inline'] = false;
+ $this->defaults['order'] = $this->getConf('order');
+ $this->defaults['rsort'] = $this->getConf('rsort');
+ $this->defaults['depth'] = $this->getConf('depth');
+ $this->defaults['readmore'] = $this->getConf('readmore');
+ }
+
+ /**
+ * Available methods for other plugins
+ */
+ function getMethods() {
+ $result = array();
+ $result[] = array(
+ 'name' => 'get_flags',
+ 'desc' => 'overrides standard values for showfooter and firstseconly settings',
+ 'params' => array('flags' => 'array'),
+ );
+ return $result;
+ }
+
+ /**
+ * Overrides standard values for showfooter and firstseconly settings
+ */
+ function get_flags($setflags) {
+ // load defaults
+ $flags = $this->defaults;
+ foreach ($setflags as $flag) {
+ $value = '';
+ if (strpos($flag, '=') !== false) {
+ list($flag, $value) = explode('=', $flag, 2);
+ }
+ switch ($flag) {
+ case 'footer':
+ $flags['footer'] = 1;
+ break;
+ case 'nofooter':
+ $flags['footer'] = 0;
+ break;
+ case 'firstseconly':
+ case 'firstsectiononly':
+ $flags['firstsec'] = 1;
+ break;
+ case 'fullpage':
+ $flags['firstsec'] = 0;
+ break;
+ case 'showheader':
+ case 'header':
+ $flags['noheader'] = 0;
+ break;
+ case 'noheader':
+ $flags['noheader'] = 1;
+ break;
+ case 'editbtn':
+ case 'editbutton':
+ $flags['editbtn'] = 1;
+ break;
+ case 'noeditbtn':
+ case 'noeditbutton':
+ $flags['editbtn'] = 0;
+ break;
+ case 'permalink':
+ $flags['permalink'] = 1;
+ break;
+ case 'nopermalink':
+ $flags['permalink'] = 0;
+ break;
+ case 'redirect':
+ $flags['redirect'] = 1;
+ break;
+ case 'noredirect':
+ $flags['redirect'] = 0;
+ break;
+ case 'link':
+ $flags['link'] = 1;
+ break;
+ case 'nolink':
+ $flags['link'] = 0;
+ break;
+ case 'user':
+ $flags['user'] = 1;
+ break;
+ case 'nouser':
+ $flags['user'] = 0;
+ break;
+ case 'comments':
+ $flags['comments'] = 1;
+ break;
+ case 'nocomments':
+ $flags['comments'] = 0;
+ break;
+ case 'linkbacks':
+ $flags['linkbacks'] = 1;
+ break;
+ case 'nolinkbacks':
+ $flags['linkbacks'] = 0;
+ break;
+ case 'tags':
+ $flags['tags'] = 1;
+ break;
+ case 'notags':
+ $flags['tags'] = 0;
+ break;
+ case 'date':
+ $flags['date'] = 1;
+ break;
+ case 'nodate':
+ $flags['date'] = 0;
+ break;
+ case 'mdate':
+ $flags['mdate'] = 1;
+ break;
+ case 'nomdate':
+ $flags['mdate'] = 0;
+ break;
+ case 'indent':
+ $flags['indent'] = 1;
+ break;
+ case 'noindent':
+ $flags['indent'] = 0;
+ break;
+ case 'linkonly':
+ $flags['linkonly'] = 1;
+ break;
+ case 'nolinkonly':
+ case 'include_content':
+ $flags['linkonly'] = 0;
+ break;
+ case 'inline':
+ $flags['inline'] = 1;
+ break;
+ case 'title':
+ $flags['title'] = 1;
+ break;
+ case 'notitle':
+ $flags['title'] = 0;
+ break;
+ case 'pageexists':
+ $flags['pageexists'] = 1;
+ break;
+ case 'nopageexists':
+ $flags['pageexists'] = 0;
+ break;
+ case 'existlink':
+ $flags['pageexists'] = 1;
+ $flags['linkonly'] = 1;
+ break;
+ case 'parlink':
+ $flags['parlink'] = 1;
+ break;
+ case 'noparlink':
+ $flags['parlink'] = 0;
+ break;
+ case 'order':
+ $flags['order'] = $value;
+ break;
+ case 'sort':
+ $flags['rsort'] = 0;
+ break;
+ case 'rsort':
+ $flags['rsort'] = 1;
+ break;
+ case 'depth':
+ $flags['depth'] = max(intval($value), 0);
+ break;
+ case 'beforeeach':
+ $flags['beforeeach'] = $value;
+ break;
+ case 'aftereach':
+ $flags['aftereach'] = $value;
+ break;
+ case 'readmore':
+ $flags['readmore'] = 1;
+ break;
+ case 'noreadmore':
+ $flags['readmore'] = 0;
+ break;
+ case 'exclude':
+ $flags['exclude'] = $value;
+ break;
+ }
+ }
+ // the include_content URL parameter overrides flags
+ if (isset($_REQUEST['include_content']))
+ $flags['linkonly'] = 0;
+ return $flags;
+ }
+
+ /**
+ * Returns the converted instructions of a give page/section
+ *
+ * @author Michael Klier <chi@chimeric.de>
+ * @author Michael Hamann <michael@content-space.de>
+ */
+ function _get_instructions($page, $sect, $mode, $lvl, $flags, $root_id = null, $included_pages = array()) {
+ $key = ($sect) ? $page . '#' . $sect : $page;
+ $this->includes[$key] = true; // legacy code for keeping compatibility with other plugins
+
+ // keep compatibility with other plugins that don't know the $root_id parameter
+ if (is_null($root_id)) {
+ global $ID;
+ $root_id = $ID;
+ }
+
+ if ($flags['linkonly']) {
+ if (page_exists($page) || $flags['pageexists'] == 0) {
+ $title = '';
+ if ($flags['title'])
+ $title = p_get_first_heading($page);
+ if($flags['parlink']) {
+ $ins = array(
+ array('p_open', array()),
+ array('internallink', array(':'.$key, $title)),
+ array('p_close', array()),
+ );
+ } else {
+ $ins = array(array('internallink', array(':'.$key,$title)));
+ }
+ }else {
+ $ins = array();
+ }
+ } else {
+ if (page_exists($page)) {
+ global $ID;
+ $backupID = $ID;
+ $ID = $page; // Change the global $ID as otherwise plugins like the discussion plugin will save data for the wrong page
+ $ins = p_cached_instructions(wikiFN($page), false, $page);
+ $ID = $backupID;
+ } else {
+ $ins = array();
+ }
+
+ $this->_convert_instructions($ins, $lvl, $page, $sect, $flags, $root_id, $included_pages);
+ }
+ return $ins;
+ }
+
+ /**
+ * Converts instructions of the included page
+ *
+ * The funcion iterates over the given list of instructions and generates
+ * an index of header and section indicies. It also removes document
+ * start/end instructions, converts links, and removes unwanted
+ * instructions like tags, comments, linkbacks.
+ *
+ * Later all header/section levels are convertet to match the current
+ * inclusion level.
+ *
+ * @author Michael Klier <chi@chimeric.de>
+ */
+ function _convert_instructions(&$ins, $lvl, $page, $sect, $flags, $root_id, $included_pages = array()) {
+ global $conf;
+
+ // filter instructions if needed
+ if(!empty($sect)) {
+ $this->_get_section($ins, $sect); // section required
+ }
+
+ if($flags['firstsec']) {
+ $this->_get_firstsec($ins, $page, $flags); // only first section
+ }
+
+ $ns = getNS($page);
+ $num = count($ins);
+
+ $conv_idx = array(); // conversion index
+ $lvl_max = false; // max level
+ $first_header = -1;
+ $no_header = false;
+ $sect_title = false;
+ $endpos = null; // end position of the raw wiki text
+
+ $this->adapt_links($ins, $page, $included_pages);
+
+ for($i=0; $i<$num; $i++) {
+ switch($ins[$i][0]) {
+ case 'document_start':
+ case 'document_end':
+ case 'section_edit':
+ unset($ins[$i]);
+ break;
+ case 'header':
+ // get section title of first section
+ if($sect && !$sect_title) {
+ $sect_title = $ins[$i][1][0];
+ }
+ // check if we need to skip the first header
+ if((!$no_header) && $flags['noheader']) {
+ $no_header = true;
+ }
+
+ $conv_idx[] = $i;
+ // get index of first header
+ if($first_header == -1) $first_header = $i;
+ // get max level of this instructions set
+ if(!$lvl_max || ($ins[$i][1][1] < $lvl_max)) {
+ $lvl_max = $ins[$i][1][1];
+ }
+ break;
+ case 'section_open':
+ if ($flags['inline'])
+ unset($ins[$i]);
+ else
+ $conv_idx[] = $i;
+ break;
+ case 'section_close':
+ if ($flags['inline'])
+ unset($ins[$i]);
+ break;
+ case 'nest':
+ $this->adapt_links($ins[$i][1][0], $page, $included_pages);
+ break;
+ case 'plugin':
+ // FIXME skip other plugins?
+ switch($ins[$i][1][0]) {
+ case 'tag_tag': // skip tags
+ case 'discussion_comments': // skip comments
+ case 'linkback': // skip linkbacks
+ case 'data_entry': // skip data plugin
+ case 'meta': // skip meta plugin
+ case 'indexmenu_tag': // skip indexmenu sort tag
+ case 'include_sorttag': // skip include plugin sort tag
+ unset($ins[$i]);
+ break;
+ // adapt indentation level of nested includes
+ case 'include_include':
+ if (!$flags['inline'] && $flags['indent'])
+ $ins[$i][1][1][4] += $lvl;
+ break;
+ /*
+ * if there is already a closelastsecedit instruction (was added by one of the section
+ * functions), store its position but delete it as it can't be determined yet if it is needed,
+ * i.e. if there is a header which generates a section edit (depends on the levels, level
+ * adjustments, $no_header, ...)
+ */
+ case 'include_closelastsecedit':
+ $endpos = $ins[$i][1][1][0];
+ unset($ins[$i]);
+ break;
+ }
+ break;
+ default:
+ break;
+ }
+ }
+
+ // calculate difference between header/section level and include level
+ $diff = 0;
+ if (!isset($lvl_max)) $lvl_max = 0; // if no level found in target, set to 0
+ $diff = $lvl - $lvl_max + 1;
+ if ($no_header) $diff -= 1; // push up one level if "noheader"
+
+ // convert headers and set footer/permalink
+ $hdr_deleted = false;
+ $has_permalink = false;
+ $footer_lvl = false;
+ $contains_secedit = false;
+ $section_close_at = false;
+ foreach($conv_idx as $idx) {
+ if($ins[$idx][0] == 'header') {
+ if ($section_close_at === false && isset($ins[$idx+1]) && $ins[$idx+1][0] == 'section_open') {
+ // store the index of the first heading that is followed by a new section
+ // the wrap plugin creates sections without section_open so the section shouldn't be closed before them
+ $section_close_at = $idx;
+ }
+
+ if($no_header && !$hdr_deleted) {
+ unset ($ins[$idx]);
+ $hdr_deleted = true;
+ continue;
+ }
+
+ if($flags['indent']) {
+ $lvl_new = (($ins[$idx][1][1] + $diff) > 5) ? 5 : ($ins[$idx][1][1] + $diff);
+ $ins[$idx][1][1] = $lvl_new;
+ }
+
+ if($ins[$idx][1][1] <= $conf['maxseclevel'])
+ $contains_secedit = true;
+
+ // set permalink
+ if($flags['link'] && !$has_permalink && ($idx == $first_header)) {
+ $this->_permalink($ins[$idx], $page, $sect, $flags);
+ $has_permalink = true;
+ }
+
+ // set footer level
+ if(!$footer_lvl && ($idx == $first_header) && !$no_header) {
+ if($flags['indent'] && isset($lvl_new)) {
+ $footer_lvl = $lvl_new;
+ } else {
+ $footer_lvl = $lvl_max;
+ }
+ }
+ } else {
+ // it's a section
+ if($flags['indent']) {
+ $lvl_new = (($ins[$idx][1][0] + $diff) > 5) ? 5 : ($ins[$idx][1][0] + $diff);
+ $ins[$idx][1][0] = $lvl_new;
+ }
+
+ // check if noheader is used and set the footer level to the first section
+ if($no_header && !$footer_lvl) {
+ if($flags['indent'] && isset($lvl_new)) {
+ $footer_lvl = $lvl_new;
+ } else {
+ $footer_lvl = $lvl_max;
+ }
+ }
+ }
+ }
+
+ // close last open section of the included page if there is any
+ if ($contains_secedit) {
+ array_push($ins, array('plugin', array('include_closelastsecedit', array($endpos))));
+ }
+
+ $include_secid = (isset($flags['include_secid']) ? $flags['include_secid'] : NULL);
+
+ // add edit button
+ if($flags['editbtn']) {
+ $this->_editbtn($ins, $page, $sect, $sect_title, ($flags['redirect'] ? $root_id : false), $include_secid);
+ }
+
+ // add footer
+ if($flags['footer']) {
+ $ins[] = $this->_footer($page, $sect, $sect_title, $flags, $footer_lvl, $root_id);
+ }
+
+ // wrap content at the beginning of the include that is not in a section in a section
+ if ($lvl > 0 && $section_close_at !== 0 && $flags['indent'] && !$flags['inline']) {
+ if ($section_close_at === false) {
+ $ins[] = array('section_close', array());
+ array_unshift($ins, array('section_open', array($lvl)));
+ } else {
+ $section_close_idx = array_search($section_close_at, array_keys($ins));
+ if ($section_close_idx > 0) {
+ $before_ins = array_slice($ins, 0, $section_close_idx);
+ $after_ins = array_slice($ins, $section_close_idx);
+ $ins = array_merge($before_ins, array(array('section_close', array())), $after_ins);
+ array_unshift($ins, array('section_open', array($lvl)));
+ }
+ }
+ }
+
+ // add instructions entry wrapper
+ array_unshift($ins, array('plugin', array('include_wrap', array('open', $page, $flags['redirect'], $include_secid))));
+ if (isset($flags['beforeeach']))
+ array_unshift($ins, array('entity', array($flags['beforeeach'])));
+ array_push($ins, array('plugin', array('include_wrap', array('close'))));
+ if (isset($flags['aftereach']))
+ array_push($ins, array('entity', array($flags['aftereach'])));
+
+ // close previous section if any and re-open after inclusion
+ if($lvl != 0 && $this->sec_close && !$flags['inline']) {
+ array_unshift($ins, array('section_close', array()));
+ $ins[] = array('section_open', array($lvl));
+ }
+ }
+
+ /**
+ * Appends instruction item for the include plugin footer
+ *
+ * @author Michael Klier <chi@chimeric.de>
+ */
+ function _footer($page, $sect, $sect_title, $flags, $footer_lvl, $root_id) {
+ $footer = array();
+ $footer[0] = 'plugin';
+ $footer[1] = array('include_footer', array($page, $sect, $sect_title, $flags, $root_id, $footer_lvl));
+ return $footer;
+ }
+
+ /**
+ * Appends instruction item for an edit button
+ *
+ * @author Michael Klier <chi@chimeric.de>
+ */
+ function _editbtn(&$ins, $page, $sect, $sect_title, $root_id, $hid = '') {
+ $title = ($sect) ? $sect_title : $page;
+ $editbtn = array();
+ $editbtn[0] = 'plugin';
+ $editbtn[1] = array('include_editbtn', array($title, $hid));
+ $ins[] = $editbtn;
+ }
+
+ /**
+ * Convert instruction item for a permalink header
+ *
+ * @author Michael Klier <chi@chimeric.de>
+ */
+ function _permalink(&$ins, $page, $sect, $flags) {
+ $ins[0] = 'plugin';
+ $ins[1] = array('include_header', array($ins[1][0], $ins[1][1], $ins[1][2], $page, $sect, $flags));
+ }
+
+ /**
+ * Convert internal and local links depending on the included pages
+ *
+ * @param array $ins The instructions that shall be adapted
+ * @param string $page The included page
+ * @param array $included_pages The array of pages that are included
+ */
+ private function adapt_links(&$ins, $page, $included_pages = null) {
+ $num = count($ins);
+ $ns = getNS($page);
+
+ for($i=0; $i<$num; $i++) {
+ // adjust links with image titles
+ if (strpos($ins[$i][0], 'link') !== false && isset($ins[$i][1][1]) && is_array($ins[$i][1][1]) && $ins[$i][1][1]['type'] == 'internalmedia') {
+ // resolve relative ids, but without cleaning in order to preserve the name
+ $media_id = resolve_id($ns, $ins[$i][1][1]['src']);
+ // make sure that after resolving the link again it will be the same link
+ if ($media_id[0] != ':') $media_id = ':'.$media_id;
+ $ins[$i][1][1]['src'] = $media_id;
+ }
+ switch($ins[$i][0]) {
+ case 'internallink':
+ case 'internalmedia':
+ // make sure parameters aren't touched
+ $link_params = '';
+ $link_id = $ins[$i][1][0];
+ $link_parts = explode('?', $link_id, 2);
+ if (count($link_parts) === 2) {
+ $link_id = $link_parts[0];
+ $link_params = $link_parts[1];
+ }
+ // resolve the id without cleaning it
+ $link_id = resolve_id($ns, $link_id, false);
+ // this id is internal (i.e. absolute) now, add ':' to make resolve_id work again
+ if ($link_id[0] != ':') $link_id = ':'.$link_id;
+ // restore parameters
+ $ins[$i][1][0] = ($link_params != '') ? $link_id.'?'.$link_params : $link_id;
+
+ if ($ins[$i][0] == 'internallink' && !empty($included_pages)) {
+ // change links to included pages into local links
+ // only adapt links without parameters
+ $link_id = $ins[$i][1][0];
+ $link_parts = explode('?', $link_id, 2);
+ if (count($link_parts) === 1) {
+ $exists = false;
+ resolve_pageid($ns, $link_id, $exists);
+
+ $link_parts = explode('#', $link_id, 2);
+ $hash = '';
+ if (count($link_parts) === 2) {
+ list($link_id, $hash) = $link_parts;
+ }
+ if (array_key_exists($link_id, $included_pages)) {
+ if ($hash) {
+ // hopefully the hash is also unique in the including page (otherwise this might be the wrong link target)
+ $ins[$i][0] = 'locallink';
+ $ins[$i][1][0] = $hash;
+ } else {
+ // the include section ids are different from normal section ids (so they won't conflict) but this
+ // also means that the normal locallink function can't be used
+ $ins[$i][0] = 'plugin';
+ $ins[$i][1] = array('include_locallink', array($included_pages[$link_id]['hid'], $ins[$i][1][1], $ins[$i][1][0]));
+ }
+ }
+ }
+ }
+ break;
+ case 'locallink':
+ /* Convert local links to internal links if the page hasn't been fully included */
+ if ($included_pages == null || !array_key_exists($page, $included_pages)) {
+ $ins[$i][0] = 'internallink';
+ $ins[$i][1][0] = ':'.$page.'#'.$ins[$i][1][0];
+ }
+ break;
+ }
+ }
+ }
+
+ /**
+ * Get a section including its subsections
+ *
+ * @author Michael Klier <chi@chimeric.de>
+ */
+ function _get_section(&$ins, $sect) {
+ $num = count($ins);
+ $offset = false;
+ $lvl = false;
+ $end = false;
+ $endpos = null; // end position in the input text, needed for section edit buttons
+
+ $check = array(); // used for sectionID() in order to get the same ids as the xhtml renderer
+
+ for($i=0; $i<$num; $i++) {
+ if ($ins[$i][0] == 'header') {
+
+ // found the right header
+ if (sectionID($ins[$i][1][0], $check) == $sect) {
+ $offset = $i;
+ $lvl = $ins[$i][1][1];
+ } elseif ($offset && $lvl && ($ins[$i][1][1] <= $lvl)) {
+ $end = $i - $offset;
+ $endpos = $ins[$i][1][2]; // the position directly after the found section, needed for the section edit button
+ break;
+ }
+ }
+ }
+ $offset = $offset ? $offset : 0;
+ $end = $end ? $end : ($num - 1);
+ if(is_array($ins)) {
+ $ins = array_slice($ins, $offset, $end);
+ // store the end position in the include_closelastsecedit instruction so it can generate a matching button
+ $ins[] = array('plugin', array('include_closelastsecedit', array($endpos)));
+ }
+ }
+
+ /**
+ * Only display the first section of a page and a readmore link
+ *
+ * @author Michael Klier <chi@chimeric.de>
+ */
+ function _get_firstsec(&$ins, $page, $flags) {
+ $num = count($ins);
+ $first_sect = false;
+ $endpos = null; // end position in the input text
+ for($i=0; $i<$num; $i++) {
+ if($ins[$i][0] == 'section_close') {
+ $first_sect = $i;
+ }
+ if ($ins[$i][0] == 'header') {
+ /*
+ * Store the position of the last header that is encountered. As section_close/open-instruction are
+ * always (unless some plugin modifies this) around a header instruction this means that the last
+ * position that is stored here is exactly the position of the section_close/open at which the content
+ * is truncated.
+ */
+ $endpos = $ins[$i][1][2];
+ }
+ // only truncate the content and add the read more link when there is really
+ // more than that first section
+ if(($first_sect) && ($ins[$i][0] == 'section_open')) {
+ $ins = array_slice($ins, 0, $first_sect);
+ if ($flags['readmore']) {
+ $ins[] = array('plugin', array('include_readmore', array($page)));
+ }
+ $ins[] = array('section_close', array());
+ // store the end position in the include_closelastsecedit instruction so it can generate a matching button
+ $ins[] = array('plugin', array('include_closelastsecedit', array($endpos)));
+ return;
+ }
+ }
+ }
+
+ /**
+ * Gives a list of pages for a given include statement
+ *
+ * @author Michael Hamann <michael@content-space.de>
+ */
+ function _get_included_pages($mode, $page, $sect, $parent_id, $flags) {
+ global $conf;
+ $pages = array();
+ switch($mode) {
+ case 'namespace':
+ $page = cleanID($page);
+ $ns = utf8_encodeFN(str_replace(':', '/', $page));
+ // depth is absolute depth, not relative depth, but 0 has a special meaning.
+ $depth = $flags['depth'] ? $flags['depth'] + substr_count($page, ':') + ($page ? 1 : 0) : 0;
+ search($pagearrays, $conf['datadir'], 'search_allpages', array('depth' => $depth, 'skipacl' => false), $ns);
+ if (is_array($pagearrays)) {
+ foreach ($pagearrays as $pagearray) {
+ if (!isHiddenPage($pagearray['id'])) // skip hidden pages
+ $pages[] = $pagearray['id'];
+ }
+ }
+ break;
+ case 'tagtopic':
+ if (!$this->taghelper)
+ $this->taghelper = plugin_load('helper', 'tag');
+ if(!$this->taghelper) {
+ msg('You have to install the tag plugin to use this functionality!', -1);
+ return array();
+ }
+ $tag = $page;
+ $sect = '';
+ $pagearrays = $this->taghelper->getTopic('', null, $tag);
+ foreach ($pagearrays as $pagearray) {
+ $pages[] = $pagearray['id'];
+ }
+ break;
+ default:
+ $page = $this->_apply_macro($page, $parent_id);
+ resolve_pageid(getNS($parent_id), $page, $exists); // resolve shortcuts and clean ID
+ if (auth_quickaclcheck($page) >= AUTH_READ)
+ $pages[] = $page;
+ }
+
+ if (isset($flags['exclude']))
+ $pages = array_filter($pages, function ($page) use ($flags) {
+ if (@preg_match($flags['exclude'], $page))
+ return FALSE;
+ return TRUE;
+ });
+
+ if (count($pages) > 1) {
+ if ($flags['order'] === 'id') {
+ if ($flags['rsort']) {
+ usort($pages, array($this, '_r_strnatcasecmp'));
+ } else {
+ natcasesort($pages);
+ }
+ } else {
+ $ordered_pages = array();
+ foreach ($pages as $page) {
+ $key = '';
+ switch ($flags['order']) {
+ case 'title':
+ $key = p_get_first_heading($page);
+ break;
+ case 'created':
+ $key = p_get_metadata($page, 'date created', METADATA_DONT_RENDER);
+ break;
+ case 'modified':
+ $key = p_get_metadata($page, 'date modified', METADATA_DONT_RENDER);
+ break;
+ case 'indexmenu':
+ $key = p_get_metadata($page, 'indexmenu_n', METADATA_RENDER_USING_SIMPLE_CACHE);
+ if ($key === null)
+ $key = '';
+ break;
+ case 'custom':
+ $key = p_get_metadata($page, 'include_n', METADATA_RENDER_USING_SIMPLE_CACHE);
+ if ($key === null)
+ $key = '';
+ break;
+ }
+ $key .= '_'.$page;
+ $ordered_pages[$key] = $page;
+ }
+ if ($flags['rsort']) {
+ uksort($ordered_pages, array($this, '_r_strnatcasecmp'));
+ } else {
+ uksort($ordered_pages, 'strnatcasecmp');
+ }
+ $pages = $ordered_pages;
+ }
+ }
+
+ $result = array();
+ foreach ($pages as $page) {
+ $exists = page_exists($page);
+ $result[] = array('id' => $page, 'exists' => $exists, 'parent_id' => $parent_id);
+ }
+ return $result;
+ }
+
+ /**
+ * String comparisons using a "natural order" algorithm in reverse order
+ *
+ * @link http://php.net/manual/en/function.strnatcmp.php
+ * @param string $a First string
+ * @param string $b Second string
+ * @return int Similar to other string comparison functions, this one returns &lt; 0 if
+ * str1 is greater than str2; &gt;
+ * 0 if str1 is lesser than
+ * str2, and 0 if they are equal.
+ */
+ function _r_strnatcasecmp($a, $b) {
+ return strnatcasecmp($b, $a);
+ }
+
+ /**
+ * This function generates the list of all included pages from a list of metadata
+ * instructions.
+ */
+ function _get_included_pages_from_meta_instructions($instructions) {
+ $pages = array();
+ foreach ($instructions as $instruction) {
+ $mode = $instruction['mode'];
+ $page = $instruction['page'];
+ $sect = $instruction['sect'];
+ $parent_id = $instruction['parent_id'];
+ $flags = $instruction['flags'];
+ $pages = array_merge($pages, $this->_get_included_pages($mode, $page, $sect, $parent_id, $flags));
+ }
+ return $pages;
+ }
+
+ /**
+ * Get wiki language from "HTTP_ACCEPT_LANGUAGE"
+ * We allow the pattern e.g. "ja,en-US;q=0.7,en;q=0.3"
+ */
+ function _get_language_of_wiki($id, $parent_id) {
+ global $conf;
+ $result = $conf['lang'];
+ if(strpos($id, '@BROWSER_LANG@') !== false){
+ $brlangp = "/([a-zA-Z]{1,8}(-[a-zA-Z]{1,8})*|\*)(;q=(0(.[0-9]{0,3})?|1(.0{0,3})?))?/";
+ if(preg_match_all(
+ $brlangp, $_SERVER["HTTP_ACCEPT_LANGUAGE"],
+ $matches, PREG_SET_ORDER
+ )){
+ $langs = array();
+ foreach($matches as $match){
+ $langname = $match[1] == '*' ? $conf['lang'] : $match[1];
+ $qvalue = $match[4] == '' ? 1.0 : $match[4];
+ $langs[$langname] = $qvalue;
+ }
+ arsort($langs);
+ foreach($langs as $lang => $langq){
+ $testpage = $this->_apply_macro(str_replace('@BROWSER_LANG@', $lang, $id), $parent_id);
+ resolve_pageid(getNS($parent_id), $testpage, $exists);
+ if($exists){
+ $result = $lang;
+ break;
+ }
+ }
+ }
+ }
+ return cleanID($result);
+ }
+
+ /**
+ * Makes user or date dependent includes possible
+ */
+ function _apply_macro($id, $parent_id) {
+ global $USERINFO;
+ /* @var Input $INPUT */
+ global $INPUT;
+
+ // The following is basicaly copied from basicinfo() because
+ // this function can be called from within pageinfo() in
+ // p_get_metadata and thus we cannot rely on $INFO being set
+ if($INPUT->server->has('REMOTE_USER')) {
+ $user = $INPUT->server->str('REMOTE_USER');
+ } else {
+ // no registered user - use IP
+ $user = clientIP(true);
+ }
+
+ // Take user's name if possible, login name otherwise
+ if (!empty($USERINFO['name'])) {
+ $name = $USERINFO['name'];
+ } else {
+ $name = $user;
+ }
+
+ // Take first group if possible
+ if (!empty($USERINFO['grps'])) {
+ $group = $USERINFO['grps'][0];
+ } else {
+ $group = 'ALL';
+ }
+
+ $time_stamp = time();
+ if(preg_match('/@DATE(\w+)@/',$id,$matches)) {
+ switch($matches[1]) {
+ case 'PMONTH':
+ $time_stamp = strtotime("-1 month");
+ break;
+ case 'NMONTH':
+ $time_stamp = strtotime("+1 month");
+ break;
+ case 'NWEEK':
+ $time_stamp = strtotime("+1 week");
+ break;
+ case 'PWEEK':
+ $time_stamp = strtotime("-1 week");
+ break;
+ case 'TOMORROW':
+ $time_stamp = strtotime("+1 day");
+ break;
+ case 'YESTERDAY':
+ $time_stamp = strtotime("-1 day");
+ break;
+ case 'NYEAR':
+ $time_stamp = strtotime("+1 year");
+ break;
+ case 'PYEAR':
+ $time_stamp = strtotime("-1 year");
+ break;
+ }
+ $id = preg_replace('/@DATE(\w+)@/','', $id);
+ }
+
+ $replace = array(
+ '@USER@' => cleanID($user),
+ '@NAME@' => cleanID($name),
+ '@GROUP@' => cleanID($group),
+ '@BROWSER_LANG@' => $this->_get_language_of_wiki($id, $parent_id),
+ '@YEAR@' => date('Y',$time_stamp),
+ '@MONTH@' => date('m',$time_stamp),
+ '@WEEK@' => date('W',$time_stamp),
+ '@DAY@' => date('d',$time_stamp),
+ '@YEARPMONTH@' => date('Ym',strtotime("-1 month")),
+ '@PMONTH@' => date('m',strtotime("-1 month")),
+ '@NMONTH@' => date('m',strtotime("+1 month")),
+ '@YEARNMONTH@' => date('Ym',strtotime("+1 month")),
+ '@YEARPWEEK@' => date('YW',strtotime("-1 week")),
+ '@PWEEK@' => date('W',strtotime("-1 week")),
+ '@NWEEK@' => date('W',strtotime("+1 week")),
+ '@YEARNWEEK@' => date('YW',strtotime("+1 week")),
+ );
+ return str_replace(array_keys($replace), array_values($replace), $id);
+ }
+}
+// vim:ts=4:sw=4:et:
diff --git a/platform/www/lib/plugins/include/images/comment.gif b/platform/www/lib/plugins/include/images/comment.gif
new file mode 100644
index 0000000..735543c
--- /dev/null
+++ b/platform/www/lib/plugins/include/images/comment.gif
Binary files differ
diff --git a/platform/www/lib/plugins/include/images/date.gif b/platform/www/lib/plugins/include/images/date.gif
new file mode 100644
index 0000000..da61dda
--- /dev/null
+++ b/platform/www/lib/plugins/include/images/date.gif
Binary files differ
diff --git a/platform/www/lib/plugins/include/images/link.gif b/platform/www/lib/plugins/include/images/link.gif
new file mode 100644
index 0000000..ca63480
--- /dev/null
+++ b/platform/www/lib/plugins/include/images/link.gif
Binary files differ
diff --git a/platform/www/lib/plugins/include/images/user.gif b/platform/www/lib/plugins/include/images/user.gif
new file mode 100644
index 0000000..5ada7e6
--- /dev/null
+++ b/platform/www/lib/plugins/include/images/user.gif
Binary files differ
diff --git a/platform/www/lib/plugins/include/lang/ar/lang.php b/platform/www/lib/plugins/include/lang/ar/lang.php
new file mode 100644
index 0000000..2d8266e
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/ar/lang.php
@@ -0,0 +1,12 @@
+<?php
+/**
+* Arabic language file
+*
+* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+* @author Muhammad Bashir Al-Noimi <bashir.storm@gmail.com>
+* http://www.hali-sy.com
+*/
+
+// custom language strings for the plugin
+$lang['readmore'] = ' ←إقرأ المزيد... ';
+
diff --git a/platform/www/lib/plugins/include/lang/ar/settings.php b/platform/www/lib/plugins/include/lang/ar/settings.php
new file mode 100644
index 0000000..f3245a9
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/ar/settings.php
@@ -0,0 +1,20 @@
+<?php
+/**
+* Arabic language file
+*
+* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+* @author Muhammad Bashir Al-Noimi <bashir.storm@gmail.com>
+* http://www.hali-sy.com
+*/
+
+// for the configuration manager
+$lang['firstseconly'] = 'عرض القسم الأول من الصفحات المضمّنة';
+$lang['showtaglogos'] = 'عرض الصورة لأول قسم';
+$lang['showfooter'] = 'عرض معلومات الصفحة المضمّنة';
+$lang['showlink'] = 'عرض رابط التتبع للصفحة المضمّنة';
+$lang['showdate'] = 'عرض التاريخ للصفحة المضمّنة';
+$lang['showuser'] = 'عرض إسم المستخدم للصفحة المضمّنة';
+$lang['showcomments'] = 'عرض تعليقات الصفحة المضمّنة';
+$lang['showtags'] = 'عرض الأقسام أسف الصفحة المضمّنة';
+
+//Setup VIM: ex: et ts=2 :
diff --git a/platform/www/lib/plugins/include/lang/cs/lang.php b/platform/www/lib/plugins/include/lang/cs/lang.php
new file mode 100644
index 0000000..417c3ea
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/cs/lang.php
@@ -0,0 +1,10 @@
+<?php
+
+/**
+ * Czech language file (UTF-8 encoding)
+ *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Lukas Zapletal <lukas.zapletal at gmail dot com>
+ */
+$lang['readmore'] = '→ Číst dále...';
diff --git a/platform/www/lib/plugins/include/lang/cs/settings.php b/platform/www/lib/plugins/include/lang/cs/settings.php
new file mode 100644
index 0000000..bfeda4b
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/cs/settings.php
@@ -0,0 +1,41 @@
+<?php
+
+/**
+ *
+ * Czech language file (UTF-8 encoding)
+ *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Robert Surý <rsurycz@seznam.cz>
+ * @author Lukas Zapletal <lukas.zapletal at gmail dot com>
+ * @author Roman Svoboda <svoboro1 at fel.cvut dot cz>
+ */
+$lang['noheader'] = 'Nezobrazovat první záhlaví vkládaných stránek/sekcí';
+$lang['firstseconly'] = 'Zobrazovat pouze první sekci vkládaných stránek';
+$lang['showtaglogos'] = 'Zobrazovat obrázek prvních tagů';
+$lang['showfooter'] = 'Zobrazovat dole info o vkládané stránce';
+$lang['showlink'] = 'Odkaz na první titulek vkládané stránky';
+$lang['showpermalink'] = 'Zobrazovat dole permalinky vkládané stránky';
+$lang['showdate'] = 'Zobrazovat dole datum vkládané stránky';
+$lang['showmdate'] = 'Zobrazovat dole datum modifikace vkládané stránky';
+$lang['showuser'] = 'Zobrazovat dole jméno uživatele vkládané stránky';
+$lang['showcomments'] = 'Zobrazovat dole komentáře u vkládané stránky (vyžadován Discussion plugin)';
+$lang['showlinkbacks'] = 'Zobrazovat dole zpětné odkazy vkládané stránky (vyžadován Linkback plugin)';
+$lang['showtags'] = 'Zobrazovat dole tagy vkládané stránky (vyžadován Tag plugin)';
+$lang['showeditbtn'] = 'Zobrazovat tlačítko pro editaci';
+$lang['doredirect'] = 'Přesměrovat na původní stránku po provedení editace vkládané stránky';
+$lang['linkonly'] = 'Pouze odkaz na vloženou stránku namísto zobrazení obsahu';
+$lang['title'] = 'Použijte první nadpis stránky v odkazu, i když je používání nadpisů vypnuto (ovlivňuje pouze režim "jen odkazy"))';
+$lang['pageexists'] = 'Nezobrazovat odkaz, pokud stránka neexistuje (ovlivňuje pouze režim "jen odkazy")';
+$lang['parlink'] = 'Umístěte odstavec kolem odkazu (ovlivní pouze režim "jen odkazy")';
+$lang['safeindex'] = 'Zabraňte indexaci metadat z neveřejných vložených stránek';
+$lang['order_o_id'] = 'ID stránky';
+$lang['order_o_title'] = 'titulek';
+$lang['order_o_created'] = 'datum vytvoření';
+$lang['order_o_modified'] = 'datum modifikace';
+$lang['order_o_indexmenu'] = 'Vlastní pořadí se syntaxí indexmenu';
+$lang['order_o_custom'] = 'Vlastní pořadí s vloženou syntaxí';
+$lang['rsort'] = 'Obrátit pořadí řazení vkládaných stránek';
+$lang['depth'] = 'Maximální hloubka vnoření jmenných prostorů, 0 představuje neomezenou hloubku';
+$lang['readmore'] = 'Zobrazit nebo nezobrazit odkaz \'Číst více\' pouze pro případ první sekce';
+$lang['debugoutput'] = 'Tisknout podrobnější ladící informace do dokuwiki ladícího logu, pokud je povolena globální možnost "allowdebug"';
diff --git a/platform/www/lib/plugins/include/lang/da/lang.php b/platform/www/lib/plugins/include/lang/da/lang.php
new file mode 100644
index 0000000..9ad0e43
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/da/lang.php
@@ -0,0 +1,8 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Soren Birk <soer9648@eucl.dk>
+ */
+$lang['readmore'] = '→ Læs mere...';
diff --git a/platform/www/lib/plugins/include/lang/da/settings.php b/platform/www/lib/plugins/include/lang/da/settings.php
new file mode 100644
index 0000000..4c83c2b
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/da/settings.php
@@ -0,0 +1,39 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Jacob Palm <jacobpalmdk@icloud.com>
+ * @author Soren Birk <soer9648@eucl.dk>
+ */
+$lang['noheader'] = 'Vis ikke den første header for inkluderede sider/sektioner';
+$lang['firstseconly'] = 'vis kun den første sektion for inkluderede sider';
+$lang['showtaglogos'] = 'vis billede for første tag';
+$lang['showfooter'] = 'vis info på inkluderet side nedenfor';
+$lang['showlink'] = 'link første overskrift af inkluderet side';
+$lang['showpermalink'] = 'vis permalinks nedenfor inkluderet side';
+$lang['showdate'] = 'vis datoer nedenfor inkluderet side';
+$lang['showmdate'] = 'vis redigeret datoer nedenfor inkluderet side';
+$lang['showuser'] = 'vis brugernavne nedenfor inkluderet side';
+$lang['showcomments'] = 'vis kommentarer nedenfor inkluderet side (Discussion plugin nødvendigt)';
+$lang['showlinkbacks'] = 'vis linkbacks nedenfor inkluderet side (Linkback Plugin nødvendigt)';
+$lang['showtags'] = 'vis tags nedenfor inkluderet side (Tag Plugin nødvendigt)';
+$lang['showeditbtn'] = 'vis redigér-knap';
+$lang['doredirect'] = 'henvis til original side efter redigering af den inkluderede side';
+$lang['doindent'] = 'indryk inkluderede sider relativt i forhold til siden de inkluderes i';
+$lang['linkonly'] = 'link udelukkende til den inkluderede side i stedet for at vise indholdet';
+$lang['title'] = 'benyt sidens første overskrift i link, selvom useheading er slået fra (har kun effekt på linkonly-tilstand)';
+$lang['pageexists'] = 'Vis ikke et link hvis siden ikke findes (har kun effekt på linkonly-tilstand)';
+$lang['parlink'] = 'omkreds linket i et afsnit (har kun effekt på linkonly-tilstand)';
+$lang['safeindex'] = 'undgå indeksering af metadata fra ikke-offentlige inkluderede sider';
+$lang['order'] = 'kriterier til rækkefølge for inkluderede med adskellige sider';
+$lang['order_o_id'] = 'side-ID';
+$lang['order_o_title'] = 'titel';
+$lang['order_o_created'] = 'oprettelsesdato';
+$lang['order_o_modified'] = 'dato for modifikation';
+$lang['order_o_indexmenu'] = 'brugerdefineret orden med indexmenu-syntaks';
+$lang['order_o_custom'] = 'brugerdefineret orden med inkludér-syntaks';
+$lang['rsort'] = 'vend rækkefølgen for sortering af inkluderede sider';
+$lang['depth'] = 'maksimum dybde af inkluderede navnerum, 0 for uendelig dybde';
+$lang['readmore'] = 'Vis eller skjul "Læs mere" linket hvis kun den første sektion af inkluderede sider viser';
+$lang['debugoutput'] = 'Skriv udvidet debug information til DokuWiki debugloggen, hvis den globale indstilling "allowdebug" er slået til';
diff --git a/platform/www/lib/plugins/include/lang/de-informal/lang.php b/platform/www/lib/plugins/include/lang/de-informal/lang.php
new file mode 100644
index 0000000..dc75a53
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/de-informal/lang.php
@@ -0,0 +1,8 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Esther Brunner <wikidesign@gmail.com>
+ */
+$lang['readmore'] = '→ Weiterlesen...';
diff --git a/platform/www/lib/plugins/include/lang/de-informal/settings.php b/platform/www/lib/plugins/include/lang/de-informal/settings.php
new file mode 100644
index 0000000..5076b1b
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/de-informal/settings.php
@@ -0,0 +1,39 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author F. Mueller-Donath <j.felix@mueller-donath.de>
+ * @author Esther Brunner <wikidesign@gmail.com>
+ */
+$lang['noheader'] = 'Erste Überschrift von eingeschlossenen Seiten/Sektionen nicht anzeigen';
+$lang['firstseconly'] = 'Nur ersten Abschnitt von eingebundenen Seiten anzeigen';
+$lang['showtaglogos'] = 'Bild für erstes Tag anzeigen';
+$lang['showfooter'] = 'Infos über eingebundene Seite darunter anzeigen';
+$lang['showlink'] = 'Erste Überschrift der eingebundenen Seite als Link anzeigen';
+$lang['showpermalink'] = 'Permalink unter eingebunderer Seite anzeigen';
+$lang['showdate'] = 'Datum unter eingebundender Seite anzeigen';
+$lang['showmdate'] = 'Änderungsdatum unter eingebundener Seite anzeigen';
+$lang['showuser'] = 'Autorenname unter eingebundener Seite anzeigen';
+$lang['showcomments'] = 'Kommentare unter eingebundener Seite anzeigen (Discussion Plugin wird benötigt)';
+$lang['showlinkbacks'] = 'Linkbacks unter eingebundener Seite anzeigen (Linkback Plugin wird benötigt)';
+$lang['showtags'] = 'Tags unter eingebundener Seite anzeigen (Tag Plugin wird benötigt)';
+$lang['showeditbtn'] = 'Bearbeiten-Button anzeigen';
+$lang['doredirect'] = 'Nach dem Bearbeiten der eingebundenen Seite zur ursprünglichen Seite weiterleiten';
+$lang['doindent'] = 'Eingebundene Seiten relativ zur Seite, in der sie eingebunden sind einrücken';
+$lang['linkonly'] = 'Nur einen Link anzeigen statt dem Inhalt der eingebundenen Seite';
+$lang['title'] = 'Erste Überschrift im Link benutzen auch wenn "useheading" ausgeschaltet ist (betrifft nur den "linkonly"-Modus)';
+$lang['pageexists'] = 'Keinen Link anzeigen, wenn die verlinkte Seite nicht existiert (betrifft nur den "linkonly"-Modus)';
+$lang['parlink'] = 'Einen Absatz um den Link herum anzeigen (betrifft nur den "linkonly"-Modus)';
+$lang['safeindex'] = 'Verhindere das Indizieren von Metadaten auf eingebundenen, nicht öffentlichen Seiten';
+$lang['order'] = 'Sortierkriterium beim Einfügen von mehreren Seiten';
+$lang['order_o_id'] = 'Seiten ID';
+$lang['order_o_title'] = 'Titel';
+$lang['order_o_created'] = 'Erstellungsdatum';
+$lang['order_o_modified'] = 'Änderungsdatum';
+$lang['order_o_indexmenu'] = 'Benutzerdefinierte Reihenfolge mit Indexmenu Syntax';
+$lang['order_o_custom'] = 'Benutzerdefinierte Reihenfolge mit Include Syntax';
+$lang['rsort'] = 'Umgekehrte Reihenfolge bei der Sortierung von eingefügten Seiten';
+$lang['depth'] = 'Maximale Tiefe von Namensräumen, 0 für alle Ebenen';
+$lang['readmore'] = '\'Weiterlesen\'-Link bei aktiviertem "firstseconly"-Modus anzeigen';
+$lang['debugoutput'] = 'Ausführliche Informationen in das Debuglog des Dokuwikis schreiben (setzt voraus, dass die globale Option "allowdebug" aktiviert ist).';
diff --git a/platform/www/lib/plugins/include/lang/de/lang.php b/platform/www/lib/plugins/include/lang/de/lang.php
new file mode 100644
index 0000000..dc75a53
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/de/lang.php
@@ -0,0 +1,8 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Esther Brunner <wikidesign@gmail.com>
+ */
+$lang['readmore'] = '→ Weiterlesen...';
diff --git a/platform/www/lib/plugins/include/lang/de/settings.php b/platform/www/lib/plugins/include/lang/de/settings.php
new file mode 100644
index 0000000..9ed7a79
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/de/settings.php
@@ -0,0 +1,42 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author F. Mueller-Donath <j.felix@mueller-donath.de>
+ * @author Esther Brunner <wikidesign@gmail.com>
+ * @author Dominik Eckelmann <deckelmann@gmail.com>
+ * @author Christian Paul <info@jaller.de>
+ * @author Dana <dannax3@gmx.de>
+ */
+$lang['noheader'] = 'Erste Überschrift von eingeschlossenen Seiten/Sektionen nicht anzeigen';
+$lang['firstseconly'] = 'Nur ersten Abschnitt von eingebundenen Seiten anzeigen';
+$lang['showtaglogos'] = 'Bild für erstes Tag anzeigen';
+$lang['showfooter'] = 'Infos über eingebundene Seite darunter anzeigen';
+$lang['showlink'] = 'Erste Überschrift der eingebundenen Seite als Link anzeigen';
+$lang['showpermalink'] = 'Permalink unter eingebunderer Seite anzeigen';
+$lang['showdate'] = 'Datum unter eingebunderer Seite anzeigen';
+$lang['showmdate'] = 'Änderungsdatum unter eingebundener Seite anzeigen';
+$lang['showuser'] = 'Autorenname unter eingebundener Seite anzeigen';
+$lang['showcomments'] = 'Kommentare unter eingebundener Seite anzeigen (Discussion Plugin wird benötigt)';
+$lang['showlinkbacks'] = 'Linkbacks unter eingebundener Seite anzeigen (Linkback Plugin wird benötigt)';
+$lang['showtags'] = 'Tags unter eingebundener Seite anzeigen (Tag Plugin wird benötigt)';
+$lang['showeditbtn'] = 'Bearbeiten-Button anzeigen';
+$lang['doredirect'] = 'Nach dem Bearbeiten der eingebundenen Seite zur ursprünglichen Seite weiterleiten';
+$lang['doindent'] = 'Eingebundene Seiten relativ zur Seite, in der sie eingebunden sind einrücken';
+$lang['linkonly'] = 'Nur einen Link anzeigen statt dem Inhalt der eingebundenen Seite';
+$lang['title'] = 'Erste Überschrift im Link benutzen auch wenn "useheading" ausgeschaltet ist (betrifft nur den "linkonly"-Modus)';
+$lang['pageexists'] = 'Keinen Link anzeigen, wenn die verlinkte Seite nicht existiert (betrifft nur den "linkonly"-Modus)';
+$lang['parlink'] = 'Einen Absatz um den Link herum anzeigen (betrifft nur den "linkonly"-Modus)';
+$lang['safeindex'] = 'Verhindere das Indizieren von Metadaten auf eingebundenen, nicht öffentlichen Seiten';
+$lang['order'] = 'Sortierkriterium beim Einfügen von mehreren Seiten';
+$lang['order_o_id'] = 'Seiten ID';
+$lang['order_o_title'] = 'Titel';
+$lang['order_o_created'] = 'Erstellungsdatum';
+$lang['order_o_modified'] = 'Änderungsdatum';
+$lang['order_o_indexmenu'] = 'Benutzerdefinierte Reihenfolge mit Indexmenu Syntax.';
+$lang['order_o_custom'] = 'Benutzerdefinierte Reihenfolge mit Include Syntax';
+$lang['rsort'] = 'Umgekehrte Reihenfolge bei der Sortierung von eingefügten Seiten';
+$lang['depth'] = 'Maximale Tiefe von Namensräumen, 0 für alle Ebenen';
+$lang['readmore'] = 'Zeige einen \'Weiterlesen\'-Link bei aktiviertem "firstseconly"-Modus';
+$lang['debugoutput'] = 'Ausführliche Informationen in das Debuglog des Dokuwikis schreiben (setzt voraus, dass die globale Option "allowdebug" aktiviert ist).';
diff --git a/platform/www/lib/plugins/include/lang/en/lang.php b/platform/www/lib/plugins/include/lang/en/lang.php
new file mode 100644
index 0000000..2204c39
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/en/lang.php
@@ -0,0 +1,12 @@
+<?php
+/**
+ * English language file
+ *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author Esther Brunner <wikidesign@gmail.com>
+ */
+
+// custom language strings for the plugin
+$lang['readmore'] = '→ Read more...';
+
+//Setup VIM: ex: et ts=2 : \ No newline at end of file
diff --git a/platform/www/lib/plugins/include/lang/en/settings.php b/platform/www/lib/plugins/include/lang/en/settings.php
new file mode 100644
index 0000000..8aec307
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/en/settings.php
@@ -0,0 +1,41 @@
+<?php
+/**
+ * English language file
+ *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author Esther Brunner <wikidesign@gmail.com>
+ */
+
+// for the configuration manager
+$lang['noheader'] = 'Don\'t show the first header of included pages/sections';
+$lang['firstseconly'] = 'Show only the first section of included pages';
+$lang['showtaglogos'] = 'Show image for first tag';
+$lang['showfooter'] = 'Show info about included page below';
+$lang['showlink'] = 'Link first headline of included page';
+$lang['showpermalink'] = 'Show permalinks below included page';
+$lang['showdate'] = 'Show dates below included page';
+$lang['showmdate'] = 'Show modified dates below included page';
+$lang['showuser'] = 'Show usernames below included page';
+$lang['showcomments'] = 'Show comments below included page (Discussion plugin needed)';
+$lang['showlinkbacks'] = 'Show linkbacks below included page (Linkback Plugin needed)';
+$lang['showtags'] = 'Show tags below included page (Tag Plugin needed)';
+$lang['showeditbtn'] = 'Show edit button';
+$lang['doredirect'] = 'Redirect to the original page after editing the included page';
+$lang['doindent'] = 'Indent included pages relative to the page they get included in';
+$lang['linkonly'] = 'Link only to the included page instead of showing the content';
+$lang['title'] = 'Use first heading of page in link even if useheading is off (only affects linkonly mode)';
+$lang['pageexists'] = 'Do not display a link if the page does not exist (only affects linkonly mode)';
+$lang['parlink'] = 'Put a paragraph around the link (only affects linkonly mode)';
+$lang['safeindex'] = 'Prevent indexing of metadata from non-public included pages';
+$lang['order'] = 'Ordering criteria of includes with multiple pages';
+$lang['order_o_id'] = 'page ID';
+$lang['order_o_title'] = 'title';
+$lang['order_o_created'] = 'creation date';
+$lang['order_o_modified'] = 'modification date';
+$lang['order_o_indexmenu'] = 'custom order with indexmenu syntax';
+$lang['order_o_custom'] = 'custom order with include syntax';
+$lang['rsort'] = 'Reverse the sort order of the included pages';
+$lang['depth'] = 'Maximum depth of namespace includes, 0 for unlimited depth';
+$lang['readmore'] = 'Show or not the \'Read More\' link in case of firstsection only';
+$lang['debugoutput'] = 'Print verbose debug information to the dokuwiki debuglog if the global "allowdebug" option is enabled';
+//Setup VIM: ex: et ts=2 :
diff --git a/platform/www/lib/plugins/include/lang/eo/lang.php b/platform/www/lib/plugins/include/lang/eo/lang.php
new file mode 100644
index 0000000..e8dc40f
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/eo/lang.php
@@ -0,0 +1,8 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Robert Bogenschneider <bogi@uea.org>
+ */
+$lang['readmore'] = '→ Legi plu...';
diff --git a/platform/www/lib/plugins/include/lang/eo/settings.php b/platform/www/lib/plugins/include/lang/eo/settings.php
new file mode 100644
index 0000000..61ec14e
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/eo/settings.php
@@ -0,0 +1,38 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Robert Bogenschneider <bogi@uea.org>
+ * @author Robert Bogenschneider <robog@gmx.de>
+ */
+$lang['noheader'] = 'Ne montri la unuan alineon de inkluditaj paĝoj/sekcioj';
+$lang['firstseconly'] = 'montri nur la unuan sekcion de inkluditaj paĝoj';
+$lang['showtaglogos'] = 'montri bildon por la unua etikedo';
+$lang['showfooter'] = 'montri informojn pri inkludita paĝo sube';
+$lang['showlink'] = 'ligilo al la unua kaplinio de inkludita paĝo';
+$lang['showpermalink'] = 'montri permaligilojn sub inkludita paĝo';
+$lang['showdate'] = 'montri daton sub inkludita paĝo';
+$lang['showmdate'] = 'montri modif-daton sub inkludita paĝo';
+$lang['showuser'] = 'montri uzantonomojn sub inkludita paĝo';
+$lang['showcomments'] = 'montri komentojn sub inkludita paĝo (kromaĵo discussion bezonata)';
+$lang['showlinkbacks'] = 'montri retroligilojn sub inkludita paĝo (kromaĵo linkback bezonata)';
+$lang['showtags'] = 'montri etikedojn sub inkludita paĝo (kromaĵo tag bezonata)';
+$lang['showeditbtn'] = 'montri butonon por modifi';
+$lang['doredirect'] = 'redirekti al la origina paĝo post modifado de la inkludita paĝo';
+$lang['doindent'] = 'ŝovi inkluditajn paĝojn relative al la inkludanta paĝo';
+$lang['linkonly'] = 'nur ligi, ne montri la enhavon de la inkludita paĝo';
+$lang['title'] = 'uzi la unuan titolon de paĝo en ligilo eĉ se useheading estas blokita (koncernas nur linkonly-moduson)';
+$lang['pageexists'] = 'ne montri ligilon, se la paĝo ne ekzistas (koncernas nur linkonly-moduson)';
+$lang['parlink'] = 'meti alineon ĉirkaŭ ligilon (koncernas nur linkonly-moduson)';
+$lang['safeindex'] = 'eviti indeksadon de metadatumoj de nepublikaj inkluditaj paĝoj';
+$lang['order'] = 'ordigi inkludojn de multaj paĝoj laŭ';
+$lang['order_o_id'] = 'paĝnomo';
+$lang['order_o_title'] = 'titolo';
+$lang['order_o_created'] = 'krea dato';
+$lang['order_o_modified'] = 'modifa dato';
+$lang['order_o_indexmenu'] = 'propra ordo per indexmenu-sintakso';
+$lang['order_o_custom'] = 'propra ordo per include-sintakso';
+$lang['rsort'] = 'inversigi la ordon de la inkluditaj paĝoj';
+$lang['depth'] = 'maksimuma profundeco de nomspaco-inkludoj, 0 por senlima profundeco';
+$lang['readmore'] = 'Ĉu montri la \'Legi plu\'-ligilon por la opcio unua alineo';
diff --git a/platform/www/lib/plugins/include/lang/es/lang.php b/platform/www/lib/plugins/include/lang/es/lang.php
new file mode 100644
index 0000000..c41837e
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/es/lang.php
@@ -0,0 +1,12 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * Archivo en español
+ *
+ * @licencia GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @autor Esther Brunner <wikidesign@gmail.com>
+ *
+ */
+$lang['readmore'] = 'Leer más...';
diff --git a/platform/www/lib/plugins/include/lang/es/settings.php b/platform/www/lib/plugins/include/lang/es/settings.php
new file mode 100644
index 0000000..b18d02b
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/es/settings.php
@@ -0,0 +1,41 @@
+<?php
+
+/**
+ * Spanish language file
+ *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Luna Frax <lunafrax@gmail.com>
+ * @author Herman Fabián Sandoval Manrique <hfsandovalm@emzac.com>
+ */
+$lang['noheader'] = 'No mostrar el primer encabezado de las páginas/secciones incluidas';
+$lang['firstseconly'] = 'mostrar solamente la primera sección de las entradas al blog';
+$lang['showtaglogos'] = 'mostrar imagen para la primera etiqueta';
+$lang['showfooter'] = 'mostrar en la parte inferior información acerca de la entrada al blog';
+$lang['showlink'] = 'mostrar los enlaces a continuación de las entradas al blog';
+$lang['showpermalink'] = 'Mostrar los enlaces permanentes debajo de la página incluida';
+$lang['showdate'] = 'mostrar la fecha a continuación de las entradas al blog';
+$lang['showmdate'] = 'Mostrar las fechas modificadas debajo de la página incluida ';
+$lang['showuser'] = 'mostrar los nombres de usuarios a continuación de las entradas al blog';
+$lang['showcomments'] = 'mostrar comentarios a continuación de las entradas al blog';
+$lang['showlinkbacks'] = 'Mostrar los enlaces entrantes de la página incluida (se necesita Linkback Plugin) ';
+$lang['showtags'] = 'mostrar etiquetas a continuación de la entrada al blog';
+$lang['showeditbtn'] = 'Mostrar el botón de edición ';
+$lang['doredirect'] = 'Redirigir a la página original después de editar la página incluida ';
+$lang['doindent'] = 'Páginas incluidas en sangría relativas a la página en la que se incluyen';
+$lang['linkonly'] = 'Enlazar sólo con la página incluida en lugar de mostrar el contenido ';
+$lang['title'] = 'Usar el primer encabezado de la página en el enlace aunque el encabezado de uso esté desactivado (sólo afecta al modo de sólo enlace) ';
+$lang['pageexists'] = 'No mostrar un enlace si la página no existe (sólo afecta al modo de sólo enlace)';
+$lang['parlink'] = 'Poner un párrafo alrededor del enlace (sólo afecta al modo de sólo enlace) ';
+$lang['safeindex'] = 'Impedir la indización de metadatos de páginas incluidas no públicas';
+$lang['order'] = 'Criterios de clasificación de las entradas con varias páginas';
+$lang['order_o_id'] = 'Página de identificación';
+$lang['order_o_title'] = 'Título';
+$lang['order_o_created'] = 'Crear fecha';
+$lang['order_o_modified'] = 'Modificar fecha';
+$lang['order_o_indexmenu'] = 'orden personalizado con indexmenu syntax';
+$lang['order_o_custom'] = 'orden personalizado con el syntax incluido';
+$lang['rsort'] = 'Invertir el orden de las páginas incluidas';
+$lang['depth'] = 'El anchor máximo del espacio de nombre incluido, 0 para un anchor ilimitado';
+$lang['readmore'] = 'Mostrar o no el enlace "Leer más" sólo en caso de primera sección ';
+$lang['debugoutput'] = 'Imprimir información de depuración verbosa en el registro de depuración de DokuWiki si la opción global "allowdebug" está activada';
diff --git a/platform/www/lib/plugins/include/lang/fr/lang.php b/platform/www/lib/plugins/include/lang/fr/lang.php
new file mode 100644
index 0000000..a456138
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/fr/lang.php
@@ -0,0 +1,8 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Damien Raude-Morvan <drazzib@drazzib.com>
+ */
+$lang['readmore'] = 'Lire la suite...';
diff --git a/platform/www/lib/plugins/include/lang/fr/settings.php b/platform/www/lib/plugins/include/lang/fr/settings.php
new file mode 100644
index 0000000..5e3519d
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/fr/settings.php
@@ -0,0 +1,44 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Damien Raude-Morvan <drazzib@drazzib.com>
+ * @author Stanislas Reltgen <stanislas@reltgen.net>
+ * @author bruno <bruno@ninesys.fr>
+ * @author Christian "Na_kai" Sueur <sueur.christian@gmail.com>
+ * @author Fabrice Dejaigher <fabrice@chtiland.com>
+ * @author Schplurtz le Déboulonné <schplurtz@laposte.net>
+ * @author Olivier Humbert <trebmuh@tuxfamily.org>
+ */
+$lang['noheader'] = 'Ne pas afficher la première en-tête de pages / sections incluse';
+$lang['firstseconly'] = 'Afficher uniquement la première section des billets';
+$lang['showtaglogos'] = 'Afficher l\'image de la première balise';
+$lang['showfooter'] = 'Montrer les infos sur la page incluse en dessous';
+$lang['showlink'] = 'Utiliser la première en-tête comme un lien vers la page incluse';
+$lang['showpermalink'] = 'Afficher les permaliens sous la page incluse';
+$lang['showdate'] = 'Afficher les dates sous la page incluse';
+$lang['showmdate'] = 'Afficher les dates de modification sous la page incluse';
+$lang['showuser'] = 'Afficher le nom de l\'utilisateur sous la page incluse';
+$lang['showcomments'] = 'Afficher les commentaires sous la page incluse (greffon Discussion requis)';
+$lang['showlinkbacks'] = 'Afficher les liens pointants vers la page sous la page incluse (greffon Linkback requis)';
+$lang['showtags'] = 'Afficher les étiquettes (tags) sous la page incluse (greffon Tag requis)';
+$lang['showeditbtn'] = 'Afficher le bouton d\'édition';
+$lang['doredirect'] = 'Rediriger vers la page d\'origine après l\'édition de la page incluse';
+$lang['doindent'] = 'Indenter les pages incluses par rapport à la page où elles sont incluses';
+$lang['linkonly'] = 'Faire un lien vers la page incluse plutôt que d\'afficher son contenu';
+$lang['title'] = 'Utiliser la première en-tête de la page pour le lien même si l\'option \'useheading\' n\'est pas activée (ne concerne que le mode \'lien seul\')';
+$lang['pageexists'] = 'Ne pas afficher un lien si la page n\'existe pas (ne concerne que le mode \'lien seul\')';
+$lang['parlink'] = 'Mettre le lien dans un paragraphe (ne concerne que le mode \'lien seul\')';
+$lang['safeindex'] = 'Empêcher l\'indexation des métadonnées à partir de pages incluses non-publiques';
+$lang['order'] = 'Critère de tri des inclusions multi-pages';
+$lang['order_o_id'] = 'Page ID';
+$lang['order_o_title'] = 'Titre';
+$lang['order_o_created'] = 'Date de création';
+$lang['order_o_modified'] = 'Date de modification';
+$lang['order_o_indexmenu'] = 'Ordre personnalisé avec la syntaxe de menu d\'index';
+$lang['order_o_custom'] = 'Ordre personnalisé avec la syntaxe inclure';
+$lang['rsort'] = 'Inverser l\'ordre de tri des pages incluses';
+$lang['depth'] = 'Profondeur maximale d\'inclusion de l\'espace de nom (namespace), 0 pour une profondeur illimitée';
+$lang['readmore'] = 'Affiche - ou pas - le lien \'Lire la suite\' dans le cas de l\'affichage de la première section seule';
+$lang['debugoutput'] = 'Afficher des informations de débogage verbeuses dans le journal de débogage de DokuWiki lorsque l\'option globale "allowdebug" est activée.';
diff --git a/platform/www/lib/plugins/include/lang/hr/lang.php b/platform/www/lib/plugins/include/lang/hr/lang.php
new file mode 100644
index 0000000..fad0fe3
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/hr/lang.php
@@ -0,0 +1,8 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Davor Turkalj <turki.bsc@gmail.com>
+ */
+$lang['readmore'] = '--> Pročitaj više...';
diff --git a/platform/www/lib/plugins/include/lang/hr/settings.php b/platform/www/lib/plugins/include/lang/hr/settings.php
new file mode 100644
index 0000000..12d6fa5
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/hr/settings.php
@@ -0,0 +1,38 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Davor Turkalj <turki.bsc@gmail.com>
+ */
+$lang['noheader'] = 'Ne prikazuj prvi naslov uključene stranice/odjeljka';
+$lang['firstseconly'] = 'Prikaži samo prvi odjeljak uključenih stranica';
+$lang['showtaglogos'] = 'Prikaži sliku za prvu oznaku';
+$lang['showfooter'] = 'Prikaži na kraju info o uključenoj stranici';
+$lang['showlink'] = 'Poveži prvi naslov uključenih stranica';
+$lang['showpermalink'] = 'Prikaži stalne veze ispod uključene stranice';
+$lang['showdate'] = 'Prikaži datume ispod uključene stranice';
+$lang['showmdate'] = 'Prikaži datume izmjene ispod uključene stranice';
+$lang['showuser'] = 'Prikaži korisnička imena ispod uključene stranice';
+$lang['showcomments'] = 'Prikaži komentare ispod uključene stranice (potreban dodatak Discussion)';
+$lang['showlinkbacks'] = 'Prikaži povratne linkove ispod uključene stranice (potreban dodatak Linkback)';
+$lang['showtags'] = 'Prikaži oznake ispod uključene stranice (potreban dodatak Tag)';
+$lang['showeditbtn'] = 'Prikaži dugme za izmjenu';
+$lang['doredirect'] = 'Preusmjeri na originalnu stranicu nakon uređivanja uključene stranice';
+$lang['doindent'] = 'Uvuci uključenu stranicu relativno prema stranici na kojoj je uključena';
+$lang['linkonly'] = 'Prikaži poveznicu na uključenu stranicu umjesto njenog sadržaja';
+$lang['title'] = 'Koristi prvi naslov na stranici u poveznici čak i kada je "useheading" isključen (utječe samo na linkonly mod)';
+$lang['pageexists'] = 'Ne prikazuj link ako stranica ne postoji (utječe samo na linkonly mod)';
+$lang['parlink'] = 'Postavi paragraf oko poveznice (utječe samo na linkonly mod)';
+$lang['safeindex'] = 'Spriječi indeksiranje meta-podataka od uključenih stranica koje nisu javne';
+$lang['order'] = 'Uvjeti redosljeda pri uključenju više stranica';
+$lang['order_o_id'] = 'ID stranice';
+$lang['order_o_title'] = 'naslov';
+$lang['order_o_created'] = 'datum kreiranja';
+$lang['order_o_modified'] = 'datum modificiranja';
+$lang['order_o_indexmenu'] = 'poseban redoslijed prema "indexmenu" sintaksi';
+$lang['order_o_custom'] = 'poseban redoslijed prema "include" sintaksi';
+$lang['rsort'] = 'Obrnuti redoslijed uključenih stranica';
+$lang['depth'] = 'Maksimalna dubina uključenog imenskog prostora, 0 za neograničenu dubinu';
+$lang['readmore'] = 'Prikazati ili ne \'Pročitaj više\' u slučaju prikaza samo prvog odjeljka';
+$lang['debugoutput'] = 'Ispisuj dodatne informacije u debug logu dokuwiki-a, ako je omogućena globalna opcija "allowdebug"';
diff --git a/platform/www/lib/plugins/include/lang/hu/lang.php b/platform/www/lib/plugins/include/lang/hu/lang.php
new file mode 100644
index 0000000..6ef1001
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/hu/lang.php
@@ -0,0 +1,9 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Norbert Csík <norbert.csik@gmail.com>
+ * @author DelD <deldadam@gmail.com>
+ */
+$lang['readmore'] = 'Tovább...';
diff --git a/platform/www/lib/plugins/include/lang/hu/settings.php b/platform/www/lib/plugins/include/lang/hu/settings.php
new file mode 100644
index 0000000..352cfbe
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/hu/settings.php
@@ -0,0 +1,39 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Norbert Csík <norbert.csik@gmail.com>
+ * @author DelD <deldadam@gmail.com>
+ */
+$lang['noheader'] = 'Csatolt oldal/szakasz első címsorának elrejtése';
+$lang['firstseconly'] = 'Csak a csatolt oldal első bekezdésének megjelenítése';
+$lang['showtaglogos'] = 'Első címke képének megjelenítése';
+$lang['showfooter'] = 'Csatolt oldal adatainak megjelenítése lent';
+$lang['showlink'] = 'Csatolt oldal első címsora hivatkozásként';
+$lang['showpermalink'] = 'Állandó hivatkozások megjelenítése csatolt oldal alatt';
+$lang['showdate'] = 'Dátumok megjelenítése csatolt oldal alatt';
+$lang['showmdate'] = 'Módosítási dátum megjelenítése csatolt oldal alatt';
+$lang['showuser'] = 'Felhasználónevek megjelenítése csatolt oldal alatt';
+$lang['showcomments'] = 'Hozzászólások megjelenítése csatolt oldal alatt (a \'Discussion\' bővítmény szükséges hozzá)';
+$lang['showlinkbacks'] = 'Visszamutató hivatkozások megjelenítése csatolt oldal alatt (a \'Linkback\' bővítmény szükséges hozzá)';
+$lang['showtags'] = 'Címkék megjelenítése a csatolt oldal alatt (a \'Tag\' bővítmény szükséges hozzá)';
+$lang['showeditbtn'] = '\'Oldal szerkesztése\' gomb megjelenítése';
+$lang['doredirect'] = 'Átirányítás az eredeti oldalra a csatolt oldal szerkesztése után';
+$lang['usernamespace'] = 'Felhasználói oldalak névtere';
+$lang['doindent'] = 'Csatolt oldal behúzása relatíve ahhoz az oldalhoz, amelyhez csatolták';
+$lang['linkonly'] = 'Csak a csatolt oldalra mutató hivatkozás megjelenítése a teljes oldal tartalma helyett';
+$lang['title'] = 'Oldal első címsorának használat a hivatkozásban akkor is, ha a \'useheadin\' beállítás tiltott (csak akkor van hatása, ha csatolt oldal tartalma helyett hivatkozás jelenik meg)';
+$lang['pageexists'] = 'Csatolt oldal hivatkozásának elrejtése, ha az oldal még nem létezik (csak akkor van hatása, ha csatolt oldal tartalma helyett hivatkozás jelenik meg)';
+$lang['parlink'] = 'Hivatkozás elhelyezése bekezdéscímkék (<p>) között (csak akkor van hatása, ha csatolt oldal tartalma helyett hivatkozás jelenik meg)';
+$lang['safeindex'] = 'Nem nyilvános, csatolt oldalak metaadai indexelésének tiltása';
+$lang['order'] = 'Rendezési feltételek több oldal csatolása esetén';
+$lang['order_o_id'] = 'Oldalazonosító (ID)';
+$lang['order_o_title'] = 'Cím';
+$lang['order_o_created'] = 'Létrehozás dátuma';
+$lang['order_o_modified'] = 'Módosítás dátuma';
+$lang['order_o_indexmenu'] = 'Tetszőleges sorrend indexmenü szintaxisával';
+$lang['order_o_custom'] = 'Tetszőleges sorrend csatoló (include) szintaxisával';
+$lang['rsort'] = 'Csatolt oldalak sorrendjének megfordítása';
+$lang['depth'] = 'Csatolások névtereinek max. mélysége (0=végtelen)';
+$lang['readmore'] = '\'Tovább...\' hivatkozás megjelenítése, ha a csatolt oldalnak csak az első bekezdése látszik';
diff --git a/platform/www/lib/plugins/include/lang/it/lang.php b/platform/www/lib/plugins/include/lang/it/lang.php
new file mode 100644
index 0000000..c7c7401
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/it/lang.php
@@ -0,0 +1,10 @@
+<?php
+
+/**
+ * Italian language file
+ *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Niccolo Rigacci <niccolo@rigacci.org>
+ */
+$lang['readmore'] = '→ Leggi tutto...';
diff --git a/platform/www/lib/plugins/include/lang/it/settings.php b/platform/www/lib/plugins/include/lang/it/settings.php
new file mode 100644
index 0000000..2f5ec5a
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/it/settings.php
@@ -0,0 +1,29 @@
+<?php
+
+/**
+ * Italian language file
+ *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Riccardo <riccardo.furlato@gmail.com>
+ * @author Niccolo Rigacci <niccolo@rigacci.org>
+ */
+$lang['noheader'] = 'Non mostrare la prima intestazione di pagine o sezioni incluse';
+$lang['firstseconly'] = 'Mostra nel blog solo la prima sezione degli articoli';
+$lang['showtaglogos'] = 'Mostra l\'immagine per il primo tag';
+$lang['showfooter'] = 'Mostra sotto informazioni sulla pagina inclusa';
+$lang['showlink'] = 'Mostra un link all\'articolo sotto le voci del blog';
+$lang['showpermalink'] = 'Mostra i permalinks sotto alla pagina inclusa';
+$lang['showdate'] = 'Mostra la data sotto le voci del blog';
+$lang['showmdate'] = 'Mostra i dati modificati sotto alla pagina inclusa';
+$lang['showuser'] = 'Mostra il nome dell\'autore sotto le voci del blog';
+$lang['showcomments'] = 'Mostra i commenti sotto alla pagina inclusa (serve il plugin Discussion)';
+$lang['showeditbtn'] = 'Mostra il pulsante modifica';
+$lang['doredirect'] = 'Torna alla pagina originale dopo aver editato la pagina inclusa';
+$lang['doindent'] = 'Indenta le pagine incluse relativamente alla pagina dove sono state incluse';
+$lang['linkonly'] = 'Mostra solo il link alla pagina inclusa invece di mostrarne il contenuto';
+$lang['order_o_id'] = 'ID della pagina';
+$lang['order_o_title'] = 'titolo';
+$lang['order_o_created'] = 'data di creazione';
+$lang['order_o_modified'] = 'data di modifica';
+$lang['rsort'] = 'Inverti l\'ordine delle pagine incluse';
diff --git a/platform/www/lib/plugins/include/lang/ja/lang.php b/platform/www/lib/plugins/include/lang/ja/lang.php
new file mode 100644
index 0000000..87db665
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/ja/lang.php
@@ -0,0 +1,8 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Satoshi Sahara <sahara.satoshi@gmail.com>
+ */
+$lang['readmore'] = '→ 続き...';
diff --git a/platform/www/lib/plugins/include/lang/ja/settings.php b/platform/www/lib/plugins/include/lang/ja/settings.php
new file mode 100644
index 0000000..1231338
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/ja/settings.php
@@ -0,0 +1,39 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Satoshi Sahara <sahara.satoshi@gmail.com>
+ * @author Hideaki SAWADA <chuno@live.jp>
+ */
+$lang['noheader'] = 'インクルードするページまたはセクションの最初の見だしを表示しない';
+$lang['firstseconly'] = 'インクルードするページの最初のセクションだけを表示する';
+$lang['showtaglogos'] = '(タグが設定されている場合) タグ先頭の画像を表示する';
+$lang['showfooter'] = 'インクルード部の下にフッター情報を表示する';
+$lang['showlink'] = 'インクルード部の最初の見出しをインクルード先のページまたはセクションへのリンクとする';
+$lang['showpermalink'] = 'フッター情報: ページの permalink を表示';
+$lang['showdate'] = 'フッター情報: ページ作成日付(date) を表示';
+$lang['showmdate'] = 'フッター情報: ページ修正日付(modified date) を表示';
+$lang['showuser'] = 'フッター情報: ユーザ名(username) を表示';
+$lang['showcomments'] = 'フッター情報: コメントを表示する (Discussion plugin が必要)';
+$lang['showlinkbacks'] = 'フッター情報: バックリンク(linkback) を表示 (Linkback Plugin が必要)';
+$lang['showtags'] = 'フッター情報: タグ(tag) を表示 (Tag Plugin が必要)';
+$lang['showeditbtn'] = 'インクルード先を編集するボタンを表示';
+$lang['doredirect'] = 'インクルード先の編集後、元のページにリダイレクトして戻る';
+$lang['doindent'] = 'インクルード部を元ページの当該位置での見出しレベルより1段階下げる';
+$lang['linkonly'] = 'linkonly モードをデフォルトにする: インクルードせず、指定ページまたはセクションへのリンクだけを表示';
+$lang['title'] = '(linkonly モード時): リンクタイトルに最初の見出しを使う(useheading の指定によらず適用)';
+$lang['pageexists'] = '(linkonly モード時): インクルードするページが存在しない場合は何も表示しない ';
+$lang['parlink'] = '(linkonly モード時): リンクを「段落」とする (インラインリストにする場合は無効にしてください)';
+$lang['safeindex'] = '非公開のインクルードページのメタデータをインデックス化しない';
+$lang['order'] = '(名前空間インクルード時) ページソートに使う項目';
+$lang['order_o_id'] = 'ページ ID';
+$lang['order_o_title'] = 'タイトル';
+$lang['order_o_created'] = '作成日時';
+$lang['order_o_modified'] = '修正日時';
+$lang['order_o_indexmenu'] = 'indexmenu プラグイン互換のソート方法';
+$lang['order_o_custom'] = 'include プラグイン互換のソート方法';
+$lang['rsort'] = '(名前空間インクルード時) ページソートを逆順にする';
+$lang['depth'] = '(名前空間インクルード時) インクルード対象とする名前空間の最大深さ (0:制限なし)';
+$lang['readmore'] = '最初のセクションだけの場合、「→ 続き...」リンクを表示する';
+$lang['debugoutput'] = '"allowdebug" オプションが有効な場合、DokuWiki の DEBUGLOG に詳細なデバッグ情報を出力する';
diff --git a/platform/www/lib/plugins/include/lang/ko/lang.php b/platform/www/lib/plugins/include/lang/ko/lang.php
new file mode 100644
index 0000000..e381131
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/ko/lang.php
@@ -0,0 +1,8 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Myeongjin <aranet100@gmail.com>
+ */
+$lang['readmore'] = '→ 더 읽기...';
diff --git a/platform/www/lib/plugins/include/lang/ko/settings.php b/platform/www/lib/plugins/include/lang/ko/settings.php
new file mode 100644
index 0000000..5e6a18e
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/ko/settings.php
@@ -0,0 +1,39 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Myeongjin <aranet100@gmail.com>
+ * @author Erial <erial2@gmail.com>
+ */
+$lang['noheader'] = '포함된 문서/문단의 첫 문단 제목을 보이지 않기';
+$lang['firstseconly'] = '포함된 문서의 첫 문단만 보이기';
+$lang['showtaglogos'] = '첫 태그에 대한 그림 보이기';
+$lang['showfooter'] = '아래에 포함된 문서 대한 정보 보이기';
+$lang['showlink'] = '포함된 문서의 첫 문단 제목에 링크';
+$lang['showpermalink'] = '포함된 문서 아래에 고유링크 보이기';
+$lang['showdate'] = '포함된 문서 아래에 날짜 보이기';
+$lang['showmdate'] = '포함된 문서 아래에 수정된 날짜 보이기';
+$lang['showuser'] = '포함된 문서 아래에 사용자 이름 보이기';
+$lang['showcomments'] = '포함된 문서 아래에 댓글 보이기 (Discussion 플러그인 필요)';
+$lang['showlinkbacks'] = '포함된 문서 아래에 링크백 보이기 (Linkback 플러그인 필요)';
+$lang['showtags'] = '포함된 문서 아래에 태그 보이기 (Tag 플러그인 필요)';
+$lang['showeditbtn'] = '편집 버튼 보이기';
+$lang['doredirect'] = '포함된 문서를 편집하고 나서 원래 문서로 넘겨주기';
+$lang['doindent'] = '원래 문서의 해당 위치에서 포함된 문서를 들여쓰기';
+$lang['linkonly'] = '내용을 보여주는 대신 포함된 문서에만 링크';
+$lang['title'] = 'useheading이 꺼져 있어도 링크에서 문서의 첫 문단 제목을 사용 (linkonly 모드만 영향을 줍니다)';
+$lang['pageexists'] = '문서가 존재하지 않을 때 링크를 표시하지 않기 (linkonly 모드만 영향을 줍니다)';
+$lang['parlink'] = '링크 주위에 문단 넣기 (linkonly 모드만 영향을 줍니다)';
+$lang['safeindex'] = '공개되지 않은 포함된 문서에서 메타데이터의 색인을 방지';
+$lang['order'] = '여러 문서로 포함의 조건 정렬';
+$lang['order_o_id'] = '문서 ID';
+$lang['order_o_title'] = '제목';
+$lang['order_o_created'] = '만든 날짜';
+$lang['order_o_modified'] = '수정한 날짜';
+$lang['order_o_indexmenu'] = 'indexmenu 문법 사용자 지정 정렬';
+$lang['order_o_custom'] = 'include 문법 사용자 지정 정렬';
+$lang['rsort'] = '포함된 문서의 정렬 순서를 반대로';
+$lang['depth'] = '이름공간 포함의 최대 깊이, 제한 없는 깊이는 0';
+$lang['readmore'] = '첫문단일 경우에만 \'더 읽기\' 링크를 보이거나 보이지 않기';
+$lang['debugoutput'] = '전역 "allowdebug" 옵션이 활성화되어 있는 경우 도쿠위키 디버그로그에 상세한 디버그 정보를 출력';
diff --git a/platform/www/lib/plugins/include/lang/nl/lang.php b/platform/www/lib/plugins/include/lang/nl/lang.php
new file mode 100644
index 0000000..3d9ac2f
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/nl/lang.php
@@ -0,0 +1,8 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Gijs H. van Gemert <g.v.gemert@inter.nl.net>
+ */
+$lang['readmore'] = '→ Lees verder...';
diff --git a/platform/www/lib/plugins/include/lang/nl/settings.php b/platform/www/lib/plugins/include/lang/nl/settings.php
new file mode 100644
index 0000000..e2eb526
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/nl/settings.php
@@ -0,0 +1,40 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Mark Prins <mprins@users.sf.net>
+ * @author Johan Wijnker <johan@wijnker.eu>
+ * @author Gerrit Uitslag <klapinklapin@gmail.com>
+ */
+$lang['noheader'] = 'toon de eerste kop van de ingesloten pagina/sectie niet';
+$lang['firstseconly'] = 'toon alleen de eerste sectie van de ingesloten pagina\'s';
+$lang['showtaglogos'] = 'toon afbeelding voor het eerste label';
+$lang['showfooter'] = 'toon informatie over de pagina onder de ingesloten pagina';
+$lang['showlink'] = 'link de eerste kop van de ingesloten pagina';
+$lang['showpermalink'] = 'toon permanente link onder de ingesloten pagina';
+$lang['showdate'] = 'toon data onder de ingesloten pagina';
+$lang['showmdate'] = 'toon aanpassingsdatum onder de ingesloten pagina';
+$lang['showuser'] = 'toon gebruikersnamen onder de ingesloten pagina';
+$lang['showcomments'] = 'toon commentaar onder de ingesloten pagina (Discussion plugin vereist)';
+$lang['showlinkbacks'] = 'toon linkbacks onder de ingesloten pagina (Linkback plugin vereist)';
+$lang['showtags'] = 'toon labels onder de ingesloten pagina (Tag plugin vereist)';
+$lang['showeditbtn'] = 'toon aanpassen knop';
+$lang['doredirect'] = 'verwijs naar de originele pagina na aanpassen van de ingesloten pagina';
+$lang['doindent'] = 'spring ingesloten pagina\'s in relatief aan de pagina waarin ze ingesloten worden';
+$lang['linkonly'] = 'alleen een link naar de ingesloten pagina opnemen en niet de inhoud';
+$lang['title'] = 'gebruik de eerste kop als link ook al staat useheading uit (alleen van toepassing op linkonly modus)';
+$lang['pageexists'] = 'toon geen link als de pagina niet bestaat (alleen van toepassing op linkonly modus)';
+$lang['parlink'] = 'plaats een alinea om de link (alleen van toepassing op linkonly modus)';
+$lang['safeindex'] = 'voorkom indexering van metadata van niet-publieke ingesloten pagina\'s';
+$lang['order'] = 'volgorde criteria van insluitingen bij meerdere pagina\'s';
+$lang['order_o_id'] = 'pagina ID';
+$lang['order_o_title'] = 'titel';
+$lang['order_o_created'] = 'aanmaak datum';
+$lang['order_o_modified'] = 'aanpassingsdatum';
+$lang['order_o_indexmenu'] = 'aangepaste volgorde met indexmenu syntax';
+$lang['order_o_custom'] = 'aangepaste volgorde met include syntax';
+$lang['rsort'] = 'draai de sorteervolgorde van de ingesloten pagina\'s om';
+$lang['depth'] = 'maximum diepte van de naamruimte insluitingen, 0 voor onbeperkt';
+$lang['readmore'] = 'Toon de \'Lees verder\' link als er alleen een eerste deel is of niet';
+$lang['debugoutput'] = 'Schrijf uitgebreide debug informatie naar de DokuWiki debuglog als de globale "allowdebug" configuratieoptie is ingeschakeld';
diff --git a/platform/www/lib/plugins/include/lang/pl/lang.php b/platform/www/lib/plugins/include/lang/pl/lang.php
new file mode 100644
index 0000000..9e2eaf9
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/pl/lang.php
@@ -0,0 +1,8 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Bartek S <sadupl@gmail.com>
+ */
+$lang['readmore'] = '→Czytaj więcej...';
diff --git a/platform/www/lib/plugins/include/lang/pl/settings.php b/platform/www/lib/plugins/include/lang/pl/settings.php
new file mode 100644
index 0000000..35d89a6
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/pl/settings.php
@@ -0,0 +1,13 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Bartek S <sadupl@gmail.com>
+ */
+$lang['showtaglogos'] = 'Pokaż obrazek dla pierwszego tagu';
+$lang['showeditbtn'] = 'Pokaż przycisk edycji';
+$lang['order_o_id'] = 'ID strony';
+$lang['order_o_title'] = 'tytuł';
+$lang['order_o_created'] = 'data utworzenia';
+$lang['order_o_modified'] = 'data modyfikacji';
diff --git a/platform/www/lib/plugins/include/lang/pt-br/lang.php b/platform/www/lib/plugins/include/lang/pt-br/lang.php
new file mode 100644
index 0000000..883c19b
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/pt-br/lang.php
@@ -0,0 +1,12 @@
+<?php
+/**
+ * Portuguese language file
+ *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author Flávio Roberto Santos <flavio.barata@gmail.com>
+ */
+
+// custom language strings for the plugin
+$lang['readmore'] = '→ leia mais...';
+
+//Setup VIM: ex: et ts=2 :
diff --git a/platform/www/lib/plugins/include/lang/pt-br/settings.php b/platform/www/lib/plugins/include/lang/pt-br/settings.php
new file mode 100644
index 0000000..11cf604
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/pt-br/settings.php
@@ -0,0 +1,14 @@
+<?php
+/**
+ * Portuguese language file
+ *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author Flávio Roberto Santos <flavio.barata@gmail.com>
+ */
+
+// for the configuration manager
+$lang['firstseconly'] = 'mostrar apenas primeira seção de registros do blog';
+$lang['showdate'] = 'mostrar datas abaixo dos registros do blog';
+$lang['showuser'] = 'mostrar usernames abaixo dos registros do blog';
+
+//Setup VIM: ex: et ts=2 :
diff --git a/platform/www/lib/plugins/include/lang/pt/lang.php b/platform/www/lib/plugins/include/lang/pt/lang.php
new file mode 100644
index 0000000..0de02df
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/pt/lang.php
@@ -0,0 +1,13 @@
+<?php
+/**
+ * Portuguese language file
+ *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author Esther Brunner <wikidesign@gmail.com>
+ * @author Fernando Ribeiro <pinguim.ribeiro@gmail.com>
+ */
+
+// custom language strings for the plugin
+$lang['readmore'] = '→ Ler mais...';
+
+//Setup VIM: ex: et ts=2 :
diff --git a/platform/www/lib/plugins/include/lang/ru/lang.php b/platform/www/lib/plugins/include/lang/ru/lang.php
new file mode 100644
index 0000000..f8b1399
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/ru/lang.php
@@ -0,0 +1,10 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Spike <Spike@Foobar2000.Ru>
+ * @author Aleksandr Selivanov <alexgearbox@gmail.com>
+ * @author Aleksandr Selivanov <alexgearbox@yandex.ru>
+ */
+$lang['readmore'] = 'Читать дальше...';
diff --git a/platform/www/lib/plugins/include/lang/ru/settings.php b/platform/www/lib/plugins/include/lang/ru/settings.php
new file mode 100644
index 0000000..f71c3af
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/ru/settings.php
@@ -0,0 +1,42 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Spike <Spike@Foobar2000.Ru>
+ * @author Aleksandr Selivanov <alexgearbox@gmail.com>
+ * @author Aleksandr Selivanov <alexgearbox@yandex.ru>
+ * @author RainbowSpike <1@2.ru>
+ * @author Paulo <mragvlik@gmail.com>
+ */
+$lang['noheader'] = 'Не показывать первый заголовок внедряемых страниц, секций';
+$lang['firstseconly'] = 'Показывать только первую секцию внедряемой страницы';
+$lang['showtaglogos'] = 'Показывать изображение для первого тега';
+$lang['showfooter'] = 'Снизу показывать информацию о внедряемой странице';
+$lang['showlink'] = 'Снизу показывать статичную ссылку на внедряемую страницу';
+$lang['showpermalink'] = 'Снизу показывать пермассылку на внедряемую страницу';
+$lang['showdate'] = 'Снизу показывать дату создания внедряемой страницы';
+$lang['showmdate'] = 'Снизу показывать дату изменения внедряемой страницы';
+$lang['showuser'] = 'Снизу показывать имя пользователя';
+$lang['showcomments'] = 'Показывать комментарии ниже внедряемой страницы (требуется плагин Discussion)';
+$lang['showlinkbacks'] = 'Показывать обратные ссылки ниже внедряемой страницы (требуется плагин Linkback)';
+$lang['showtags'] = 'Показывать теги ниже внедряемой страницы (требуется плагин Tag)';
+$lang['showeditbtn'] = 'Показывать кнопку «Править»';
+$lang['doredirect'] = 'Переходить на оригинальную страницу после редактирования внедрённой страницы';
+$lang['doindent'] = 'Создавать отступ для внедряемой страницы относительно основной страницы';
+$lang['linkonly'] = 'Вместо содержимого внедряемой страницы показывать ссылку на неё';
+$lang['title'] = 'Использовать для ссылки внедряемой страницы её первый заголовок, даже если обычно они не применяются (только для режима linkonly)';
+$lang['pageexists'] = 'Не показывать ссылку внедряемой страницы, если сама она не существует (только для режима linkonly)';
+$lang['parlink'] = 'Поместить ссылку внедряемой страницы в параграф (только для режима linkonly)';
+$lang['safeindex'] = 'Закрыть индексирование метаданных от непубличных внедряемых страниц';
+$lang['order'] = 'Сортировать внедряемые страницы по';
+$lang['order_o_id'] = 'ID страницы';
+$lang['order_o_title'] = 'заголовку';
+$lang['order_o_created'] = 'дате создания';
+$lang['order_o_modified'] = 'дате изменения';
+$lang['order_o_indexmenu'] = 'настраиваемый порядок с синтаксисом Indexmenu';
+$lang['order_o_custom'] = 'настраиваемый порядок с синтаксисом Include';
+$lang['rsort'] = 'Обратить порядок сортировки внедряемых страниц';
+$lang['depth'] = 'Максимальная глубина вложений пространств имён. Укажите 0 для снятия ограничений.';
+$lang['readmore'] = 'Показывать ссылку «Читать дальше...», если выбран показ первой секции?';
+$lang['debugoutput'] = 'Выводить подробную информации об отладке в журнал отладки «Докувики» при включённой глобальной опции allowdebug';
diff --git a/platform/www/lib/plugins/include/lang/sk/lang.php b/platform/www/lib/plugins/include/lang/sk/lang.php
new file mode 100644
index 0000000..fe6464d
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/sk/lang.php
@@ -0,0 +1,8 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Igor <korcek.igor@gmail.com>
+ */
+$lang['readmore'] = '→ čítatať viac...';
diff --git a/platform/www/lib/plugins/include/lang/sk/settings.php b/platform/www/lib/plugins/include/lang/sk/settings.php
new file mode 100644
index 0000000..4492423
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/sk/settings.php
@@ -0,0 +1,37 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Igor <korcek.igor@gmail.com>
+ */
+$lang['noheader'] = 'Nezobrazovať prvý nadpis zahrnutej stránky/sekcie';
+$lang['firstseconly'] = 'Zobraziť len prvú sekciu zahrnutej stránky';
+$lang['showtaglogos'] = 'Zobraziť obrázok pre prvý tag';
+$lang['showfooter'] = 'Zobraziť informáciu o zahrnutej stránke nižšie';
+$lang['showlink'] = 'Prepoj prvý nadpis zahrnutej stránky';
+$lang['showpermalink'] = 'Zobraziť trvalé odkazy pod zahrnutou stránkou';
+$lang['showdate'] = 'Zobraziť dátum pod zahrnutou stránkou';
+$lang['showmdate'] = 'Zobraziť dátum úpravy pod zahrnutou stránkou';
+$lang['showuser'] = 'Zobraziť užívateľov pod zahrnutou stránkou';
+$lang['showcomments'] = 'Zobraziť komentáre pod zahrnutou stránkou (potrebný Discussion plugin)';
+$lang['showlinkbacks'] = 'Zobraziť spätné odkazy pod zahrnutou stránkou (potrebný Linkback plugin)';
+$lang['showtags'] = 'Zobraziť tagy pod zahrnutou stránkou (potrebný Tag plugin)';
+$lang['showeditbtn'] = 'Zobraziť tlačítko upraviť';
+$lang['doredirect'] = 'Po úprave zahrnutej stránky presmerovať na pôvodnú stránku';
+$lang['doindent'] = 'Odsadiť zahrnuté stránky relatívne k stránke na ktorej budú zahrnuté';
+$lang['linkonly'] = 'Len odkazy bez zobrazenia obsahu';
+$lang['title'] = 'Používaj prvý nadpis stránky v odkazoch aj keď je používanie nadpisov vypnuté (ovplyvní len linkonly mód)';
+$lang['pageexists'] = 'Nezobrazovať odkaz ak stránka neexistuje (ovplyvňuje len linkonly mód)';
+$lang['parlink'] = 'Vlož odstavec k odkazu (ovplyvňuje iba mód linkonly)';
+$lang['safeindex'] = 'Zabrániť indexovaniu meta údajov z neverejných zahrnutých stránok';
+$lang['order'] = 'Kritéria radenia zahrnutých stránok pri viacerých stránkach';
+$lang['order_o_id'] = 'ID stránky';
+$lang['order_o_title'] = 'Názov';
+$lang['order_o_created'] = 'dátum vytvorenia';
+$lang['order_o_modified'] = 'dátum úpravy';
+$lang['order_o_indexmenu'] = 'vlastné poradie pomocou syntaxe indexmenu';
+$lang['order_o_custom'] = 'vlastné poradie pomocou syntaxe include';
+$lang['rsort'] = 'Prevrátiť poradie zahrnutých stránok';
+$lang['depth'] = 'Maximálna hĺbka zahrnutých menných priestorov (namespaces), 0 pre neobmedzenú hĺbku';
+$lang['readmore'] = 'Zobraziť odkaz \'Čítať viac\' iba v prípade prvej sekcie';
diff --git a/platform/www/lib/plugins/include/lang/sl/lang.php b/platform/www/lib/plugins/include/lang/sl/lang.php
new file mode 100644
index 0000000..9a9e24c
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/sl/lang.php
@@ -0,0 +1,12 @@
+<?php
+/**
+ * Slovenian language file
+ *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author Blaž Mertelj <Blaz.Mertelj@atol.si>
+ */
+
+// custom language strings for the plugin
+$lang['readmore'] = '→ Preberi več...';
+
+//Setup VIM: ex: et ts=2 : \ No newline at end of file
diff --git a/platform/www/lib/plugins/include/lang/sl/settings.php b/platform/www/lib/plugins/include/lang/sl/settings.php
new file mode 100644
index 0000000..7e9ed41
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/sl/settings.php
@@ -0,0 +1,16 @@
+<?php
+/**
+ * Slovenian language file
+ *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author Blaž Mertelj <Blaz.Mertelj@atol.si>
+ */
+
+// for the configuration manager
+$lang['firstseconly'] = 'prikaži samo prvo sekcijo blog vnosov';
+
+$lang['showlink'] = 'prikaži permalinke pod blog vnosi';
+$lang['showdate'] = 'prikaži datume pod blog vnosi';
+$lang['showuser'] = 'prikaži uporabniška imena pod blog vnosi';
+
+//Setup VIM: ex: et ts=2 : \ No newline at end of file
diff --git a/platform/www/lib/plugins/include/lang/sv/lang.php b/platform/www/lib/plugins/include/lang/sv/lang.php
new file mode 100644
index 0000000..cc8b57a
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/sv/lang.php
@@ -0,0 +1,8 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Christer Nygren <wiki@fronet.fro.se>
+ */
+$lang['readmore'] = '→ Läs mer...';
diff --git a/platform/www/lib/plugins/include/lang/sv/settings.php b/platform/www/lib/plugins/include/lang/sv/settings.php
new file mode 100644
index 0000000..3e966d0
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/sv/settings.php
@@ -0,0 +1,39 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Christer Nygren <wiki@fronet.fro.se>
+ * @author Tor Härnqvist <tor@harnqvist.se>
+ */
+$lang['noheader'] = 'Visa inte första rubriken från inkluderade sidor/sektioner';
+$lang['firstseconly'] = 'visa endast första delen av inkluderad sida';
+$lang['showtaglogos'] = 'Visa bild för första tagg';
+$lang['showfooter'] = 'Visa information om inkluderad sidan nedanför';
+$lang['showlink'] = 'visa permalinks under inkluderad sida';
+$lang['showpermalink'] = 'Visa permalänk nedanför inkluderad sida';
+$lang['showdate'] = 'visa datum under inkluderad sida';
+$lang['showmdate'] = 'Visa ändringsdatum nedanför inkluderad sida';
+$lang['showuser'] = 'visa användarnamn under inkluderad sida';
+$lang['showcomments'] = 'Visa kommentarer nedanför inkluderad sida (Discussion-plugin krävs)';
+$lang['showlinkbacks'] = 'Visa tillbakalänkingar nedanför inkluderad sida (Linkback-plugin krävs)';
+$lang['showtags'] = 'Visa taggar nedanför inkluderad sida (tagg-plugin krävs)';
+$lang['showeditbtn'] = 'Visa redigera-knapp';
+$lang['doredirect'] = 'Omdirigera till originalsidan efter redigering av den inkluderade sidan';
+$lang['doindent'] = 'Gör indrag för inkluderande sidor relativt den sida som de är inkluderad på';
+$lang['linkonly'] = 'Länka enbart till den inkluderade sidan, istället för att visa dess innehåll';
+$lang['title'] = 'Visa första rubriken på sidan som länk även om rubrikvisning är inaktiverat (påverkar enbart endast länkingsinställning)';
+$lang['pageexists'] = 'Visa inte en länk om sidan inte existerar (påverkar enbart endast länkingsinställning)';
+$lang['parlink'] = 'Placera ett stycke kring länken (påverkar enbart endast länkingsinställning)';
+$lang['safeindex'] = 'Förhindra metadataindexering från icke-publika sidor';
+$lang['order'] = 'Kriterier för sortering vid inkludering av multipla sidor ';
+$lang['order_o_id'] = 'sid-ID';
+$lang['order_o_title'] = 'rubrik';
+$lang['order_o_created'] = 'skapandedatum';
+$lang['order_o_modified'] = 'ändringsdatum';
+$lang['order_o_indexmenu'] = 'användardefinierad ordning med indexmeny-syntax';
+$lang['order_o_custom'] = 'användardefinierad ordning med include-syntax';
+$lang['rsort'] = 'Omvänd sortering på inkluderade sidor';
+$lang['depth'] = 'Maximalt djup på namnrymder att inkludera, 0 för obegränsat djup';
+$lang['readmore'] = 'Visa eller gör \'Läs mer\'-länk i fall bara förstasektionen';
+$lang['debugoutput'] = 'Skriv ut mer omfattande avlusningsinformation till DokuWiki-avlusningsloggen om det globala "allowdebug"-alternativet är aktiverat';
diff --git a/platform/www/lib/plugins/include/lang/tr/lang.php b/platform/www/lib/plugins/include/lang/tr/lang.php
new file mode 100644
index 0000000..5818552
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/tr/lang.php
@@ -0,0 +1,8 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author İlker R. Kapaç <irifat@gmail.com>
+ */
+$lang['readmore'] = '→ Devamını oku..';
diff --git a/platform/www/lib/plugins/include/lang/tr/settings.php b/platform/www/lib/plugins/include/lang/tr/settings.php
new file mode 100644
index 0000000..7e3bffc
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/tr/settings.php
@@ -0,0 +1,36 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author İlker R. Kapaç <irifat@gmail.com>
+ */
+$lang['noheader'] = 'Eklenen sayfaların/bölümlerin ilk başlığını gösterme';
+$lang['firstseconly'] = 'eklenen sayfaların sadece ilk bölümünü göster';
+$lang['showtaglogos'] = 'ilk etiket için resim göster';
+$lang['showfooter'] = 'alt tarafta, eklenen sayfa için bilgi göster';
+$lang['showlink'] = 'eklenen sayfanın ilk başlığını bağlantı haline getir';
+$lang['showpermalink'] = 'eklenen sayfanın altında kalıcı bağlantılar göster';
+$lang['showdate'] = 'eklenen sayfanın altında tarihleri göster';
+$lang['showmdate'] = 'eklenen sayfanın altında değiştirilme tarihlerini göster';
+$lang['showuser'] = 'eklenen sayfanın altında kullanıcı isimlerini göster';
+$lang['showcomments'] = 'eklenen sayfanın altında tartışmaları görüntüle (Bunun için Discussion eklentisi gereklidir)';
+$lang['showlinkbacks'] = 'eklenen sayfanın altında geri bağlantıları göster (Bunun için Linkback eklentisi gereklidir)';
+$lang['showtags'] = 'eklenen sayfanın altında etiketleri göster (Bunun için Tag eklentisi gereklidir)';
+$lang['showeditbtn'] = 'düzenle düğmesini göster';
+$lang['doredirect'] = 'eklenen sayfayı düzenledikten sonra orjinal sayfaya yönlendir';
+$lang['doindent'] = 'eklenen sayfaları dahil edildikleri sayfaya göre girintili yap';
+$lang['linkonly'] = 'içeriği göstermek yerine, sadece eklenen sayfaya bağlantı göster';
+$lang['title'] = 'sayfa başlığını kullanma kapalı bile olsa, sayfanın ilk başlığını bağlantıda kullan (yalnızca bağlantı göster seceneği etkinken çalışır)';
+$lang['pageexists'] = 'sayfa mevcut değilse bağlantı gösterme (yalnızca bağlantı göster seceneği etkinken çalışır)';
+$lang['parlink'] = 'bağlantıya bir paragraf ekle (yalnızca bağlantı göster seceneği etkinken çalışır)';
+$lang['safeindex'] = 'eklenmiş kamuya kapalı (non-public) sayfadan üstverinin (metadata) dizine alınmasına izin verme';
+$lang['order'] = 'çok sayfalı eklemeler için sıralama ölçütü';
+$lang['order_o_id'] = 'sayfa kimliği (ID)';
+$lang['order_o_title'] = 'başlık';
+$lang['order_o_created'] = 'oluşturma tarihi';
+$lang['order_o_modified'] = 'değiştirilme tarihi';
+$lang['order_o_indexmenu'] = 'indexmenu sözdizimi ile rasgele sıralı';
+$lang['order_o_custom'] = 'include sözdizimi ile rasgele sıralı';
+$lang['rsort'] = 'eklenen sayfaların sıralamasını ters çevir';
+$lang['depth'] = 'dahil edilecek en fazla isimalanı derinliği, sınırsız derinlik için 0';
diff --git a/platform/www/lib/plugins/include/lang/vi/lang.php b/platform/www/lib/plugins/include/lang/vi/lang.php
new file mode 100644
index 0000000..24b7703
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/vi/lang.php
@@ -0,0 +1,8 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Thien Hau <thienhau.9a14@gmail.com>
+ */
+$lang['readmore'] = '→ Đọc thêm...';
diff --git a/platform/www/lib/plugins/include/lang/vi/settings.php b/platform/www/lib/plugins/include/lang/vi/settings.php
new file mode 100644
index 0000000..db280b9
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/vi/settings.php
@@ -0,0 +1,38 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author Thien Hau <thienhau.9a14@gmail.com>
+ */
+$lang['noheader'] = 'Không hiển thị đầu đề đầu tiên của các trang/phần được bao gồm';
+$lang['firstseconly'] = 'Chỉ hiển thị phần đầu tiên của các trang được bao gồm';
+$lang['showtaglogos'] = 'Hiển thị hình ảnh cho thẻ đầu tiên';
+$lang['showfooter'] = 'Hiển thị thông tin về trang được bao gồm bên dưới';
+$lang['showlink'] = 'Liên kết đầu đề đầu tiên của trang được bao gồm';
+$lang['showpermalink'] = 'Hiển thị liên kết cố định bên dưới trang được bao gồm';
+$lang['showdate'] = 'Hiển thị ngày bên dưới trang được bao gồm';
+$lang['showmdate'] = 'Hiển thị ngày sửa đổi bên dưới trang được bao gồm';
+$lang['showuser'] = 'Hiển thị tên thành viên bên dưới trang bao gồm';
+$lang['showcomments'] = 'Hiển thị nhận xét bên dưới trang được bao gồm (Cần có plugin Discussion)';
+$lang['showlinkbacks'] = 'Hiển thị linkbacks bên dưới trang được bao gồm (Cần có Plugin Linkback)';
+$lang['showtags'] = 'Hiển thị các thẻ bên dưới trang được bao gồm (Cần có Plugin Tag)';
+$lang['showeditbtn'] = 'Hiển thị nút sửa đổi';
+$lang['doredirect'] = 'Đổi hướng đến trang gốc sau khi sửa đổi trang được bao gồm';
+$lang['doindent'] = 'Thụt lề các trang được bao gồm liên quan đến trang mà chúng được đưa vào';
+$lang['linkonly'] = 'Chỉ liên kết đến trang được bao gồm thay vì hiển thị nội dung';
+$lang['title'] = 'Sử dụng đầu đề đầu tiên của trang trong liên kết ngay cả khi useheading bị tắt (chỉ ảnh hưởng đến chế độ chỉ liên kết (linkonly))';
+$lang['pageexists'] = 'Không hiển thị liên kết nếu trang không tồn tại (chỉ ảnh hưởng đến chế độ chỉ liên kết)';
+$lang['parlink'] = 'Đặt một đoạn quanh liên kết (chỉ ảnh hưởng đến chế độ chỉ liên kết)';
+$lang['safeindex'] = 'Ngăn lập chỉ mục siêu dữ liệu từ các trang được bao gồm không công khai';
+$lang['order'] = 'Xếp tiêu chí của bao gồm với nhiều trang';
+$lang['order_o_id'] = 'ID trang';
+$lang['order_o_title'] = 'tiêu đề';
+$lang['order_o_created'] = 'ngày khởi tạo';
+$lang['order_o_modified'] = 'ngày sửa đổi';
+$lang['order_o_indexmenu'] = 'Xếp tùy chỉnh với cú pháp indexmenu';
+$lang['order_o_custom'] = 'Xếp tùy chỉnh với cú pháp bao gồm';
+$lang['rsort'] = 'Đảo ngược thứ tự sắp xếp của các trang được bao gồm';
+$lang['depth'] = 'Độ sâu tối đa của không gian tên bao gồm, 0 cho không giới hạn độ sâu';
+$lang['readmore'] = 'Hiển thị hay không liên kết \'Đọc thêm\' chỉ trong trường hợp phần đầu tiên';
+$lang['debugoutput'] = 'In thông tin gỡ lỗi dài dòng vào nhật ký gỡ lỗi dokuwiki nếu tùy chọn toàn cục "allowdebug" được bật';
diff --git a/platform/www/lib/plugins/include/lang/zh/lang.php b/platform/www/lib/plugins/include/lang/zh/lang.php
new file mode 100644
index 0000000..02e49b3
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/zh/lang.php
@@ -0,0 +1,8 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author lainme <lainme993@gmail.com>
+ */
+$lang['readmore'] = '→ 阅读更多...';
diff --git a/platform/www/lib/plugins/include/lang/zh/settings.php b/platform/www/lib/plugins/include/lang/zh/settings.php
new file mode 100644
index 0000000..9cc6339
--- /dev/null
+++ b/platform/www/lib/plugins/include/lang/zh/settings.php
@@ -0,0 +1,33 @@
+<?php
+
+/**
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ *
+ * @author lainme <lainme993@gmail.com>
+ * @author Test2g <zccnexus@gmail.com>
+ */
+$lang['noheader'] = '不要显示所包含的页面/章节中的第一个标题';
+$lang['firstseconly'] = '仅显示所包含页面的第一个章节';
+$lang['showtaglogos'] = '对第一个标签显示图片';
+$lang['showfooter'] = '在下方显示所包含页面的信息';
+$lang['showlink'] = '对所包含页面的第一个标题加超链接';
+$lang['showpermalink'] = '在下方显示所包含页面的永久链接';
+$lang['showdate'] = '在下方显示所包含页面的日期';
+$lang['showmdate'] = '在下方显示所包含页面的修改日期';
+$lang['showuser'] = '在下方显示所包含页面的用户名';
+$lang['showcomments'] = '在下方显示所包含页面的评论数';
+$lang['showlinkbacks'] = '在下方显示所包含页面的 linkback';
+$lang['showtags'] = '在下方显示所包含页面的标签';
+$lang['showeditbtn'] = '显示编辑按钮';
+$lang['doredirect'] = '编辑所包含的页面后转向到原始页面';
+$lang['doindent'] = '相对所在页面对包含的页面进行缩进';
+$lang['linkonly'] = '仅显示到所包含页面的链接而不显示内容';
+$lang['title'] = '即使 useheading 选项关闭也使用页面的第一个标题进行超链接 (仅影响 linkonly 模式)';
+$lang['pageexists'] = '不要显示不存在的页面的链接 (仅影响 linkonly 模式)';
+$lang['parlink'] = '将一个段落环绕显示在链接旁(仅对linkonly模式有效)';
+$lang['order_o_id'] = '页面 ID';
+$lang['order_o_title'] = '标题';
+$lang['order_o_created'] = '创建日期';
+$lang['order_o_modified'] = '修改日期';
+$lang['rsort'] = '对包含的页面进行反向排序';
+$lang['depth'] = '包含命名空间的最大深度,0表示不限制';
diff --git a/platform/www/lib/plugins/include/plugin.info.txt b/platform/www/lib/plugins/include/plugin.info.txt
new file mode 100644
index 0000000..5ed4a1d
--- /dev/null
+++ b/platform/www/lib/plugins/include/plugin.info.txt
@@ -0,0 +1,7 @@
+base include
+author Michael Hamann, Gina Häussge, Christopher Smith, Michael Klier, Esther Brunner
+email michael@content-space.de
+date 2022-01-23
+name include plugin
+desc Functions to include another page in a wiki page
+url http://dokuwiki.org/plugin:include
diff --git a/platform/www/lib/plugins/include/requirements.txt b/platform/www/lib/plugins/include/requirements.txt
new file mode 100644
index 0000000..b01bbd9
--- /dev/null
+++ b/platform/www/lib/plugins/include/requirements.txt
@@ -0,0 +1,2 @@
+# requirements for testing
+https://github.com/michitux/dokuwiki-plugin-move.git lib/plugins/move
diff --git a/platform/www/lib/plugins/include/script.js b/platform/www/lib/plugins/include/script.js
new file mode 100644
index 0000000..8c1edbb
--- /dev/null
+++ b/platform/www/lib/plugins/include/script.js
@@ -0,0 +1,22 @@
+/**
+ * Javascript functionality for the include plugin
+ */
+
+/**
+ * Highlight the included section when hovering over the appropriate include edit button
+ *
+ * @author Andreas Gohr <andi@splitbrain.org>
+ * @author Michael Klier <chi@chimeric.de>
+ * @author Michael Hamann <michael@content-space.de>
+ */
+jQuery(function() {
+ jQuery('.btn_incledit')
+ .mouseover(function () {
+ jQuery(this).closest('.plugin_include_content').addClass('section_highlight');
+ })
+ .mouseout(function () {
+ jQuery('.section_highlight').removeClass('section_highlight');
+ });
+});
+
+// vim:ts=4:sw=4:et:
diff --git a/platform/www/lib/plugins/include/style.css b/platform/www/lib/plugins/include/style.css
new file mode 100644
index 0000000..63aa35a
--- /dev/null
+++ b/platform/www/lib/plugins/include/style.css
@@ -0,0 +1,53 @@
+div.dokuwiki div.plugin_include_content div.secedit {
+ float: right;
+ margin-left: 1em;
+ margin-top: 0;
+}
+
+div.dokuwiki div.inclmeta {
+ border-top: 1px dotted __border__;
+ padding-top: 0.2em;
+ color: __text_neu__;
+ font-size: 80%;
+ line-height: 1.25;
+ /*margin-top: 0.5em;*/
+ margin-bottom: 2em;
+}
+
+div.dokuwiki div.inclmeta a.permalink {
+ background: transparent url(images/link.gif) 0px 1px no-repeat;
+ padding: 1px 0px 1px 16px;
+}
+
+div.dokuwiki div.inclmeta abbr.published {
+ background: transparent url(images/date.gif) 0px 1px no-repeat;
+ padding: 1px 0px 1px 16px;
+ border-bottom: 0;
+}
+
+div.dokuwiki div.inclmeta span.author {
+ background: transparent url(images/user.gif) 0px 1px no-repeat;
+ padding: 1px 0px 1px 16px;
+}
+
+/* Disable the default interwiki icon for the user link (if there is any) */
+div.dokuwiki div.inclmeta span.author a.interwiki {
+ background: none;
+ padding: 0;
+}
+
+div.dokuwiki div.inclmeta span.comment {
+ background: transparent url(images/comment.gif) 0px 1px no-repeat;
+ padding: 1px 0px 1px 16px;
+}
+
+div.dokuwiki div.inclmeta div.tags {
+ border-top: 0;
+ font-size: 100%;
+ float: right;
+ clear: none;
+}
+
+div.dokuwiki p.include_readmore {
+ text-align: right;
+}
diff --git a/platform/www/lib/plugins/include/syntax/closelastsecedit.php b/platform/www/lib/plugins/include/syntax/closelastsecedit.php
new file mode 100644
index 0000000..a5741c8
--- /dev/null
+++ b/platform/www/lib/plugins/include/syntax/closelastsecedit.php
@@ -0,0 +1,36 @@
+<?php
+/**
+ * Include plugin (close last section edit)
+ *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author Michael Hamann <michael@content-space.de>
+ */
+
+class syntax_plugin_include_closelastsecedit extends DokuWiki_Syntax_Plugin {
+
+ function getType() {
+ return 'formatting';
+ }
+
+ function getSort() {
+ return 50;
+ }
+
+ function handle($match, $state, $pos, Doku_Handler $handler) {
+ // this is a syntax plugin that doesn't offer any syntax, so there's nothing to handle by the parser
+ }
+
+ /**
+ * Finishes the last open section edit
+ */
+ function render($mode, Doku_Renderer $renderer, $data) {
+ if ($mode == 'xhtml') {
+ /** @var Doku_Renderer_xhtml $renderer */
+ list($endpos) = $data;
+ $renderer->finishSectionEdit($endpos);
+ return true;
+ }
+ return false;
+ }
+}
+// vim:ts=4:sw=4:et:
diff --git a/platform/www/lib/plugins/include/syntax/editbtn.php b/platform/www/lib/plugins/include/syntax/editbtn.php
new file mode 100644
index 0000000..4d9367f
--- /dev/null
+++ b/platform/www/lib/plugins/include/syntax/editbtn.php
@@ -0,0 +1,43 @@
+<?php
+/**
+ * Include plugin (editbtn header component)
+ *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author Michael Klier <chi@chimeric.de>
+ */
+
+class syntax_plugin_include_editbtn extends DokuWiki_Syntax_Plugin {
+
+ function getType() {
+ return 'formatting';
+ }
+
+ function getSort() {
+ return 50;
+ }
+
+ function handle($match, $state, $pos, Doku_Handler $handler) {
+ // this is a syntax plugin that doesn't offer any syntax, so there's nothing to handle by the parser
+ }
+
+ /**
+ * Renders an include edit button
+ *
+ * @author Michael Klier <chi@chimeric.de>
+ */
+ function render($mode, Doku_Renderer $renderer, $data) {
+ list($title, $hid) = $data;
+ if ($mode == 'xhtml') {
+ if (defined('SEC_EDIT_PATTERN')) { // for DokuWiki Greebo and more recent versions
+ $renderer->startSectionEdit(0, array('target' => 'plugin_include_editbtn', 'name' => $title, 'hid' => $hid));
+ } else {
+ $renderer->startSectionEdit(0, 'plugin_include_editbtn', $title);
+ }
+
+ $renderer->finishSectionEdit();
+ return true;
+ }
+ return false;
+ }
+}
+// vim:ts=4:sw=4:et:
diff --git a/platform/www/lib/plugins/include/syntax/footer.php b/platform/www/lib/plugins/include/syntax/footer.php
new file mode 100644
index 0000000..4be5ac4
--- /dev/null
+++ b/platform/www/lib/plugins/include/syntax/footer.php
@@ -0,0 +1,133 @@
+<?php
+/**
+ * Include plugin (footer component)
+ *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author Michael Klier <chi@chimeric.de>
+ */
+
+class syntax_plugin_include_footer extends DokuWiki_Syntax_Plugin {
+
+ function getType() {
+ return 'formatting';
+ }
+
+ function getSort() {
+ return 300;
+ }
+
+ function handle($match, $state, $pos, Doku_Handler $handler) {
+ // this is a syntax plugin that doesn't offer any syntax, so there's nothing to handle by the parser
+ }
+
+ /**
+ * Renders a permalink header.
+ *
+ * Code heavily copied from the header renderer from inc/parser/xhtml.php, just
+ * added an href parameter to the anchor tag linking to the wikilink.
+ */
+ function render($mode, Doku_Renderer $renderer, $data) {
+
+ list($page, $sect, $sect_title, $flags, $redirect_id, $footer_lvl) = $data;
+
+ if ($mode == 'xhtml') {
+ $renderer->doc .= $this->html_footer($page, $sect, $sect_title, $flags, $footer_lvl, $renderer);
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * Returns the meta line below the included page
+ * @param $renderer Doku_Renderer_xhtml The (xhtml) renderer
+ * @return string The HTML code of the footer
+ */
+ function html_footer($page, $sect, $sect_title, $flags, $footer_lvl, &$renderer) {
+ global $conf, $ID;
+
+ if(!$flags['footer']) return '';
+
+ $meta = p_get_metadata($page);
+ $exists = page_exists($page);
+ $xhtml = array();
+ // permalink
+ if ($flags['permalink']) {
+ $class = ($exists ? 'wikilink1' : 'wikilink2');
+ $url = ($sect) ? wl($page) . '#' . $sect : wl($page);
+ $name = ($sect) ? $sect_title : $page;
+ $title = ($sect) ? $page . '#' . $sect : $page;
+ if (!$title) $title = str_replace('_', ' ', noNS($page));
+ $link = array(
+ 'url' => $url,
+ 'title' => $title,
+ 'name' => $name,
+ 'target' => $conf['target']['wiki'],
+ 'class' => $class . ' permalink',
+ 'more' => 'rel="bookmark"',
+ );
+ $xhtml[] = $renderer->_formatLink($link);
+ }
+
+ // date
+ if ($flags['date'] && $exists) {
+ $date = $meta['date']['created'];
+ if ($date) {
+ $xhtml[] = '<abbr class="published" title="'.strftime('%Y-%m-%dT%H:%M:%SZ', $date).'">'
+ . strftime($conf['dformat'], $date)
+ . '</abbr>';
+ }
+ }
+
+ // modified date
+ if ($flags['mdate'] && $exists) {
+ $mdate = $meta['date']['modified'];
+ if ($mdate) {
+ $xhtml[] = '<abbr class="published" title="'.strftime('%Y-%m-%dT%H:%M:%SZ', $mdate).'">'
+ . strftime($conf['dformat'], $mdate)
+ . '</abbr>';
+ }
+ }
+
+ // author
+ if ($flags['user'] && $exists) {
+ $author = $meta['user'];
+ if ($author) {
+ if (function_exists('userlink')) {
+ $xhtml[] = '<span class="vcard author">' . userlink($author) . '</span>';
+ } else { // DokuWiki versions < 2014-05-05 doesn't have userlink support, fall back to not providing a link
+ $xhtml[] = '<span class="vcard author">' . editorinfo($author) . '</span>';
+ }
+ }
+ }
+
+ // comments - let Discussion Plugin do the work for us
+ if (empty($sect) && $flags['comments'] && (!plugin_isdisabled('discussion')) && ($discussion = plugin_load('helper', 'discussion'))) {
+ $disc = $discussion->td($page);
+ if ($disc) $xhtml[] = '<span class="comment">' . $disc . '</span>';
+ }
+
+ // linkbacks - let Linkback Plugin do the work for us
+ if (empty($sect) && $flags['linkbacks'] && (!plugin_isdisabled('linkback')) && ($linkback = plugin_load('helper', 'linkback'))) {
+ $link = $linkback->td($page);
+ if ($link) $xhtml[] = '<span class="linkback">' . $link . '</span>';
+ }
+
+ $xhtml = implode(DOKU_LF . DOKU_TAB . '&middot; ', $xhtml);
+
+ // tags - let Tag Plugin do the work for us
+ if (empty($sect) && $flags['tags'] && (!plugin_isdisabled('tag')) && ($tag = plugin_load('helper', 'tag'))) {
+ $tags = $tag->td($page);
+ if($tags) {
+ $xhtml .= '<div class="tags"><span>' . DOKU_LF
+ . DOKU_TAB . $tags . DOKU_LF
+ . DOKU_TAB . '</span></div>' . DOKU_LF;
+ }
+ }
+
+ if (!$xhtml) $xhtml = '&nbsp;';
+ $class = 'inclmeta';
+ $class .= ' level' . $footer_lvl;
+ return '<div class="' . $class . '">' . DOKU_LF . DOKU_TAB . $xhtml . DOKU_LF . '</div>' . DOKU_LF;
+ }
+}
+// vim:ts=4:sw=4:et:
diff --git a/platform/www/lib/plugins/include/syntax/header.php b/platform/www/lib/plugins/include/syntax/header.php
new file mode 100644
index 0000000..3f14dcb
--- /dev/null
+++ b/platform/www/lib/plugins/include/syntax/header.php
@@ -0,0 +1,95 @@
+<?php
+/**
+ * Include plugin (permalink header component)
+ *
+ * Provides a header instruction which renders a permalink to the included page
+ *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author Gina Haeussge <osd@foosel.net>
+ * @author Michael Klier <chi@chimeric.de>
+ */
+
+class syntax_plugin_include_header extends DokuWiki_Syntax_Plugin {
+
+ function getType() {
+ return 'formatting';
+ }
+
+ function getSort() {
+ return 50;
+ }
+
+ function handle($match, $state, $pos, Doku_Handler $handler) {
+ // this is a syntax plugin that doesn't offer any syntax, so there's nothing to handle by the parser
+ }
+
+ /**
+ * Renders a permalink header.
+ *
+ * Code heavily copied from the header renderer from inc/parser/xhtml.php, just
+ * added an href parameter to the anchor tag linking to the wikilink.
+ */
+ function render($mode, Doku_Renderer $renderer, $data) {
+ global $conf;
+
+ list($headline, $lvl, $pos, $page, $sect, $flags) = $data;
+
+ if ($mode == 'xhtml') {
+ /** @var Doku_Renderer_xhtml $renderer */
+ $hid = $renderer->_headerToLink($headline, true);
+ $renderer->toc_additem($hid, $headline, $lvl);
+ $url = ($sect) ? wl($page) . '#' . $sect : wl($page);
+ $renderer->doc .= DOKU_LF.'<h' . $lvl;
+ $classes = array();
+ if($flags['taglogos']) {
+ $tag = $this->_get_firsttag($page);
+ if($tag) {
+ $classes[] = 'include_firsttag__' . $tag;
+ }
+ }
+ // the include header instruction is always at the beginning of the first section edit inside the include
+ // wrap so there is no need to close a previous section edit.
+ if ($lvl <= $conf['maxseclevel']) {
+ if (defined('SEC_EDIT_PATTERN')) { // for DokuWiki Greebo and more recent versions
+ $classes[] = $renderer->startSectionEdit($pos, array('target' => 'section', 'name' => $headline, 'hid' => $hid));
+ } else {
+ $classes[] = $renderer->startSectionEdit($pos, 'section', $headline);
+ }
+ }
+ if ($classes) {
+ $renderer->doc .= ' class="'. implode(' ', $classes) . '"';
+ }
+ $headline = $renderer->_xmlEntities($headline);
+ $renderer->doc .= ' id="'.$hid.'"><a href="' . $url . '" title="' . $headline . '">';
+ $renderer->doc .= $headline;
+ $renderer->doc .= '</a></h' . $lvl . '>' . DOKU_LF;
+ return true;
+ } else {
+ $renderer->header($headline, $lvl, $pos);
+ }
+ return false;
+ }
+
+ /**
+ * Optionally add a CSS class for the first tag
+ *
+ * @author Michael Klier <chi@chimeric.de>
+ */
+ function _get_firsttag($page) {
+ if(plugin_isdisabled('tag') || (!plugin_load('helper', 'tag'))) {
+ return false;
+ }
+ $subject = p_get_metadata($page, 'subject');
+ if (is_array($subject)) {
+ $tag = $subject[0];
+ } else {
+ list($tag, $rest) = explode(' ', $subject, 2);
+ }
+ if($tag) {
+ return $tag;
+ } else {
+ return false;
+ }
+ }
+}
+// vim:ts=4:sw=4:et:
diff --git a/platform/www/lib/plugins/include/syntax/include.php b/platform/www/lib/plugins/include/syntax/include.php
new file mode 100644
index 0000000..44b803a
--- /dev/null
+++ b/platform/www/lib/plugins/include/syntax/include.php
@@ -0,0 +1,173 @@
+<?php
+/**
+ * Include Plugin: displays a wiki page within another
+ * Usage:
+ * {{page>page}} for "page" in same namespace
+ * {{page>:page}} for "page" in top namespace
+ * {{page>namespace:page}} for "page" in namespace "namespace"
+ * {{page>.namespace:page}} for "page" in subnamespace "namespace"
+ * {{page>page#section}} for a section of "page"
+ *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author Esther Brunner <wikidesign@gmail.com>
+ * @author Christopher Smith <chris@jalakai.co.uk>
+ * @author Gina Häußge, Michael Klier <dokuwiki@chimeric.de>
+ */
+
+/**
+ * All DokuWiki plugins to extend the parser/rendering mechanism
+ * need to inherit from this class
+ */
+class syntax_plugin_include_include extends DokuWiki_Syntax_Plugin {
+
+ /** @var $helper helper_plugin_include */
+ var $helper = null;
+
+ /**
+ * Get syntax plugin type.
+ *
+ * @return string The plugin type.
+ */
+ function getType() { return 'substition'; }
+
+ /**
+ * Get sort order of syntax plugin.
+ *
+ * @return int The sort order.
+ */
+ function getSort() { return 303; }
+
+ /**
+ * Get paragraph type.
+ *
+ * @return string The paragraph type.
+ */
+ function getPType() { return 'block'; }
+
+ /**
+ * Connect patterns/modes
+ *
+ * @param $mode mixed The current mode
+ */
+ function connectTo($mode) {
+ $this->Lexer->addSpecialPattern("{{page>.+?}}", $mode, 'plugin_include_include');
+ $this->Lexer->addSpecialPattern("{{section>.+?}}", $mode, 'plugin_include_include');
+ $this->Lexer->addSpecialPattern("{{namespace>.+?}}", $mode, 'plugin_include_include');
+ $this->Lexer->addSpecialPattern("{{tagtopic>.+?}}", $mode, 'plugin_include_include');
+ }
+
+ /**
+ * Handle syntax matches
+ *
+ * @param string $match The current match
+ * @param int $state The match state
+ * @param int $pos The position of the match
+ * @param Doku_Handler $handler The hanlder object
+ * @return array The instructions of the plugin
+ */
+ function handle($match, $state, $pos, Doku_Handler $handler) {
+
+ $match = substr($match, 2, -2); // strip markup
+ list($match, $flags) = array_pad(explode('&', $match, 2), 2, '');
+
+ // break the pattern up into its parts
+ list($mode, $page, $sect) = array_pad(preg_split('/>|#/u', $match, 3), 3, null);
+ $check = false;
+ if (isset($sect)) $sect = sectionID($sect, $check);
+ $level = NULL;
+ return array($mode, $page, $sect, explode('&', $flags), $level, $pos);
+ }
+
+ /**
+ * Renders the included page(s)
+ *
+ * @author Michael Hamann <michael@content-space.de>
+ */
+ function render($format, Doku_Renderer $renderer, $data) {
+ global $ID;
+
+ // static stack that records all ancestors of the child pages
+ static $page_stack = array();
+
+ // when there is no id just assume the global $ID is the current id
+ if (empty($page_stack)) $page_stack[] = $ID;
+
+ $parent_id = $page_stack[count($page_stack)-1];
+ $root_id = $page_stack[0];
+
+ list($mode, $page, $sect, $flags, $level, $pos) = $data;
+
+ if (!$this->helper)
+ $this->helper = plugin_load('helper', 'include');
+ $flags = $this->helper->get_flags($flags);
+
+ $pages = $this->helper->_get_included_pages($mode, $page, $sect, $parent_id, $flags);
+
+ if ($format == 'metadata') {
+ /** @var Doku_Renderer_metadata $renderer */
+
+ // remove old persistent metadata of previous versions of the include plugin
+ if (isset($renderer->persistent['plugin_include'])) {
+ unset($renderer->persistent['plugin_include']);
+ unset($renderer->meta['plugin_include']);
+ }
+
+ $renderer->meta['plugin_include']['instructions'][] = compact('mode', 'page', 'sect', 'parent_id', 'flags');
+ if (!isset($renderer->meta['plugin_include']['pages']))
+ $renderer->meta['plugin_include']['pages'] = array(); // add an array for array_merge
+ $renderer->meta['plugin_include']['pages'] = array_merge($renderer->meta['plugin_include']['pages'], $pages);
+ $renderer->meta['plugin_include']['include_content'] = isset($_REQUEST['include_content']);
+ }
+
+ $secids = array();
+ if ($format == 'xhtml' || $format == 'odt') {
+ $secids = p_get_metadata($ID, 'plugin_include secids');
+ }
+
+ foreach ($pages as $page) {
+ extract($page);
+ $id = $page['id'];
+ $exists = $page['exists'];
+
+ if (in_array($id, $page_stack)) continue;
+ array_push($page_stack, $id);
+
+ // add references for backlink
+ if ($format == 'metadata') {
+ $renderer->meta['relation']['references'][$id] = $exists;
+ $renderer->meta['relation']['haspart'][$id] = $exists;
+ if (!$sect && !$flags['firstsec'] && !$flags['linkonly'] && !isset($renderer->meta['plugin_include']['secids'][$id])) {
+ $renderer->meta['plugin_include']['secids'][$id] = array('hid' => 'plugin_include__'.str_replace(':', '__', $id), 'pos' => $pos);
+ }
+ }
+
+ if (isset($secids[$id]) && $pos === $secids[$id]['pos']) {
+ $flags['include_secid'] = $secids[$id]['hid'];
+ } else {
+ unset($flags['include_secid']);
+ }
+
+ $instructions = $this->helper->_get_instructions($id, $sect, $mode, $level, $flags, $root_id, $secids);
+
+ if (!$flags['editbtn']) {
+ global $conf;
+ $maxseclevel_org = $conf['maxseclevel'];
+ $conf['maxseclevel'] = 0;
+ }
+ $renderer->nest($instructions);
+ if (isset($maxseclevel_org)) {
+ $conf['maxseclevel'] = $maxseclevel_org;
+ unset($maxseclevel_org);
+ }
+
+ array_pop($page_stack);
+ }
+
+ // When all includes have been handled remove the current id
+ // in order to allow the rendering of other pages
+ if (count($page_stack) == 1) array_pop($page_stack);
+
+ return true;
+ }
+}
+// vim:ts=4:sw=4:et:
diff --git a/platform/www/lib/plugins/include/syntax/locallink.php b/platform/www/lib/plugins/include/syntax/locallink.php
new file mode 100644
index 0000000..2a6a612
--- /dev/null
+++ b/platform/www/lib/plugins/include/syntax/locallink.php
@@ -0,0 +1,45 @@
+<?php
+/**
+ * Include plugin (locallink component)
+ *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author Michael Hamann <michael@content-space.de>
+ */
+
+class syntax_plugin_include_locallink extends DokuWiki_Syntax_Plugin {
+
+ function getType() {
+ return 'formatting';
+ }
+
+ function getSort() {
+ return 50;
+ }
+
+ function handle($match, $state, $pos, Doku_Handler $handler) {
+ // this is a syntax plugin that doesn't offer any syntax, so there's nothing to handle by the parser
+ }
+
+ /**
+ * Displays a local link to an included page
+ *
+ * @author Michael Hamann <michael@content-space.de>
+ */
+ function render($mode, Doku_Renderer $renderer, $data) {
+ global $ID;
+ if ($mode == 'xhtml') {
+ /** @var Doku_Renderer_xhtml $renderer */
+ list($hash, $name, $id) = $data;
+ // construct title in the same way it would be done for internal links
+ $default = $renderer->_simpleTitle($id);
+ $name = $renderer->_getLinkTitle($name, $default, $isImage, $id);
+ $title = $ID.' ↵';
+ $renderer->doc .= '<a href="#'.$hash.'" title="'.$title.'" class="wikilink1">';
+ $renderer->doc .= $name;
+ $renderer->doc .= '</a>';
+ return true;
+ }
+ return false;
+ }
+}
+// vim:ts=4:sw=4:et:
diff --git a/platform/www/lib/plugins/include/syntax/readmore.php b/platform/www/lib/plugins/include/syntax/readmore.php
new file mode 100644
index 0000000..689e11d
--- /dev/null
+++ b/platform/www/lib/plugins/include/syntax/readmore.php
@@ -0,0 +1,43 @@
+<?php
+/**
+ * Include plugin (editbtn header component)
+ *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author Michael Hamann <michael@content-space.de>
+ */
+
+class syntax_plugin_include_readmore extends DokuWiki_Syntax_Plugin {
+
+ function getType() {
+ return 'formatting';
+ }
+
+ function getSort() {
+ return 50;
+ }
+
+ function handle($match, $state, $pos, Doku_Handler $handler) {
+ // this is a syntax plugin that doesn't offer any syntax, so there's nothing to handle by the parser
+ }
+
+ function render($mode, Doku_Renderer $renderer, $data) {
+ list($page) = $data;
+
+ if ($mode == 'xhtml') {
+ $renderer->doc .= DOKU_LF.'<p class="include_readmore">'.DOKU_LF;
+ } else {
+ $renderer->p_open();
+ }
+
+ $renderer->internallink($page, $this->getLang('readmore'));
+
+ if ($mode == 'xhtml') {
+ $renderer->doc .= DOKU_LF.'</p>'.DOKU_LF;
+ } else {
+ $renderer->p_close();
+ }
+
+ return true;
+ }
+}
+// vim:ts=4:sw=4:et:
diff --git a/platform/www/lib/plugins/include/syntax/sorttag.php b/platform/www/lib/plugins/include/syntax/sorttag.php
new file mode 100644
index 0000000..c7704ba
--- /dev/null
+++ b/platform/www/lib/plugins/include/syntax/sorttag.php
@@ -0,0 +1,60 @@
+<?php
+
+/**
+ * Include plugin sort order tag, idea and parts of the code copied from the indexmenu plugin.
+ *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author Samuele Tognini <samuele@netsons.org>
+ * @author Michael Hamann <michael@content-space.de>
+ *
+ */
+class syntax_plugin_include_sorttag extends DokuWiki_Syntax_Plugin {
+
+ /**
+ * What kind of syntax are we?
+ */
+ public function getType(){
+ return 'substition';
+ }
+
+ /**
+ * The paragraph type - block, we don't need paragraph tags
+ *
+ * @return string The paragraph type
+ */
+ public function getPType() {
+ return 'block';
+ }
+
+ /**
+ * Where to sort in?
+ */
+ public function getSort(){
+ return 139;
+ }
+
+ /**
+ * Connect pattern to lexer
+ */
+ public function connectTo($mode) {
+ $this->Lexer->addSpecialPattern('{{include_n>.+?}}',$mode,'plugin_include_sorttag');
+ }
+
+ /**
+ * Handle the match
+ */
+ public function handle($match, $state, $pos, Doku_Handler $handler){
+ $match = substr($match,12,-2);
+ return array($match);
+ }
+
+ /**
+ * Render output
+ */
+ public function render($mode, Doku_Renderer $renderer, $data) {
+ if ($mode === 'metadata') {
+ /** @var Doku_Renderer_metadata $renderer */
+ $renderer->meta['include_n'] = $data[0];
+ }
+ }
+}
diff --git a/platform/www/lib/plugins/include/syntax/wrap.php b/platform/www/lib/plugins/include/syntax/wrap.php
new file mode 100644
index 0000000..1cb630c
--- /dev/null
+++ b/platform/www/lib/plugins/include/syntax/wrap.php
@@ -0,0 +1,78 @@
+<?php
+/**
+ * Include plugin (wrapper component)
+ *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author Michael Klier <chi@chimeric.de>
+ * @author Michael Hamann <michael@content-space.de>
+ */
+
+class syntax_plugin_include_wrap extends DokuWiki_Syntax_Plugin {
+
+ function getType() {
+ return 'formatting';
+ }
+
+ function getSort() {
+ return 50;
+ }
+
+ function handle($match, $state, $pos, Doku_Handler $handler) {
+ // this is a syntax plugin that doesn't offer any syntax, so there's nothing to handle by the parser
+ }
+
+ /**
+ * Wraps the included page in a div and writes section edits for the action component
+ * so it can detect where an included page starts/ends.
+ *
+ * @author Michael Klier <chi@chimeric.de>
+ * @author Michael Hamann <michael@content-space.de>
+ */
+ function render($mode, Doku_Renderer $renderer, $data) {
+ if ($mode == 'xhtml') {
+ $state = array_shift($data);
+ switch($state) {
+ case 'open':
+ list($page, $redirect, $secid) = $data;
+ if ($redirect) {
+ if (defined('SEC_EDIT_PATTERN')) { // for DokuWiki Greebo and more recent versions
+ $renderer->startSectionEdit(0, array('target' => 'plugin_include_start', 'name' => $page, 'hid' => ''));
+ } else {
+ $renderer->startSectionEdit(0, 'plugin_include_start', $page);
+ }
+ } else {
+ if (defined('SEC_EDIT_PATTERN')) { // for DokuWiki Greebo and more recent versions
+ $renderer->startSectionEdit(0, array('target' => 'plugin_include_start_noredirect', 'name' => $page, 'hid' => ''));
+ } else {
+ $renderer->startSectionEdit(0, 'plugin_include_start_noredirect', $page);
+ }
+ }
+ $renderer->finishSectionEdit();
+ // Start a new section with type != section so headers in the included page
+ // won't print section edit buttons of the parent page
+ if (defined('SEC_EDIT_PATTERN')) { // for DokuWiki Greebo and more recent versions
+ $renderer->startSectionEdit(0, array('target' => 'plugin_include_end', 'name' => $page, 'hid' => ''));
+ } else {
+ $renderer->startSectionEdit(0, 'plugin_include_end', $page);
+ }
+ if ($secid === NULL) {
+ $id = '';
+ } else {
+ $id = ' id="'.$secid.'"';
+ }
+ $renderer->doc .= '<div class="plugin_include_content plugin_include__' . $page .'"'.$id.'>' . DOKU_LF;
+ if (is_a($renderer,'renderer_plugin_dw2pdf')) {
+ $renderer->doc .= '<a name="'.$secid.'" />';
+ }
+ break;
+ case 'close':
+ $renderer->finishSectionEdit();
+ $renderer->doc .= '</div>' . DOKU_LF;
+ break;
+ }
+ return true;
+ }
+ return false;
+ }
+}
+// vim:ts=4:sw=4:et:
diff --git a/platform/www/lib/plugins/meta/_test/rendering.test.php b/platform/www/lib/plugins/meta/_test/rendering.test.php
new file mode 100644
index 0000000..3c39613
--- /dev/null
+++ b/platform/www/lib/plugins/meta/_test/rendering.test.php
@@ -0,0 +1,80 @@
+<?php
+// must be run within Dokuwiki
+if (!defined('DOKU_INC')) die();
+
+/**
+ * Test cases for the meta plugin
+ */
+class plugin_meta_rendering_test extends DokuWikiTest {
+
+ public function setUp() : void {
+ $this->pluginsEnabled[] = 'meta';
+ parent::setUp();
+ }
+
+ public function test_meta_description() {
+ $text = "My page content";
+ saveWikiText('description_test', $text, 'Created');
+ self::assertEquals($text, p_get_metadata('description_test', 'description abstract', METADATA_RENDER_UNLIMITED));
+
+ $text .= DOKU_LF . '~~META:description abstract=My abstract~~';
+
+ saveWikiText('description_test', $text, 'Added meta');
+
+ self::assertEquals('My abstract', p_get_metadata('description_test', 'description abstract', METADATA_RENDER_UNLIMITED));
+
+ $text .= DOKU_LF . '~~META:description foobar=bar~~';
+ saveWikiText('description_test', $text, 'Updated meta');
+ self::assertEquals('My abstract', p_get_metadata('description_test', 'description abstract', METADATA_RENDER_UNLIMITED));
+ self::assertEquals('bar', p_get_metadata('description_test', 'description foobar', METADATA_RENDER_UNLIMITED));
+ }
+
+ public function test_meta_description_with_persistent_description() {
+ $text = "My page content";
+ $id = 'description_test';
+ saveWikiText($id, $text, 'Created');
+ self::assertEquals($text, p_get_metadata($id, 'description abstract', METADATA_RENDER_UNLIMITED));
+
+ p_set_metadata($id, array('description' => array('abstract' => 'Persistent description')), false, true);
+ self::assertEquals('Persistent description', p_get_metadata($id, 'description abstract', METADATA_RENDER_UNLIMITED));
+
+ $text .= DOKU_LF . '~~META:description abstract=My abstract~~';
+
+ saveWikiText($id, $text, 'Added meta');
+
+ self::assertEquals('My abstract', p_get_metadata($id, 'description abstract', METADATA_RENDER_UNLIMITED));
+
+ $text .= DOKU_LF . '~~META:description foobar=bar~~';
+ saveWikiText($id, $text, 'Updated meta');
+ self::assertEquals('My abstract', p_get_metadata($id, 'description abstract', METADATA_RENDER_UNLIMITED));
+ self::assertEquals('bar', p_get_metadata($id, 'description foobar', METADATA_RENDER_UNLIMITED));
+ }
+
+ public function test_relation_references_with_link() {
+ $text = "My page with a [[link_target|Link]].";
+ $id = "source";
+
+ saveWikiText($id, $text, 'Created');
+
+ self::assertEquals(array('link_target' => false), p_get_metadata($id, 'relation references', METADATA_RENDER_UNLIMITED));
+
+ $text .= DOKU_LF. "~~META:relation references=foo~~";
+ saveWikiText($id, $text, 'Updated');
+
+ self::assertEquals(array('foo' => false, 'link_target' => false), p_get_metadata($id, 'relation references', METADATA_RENDER_UNLIMITED));
+ }
+
+ public function test_relation_references_without_link() {
+ $text = "My page without a link.";
+ $id = "source";
+
+ saveWikiText($id, $text, 'Created');
+
+ self::assertEquals(null, p_get_metadata($id, 'relation references', METADATA_RENDER_UNLIMITED));
+
+ $text .= DOKU_LF . "~~META:relation references=foo~~";
+ saveWikiText($id, $text, 'Updated');
+
+ self::assertEquals(array('foo' => false), p_get_metadata($id, 'relation references', METADATA_RENDER_UNLIMITED));
+ }
+}
diff --git a/platform/www/lib/plugins/meta/plugin.info.txt b/platform/www/lib/plugins/meta/plugin.info.txt
new file mode 100644
index 0000000..b1e63e4
--- /dev/null
+++ b/platform/www/lib/plugins/meta/plugin.info.txt
@@ -0,0 +1,7 @@
+base meta
+author Michael Hamann
+email michael@content-space.de
+date 2021-10-16
+name Meta plugin
+desc Set Metadata for the current page. (previous authors: Esther Brunner, Gina Häußge, Michael Klier)
+url https://www.dokuwiki.org/plugin:meta
diff --git a/platform/www/lib/plugins/meta/syntax.php b/platform/www/lib/plugins/meta/syntax.php
new file mode 100644
index 0000000..733e5b5
--- /dev/null
+++ b/platform/www/lib/plugins/meta/syntax.php
@@ -0,0 +1,205 @@
+<?php
+/**
+ * Meta Plugin: Sets metadata for the current page
+ *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author Esther Brunner <wikidesign@gmail.com>
+ */
+if(!defined('DOKU_INC')) define('DOKU_INC',realpath(dirname(__FILE__).'/../../').'/');
+if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/');
+require_once(DOKU_PLUGIN.'syntax.php');
+
+/**
+ * All DokuWiki plugins to extend the parser/rendering mechanism
+ * need to inherit from this class
+ */
+class syntax_plugin_meta extends DokuWiki_Syntax_Plugin
+{
+ function getType()
+ {
+ return 'substition';
+ }
+
+ function getSort()
+ {
+ return 99;
+ }
+
+ function connectTo($mode)
+ {
+ $this->Lexer->addSpecialPattern('~~META:.*?~~',$mode,'plugin_meta');
+ }
+
+ /**
+ * Handle the match
+ */
+ public function handle($match, $state, $pos, Doku_Handler $handler)
+ {
+ // strip ~~META: from start and ~~ from end
+ $match = substr($match,7,-2);
+
+ $data = array();
+ $pairs = explode('&', $match);
+ foreach ($pairs as $pair) {
+ list($key, $value) = explode('=', $pair, 2);
+ list($key, $subkey) = explode(' ', $key, 2);
+ if (trim($subkey)) {
+ $data[trim($key)][trim($subkey)] = trim($value);
+ } else {
+ $data[trim($key)] = trim($value);
+ }
+ }
+ $data = array_change_key_case($data, CASE_LOWER);
+
+ return $data;
+ }
+
+ /**
+ * Create output
+ */
+ public function render($mode, Doku_Renderer $renderer, $data)
+ {
+ if ($mode == 'xthml') {
+ // don't output anything
+ return true;
+ } elseif ($mode == 'metadata') {
+ /** @var Doku_Renderer_metadata $renderer */
+
+ // do some validation / conversion for date metadata
+ if (isset($data['date'])) {
+ if (is_array($data['date'])) {
+ foreach ($data['date'] as $key => $date) {
+ $date = $this->convertDate(trim($date));
+ if (!$date) {
+ unset($data['date'][$key]);
+ } else {
+ $data['date'][$key] = $date;
+ }
+ }
+ } else {
+ unset($data['date']);
+ }
+ }
+
+ // now merge the arrays
+ $protected = array('description', 'date', 'contributor');
+ foreach ($data as $key => $value) {
+
+ // be careful with sub-arrays of $meta['relation']
+ if ($key == 'relation') {
+ foreach ($value as $subkey => $subvalue) {
+ if ($subkey == 'media') {
+ $renderer->meta[$key][$subkey][cleanID($subvalue)] = @file_exists(mediaFN($subvalue));
+ } elseif ($subkey == 'firstimage') {
+ /* The metadata renderer overrides the first image value with its internal value at the end.
+ Therefore the only thing we can do is setting this internal value by calling _firstimage.
+ This fails if there has already been a first image saved. */
+ $renderer->_firstimage($subvalue);
+ } else {
+ // for everything else assume that we have a page id
+ $renderer->meta[$key][$subkey][cleanID($subvalue)] = page_exists($subvalue);
+ }
+ }
+ } elseif (in_array($key, $protected)) {
+ // be careful with some sensitive arrays of $meta
+ if (is_array($renderer->meta) && is_array($value) && array_key_exists($key, $renderer->meta)) {
+ $renderer->meta[$key] = array_merge($renderer->meta[$key], (array)$value);
+ } else {
+ $renderer->meta[$key] = $value;
+ }
+ } else {
+ // no special treatment for the rest
+ $renderer->meta[$key] = $value;
+ }
+ }
+ }
+ }
+
+ /**
+ * converts YYYY-MM-DD[ hh:mm:ss][ -> [YYYY-MM-DD ]hh:mm:ss] to PHP timestamps
+ */
+ private function convertDate($date)
+ {
+ list($start, $end) = explode('->', $date, 2);
+
+ if (!$end) {
+ // single date
+ list($date, $time) = explode(' ', trim($start), 2);
+ if (!preg_match('/\d{4}\-\d{2}\-\d{2}/', $date)) {
+ return false;
+ }
+ $time = $this->autocompleteTime($time);
+ return strtotime($date.' '.$time);
+ } else {
+ // duration
+
+ // start
+ list($startdate, $starttime) = explode(' ', trim($start), 2);
+ $startdate = $this->autocompleteDate($startdate);
+ if (!$startdate) {
+ return false;
+ }
+ $starttime = $this->autocompleteTime($starttime);
+
+ // end
+ list($enddate, $endtime) = explode(' ', trim($end), 2);
+ if (!trim($endtime)) {
+ // only time given
+ $end_date = $this->autocompleteDate($enddate, true);
+ if (!$end_date) {
+ $endtime = $this->autocompleteTime($enddate, true);
+ $enddate = $startdate;
+ } else {
+ // only date given
+ $enddate = $end_date;
+ $endtime = '23:59:59';
+ }
+ } else {
+ $enddate = $this->autocompleteDate($enddate, true);
+ if (!$enddate) {
+ $enddate = $startdate;
+ }
+ $endtime = $this->autocompleteTime($endtime, true);
+ }
+
+ $start = strtotime($startdate.' '.$starttime);
+ $end = strtotime($enddate.' '.$endtime);
+ if (!$start || !$end) {
+ return false;
+ }
+ return array('start' => $start, 'end' => $end);
+ }
+ }
+
+ private function autocompleteDate($date, $end=false)
+ {
+ if (!preg_match('/^\d{4}\-\d{2}\-\d{2}$/', $date)) {
+ if (preg_match('/^\d{4}\-\d{2}$/', $date)) {
+ // we don't know which month
+ return ($end) ? $date.'-28' : $date.'-01';
+ } elseif (preg_match('/^\d{4}$/', $date)) {
+ return ($end) ? $date.'-12-31' : $date.'-01-01';
+ } else {
+ return false;
+ }
+ } else {
+ return $date;
+ }
+ }
+
+ private function autocompleteTime($time, $end=false)
+ {
+ if (!preg_match('/^\d{2}:\d{2}:\d{2}$/', $time)) {
+ if (preg_match('/^\d{2}:\d{2}$/', $time)) {
+ return ($end) ? $time.':59' : $time.':00';
+ } elseif (preg_match('/^\d{2}$/', $time)) {
+ return ($end) ? $time.':59:59': $time.':00:00';
+ } else {
+ return ($end) ? '23:59:59' : '00:00:00';
+ }
+ } else {
+ return $time;
+ }
+ }
+}
+// vim:ts=4:sw=4:et:enc=utf-8:
diff --git a/platform/www/lib/plugins/refnotes/action.php b/platform/www/lib/plugins/refnotes/action.php
new file mode 100644
index 0000000..6f6af89
--- /dev/null
+++ b/platform/www/lib/plugins/refnotes/action.php
@@ -0,0 +1,634 @@
+<?php
+
+/**
+ * Plugin RefNotes: Event handler
+ *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author Mykola Ostrovskyy <dwpforge@gmail.com>
+ */
+
+require_once(DOKU_PLUGIN . 'refnotes/core.php');
+require_once(DOKU_PLUGIN . 'refnotes/instructions.php');
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+class action_plugin_refnotes extends DokuWiki_Action_Plugin {
+ use refnotes_localization_plugin;
+
+ private $afterParserHandlerDone;
+ private $beforeAjaxCallUnknown;
+ private $beforeParserCacheUse;
+ private $beforeParserWikitextPreprocess;
+ private $beforeTplMetaheaderOutput;
+
+ /**
+ * Constructor
+ */
+ public function __construct() {
+ refnotes_localization::initialize($this);
+
+ $this->afterParserHandlerDone = new refnotes_after_parser_handler_done();
+ $this->beforeAjaxCallUnknown = new refnotes_before_ajax_call_unknown();
+ $this->beforeParserCacheUse = new refnotes_before_parser_cache_use();
+ $this->beforeParserWikitextPreprocess = new refnotes_before_parser_wikitext_preprocess();
+ $this->beforeTplMetaheaderOutput = new refnotes_before_tpl_metaheader_output();
+ }
+
+ /**
+ * Register callbacks
+ */
+ public function register(Doku_Event_Handler $controller) {
+ $this->afterParserHandlerDone->register($controller);
+ $this->beforeAjaxCallUnknown->register($controller);
+ $this->beforeParserCacheUse->register($controller);
+ $this->beforeParserWikitextPreprocess->register($controller);
+ $this->beforeTplMetaheaderOutput->register($controller);
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+class refnotes_after_parser_handler_done {
+
+ /**
+ * Register callback
+ */
+ public function register($controller) {
+ $controller->register_hook('PARSER_HANDLER_DONE', 'AFTER', $this, 'handle');
+ }
+
+ /**
+ *
+ */
+ public function handle($event, $param) {
+ refnotes_parser_core::getInstance()->exitParsingContext($event->data);
+
+ /* We need a new instance of mangler for each event because we can trigger it recursively
+ * by loading reference database or by parsing structured notes.
+ */
+ $mangler = new refnotes_instruction_mangler($event);
+
+ $mangler->process();
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+class refnotes_instruction_mangler {
+
+ private $core;
+ private $calls;
+ private $paragraphReferences;
+ private $referenceGroup;
+ private $hidden;
+ private $inReference;
+
+ /**
+ * Constructor
+ */
+ public function __construct($event) {
+ $this->core = new refnotes_action_core();
+ $this->calls = new refnotes_instruction_list($event);
+ $this->paragraphReferences = array();
+ $this->referenceGroup = array();
+ $this->hidden = true;
+ $this->inReference = false;
+ }
+
+ /**
+ *
+ */
+ public function process() {
+ $this->scanInstructions();
+
+ if ($this->core->getNamespaceCount() > 0) {
+ $this->insertNotesInstructions($this->core->getStyles(), 'refnotes_notes_style_instruction');
+ $this->insertNotesInstructions($this->core->getMappings(), 'refnotes_notes_map_instruction');
+ $this->renderLeftovers();
+
+ $this->calls->applyChanges();
+
+ $this->renderStructuredNotes();
+
+ $this->calls->applyChanges();
+ }
+ }
+
+ /**
+ *
+ */
+ private function scanInstructions() {
+ foreach ($this->calls as $call) {
+ $this->markHiddenReferences($call);
+ $this->markReferenceGroups($call);
+ $this->markScopeLimits($call);
+ $this->extractStyles($call);
+ $this->extractMappings($call);
+ }
+ }
+
+ /**
+ *
+ */
+ private function markHiddenReferences($call) {
+ switch ($call->getName()) {
+ case 'p_open':
+ $this->paragraphReferences = array();
+ $this->hidden = true;
+ break;
+
+ case 'p_close':
+ if ($this->hidden) {
+ foreach ($this->paragraphReferences as $call) {
+ $call->setRefnotesAttribute('hidden', true);
+ }
+ }
+ break;
+
+ case 'cdata':
+ if (!$this->inReference && !empty(trim($call->getData(0)))) {
+ $this->hidden = false;
+ }
+ break;
+
+ case 'plugin_refnotes_references':
+ switch ($call->getPluginData(0)) {
+ case 'start':
+ $this->inReference = true;
+ break;
+
+ case 'render':
+ $this->inReference = false;
+ $this->paragraphReferences[] = $call;
+ break;
+ }
+ break;
+
+ default:
+ if (!$this->inReference) {
+ $this->hidden = false;
+ }
+ break;
+ }
+ }
+
+ /**
+ *
+ */
+ private function markReferenceGroups($call) {
+ if (($call->getName() == 'plugin_refnotes_references') && ($call->getPluginData(0) == 'render')) {
+ if (!empty($this->referenceGroup)) {
+ $groupNamespace = $this->referenceGroup[0]->getRefnotesAttribute('ns');
+
+ if ($call->getRefnotesAttribute('ns') != $groupNamespace) {
+ $this->closeReferenceGroup();
+ }
+ }
+
+ $this->referenceGroup[] = $call;
+ }
+ elseif (!$this->inReference && !empty($this->referenceGroup)) {
+ // Allow whitespace "cdata" istructions between references in a group
+ if ($call->getName() == 'cdata' && empty(trim($call->getData(0)))) {
+ return;
+ }
+
+ $this->closeReferenceGroup();
+ }
+ }
+
+ /**
+ *
+ */
+ private function closeReferenceGroup() {
+ $count = count($this->referenceGroup);
+
+ if ($count > 1) {
+ $this->referenceGroup[0]->setRefnotesAttribute('group', 'open');
+
+ for ($i = 1; $i < $count - 1; $i++) {
+ $this->referenceGroup[$i]->setRefnotesAttribute('group', 'hold');
+ }
+
+ $this->referenceGroup[$count - 1]->setRefnotesAttribute('group', 'close');
+ }
+
+ $this->referenceGroup = array();
+ }
+
+ /**
+ *
+ */
+ private function markScopeLimits($call) {
+ switch ($call->getName()) {
+ case 'plugin_refnotes_references':
+ if ($call->getPluginData(0) == 'render') {
+ $this->core->markScopeStart($call->getRefnotesAttribute('ns'), $call->getIndex());
+ }
+ break;
+
+ case 'plugin_refnotes_notes':
+ $this->core->markScopeEnd($call->getRefnotesAttribute('ns'), $call->getIndex());
+ break;
+ }
+ }
+
+ /**
+ * Extract style data and replace "split" instructions with "render"
+ */
+ private function extractStyles($call) {
+ if (($call->getName() == 'plugin_refnotes_notes') && ($call->getPluginData(0) == 'split')) {
+ $this->core->addStyle($call->getRefnotesAttribute('ns'), $call->getPluginData(2));
+
+ $call->setPluginData(0, 'render');
+ $call->unsetPluginData(2);
+ }
+ }
+
+ /**
+ * Extract namespace mapping info
+ */
+ private function extractMappings($call) {
+ if ($call->getName() == 'plugin_refnotes_notes') {
+ $map = $call->getRefnotesAttribute('map');
+
+ if (!empty($map)) {
+ $this->core->addMapping($call->getRefnotesAttribute('ns'), $map);
+ $call->unsetRefnotesAttribute('map');
+ }
+ }
+ }
+
+ /**
+ *
+ */
+ private function insertNotesInstructions($stash, $instruction) {
+ if ($stash->getCount() == 0) {
+ return;
+ }
+
+ $stash->sort();
+
+ foreach ($stash->getIndex() as $index) {
+ foreach ($stash->getAt($index) as $data) {
+ $this->calls->insert($index, new $instruction($data->getNamespace(), $data->getData()));
+ }
+ }
+ }
+
+ /**
+ * Insert render call at the very bottom of the page
+ */
+ private function renderLeftovers() {
+ $this->calls->append(new refnotes_notes_render_instruction('*'));
+ }
+
+ /**
+ *
+ */
+ private function renderStructuredNotes() {
+ $this->core->reset();
+
+ foreach ($this->calls as $call) {
+ $this->styleNamespaces($call);
+ $this->setNamespaceMappings($call);
+ $this->addReferences($call);
+ $this->rewriteReferences($call);
+ }
+ }
+
+ /**
+ *
+ */
+ private function styleNamespaces($call) {
+ if (($call->getName() == 'plugin_refnotes_notes') && ($call->getPluginData(0) == 'style')) {
+ $this->core->styleNamespace($call->getRefnotesAttribute('ns'), $call->getPluginData(2));
+ }
+ }
+
+ /**
+ *
+ */
+ private function setNamespaceMappings($call) {
+ if (($call->getName() == 'plugin_refnotes_notes') && ($call->getPluginData(0) == 'map')) {
+ $this->core->setNamespaceMapping($call->getRefnotesAttribute('ns'), $call->getPluginData(2));
+ }
+ }
+
+ /**
+ *
+ */
+ private function addReferences($call) {
+ if (($call->getName() == 'plugin_refnotes_references') && ($call->getPluginData(0) == 'render')) {
+ $attributes = $call->getPluginData(1);
+ $data = (count($call->getData(1)) > 2) ? $call->getPluginData(2) : array();
+ $reference = $this->core->addReference($attributes, $data, $call);
+
+ if ($call->getPrevious()->getName() != 'plugin_refnotes_references') {
+ $reference->getNote()->setText('defined');
+ }
+ }
+ }
+
+ /**
+ *
+ */
+ private function rewriteReferences($call) {
+ if (($call->getName() == 'plugin_refnotes_notes') && ($call->getPluginData(0) == 'render')) {
+ $this->core->rewriteReferences($call->getRefnotesAttribute('ns'), $call->getRefnotesAttribute('limit'));
+ }
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+class refnotes_before_ajax_call_unknown {
+
+ /**
+ * Register callback
+ */
+ public function register($controller) {
+ $controller->register_hook('AJAX_CALL_UNKNOWN', 'BEFORE', $this, 'handle');
+ }
+
+ /**
+ *
+ */
+ public function handle($event, $param) {
+ global $conf;
+
+ if ($event->data == 'refnotes-admin') {
+ $event->preventDefault();
+ $event->stopPropagation();
+
+ /* Check admin rights */
+ if (auth_quickaclcheck($conf['start']) < AUTH_ADMIN) {
+ die('access denied');
+ }
+
+ switch ($_POST['action']) {
+ case 'load-settings':
+ $this->sendConfig();
+ break;
+
+ case 'save-settings':
+ $this->saveConfig($_POST['settings']);
+ break;
+ }
+ }
+ }
+
+ /**
+ *
+ */
+ private function sendResponse($contentType, $data) {
+ static $cookie = '{B27067E9-3DDA-4E31-9768-E66F23D18F4A}';
+
+ header('Content-Type: ' . $contentType);
+ print($cookie . $data . $cookie);
+ }
+
+ /**
+ *
+ */
+ private function sendConfig() {
+ $namespace = refnotes_configuration::load('namespaces');
+ $namespace = $this->translateStyles($namespace, 'dw', 'js');
+
+ $config['general'] = refnotes_configuration::load('general');
+ $config['namespaces'] = $namespace;
+ $config['notes'] = refnotes_configuration::load('notes');
+
+ $this->sendResponse('application/x-suggestions+json', json_encode($config));
+ }
+
+ /**
+ *
+ */
+ private function saveConfig($config) {
+ global $config_cascade;
+
+ $config = json_decode($config, true);
+
+ $namespace = $config['namespaces'];
+ $namespace = $this->translateStyles($namespace, 'js', 'dw');
+
+ $saved = refnotes_configuration::save('general', $config['general']);
+ $saved = $saved && refnotes_configuration::save('namespaces', $namespace);
+ $saved = $saved && refnotes_configuration::save('notes', $config['notes']);
+
+ if ($config['general']['reference-db-enable']) {
+ $saved = $saved && $this->setupReferenceDatabase($config['general']['reference-db-namespace']);
+ }
+
+ /* Touch local config file to expire the cache */
+ $saved = $saved && touch(reset($config_cascade['main']['local']));
+
+ $this->sendResponse('text/plain', $saved ? 'saved' : 'failed');
+ }
+
+ /**
+ *
+ */
+ private function translateStyles($namespace, $from, $to) {
+ foreach ($namespace as &$ns) {
+ foreach ($ns as $styleName => &$style) {
+ $style = $this->translateStyle($styleName, $style, $from, $to);
+ }
+ }
+
+ return $namespace;
+ }
+
+ /**
+ *
+ */
+ private function translateStyle($styleName, $style, $from, $to) {
+ static $dictionary = array(
+ 'refnote-id' => array(
+ 'dw' => array('1' , 'a' , 'A' , 'i' , 'I' , '*' , 'name' ),
+ 'js' => array('numeric', 'latin-lower', 'latin-upper', 'roman-lower', 'roman-upper', 'stars', 'note-name')
+ ),
+ 'reference-base' => array(
+ 'dw' => array('sup' , 'text' ),
+ 'js' => array('super', 'normal-text')
+ ),
+ 'reference-format' => array(
+ 'dw' => array(')' , '()' , ']' , '[]' ),
+ 'js' => array('right-parent', 'parents', 'right-bracket', 'brackets')
+ ),
+ 'reference-group' => array(
+ 'dw' => array('none' , ',' , 's' ),
+ 'js' => array('group-none', 'group-comma', 'group-semicolon')
+ ),
+ 'multi-ref-id' => array(
+ 'dw' => array('ref' , 'note' ),
+ 'js' => array('ref-counter', 'note-counter')
+ ),
+ 'note-id-base' => array(
+ 'dw' => array('sup' , 'text' ),
+ 'js' => array('super', 'normal-text')
+ ),
+ 'note-id-format' => array(
+ 'dw' => array(')' , '()' , ']' , '[]' , '.' ),
+ 'js' => array('right-parent', 'parents', 'right-bracket', 'brackets', 'dot')
+ ),
+ 'back-ref-base' => array(
+ 'dw' => array('sup' , 'text' ),
+ 'js' => array('super', 'normal-text')
+ ),
+ 'back-ref-format' => array(
+ 'dw' => array('1' , 'a' , 'note' ),
+ 'js' => array('numeric', 'latin', 'note-id')
+ ),
+ 'back-ref-separator' => array(
+ 'dw' => array(',' ),
+ 'js' => array('comma')
+ ),
+ 'struct-refs' => array(
+ 'dw' => array('off' , 'on' ),
+ 'js' => array('disable', 'enable')
+ )
+ );
+
+ if (array_key_exists($styleName, $dictionary)) {
+ $key = array_search($style, $dictionary[$styleName][$from]);
+
+ if ($key !== false) {
+ $style = $dictionary[$styleName][$to][$key];
+ }
+ }
+
+ return $style;
+ }
+
+ /**
+ *
+ */
+ private function setupReferenceDatabase($namespace) {
+ $success = true;
+ $source = refnotes_localization::getInstance()->getFileName('__template');
+ $destination = wikiFN(cleanID($namespace . ':template'));
+ $destination = preg_replace('/template.txt$/', '__template.txt', $destination);
+
+ if (@filemtime($destination) < @filemtime($source)) {
+ if (!file_exists(dirname($destination))) {
+ @mkdir(dirname($destination), 0755, true);
+ }
+
+ $success = copy($source, $destination);
+
+ touch($destination, filemtime($source));
+ }
+
+ return $success;
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+class refnotes_before_parser_cache_use {
+
+ /**
+ * Register callback
+ */
+ public function register($controller) {
+ $controller->register_hook('PARSER_CACHE_USE', 'BEFORE', $this, 'handle');
+ }
+
+ /**
+ *
+ */
+ public function handle($event, $param) {
+ global $ID;
+
+ $cache = $event->data;
+
+ if (isset($cache->page) && ($cache->page == $ID)) {
+ if (isset($cache->mode) && (($cache->mode == 'xhtml') || ($cache->mode == 'i'))) {
+ $meta = p_get_metadata($ID, 'plugin refnotes');
+
+ if (!empty($meta) && isset($meta['dbref'])) {
+ $this->addDependencies($cache, array_keys($meta['dbref']));
+ }
+ }
+ }
+ }
+
+ /**
+ * Add extra dependencies to the cache
+ */
+ private function addDependencies($cache, $depends) {
+ foreach ($depends as $file) {
+ if (!in_array($file, $cache->depends['files']) && file_exists($file)) {
+ $cache->depends['files'][] = $file;
+ }
+ }
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+class refnotes_before_parser_wikitext_preprocess {
+
+ /**
+ * Register callback
+ */
+ public function register($controller) {
+ $controller->register_hook('PARSER_WIKITEXT_PREPROCESS', 'BEFORE', $this, 'handle');
+ }
+
+ /**
+ *
+ */
+ public function handle($event, $param) {
+ refnotes_parser_core::getInstance()->enterParsingContext();
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+class refnotes_before_tpl_metaheader_output {
+
+ /**
+ * Register callback
+ */
+ public function register($controller) {
+ $controller->register_hook('TPL_METAHEADER_OUTPUT', 'BEFORE', $this, 'handle');
+ }
+
+ /**
+ *
+ */
+ public function handle($event, $param) {
+ if (!empty($_REQUEST['do']) && $_REQUEST['do'] == 'admin' &&
+ !empty($_REQUEST['page']) && $_REQUEST['page'] == 'refnotes') {
+ $this->addAdminIncludes($event);
+ }
+ }
+
+ /**
+ *
+ */
+ private function addAdminIncludes($event) {
+ $this->addTemplateHeaderInclude($event, 'admin.js');
+ $this->addTemplateHeaderInclude($event, 'admin.css');
+ }
+
+ /**
+ *
+ */
+ private function addTemplateHeaderInclude($event, $fileName) {
+ $type = '';
+ $fileName = DOKU_BASE . 'lib/plugins/refnotes/' . $fileName;
+
+ switch (pathinfo($fileName, PATHINFO_EXTENSION)) {
+ case 'js':
+ $type = 'script';
+ $data = array('type' => 'text/javascript', 'charset' => 'utf-8', 'src' => $fileName, '_data' => '', 'defer' => 'defer');
+ break;
+
+ case 'css':
+ $type = 'link';
+ $data = array('type' => 'text/css', 'rel' => 'stylesheet', 'href' => $fileName);
+ break;
+ }
+
+ if ($type != '') {
+ $event->data[$type][] = $data;
+ }
+ }
+}
diff --git a/platform/www/lib/plugins/refnotes/admin.css b/platform/www/lib/plugins/refnotes/admin.css
new file mode 100644
index 0000000..2c97a50
--- /dev/null
+++ b/platform/www/lib/plugins/refnotes/admin.css
@@ -0,0 +1,100 @@
+div#refnotes-config div#config__manager div.cleared {
+ background-color: #eee;
+ color: #bbb;
+ border: 1px solid #ccc;
+ font-size: 90%;
+ margin: 0;
+ padding: 0.5em;
+ text-align: center;
+}
+
+div#refnotes-config div#config__manager div.info {
+ border: 1px solid #aaf;
+}
+
+div#refnotes-config div#config__manager div.success {
+ border: 1px solid #9e9;
+}
+
+div#refnotes-config div#config__manager div.error {
+ border: 1px solid #faa;
+}
+
+div#refnotes-config div#config__manager td.list {
+ position: relative;
+ background-clip: padding-box;
+ width: 15em;
+}
+
+div#refnotes-config div#config__manager select.list {
+ position: absolute;
+ top: 0.5em;
+ bottom: 0.5em;
+ width: 15em;
+}
+
+div#refnotes-config div#config__manager td.lean-label {
+ padding: 0.6em 0 0.6em 1em;
+ vertical-align: top;
+}
+
+div#refnotes-config div#config__manager td.value {
+ padding: 0.5em 0.5em;
+ width: 20em;
+}
+
+div#refnotes-config div#config__manager td.value div.input {
+ width: auto;
+}
+
+div#refnotes-config div#config__manager td.value select {
+ width: 99%;
+}
+
+div#refnotes-config div#config__manager td.value input.edit {
+ width: auto;
+}
+
+div#refnotes-config div#config__manager td.value input.button {
+ background-color: #fff;
+ color: #000;
+}
+
+div#refnotes-config div#config__manager input.button[disabled],
+div#refnotes-config div#config__manager td.value input.button[disabled] {
+ color: #666;
+}
+
+div#refnotes-config div#config__manager td.value textarea {
+ width: 100%;
+ height: auto;
+ resize: vertical;
+ margin: 0;
+}
+
+div#refnotes-config div#config__manager div.list-controls {
+ text-align: left;
+ margin-bottom: 1em;
+}
+
+div#refnotes-config div#config__manager div.list-controls input.edit {
+ width: 14em;
+}
+
+div#refnotes-config div#config__manager td .input {
+ background-color: inherit;
+}
+
+div#refnotes-config div#config__manager td.default input,
+div#refnotes-config div#config__manager td.default textarea,
+div#refnotes-config div#config__manager td.default select {
+ background-color: #ccddff;
+ color: #000;
+}
+
+div#refnotes-config div#config__manager td.inherited input,
+div#refnotes-config div#config__manager td.inherited textarea,
+div#refnotes-config div#config__manager td.inherited select {
+ background-color: #ddeedd;
+ color: #000;
+}
diff --git a/platform/www/lib/plugins/refnotes/admin.js b/platform/www/lib/plugins/refnotes/admin.js
new file mode 100644
index 0000000..d3a46dd
--- /dev/null
+++ b/platform/www/lib/plugins/refnotes/admin.js
@@ -0,0 +1,1035 @@
+let refnotes_admin = (function () {
+ let modified = false;
+
+
+ class NameMap extends Map {
+ constructor(sentinel) {
+ super();
+
+ this.sentinel = sentinel;
+ }
+
+ get(key) {
+ return key == '' ? this.sentinel : super.get(key);
+ }
+
+ has(key) {
+ return key == '' ? true : super.has(key);
+ }
+ }
+
+
+ class NamedObjectMap extends Map {
+ set(value) {
+ super.set(value.getName(), value);
+ }
+ }
+
+
+ function List(id) {
+ let list = jQuery(id);
+
+ function appendOption(value) {
+ jQuery('<option>')
+ .html(value)
+ .val(value)
+ .prop('sorting', value.replace(/:/g, '-').replace(/(-\w+)$/, '-$1'))
+ .appendTo(list);
+ }
+
+ function sortOptions() {
+ list.append(list.children().get().sort(function (a, b) {
+ return a.sorting > b.sorting ? 1 : -1;
+ }));
+ }
+
+ this.getSelectedValue = function () {
+ return list.val();
+ }
+
+ this.insertValue = function (value) {
+ appendOption(value);
+ sortOptions();
+
+ return list.children('[value="' + value + '"]').attr('selected', 'selected').val();
+ }
+
+ this.reload = function (values) {
+ list.empty();
+
+ for (let value of values.keys()) {
+ if (value != '') {
+ appendOption(value);
+ }
+ }
+
+ sortOptions();
+
+ return list.children(':first').attr('selected', 'selected').val();
+ }
+
+ this.removeValue = function (value) {
+ let option = list.children('[value="' + value + '"]');
+
+ if (option.length == 1) {
+ list.prop('selectedIndex', option.index() + (option.is(':last-child') ? -1 : 1));
+ option.remove();
+ }
+
+ return list.val();
+ }
+
+ this.renameValue = function (oldValue, newValue) {
+ if (list.children('[value="' + oldValue + '"]').remove().length == 1) {
+ this.insertValue(newValue);
+ }
+
+ return list.val();
+ }
+ }
+
+
+ let locale = (function () {
+ let lang = new Map();
+
+ function initialize() {
+ jQuery.each(jQuery('#refnotes-lang').html().split(/:eos:/), function (key, value) {
+ let match = value.match(/^\s*(\w+) : (.+)/);
+ if (match != null) {
+ lang.set(match[1], match[2]);
+ }
+ });
+ }
+
+ function getString(key) {
+ let string = lang.has(key) ? lang.get(key) : '';
+
+ if ((string.length > 0) && (arguments.length > 1)) {
+ for (let i = 1; i < arguments.length; i++) {
+ string = string.replace(new RegExp('\\{' + i + '\\}'), arguments[i]);
+ }
+ }
+
+ return string;
+ }
+
+ return {
+ initialize,
+ getString
+ }
+ })();
+
+
+ let server = (function () {
+ let timer = null;
+ let transaction = null;
+
+ function sendRequest(request, data, success) {
+ if (transaction == null) {
+ transaction = request;
+
+ jQuery.ajax({
+ cache : false,
+ data : data,
+ global : false,
+ success : success,
+ type : 'POST',
+ timeout : 10000,
+ url : DOKU_BASE + 'lib/exe/ajax.php',
+ beforeSend() {
+ setStatus('info', transaction);
+ },
+ error(xhr, status, message) {
+ setErrorStatus((status == 'parseerror') ? 'invalid_data' : transaction + '_failed', message);
+ },
+ dataFilter(data) {
+ let cookie = '{B27067E9-3DDA-4E31-9768-E66F23D18F4A}';
+ let match = data.match(new RegExp(cookie + '(.+?)' + cookie));
+
+ if ((match == null) || (match.length != 2)) {
+ throw 'Malformed response';
+ }
+
+ return match[1];
+ },
+ complete() {
+ transaction = null;
+ }
+ });
+ }
+ else {
+ setErrorStatus(request + '_failed', 'Server is busy');
+ }
+ }
+
+ function loadSettings() {
+ sendRequest('loading', {
+ call : 'refnotes-admin',
+ action : 'load-settings'
+ }, function (data) {
+ setSuccessStatus('loaded', 3000);
+ reloadSettings(data);
+ });
+ }
+
+ function saveSettings(settings) {
+ sendRequest('saving', {
+ call : 'refnotes-admin',
+ action : 'save-settings',
+ settings : JSON.stringify(settings)
+ }, function (data) {
+ if (data == 'saved') {
+ modified = false;
+
+ setSuccessStatus('saved', 10000);
+ }
+ else {
+ setErrorStatus('saving_failed', 'Server FS access error');
+ }
+ });
+ }
+
+ function setStatus(status, message) {
+ window.clearTimeout(timer);
+
+ if (message.match(/^\w+$/) != null) {
+ message = locale.getString(message);
+ }
+
+ jQuery('#server-status')
+ .removeClass()
+ .addClass(status)
+ .text(message);
+ }
+
+ function setErrorStatus(messageId, details) {
+ setStatus('error', locale.getString(messageId, details));
+ }
+
+ function setSuccessStatus(messageId, timeout) {
+ setStatus('success', messageId);
+
+ timer = window.setTimeout(function () {
+ setStatus('cleared', 'status');
+ }, timeout);
+ }
+
+ return {
+ loadSettings,
+ saveSettings
+ }
+ })();
+
+
+ let general = (function () {
+ let fields = new NamedObjectMap();
+ let defaults = new Map([
+ ['replace-footnotes' , false],
+ ['reference-db-enable' , false],
+ ['reference-db-namespace', ':refnotes:']
+ ]);
+
+ function Field(settingName) {
+ this.element = jQuery('#field-' + settingName);
+
+ this.element.change(this, function (event) {
+ event.data.updateDefault();
+ modified = true;
+ });
+
+ this.getName = function () {
+ return settingName;
+ }
+
+ this.updateDefault = function () {
+ this.element.parents('td').toggleClass('default', this.getValue() == defaults.get(settingName));
+ }
+
+ this.enable = function (enable) {
+ this.element.prop('disabled', !enable);
+ }
+ }
+
+ function CheckField(settingName) {
+ this.baseClass = Field;
+ this.baseClass(settingName);
+
+ this.setValue = function (value) {
+ this.element.attr('checked', value);
+ this.updateDefault();
+ }
+
+ this.getValue = function () {
+ return this.element.is(':checked');
+ }
+
+ this.setValue(defaults.get(settingName));
+ this.enable(false);
+ }
+
+ function TextField(settingName) {
+ this.baseClass = Field;
+ this.baseClass(settingName);
+
+ this.setValue = function (value) {
+ this.element.val(value);
+ this.updateDefault();
+ }
+
+ this.getValue = function () {
+ return this.element.val();
+ }
+
+ this.setValue(defaults.get(settingName));
+ this.enable(false);
+ }
+
+ function initialize() {
+ fields.set(new CheckField('replace-footnotes'));
+ fields.set(new CheckField('reference-db-enable'));
+ fields.set(new TextField('reference-db-namespace'));
+
+ jQuery('#field-reference-db-namespace').css('width', '19em');
+ }
+
+ function reload(settings) {
+ for (let name in settings) {
+ if (fields.has(name)) {
+ fields.get(name).setValue(settings[name]);
+ }
+ }
+
+ for (let field of fields.values()) {
+ field.enable(true);
+ }
+ }
+
+ function getSettings() {
+ let settings = {};
+
+ for (let [name, field] of fields) {
+ settings[name] = field.getValue();
+ }
+
+ return settings;
+ }
+
+ return {
+ initialize,
+ reload,
+ getSettings
+ }
+ })();
+
+
+ let namespaces = (function () {
+ let list = null;
+ let fields = new NamedObjectMap();
+ let namespaces = new NameMap(new DefaultNamespace());
+ let current = namespaces.get('');
+ let defaults = new Map([
+ ['refnote-id' , 'numeric'],
+ ['reference-base' , 'super'],
+ ['reference-font-weight', 'normal'],
+ ['reference-font-style' , 'normal'],
+ ['reference-format' , 'right-parent'],
+ ['reference-group' , 'group-none'],
+ ['reference-render' , 'basic'],
+ ['multi-ref-id' , 'ref-counter'],
+ ['note-preview' , 'popup'],
+ ['notes-separator' , '100%'],
+ ['note-text-align' , 'justify'],
+ ['note-font-size' , 'normal'],
+ ['note-render' , 'basic'],
+ ['note-id-base' , 'super'],
+ ['note-id-font-weight' , 'normal'],
+ ['note-id-font-style' , 'normal'],
+ ['note-id-format' , 'right-parent'],
+ ['back-ref-caret' , 'none'],
+ ['back-ref-base' , 'super'],
+ ['back-ref-font-weight' , 'bold'],
+ ['back-ref-font-style' , 'normal'],
+ ['back-ref-format' , 'note-id'],
+ ['back-ref-separator' , 'comma'],
+ ['scoping' , 'reset']
+ ]);
+
+ function DefaultNamespace() {
+ this.isReadOnly = function () {
+ return true;
+ }
+
+ this.setName = function (newName) {
+ }
+
+ this.getName = function () {
+ return '';
+ }
+
+ this.setStyle = function (name, value) {
+ }
+
+ this.getStyle = function (name) {
+ return defaults.get(name);
+ }
+
+ this.getStyleInheritance = function (name) {
+ return 'default';
+ }
+
+ this.getSettings = function () {
+ return {};
+ }
+ }
+
+ function Namespace(name, data) {
+ let styles = data ? new Map(Object.entries(data)) : new Map();
+
+ function getParent() {
+ let parent = name.replace(/\w*:$/, '');
+
+ while (!namespaces.has(parent)) {
+ parent = parent.replace(/\w*:$/, '');
+ }
+
+ return namespaces.get(parent);
+ }
+
+ this.isReadOnly = function () {
+ return false;
+ }
+
+ this.setName = function (newName) {
+ name = newName;
+ }
+
+ this.getName = function () {
+ return name;
+ }
+
+ this.setStyle = function (name, value) {
+ if (value == 'inherit') {
+ styles.delete(name);
+ }
+ else {
+ styles.set(name, value);
+ }
+ }
+
+ this.getStyle = function (name) {
+ let result;
+
+ if (styles.has(name)) {
+ result = styles.get(name);
+ }
+ else {
+ result = getParent().getStyle(name);
+ }
+
+ return result;
+ }
+
+ this.getStyleInheritance = function (name) {
+ let result = '';
+
+ if (!styles.has(name)) {
+ result = getParent().getStyleInheritance(name) || 'inherited';
+ }
+
+ return result;
+ }
+
+ this.getSettings = function () {
+ let settings = {};
+
+ for (let [name, style] of styles) {
+ settings[name] = style;
+ }
+
+ return settings;
+ }
+ }
+
+ function Field(styleName) {
+ this.element = jQuery('#field-' + styleName);
+
+ this.getName = function () {
+ return styleName;
+ }
+
+ this.updateInheretance = function () {
+ this.element.parents('td')
+ .removeClass('default inherited')
+ .addClass(current.getStyleInheritance(styleName));
+ }
+ }
+
+ function SelectField(styleName) {
+ this.baseClass = Field;
+ this.baseClass(styleName);
+
+ let combo = this.element;
+
+ combo.change(this, function (event) {
+ event.data.onChange();
+ });
+
+ function setSelection(value) {
+ combo.val(value);
+ }
+
+ this.onChange = function () {
+ let value = combo.val();
+
+ current.setStyle(styleName, value);
+
+ this.updateInheretance();
+
+ if ((value == 'inherit') || current.isReadOnly()) {
+ setSelection(current.getStyle(styleName));
+ }
+
+ modified = true;
+ }
+
+ this.update = function () {
+ this.updateInheretance();
+ setSelection(current.getStyle(styleName));
+ combo.prop('disabled', current.isReadOnly());
+ }
+ }
+
+ function TextField(styleName, validate) {
+ this.baseClass = Field;
+ this.baseClass(styleName);
+
+ let edit = this.element;
+ let button = jQuery('#field-' + styleName + '-inherit');
+
+ edit.change(this, function (event) {
+ event.data.setValue(validate(edit.val()));
+ });
+
+ button.click(this, function (event) {
+ event.data.setValue('inherit');
+ });
+
+ this.setValue = function (value) {
+ current.setStyle(styleName, value);
+
+ this.updateInheretance();
+
+ if ((edit.val() != value) || (value == 'inherit') || current.isReadOnly()) {
+ edit.val(current.getStyle(styleName));
+ }
+
+ modified = true;
+ }
+
+ this.update = function () {
+ this.updateInheretance();
+
+ edit.val(current.getStyle(styleName));
+ edit.prop('disabled', current.isReadOnly());
+ button.prop('disabled', current.isReadOnly());
+ }
+ }
+
+ function initialize() {
+ list = new List('#select-namespaces');
+
+ fields.set(new SelectField('refnote-id'));
+ fields.set(new SelectField('reference-base'));
+ fields.set(new SelectField('reference-font-weight'));
+ fields.set(new SelectField('reference-font-style'));
+ fields.set(new SelectField('reference-format'));
+ fields.set(new SelectField('reference-group'));
+ fields.set(new SelectField('reference-render'));
+ fields.set(new SelectField('multi-ref-id'));
+ fields.set(new SelectField('note-preview'));
+ fields.set(new TextField('notes-separator', function (value) {
+ return (value.match(/(?:\d+\.?|\d*\.\d+)(?:%|em|px)|none/) != null) ? value : 'none';
+ }));
+ fields.set(new SelectField('note-text-align'));
+ fields.set(new SelectField('note-font-size'));
+ fields.set(new SelectField('note-render'));
+ fields.set(new SelectField('note-id-base'));
+ fields.set(new SelectField('note-id-font-weight'));
+ fields.set(new SelectField('note-id-font-style'));
+ fields.set(new SelectField('note-id-format'));
+ fields.set(new SelectField('back-ref-caret'));
+ fields.set(new SelectField('back-ref-base'));
+ fields.set(new SelectField('back-ref-font-weight'));
+ fields.set(new SelectField('back-ref-font-style'));
+ fields.set(new SelectField('back-ref-format'));
+ fields.set(new SelectField('back-ref-separator'));
+ fields.set(new SelectField('scoping'));
+
+ jQuery('#select-namespaces').change(onNamespaceChange);
+ jQuery('#name-namespaces').prop('disabled', true);
+ jQuery('#add-namespaces').click(onAddNamespace).prop('disabled', true);
+ jQuery('#rename-namespaces').click(onRenameNamespace).prop('disabled', true);
+ jQuery('#delete-namespaces').click(onDeleteNamespace).prop('disabled', true);
+
+ updateFields();
+ }
+
+ function onNamespaceChange(event) {
+ setCurrent(list.getSelectedValue());
+ }
+
+ function onAddNamespace(event) {
+ try {
+ let name = validateName(jQuery('#name-namespaces').val(), 'ns', namespaces);
+
+ namespaces.set(name, new Namespace(name));
+
+ setCurrent(list.insertValue(name));
+
+ modified = true;
+ }
+ catch (error) {
+ alert(error);
+ }
+ }
+
+ function onRenameNamespace(event) {
+ try {
+ let newName = validateName(jQuery('#name-namespaces').val(), 'ns', namespaces);
+ let oldName = current.getName();
+
+ current.setName(newName);
+
+ namespaces.delete(oldName);
+ namespaces.set(newName, current);
+
+ setCurrent(list.renameValue(oldName, newName));
+
+ modified = true;
+ }
+ catch (error) {
+ alert(error);
+ }
+ }
+
+ function onDeleteNamespace(event) {
+ if (confirm(locale.getString('delete_ns', current.getName()))) {
+ namespaces.delete(current.getName());
+
+ setCurrent(list.removeValue(current.getName()));
+
+ modified = true;
+ }
+ }
+
+ function reload(settings) {
+ namespaces.clear();
+
+ for (let name in settings) {
+ if (name.match(/^:$|^:.+?:$/) != null) {
+ namespaces.set(name, new Namespace(name, settings[name]));
+ }
+ }
+
+ jQuery('#name-namespaces').prop('disabled', false);
+ jQuery('#add-namespaces').prop('disabled', false);
+
+ setCurrent(list.reload(namespaces));
+ }
+
+ function setCurrent(name) {
+ current = namespaces.get(name);
+
+ updateFields();
+ }
+
+ function updateFields() {
+ jQuery('#name-namespaces').val(current.getName());
+ jQuery('#rename-namespaces').prop('disabled', current.isReadOnly());
+ jQuery('#delete-namespaces').prop('disabled', current.isReadOnly());
+
+ for (let field of fields.values()) {
+ field.update();
+ }
+ }
+
+ function getSettings() {
+ let settings = {};
+
+ for (let [name, namespace] of namespaces) {
+ settings[name] = namespace.getSettings();
+ }
+
+ return settings;
+ }
+
+ return {
+ initialize,
+ reload,
+ getSettings
+ }
+ })();
+
+
+ let notes = (function () {
+ let list = null;
+ let fields = new NamedObjectMap();
+ let notes = new NameMap(new EmptyNote());
+ let current = notes.get('');
+ let defaults = new Map([
+ ['inline' , false],
+ ['use-reference-base' , true],
+ ['use-reference-font-weight', true],
+ ['use-reference-font-style' , true],
+ ['use-reference-format' , true]
+ ]);
+ let inlineAttributes = [
+ 'use-reference-base',
+ 'use-reference-font-weight',
+ 'use-reference-font-style',
+ 'use-reference-format'
+ ];
+
+ function isInlineAttribute(name) {
+ return inlineAttributes.indexOf(name) != -1;
+ }
+
+ function EmptyNote() {
+ this.isReadOnly = function () {
+ return true;
+ }
+
+ this.setName = function (newName) {
+ }
+
+ this.getName = function () {
+ return '';
+ }
+
+ this.setText = function (text) {
+ }
+
+ this.getText = function () {
+ return '';
+ }
+
+ this.setAttribute = function (name, value) {
+ }
+
+ this.getAttribute = function (name) {
+ return defaults.get(name);
+ }
+
+ this.getSettings = function () {
+ return {};
+ }
+ }
+
+ function Note(name, data) {
+ let attributes = data ? new Map(Object.entries(data)) : new Map();
+
+ this.isReadOnly = function () {
+ return false;
+ }
+
+ this.setName = function (newName) {
+ name = newName;
+ }
+
+ this.getName = function () {
+ return name;
+ }
+
+ this.setText = function (text) {
+ attributes.set('text', text);
+ }
+
+ this.getText = function () {
+ return attributes.get('text');
+ }
+
+ this.setAttribute = function (name, value) {
+ attributes.set(name, value);
+ }
+
+ this.getAttribute = function (name) {
+ if (!attributes.has(name) || (isInlineAttribute(name) && !this.getAttribute('inline'))) {
+ return defaults.get(name);
+ }
+ else {
+ return attributes.get(name);
+ }
+ }
+
+ this.getSettings = function () {
+ let settings = {};
+
+ if (!this.getAttribute('inline')) {
+ for (let i in inlineAttributes) {
+ if (attributes.has(inlineAttributes[i])) {
+ attributes.delete(inlineAttributes[i]);
+ }
+ }
+ }
+
+ for (let [name, attribute] of attributes) {
+ settings[name] = attribute;
+ }
+
+ return settings;
+ }
+ }
+
+ function Field(attributeName) {
+ this.element = jQuery('#field-' + attributeName);
+
+ this.element.change(this, function (event) {
+ current.setAttribute(attributeName, event.data.getValue());
+ modified = true;
+ });
+
+ this.getName = function () {
+ return attributeName;
+ }
+
+ this.enable = function (enable) {
+ this.element.prop('disabled', !enable);
+ }
+ }
+
+ function CheckField(attributeName) {
+ this.baseClass = Field;
+ this.baseClass(attributeName);
+
+ this.setValue = function (value) {
+ this.element.attr('checked', value);
+ }
+
+ this.getValue = function () {
+ return this.element.is(':checked');
+ }
+
+ this.update = function () {
+ this.setValue(current.getAttribute(attributeName));
+ this.enable(!current.isReadOnly() && (!isInlineAttribute(attributeName) || current.getAttribute('inline')));
+ }
+ }
+
+ function InlineField() {
+ this.baseClass = CheckField;
+ this.baseClass('inline');
+
+ this.element.change(this, function (event) {
+ for (let i in inlineAttributes) {
+ fields.get(inlineAttributes[i]).update();
+ }
+ });
+ }
+
+ function initialize() {
+ list = new List('#select-notes');
+
+ fields.set(new InlineField());
+ fields.set(new CheckField('use-reference-base'));
+ fields.set(new CheckField('use-reference-font-weight'));
+ fields.set(new CheckField('use-reference-font-style'));
+ fields.set(new CheckField('use-reference-format'));
+
+ jQuery('#select-notes').change(onNoteChange);
+ jQuery('#name-notes').prop('disabled', true);
+ jQuery('#add-notes').click(onAddNote).prop('disabled', true);
+ jQuery('#rename-notes').click(onRenameNote).prop('disabled', true);
+ jQuery('#delete-notes').click(onDeleteNote).prop('disabled', true);
+ jQuery('#field-note-text').change(onTextChange);
+
+ updateFields();
+ }
+
+ function onNoteChange(event) {
+ setCurrent(list.getSelectedValue());
+ }
+
+ function onAddNote(event) {
+ try {
+ let name = validateName(jQuery('#name-notes').val(), 'note', notes);
+
+ notes.set(name, new Note(name));
+
+ setCurrent(list.insertValue(name));
+
+ modified = true;
+ }
+ catch (error) {
+ alert(error);
+ }
+ }
+
+ function onRenameNote(event) {
+ try {
+ let newName = validateName(jQuery('#name-notes').val(), 'note', notes);
+ let oldName = current.getName();
+
+ current.setName(newName);
+
+ notes.delete(oldName);
+ notes.set(newName, current);
+
+ setCurrent(list.renameValue(oldName, newName));
+
+ modified = true;
+ }
+ catch (error) {
+ alert(error);
+ }
+ }
+
+ function onDeleteNote(event) {
+ if (confirm(locale.getString('delete_note', current.getName()))) {
+ notes.delete(current.getName());
+
+ setCurrent(list.removeValue(current.getName()));
+
+ modified = true;
+ }
+ }
+
+ function onTextChange(event) {
+ current.setText(event.target.value);
+
+ modified = true;
+ }
+
+ function reload(settings) {
+ notes.clear();
+
+ for (let name in settings) {
+ if (name.match(/^:.+?\w$/) != null) {
+ notes.set(name, new Note(name, settings[name]));
+ }
+ }
+
+ jQuery('#name-notes').prop('disabled', false);
+ jQuery('#add-notes').prop('disabled', false);
+
+ setCurrent(list.reload(notes));
+ }
+
+ function setCurrent(name) {
+ current = notes.get(name);
+
+ updateFields();
+ }
+
+ function updateFields() {
+ jQuery('#name-notes').val(current.getName());
+ jQuery('#rename-notes').prop('disabled', current.isReadOnly());
+ jQuery('#delete-notes').prop('disabled', current.isReadOnly());
+ jQuery('#field-note-text').val(current.getText()).prop('disabled', current.isReadOnly());
+
+ for (let field of fields.values()) {
+ field.update();
+ }
+ }
+
+ function getSettings() {
+ let settings = {};
+
+ for (let [name, note] of notes) {
+ settings[name] = note.getSettings();
+ }
+
+ return settings;
+ }
+
+ return {
+ initialize,
+ reload,
+ getSettings
+ }
+ })();
+
+
+ function initialize() {
+ locale.initialize();
+ general.initialize();
+ namespaces.initialize();
+ notes.initialize();
+
+ jQuery('#save-config').click(function () {
+ saveSettings();
+ });
+
+ window.onbeforeunload = onBeforeUnload;
+
+ jQuery('#server-status').show();
+
+ server.loadSettings();
+ }
+
+ function reloadSettings(settings) {
+ general.reload(settings.general);
+ namespaces.reload(settings.namespaces);
+ notes.reload(settings.notes);
+ }
+
+ function saveSettings() {
+ let settings = {};
+
+ settings.general = general.getSettings();
+ settings.namespaces = namespaces.getSettings();
+ settings.notes = notes.getSettings();
+
+ server.saveSettings(settings);
+
+ scroll(0, 0);
+ }
+
+ function onBeforeUnload(event) {
+ if (modified) {
+ let message = locale.getString('unsaved');
+
+ (event || window.event).returnValue = message;
+
+ return message;
+ }
+ }
+
+ function validateName(name, type, existing) {
+ let names = name.split(':');
+
+ name = (type == 'ns') ? ':' : '';
+
+ for (let i = 0; i < names.length; i++) {
+ if (names[i] != '') {
+ /* ECMA regexp doesn't support POSIX character classes, so [a-zA-Z] is used instead of [[:alpha:]] */
+ if (names[i].match(/^[a-zA-Z]\w*$/) == null) {
+ name = '';
+ break;
+ }
+
+ name += (type == 'ns') ? names[i] + ':' : ':' + names[i];
+ }
+ }
+
+ if (name == '') {
+ throw locale.getString('invalid_' + type + '_name');
+ }
+
+ if (existing.has(name)) {
+ throw locale.getString(type + '_name_exists', name);
+ }
+
+ return name;
+ }
+
+ return {
+ initialize
+ }
+})();
+
+
+jQuery(function () {
+ if (jQuery('#refnotes-config').length != 0) {
+ refnotes_admin.initialize();
+ }
+});
diff --git a/platform/www/lib/plugins/refnotes/admin.php b/platform/www/lib/plugins/refnotes/admin.php
new file mode 100644
index 0000000..499aa8c
--- /dev/null
+++ b/platform/www/lib/plugins/refnotes/admin.php
@@ -0,0 +1,751 @@
+<?php
+
+/**
+ * Plugin RefNotes: Configuration interface
+ *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author Mykola Ostrovskyy <dwpforge@gmail.com>
+ */
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+class admin_plugin_refnotes extends DokuWiki_Admin_Plugin {
+ use refnotes_localization_plugin;
+
+ private $html;
+ private $locale;
+
+ /**
+ * Constructor
+ */
+ public function __construct() {
+ refnotes_localization::initialize($this);
+
+ $this->html = new refnotes_html_sink();
+ $this->locale = refnotes_localization::getInstance();
+ }
+
+ /**
+ * Handle user request
+ */
+ public function handle() {
+ /* All handling is done using AJAX */
+ }
+
+ /**
+ * Output appropriate html
+ */
+ public function html() {
+ print($this->locale_xhtml('intro'));
+
+ $this->html->ptln('<!-- refnotes -->');
+
+ $this->printLanguageStrings();
+
+ $this->html->ptln('<div id="refnotes-config"><div id="config__manager">');
+ $this->html->ptln('<noscript><div class="error">' . $this->locale->getLang('noscript') . '</div></noscript>');
+ $this->html->ptln('<div id="server-status" class="info" style="display: none;">&nbsp;</div>');
+ $this->html->ptln('<form action="" method="post">');
+ $this->html->indent();
+
+ $this->printGeneral();
+ $this->printNamespaces();
+ $this->printNotes();
+
+ $this->html->ptln($this->getButton('save'));
+
+ $this->html->unindent();
+ $this->html->ptln('</form></div></div>');
+ $this->html->ptln('<!-- /refnotes -->');
+ }
+
+ /**
+ * Built-in JS localization stores all language strings in the common script (produced by js.php).
+ * The strings used by administration plugin seem to be unnecessary in that script. Instead we print
+ * them as part of the page and then load them into the LANG array on the client side.
+ */
+ private function printLanguageStrings() {
+ $lang = $this->locale->getByPrefix('js');
+
+ $this->html->ptln('<div id="refnotes-lang" style="display: none;">');
+
+ foreach ($lang as $key => $value) {
+ ptln($key . ' : ' . $value . ':eos:');
+ }
+
+ $this->html->ptln('</div>');
+ }
+
+ /**
+ *
+ */
+ private function printGeneral() {
+ $section = new refnotes_config_general();
+ $section->printHtml($this->html);
+ }
+
+ /**
+ *
+ */
+ private function printNamespaces() {
+ $section = new refnotes_config_namespaces();
+ $section->printHtml($this->html);
+ }
+
+ /**
+ *
+ */
+ private function printNotes() {
+ $section = new refnotes_config_notes();
+ $section->printHtml($this->html);
+ }
+
+ /**
+ *
+ */
+ private function getButton($action) {
+ $html = '<input type="button" class="button"';
+ $id = $action . '-config';
+ $html .= ' id="' . $id . '"';
+ $html .= ' name="' . $id . '"';
+ $html .= ' value="' . $this->locale->getLang('btn_' . $action) . '"';
+ $html .= ' />';
+
+ return $html;
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+class refnotes_config_section {
+
+ protected $html;
+ protected $id;
+ protected $title;
+
+ /**
+ * Constructor
+ */
+ public function __construct($id) {
+ $this->html = NULL;
+ $this->id = $id;
+ $this->title = 'sec_' . $id;
+ }
+
+ /**
+ *
+ */
+ public function printHtml($html) {
+ $this->html = $html;
+ $this->open();
+ $this->printFields();
+ $this->close();
+ }
+
+ /**
+ *
+ */
+ protected function open() {
+ $title = refnotes_localization::getInstance()->getLang($this->title);
+
+ $this->html->ptln('<fieldset id="' . $this->id . '">');
+ $this->html->ptln('<legend>' . $title . '</legend>');
+ $this->html->ptln('<table class="inline" cols="3">');
+ $this->html->indent();
+ }
+
+ /**
+ *
+ */
+ protected function close() {
+ $this->html->unindent();
+ $this->html->ptln('</table>');
+ $this->html->ptln('</fieldset>');
+ }
+
+ /**
+ *
+ */
+ protected function printFields() {
+ $field = $this->getFields();
+ foreach ($field as $f) {
+ $this->printFieldRow($f);
+ }
+ }
+
+ /**
+ *
+ */
+ protected function getFields() {
+ $fieldData = $this->getFieldDefinitions();
+ $field = array();
+
+ foreach ($fieldData as $id => $fd) {
+ $class = 'refnotes_config_' . $fd['class'];
+ $field[] = new $class($id, $fd);
+ }
+
+ return $field;
+ }
+
+ /**
+ *
+ */
+ protected function printFieldRow($field, $startRow = true) {
+ if ($startRow) {
+ $this->html->ptln('<tr>');
+ $this->html->indent();
+ }
+
+ if (get_class($field) != 'refnotes_config_textarea') {
+ $settingName = $field->getSettingName();
+ if ($settingName != '') {
+ $this->html->ptln('<td class="label">');
+ $this->html->ptln($settingName);
+ }
+ else {
+ $this->html->ptln('<td class="lean-label">');
+ }
+
+ $this->html->ptln($field->getLabel());
+ $this->html->ptln('</td><td class="value">');
+ }
+ else {
+ $this->html->ptln('<td class="value" colspan="2">');
+ }
+
+ $this->html->ptln($field->getControl());
+ $this->html->ptln('</td>');
+
+ $this->html->unindent();
+ $this->html->ptln('</tr>');
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+class refnotes_config_list_section extends refnotes_config_section {
+
+ private $listRows;
+
+ /**
+ * Constructor
+ */
+ public function __construct($id, $listRows) {
+ parent::__construct($id);
+
+ $this->listRows = $listRows;
+ }
+
+ /**
+ *
+ */
+ protected function close() {
+ $this->html->unindent();
+ $this->html->ptln('</table>');
+ $this->printListControls();
+ $this->html->ptln('</fieldset>');
+ }
+
+ /**
+ *
+ */
+ private function printListControls() {
+ $this->html->ptln('<div class="list-controls">');
+ $this->html->indent();
+
+ $this->html->ptln($this->getEdit());
+ $this->html->ptln($this->getButton('add'));
+ $this->html->ptln($this->getButton('rename'));
+ $this->html->ptln($this->getButton('delete'));
+
+ $this->html->unindent();
+ $this->html->ptln('</div>');
+ }
+
+ /**
+ *
+ */
+ private function getEdit() {
+ $html = '<input type="text" class="edit"';
+ $id = 'name-' . $this->id;
+ $html .= ' id="' . $id . '"';
+ $html .= ' name="' . $id . '"';
+ $html .= ' value=""';
+ $html .= ' />';
+
+ return $html;
+ }
+
+ /**
+ *
+ */
+ private function getButton($action) {
+ $label = refnotes_localization::getInstance()->getLang('btn_' . $action);
+
+ $id = $action . '-' . $this->id;
+ $html = '<input type="button" class="button"';
+ $html .= ' id="' . $id . '"';
+ $html .= ' name="' . $id . '"';
+ $html .= ' value="' . $label . '"';
+ $html .= ' />';
+
+ return $html;
+ }
+
+ /**
+ *
+ */
+ protected function printFields() {
+ $field = $this->getFields();
+ $fields = count($field);
+
+ $this->html->ptln('<tr>');
+ $this->html->indent();
+ $this->html->ptln('<td class="list" rowspan="' . $fields . '">');
+ $this->html->ptln('<select class="list" id="select-' . $this->id . '" size="' . $this->listRows . '"></select>');
+ $this->html->ptln('</td>');
+
+ $this->printFieldRow($field[0], false);
+
+ for ($f = 1; $f < $fields; $f++) {
+ $this->printFieldRow($field[$f]);
+ }
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+class refnotes_config_general extends refnotes_config_section {
+
+ /**
+ * Constructor
+ */
+ public function __construct() {
+ parent::__construct('general');
+ }
+
+ /**
+ *
+ */
+ protected function getFieldDefinitions() {
+ static $field = array(
+ 'replace-footnotes' => array(
+ 'class' => 'checkbox',
+ 'lean' => true
+ ),
+ 'reference-db-enable' => array(
+ 'class' => 'checkbox',
+ 'lean' => true
+ ),
+ 'reference-db-namespace' => array(
+ 'class' => 'edit',
+ 'lean' => true
+ )
+ );
+
+ return $field;
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+class refnotes_config_namespaces extends refnotes_config_list_section {
+
+ /**
+ * Constructor
+ */
+ public function __construct() {
+ parent::__construct('namespaces', 48);
+ }
+
+ /**
+ *
+ */
+ protected function getFieldDefinitions() {
+ static $field = array(
+ 'refnote-id' => array(
+ 'class' => 'select',
+ 'option' => array('numeric', 'latin-lower', 'latin-upper', 'roman-lower', 'roman-upper', 'stars', 'note-name', 'inherit')
+ ),
+ 'reference-base' => array(
+ 'class' => 'select',
+ 'option' => array('super', 'normal-text', 'inherit')
+ ),
+ 'reference-font-weight' => array(
+ 'class' => 'select',
+ 'option' => array('normal', 'bold', 'inherit')
+ ),
+ 'reference-font-style' => array(
+ 'class' => 'select',
+ 'option' => array('normal', 'italic', 'inherit')
+ ),
+ 'reference-format' => array(
+ 'class' => 'select',
+ 'option' => array('right-parent', 'parents', 'right-bracket', 'brackets', 'none', 'inherit')
+ ),
+ 'reference-group' => array(
+ 'class' => 'select',
+ 'option' => array('group-none', 'group-comma', 'group-semicolon', 'inherit')
+ ),
+ 'reference-render' => array(
+ 'class' => 'select',
+ 'option' => array('basic', 'harvard', 'inherit')
+ ),
+ 'multi-ref-id' => array(
+ 'class' => 'select',
+ 'option' => array('ref-counter', 'note-counter', 'inherit')
+ ),
+ 'note-preview' => array(
+ 'class' => 'select',
+ 'option' => array('popup', 'tooltip', 'none', 'inherit')
+ ),
+ 'notes-separator' => array(
+ 'class' => 'edit_inherit'
+ ),
+ 'note-text-align' => array(
+ 'class' => 'select',
+ 'option' => array('justify', 'left', 'inherit')
+ ),
+ 'note-font-size' => array(
+ 'class' => 'select',
+ 'option' => array('normal', 'small', 'inherit')
+ ),
+ 'note-render' => array(
+ 'class' => 'select',
+ 'option' => array('basic', 'harvard', 'inherit')
+ ),
+ 'note-id-base' => array(
+ 'class' => 'select',
+ 'option' => array('super', 'normal-text', 'inherit')
+ ),
+ 'note-id-font-weight' => array(
+ 'class' => 'select',
+ 'option' => array('normal', 'bold', 'inherit')
+ ),
+ 'note-id-font-style' => array(
+ 'class' => 'select',
+ 'option' => array('normal', 'italic', 'inherit')
+ ),
+ 'note-id-format' => array(
+ 'class' => 'select',
+ 'option' => array('right-parent', 'parents', 'right-bracket', 'brackets', 'dot', 'none', 'inherit')
+ ),
+ 'back-ref-caret' => array(
+ 'class' => 'select',
+ 'option' => array('prefix', 'merge', 'none', 'inherit')
+ ),
+ 'back-ref-base' => array(
+ 'class' => 'select',
+ 'option' => array('super', 'normal-text', 'inherit')
+ ),
+ 'back-ref-font-weight' => array(
+ 'class' => 'select',
+ 'option' => array('normal', 'bold', 'inherit')
+ ),
+ 'back-ref-font-style' => array(
+ 'class' => 'select',
+ 'option' => array('normal', 'italic', 'inherit')
+ ),
+ 'back-ref-format' => array(
+ 'class' => 'select',
+ 'option' => array('note-id', 'latin', 'numeric', 'caret', 'arrow', 'none', 'inherit')
+ ),
+ 'back-ref-separator' => array(
+ 'class' => 'select',
+ 'option' => array('comma', 'none', 'inherit')
+ ),
+ 'scoping' => array(
+ 'class' => 'select',
+ 'option' => array('reset', 'single')
+ )
+ );
+
+ return $field;
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+class refnotes_config_notes extends refnotes_config_list_section {
+
+ /**
+ * Constructor
+ */
+ public function __construct() {
+ parent::__construct('notes', 14);
+ }
+
+ /**
+ *
+ */
+ protected function getFieldDefinitions() {
+ static $field = array(
+ 'note-text' => array(
+ 'class' => 'textarea',
+ 'rows' => '4',
+ 'lean' => true
+ ),
+ 'inline' => array(
+ 'class' => 'checkbox',
+ 'lean' => true
+ ),
+ 'use-reference-base' => array(
+ 'class' => 'checkbox',
+ 'lean' => true
+ ),
+ 'use-reference-font-weight' => array(
+ 'class' => 'checkbox',
+ 'lean' => true
+ ),
+ 'use-reference-font-style' => array(
+ 'class' => 'checkbox',
+ 'lean' => true
+ ),
+ 'use-reference-format' => array(
+ 'class' => 'checkbox',
+ 'lean' => true
+ )
+ );
+
+ return $field;
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+class refnotes_config_field {
+
+ protected $id;
+ protected $settingName;
+ protected $label;
+
+ /**
+ * Constructor
+ */
+ public function __construct($id, $data) {
+ $this->id = 'field-' . $id;
+ $this->label = 'lbl_' . $id;
+
+ if (array_key_exists('lean', $data) && $data['lean']) {
+ $this->settingName = '';
+ }
+ else {
+ $this->settingName = $id;
+ }
+ }
+
+ /**
+ *
+ */
+ public function getSettingName() {
+ $html = '';
+
+ if ($this->settingName != '') {
+ $html = '<span class="outkey">' . $this->settingName . '</span>';
+ }
+
+ return $html;
+ }
+
+ /**
+ *
+ */
+ public function getLabel() {
+ $label = refnotes_localization::getInstance()->getLang($this->label);
+
+ return '<label for="' . $this->id . '">' . $label . '</label>';
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+class refnotes_config_checkbox extends refnotes_config_field {
+
+ /**
+ * Constructor
+ */
+ public function __construct($id, $data) {
+ parent::__construct($id, $data);
+ }
+
+ /**
+ *
+ */
+ public function getControl() {
+ $html = '<div class="input">';
+ $html .= '<input type="checkbox" class="checkbox"';
+ $html .= ' id="' . $this->id . '"';
+ $html .= ' name="' . $this->id . '" value="1"';
+ $html .= '/></div>';
+
+ return $html;
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+class refnotes_config_select extends refnotes_config_field {
+
+ private $option;
+
+ /**
+ * Constructor
+ */
+ public function __construct($id, $data) {
+ parent::__construct($id, $data);
+
+ $this->option = $data['option'];
+ }
+
+ /**
+ *
+ */
+ public function getControl() {
+ $locale = refnotes_localization::getInstance();
+
+ $html = '<div class="input">';
+
+ $html .= '<select class="edit"';
+ $html .= ' id="' . $this->id . '"';
+ $html .= ' name="' . $this->id . '">' . DOKU_LF;
+
+ foreach ($this->option as $option) {
+ $html .= '<option value="' . $option . '">' . $locale->getLang('opt_' . $option) . '</option>' . DOKU_LF;
+ }
+
+ $html .= '</select>';
+ $html .= '</div>';
+
+ return $html;
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+class refnotes_config_edit extends refnotes_config_field {
+
+ /**
+ * Constructor
+ */
+ public function __construct($id, $data) {
+ parent::__construct($id, $data);
+ }
+
+ /**
+ *
+ */
+ public function getControl() {
+ $html = '<div class="input">';
+
+ $html .= '<input type="text" class="edit"';
+ $html .= ' id="' . $this->id . '"';
+ $html .= ' name="' . $this->id . '" />' . DOKU_LF;
+
+ $html .= '</div>';
+
+ return $html;
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+class refnotes_config_edit_inherit extends refnotes_config_field {
+
+ /**
+ * Constructor
+ */
+ public function __construct($id, $data) {
+ parent::__construct($id, $data);
+ }
+
+ /**
+ *
+ */
+ public function getControl() {
+ $buttonLabel = refnotes_localization::getInstance()->getLang('opt_inherit');
+
+ $html = '<div class="input">';
+
+ $html .= '<input type="text" class="edit"';
+ $html .= ' id="' . $this->id . '"';
+ $html .= ' name="' . $this->id . '" />' . DOKU_LF;
+
+ $html .= '<input type="button" class="button"';
+ $html .= ' id="' . $this->id . '-inherit"';
+ $html .= ' name="' . $this->id . '-inherit"';
+ $html .= ' value="' . $buttonLabel . '"';
+ $html .= ' />';
+
+ $html .= '</div>';
+
+ return $html;
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+class refnotes_config_textarea extends refnotes_config_field {
+
+ private $rows;
+
+ /**
+ * Constructor
+ */
+ public function __construct($id, $data) {
+ parent::__construct($id, $data);
+
+ $this->rows = $data['rows'];
+ }
+
+ /**
+ *
+ */
+ public function getControl() {
+ $html = '<div class="input">';
+ $html .= '<textarea class="edit"';
+ $html .= ' id="' . $this->id . '"';
+ $html .= ' name="' . $this->id . '"';
+ $html .= ' cols="40" rows="' . $this->rows . '">';
+ $html .= '</textarea></div>';
+
+ return $html;
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+class refnotes_html_sink {
+
+ private $indentIncrement;
+ private $indent;
+
+ /**
+ * Constructor
+ */
+ public function __construct() {
+ $this->indentIncrement = 2;
+ $this->indent = 0;
+ }
+
+ /**
+ *
+ */
+ public function indent() {
+ $this->indent += $this->indentIncrement;
+ }
+
+ /**
+ *
+ */
+ public function unindent() {
+ if ($this->indent >= $this->indentIncrement) {
+ $this->indent -= $this->indentIncrement;
+ }
+ }
+
+ /**
+ *
+ */
+ public function ptln($string, $indentDelta = 0) {
+ if ($indentDelta < 0) {
+ $this->indent += $this->indentIncrement * $indentDelta;
+ }
+
+ $text = explode(DOKU_LF, $string);
+ foreach ($text as $string) {
+ ptln($string, $this->indent);
+ }
+
+ if ($indentDelta > 0) {
+ $this->indent += $this->indentIncrement * $indentDelta;
+ }
+ }
+}
diff --git a/platform/www/lib/plugins/refnotes/admin.svg b/platform/www/lib/plugins/refnotes/admin.svg
new file mode 100644
index 0000000..02553fa
--- /dev/null
+++ b/platform/www/lib/plugins/refnotes/admin.svg
@@ -0,0 +1 @@
+<svg viewBox="0 0 24 24" width="24" height="24"><path d="M7.51 21.488H2.526V2.465H7.51v1.432H4.204v16.157H7.51zM12.221 21.589q-4.66-4.371-4.66-9.663 0-1.238.242-2.467.253-1.238.799-2.476.556-1.239 1.455-2.477.91-1.239 2.204-2.457l1.021 1.055q-3.922 3.92-3.922 8.69 0 2.376.99 4.566.991 2.19 2.933 4.135zM14.685 7.108l1.092-1.135 6.795 5.742-6.795 5.742-1.092-1.126 5.51-4.596z"/></svg>
diff --git a/platform/www/lib/plugins/refnotes/bibtex.php b/platform/www/lib/plugins/refnotes/bibtex.php
new file mode 100644
index 0000000..04b335f
--- /dev/null
+++ b/platform/www/lib/plugins/refnotes/bibtex.php
@@ -0,0 +1,669 @@
+<?php
+
+/**
+ * Plugin RefNotes: BibTeX parser
+ *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author Mykola Ostrovskyy <dwpforge@gmail.com>
+ */
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+class refnotes_bibtex_parser extends \dokuwiki\Parsing\Parser {
+
+ private static $instance = NULL;
+
+ /**
+ *
+ */
+ public static function getInstance() {
+ if (self::$instance == NULL) {
+ self::$instance = new refnotes_bibtex_parser();
+ }
+
+ return self::$instance;
+ }
+
+ /**
+ * Constructor
+ */
+ public function __construct() {
+ $this->handler = new refnotes_bibtex_handler();
+ $this->lexer = new refnotes_bibtex_lexer($this->handler, 'base', true);
+
+ $this->addBibtexMode(new refnotes_bibtex_outside_mode());
+ $this->addBibtexMode(new refnotes_bibtex_entry_mode('parented'));
+ $this->addBibtexMode(new refnotes_bibtex_entry_mode('braced'));
+ $this->addBibtexMode(new refnotes_bibtex_field_mode());
+ $this->addBibtexMode(new refnotes_bibtex_integer_value_mode());
+ $this->addBibtexMode(new refnotes_bibtex_string_value_mode('quoted'));
+ $this->addBibtexMode(new refnotes_bibtex_string_value_mode('braced'));
+ $this->addBibtexMode(new refnotes_bibtex_nested_braces_mode('quoted'));
+ $this->addBibtexMode(new refnotes_bibtex_nested_braces_mode('braced'));
+ $this->addBibtexMode(new refnotes_bibtex_concatenation_mode());
+ }
+
+ /**
+ *
+ */
+ private function addBibtexMode($mode) {
+ $this->addMode($mode->getName(), $mode);
+ }
+
+ /**
+ *
+ */
+ public function connectModes() {
+ if (!$this->connected) {
+ $this->modes['outside']->connectTo('base');
+ $this->modes['entry_parented']->connectTo('base');
+ $this->modes['entry_braced']->connectTo('base');
+
+ parent::connectModes();
+ }
+ }
+
+ /**
+ *
+ */
+ public function parse($text) {
+ $this->connectModes();
+
+ $this->handler->reset();
+ $this->lexer->parse(str_replace("\r\n", "\n", $text));
+
+ return $this->handler->finalize();
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+class refnotes_bibtex_lexer extends \dokuwiki\Parsing\Lexer\Lexer {
+
+ /**
+ *
+ */
+ public function parse($text) {
+ $lastMode = '';
+
+ while (is_array($parsed = $this->reduce($text))) {
+ list($unmatched, $matched, $mode) = $parsed;
+
+ if (!$this->dispatchTokens($unmatched, $matched, $mode, 0, 0)) {
+ return false;
+ }
+
+ if (empty($unmatched) && empty($matched) && ($lastMode == $this->modeStack->getCurrent())) {
+ return false;
+ }
+
+ $lastMode = $this->modeStack->getCurrent();
+ }
+
+ if (!$parsed) {
+ return false;
+ }
+
+ return $this->invokeHandler($text, DOKU_LEXER_UNMATCHED, 0);
+ }
+
+ /**
+ *
+ */
+ protected function invokeHandler($text, $state, $pos) {
+ if ($text == "" && $state == DOKU_LEXER_UNMATCHED) {
+ return true;
+ }
+
+ $mode = $this->modeStack->getCurrent();
+ $handler = isset($this->mode_handlers[$mode]) ? $this->mode_handlers[$mode] : $mode;
+
+ return $this->handler->$handler($text, $state, $pos);
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+class refnotes_bibtex_mode extends \dokuwiki\Parsing\ParserMode\AbstractMode {
+
+ protected $name;
+ protected $handler;
+ protected $specialPattern;
+ protected $entryPattern;
+ protected $exitPattern;
+
+ /**
+ * Constructor
+ */
+ public function __construct() {
+ $this->name = preg_replace('/refnotes_bibtex_(\w+)_mode/', '$1', get_class($this));
+ $this->handler = '';
+
+ $this->specialPattern = array();
+ $this->entryPattern = array();
+ $this->exitPattern = array();
+ }
+
+ /**
+ *
+ */
+ public function getSort() {
+ return 0;
+ }
+
+ /**
+ *
+ */
+ public function getName() {
+ return $this->name;
+ }
+
+ /**
+ *
+ */
+ public function connectTo($mode) {
+ foreach ($this->specialPattern as $pattern) {
+ $this->Lexer->addSpecialPattern($pattern, $mode, $this->name);
+ }
+
+ foreach ($this->entryPattern as $pattern) {
+ $this->Lexer->addEntryPattern($pattern, $mode, $this->name);
+ }
+
+ if ($this->handler != '') {
+ $this->Lexer->mapHandler($this->name, $this->handler);
+ }
+ }
+
+ /**
+ *
+ */
+ public function postConnect() {
+ foreach ($this->exitPattern as $pattern) {
+ $this->Lexer->addExitPattern($pattern, $this->name);
+ }
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+class refnotes_bibtex_outside_mode extends refnotes_bibtex_mode {
+
+ /**
+ * Constructor
+ */
+ public function __construct() {
+ parent::__construct();
+
+ $this->specialPattern[] = '[^@]+(?=@)';
+ }
+
+ /**
+ *
+ */
+ public function connectTo($mode) {
+ parent::connectTo($mode);
+
+ $this->Lexer->mapHandler('base', $this->name);
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+class refnotes_bibtex_entry_mode extends refnotes_bibtex_mode {
+
+ /**
+ * Constructor
+ */
+ public function __construct($type) {
+ parent::__construct();
+
+ $this->handler = $this->name;
+ $this->name .= '_' . $type;
+
+ list($open, $close) = ($type == 'parented') ? array('\(', '\)') : array('{', '}');
+
+ $this->entryPattern[] = '^@\w+\s*' . $open . '(?=.*' . $close . ')';
+ $this->exitPattern[] = '\s*(?:' . $close . '|(?=@))';
+
+ $this->allowedModes = array('field');
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+class refnotes_bibtex_field_mode extends refnotes_bibtex_mode {
+
+ /**
+ * Constructor
+ */
+ public function __construct() {
+ parent::__construct();
+
+ $this->entryPattern[] = '^\s*\w[\w-]+\s*=\s*';
+ $this->exitPattern[] = '\s*(?:,|(?=[\)}@]))';
+
+ $this->allowedModes = array('integer_value', 'string_value_quoted', 'string_value_braced', 'concatenation');
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+class refnotes_bibtex_integer_value_mode extends refnotes_bibtex_mode {
+
+ /**
+ * Constructor
+ */
+ public function __construct() {
+ parent::__construct();
+
+ $this->specialPattern[] = '^\d+';
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+class refnotes_bibtex_string_value_mode extends refnotes_bibtex_mode {
+
+ /**
+ * Constructor
+ */
+ public function __construct($type) {
+ parent::__construct();
+
+ $this->handler = $this->name;
+ $this->name .= '_' . $type;
+
+ list($open, $close, $exit) = ($type == 'quoted') ? array('"', '"', '"') : array('{', '}', '(?:}|(?=@))');
+
+ $this->entryPattern[] = '^' . $open . '(?=.*' . $close . ')';
+ $this->exitPattern[] = $exit;
+
+ $this->allowedModes = array('nested_braces_' . $type);
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+class refnotes_bibtex_nested_braces_mode extends refnotes_bibtex_mode {
+
+ /**
+ * Constructor
+ */
+ public function __construct($type) {
+ parent::__construct();
+
+ $this->handler = $this->name;
+ $this->name .= '_' . $type;
+
+ $this->entryPattern[] = '{(?=.*})';
+ $this->exitPattern[] = ($type == 'quoted') ? '}' : '(?:}|(?=@))';
+
+ $this->allowedModes = array($this->name);
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+class refnotes_bibtex_concatenation_mode extends refnotes_bibtex_mode {
+
+ /**
+ * Constructor
+ */
+ public function __construct() {
+ parent::__construct();
+
+ $this->specialPattern[] = '\s*#\s*';
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+class refnotes_bibtex_handler {
+
+ private $entries;
+ private $entry;
+ private $field;
+
+ /**
+ * Constructor
+ */
+ public function __construct() {
+ $this->reset();
+ }
+
+ /**
+ *
+ */
+ public function reset() {
+ $this->entries = new refnotes_bibtex_entry_stash();
+ $this->entry = NULL;
+ $this->field = NULL;
+ }
+
+ /**
+ *
+ */
+ public function finalize() {
+ $entries = $this->entries->getEntries();
+
+ foreach ($entries as &$entry) {
+ if (array_key_exists('author', $entry)) {
+ $authors = explode(' and ', $entry['author']);
+
+ foreach ($authors as &$author) {
+ $author = implode(' ', array_reverse(explode(', ', $author)));
+ }
+
+ $entry['author'] = implode(', ', $authors);
+ }
+ }
+
+ return $entries;
+ }
+
+ /**
+ *
+ */
+ public function outside($match, $state) {
+ /* Ignore everything outside the entries */
+ return true;
+ }
+
+ /**
+ *
+ */
+ public function entry($match, $state) {
+ switch ($state) {
+ case DOKU_LEXER_ENTER:
+ $this->entry = new refnotes_bibtex_entry(preg_replace('/@(\w+)\W+/', '$1', $match));
+ break;
+
+ case DOKU_LEXER_UNMATCHED:
+ $this->entry->handleUnmatched($match);
+ break;
+
+ case DOKU_LEXER_EXIT:
+ $this->entries->add($this->entry);
+ $this->entry = NULL;
+ break;
+ }
+
+ return true;
+ }
+
+ /**
+ *
+ */
+ public function field($match, $state) {
+ switch ($state) {
+ case DOKU_LEXER_ENTER:
+ $this->field = new refnotes_bibtex_field(preg_replace('/\W*(\w[\w-]+)\W*/', '$1', $match));
+ break;
+
+ case DOKU_LEXER_UNMATCHED:
+ $this->field->addToken('unmatched', $match);
+ break;
+
+ case DOKU_LEXER_EXIT:
+ $this->entry->addField($this->field);
+ $this->field = NULL;
+ break;
+ }
+
+ return true;
+ }
+
+ /**
+ *
+ */
+ public function integer_value($match, $state) {
+ $this->field->addToken('integer', $match);
+
+ return true;
+ }
+
+ /**
+ *
+ */
+ public function string_value($match, $state) {
+ if ($state == DOKU_LEXER_UNMATCHED) {
+ $this->field->addToken('string', $match);
+ }
+
+ return true;
+ }
+
+ /**
+ *
+ */
+ public function nested_braces($match, $state) {
+ if ($state == DOKU_LEXER_UNMATCHED) {
+ $this->field->addToken('braces', $match);
+ }
+
+ return true;
+ }
+
+ /**
+ *
+ */
+ public function concatenation($match, $state) {
+ /* Nothing special to do, concatenation will happen anyway */
+ return true;
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+class refnotes_bibtex_entry_stash {
+
+ private $entry;
+ private $strings;
+ private $namespace;
+
+ /**
+ * Constructor
+ */
+ public function __construct() {
+ $this->entry = array();
+ $this->strings = new refnotes_bibtex_strings();
+ $this->namespace = ':';
+ }
+
+ /**
+ *
+ */
+ public function getEntries() {
+ return $this->entry;
+ }
+
+ /**
+ *
+ */
+ public function add($entry) {
+ static $entryType = array(
+ 'article', 'book', 'booklet', 'conference', 'inbook', 'incollection', 'inproceedings', 'manual',
+ 'mastersthesis', 'misc', 'phdthesis', 'proceedings', 'techreport', 'unpublished');
+
+ $type = $entry->getType();
+ $name = $entry->getName();
+
+ if (in_array($type, $entryType)) {
+ if ($this->isValidRefnotesName($name)) {
+ if ($name[0] != ':') {
+ $name = $this->namespace . $name;
+ }
+
+ $this->entry[] = array_merge(array('note-name' => $name), $entry->getData($this->strings));
+ }
+ }
+ elseif ($type == 'string') {
+ $data = $entry->getData($this->strings);
+ $name = reset(array_keys($data));
+
+ if ($this->isValidStringName($name)) {
+ $this->strings->add($name, $data[$name]);
+ }
+ }
+ elseif (($type == 'comment') && (strtolower($name) == 'refnotes')) {
+ $data = $entry->getData($this->strings);
+
+ if (isset($data['namespace']) && $this->isValidRefnotesName($data['namespace'])) {
+ $this->namespace = refnotes_namespace::canonizeName($data['namespace']);
+ }
+ }
+ }
+
+ /**
+ *
+ */
+ private function isValidRefnotesName($name) {
+ return preg_match('/^' . refnotes_note::getNamePattern('full-extended') . '$/', $name) == 1;
+ }
+
+ /**
+ *
+ */
+ private function isValidStringName($name) {
+ return preg_match('/^[[:alpha:]]\w*$/', $name) == 1;
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+class refnotes_bibtex_entry {
+
+ private $type;
+ private $name;
+ private $field;
+
+ /**
+ * Constructor
+ */
+ public function __construct($type) {
+ $this->type = strtolower($type);
+ $this->name = '';
+ $this->field = array();
+ }
+
+ /**
+ *
+ */
+ public function getType() {
+ return $this->type;
+ }
+
+ /**
+ *
+ */
+ public function getName() {
+ return $this->name;
+ }
+
+ /**
+ *
+ */
+ public function getData($strings) {
+ $data = array();
+
+ foreach ($this->field as $field) {
+ $data[$field->getName()] = $field->getValue($strings);
+ }
+
+ return $data;
+ }
+
+ /**
+ *
+ */
+ public function handleUnmatched($token) {
+ if (($this->name == '') && (preg_match('/\s*([^\s,]+)\s*,/', $token, $match) == 1)) {
+ $this->name = $match[1];
+ }
+ }
+
+ /**
+ *
+ */
+ public function addField($field) {
+ $this->field[] = $field;
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+class refnotes_bibtex_field {
+
+ private $name;
+ private $token;
+
+ /**
+ * Constructor
+ */
+ public function __construct($name) {
+ $this->name = strtolower($name);
+ $this->token = array();
+ }
+
+ /**
+ *
+ */
+ public function getName() {
+ return $this->name;
+ }
+
+ /**
+ *
+ */
+ public function getValue($strings) {
+ $value = '';
+
+ foreach ($this->token as $token) {
+ $text = $token->text;
+
+ if ($token->type == 'unmatched') {
+ $text = $strings->lookup(strtolower(trim($text)));
+ }
+
+ $value .= $text;
+ }
+
+ return preg_replace('/\s+/', ' ', trim($value));
+ }
+
+ /**
+ *
+ */
+ public function addToken($type, $text) {
+ $this->token[] = new refnotes_bibtex_field_token($type, $text);
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+class refnotes_bibtex_field_token {
+
+ public $type;
+ public $text;
+
+ /**
+ * Constructor
+ */
+ public function __construct($type, $text) {
+ $this->type = $type;
+ $this->text = $text;
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+class refnotes_bibtex_strings {
+
+ private $string;
+
+ /**
+ * Constructor
+ */
+ public function __construct() {
+ $this->string = array();
+ }
+
+ /**
+ *
+ */
+ public function add($name, $value) {
+ $this->string[$name] = $value;
+ }
+
+ /**
+ *
+ */
+ public function lookup($name) {
+ return array_key_exists($name, $this->string) ? $this->string[$name] : '';
+ }
+}
diff --git a/platform/www/lib/plugins/refnotes/conf/namespaces.dat b/platform/www/lib/plugins/refnotes/conf/namespaces.dat
new file mode 100644
index 0000000..3377084
--- /dev/null
+++ b/platform/www/lib/plugins/refnotes/conf/namespaces.dat
@@ -0,0 +1 @@
+a:11:{s:1:":";a:0:{}s:8:":biblio:";a:11:{s:10:"refnote-id";s:4:"name";s:14:"reference-base";s:4:"text";s:16:"reference-format";s:2:"[]";s:12:"multi-ref-id";s:4:"note";s:12:"note-preview";s:7:"tooltip";s:12:"note-id-base";s:4:"text";s:19:"note-id-font-weight";s:6:"normal";s:18:"note-id-font-style";s:6:"normal";s:14:"note-id-format";s:4:"none";s:14:"back-ref-caret";s:6:"prefix";s:15:"back-ref-format";s:1:"a";}s:6:":cite:";a:5:{s:16:"reference-format";s:2:"[]";s:12:"multi-ref-id";s:4:"note";s:12:"note-id-base";s:4:"text";s:14:"note-id-format";s:1:".";s:15:"back-ref-format";s:1:"a";}s:4:":dw:";a:24:{s:10:"refnote-id";s:1:"1";s:14:"reference-base";s:3:"sup";s:21:"reference-font-weight";s:6:"normal";s:20:"reference-font-style";s:6:"normal";s:16:"reference-format";s:1:")";s:15:"reference-group";s:4:"none";s:16:"reference-render";s:5:"basic";s:12:"multi-ref-id";s:3:"ref";s:12:"note-preview";s:5:"popup";s:15:"notes-separator";s:4:"100%";s:15:"note-text-align";s:7:"justify";s:14:"note-font-size";s:6:"normal";s:11:"note-render";s:5:"basic";s:12:"note-id-base";s:3:"sup";s:19:"note-id-font-weight";s:6:"normal";s:18:"note-id-font-style";s:6:"normal";s:14:"note-id-format";s:1:")";s:14:"back-ref-caret";s:4:"none";s:13:"back-ref-base";s:3:"sup";s:20:"back-ref-font-weight";s:4:"bold";s:19:"back-ref-font-style";s:6:"normal";s:15:"back-ref-format";s:4:"note";s:18:"back-ref-separator";s:1:",";s:7:"scoping";s:5:"reset";}s:4:":fn:";a:0:{}s:9:":harvard:";a:11:{s:14:"reference-base";s:4:"text";s:16:"reference-format";s:2:"()";s:16:"reference-render";s:7:"harvard";s:12:"multi-ref-id";s:4:"note";s:15:"notes-separator";s:4:"none";s:11:"note-render";s:7:"harvard";s:12:"note-id-base";s:4:"text";s:14:"note-id-format";s:1:".";s:14:"back-ref-caret";s:5:"merge";s:15:"back-ref-format";s:1:"a";s:18:"back-ref-separator";s:4:"none";}s:4:":mw:";a:24:{s:10:"refnote-id";s:1:"1";s:14:"reference-base";s:3:"sup";s:21:"reference-font-weight";s:6:"normal";s:20:"reference-font-style";s:6:"normal";s:16:"reference-format";s:2:"[]";s:15:"reference-group";s:4:"none";s:16:"reference-render";s:5:"basic";s:12:"multi-ref-id";s:4:"note";s:12:"note-preview";s:4:"none";s:15:"notes-separator";s:4:"none";s:15:"note-text-align";s:4:"left";s:14:"note-font-size";s:6:"normal";s:11:"note-render";s:5:"basic";s:12:"note-id-base";s:4:"text";s:19:"note-id-font-weight";s:6:"normal";s:18:"note-id-font-style";s:6:"normal";s:14:"note-id-format";s:1:".";s:14:"back-ref-caret";s:5:"merge";s:13:"back-ref-base";s:3:"sup";s:20:"back-ref-font-weight";s:4:"bold";s:19:"back-ref-font-style";s:6:"italic";s:15:"back-ref-format";s:1:"a";s:18:"back-ref-separator";s:4:"none";s:7:"scoping";s:5:"reset";}s:7:":stars:";a:5:{s:10:"refnote-id";s:1:"*";s:16:"reference-format";s:4:"none";s:12:"multi-ref-id";s:4:"note";s:12:"note-preview";s:7:"tooltip";s:15:"back-ref-format";s:1:"a";}s:7:":table:";a:4:{s:12:"multi-ref-id";s:4:"note";s:12:"note-preview";s:7:"tooltip";s:15:"notes-separator";s:4:"none";s:15:"back-ref-format";s:4:"none";}s:13:":table:alpha:";a:1:{s:10:"refnote-id";s:1:"a";}s:13:":table:stars:";a:2:{s:10:"refnote-id";s:1:"*";s:16:"reference-format";s:4:"none";}} \ No newline at end of file
diff --git a/platform/www/lib/plugins/refnotes/conf/notes.dat b/platform/www/lib/plugins/refnotes/conf/notes.dat
new file mode 100644
index 0000000..c24e182
--- /dev/null
+++ b/platform/www/lib/plugins/refnotes/conf/notes.dat
@@ -0,0 +1 @@
+a:4:{s:6:":fixme";a:2:{s:4:"text";s:29:"This part has to be reworked.";s:6:"inline";b:0;}s:5:":todo";a:6:{s:4:"text";s:51:"%%[%%//[[:missing_citation|citation needed]]//%%]%%";s:6:"inline";b:1;s:18:"use-reference-base";b:1;s:25:"use-reference-font-weight";b:1;s:24:"use-reference-font-style";b:0;s:20:"use-reference-format";b:0;}s:10:":cite:todo";a:6:{s:4:"text";s:37:"[[:missing_citation|citation needed]]";s:6:"inline";b:1;s:18:"use-reference-base";b:1;s:25:"use-reference-font-weight";b:1;s:24:"use-reference-font-style";b:1;s:20:"use-reference-format";b:1;}s:9:":ref:todo";a:6:{s:4:"text";s:53:"%%[%%//[[:missing_reference|reference needed]]//%%]%%";s:6:"inline";b:1;s:18:"use-reference-base";b:1;s:25:"use-reference-font-weight";b:0;s:24:"use-reference-font-style";b:0;s:20:"use-reference-format";b:0;}} \ No newline at end of file
diff --git a/platform/www/lib/plugins/refnotes/config.php b/platform/www/lib/plugins/refnotes/config.php
new file mode 100644
index 0000000..80b0925
--- /dev/null
+++ b/platform/www/lib/plugins/refnotes/config.php
@@ -0,0 +1,77 @@
+<?php
+
+/**
+ * Plugin RefNotes: Configuration
+ *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author Mykola Ostrovskyy <dwpforge@gmail.com>
+ */
+
+class refnotes_configuration {
+
+ private static $section = array();
+ private static $setting = array(
+ 'replace-footnotes' => array('general', false),
+ 'reference-db-enable' => array('general', false),
+ 'reference-db-namespace' => array('general', ':refnotes:')
+ );
+
+ /**
+ *
+ */
+ public static function getSetting($name) {
+ $result = null;
+
+ if (array_key_exists($name, self::$setting)) {
+ $sectionName = self::$setting[$name][0];
+ $result = self::$setting[$name][1];
+
+ if (!array_key_exists($sectionName, self::$section)) {
+ self::$section[$sectionName] = self::load($sectionName);
+ }
+
+ if (array_key_exists($name, self::$section[$sectionName])) {
+ $result = self::$section[$sectionName][$name];
+ }
+ }
+
+ return $result;
+ }
+
+ /**
+ *
+ */
+ public static function load($sectionName) {
+ $fileName = DOKU_CONF . 'refnotes.' . $sectionName . '.local.dat';
+
+ if (!file_exists($fileName)) {
+ // TODO: This backward compatibility fix should be eventually removed
+ $pluginRoot = DOKU_PLUGIN . 'refnotes/';
+ $fileName = $pluginRoot . $sectionName . '.local.dat';
+ if (!file_exists($fileName)) {
+ $fileName = $pluginRoot . 'conf/' . $sectionName . '.dat';
+ if (!file_exists($fileName)) {
+ $fileName = '';
+ }
+ }
+ }
+
+ if ($fileName != '') {
+ $result = unserialize(io_readFile($fileName, false));
+ }
+ else {
+ $result = array();
+ }
+
+ return $result;
+ }
+
+ /**
+ *
+ */
+ public static function save($sectionName, $config) {
+ $fileName = DOKU_CONF . 'refnotes.' . $sectionName . '.local.dat';
+
+ return io_saveFile($fileName, serialize($config));
+ }
+}
diff --git a/platform/www/lib/plugins/refnotes/core.php b/platform/www/lib/plugins/refnotes/core.php
new file mode 100644
index 0000000..a3ce28d
--- /dev/null
+++ b/platform/www/lib/plugins/refnotes/core.php
@@ -0,0 +1,483 @@
+<?php
+
+/**
+ * Plugin RefNotes: Core functionality
+ *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author Mykola Ostrovskyy <dwpforge@gmail.com>
+ */
+
+require_once(DOKU_PLUGIN . 'refnotes/locale.php');
+require_once(DOKU_PLUGIN . 'refnotes/config.php');
+require_once(DOKU_PLUGIN . 'refnotes/refnote.php');
+require_once(DOKU_PLUGIN . 'refnotes/reference.php');
+require_once(DOKU_PLUGIN . 'refnotes/note.php');
+require_once(DOKU_PLUGIN . 'refnotes/namespace.php');
+require_once(DOKU_PLUGIN . 'refnotes/scope.php');
+require_once(DOKU_PLUGIN . 'refnotes/rendering.php');
+require_once(DOKU_PLUGIN . 'refnotes/database.php');
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+class refnotes_parser_core {
+
+ private static $instance = NULL;
+
+ private $context;
+ private $lexer;
+ private $handler;
+
+ /**
+ *
+ */
+ public static function getInstance() {
+ if (self::$instance == NULL) {
+ self::$instance = new refnotes_parser_core();
+ }
+
+ return self::$instance;
+ }
+
+ /**
+ * Constructor
+ */
+ public function __construct() {
+ /* Default context. Should never be used, but just in case... */
+ $this->context = array(new refnotes_parsing_context());
+ $this->lexer = NULL;
+ $this->handler = NULL;
+ }
+
+ /**
+ *
+ */
+ public function registerLexer($lexer) {
+ $this->lexer = $lexer;
+ }
+
+ /**
+ *
+ */
+ public function enterParsingContext() {
+ $this->context[] = new refnotes_parsing_context();
+ }
+
+ /**
+ *
+ */
+ public function exitParsingContext($handler) {
+ $this->handler = $handler;
+
+ unset($this->context[count($this->context) - 1]);
+ }
+
+ /**
+ *
+ */
+ public function getInstructions($text) {
+ $this->callWriter = new refnotes_nested_call_writer($this->handler->getCallWriter(), $this->handler);
+
+ $this->callWriter->connect();
+ $this->lexer->parse($text);
+ $this->callWriter->disconnect();
+
+ return $this->callWriter->calls;
+ }
+
+ /**
+ *
+ */
+ private function getCurrentContext() {
+ return end($this->context);
+ }
+
+ /**
+ *
+ */
+ public function canHandle($state) {
+ return $this->getCurrentContext()->canHandle($state);
+ }
+
+ /**
+ *
+ */
+ public function enterReference($name, $data) {
+ $this->getCurrentContext()->enterReference($name, $data);
+ }
+
+ /**
+ *
+ */
+ public function exitReference() {
+ return $this->getCurrentContext()->exitReference();
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+class refnotes_parsing_context {
+
+ private $handling;
+ private $reference;
+
+ /**
+ * Constructor
+ */
+ public function __construct() {
+ $this->reset();
+ }
+
+ /**
+ *
+ */
+ private function reset() {
+ $this->handling = false;
+ $this->reference = NULL;
+ }
+
+ /**
+ *
+ */
+ public function canHandle($state) {
+ switch ($state) {
+ case DOKU_LEXER_ENTER:
+ $result = !$this->handling;
+ break;
+
+ case DOKU_LEXER_EXIT:
+ $result = $this->handling;
+ break;
+
+ default:
+ $result = false;
+ break;
+ }
+
+ return $result;
+ }
+
+ /**
+ *
+ */
+ public function enterReference($name, $data) {
+ $this->handling = true;
+ $this->reference = new refnotes_parser_reference($name, $data);
+ }
+
+ /**
+ *
+ */
+ public function exitReference() {
+ $reference = $this->reference;
+
+ $this->reset();
+
+ return $reference;
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+abstract class refnotes_core {
+
+ protected $presetStyle;
+ protected $namespace;
+ protected $mapping;
+
+ /**
+ * Constructor
+ */
+ public function __construct() {
+ $this->presetStyle = refnotes_configuration::load('namespaces');
+ $this->namespace = array();
+ $this->mapping = array();
+ }
+
+ /**
+ *
+ */
+ public function getNamespaceCount() {
+ return count($this->namespace);
+ }
+
+ /**
+ * Returns a namespace given it's name. The namespace is created if it doesn't exist yet.
+ */
+ public function getNamespace($name) {
+ $result = $this->findNamespace($name);
+
+ if ($result == NULL) {
+ $result = $this->createNamespace($name);
+ }
+
+ return $result;
+ }
+
+ /**
+ * Finds a namespace given it's name
+ */
+ protected function findNamespace($name) {
+ $result = NULL;
+
+ if (array_key_exists($name, $this->namespace)) {
+ $result = $this->namespace[$name];
+ }
+
+ return $result;
+ }
+
+ /**
+ * Finds a namespace or it's parent
+ */
+ public function findParentNamespace($name) {
+ while (($name != '') && !array_key_exists($name, $this->namespace)) {
+ $name = refnotes_namespace::getParentName($name);
+ }
+
+ return ($name != '') ? $this->namespace[$name] : NULL;
+ }
+
+ /**
+ *
+ */
+ public function styleNamespace($namespaceName, $style) {
+ $namespace = $this->getNamespace($namespaceName);
+
+ if (array_key_exists('inherit', $style)) {
+ $source = $this->getNamespace($style['inherit']);
+ $namespace->inheritStyle($source);
+ }
+
+ $namespace->setStyle($style);
+ }
+
+ /**
+ *
+ */
+ public function setNamespaceMapping($namespaceName, $map) {
+ foreach ($map as $ns) {
+ $this->mapping[$ns] = $namespaceName;
+ }
+ }
+
+ /**
+ *
+ */
+ protected function clearNamespaceMapping($namespaceName) {
+ $this->mapping = array_diff($this->mapping, array($namespaceName));
+ }
+
+ /**
+ *
+ */
+ protected function createNamespace($name) {
+ if ($name != ':') {
+ $parentName = refnotes_namespace::getParentName($name);
+ $parent = $this->getNamespace($parentName);
+ $this->namespace[$name] = new refnotes_namespace($name, $parent);
+ }
+ else {
+ $this->namespace[$name] = new refnotes_namespace($name);
+ }
+
+ if (array_key_exists($name, $this->presetStyle)) {
+ $this->namespace[$name]->setStyle($this->presetStyle[$name]);
+ }
+
+ return $this->namespace[$name];
+ }
+
+ /**
+ *
+ */
+ protected function getNote($namespaceName, $noteName) {
+ $scope = $this->getNamespace($namespaceName)->getActiveScope();
+ $note = $scope->findNote($namespaceName, $noteName);
+
+ if (($note == NULL) && array_key_exists($namespaceName, $this->mapping)) {
+ $scope = $this->getNamespace($this->mapping[$namespaceName])->getActiveScope();
+ $note = $scope->findNote($namespaceName, $noteName);
+ }
+
+ if ($note == NULL) {
+ if (!is_int($noteName)) {
+ $note = $this->createNote($scope, $namespaceName, $noteName);
+
+ $scope->addNote($note);
+ }
+ else {
+ $note = new refnotes_note_mock();
+ }
+ }
+
+ return $note;
+ }
+
+ /**
+ *
+ */
+ abstract protected function createNote($scope, $namespaceName, $noteName);
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+class refnotes_renderer_core extends refnotes_core {
+
+ private static $instance = NULL;
+
+ /**
+ * Renderer core is used by both references and notes syntax plugins during the rendering
+ * stage. The instance has to be shared between the plugins, and since there should be no
+ * more than one rendering pass during a DW page request, a single instance of the syntax
+ * core should be enough.
+ */
+ public static function getInstance() {
+ if (self::$instance == NULL) {
+ self::$instance = new refnotes_renderer_core();
+ }
+
+ return self::$instance;
+ }
+
+ /**
+ *
+ */
+ public function addReference($attributes, $data) {
+ $note = $this->getNote($attributes['ns'], $attributes['name']);
+ $reference = new refnotes_renderer_reference($note, $attributes, $data);
+
+ $note->addReference($reference);
+
+ return $reference;
+ }
+
+ /**
+ *
+ */
+ public function renderNotes($mode, $namespaceName, $limit) {
+ $this->clearNamespaceMapping($namespaceName);
+
+ $html = '';
+
+ if ($namespaceName == '*') {
+ foreach ($this->namespace as $namespace) {
+ $html .= $namespace->renderNotes($mode);
+ }
+ }
+ else {
+ $namespace = $this->findNamespace($namespaceName);
+ if ($namespace != NULL) {
+ $html = $namespace->renderNotes($mode, $limit);
+ }
+ }
+
+ return $html;
+ }
+
+ /**
+ *
+ */
+ protected function createNote($scope, $namespaceName, $noteName) {
+ return new refnotes_renderer_note($scope, $namespaceName, $noteName);
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+class refnotes_action_core extends refnotes_core {
+
+ private $styleStash;
+ private $mappingStash;
+
+ /**
+ * Constructor
+ */
+ public function __construct() {
+ parent::__construct();
+
+ $this->styleStash = new refnotes_namespace_style_stash($this);
+ $this->mappingStash = new refnotes_namespace_mapping_stash();
+ }
+
+ /**
+ *
+ */
+ public function markScopeStart($namespaceName, $callIndex) {
+ $this->getNamespace($namespaceName)->markScopeStart($callIndex);
+ }
+
+ /**
+ *
+ */
+ public function markScopeEnd($namespaceName, $callIndex) {
+ $this->getNamespace($namespaceName)->markScopeEnd($callIndex);
+ }
+
+ /**
+ * Collect styling information from the page
+ */
+ public function addStyle($namespaceName, $style) {
+ $this->styleStash->add($this->getNamespace($namespaceName), $style);
+ }
+
+ /**
+ *
+ */
+ public function getStyles() {
+ return $this->styleStash;
+ }
+
+ /**
+ * Collect mapping information from the page
+ */
+ public function addMapping($namespaceName, $map) {
+ $this->mappingStash->add($this->getNamespace($namespaceName), $map);
+ }
+
+ /**
+ *
+ */
+ public function getMappings() {
+ return $this->mappingStash;
+ }
+
+ /**
+ *
+ */
+ public function reset() {
+ $this->namespace = array();
+ }
+
+ /**
+ *
+ */
+ public function addReference($attributes, $data, $call) {
+ $note = $this->getNote($attributes['ns'], $attributes['name']);
+ $reference = new refnotes_action_reference($note, $attributes, $data, $call);
+
+ $note->addReference($reference);
+
+ return $reference;
+ }
+
+ /**
+ *
+ */
+ public function rewriteReferences($namespaceName, $limit) {
+ $this->clearNamespaceMapping($namespaceName);
+
+ if ($namespaceName == '*') {
+ foreach ($this->namespace as $namespace) {
+ $namespace->rewriteReferences();
+ }
+ }
+ else {
+ $namespace = $this->findNamespace($namespaceName);
+ if ($namespace != NULL) {
+ $namespace->rewriteReferences($limit);
+ }
+ }
+ }
+
+ /**
+ *
+ */
+ protected function createNote($scope, $namespaceName, $noteName) {
+ return new refnotes_action_note($scope, $namespaceName, $noteName);
+ }
+}
diff --git a/platform/www/lib/plugins/refnotes/database.php b/platform/www/lib/plugins/refnotes/database.php
new file mode 100644
index 0000000..47388a2
--- /dev/null
+++ b/platform/www/lib/plugins/refnotes/database.php
@@ -0,0 +1,563 @@
+<?php
+
+/**
+ * Plugin RefNotes: Reference database
+ *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author Mykola Ostrovskyy <dwpforge@gmail.com>
+ */
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+class refnotes_reference_database {
+
+ private static $instance = NULL;
+
+ private $note;
+ private $key;
+ private $page;
+ private $namespace;
+ private $enabled;
+
+ /**
+ *
+ */
+ public static function getInstance() {
+ if (self::$instance == NULL) {
+ self::$instance = new refnotes_reference_database();
+
+ /* Loading has to be separated from construction to prevent infinite recursion */
+ self::$instance->load();
+ }
+
+ return self::$instance;
+ }
+
+ /**
+ * Constructor
+ */
+ public function __construct() {
+ $this->page = array();
+ $this->namespace = array();
+ $this->enabled = true;
+ }
+
+ /**
+ *
+ */
+ private function load() {
+ $this->loadNotesFromConfiguration();
+
+ if (refnotes_configuration::getSetting('reference-db-enable')) {
+ $this->loadKeys();
+ $this->loadPages();
+ $this->loadNamespaces();
+ }
+ }
+
+ /**
+ *
+ */
+ private function loadNotesFromConfiguration() {
+ $note = refnotes_configuration::load('notes');
+
+ foreach ($note as $name => $data) {
+ $this->note[$name] = new refnotes_reference_database_note('{configuration}', $data);
+ }
+ }
+
+ /**
+ *
+ */
+ private function loadKeys() {
+ $locale = refnotes_localization::getInstance();
+ foreach ($locale->getByPrefix('dbk') as $key => $text) {
+ $this->key[$this->normalizeKeyText($text)] = $key;
+ }
+ }
+
+ /**
+ *
+ */
+ public function getKey($text) {
+ $result = '';
+ $text = $this->normalizeKeyText($text);
+
+ if (in_array($text, $this->key)) {
+ $result = $text;
+ }
+ elseif (array_key_exists($text, $this->key)) {
+ $result = $this->key[$text];
+ }
+
+ return $result;
+ }
+
+ /**
+ *
+ */
+ private function normalizeKeyText($text) {
+ return preg_replace('/\s+/', ' ', utf8_strtolower(trim($text)));
+ }
+
+ /**
+ *
+ */
+ private function loadPages() {
+ global $conf;
+
+ if (file_exists($conf['indexdir'] . '/page.idx')) {
+ require_once(DOKU_INC . 'inc/indexer.php');
+
+ $pageIndex = idx_getIndex('page', '');
+ $namespace = refnotes_configuration::getSetting('reference-db-namespace');
+ $namespacePattern = '/^' . trim($namespace, ':') . ':/';
+ $cache = new refnotes_reference_database_cache();
+
+ foreach ($pageIndex as $pageId) {
+ $pageId = trim($pageId);
+
+ if ((preg_match($namespacePattern, $pageId) == 1) && file_exists(wikiFN($pageId))) {
+ $this->enabled = false;
+ $this->page[$pageId] = new refnotes_reference_database_page($this, $cache, $pageId);
+ $this->enabled = true;
+ }
+ }
+
+ $cache->save();
+ }
+ }
+
+ /**
+ *
+ */
+ private function loadNamespaces() {
+ foreach ($this->page as $pageId => $page) {
+ foreach ($page->getNamespaces() as $ns) {
+ $this->namespace[$ns][] = $pageId;
+ }
+ }
+ }
+
+ /**
+ *
+ */
+ public function findNote($name) {
+ if (!$this->enabled) {
+ return NULL;
+ }
+
+ $found = array_key_exists($name, $this->note);
+
+ if (!$found) {
+ list($namespace, $temp) = refnotes_namespace::parseName($name);
+
+ if (array_key_exists($namespace, $this->namespace)) {
+ $this->loadNamespaceNotes($namespace);
+
+ $found = array_key_exists($name, $this->note);
+ }
+ }
+
+ return $found ? $this->note[$name] : NULL;
+ }
+
+ /**
+ *
+ */
+ private function loadNamespaceNotes($namespace) {
+ foreach ($this->namespace[$namespace] as $pageId) {
+ if (array_key_exists($pageId, $this->page)) {
+ $this->enabled = false;
+ $this->note = array_merge($this->note, $this->page[$pageId]->getNotes());
+ $this->enabled = true;
+
+ unset($this->page[$pageId]);
+ }
+ }
+
+ unset($this->namespace[$namespace]);
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+class refnotes_reference_database_page {
+
+ private $database;
+ private $id;
+ private $fileName;
+ private $namespace;
+ private $note;
+
+ /**
+ * Constructor
+ */
+ public function __construct($database, $cache, $id) {
+ $this->database = $database;
+ $this->id = $id;
+ $this->fileName = wikiFN($id);
+ $this->namespace = array();
+ $this->note = array();
+
+ if ($cache->isCached($this->fileName)) {
+ $this->namespace = $cache->getNamespaces($this->fileName);
+ }
+ else {
+ $this->parse();
+
+ $cache->update($this->fileName, $this->namespace);
+ }
+ }
+
+ /**
+ *
+ */
+ private function parse() {
+ $text = io_readWikiPage($this->fileName, $this->id);
+ $call = p_cached_instructions($this->fileName);
+ $calls = count($call);
+
+ for ($c = 0; $c < $calls; $c++) {
+ if ($call[$c][0] == 'table_open') {
+ $c = $this->parseTable($call, $calls, $c, $text);
+ }
+ elseif ($call[$c][0] == 'code') {
+ $this->parseCode($call[$c]);
+ }
+ elseif (($call[$c][0] == 'plugin') && ($call[$c][1][0] == 'data_entry')) {
+ $this->parseDataEntry($call[$c][1][1]);
+ }
+ }
+ }
+
+ /**
+ *
+ */
+ private function parseTable($call, $calls, $c, $text) {
+ $row = 0;
+ $column = 0;
+ $columns = 0;
+ $valid = true;
+
+ for ( ; $c < $calls; $c++) {
+ switch ($call[$c][0]) {
+ case 'tablerow_open':
+ $column = 0;
+ break;
+
+ case 'tablerow_close':
+ if ($row == 0) {
+ $columns = $column;
+ }
+ else {
+ if ($column != $columns) {
+ $valid = false;
+ break 2;
+ }
+ }
+ $row++;
+ break;
+
+ case 'tablecell_open':
+ case 'tableheader_open':
+ $cellOpen = $call[$c][2];
+ break;
+
+ case 'tablecell_close':
+ case 'tableheader_close':
+ $table[$row][$column] = trim(substr($text, $cellOpen, $call[$c][2] - $cellOpen), "^| ");
+ $column++;
+ break;
+
+ case 'table_close':
+ break 2;
+ }
+ }
+
+ if ($valid && ($row > 1) && ($columns > 1)) {
+ $this->handleTable($table, $columns, $row);
+ }
+
+ return $c;
+ }
+
+ /**
+ *
+ */
+ private function handleTable($table, $columns, $rows) {
+ $key = array();
+ for ($c = 0; $c < $columns; $c++) {
+ $key[$c] = $this->database->getKey($table[0][$c]);
+ }
+
+ if (!in_array('', $key)) {
+ $this->handleDataSheet($table, $columns, $rows, $key);
+ }
+ else {
+ if ($columns == 2) {
+ $key = array();
+ for ($r = 0; $r < $rows; $r++) {
+ $key[$r] = $this->database->getKey($table[$r][0]);
+ }
+
+ if (!in_array('', $key)) {
+ $this->handleDataCard($table, $rows, $key);
+ }
+ }
+ }
+ }
+
+ /**
+ * The data is organized in rows, one note per row. The first row contains the caption.
+ */
+ private function handleDataSheet($table, $columns, $rows, $key) {
+ for ($r = 1; $r < $rows; $r++) {
+ $data = array();
+
+ for ($c = 0; $c < $columns; $c++) {
+ $data[$key[$c]] = $table[$r][$c];
+ }
+
+ $this->handleNote($data);
+ }
+ }
+
+ /**
+ * Every note is stored in a separate table. The first column of the table contains
+ * the caption, the second one contains the data.
+ */
+ private function handleDataCard($table, $rows, $key) {
+ $data = array();
+
+ for ($r = 0; $r < $rows; $r++) {
+ $data[$key[$r]] = $table[$r][1];
+ }
+
+ $this->handleNote($data);
+ }
+
+ /**
+ *
+ */
+ private function parseCode($call) {
+ switch ($call[1][1]) {
+ case 'bibtex':
+ $this->parseBibtex($call[1][0]);
+ break;
+ }
+ }
+
+ /**
+ *
+ */
+ private function parseBibtex($text) {
+ foreach (refnotes_bibtex_parser::getInstance()->parse($text) as $data) {
+ $this->handleNote($data);
+ }
+ }
+
+ /**
+ *
+ */
+ private function parseDataEntry($pluginData) {
+ if (preg_match('/\brefnotes\b/', $pluginData['classes'])) {
+ $data = array();
+
+ foreach ($pluginData['data'] as $key => $value) {
+ if (is_array($value)) {
+ $data[$key . 's'] = implode(', ', $value);
+ }
+ else {
+ $data[$key] = $value;
+ }
+ }
+
+ $this->handleNote($data);
+ }
+ }
+
+ /**
+ *
+ */
+ private function handleNote($data) {
+ $note = new refnotes_reference_database_note($this->id, $data);
+
+ list($namespace, $name) = $note->getNameParts();
+
+ if ($name != '') {
+ if (!in_array($namespace, $this->namespace)) {
+ $this->namespace[] = $namespace;
+ }
+
+ $this->note[$namespace . $name] = $note;
+ }
+ }
+
+ /**
+ *
+ */
+ public function getNamespaces() {
+ return $this->namespace;
+ }
+
+ /**
+ *
+ */
+ public function getNotes() {
+ if (empty($this->note)) {
+ $this->parse();
+ }
+
+ return $this->note;
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+class refnotes_reference_database_note extends refnotes_refnote {
+
+ private $nameParts;
+
+ /**
+ * Constructor
+ */
+ public function __construct($source, $data) {
+ parent::__construct();
+
+ $this->nameParts = array('', '');
+
+ if ($source == '{configuration}') {
+ $this->initializeConfigNote($data);
+ }
+ else {
+ $this->initializePageNote($data);
+ }
+
+ $this->attributes['source'] = $source;
+ }
+
+ /**
+ *
+ */
+ public function initializeConfigNote($data) {
+ $this->data['note-text'] = $data['text'];
+
+ unset($data['text']);
+
+ $this->attributes = $data;
+ }
+
+ /**
+ *
+ */
+ public function initializePageNote($data) {
+ if (isset($data['note-name'])) {
+ if (preg_match('/^' . refnotes_note::getNamePattern('full-extended') . '$/', $data['note-name']) == 1) {
+ $this->nameParts = refnotes_namespace::parseName($data['note-name']);
+ }
+
+ unset($data['note-name']);
+ }
+
+ $this->data = $data;
+ }
+
+ /**
+ *
+ */
+ public function getNameParts() {
+ return $this->nameParts;
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+class refnotes_reference_database_cache {
+
+ private $fileName;
+ private $cache;
+ private $requested;
+ private $updated;
+
+ /**
+ * Constructor
+ */
+ public function __construct() {
+ global $conf;
+
+ $this->fileName = $conf['cachedir'] . '/refnotes.database.dat';
+
+ $this->load();
+ }
+
+ /**
+ *
+ */
+ private function load() {
+ $this->cache = array();
+ $this->requested = array();
+
+ if (file_exists($this->fileName)) {
+ $this->cache = unserialize(io_readFile($this->fileName, false));
+ }
+
+ foreach (array_keys($this->cache) as $fileName) {
+ $this->requested[$fileName] = false;
+ }
+
+ $this->updated = false;
+ }
+
+ /**
+ *
+ */
+ public function isCached($fileName) {
+ $result = false;
+
+ if (array_key_exists($fileName, $this->cache)) {
+ if ($this->cache[$fileName]['time'] == @filemtime($fileName)) {
+ $result = true;
+ }
+ }
+
+ $this->requested[$fileName] = true;
+
+ return $result;
+ }
+
+ /**
+ *
+ */
+ public function getNamespaces($fileName) {
+ return $this->cache[$fileName]['ns'];
+ }
+
+ /**
+ *
+ */
+ public function update($fileName, $namespace) {
+ $this->cache[$fileName] = array('ns' => $namespace, 'time' => @filemtime($fileName));
+ $this->updated = true;
+ }
+
+ /**
+ *
+ */
+ public function save() {
+ $this->removeOldPages();
+
+ if ($this->updated) {
+ io_saveFile($this->fileName, serialize($this->cache));
+ }
+ }
+
+ /**
+ *
+ */
+ private function removeOldPages() {
+ foreach ($this->requested as $fileName => $requested) {
+ if (!$requested && array_key_exists($fileName, $this->cache)) {
+ unset($this->cache[$fileName]);
+
+ $this->updated = true;
+ }
+ }
+ }
+}
diff --git a/platform/www/lib/plugins/refnotes/instructions.php b/platform/www/lib/plugins/refnotes/instructions.php
new file mode 100644
index 0000000..7711a27
--- /dev/null
+++ b/platform/www/lib/plugins/refnotes/instructions.php
@@ -0,0 +1,318 @@
+<?php
+
+/**
+ * Plugin RefNotes: Handling of instruction array
+ *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author Mykola Ostrovskyy <dwpforge@gmail.com>
+ */
+
+//////////////////////////////////////////////////////////////////////////////////////////////////
+class refnotes_instruction {
+
+ protected $data;
+
+ /**
+ * Constructor
+ */
+ public function __construct($name, $data, $offset = -1) {
+ $this->data = array($name, $data, $offset);
+ }
+
+ /**
+ *
+ */
+ public function getData() {
+ return $this->data;
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+class refnotes_nest_instruction extends refnotes_instruction {
+
+ /**
+ * Constructor
+ */
+ public function __construct($data) {
+ parent::__construct('nest', array($data));
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+class refnotes_plugin_instruction extends refnotes_instruction {
+
+ /**
+ * Constructor
+ */
+ public function __construct($name, $data, $type, $text, $offset = -1) {
+ parent::__construct('plugin', array($name, $data, $type, $text), $offset);
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+class refnotes_notes_instruction extends refnotes_plugin_instruction {
+
+ /**
+ * Constructor
+ */
+ public function __construct($type, $attributes, $data = NULL) {
+ $pluginData[0] = $type;
+ $pluginData[1] = $attributes;
+
+ if (!empty($data)) {
+ $pluginData[2] = $data;
+ }
+
+ parent::__construct('refnotes_notes', $pluginData, DOKU_LEXER_SPECIAL, '');
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+class refnotes_notes_style_instruction extends refnotes_notes_instruction {
+
+ /**
+ * Constructor
+ */
+ public function __construct($namespace, $data) {
+ parent::__construct('style', array('ns' => $namespace), $data);
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+class refnotes_notes_map_instruction extends refnotes_notes_instruction {
+
+ /**
+ * Constructor
+ */
+ public function __construct($namespace, $data) {
+ parent::__construct('map', array('ns' => $namespace), $data);
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+class refnotes_notes_render_instruction extends refnotes_notes_instruction {
+
+ /**
+ * Constructor
+ */
+ public function __construct($namespace) {
+ parent::__construct('render', array('ns' => $namespace));
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+class refnotes_instruction_reference {
+
+ private $list;
+ private $data;
+ private $index;
+ private $name;
+
+ /**
+ * Constructor
+ */
+ public function __construct($list, &$data, $index) {
+ $this->list = $list;
+ $this->data =& $data;
+ $this->index = $index;
+ $this->name = ($data[0] == 'plugin') ? 'plugin_' . $data[1][0] : $data[0];
+ }
+
+ /**
+ *
+ */
+ public function getIndex() {
+ return $this->index;
+ }
+
+ /**
+ *
+ */
+ public function getName() {
+ return $this->name;
+ }
+
+ /**
+ *
+ */
+ public function getData($index) {
+ return $this->data[1][$index];
+ }
+
+ /**
+ *
+ */
+ public function getPluginData($index) {
+ return $this->data[1][1][$index];
+ }
+
+ /**
+ *
+ */
+ public function setPluginData($index, $data) {
+ $this->data[1][1][$index] = $data;
+ }
+
+ /**
+ *
+ */
+ public function unsetPluginData($index) {
+ unset($this->data[1][1][$index]);
+ }
+
+ /**
+ *
+ */
+ public function getRefnotesAttribute($name) {
+ return array_key_exists($name, $this->data[1][1][1]) ? $this->data[1][1][1][$name] : '';
+ }
+
+ /**
+ *
+ */
+ public function setRefnotesAttribute($name, $value) {
+ $this->data[1][1][1][$name] = $value;
+ }
+
+ /**
+ *
+ */
+ public function unsetRefnotesAttribute($name) {
+ unset($this->data[1][1][1][$name]);
+ }
+
+ /**
+ *
+ */
+ public function getPrevious() {
+ return $this->list->getAt($this->index - 1);
+ }
+
+ /**
+ *
+ */
+ public function insertBefore($call) {
+ return $this->list->insert($this->index, $call);
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+class refnotes_instruction_list implements Iterator {
+
+ private $event;
+ private $index;
+ private $extraCalls;
+
+ /**
+ * Constructor
+ */
+ public function __construct($event) {
+ $this->event = $event;
+ $this->index = 0;
+ $this->extraCalls = array();
+ }
+
+ /**
+ * Implementation of Iterator interface
+ */
+ public function rewind() {
+ $this->index = 0;
+ }
+
+ /**
+ * Implementation of Iterator interface
+ */
+ public function current() {
+ return new refnotes_instruction_reference($this, $this->event->data->calls[$this->index], $this->index);
+ }
+
+ /**
+ * Implementation of Iterator interface
+ */
+ public function key() {
+ return $this->index;
+ }
+
+ /**
+ * Implementation of Iterator interface
+ */
+ public function next() {
+ ++$this->index;
+ }
+
+ /**
+ * Implementation of Iterator interface
+ */
+ public function valid() {
+ return array_key_exists($this->index, $this->event->data->calls);
+ }
+
+ /**
+ *
+ */
+ public function getAt($index) {
+ return new refnotes_instruction_reference($this, $this->event->data->calls[$index], $index);
+ }
+
+ /**
+ *
+ */
+ public function insert($index, $call) {
+ $this->extraCalls[$index][] = $call;
+ }
+
+ /**
+ *
+ */
+ public function append($call) {
+ $this->extraCalls[count($this->event->data->calls)][] = $call;
+ }
+
+ /**
+ *
+ */
+ public function applyChanges() {
+ if (empty($this->extraCalls)) {
+ return;
+ }
+
+ ksort($this->extraCalls);
+
+ $calls = array();
+ $prevIndex = 0;
+
+ foreach ($this->extraCalls as $index => $extraCalls) {
+ if ($prevIndex < $index) {
+ $slice = array_slice($this->event->data->calls, $prevIndex, $index - $prevIndex);
+ $calls = array_merge($calls, $slice);
+ }
+
+ foreach ($extraCalls as $call) {
+ $calls[] = $call->getData();
+ }
+
+ $prevIndex = $index;
+ }
+
+ $callCount = count($this->event->data->calls);
+
+ if ($prevIndex < $callCount) {
+ $slice = array_slice($this->event->data->calls, $prevIndex, $callCount - $prevIndex);
+ $calls = array_merge($calls, $slice);
+ }
+
+ $offset = $this->event->data->calls[$callCount - 1][2];
+
+ for ($i = count($calls) - 1; $i >= 0; --$i) {
+ if ($calls[$i][2] == -1) {
+ $calls[$i][2] = $offset;
+ }
+ else {
+ $offset = $calls[$i][2];
+ }
+ }
+
+ $this->event->data->calls = $calls;
+ $this->extraCalls = array();
+ }
+}
diff --git a/platform/www/lib/plugins/refnotes/lang/en/__template.txt b/platform/www/lib/plugins/refnotes/lang/en/__template.txt
new file mode 100644
index 0000000..2022a92
--- /dev/null
+++ b/platform/www/lib/plugins/refnotes/lang/en/__template.txt
@@ -0,0 +1,82 @@
+====== References ======
+
+On this page you can define commonly used notes for [[doku>plugin:refnotes|RefNotes plugin]]. Every note is defined as collection of data //fields//. There are number of ways to organize the note definitions:
+
+ * Group a number of notes into single data table (//sheet//). The first row of the table is used to specify which field the corresponding column contains.
+ * Use separate table for each note (//card//). The table should have two columns where the first column is used to specify the field names.
+ * Define notes using [[wp>BibTeX]] syntax. BibTeX entries have to be wrapped into a ''<code>'' section. The key of BibTeX entry serves as name of the note. The namespace can be either specified as part of the key or in a separate comment (see example below) for all entries that follow.
+ * Store one note per page as [[doku>plugin:data|Data plugin]] entry. This way the notes are stored in a database, which allows to make queries against the bibliography data, for example, see all books of a certain author. Unfortunately Data plugin allows only one ''dataentry'' section per page.
+
+For sheets and cards plugin does not make a distinction between normal table cells and header cells. The field name cells are identified only based on their content. The names are case insensitive and can also be specified using locale-specific labels. BibTeX and ''dataentry'' sections support only field names. The full list of field names is provided in [[doku>plugin:refnotes:refdb|reference database documentation]].
+
+
+===== Note sheet example =====
+
+^ Note name ^ Note text ^
+^ :ref:sample1 | A sample reference. |
+^ :ref:sample2 | A sample reference with //some// **formatting**. |
+^ :ref:sample3 | A sample reference with a [[http://www.dokuwiki.org/|link.]] |
+
+
+===== Note card example =====
+
+^ Note name ^ :ref:knuth-aop-2 ^
+^ Author | Donald Knuth |
+^ Title | The Art of Computer Programming, Volume 2: Seminumerical Algorithms |
+^ Edition | Third Edition |
+^ Published | 1997 |
+^ Publisher | Addison-Wesley |
+^ Pages | xiv + 762 pp. |
+^ ISBN | 0-201-89684-2 |
+^ URL | http://en.wikipedia.org/wiki/The_Art_of_Computer_Programming |
+
+
+===== BibTeX example =====
+
+<code bibtex>
+@Comment{refnotes,
+ namespace = "ref:prog"
+}
+
+@Book{GangOfFour,
+ author = "Erich {Gamma} and Richard {Helm} and Ralph {Johnson} and John {Vlissides}",
+ author-ref = "Gamma, et al.",
+ title = "Design Patterns: Elements of Reusable Object-Oriented Software",
+ publisher = "Addison-Wesley",
+ year = 1994,
+ address = "Reading, Mass.",
+ pages = 395,
+ isbn = "0-201-63361-2",
+ url = "http://en.wikipedia.org/wiki/Design_Patterns"
+}
+
+@Article{:ref:Knuth-LCE-1985,
+ author = "Donald Knuth",
+ title = "Deciphering a linear congruential encryption",
+ journal = "IEEE Transactions on Information Theory",
+ volume = "31(1)",
+ year = 1985,
+ month = "Jan",
+ publisher = "IEEE",
+ pages = "49-52",
+ issn = "0018-9448",
+ url = "http://ieeexplore.ieee.org/xpl/articleDetails.jsp?arnumber=1056997"
+}
+</code>
+
+===== Dataentry example =====
+
+The dataentry below is wrapped into ''<code>'' section to be properly presented in absence of [[doku>plugin:data|Data plugin]].
+
+<code>
+---- dataentry refnotes ----
+note-name : :ref:prog:Hunt&Thomas(1999)
+authors : Andrew Hunt, David Thomas
+title : The Pragmatic Programmer: From Journeyman to Master
+published : 1999
+publisher : Addison-Wesley Professional
+pages : 352
+isbn : 0-201-61622-X
+url : http://en.wikipedia.org/wiki/The_Pragmatic_Programmer
+----
+</code>
diff --git a/platform/www/lib/plugins/refnotes/lang/en/intro.txt b/platform/www/lib/plugins/refnotes/lang/en/intro.txt
new file mode 100644
index 0000000..42f5829
--- /dev/null
+++ b/platform/www/lib/plugins/refnotes/lang/en/intro.txt
@@ -0,0 +1,15 @@
+====== RefNotes Configuration ======
+
+On this page you modify the configuration settings used by [[doku>plugin:refnotes|RefNotes plugin]]. There are three sections that group related settings:
+
+ * **General settings**
+ * //Use footnotes syntax// --- if enabled the RefNotes plugin will be used to handle native DokuWiki footnotes along with it's own syntax.
+ * //Enable reference database// --- if enabled the plugin will load predefined notes form the [[doku>plugin:refnotes:refdb|reference database]].
+ * //Reference database namespace// --- DokuWiki namespace for the reference database.
+ * **Namespaces** --- in this section you can specify rendering style for predefined namespaces. For a detailed explanation of each style see the [[doku>plugin:refnotes:style|style reference]].
+ * **Notes** --- this section is used to predefine commonly used notes.
+ * //Inline// --- specifies if the note text should be [[doku>plugin:refnotes:syntax#inline_notes|inlined]]. For inline notes you can configure if various reference styles are applied or not.
+
+Settings that are shown on a blue background are the default values. In the //Namespaces// section settings that are shown on a green background are inherited from the parent namespace.
+
+Remember to press the **Save** button on the bottom of this page before leaving otherwise your changes will be lost.
diff --git a/platform/www/lib/plugins/refnotes/lang/en/lang.php b/platform/www/lib/plugins/refnotes/lang/en/lang.php
new file mode 100644
index 0000000..4106ce1
--- /dev/null
+++ b/platform/www/lib/plugins/refnotes/lang/en/lang.php
@@ -0,0 +1,146 @@
+<?php
+/**
+ * Plugin RefNotes: English language file
+ *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author Mykola Ostrovskyy <dwpforge@gmail.com>
+ */
+
+// Settings must be present and set appropriately for the language
+$lang['encoding'] = 'utf-8';
+$lang['direction'] = 'ltr';
+
+// Reference database keys
+$lang['dbk_author'] = 'Author';
+$lang['dbk_authors'] = 'Authors';
+$lang['dbk_chapter'] = 'Chapter';
+$lang['dbk_edition'] = 'Edition';
+$lang['dbk_isbn'] = 'ISBN';
+$lang['dbk_issn'] = 'ISSN';
+$lang['dbk_journal'] = 'Journal';
+$lang['dbk_month'] = 'Month';
+$lang['dbk_note-name'] = 'Note name';
+$lang['dbk_note-page'] = 'Note page';
+$lang['dbk_note-pages'] = 'Note pages';
+$lang['dbk_note-text'] = 'Note text';
+$lang['dbk_page'] = 'Page';
+$lang['dbk_pages'] = 'Pages';
+$lang['dbk_published'] = 'Published';
+$lang['dbk_publisher'] = 'Publisher';
+$lang['dbk_ref-author'] = 'Reference author';
+$lang['dbk_ref-authors'] = 'Reference authors';
+$lang['dbk_title'] = 'Title';
+$lang['dbk_url'] = 'URL';
+$lang['dbk_volume'] = 'Volume';
+$lang['dbk_year'] = 'Year';
+
+$lang['txt_in_cap'] = 'In';
+$lang['txt_page_abbr'] = 'p.';
+$lang['txt_pages_abbr'] = 'pp.';
+
+// For admin plugins, the menu prompt to be displayed in the admin menu
+// if set here, the plugin doesn't need to override the getMenuText() method
+$lang['menu'] = 'RefNotes Configuration';
+
+$lang['noscript'] = 'Sorry, this page requires JavaScript to function properly. Please enable it or get a decent browser.';
+
+$lang['sec_general'] = 'General settings';
+$lang['sec_namespaces'] = 'Namespaces';
+$lang['sec_notes'] = 'Notes';
+
+$lang['lbl_replace-footnotes'] = 'Use footnotes syntax';
+$lang['lbl_reference-db-enable'] = 'Enable reference database';
+$lang['lbl_reference-db-namespace'] = 'Reference database namespace';
+
+$lang['lbl_refnote-id'] = 'Reference/note identifier style';
+$lang['lbl_reference-base'] = 'Reference baseline';
+$lang['lbl_reference-font-weight'] = 'Reference font weight';
+$lang['lbl_reference-font-style'] = 'Reference font style';
+$lang['lbl_reference-format'] = 'Reference formatting';
+$lang['lbl_reference-group'] = 'Reference grouping';
+$lang['lbl_reference-render'] = 'Reference rendering';
+$lang['lbl_multi-ref-id'] = 'Multi-reference identifier';
+$lang['lbl_note-preview'] = 'Note preview';
+$lang['lbl_notes-separator'] = 'Notes block separator';
+$lang['lbl_note-text-align'] = 'Note text alignment';
+$lang['lbl_note-font-size'] = 'Note font size';
+$lang['lbl_note-render'] = 'Note rendering';
+$lang['lbl_note-id-base'] = 'Note identifier baseline';
+$lang['lbl_note-id-font-weight'] = 'Note identifier font weight';
+$lang['lbl_note-id-font-style'] = 'Note identifier font style';
+$lang['lbl_note-id-format'] = 'Note identifier formatting';
+$lang['lbl_back-ref-caret'] = 'Back reference circumflex';
+$lang['lbl_back-ref-base'] = 'Back reference base line';
+$lang['lbl_back-ref-font-weight'] = 'Back reference font weight';
+$lang['lbl_back-ref-font-style'] = 'Back reference font style';
+$lang['lbl_back-ref-format'] = 'Back reference formatting';
+$lang['lbl_back-ref-separator'] = 'Back reference separator';
+$lang['lbl_scoping'] = 'Scoping behavior';
+
+$lang['lbl_inline'] = 'Inline';
+$lang['lbl_use-reference-base'] = 'Apply reference baseline';
+$lang['lbl_use-reference-font-weight'] = 'Apply reference font weight';
+$lang['lbl_use-reference-font-style'] = 'Apply reference font style';
+$lang['lbl_use-reference-format'] = 'Apply reference formatting';
+
+$lang['opt_arrow'] = 'Up arrow';
+$lang['opt_basic'] = 'Plain text';
+$lang['opt_bold'] = 'Bold';
+$lang['opt_brackets'] = 'Brackets';
+$lang['opt_caret'] = 'Circumflex';
+$lang['opt_comma'] = 'Comma';
+$lang['opt_dot'] = 'Dot';
+$lang['opt_group-comma'] = 'Separate with comma';
+$lang['opt_group-none'] = 'Don\'t group';
+$lang['opt_group-semicolon'] = 'Separate with semicolon';
+$lang['opt_harvard'] = 'Harvard system of referencing';
+$lang['opt_inherit'] = 'Inherit';
+$lang['opt_italic'] = 'Italic';
+$lang['opt_justify'] = 'Justify';
+$lang['opt_latin'] = 'Latin';
+$lang['opt_latin-lower'] = 'Latin lower case';
+$lang['opt_latin-upper'] = 'Latin upper case';
+$lang['opt_left'] = 'Left';
+$lang['opt_merge'] = 'Merge with back references';
+$lang['opt_none'] = 'None';
+$lang['opt_normal'] = 'Normal';
+$lang['opt_normal-text'] = 'Normal text';
+$lang['opt_note-counter'] = 'Note counter';
+$lang['opt_note-id'] = 'Note identifier';
+$lang['opt_note-name'] = 'Note name';
+$lang['opt_numeric'] = 'Numeric';
+$lang['opt_parents'] = 'Parentheses';
+$lang['opt_popup'] = 'Static pop-up';
+$lang['opt_prefix'] = 'Prefix back references';
+$lang['opt_ref-counter'] = 'Reference counter';
+$lang['opt_reset'] = 'New scope after each notes block';
+$lang['opt_right-bracket'] = 'Right bracket';
+$lang['opt_right-parent'] = 'Right parenthesis';
+$lang['opt_roman-lower'] = 'Roman lower case';
+$lang['opt_roman-upper'] = 'Roman upper case';
+$lang['opt_single'] = 'Use single scope';
+$lang['opt_small'] = 'Small';
+$lang['opt_stars'] = 'Stars';
+$lang['opt_super'] = 'Superscript';
+$lang['opt_tooltip'] = 'Tooltip';
+
+$lang['btn_add'] = 'Add';
+$lang['btn_rename'] = 'Rename';
+$lang['btn_delete'] = 'Delete';
+$lang['btn_save'] = 'Save';
+
+$lang['js_status'] = 'Server communication status.';
+$lang['js_loading'] = 'Loading configuration settings from the server...';
+$lang['js_loaded'] = 'Configuration settings are successfully loaded from the server.';
+$lang['js_loading_failed'] = 'Failed to load configuration settings from the server ({1}).';
+$lang['js_invalid_data'] = 'Configuration settings loaded from the server are invalid or corrupted ({1}).';
+$lang['js_saving'] = 'Saving configuration settings on the server...';
+$lang['js_saved'] = 'Configuration settings are successfully saved on the server.';
+$lang['js_saving_failed'] = 'Failed to save configuration settings on the server ({1}).';
+$lang['js_invalid_ns_name'] = 'The specified namespace name is invalid.';
+$lang['js_ns_name_exists'] = 'The {1} namespace already exists.';
+$lang['js_delete_ns'] = 'Are you sure you want to delete {1} namespace?';
+$lang['js_invalid_note_name'] = 'The specified note name is invalid.';
+$lang['js_note_name_exists'] = 'The {1} note already exists.';
+$lang['js_delete_note'] = 'Are you sure you want to delete {1} note?';
+$lang['js_unsaved'] = 'Your changes to the configuration settings are not saved.';
diff --git a/platform/www/lib/plugins/refnotes/locale.php b/platform/www/lib/plugins/refnotes/locale.php
new file mode 100644
index 0000000..8950621
--- /dev/null
+++ b/platform/www/lib/plugins/refnotes/locale.php
@@ -0,0 +1,92 @@
+<?php
+
+/**
+ * Plugin RefNotes: Localization
+ *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author Mykola Ostrovskyy <dwpforge@gmail.com>
+ */
+
+/**
+ * Plugins that rely on refnotes_localization should use this trait.
+ */
+trait refnotes_localization_plugin {
+ /**
+ *
+ */
+ public function getRawLang() {
+ return $this->lang;
+ }
+}
+
+class refnotes_localization {
+
+ private static $instance = NULL;
+
+ private $plugin;
+
+ /**
+ *
+ */
+ public static function initialize($plugin) {
+ if (self::$instance == NULL) {
+ self::$instance = new refnotes_localization($plugin);
+ }
+ }
+
+ /**
+ *
+ */
+ public static function getInstance() {
+ if (self::$instance == NULL) {
+ throw new Exception('Shared refnotes_localization instance is not properly initialized.');
+ }
+
+ return self::$instance;
+ }
+
+ /**
+ * Constructor
+ */
+ private function __construct($plugin) {
+ $this->plugin = $plugin;
+ }
+
+ /**
+ *
+ */
+ public function getLang($id) {
+ return $this->plugin->getLang($id);
+ }
+
+ /**
+ *
+ */
+ public function getFileName($id) {
+ return $this->plugin->localFN($id);
+ }
+
+ /**
+ *
+ */
+ public function getByPrefix($prefix, $strip = true) {
+ $this->plugin->setupLocale();
+
+ if ($strip) {
+ $pattern = '/^' . $prefix . '_(.+)$/';
+ }
+ else {
+ $pattern = '/^(' . $prefix . '_.+)$/';
+ }
+
+ $result = array();
+
+ foreach ($this->plugin->getRawLang() as $key => $value) {
+ if (preg_match($pattern, $key, $match) == 1) {
+ $result[$match[1]] = $value;
+ }
+ }
+
+ return $result;
+ }
+}
diff --git a/platform/www/lib/plugins/refnotes/namespace.php b/platform/www/lib/plugins/refnotes/namespace.php
new file mode 100644
index 0000000..c3fa4b5
--- /dev/null
+++ b/platform/www/lib/plugins/refnotes/namespace.php
@@ -0,0 +1,463 @@
+<?php
+
+/**
+ * Plugin RefNotes: Namespace heplers
+ *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author Mykola Ostrovskyy <dwpforge@gmail.com>
+ */
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+abstract class refnotes_namespace_data_stash {
+
+ protected $index;
+
+ /**
+ * Constructor
+ */
+ public function __construct() {
+ $this->index = array();
+ }
+
+ /**
+ *
+ */
+ abstract public function add($namespace, $data);
+
+ /**
+ *
+ */
+ public function getCount() {
+ return count($this->index);
+ }
+
+ /**
+ *
+ */
+ public function getIndex() {
+ return array_keys($this->index);
+ }
+
+ /**
+ *
+ */
+ public function getAt($index) {
+ return array_key_exists($index, $this->index) ? $this->index[$index] : array();
+ }
+
+ /**
+ *
+ */
+ public function sort() {
+ ksort($this->index);
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+class refnotes_namespace_data {
+
+ protected $namespace;
+ protected $data;
+
+ /**
+ * Constructor
+ */
+ public function __construct($namespace, $data) {
+ $this->namespace = $namespace;
+ $this->data = $data;
+ }
+
+ /**
+ *
+ */
+ public function getNamespace() {
+ return $this->namespace->getName();
+ }
+
+ /**
+ *
+ */
+ public function getData() {
+ return $this->data;
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+class refnotes_namespace_style_stash extends refnotes_namespace_data_stash {
+
+ private $page;
+
+ /**
+ * Constructor
+ */
+ public function __construct($page) {
+ parent::__construct();
+
+ $this->page = $page;
+ }
+
+ /**
+ *
+ */
+ public function add($namespace, $data) {
+ $style = new refnotes_namespace_style_info($namespace, $data);
+ $parent = $style->getInheritedNamespace();
+
+ if (($parent == '') && ($namespace->getScopesCount() == 1)) {
+ /* Default inheritance for the first scope */
+ $parent = refnotes_namespace::getParentName($namespace->getName());
+ }
+
+ $index = $namespace->getStyleIndex($this->page->findParentNamespace($parent));
+
+ $this->index[$index][] = $style;
+ }
+ /**
+ * Sort the style blocks so that the namespaces with inherited style go after
+ * the namespaces they inherit from.
+ */
+ public function sort() {
+ parent::sort();
+
+ $this->sortByDefaultInheritance();
+ $this->sortByExplicitInheritance();
+ }
+
+ /**
+ *
+ */
+ private function sortByDefaultInheritance() {
+ foreach ($this->index as &$index) {
+ $namespace = array();
+
+ foreach ($index as $style) {
+ $namespace[] = $style->getNamespace();
+ }
+
+ array_multisort($namespace, SORT_ASC, $index);
+ }
+ }
+
+ /**
+ *
+ */
+ private function sortByExplicitInheritance() {
+ foreach ($this->index as &$index) {
+ $derived = array();
+ $sorted = array();
+
+ foreach ($index as $style) {
+ if ($style->isDerived()) {
+ $derived[] = $style;
+ }
+ else {
+ $sorted[] = $style;
+ }
+ }
+
+ $derivedCount = count($derived);
+
+ if ($derivedCount > 0) {
+ if ($derivedCount == 1) {
+ $sorted[] = $derived[0];
+ }
+ else {
+ /* Perform simplified topological sorting */
+ $target = array();
+ $source = array();
+
+ for ($i = 0; $i < $derivedCount; $i++) {
+ $target[$i] = $derived[$i]->getNamespace();
+ $source[$i] = $derived[$i]->getInheritedNamespace();
+ }
+
+ for ($j = 0; $j < $derivedCount; $j++) {
+ foreach ($source as $i => $s) {
+ if (!in_array($s, $target)) {
+ break;
+ }
+ }
+
+ $sorted[] = $derived[$i];
+
+ unset($target[$i]);
+ unset($source[$i]);
+ }
+ }
+ }
+
+ $index = $sorted;
+ }
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+class refnotes_namespace_style_info extends refnotes_namespace_data {
+
+ /**
+ *
+ */
+ public function isDerived() {
+ return array_key_exists('inherit', $this->data);
+ }
+
+ /**
+ *
+ */
+ public function getInheritedNamespace() {
+ return $this->isDerived() ? $this->data['inherit'] : '';
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+class refnotes_namespace_mapping_stash extends refnotes_namespace_data_stash {
+
+ /**
+ *
+ */
+ public function add($namespace, $data) {
+ $this->index[$namespace->getMappingIndex()][] = new refnotes_namespace_data($namespace, $data);
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+class refnotes_namespace {
+
+ private $name;
+ private $style;
+ private $renderer;
+ private $scope;
+ private $newScope;
+
+ /**
+ *
+ */
+ public static function getNamePattern($type) {
+ $result = '(?:(?:' . refnotes_note::getNamePattern('strict') . ')?:)*';
+
+ if ($type == 'required') {
+ $result .= '(?::|' . refnotes_note::getNamePattern('strict') . '):*';
+ }
+
+ return $result;
+ }
+
+ /**
+ * Returns canonic name for a namespace
+ */
+ public static function canonizeName($name) {
+ return preg_replace('/:{2,}/', ':', ':' . $name . ':');
+ }
+
+ /**
+ * Returns name of the parent namespace
+ */
+ public static function getParentName($name) {
+ return preg_replace('/\w*:$/', '', $name);
+ }
+
+ /**
+ * Splits full note name into namespace and name components
+ */
+ public static function parseName($name) {
+ $pos = strrpos($name, ':');
+ if ($pos !== false) {
+ $namespace = self::canonizeName(substr($name, 0, $pos));
+ $name = substr($name, $pos + 1);
+ }
+ else {
+ $namespace = ':';
+ }
+
+ return array($namespace, $name);
+ }
+
+ /**
+ * Constructor
+ */
+ public function __construct($name, $parent = NULL) {
+ $this->name = $name;
+ $this->style = array();
+ $this->renderer = NULL;
+ $this->scope = array();
+ $this->newScope = true;
+
+ if ($parent != NULL) {
+ $this->style = $parent->style;
+ }
+ }
+
+ /**
+ *
+ */
+ public function getName() {
+ return $this->name;
+ }
+
+ /**
+ *
+ */
+ public function getScopesCount() {
+ return count($this->scope);
+ }
+
+ /**
+ *
+ */
+ public function inheritStyle($source) {
+ $this->style = $source->style;
+ $this->renderer = NULL;
+ }
+
+ /**
+ *
+ */
+ public function setStyle($style) {
+ $this->style = array_merge($this->style, $style);
+ $this->renderer = NULL;
+ }
+
+ /**
+ *
+ */
+ public function getStyle($name) {
+ return array_key_exists($name, $this->style) ? $this->style[$name] : '';
+ }
+
+ /**
+ * Defer creation of renderer until namespace style is set.
+ */
+ public function getRenderer() {
+ if ($this->renderer == NULL) {
+ $this->renderer = new refnotes_renderer($this);
+ }
+
+ return $this->renderer;
+ }
+
+ /**
+ *
+ */
+ private function getScope($index) {
+ $index = count($this->scope) + $index;
+
+ return ($index >= 0) ? $this->scope[$index] : new refnotes_scope_mock();
+ }
+
+ /**
+ *
+ */
+ private function getPreviousScope() {
+ return $this->getScope(-2);
+ }
+
+ /**
+ *
+ */
+ private function getCurrentScope() {
+ return $this->getScope(-1);
+ }
+
+ /**
+ *
+ */
+ public function getActiveScope() {
+ if ($this->newScope) {
+ $this->scope[] = new refnotes_scope($this, count($this->scope) + 1);
+ $this->newScope = false;
+ }
+
+ return $this->getCurrentScope();
+ }
+
+ /**
+ *
+ */
+ public function markScopeStart($callIndex) {
+ if (!$this->getCurrentScope()->isOpen()) {
+ $this->scope[] = new refnotes_scope(NULL, 0, $callIndex);
+ }
+ }
+
+ /**
+ *
+ */
+ public function markScopeEnd($callIndex) {
+ /* Create an empty scope if there is no open one */
+ $this->markScopeStart($callIndex - 1);
+ $this->getCurrentScope()->getLimits()->end = $callIndex;
+ }
+
+
+ /**
+ * Find last scope end within specified range
+ */
+ private function findScopeEnd($start, $end) {
+ for ($i = count($this->scope) - 1; $i >= 0; $i--) {
+ $scopeEnd = $this->scope[$i]->getLimits()->end;
+
+ if (($scopeEnd > $start) && ($scopeEnd < $end)) {
+ return $scopeEnd;
+ }
+ }
+
+ return -1;
+ }
+
+ /**
+ *
+ */
+ public function getStyleIndex($parent) {
+ $previousEnd = $this->getPreviousScope()->getLimits()->end;
+ $currentStart = $this->getCurrentScope()->getLimits()->start;
+ $parentEnd = ($parent != NULL) ? $parent->findScopeEnd($previousEnd, $currentStart) : -1;
+
+ return max($parentEnd, $previousEnd) + 1;
+ }
+
+ /**
+ *
+ */
+ public function getMappingIndex() {
+ return $this->getPreviousScope()->getLimits()->end + 1;
+ }
+
+ /**
+ *
+ */
+ public function rewriteReferences($limit = '') {
+ $this->resetScope();
+
+ if (count($this->scope) > 0) {
+ $html = $this->getCurrentScope()->rewriteReferences($limit);
+ }
+ }
+
+ /**
+ *
+ */
+ public function renderNotes($mode, $limit = '') {
+ $this->resetScope();
+ $doc = '';
+
+ if (count($this->scope) > 0) {
+ $doc = $this->getCurrentScope()->renderNotes($mode, $limit);
+ }
+
+ return $doc;
+ }
+
+ /**
+ *
+ */
+ private function resetScope() {
+ switch ($this->getStyle('scoping')) {
+ case 'single':
+ break;
+
+ default:
+ $this->newScope = true;
+ break;
+ }
+ }
+}
diff --git a/platform/www/lib/plugins/refnotes/note.php b/platform/www/lib/plugins/refnotes/note.php
new file mode 100644
index 0000000..8379168
--- /dev/null
+++ b/platform/www/lib/plugins/refnotes/note.php
@@ -0,0 +1,336 @@
+<?php
+
+/**
+ * Plugin RefNotes: Note
+ *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author Mykola Ostrovskyy <dwpforge@gmail.com>
+ */
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+class refnotes_note_block_iterator extends FilterIterator {
+
+ private $note;
+ private $limit;
+ private $count;
+
+ /**
+ * Constructor
+ */
+ public function __construct($note, $limit) {
+ $this->note = new ArrayObject($note);
+ $this->limit = $this->getBlockLimit($limit);
+ $this->count = 0;
+
+ parent::__construct($this->note->getIterator());
+ }
+
+ /**
+ *
+ */
+ function accept() {
+ $result = $this->current()->isValid();
+
+ if ($result) {
+ ++$this->count;
+ }
+
+ return $result;
+ }
+
+ /**
+ *
+ */
+ function valid() {
+ return parent::valid() && (($this->limit == 0) || ($this->count <= $this->limit));
+ }
+
+ /**
+ *
+ */
+ private function getBlockLimit($limit) {
+ if (preg_match('/(\/?)(\d+)/', $limit, $match) == 1) {
+ if ($match[1] != '') {
+ $devider = intval($match[2]);
+ $result = ceil($this->getValidCount() / $devider);
+ }
+ else {
+ $result = intval($match[2]);
+ }
+ }
+ else {
+ $result = 0;
+ }
+
+ return $result;
+ }
+
+ /**
+ *
+ */
+ private function getValidCount() {
+ $result = 0;
+
+ foreach ($this->note as $note) {
+ if ($note->isValid()) {
+ ++$result;
+ }
+ }
+
+ return $result;
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+class refnotes_note_mock {
+
+ /**
+ *
+ */
+ public function getScope() {
+ return new refnotes_scope_mock();
+ }
+
+ /**
+ *
+ */
+ public function setText($text) {
+ }
+
+ /**
+ *
+ */
+ public function addReference($reference) {
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+class refnotes_note extends refnotes_refnote {
+
+ protected $scope;
+ protected $namespaceName;
+ protected $id;
+ protected $name;
+ protected $inline;
+ protected $reference;
+ protected $text;
+ protected $processed;
+
+ /**
+ *
+ */
+ public static function getNamePattern($type) {
+ if (($type == 'full-extended') || ($type == 'extended')) {
+ $result = ($type == 'full-extended') ? refnotes_namespace::getNamePattern('optional') : '';
+ $result .= '[[:alpha:]\d][\w.&\(\)\[\]{}+-]*';
+ }
+ else {
+ $result = '[[:alpha:]]\w*';
+ }
+
+ return $result;
+ }
+
+ /**
+ * Constructor
+ */
+ public function __construct($scope, $namespaceName, $name) {
+ parent::__construct();
+
+ $this->scope = $scope;
+ $this->namespaceName = $namespaceName;
+ $this->id = -1;
+ $this->name = $name;
+ $this->inline = false;
+ $this->reference = array();
+ $this->text = '';
+ $this->processed = false;
+ }
+
+ /**
+ *
+ */
+ private function initId() {
+ $this->id = $this->scope->getNoteId();
+
+ if ($this->name == '') {
+ $this->name = '#' . $this->id;
+ }
+ }
+
+ /**
+ *
+ */
+ public function getId() {
+ return $this->id;
+ }
+
+ /**
+ *
+ */
+ public function getName() {
+ return $this->name;
+ }
+
+ /**
+ *
+ */
+ public function getNamespaceName() {
+ return $this->namespaceName;
+ }
+
+ /**
+ *
+ */
+ public function getScope() {
+ return $this->scope;
+ }
+
+ /**
+ *
+ */
+ public function setText($text) {
+ if ($this->text == '' || !$this->inline) {
+ $this->text = $text;
+ }
+ }
+
+ /**
+ *
+ */
+ public function getText() {
+ return $this->text;
+ }
+
+ /**
+ *
+ */
+ public function addReference($reference) {
+ if ($this->id == -1 && !$this->inline) {
+ $this->inline = $reference->isInline();
+
+ if (!$this->inline) {
+ $this->initId();
+ }
+ }
+
+ if ($reference->isBackReferenced()) {
+ $this->reference[] = $reference;
+ $this->processed = false;
+ }
+ }
+
+ /**
+ * Checks if the note should be processed
+ */
+ public function isValid() {
+ return !$this->processed && !empty($this->reference) && $this->text != '';
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+class refnotes_renderer_note extends refnotes_note {
+
+ /**
+ *
+ */
+ public function getMinReferenceId() {
+ $result = -1;
+
+ /* References are added in ascending order, so the first valid id should be minimal. */
+ foreach ($this->reference as $reference) {
+ if ($reference->getId() != -1) {
+ $result = $reference->getId();
+ break;
+ }
+ }
+
+ return $result;
+ }
+
+ /**
+ *
+ */
+ public function getAnchorName() {
+ $result = 'refnotes';
+ $result .= $this->scope->getName();
+ $result .= ':note' . $this->id;
+
+ return $result;
+ }
+
+ /**
+ *
+ */
+ public function render($mode) {
+ $doc = $this->scope->getRenderer()->renderNote($mode, $this, $this->reference);
+
+ $this->reference = array();
+ $this->processed = true;
+
+ return $doc;
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+class refnotes_action_note extends refnotes_note {
+
+ /**
+ * Constructor
+ */
+ public function __construct($scope, $namespaceName, $name) {
+ parent::__construct($scope, $namespaceName, $name);
+
+ $this->loadDatabaseDefinition();
+
+ $this->inline = $this->getAttribute('inline', false);
+ }
+
+ /**
+ *
+ */
+ private function loadDatabaseDefinition() {
+ $name = $this->namespaceName . $this->name;
+ $note = refnotes_reference_database::getInstance()->findNote($name);
+
+ if ($note != NULL) {
+ $this->attributes = $note->getAttributes();
+ $this->data = $note->getData();
+ }
+ }
+
+ /**
+ *
+ */
+ public function addReference($reference) {
+ parent::addReference($reference);
+
+ $exclude = $this->scope->getRenderer()->getReferencePrivateDataSet();
+ $data = array_diff_key($reference->getData(), array_flip($exclude));
+ $this->data = array_merge($this->data, $data);
+ }
+
+ /**
+ * Checks if the note should be processed. Simple notes are also reported as valid so that
+ * scope limits will produce note blocks identical to ones during rendering.
+ */
+ public function isValid() {
+ return !$this->processed && !empty($this->reference) && ($this->text != '' || $this->hasData());
+ }
+
+ /**
+ * Inject reference database data into references so that they can be properly rendered.
+ * Inject note text into the first reference.
+ */
+ public function rewriteReferences() {
+ if ($this->text == '' && $this->hasData()) {
+ foreach ($this->reference as $reference) {
+ $reference->rewrite($this->attributes, $this->data);
+ }
+
+ $this->reference[0]->setNoteText($this->scope->getRenderer()->renderNoteText($this));
+ }
+
+ $this->processed = true;
+ }
+}
diff --git a/platform/www/lib/plugins/refnotes/plugin.info.txt b/platform/www/lib/plugins/refnotes/plugin.info.txt
new file mode 100644
index 0000000..5f2d881
--- /dev/null
+++ b/platform/www/lib/plugins/refnotes/plugin.info.txt
@@ -0,0 +1,7 @@
+base refnotes
+author Mykola Ostrovskyy
+email dwpforge@gmail.com
+date 2021-05-23
+name RefNotes Plugin
+desc Extended syntax for footnotes and references.
+url http://www.dokuwiki.org/plugin:refnotes
diff --git a/platform/www/lib/plugins/refnotes/reference.php b/platform/www/lib/plugins/refnotes/reference.php
new file mode 100644
index 0000000..6a5f82a
--- /dev/null
+++ b/platform/www/lib/plugins/refnotes/reference.php
@@ -0,0 +1,192 @@
+<?php
+
+/**
+ * Plugin RefNotes: Reference
+ *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author Mykola Ostrovskyy <dwpforge@gmail.com>
+ */
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+class refnotes_parser_reference extends refnotes_refnote {
+
+ /**
+ * Constructor
+ */
+ public function __construct($name, $data) {
+ list($namespace, $name) = refnotes_namespace::parseName($name);
+
+ if (preg_match('/(?:@@FNT|#)(\d+)/', $name, $match) == 1) {
+ $name = intval($match[1]);
+ }
+
+ parent::__construct(array('ns' => $namespace, 'name' => $name));
+
+ if ($data != '') {
+ $this->parseStructuredData($data);
+ }
+ }
+
+ /**
+ *
+ */
+ private function parseStructuredData($data) {
+ if (preg_match('/^\s*\|/', $data) == 1) {
+ preg_match_all('/\|\s*([-\w]+)\s*=\s*([^|]+)/', $data, $match, PREG_SET_ORDER);
+
+ foreach ($match as $m) {
+ $this->data[$m[1]] = preg_replace('/\s+/', ' ', trim($m[2]));
+ }
+ }
+ else {
+ preg_match_all('/([-\w]+)\s*:\s*(.+?)\s*?(?:(?<!\\\\);|\n|$)/', $data, $match, PREG_SET_ORDER);
+
+ foreach ($match as $m) {
+ $this->data[$m[1]] = str_replace('\\;', ';', $m[2]);
+ }
+ }
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+class refnotes_reference extends refnotes_refnote {
+
+ protected $inline;
+ protected $hidden;
+ protected $note;
+ protected $id;
+
+ /**
+ * Constructor
+ */
+ public function __construct($note, $attributes, $data) {
+ parent::__construct($attributes, $data);
+
+ $this->inline = $this->getAttribute('inline', false);
+ $this->hidden = $this->getAttribute('hidden', false);
+ $this->note = $note;
+ $this->id = -1;
+
+ if ($this->isBackReferenced()) {
+ $this->id = $this->note->getScope()->getReferenceId();
+ }
+ }
+
+ /**
+ *
+ */
+ public function getId() {
+ return $this->id;
+ }
+
+ /**
+ *
+ */
+ public function getNote() {
+ return $this->note;
+ }
+
+ /**
+ *
+ */
+ public function isInline() {
+ return $this->inline;
+ }
+
+ /**
+ *
+ */
+ public function isBackReferenced() {
+ return !$this->inline && !$this->hidden;
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+class refnotes_renderer_reference extends refnotes_reference {
+
+ /**
+ *
+ */
+ public function getAnchorName() {
+ $result = 'refnotes';
+ $result .= $this->note->getScope()->getName();
+ $result .= ':ref' . $this->id;
+
+ return $result;
+ }
+
+ /**
+ *
+ */
+ public function render($mode) {
+ $doc = '';
+
+ if (!$this->hidden) {
+ $doc = $this->note->getScope()->getRenderer()->renderReference($mode, $this);
+ }
+
+ return $doc;
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+class refnotes_action_reference extends refnotes_reference {
+
+ private $call;
+
+ /**
+ * Constructor
+ */
+ public function __construct($note, $attributes, $data, $call) {
+ parent::__construct($note, $attributes, $data);
+
+ $this->call = $call;
+ }
+
+ /**
+ *
+ */
+ private function updateAttributes($attributes) {
+ static $key = array('inline', 'use-reference-base', 'use-reference-font-weight', 'use-reference-font-style', 'use-reference-format', 'source');
+
+ foreach ($key as $k) {
+ if (array_key_exists($k, $attributes)) {
+ $this->attributes[$k] = $attributes[$k];
+ }
+ }
+ }
+
+ /**
+ *
+ */
+ private function updateData($data) {
+ $include = $this->note->getScope()->getRenderer()->getReferenceSharedDataSet();
+ $data = array_intersect_key($data, array_flip($include));
+ $this->data = array_merge($data, $this->data);
+ }
+
+ /**
+ *
+ */
+ public function rewrite($attributes, $data) {
+ $this->updateAttributes($attributes);
+ $this->updateData($data);
+
+ $this->call->setPluginData(1, $this->attributes);
+
+ if ($this->hasData()) {
+ $this->call->setPluginData(2, $this->data);
+ }
+ }
+
+ /**
+ *
+ */
+ public function setNoteText($text) {
+ if ($text != '') {
+ $calls = refnotes_parser_core::getInstance()->getInstructions($text);
+
+ $this->call->insertBefore(new refnotes_nest_instruction($calls));
+ }
+ }
+}
diff --git a/platform/www/lib/plugins/refnotes/refnote.php b/platform/www/lib/plugins/refnotes/refnote.php
new file mode 100644
index 0000000..127cd18
--- /dev/null
+++ b/platform/www/lib/plugins/refnotes/refnote.php
@@ -0,0 +1,51 @@
+<?php
+
+/**
+ * Plugin RefNotes: Common base class for references and notes
+ *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author Mykola Ostrovskyy <dwpforge@gmail.com>
+ */
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+class refnotes_refnote {
+
+ protected $attributes;
+ protected $data;
+
+ /**
+ * Constructor
+ */
+ public function __construct($attributes = array(), $data = array()) {
+ $this->attributes = $attributes;
+ $this->data = $data;
+ }
+
+ /**
+ *
+ */
+ public function getAttributes() {
+ return $this->attributes;
+ }
+
+ /**
+ *
+ */
+ public function getAttribute($name, $default = '') {
+ return array_key_exists($name, $this->attributes) ? $this->attributes[$name] : $default;
+ }
+
+ /**
+ *
+ */
+ public function getData() {
+ return $this->data;
+ }
+
+ /**
+ *
+ */
+ public function hasData() {
+ return !empty($this->data);
+ }
+}
diff --git a/platform/www/lib/plugins/refnotes/rendering.php b/platform/www/lib/plugins/refnotes/rendering.php
new file mode 100644
index 0000000..22f7c9f
--- /dev/null
+++ b/platform/www/lib/plugins/refnotes/rendering.php
@@ -0,0 +1,1272 @@
+<?php
+
+/**
+ * Plugin RefNotes: Renderer
+ *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author Mykola Ostrovskyy <dwpforge@gmail.com>
+ */
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+class refnotes_renderer_mock {
+
+ /**
+ *
+ */
+ public function renderReference($reference) {
+ return '';
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+abstract class refnotes_renderer_base {
+
+ protected $namespace;
+
+ /**
+ * Constructor
+ */
+ public function __construct($namespace) {
+ $this->namespace = $namespace;
+ }
+
+ /**
+ *
+ */
+ protected function getStyle($name) {
+ return $this->namespace->getStyle($name);
+ }
+
+ /**
+ * Returns an array of keys for data that is shared between references and notes.
+ */
+ abstract public function getReferenceSharedDataSet();
+
+ /**
+ * Returns an array of keys for data that is specific to references.
+ */
+ abstract public function getReferencePrivateDataSet();
+
+ /**
+ *
+ */
+ abstract public function renderReference($mode, $reference);
+
+ /**
+ *
+ */
+ abstract public function renderNoteText($note);
+
+ /**
+ *
+ */
+ abstract public function renderNote($mode, $note, $reference);
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+class refnotes_renderer extends refnotes_renderer_base {
+
+ private $referenceRenderer;
+ private $noteRenderer;
+
+ /**
+ * Constructor
+ */
+ public function __construct($namespace) {
+ parent::__construct($namespace);
+
+ $this->referenceRenderer = $this->createRenderer($this->getStyle('reference-render'));
+ $this->noteRenderer = $this->createRenderer($this->getStyle('note-render'));
+ }
+
+ /**
+ *
+ */
+ private function createRenderer($style) {
+ switch ($style) {
+ case 'harvard':
+ $renderer = new refnotes_harvard_renderer($this->namespace);
+ break;
+
+ default:
+ $renderer = new refnotes_basic_renderer($this->namespace);
+ break;
+ }
+
+ return $renderer;
+ }
+
+ /**
+ *
+ */
+ public function getReferenceSharedDataSet() {
+ return $this->referenceRenderer->getReferenceSharedDataSet();
+ }
+
+ /**
+ *
+ */
+ public function getReferencePrivateDataSet() {
+ return $this->referenceRenderer->getReferencePrivateDataSet();
+ }
+
+ /**
+ *
+ */
+ public function renderReference($mode, $reference) {
+ return $this->referenceRenderer->renderReference($mode, $reference);
+ }
+
+ /**
+ *
+ */
+ public function renderNotesSeparator() {
+ $html = '';
+ $style = $this->getStyle('notes-separator');
+ if ($style != 'none') {
+ if ($style != '') {
+ $style = ' style="width: '. $style . '"';
+ }
+ $html = '<hr' . $style . '>' . DOKU_LF;
+ }
+
+ return $html;
+ }
+
+ /**
+ *
+ */
+ public function renderNoteText($note) {
+ return $this->noteRenderer->renderNoteText($note);
+ }
+
+ /**
+ *
+ */
+ public function renderNote($mode, $note, $reference) {
+ return $this->noteRenderer->renderNote($mode, $note, $reference);
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+class refnotes_renderer_data {
+
+ private $data;
+
+ /**
+ * Constructor
+ */
+ public function __construct($data) {
+ $this->data = $data;
+ }
+
+ /**
+ *
+ */
+ public function has($key) {
+ if (func_num_args() > 1) {
+ $result = false;
+
+ foreach (func_get_args() as $key) {
+ if (array_key_exists($key, $this->data)) {
+ $result = true;
+ break;
+ }
+ }
+
+ return $result;
+ }
+ else {
+ return array_key_exists($key, $this->data);
+ }
+ }
+
+ /**
+ *
+ */
+ public function get($key) {
+ if (func_num_args() > 1) {
+ $result = '';
+
+ foreach (func_get_args() as $key) {
+ if (array_key_exists($key, $this->data)) {
+ $result = $this->data[$key];
+ break;
+ }
+ }
+
+ return $result;
+ }
+ else {
+ return array_key_exists($key, $this->data) ? $this->data[$key] : '';
+ }
+ }
+
+ /**
+ *
+ */
+ public function getLongest() {
+ $result = '';
+
+ if (func_num_args() > 0) {
+ foreach (func_get_args() as $key) {
+ if (array_key_exists($key, $this->data) && (strlen($result) < strlen($this->data[$key]))) {
+ $result = $this->data[$key];
+ }
+ }
+ }
+ else {
+ foreach ($this->data as $value) {
+ if (strlen($result) < strlen($value)) {
+ $result = $value;
+ }
+ }
+ }
+
+ return $result;
+ }
+
+ /**
+ *
+ */
+ public function isPositive($key)
+ {
+ static $lookup = array('y', 'yes', 'on', 'true', '1');
+
+ return in_array(strtolower($this->get($key)), $lookup);
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+class refnotes_basic_renderer extends refnotes_renderer_base {
+
+ protected $renderedNoteId = array();
+
+ /**
+ *
+ */
+ public function getReferenceSharedDataSet() {
+ return array();
+ }
+
+ /**
+ *
+ */
+ public function getReferencePrivateDataSet() {
+ return array();
+ }
+
+ /**
+ *
+ */
+ public function renderReference($mode, $reference) {
+ if ($reference->isInline()) {
+ $doc = $this->renderInlineReference($reference);
+ }
+ else {
+ $doc = $this->renderRegularReference($mode, $reference);
+ }
+
+ return $doc;
+ }
+
+ /**
+ *
+ */
+ public function renderNoteText($note) {
+ $data = new refnotes_renderer_data($note->getData());
+
+ $text = $data->get('note-text', 'title');
+
+ if ($text == '') {
+ $text = $data->getLongest();
+ }
+
+ if ($url = $data->get('url')) {
+ $text = '[[' . $url . '|' . $text . ']]';
+ }
+
+ return $text;
+ }
+
+ /**
+ *
+ */
+ public function renderNote($mode, $note, $reference) {
+ $doc = '';
+
+ switch ($mode) {
+ case 'xhtml':
+ $doc = $this->renderNoteXhtml($note, $reference);
+ break;
+
+ case 'odt':
+ $doc = $this->renderNoteOdt($note, $reference);
+ break;
+ }
+
+ return $doc;
+ }
+
+ /**
+ *
+ */
+ protected function renderNoteXhtml($note, $reference) {
+ $html = '<div class="' . $this->renderNoteClass() . '">' . DOKU_LF;
+ $html .= $this->renderBackReferences($note, $reference);
+ $html .= '<span id="' . $note->getAnchorName() . ':text">' . DOKU_LF;
+ $html .= $note->getText() . DOKU_LF;
+ $html .= '</span></div>' . DOKU_LF;
+
+ $this->rendered = true;
+
+ return $html;
+ }
+
+ /**
+ *
+ */
+ protected function renderNoteOdt($note, $reference) {
+ $this->rendered = true;
+
+ return '';
+ }
+
+ /**
+ *
+ */
+ protected function getInlineReferenceStyle($reference, $name, $default) {
+ return ($reference->getAttribute('use-' . $name) === false) ? $default : $this->getStyle($name);
+ }
+
+ /**
+ *
+ */
+ protected function renderInlineReference($reference) {
+ $baseStyle = $this->getInlineReferenceStyle($reference, 'reference-base', 'text');
+ $fontWeightStyle = $this->getInlineReferenceStyle($reference, 'reference-font-weight', 'normal');
+ $fontStyle = $this->getInlineReferenceStyle($reference, 'reference-font-style', 'normal');
+ $formatStyle = $this->getInlineReferenceStyle($reference, 'reference-format', 'none');
+
+ list($baseOpen, $baseClose) = $this->renderBase($baseStyle);
+ list($fontOpen, $fontClose) = $this->renderFont($fontWeightStyle, 'normal', $fontStyle);
+ list($formatOpen, $formatClose) = $this->renderFormat($formatStyle);
+
+ $html = $baseOpen . $fontOpen . $formatOpen;
+ $html .= $reference->getNote()->getText();
+ $html .= $formatClose . $fontClose . $baseClose;
+
+ return $html;
+ }
+
+ /**
+ *
+ */
+ protected function renderRegularReference($mode, $reference) {
+ $doc = '';
+
+ switch ($mode) {
+ case 'xhtml':
+ $doc = $this->renderRegularReferenceXhtml($reference);
+ break;
+
+ case 'odt':
+ $doc = $this->renderRegularReferenceOdt($reference);
+ break;
+ }
+
+ return $doc;
+ }
+
+ /**
+ *
+ */
+ protected function renderRegularReferenceXhtml($reference) {
+ $noteName = $reference->getNote()->getAnchorName();
+ $referenceName = $reference->getAnchorName();
+ $class = $this->renderReferenceClass();
+
+ list($baseOpen, $baseClose) = $this->renderReferenceBase();
+ list($fontOpen, $fontClose) = $this->renderReferenceFont();
+ list($formatOpen, $formatClose) = $this->renderReferenceFormat($reference);
+
+ $html = $baseOpen . $fontOpen;
+ $html .= '<a href="#' . $noteName . '" name="' . $referenceName . '" class="' . $class . '">';
+ $html .= $formatOpen . $this->renderReferenceId($reference) . $formatClose;
+ $html .= '</a>';
+ $html .= $fontClose . $baseClose;
+
+ return $html;
+ }
+
+ /**
+ *
+ */
+ protected function renderRegularReferenceOdt($reference) {
+ $xmlOdt = '';
+ $note = $reference->getNote();
+ $noteId = $note->getId();
+ $refId = $reference->getId();
+
+ // Check to see if this note has been seen before
+
+ if (array_search($noteId, $this->renderedNoteId) === false) {
+ // new note, add it to the $renderedNoteId array
+ $this->renderedNoteId[] = $noteId;
+
+ $xmlOdt .= '<text:note text:id="refnote' . $refId . '" text:note-class="footnote">';
+ $xmlOdt .= '<text:note-citation text:label="' . $refId . '">' . $refId . '</text:note-citation>';
+ $xmlOdt .= '<text:note-body>';
+ $xmlOdt .= '<text:p>' . $note->getText();
+ $xmlOdt .= '</text:p>';
+ $xmlOdt .= '</text:note-body>';
+ $xmlOdt .= '</text:note>';
+ }
+ else {
+ // Seen this one before - just reference it FIXME: style isn't correct
+ $xmlOdt = '<text:note-ref text:note-class="footnote" text:ref-name="refnote' . $noteId . '">';
+ $xmlOdt .= $refId;
+ $xmlOdt .= '</text:note-ref>';
+ }
+
+ return $xmlOdt;
+ }
+
+ /**
+ *
+ */
+ protected function renderBackReferences($note, $reference) {
+ $references = count($reference);
+ $singleReference = ($references == 1);
+ $nameAttribute = ' name="' . $note->getAnchorName() .'"';
+ $backRefFormat = $this->getStyle('back-ref-format');
+ $backRefCaret = '';
+ $html = '';
+
+ list($formatOpen, $formatClose) = $this->renderNoteIdFormat();
+
+ if (($backRefFormat != 'note') && ($backRefFormat != '')) {
+ list($baseOpen, $baseClose) = $this->renderNoteIdBase();
+ list($fontOpen, $fontClose) = $this->renderNoteIdFont();
+
+ $html .= $baseOpen . $fontOpen;
+ $html .= '<a' . $nameAttribute .' class="nolink">';
+ $html .= $formatOpen . $this->renderNoteId($note) . $formatClose;
+ $html .= '</a>';
+ $html .= $fontClose . $baseClose . DOKU_LF;
+
+ $nameAttribute = '';
+ $formatOpen = '';
+ $formatClose = '';
+ $backRefCaret = $this->renderBackRefCaret($singleReference);
+ }
+
+ if ($backRefFormat != 'none') {
+ $separator = $this->renderBackRefSeparator();
+
+ list($baseOpen, $baseClose) = $this->renderBackRefBase();
+ list($fontOpen, $fontClose) = $this->renderBackRefFont();
+
+ $html .= $baseOpen . $backRefCaret;
+
+ for ($r = 0; $r < $references; $r++) {
+ $referenceName = $reference[$r]->getAnchorName();
+
+ if ($r > 0) {
+ $html .= $separator . DOKU_LF;
+ }
+
+ $html .= $fontOpen;
+ $html .= '<a href="#' . $referenceName . '"' . $nameAttribute .' class="backref">';
+ $html .= $formatOpen . $this->renderBackRefId($reference[$r], $r, $singleReference) . $formatClose;
+ $html .= '</a>';
+ $html .= $fontClose;
+
+ $nameAttribute = '';
+ }
+
+ $html .= $baseClose . DOKU_LF;
+ }
+
+ return $html;
+ }
+
+ /**
+ *
+ */
+ protected function renderReferenceClass() {
+ switch ($this->getStyle('note-preview')) {
+ case 'tooltip':
+ $result = 'refnotes-ref note-tooltip';
+ break;
+
+ case 'none':
+ $result = 'refnotes-ref';
+ break;
+
+ default:
+ $result = 'refnotes-ref note-popup';
+ break;
+ }
+
+ return $result;
+ }
+
+ /**
+ *
+ */
+ protected function renderReferenceBase() {
+ return $this->renderBase($this->getStyle('reference-base'));
+ }
+
+ /**
+ *
+ */
+ protected function renderReferenceFont() {
+ return $this->renderFont('reference-font-weight', 'normal', 'reference-font-style');
+ }
+
+ /**
+ *
+ */
+ protected function renderReferenceFormat($reference) {
+ $result = $this->renderFormat($this->getStyle('reference-format'));
+
+ if ($this->getReferenceGrouping($reference)) {
+ switch ($reference->getAttribute('group')) {
+ case 'open':
+ $result = array($result[0], $this->renderReferenceGroupSeparator());
+ break;
+
+ case 'hold':
+ $result = array('', $this->renderReferenceGroupSeparator());
+ break;
+
+ case 'close':
+ $result = array('', $result[1]);
+ break;
+ }
+ }
+
+ return $result;
+ }
+
+ /**
+ *
+ */
+ protected function getReferenceGrouping($reference) {
+ $group = $reference->getAttribute('group');
+ return !empty($group) && in_array($group, array('open', 'hold', 'close')) &&
+ in_array($this->getStyle('reference-group'), array(',', 's'));
+ }
+
+ /**
+ *
+ */
+ protected function renderReferenceGroupSeparator() {
+ $style = $this->getStyle('reference-group');
+ switch ($style) {
+ case ',':
+ $result = ',';
+ break;
+
+ case 's':
+ $result = ';';
+ break;
+
+ default:
+ $result = '';
+ break;
+ }
+
+ return $result;
+ }
+
+ /**
+ *
+ */
+ protected function renderReferenceId($reference) {
+ $idStyle = $this->getStyle('refnote-id');
+ if ($idStyle == 'name') {
+ $html = $reference->getNote()->getName();
+ }
+ else {
+ switch ($this->getStyle('multi-ref-id')) {
+ case 'note':
+ $id = $reference->getNote()->getId();
+ break;
+
+ default:
+ $id = $reference->getId();
+ break;
+ }
+
+ $html = $this->convertToStyle($id, $idStyle);
+ }
+
+ return $html;
+ }
+
+ /**
+ *
+ */
+ protected function renderNoteClass() {
+ $result = 'note';
+
+ switch ($this->getStyle('note-font-size')) {
+ case 'small':
+ $result .= ' small';
+ break;
+ }
+
+ switch ($this->getStyle('note-text-align')) {
+ case 'left':
+ $result .= ' left';
+ break;
+
+ default:
+ $result .= ' justify';
+ break;
+ }
+
+ return $result;
+ }
+
+ /**
+ *
+ */
+ protected function renderNoteIdBase() {
+ return $this->renderBase($this->getStyle('note-id-base'));
+ }
+
+ /**
+ *
+ */
+ protected function renderNoteIdFont() {
+ return $this->renderFont('note-id-font-weight', 'normal', 'note-id-font-style');
+ }
+
+ /**
+ *
+ */
+ protected function renderNoteIdFormat() {
+ $style = $this->getStyle('note-id-format');
+ switch ($style) {
+ case '.':
+ $result = array('', '.');
+ break;
+
+ default:
+ $result = $this->renderFormat($style);
+ break;
+ }
+
+ return $result;
+ }
+
+ /**
+ *
+ */
+ protected function renderNoteId($note) {
+ $idStyle = $this->getStyle('refnote-id');
+ if ($idStyle == 'name') {
+ $html = $note->getName();
+ }
+ else {
+ $html = $this->convertToStyle($note->getId(), $idStyle);
+ }
+
+ return $html;
+ }
+
+ /**
+ *
+ */
+ protected function renderBackRefCaret($singleReference) {
+ switch ($this->getStyle('back-ref-caret')) {
+ case 'prefix':
+ $result = '^ ';
+ break;
+
+ case 'merge':
+ $result = $singleReference ? '' : '^ ';
+ break;
+
+ default:
+ $result = '';
+ break;
+ }
+
+ return $result;
+ }
+
+ /**
+ *
+ */
+ protected function renderBackRefBase() {
+ return $this->renderBase($this->getStyle('back-ref-base'));
+ }
+
+ /**
+ *
+ */
+ protected function renderBackRefFont() {
+ return $this->renderFont('back-ref-font-weight', 'bold', 'back-ref-font-style');
+ }
+
+ /**
+ *
+ */
+ protected function renderBackRefSeparator() {
+ static $html = array('' => ',', 'none' => '');
+
+ $style = $this->getStyle('back-ref-separator');
+ if (!array_key_exists($style, $html)) {
+ $style = '';
+ }
+
+ return $html[$style];
+ }
+
+ /**
+ *
+ */
+ protected function renderBackRefId($reference, $index, $singleReference) {
+ $style = $this->getStyle('back-ref-format');
+ switch ($style) {
+ case 'a':
+ $result = $this->convertToLatin($index + 1, $style);
+ break;
+
+ case '1':
+ $result = $index + 1;
+ break;
+
+ case 'caret':
+ $result = '^';
+ break;
+
+ case 'arrow':
+ $result = '&uarr;';
+ break;
+
+ default:
+ $result = $this->renderReferenceId($reference);
+ break;
+ }
+
+ if ($singleReference && ($this->getStyle('back-ref-caret') == 'merge')) {
+ $result = '^';
+ }
+
+ return $result;
+ }
+
+ /**
+ *
+ */
+ protected function renderBase($style) {
+ static $html = array(
+ '' => array('<sup>', '</sup>'),
+ 'text' => array('', '')
+ );
+
+ if (!array_key_exists($style, $html)) {
+ $style = '';
+ }
+
+ return $html[$style];
+ }
+
+ /**
+ *
+ */
+ protected function renderFont($weight, $defaultWeight, $style) {
+ list($weightOpen, $weightClose) = $this->renderFontWeight($this->getStyle($weight), $defaultWeight);
+ list($styleOpen, $styleClose) = $this->renderFontStyle($this->getStyle($style));
+
+ return array($weightOpen . $styleOpen, $styleClose . $weightClose);
+ }
+
+ /**
+ *
+ */
+ protected function renderFontWeight($style, $default) {
+ static $html = array(
+ 'normal' => array('', ''),
+ 'bold' => array('<b>', '</b>')
+ );
+
+ if (!array_key_exists($style, $html)) {
+ $style = $default;
+ }
+
+ return $html[$style];
+ }
+
+ /**
+ *
+ */
+ protected function renderFontStyle($style) {
+ static $html = array(
+ '' => array('', ''),
+ 'italic' => array('<i>', '</i>')
+ );
+
+ if (!array_key_exists($style, $html)) {
+ $style = '';
+ }
+
+ return $html[$style];
+ }
+
+ /**
+ *
+ */
+ protected function renderFormat($style) {
+ static $html = array(
+ '' => array('', ')'),
+ '()' => array('(', ')'),
+ ']' => array('', ']'),
+ '[]' => array('[', ']'),
+ 'none' => array('', '')
+ );
+
+ if (!array_key_exists($style, $html)) {
+ $style = '';
+ }
+
+ return $html[$style];
+ }
+
+ /**
+ *
+ */
+ protected function convertToStyle($id, $style) {
+ switch ($style) {
+ case 'a':
+ case 'A':
+ $result = $this->convertToLatin($id, $style);
+ break;
+
+ case 'i':
+ case 'I':
+ $result = $this->convertToRoman($id, $style);
+ break;
+
+ case '*':
+ $result = str_repeat('*', $id);
+ break;
+
+ default:
+ $result = $id;
+ break;
+ }
+
+ return $result;
+ }
+
+ /**
+ *
+ */
+ protected function convertToLatin($number, $case) {
+ static $alpha = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
+
+ $result = '';
+
+ while ($number > 0) {
+ --$number;
+ $digit = $number % 26;
+ $result = $alpha[$digit] . $result;
+ $number = intval($number / 26);
+ }
+
+ if ($case == 'a') {
+ $result = strtolower($result);
+ }
+
+ return $result;
+ }
+
+ /**
+ *
+ */
+ protected function convertToRoman($number, $case) {
+ static $lookup = array(
+ 'M' => 1000, 'CM' => 900, 'D' => 500, 'CD' => 400,
+ 'C' => 100, 'XC' => 90, 'L' => 50, 'XL' => 40,
+ 'X' => 10, 'IX' => 9, 'V' => 5, 'IV' => 4, 'I' => 1
+ );
+
+ $result = '';
+
+ foreach ($lookup as $roman => $value) {
+ $matches = intval($number / $value);
+
+ if ($matches > 0) {
+ $result .= str_repeat($roman, $matches);
+ $number = $number % $value;
+ }
+ }
+
+ if ($case == 'i') {
+ $result = strtolower($result);
+ }
+
+ return $result;
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+class refnotes_harvard_renderer extends refnotes_basic_renderer {
+
+ /**
+ * Constructor
+ */
+ public function __construct($namespace) {
+ parent::__construct($namespace);
+ }
+
+ /**
+ *
+ */
+ public function getReferenceSharedDataSet() {
+ static $key = array('ref-authors', 'ref-author', 'authors', 'author', 'published', 'month', 'year');
+
+ return $key;
+ }
+
+ /**
+ *
+ */
+ public function getReferencePrivateDataSet() {
+ static $key = array('direct', 'pages', 'page');
+
+ return $key;
+ }
+
+ /**
+ *
+ */
+ public function renderNoteText($note) {
+ $data = new refnotes_renderer_data($note->getData());
+
+ if (!$data->has('title')) {
+ return parent::renderNoteText($note);
+ }
+
+ // authors, published. //[[url|title.]]// edition. publisher, pages, isbn.
+ // authors, published. chapter In //[[url|title.]]// edition. publisher, pages, isbn.
+ // authors, published. [[url|title.]] //journal//, volume, publisher, pages, issn.
+ // authors, published. [[url|title.]] //booktitle//, publisher, pages, issn.
+
+ $title = $this->renderTitle($data);
+
+ // authors, published. //$title// edition. publisher, pages, isbn.
+ // authors, published. chapter In //$title// edition. publisher, pages, isbn.
+ // authors, published. $title //journal//, volume, publisher, pages, issn.
+ // authors, published. $title //booktitle//, publisher, pages, issn.
+
+ $authors = $this->renderAuthors($data);
+
+ // $authors? //$title// edition. publisher, pages, isbn.
+ // $authors? chapter In //$title// edition. publisher, pages, isbn.
+ // $authors? $title //journal//, volume, publisher, pages, issn.
+ // $authors? $title //booktitle//, publisher, pages, issn.
+
+ $publication = $this->renderPublication($data, $authors != '');
+
+ if ($data->has('journal')) {
+ // $authors? $title //journal//, volume, $publication?
+
+ $subtitle = $this->renderJournal($data);
+ }
+ elseif ($data->has('booktitle')) {
+ // $authors? $title //booktitle//, $publication?
+
+ $subtitle = $this->renderBookTitle($data);
+ }
+
+ if (!empty($subtitle)) {
+ // $authors? $title $subtitle?, $publication?
+
+ $text = $title . ' ' . $subtitle;
+
+ // $authors? $text, $publication?
+
+ $text .= ($publication != '') ? ',' : '.';
+ }
+ else {
+ // $authors? //$title// edition. $publication?
+ // $authors? chapter In //$title// edition. $publication?
+
+ $text = $this->renderBook($data, $title);
+ }
+
+ // $authors? $text $publication?
+
+ if ($authors != '') {
+ $text = $authors . ' ' . $text;
+ }
+
+ if ($publication != '') {
+ $text .= ' ' . $publication;
+ }
+
+ return $text;
+ }
+
+ /**
+ *
+ */
+ protected function renderTitle($data) {
+ $text = $data->get('title') . '.';
+
+ if ($url = $data->get('url')) {
+ $text = '[[' . $url . '|' . $text . ']]';
+ }
+
+ return $text;
+ }
+
+ /**
+ *
+ */
+ protected function renderAuthors($data) {
+ $text = $data->get('authors', 'author');
+
+ if ($text != '') {
+ if ($published = $this->renderPublished($data)) {
+ $text .= ', ' . $published;
+ }
+
+ $text .= '.';
+ }
+
+ return $text;
+ }
+
+ /**
+ *
+ */
+ protected function renderPublished($data, $useMonth = true) {
+ $text = $data->get('published');
+
+ if ($text == '') {
+ if ($text = $data->get('year')) {
+ if ($useMonth && $month = $data->get('month')) {
+ $text = $month . ' ' . $text;
+ }
+ }
+ }
+
+ return $text;
+ }
+
+ /**
+ *
+ */
+ protected function renderPublication($data, $authors) {
+ $part = array();
+
+ $address = $data->get('address');
+ $publisher = $data->get('publisher');
+
+ if ($address && $publisher) {
+ $part[] = $address . ': ' . $publisher;
+ }
+ else {
+ if ($address || $publisher) {
+ $part[] = $address . $publisher;
+ }
+ }
+
+ if (!$authors && ($published = $this->renderPublished($data))) {
+ $part[] = $published;
+ }
+
+ if ($pages = $this->renderPages($data, array('note-pages', 'note-page', 'pages', 'page'))) {
+ $part[] = $pages;
+ }
+
+ if ($isbn = $data->get('isbn')) {
+ $part[] = 'ISBN ' . $isbn;
+ }
+ elseif ($issn = $data->get('issn')) {
+ $part[] = 'ISSN ' . $issn;
+ }
+
+ $text = implode(', ', $part);
+
+ if ($text != '') {
+ $text = rtrim($text, '.') . '.';
+ }
+
+ return $text;
+ }
+
+ /**
+ *
+ */
+ protected function renderPages($data, $key) {
+ $text = '';
+
+ foreach ($key as $k) {
+ if ($text = $data->get($k)) {
+ if (preg_match("/^[0-9]/", $text)) {
+ $abbr_key = (substr($k, -1) == 's') ? 'txt_pages_abbr' : 'txt_page_abbr';
+ $text = refnotes_localization::getInstance()->getLang($abbr_key) . $text;
+ }
+ break;
+ }
+ }
+
+ return $text;
+ }
+
+ /**
+ *
+ */
+ protected function renderJournal($data) {
+ $text = '//' . $data->get('journal') . '//';
+
+ if ($volume = $data->get('volume')) {
+ $text .= ', ' . $volume;
+ }
+
+ return $text;
+ }
+
+ /**
+ *
+ */
+ protected function renderBook($data, $title) {
+ $text = '//' . $title . '//';
+
+ if ($chapter = $data->get('chapter')) {
+ $text = $chapter . '. ' . refnotes_localization::getInstance()->getLang('txt_in_cap') . ' ' . $text;
+ }
+
+ if ($edition = $data->get('edition')) {
+ $text .= ' ' . $edition . '.';
+ }
+
+ return $text;
+ }
+
+ /**
+ *
+ */
+ protected function renderBookTitle($data) {
+ return '//' . $data->get('booktitle') . '//';
+ }
+
+ /**
+ *
+ */
+ protected function renderReferenceId($reference) {
+ $data = new refnotes_renderer_data($reference->getData());
+
+ if (!$this->checkReferenceData($data)) {
+ return $this->renderBasicReferenceId($reference);
+ }
+
+ $authors = $data->get('ref-authors', 'ref-author', 'authors', 'author');
+ $html = $this->renderReferenceExtra($data);
+
+ list($formatOpen, $formatClose) = $this->renderReferenceParentheses();
+
+ if ($data->isPositive('direct')) {
+ $html = $authors . ' ' . $formatOpen . $html . $formatClose;
+
+ if ($this->getReferenceGrouping($reference)) {
+ switch ($reference->getAttribute('group')) {
+ case 'open':
+ case 'hold':
+ $html .= $this->renderReferenceGroupSeparator();
+ break;
+ }
+ }
+ }
+ else {
+ if ($this->getReferenceGrouping($reference)) {
+ switch ($reference->getAttribute('group')) {
+ case 'open':
+ $formatClose = $this->renderReferenceGroupSeparator();
+ break;
+
+ case 'hold':
+ $formatOpen = '';
+ $formatClose = $this->renderReferenceGroupSeparator();
+ break;
+
+ case 'close':
+ $formatOpen = '';
+ break;
+ }
+ }
+
+ $html = $formatOpen . $authors . ', ' . $html . $formatClose;
+ }
+
+ return htmlspecialchars($html);
+ }
+
+ /**
+ *
+ */
+ protected function renderBasicReferenceId($reference) {
+ list($formatOpen, $formatClose) = parent::renderReferenceFormat($reference);
+
+ return $formatOpen . parent::renderReferenceId($reference) . $formatClose;
+ }
+
+ /**
+ *
+ */
+ protected function renderReferenceExtra($data) {
+ $html = '';
+
+ if ($published = $this->renderPublished($data, false)) {
+ $html .= $published;
+ }
+
+ if ($pages = $this->renderPages($data, array('page', 'pages'))) {
+ if ($html != '') {
+ $html .= ', ';
+ }
+
+ $html .= $pages;
+ }
+
+ return $html;
+ }
+
+ /**
+ *
+ */
+ protected function renderReferenceParentheses() {
+ $style = $this->getStyle('reference-format');
+ $style = (($style == '[]') || ($style == ']')) ? '[]' : '()';
+
+ return $this->renderFormat($style);
+ }
+
+ /**
+ *
+ */
+ protected function renderReferenceFormat($reference) {
+ return array('', '');
+ }
+
+ /**
+ *
+ */
+ protected function checkReferenceData($data) {
+ $authors = $data->has('ref-authors', 'ref-author', 'authors', 'author');
+ $year = $data->has('published', 'year');
+ $page = $data->has('page', 'pages');
+
+ return $authors && ($year || $page);
+ }
+}
diff --git a/platform/www/lib/plugins/refnotes/scope.php b/platform/www/lib/plugins/refnotes/scope.php
new file mode 100644
index 0000000..b955635
--- /dev/null
+++ b/platform/www/lib/plugins/refnotes/scope.php
@@ -0,0 +1,190 @@
+<?php
+
+/**
+ * Plugin RefNotes: Scope
+ *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author Mykola Ostrovskyy <dwpforge@gmail.com>
+ */
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+class refnotes_scope_limits {
+ public $start;
+ public $end;
+
+ /**
+ * Constructor
+ */
+ public function __construct($start, $end = -1000) {
+ $this->start = $start;
+ $this->end = $end;
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+class refnotes_scope_mock {
+
+ /**
+ *
+ */
+ public function getLimits() {
+ return new refnotes_scope_limits(-1, -1);
+ }
+
+ /**
+ *
+ */
+ public function isOpen() {
+ return false;
+ }
+
+ /**
+ *
+ */
+ public function getRenderer() {
+ return new refnotes_renderer_mock();
+ }
+
+ /**
+ *
+ */
+ public function getReferenceId() {
+ return 0;
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+class refnotes_scope {
+
+ private $namespace;
+ private $id;
+ private $limits;
+ private $note;
+ private $notes;
+ private $references;
+
+ /**
+ * Constructor
+ */
+ public function __construct($namespace, $id, $start = -1, $end = -1000) {
+ $this->namespace = $namespace;
+ $this->id = $id;
+ $this->limits = new refnotes_scope_limits($start, $end);
+ $this->note = array();
+ $this->notes = 0;
+ $this->references = 0;
+ }
+
+ /**
+ *
+ */
+ public function getName() {
+ return $this->namespace->getName() . $this->id;
+ }
+
+ /**
+ *
+ */
+ public function getLimits() {
+ return $this->limits;
+ }
+
+ /**
+ *
+ */
+ public function isOpen() {
+ return $this->limits->end == -1000;
+ }
+
+ /**
+ *
+ */
+ public function getRenderer() {
+ return $this->namespace->getRenderer();
+ }
+
+ /**
+ *
+ */
+ public function getNoteId() {
+ return ++$this->notes;
+ }
+
+ /**
+ *
+ */
+ public function getReferenceId() {
+ return ++$this->references;
+ }
+
+ /**
+ *
+ */
+ public function addNote($note) {
+ $this->note[] = $note;
+ }
+
+ /**
+ *
+ */
+ public function rewriteReferences($limit) {
+ $block = new refnotes_note_block_iterator($this->note, $limit);
+
+ foreach ($block as $note) {
+ $note->rewriteReferences();
+ }
+ }
+
+ /**
+ *
+ */
+ public function renderNotes($mode, $limit) {
+ $minReferenceId = array();
+
+ foreach ($this->note as $note) {
+ $minReferenceId[] = $note->getMinReferenceId();
+ }
+
+ array_multisort($minReferenceId, $this->note);
+
+ $block = new refnotes_note_block_iterator($this->note, $limit);
+ $doc = '';
+
+ foreach ($block as $note) {
+ $doc .= $note->render($mode);
+ }
+
+ if ($mode == 'xhtml' && $doc != '') {
+ $open = $this->getRenderer()->renderNotesSeparator() . '<div class="notes">' . DOKU_LF;
+ $close = '</div>' . DOKU_LF;
+ $doc = $open . $doc . $close;
+ }
+
+ return $doc;
+ }
+
+ /**
+ * Finds a note given it's name or id
+ */
+ public function findNote($namespaceName, $noteName) {
+ $result = NULL;
+
+ if ($noteName != '') {
+ if (is_int($noteName)) {
+ $getter = 'getId';
+ }
+ else {
+ $getter = 'getName';
+ }
+
+ foreach ($this->note as $note) {
+ if (($note->getNamespaceName() == $namespaceName) && ($note->$getter() == $noteName)) {
+ $result = $note;
+ break;
+ }
+ }
+ }
+
+ return $result;
+ }
+}
diff --git a/platform/www/lib/plugins/refnotes/script.js b/platform/www/lib/plugins/refnotes/script.js
new file mode 100644
index 0000000..79e3482
--- /dev/null
+++ b/platform/www/lib/plugins/refnotes/script.js
@@ -0,0 +1,114 @@
+(function () {
+ let floater = null;
+ let tracking = false;
+ let timer = null;
+
+ function createFloater() {
+ return jQuery('<div id="insitu__fn" />')
+ .addClass('insitu-footnote JSpopup')
+ .css({ visibility : 'hidden', left : '0px', top : '0px' })
+ .mouseleave(function () { jQuery(this).hide(); })
+ .appendTo('.dokuwiki:first');
+ }
+
+ function getFloater() {
+ if (!floater) {
+ floater = jQuery('#insitu__fn');
+ if (floater.length == 0) {
+ floater = createFloater();
+ }
+ }
+
+ return floater;
+ }
+
+ let preview = {
+ setNoteId(id) {
+ // locate the note span element
+ let note = jQuery('#' + id.replace(/:/g, '\\:') + '\\:text');
+ if (note.length == 0) {
+ return false;
+ }
+
+ // remove any element ids from the content to ensure that they remain unique
+ // and display hidden tooltip so we can move it around
+ getFloater()
+ .html(note.html().replace(/\bid\s*=\s*".*?"/gi, ''))
+ .css('visibility', 'hidden')
+ .show();
+
+ return true;
+ },
+
+ show() {
+ getFloater()
+ .css('visibility', 'visible')
+ .show();
+ },
+
+ hide() {
+ // prevent creation of the floater and re-hiding it on window.scroll()
+ if (floater && floater.is(':visible')) {
+ floater.hide();
+ }
+ },
+
+ move(event, dx, dy) {
+ getFloater().position({
+ my : 'left top',
+ of : event,
+ offset : dx + ' ' + dy,
+ collision : 'flip'
+ });
+ }
+ };
+
+ function getNoteId(event) {
+ return event.target.href.replace(/^.*?#([\w:]+)$/gi, '$1');
+ }
+
+ plugin_refnotes = {
+ popup : {
+ show(event) {
+ plugin_refnotes.tooltip.hide(event);
+ if (preview.setNoteId(getNoteId(event))) {
+ preview.move(event, 2, 2);
+ preview.show();
+ }
+ }
+ },
+
+ tooltip : {
+ show(event) {
+ plugin_refnotes.tooltip.hide(event);
+ if (preview.setNoteId(getNoteId(event))) {
+ timer = setTimeout(function () { preview.show(); }, 500);
+ tracking = true;
+ }
+ },
+
+ hide(event) {
+ if (tracking) {
+ clearTimeout(timer);
+ tracking = false;
+ }
+ preview.hide();
+ },
+
+ track(event) {
+ if (tracking) {
+ preview.move(event, 10, 12);
+ }
+ }
+ }
+ };
+})();
+
+jQuery(function () {
+ jQuery('a.refnotes-ref.note-popup').mouseenter(plugin_refnotes.popup.show);
+ jQuery('a.refnotes-ref.note-tooltip')
+ .mouseenter(plugin_refnotes.tooltip.show)
+ .mouseleave(plugin_refnotes.tooltip.hide);
+ jQuery(document).mousemove(plugin_refnotes.tooltip.track);
+ jQuery(window).scroll(plugin_refnotes.tooltip.hide);
+});
diff --git a/platform/www/lib/plugins/refnotes/style.css b/platform/www/lib/plugins/refnotes/style.css
new file mode 100644
index 0000000..1aba434
--- /dev/null
+++ b/platform/www/lib/plugins/refnotes/style.css
@@ -0,0 +1,48 @@
+div.dokuwiki a.refnotes-ref {
+}
+
+div.dokuwiki div.refnotes {
+ clear: both;
+ margin: 0 0 1em 0;
+}
+
+div.dokuwiki div.refnotes hr {
+ text-align: left;
+ margin-bottom: 0.2em;
+}
+
+div.dokuwiki div.refnotes div.notes {
+ padding-left: 1em;
+ margin-bottom: 1em;
+}
+
+div.dokuwiki div.refnotes div.note {
+ font-size: 90%;
+}
+
+div.dokuwiki div.refnotes div.note.small {
+ font-size: 70%;
+}
+
+div.dokuwiki div.refnotes div.note.justify {
+ text-align: justify;
+}
+
+div.dokuwiki div.refnotes div.note.left {
+ text-align: left;
+}
+
+div.dokuwiki div.refnotes a.nolink {
+}
+
+div.dokuwiki div.refnotes a.backref {
+}
+
+/* HACK: Fix compatibility problem with Sidebar plugin (issue 6) */
+.sidebar_inside_left div.insitu-footnote,
+.sidebar_inside_right div.insitu-footnote,
+.sidebar_outside_left div.insitu-footnote,
+.sidebar_outside_right div.insitu-footnote {
+ background: __background_other__;
+ padding: 4px;
+}
diff --git a/platform/www/lib/plugins/refnotes/syntax/notes.php b/platform/www/lib/plugins/refnotes/syntax/notes.php
new file mode 100644
index 0000000..32263ac
--- /dev/null
+++ b/platform/www/lib/plugins/refnotes/syntax/notes.php
@@ -0,0 +1,221 @@
+<?php
+
+/**
+ * Plugin RefNotes: Note renderer
+ *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author Mykola Ostrovskyy <dwpforge@gmail.com>
+ */
+
+require_once(DOKU_PLUGIN . 'refnotes/core.php');
+
+class syntax_plugin_refnotes_notes extends DokuWiki_Syntax_Plugin {
+
+ private $mode;
+
+ /**
+ * Constructor
+ */
+ public function __construct() {
+ $this->mode = substr(get_class($this), 7);
+ }
+
+ /**
+ * What kind of syntax are we?
+ */
+ public function getType() {
+ return 'substition';
+ }
+
+ public function getPType() {
+ return 'block';
+ }
+
+ /**
+ * Where to sort in?
+ */
+ public function getSort() {
+ return 150;
+ }
+
+ public function connectTo($mode) {
+ $this->Lexer->addSpecialPattern('~~REFNOTES.*?~~', $mode, $this->mode);
+ $this->Lexer->addSpecialPattern('<refnotes[^>]*?\/>', $mode, $this->mode);
+ $this->Lexer->addSpecialPattern('<refnotes(?:[^>]*?[^/>])?>.*?<\/refnotes>', $mode, $this->mode);
+ }
+
+ /**
+ * Handle the match
+ */
+ public function handle($match, $state, $pos, Doku_Handler $handler) {
+ switch ($match[0]) {
+ case '~':
+ return $this->handleBasic($match);
+
+ case '<':
+ return $this->handleExtended($match);
+ }
+
+ return false;
+ }
+
+ /**
+ * Create output
+ */
+ public function render($mode, Doku_Renderer $renderer, $data) {
+ try {
+ if($mode == 'xhtml') {
+ switch ($data[0]) {
+ case 'style':
+ refnotes_renderer_core::getInstance()->styleNamespace($data[1]['ns'], $data[2]);
+ break;
+
+ case 'map':
+ refnotes_renderer_core::getInstance()->setNamespaceMapping($data[1]['ns'], $data[2]);
+ break;
+
+ case 'render':
+ $this->renderNotes($mode, $renderer, $data[1]);
+ break;
+ }
+
+ return true;
+ }
+ elseif ($mode == 'odt') {
+ switch ($data[0]) {
+ case 'render':
+ $this->renderNotes($mode, $renderer, $data[1]);
+ break;
+ }
+
+ return true;
+ }
+ }
+ catch (Exception $error) {
+ msg($error->getMessage(), -1);
+ }
+
+ return false;
+ }
+
+ /**
+ *
+ */
+ private function handleBasic($syntax) {
+ preg_match('/~~REFNOTES(.*?)~~/', $syntax, $match);
+
+ return array('render', $this->parseAttributes($match[1]));
+ }
+
+ /**
+ *
+ */
+ private function handleExtended($syntax) {
+ preg_match('/<refnotes(.*?)(?:\/>|>(.*?)<\/refnotes>)/s', $syntax, $match);
+ $attribute = $this->parseAttributes($match[1]);
+ $style = array();
+
+ if ($match[2] != '') {
+ $style = $this->parseStyles($match[2]);
+ }
+
+ if (count($style) > 0) {
+ return array('split', $attribute, $style);
+ }
+ else {
+ return array('render', $attribute);
+ }
+ }
+
+ /**
+ *
+ */
+ private function parseAttributes($syntax) {
+ $propertyMatch = array(
+ 'ns' => '/^' . refnotes_namespace::getNamePattern('required') . '$/',
+ 'limit' => '/^\/?\d+$/'
+ );
+
+ $attribute = array();
+ $token = preg_split('/\s+/', $syntax, -1, PREG_SPLIT_NO_EMPTY);
+ foreach ($token as $t) {
+ foreach ($propertyMatch as $name => $pattern) {
+ if (preg_match($pattern, $t) == 1) {
+ $attribute[$name][] = $t;
+ break;
+ }
+ }
+ }
+
+ if (array_key_exists('ns', $attribute)) {
+ /* Ensure that namespaces are in canonic form */
+ $attribute['ns'] = array_map('refnotes_namespace::canonizeName', $attribute['ns']);
+
+ if (count($attribute['ns']) > 1) {
+ $attribute['map'] = array_slice($attribute['ns'], 1);
+ }
+
+ $attribute['ns'] = $attribute['ns'][0];
+ }
+ else {
+ $attribute['ns'] = ':';
+ }
+
+ if (array_key_exists('limit', $attribute)) {
+ $attribute['limit'] = end($attribute['limit']);
+ }
+
+ return $attribute;
+ }
+
+ /**
+ *
+ */
+ private function parseStyles($syntax) {
+ $style = array();
+ preg_match_all('/([-\w]+)\s*:[ \t]*([^\s\n;].*?)[ \t]*?(?:[\n;]|$)/', $syntax, $match, PREG_SET_ORDER);
+ foreach ($match as $m) {
+ $style[$m[1]] = $m[2];
+ }
+
+ /* Validate direct-to-html styles */
+ if (array_key_exists('notes-separator', $style)) {
+ if (preg_match('/(?:\d+\.?|\d*\.\d+)(?:%|em|px)|none/', $style['notes-separator'], $match) == 1) {
+ $style['notes-separator'] = $match[0];
+ }
+ else {
+ $style['notes-separator'] = '';
+ }
+ }
+
+ /* Ensure that namespaces are in canonic form */
+ if (array_key_exists('inherit', $style)) {
+ $style['inherit'] = refnotes_namespace::canonizeName($style['inherit']);
+ }
+
+ return $style;
+ }
+
+ /**
+ *
+ */
+ private function renderNotes($mode, $renderer, $attribute) {
+ $limit = array_key_exists('limit', $attribute) ? $attribute['limit'] : '';
+ $doc = refnotes_renderer_core::getInstance()->renderNotes($mode, $attribute['ns'], $limit);
+
+ if ($doc != '') {
+ if ($mode == 'xhtml') {
+ $open = '<div class="refnotes">' . DOKU_LF;
+ $close = '</div>' . DOKU_LF;
+ }
+ else {
+ $open = '';
+ $close = '';
+ }
+
+ $renderer->doc .= $open;
+ $renderer->doc .= $doc;
+ $renderer->doc .= $close;
+ }
+ }
+}
diff --git a/platform/www/lib/plugins/refnotes/syntax/references.php b/platform/www/lib/plugins/refnotes/syntax/references.php
new file mode 100644
index 0000000..d4f8931
--- /dev/null
+++ b/platform/www/lib/plugins/refnotes/syntax/references.php
@@ -0,0 +1,348 @@
+<?php
+
+/**
+ * Plugin RefNotes: Reference collector/renderer
+ *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author Mykola Ostrovskyy <dwpforge@gmail.com>
+ */
+
+require_once(DOKU_PLUGIN . 'refnotes/core.php');
+require_once(DOKU_PLUGIN . 'refnotes/bibtex.php');
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+class syntax_plugin_refnotes_references extends DokuWiki_Syntax_Plugin {
+ use refnotes_localization_plugin;
+
+ private $mode;
+ private $entryPattern;
+ private $exitPattern;
+ private $handlePattern;
+ private $noteCapture;
+
+ /**
+ * Constructor
+ */
+ public function __construct() {
+ refnotes_localization::initialize($this);
+
+ $this->mode = substr(get_class($this), 7);
+ $this->noteCapture = new refnotes_note_capture();
+
+ $this->initializePatterns();
+ }
+
+ /**
+ *
+ */
+ private function initializePatterns() {
+ /* Introduces changes to achive the format. Yet not perfect but similar to Pandoc (https://pandoc.org/MANUAL.html#footnotes):
+
+ This is the text[^n01].
+
+ [^n01:] this is the note.]
+
+ */
+ if (refnotes_configuration::getSetting('replace-footnotes')) {
+ $entry = '(?:\(\(|\[\()';
+ $exit = '(?:\)\)|\)\])';
+ $id = '@@FNT\d+|#\d+';
+ }
+ else {
+ $entry = '\[\^';
+ $exit = '\]';
+ $exit2 = '\.';
+ $id = '#\d+';
+ }
+
+ $strictName = refnotes_note::getNamePattern('strict');
+ $extendedName = refnotes_note::getNamePattern('extended');
+ $namespace = refnotes_namespace::getNamePattern('optional');
+
+ $text = '.*?';
+
+ $strictName = '(?:' . $id . '|' . $strictName . ')';
+ $fullName = '\s*(?:' . $namespace . $strictName . '|:' . $namespace . $extendedName . ')\s*';
+ $lookaheadExit = '(?=' . $exit . ')';
+ $nameEntry = $fullName . $lookaheadExit;
+
+ $extendedName = '(?:' . $id . '|' . $extendedName . ')';
+ $optionalFullName = $extendedName . '?';
+ $structuredEntry = '\s*' . $optionalFullName . '\s*>>' . $text . $lookaheadExit;
+
+ $define = '\s*' . $optionalFullName . '\s*:]\s*';
+ $optionalDefine = '(?:' . $define . ')?';
+ $lookaheadExit = '(?=' . $text . $exit . ')';
+ $defineEntry = $optionalDefine . $lookaheadExit;
+
+ $this->entryPattern = $entry . '(?:' . $nameEntry . '|' . $structuredEntry . '|' . $defineEntry . ')';
+ $this->exitPattern = $exit;
+ $this->handlePattern = '/' . $entry . '\s*(' . $optionalFullName . ')\s*(?:>>(.*))?(.*)/s';
+ }
+
+
+ /**
+ * What kind of syntax are we?
+ */
+ public function getType() {
+ return 'formatting';
+ }
+
+ /**
+ * What modes are allowed within our mode?
+ */
+ public function getAllowedTypes() {
+ return array (
+ 'formatting',
+ 'substition',
+ 'protected',
+ 'disabled'
+ );
+ }
+
+ /**
+ * Where to sort in?
+ */
+ public function getSort() {
+ return 145;
+ }
+
+ public function connectTo($mode) {
+ refnotes_parser_core::getInstance()->registerLexer($this->Lexer);
+
+ $this->Lexer->addEntryPattern($this->entryPattern, $mode, $this->mode);
+ }
+
+ public function postConnect() {
+ $this->Lexer->addExitPattern($this->exitPattern, $this->mode);
+ }
+
+ /**
+ * Handle the match
+ */
+ public function handle($match, $state, $pos, Doku_Handler $handler) {
+ $result = refnotes_parser_core::getInstance()->canHandle($state);
+
+ if ($result) {
+ switch ($state) {
+ case DOKU_LEXER_ENTER:
+ $result = $this->handleEnter($match);
+ break;
+
+ case DOKU_LEXER_EXIT:
+ $result = $this->handleExit();
+ break;
+ }
+ }
+
+ if ($result === false) {
+ $handler->addCall('cdata', array($match), $pos);
+ }
+
+ return $result;
+ }
+
+ /**
+ * Create output
+ */
+ public function render($mode, Doku_Renderer $renderer, $data) {
+ $result = false;
+
+ try {
+ switch ($mode) {
+ case 'xhtml':
+ case 'odt':
+ $result = $this->renderReferences($mode, $renderer, $data);
+ break;
+
+ case 'metadata':
+ $result = $this->renderMetadata($renderer, $data);
+ break;
+ }
+ }
+ catch (Exception $error) {
+ msg($error->getMessage(), -1);
+ }
+
+ return $result;
+ }
+
+ /**
+ *
+ */
+ private function handleEnter($syntax) {
+ if (preg_match($this->handlePattern, $syntax, $match) == 0) {
+ return false;
+ }
+
+ refnotes_parser_core::getInstance()->enterReference($match[1], $match[2]);
+
+ return array('start');
+ }
+
+ /**
+ *
+ */
+ private function handleExit() {
+ $reference = refnotes_parser_core::getInstance()->exitReference();
+
+ if ($reference->hasData()) {
+ return array('render', $reference->getAttributes(), $reference->getData());
+ }
+ else {
+ return array('render', $reference->getAttributes());
+ }
+ }
+
+ /**
+ *
+ */
+ public function renderReferences($mode, $renderer, $data) {
+ switch ($data[0]) {
+ case 'start':
+ $this->noteCapture->start($renderer);
+ break;
+
+ case 'render':
+ $this->renderReference($mode, $renderer, $data[1], (count($data) > 2) ? $data[2] : array());
+ break;
+ }
+
+ return true;
+ }
+
+ /**
+ * Stops renderer output capture and renders the reference link
+ */
+ private function renderReference($mode, $renderer, $attributes, $data) {
+ $reference = refnotes_renderer_core::getInstance()->addReference($attributes, $data);
+ $text = $this->noteCapture->stop();
+
+ if ($text != '') {
+ $reference->getNote()->setText($text);
+ }
+
+ $renderer->doc .= $reference->render($mode);
+ }
+
+ /**
+ *
+ */
+ public function renderMetadata($renderer, $data) {
+ if ($data[0] == 'render') {
+ $source = '';
+
+ if (array_key_exists('source', $data[1])) {
+ $source = $data[1]['source'];
+ }
+
+ if (($source != '') && ($source != '{configuration}')) {
+ $renderer->meta['plugin']['refnotes']['dbref'][wikiFN($source)] = true;
+ }
+ }
+
+ return true;
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+class refnotes_note_capture {
+
+ private $renderer;
+ private $note;
+ private $doc;
+
+ /**
+ * Constructor
+ */
+ public function __construct() {
+ $this->initialize();
+ }
+
+ /**
+ *
+ */
+ private function initialize() {
+ $this->renderer = NULL;
+ $this->doc = '';
+ }
+
+ /**
+ *
+ */
+ private function resetCapture() {
+ $this->renderer->doc = '';
+ }
+
+ /**
+ *
+ */
+ public function start($renderer) {
+ $this->renderer = $renderer;
+ $this->doc = $renderer->doc;
+
+ $this->resetCapture();
+ }
+
+ /**
+ *
+ */
+ public function restart() {
+ $text = trim($this->renderer->doc);
+
+ $this->resetCapture();
+
+ return $text;
+ }
+
+ /**
+ *
+ */
+ public function stop() {
+ $text = trim($this->renderer->doc);
+
+ $this->renderer->doc = $this->doc;
+
+ $this->initialize();
+
+ return $text;
+ }
+}
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+class refnotes_nested_call_writer extends \dokuwiki\Parsing\Handler\Nest {
+
+ private $handler;
+ private $callWriterBackup;
+
+ /**
+ * Constructor
+ *
+ * HACK: Fix compatibility with PHP versions before 7.2 by passing handler as second optional
+ * argument. This makes constructor signature compatible with one defined in ReWriterInterface.
+ * Starting from PHP 7.2 this is not needed because arguments without type hint are compatible
+ * with any type since they have a wider type (any type).
+ * https://wiki.php.net/rfc/parameter-no-type-variance
+ */
+ public function __construct(\dokuwiki\Parsing\Handler\CallWriterInterface $callWriter, $handler = NULL) {
+ $this->handler = $handler;
+
+ parent::__construct($this->handler->getCallWriter());
+ }
+
+ /**
+ *
+ */
+ public function connect() {
+ $this->callWriterBackup = $this->handler->getCallWriter();
+
+ $this->handler->setCallWriter($this);
+ }
+
+ /**
+ *
+ */
+ public function disconnect() {
+ $this->handler->setCallWriter($this->callWriterBackup);
+ }
+}
diff --git a/platform/www/lib/tpl/acervus/css/basic.less b/platform/www/lib/tpl/acervus/css/basic.less
index 9bce960..2497249 100644
--- a/platform/www/lib/tpl/acervus/css/basic.less
+++ b/platform/www/lib/tpl/acervus/css/basic.less
@@ -262,7 +262,7 @@ samp,
kbd {
font-family: Consolas, "Andale Mono WT", "Andale Mono", "Bitstream Vera Sans Mono", "Nimbus Mono L", Monaco, "Courier New", monospace;
/* same font stack should be used for ".dokuwiki table.diff td" in _diff.css */
- font-size: 1em;
+ font-size: 10pt;
padding: 0 4px;
border: 1px solid @ini_border;
direction: ltr;
diff --git a/platform/www/lib/tpl/acervus/css/hacks.css b/platform/www/lib/tpl/acervus/css/hacks.css
index 3349974..9abdcdf 100644
--- a/platform/www/lib/tpl/acervus/css/hacks.css
+++ b/platform/www/lib/tpl/acervus/css/hacks.css
@@ -185,3 +185,29 @@ text-decoration:none !important;
content: counter(level1) "." counter(level2) "." counter(level3) "." counter(level4) "." counter(level5) ". ";
counter-increment: level5;
}
+
+.date {
+ float: right;
+ text-align: center;
+ margin: 1.5em;
+}
+
+.date .date-dm {
+ font-size: 19pt;
+}
+
+.date .date-y {
+ font-size: 14pt;
+ line-height: 5pt;
+}
+
+.date-frontpage {
+ margin: 0.3em;
+ opacity: 0.7;
+}
+
+.bloglist h2::before,
+.bloglist h3::before {
+ display: none !important;
+
+}
diff --git a/platform/www/lib/tpl/acervus/images/apple-touch-icon.png b/platform/www/lib/tpl/acervus/images/apple-touch-icon.png
index 73d2601..fe6efba 100644
--- a/platform/www/lib/tpl/acervus/images/apple-touch-icon.png
+++ b/platform/www/lib/tpl/acervus/images/apple-touch-icon.png
Binary files differ
diff --git a/platform/www/lib/tpl/acervus/images/favicon.ico b/platform/www/lib/tpl/acervus/images/favicon.ico
index ecbf22f..6e4ee53 100644
--- a/platform/www/lib/tpl/acervus/images/favicon.ico
+++ b/platform/www/lib/tpl/acervus/images/favicon.ico
Binary files differ
diff --git a/platform/www/lib/tpl/acervus/images/logo.png b/platform/www/lib/tpl/acervus/images/logo.png
new file mode 100644
index 0000000..24b0f48
--- /dev/null
+++ b/platform/www/lib/tpl/acervus/images/logo.png
Binary files differ
diff --git a/platform/www/lib/tpl/acervus/main.php b/platform/www/lib/tpl/acervus/main.php
index 27f35b2..20f48ab 100644
--- a/platform/www/lib/tpl/acervus/main.php
+++ b/platform/www/lib/tpl/acervus/main.php
@@ -144,6 +144,7 @@ if ($lang2 != '') {
<div class="wrapper group">
<!-- ********** CONTENT ********** -->
+
<div id="dokuwiki__content"><div class="group">
<?php tpl_flush() ?>
<?php tpl_includeFile('pageheader.html') ?>
@@ -179,6 +180,17 @@ if ($lang2 != '') {
}
+ // $id = $INFO['meta']['id'];
+ // echo 'algooo';
+ // print_r(pageinfo('id'));
+ $ns = $INFO['namespace'];
+ $creation_date = $INFO['meta']['date']['created'];
+ if (strpos($ns, 'blog') !== false) {
+ $d = strftime("%d", $creation_date);
+ $m = strftime("%m", $creation_date);
+ $y = strftime("%Y", $creation_date);
+ echo "<div class='date'><div class='date-dm'>$d/$m</div><div class='date-y'>$y</div></div>";
+ }
?>
@@ -210,7 +222,6 @@ if ($lang2 != '') {
if ($translation) echo $translation->showTranslations();
?></center>
</div><!-- /footer -->
-
<?php tpl_includeFile('footer.html') ?>
</div><!-- /wrapper -->
@@ -226,9 +237,7 @@ function getAnchor() {
}
if (document.URL.toLowerCase().indexOf("index") === -1) { // not show on index
- if (document.URL.includes(':en') ||
- document.URL.includes(':es') ||
- document.URL.includes(':fr') ||
+ if (document.URL.includes(':book') ||
document.URL.includes(':script') ||
document.URL.includes(':article')
) { // only shows number of paragraph in books, articles and scripts pages