Also support "last X" REST interface
This commit is contained in:
bundled-libs
.current_versioncreate_release.sh
comment.phpCache
HTTP
Net
Onyx
PEAR.phpSmarty
BUGSCOPYING.libChangeLogFAQINSTALLNEWSREADMERELEASE_NOTES
libs
Config_File.class.phpSmarty.class.phpSmarty_Compiler.class.phpdebug.tpl
internals
core.assemble_plugin_filepath.phpcore.assign_smarty_interface.phpcore.create_dir_structure.phpcore.display_debug_console.phpcore.get_include_path.phpcore.get_microtime.phpcore.get_php_resource.phpcore.is_secure.phpcore.is_trusted.phpcore.load_plugins.phpcore.load_resource_plugin.phpcore.process_cached_inserts.phpcore.process_compiled_include.phpcore.read_cache_file.phpcore.rm_auto.phpcore.rmdir.phpcore.run_insert_handler.phpcore.smarty_include_php.phpcore.write_cache_file.phpcore.write_compiled_include.phpcore.write_compiled_resource.phpcore.write_file.php
plugins
block.textformat.phpcompiler.assign.phpfunction.assign_debug_info.phpfunction.config_load.phpfunction.counter.phpfunction.cycle.phpfunction.debug.phpfunction.eval.phpfunction.fetch.phpfunction.html_checkboxes.phpfunction.html_image.phpfunction.html_options.phpfunction.html_radios.phpfunction.html_select_date.phpfunction.html_select_time.phpfunction.html_table.phpfunction.mailto.phpfunction.math.phpfunction.popup.phpfunction.popup_init.phpmodifier.capitalize.phpmodifier.cat.phpmodifier.count_characters.phpmodifier.count_paragraphs.phpmodifier.count_sentences.phpmodifier.count_words.phpmodifier.date_format.phpmodifier.debug_print_var.phpmodifier.default.phpmodifier.escape.phpmodifier.indent.phpmodifier.lower.phpmodifier.nl2br.phpmodifier.regex_replace.phpmodifier.replace.phpmodifier.spacify.phpmodifier.string_format.phpmodifier.strip.phpmodifier.strip_tags.phpmodifier.truncate.phpmodifier.upper.phpmodifier.wordwrap.phpoutputfilter.trimwhitespace.phpshared.escape_special_chars.phpshared.make_timestamp.php
Text
BUNDLE_NOTICEWiki.php
Wiki
Parse.phpRender.php
Parse
Default
Anchor.phpBlockquote.phpBold.phpBreak.phpCenter.phpCode.phpColortext.phpDeflist.phpDelimiter.phpEmbed.phpEmphasis.phpFreelink.phpFunction.phpHeading.phpHoriz.phpHtml.phpImage.phpInclude.phpInterwiki.phpItalic.phpList.phpNewline.phpParagraph.phpPhplookup.phpPrefilter.phpRaw.phpRevise.phpStrong.phpSuperscript.phpTable.phpTighten.phpToc.phpTt.phpUrl.phpWikilink.php
Render
Latex.php
Rule.phpLatex
Anchor.phpBlockquote.phpBold.phpBreak.phpCenter.phpCode.phpColortext.phpDeflist.phpDelimiter.phpEmbed.phpEmphasis.phpFreelink.phpFunction.phpHeading.phpHoriz.phpHtml.phpImage.phpInclude.phpInterwiki.phpItalic.phpList.phpNewline.phpParagraph.phpPhplookup.phpPrefilter.phpRaw.phpRevise.phpStrong.phpSuperscript.phpTable.phpTighten.phpToc.phpTt.phpUrl.phpWikilink.php
Plain.phpPlain
Anchor.phpBlockquote.phpBold.phpBreak.phpCenter.phpCode.phpColortext.phpDeflist.phpDelimiter.phpEmbed.phpEmphasis.phpFreelink.phpFunction.phpHeading.phpHoriz.phpHtml.phpImage.phpInclude.phpInterwiki.phpItalic.phpList.phpNewline.phpParagraph.phpPhplookup.phpPrefilter.phpRaw.phpRevise.phpStrong.phpSuperscript.phpTable.phpTighten.phpToc.phpTt.phpUrl.phpWikilink.php
Xhtml.phpXhtml
Anchor.phpBlockquote.phpBold.phpBreak.phpCenter.phpCode.phpColortext.phpDeflist.phpDelimiter.phpEmbed.phpEmphasis.phpFreelink.phpFunction.phpHeading.phpHoriz.phpHtml.phpImage.phpInclude.phpInterwiki.phpItalic.phpList.phpNewline.phpParagraph.phpPhplookup.phpPrefilter.phpRaw.phpRevise.phpStrong.phpSuperscript.phpTable.phpTighten.phpToc.phpTt.phpUrl.phpWikilink.php
Rule
blockquote.phpbold.phpbreak.phpcenter.phpcode.phpcolortext.phpdeflist.phpdelimiter.phpembed.phpemphasis.phpentities.phpfreelink.phpheading.phphoriz.phphtml.phpimage.phpinclude.phpinterwiki.phpitalic.phplist.phpnewline.phpparagraph.phpphpcode.phpphplookup.phpprefilter.phpraw.phprevise.phpstrong.phpsuperscript.phptable.phptighten.phptoc.phptt.phpurl.phpwikilink.php
XML
YahooUI
treeview
docs
HomePage.wiki.txtSamplePage.wiki.txtSmashWordsTogether.wiki.txtTextWikiProposal.wiki.txtTokenRuleKeys.wiki.txtWikiPage.wiki.txtWordsSmashedTogether.wiki.txtfree links.wiki.txtindex.phpstylesheet.css
dragdrop.jsimgedit.jstests
deployment
archives
comment.phpexit.phpindex.phprss.phpserendipity.css.phpserendipity_admin.phpserendipity_admin_image_selector.phpserendipity_config.inc.phpserendipity_define.js.phpserendipity_editor.jsserendipity_xmlrpc.phptemplates_c
uploads
wfwcomment.phpdocs
exit.phphtmlarea
ChangeLogdialog.jspopupdiv.js
examples
2-areas.htmlcontext-menu.htmlcore.htmlcss.htmlcustom.cssfull-page.htmlfully-loaded.htmlindex.htmlspell-checker.htmltable-operations.html
htmlarea.csshtmlarea.jsimages
ed_about.gifed_align_center.gifed_align_justify.gifed_align_left.gifed_align_right.gifed_blank.gifed_charmap.gifed_color_bg.gifed_color_fg.gifed_copy.gifed_custom.gifed_cut.gifed_delete.gifed_format_bold.gifed_format_italic.gifed_format_strike.gifed_format_sub.gifed_format_sup.gifed_format_underline.gifed_help.gifed_hr.gifed_html.gifed_image.gifed_indent_less.gifed_indent_more.gifed_killword.gifed_left_to_right.gifed_link.gifed_list_bullet.gifed_list_num.gifed_paste.gifed_print.gifed_redo.gifed_right_to_left.gifed_rmformat.gifed_s9yimage.gifed_save.gifed_save.pnged_show_border.gifed_splitcel.gifed_undo.giffullscreen_maximize.giffullscreen_minimize.gifinsert_table.gif
index.htmllang
b5.jsch.jscs-iso.jscs-utf.jscs-win.jscz.jsda-utf.jsda.jsde-utf.jsde.jsee.jsel.jsen.jses-utf.jses.jsfi.jsfr-utf.jsfr.jsgb.jshe.jshu.jsit-utf.jsit.jsja-euc.jsja-jis.jsja-sjis.jsja-utf8.jslt.jslv.jsnb.jsnl-utf.jsnl.jsno-utf.jsno.jspl.jspt_br.jspt_pt-utf.jspt_pt.jsro.jsru.jsse-utf.jsse.jssi.jsvn.js
license.txtplugins
CSS
ContextMenu
FullPage
TableOperations
popups
about.htmlblank.htmlcustom2.htmleditor_help.htmlfullscreen.htmlinsert_image.htmlinsert_table.htmllink.htmlold-fullscreen.htmlold_insert_image.htmlpopup.jsselect_color.html
popupwin.jsreference.htmlrelease-notes.htmlinclude
admin
category.inc.phpcomments.inc.phpconfiguration.inc.phpentries.inc.phpentries_overview.inc.phpexport.inc.phpgroups.inc.phpimages.inc.phpimport.inc.php
compat.inc.phpimporters
b2evolution.inc.phpbblog.inc.phpblogger.inc.phpbmachine.inc.phpgeeklog.inc.phpgeneric.inc.phplivejournal.inc.phpmovabletype.inc.phpnucleus.inc.phpphpbb.inc.phppivot.inc.phppmachine.inc.phpsunlog.inc.phptextpattern.inc.phpvoodoopad.inc.phpwordpress-pg.inc.phpwordpress.inc.php
installer.inc.phpoverview.inc.phppersonal.inc.phpplugins.inc.phptemplates.inc.phpupgrader.inc.phpusers.inc.phpdb
functions.inc.phpfunctions_calendars.inc.phpfunctions_comments.inc.phpfunctions_config.inc.phpfunctions_entries.inc.phpfunctions_entries_admin.inc.phpfunctions_images.inc.phpfunctions_images_crop.inc.phpfunctions_installer.inc.phpfunctions_permalinks.inc.phpfunctions_plugins_admin.inc.phpfunctions_rss.inc.phpfunctions_smarty.inc.phpfunctions_trackbacks.inc.phpfunctions_upgrader.inc.phpgenpage.inc.phplang.inc.phpplugin_api.inc.phpplugin_api_extension.inc.phpplugin_internal.inc.phptemplate_api.inc.phptpl
lang
UTF-8
plugin_lang.phprecode.phprecode.shserendipity_lang_bg.inc.phpserendipity_lang_cn.inc.phpserendipity_lang_cs.inc.phpserendipity_lang_cz.inc.phpserendipity_lang_da.inc.phpserendipity_lang_de.inc.phpserendipity_lang_en.inc.phpserendipity_lang_es.inc.phpserendipity_lang_fa.inc.phpserendipity_lang_fi.inc.phpserendipity_lang_fr.inc.phpserendipity_lang_hu.inc.phpserendipity_lang_is.inc.phpserendipity_lang_it.inc.phpserendipity_lang_ja.inc.phpserendipity_lang_ko.inc.phpserendipity_lang_nl.inc.phpserendipity_lang_no.inc.phpserendipity_lang_pl.inc.phpserendipity_lang_pt.inc.phpserendipity_lang_pt_PT.inc.phpserendipity_lang_ro.inc.phpserendipity_lang_ru.inc.phpserendipity_lang_sa.inc.phpserendipity_lang_se.inc.phpserendipity_lang_ta.inc.phpserendipity_lang_tn.inc.phpserendipity_lang_tr.inc.phpserendipity_lang_tw.inc.phpserendipity_lang_zh.inc.php
addlang.shaddlang.txtappend.shplugin_lang.phpserendipity_lang_bg.inc.phpserendipity_lang_cn.inc.phpserendipity_lang_cs.inc.phpserendipity_lang_cz.inc.phpserendipity_lang_da.inc.phpserendipity_lang_de.inc.phpserendipity_lang_en.inc.phpserendipity_lang_es.inc.phpserendipity_lang_fa.inc.phpserendipity_lang_fi.inc.phpserendipity_lang_fr.inc.phpserendipity_lang_hu.inc.phpserendipity_lang_is.inc.phpserendipity_lang_it.inc.phpserendipity_lang_ja.inc.phpserendipity_lang_ko.inc.phpserendipity_lang_nl.inc.phpserendipity_lang_no.inc.phpserendipity_lang_pl.inc.phpserendipity_lang_pt.inc.phpserendipity_lang_pt_PT.inc.phpserendipity_lang_ro.inc.phpserendipity_lang_ru.inc.phpserendipity_lang_sa.inc.phpserendipity_lang_se.inc.phpserendipity_lang_ta.inc.phpserendipity_lang_tn.inc.phpserendipity_lang_tr.inc.phpserendipity_lang_tw.inc.phpserendipity_lang_zh.inc.phpplugins
serendipity_event_bbcode
UTF-8
lang_bg.inc.phplang_de.inc.phplang_es.inc.phplang_fr.inc.phplang_ja.inc.phplang_ko.inc.phplang_pl.inc.phplang_pt_PT.inc.phplang_tn.inc.phplang_zh.inc.php
lang_bg.inc.phplang_de.inc.phplang_en.inc.phplang_es.inc.phplang_fa.inc.phplang_fr.inc.phplang_ja.inc.phplang_ko.inc.phplang_pl.inc.phplang_pt_PT.inc.phplang_tn.inc.phplang_zh.inc.phpserendipity_event_bbcode.phpserendipity_event_browsercompatibility
UTF-8
lang_bg.inc.phplang_de.inc.phplang_es.inc.phplang_fr.inc.phplang_ja.inc.phplang_ko.inc.phplang_pl.inc.phplang_pt_PT.inc.phplang_tn.inc.phplang_zh.inc.php
lang_bg.inc.phplang_de.inc.phplang_en.inc.phplang_es.inc.phplang_fr.inc.phplang_ja.inc.phplang_ko.inc.phplang_pl.inc.phplang_pt_PT.inc.phplang_tn.inc.phplang_zh.inc.phppngbehavior.htcserendipity_event_browsercompatibility.phpserendipity_event_contentrewrite
UTF-8
lang_de.inc.phplang_es.inc.phplang_fr.inc.phplang_ja.inc.phplang_ko.inc.phplang_pt_PT.inc.phplang_tn.inc.phplang_zh.inc.php
lang_de.inc.phplang_en.inc.phplang_es.inc.phplang_fr.inc.phplang_ja.inc.phplang_ko.inc.phplang_pt_PT.inc.phplang_tn.inc.phplang_zh.inc.phpserendipity_event_contentrewrite.phpserendipity_event_creativecommons
UTF-8
lang_cn.inc.phplang_de.inc.phplang_es.inc.phplang_fr.inc.phplang_ja.inc.phplang_ko.inc.phplang_pl.inc.phplang_pt_PT.inc.phplang_tn.inc.phplang_zh.inc.php
lang_cn.inc.phplang_de.inc.phplang_en.inc.phplang_es.inc.phplang_fr.inc.phplang_ja.inc.phplang_ko.inc.phplang_pl.inc.phplang_pt_PT.inc.phplang_tn.inc.phplang_zh.inc.phpserendipity_event_creativecommons.phpserendipity_event_emoticate
UTF-8
lang_bg.inc.phplang_de.inc.phplang_es.inc.phplang_fr.inc.phplang_is.inc.phplang_ja.inc.phplang_ko.inc.phplang_pl.inc.phplang_pt_PT.inc.phplang_tn.inc.phplang_zh.inc.php
lang_bg.inc.phplang_de.inc.phplang_en.inc.phplang_es.inc.phplang_fr.inc.phplang_is.inc.phplang_ja.inc.phplang_ko.inc.phplang_pl.inc.phplang_pt_PT.inc.phplang_tn.inc.phplang_zh.inc.phpserendipity_event_emoticate.phpserendipity_event_entryproperties
UTF-8
lang_bg.inc.phplang_de.inc.phplang_es.inc.phplang_fr.inc.phplang_ja.inc.phplang_ko.inc.phplang_pl.inc.phplang_pt_PT.inc.phplang_tn.inc.phplang_tr.inc.phplang_zh.inc.php
lang_bg.inc.phplang_de.inc.phplang_en.inc.phplang_es.inc.phplang_fr.inc.phplang_ja.inc.phplang_ko.inc.phplang_pl.inc.phplang_pt_PT.inc.phplang_tn.inc.phplang_tr.inc.phplang_zh.inc.phpserendipity_event_entryproperties.phpserendipity_event_karma
UTF-8
lang_bg.inc.phplang_de.inc.phplang_es.inc.phplang_fr.inc.phplang_ja.inc.phplang_ko.inc.phplang_pl.inc.phplang_pt_PT.inc.phplang_tn.inc.phplang_zh.inc.php
lang_bg.inc.phplang_de.inc.phplang_en.inc.phplang_es.inc.phplang_fa.inc.phplang_fr.inc.phplang_ja.inc.phplang_ko.inc.phplang_pl.inc.phplang_pt_PT.inc.phplang_tn.inc.phplang_zh.inc.phpserendipity_event_karma.phpserendipity_event_livesearch
UTF-8
lang_bg.inc.phplang_de.inc.phplang_es.inc.phplang_fr.inc.phplang_ja.inc.phplang_ko.inc.phplang_nl.inc.phplang_pl.inc.phplang_pt_PT.inc.phplang_tn.inc.phplang_zh.inc.php
lang_bg.inc.phplang_de.inc.phplang_en.inc.phplang_es.inc.phplang_fr.inc.phplang_ja.inc.phplang_ko.inc.phplang_nl.inc.phplang_pl.inc.phplang_pt_PT.inc.phplang_tn.inc.phplang_zh.inc.phpserendipity_event_livesearch.jsserendipity_event_livesearch.phpserendipity_event_mailer
UTF-8
lang_bg.inc.phplang_de.inc.phplang_es.inc.phplang_fr.inc.phplang_ja.inc.phplang_ko.inc.phplang_pl.inc.phplang_pt_PT.inc.phplang_tn.inc.phplang_zh.inc.php
lang_bg.inc.phplang_de.inc.phplang_en.inc.phplang_es.inc.phplang_fr.inc.phplang_ja.inc.phplang_ko.inc.phplang_pl.inc.phplang_pt_PT.inc.phplang_tn.inc.phplang_zh.inc.phpserendipity_event_mailer.phpserendipity_event_nl2br
UTF-8
lang_bg.inc.phplang_de.inc.phplang_es.inc.phplang_fr.inc.phplang_ja.inc.phplang_ko.inc.phplang_pl.inc.phplang_pt_PT.inc.phplang_tn.inc.phplang_zh.inc.php
lang_bg.inc.phplang_de.inc.phplang_en.inc.phplang_es.inc.phplang_fr.inc.phplang_ja.inc.phplang_ko.inc.phplang_pl.inc.phplang_pt_PT.inc.phplang_tn.inc.phplang_zh.inc.phpserendipity_event_nl2br.phpserendipity_event_s9ymarkup
UTF-8
lang_bg.inc.phplang_de.inc.phplang_es.inc.phplang_fr.inc.phplang_is.inc.phplang_ja.inc.phplang_ko.inc.phplang_pl.inc.phplang_pt_PT.inc.phplang_tn.inc.phplang_zh.inc.php
lang_bg.inc.phplang_de.inc.phplang_en.inc.phplang_es.inc.phplang_fr.inc.phplang_is.inc.phplang_ja.inc.phplang_ko.inc.phplang_pl.inc.phplang_pt_PT.inc.phplang_tn.inc.phplang_zh.inc.phpserendipity_event_s9ymarkup.phpserendipity_event_searchhighlight
UTF-8
lang_bg.inc.phplang_de.inc.phplang_es.inc.phplang_fr.inc.phplang_ja.inc.phplang_ko.inc.phplang_pl.inc.phplang_tn.inc.phplang_zh.inc.php
lang_bg.inc.phplang_de.inc.phplang_en.inc.phplang_es.inc.phplang_fr.inc.phplang_ja.inc.phplang_ko.inc.phplang_pl.inc.phplang_tn.inc.phplang_zh.inc.phpserendipity_event_searchhighlight.phpserendipity_event_spamblock
36daysago.ttf36daysago.txt
UTF-8
lang_cn.inc.phplang_de.inc.phplang_es.inc.phplang_fr.inc.phplang_is.inc.phplang_ja.inc.phplang_ko.inc.phplang_pl.inc.phplang_pt_PT.inc.phplang_tn.inc.phplang_zh.inc.php
Vera.ttfVeraSe.ttfcaptcha_2.pngcaptcha_3.pngcaptcha_4.pngcaptcha_7.pngcaptcha_9.pngcaptcha_a.pngcaptcha_b.pngcaptcha_c.pngcaptcha_d.pngcaptcha_e.pngcaptcha_f.pngcaptcha_h.pngcaptcha_j.pngcaptcha_k.pngcaptcha_l.pngcaptcha_m.pngcaptcha_n.pngcaptcha_p.pngcaptcha_q.pngcaptcha_r.pngcaptcha_t.pngcaptcha_u.pngcaptcha_v.pngcaptcha_w.pngcaptcha_x.pngcaptcha_y.pngcaptcha_z.pngchumbly.ttfchumbly.txtlang_cn.inc.phplang_de.inc.phplang_en.inc.phplang_es.inc.phplang_fa.inc.phplang_fr.inc.phplang_is.inc.phplang_ja.inc.phplang_ko.inc.phplang_pl.inc.phplang_pt_PT.inc.phplang_tn.inc.phplang_zh.inc.phpserendipity_event_spamblock.phpserendipity_event_spartacus
UTF-8
lang_de.inc.phplang_es.inc.phplang_fr.inc.phplang_is.inc.phplang_ja.inc.phplang_ko.inc.phplang_pl.inc.phplang_pt_PT.inc.phplang_tn.inc.phplang_zh.inc.php
lang_de.inc.phplang_en.inc.phplang_es.inc.phplang_fr.inc.phplang_is.inc.phplang_ja.inc.phplang_ko.inc.phplang_pl.inc.phplang_pt_PT.inc.phplang_tn.inc.phplang_zh.inc.phpserendipity_event_spartacus.phpserendipity_event_statistics
ChangeLog
UTF-8
lang_bg.inc.phplang_cz.inc.phplang_de.inc.phplang_es.inc.phplang_fr.inc.phplang_ja.inc.phplang_ko.inc.phplang_pl.inc.phplang_pt_PT.inc.phplang_tn.inc.phplang_zh.inc.php
green.pnglang_bg.inc.phplang_cz.inc.phplang_de.inc.phplang_en.inc.phplang_es.inc.phplang_fr.inc.phplang_ja.inc.phplang_ko.inc.phplang_pl.inc.phplang_pt_PT.inc.phplang_tn.inc.phplang_zh.inc.phpred.pngserendipity_event_statistics.phpserendipity_plugin_statistics.phpyellow.pngserendipity_event_templatechooser
UTF-8
lang_bg.inc.phplang_de.inc.phplang_es.inc.phplang_fr.inc.phplang_ja.inc.phplang_ko.inc.phplang_pl.inc.phplang_pt_PT.inc.phplang_tn.inc.phplang_zh.inc.php
lang_bg.inc.phplang_de.inc.phplang_en.inc.phplang_es.inc.phplang_fr.inc.phplang_ja.inc.phplang_ko.inc.phplang_pl.inc.phplang_pt_PT.inc.phplang_tn.inc.phplang_zh.inc.phpserendipity_event_templatechooser.phpserendipity_event_textile
UTF-8
lang_bg.inc.phplang_de.inc.phplang_es.inc.phplang_fr.inc.phplang_ja.inc.phplang_ko.inc.phplang_pl.inc.phplang_pt_PT.inc.phplang_tn.inc.phplang_zh.inc.php
lang_bg.inc.phplang_de.inc.phplang_en.inc.phplang_es.inc.phplang_fr.inc.phplang_ja.inc.phplang_ko.inc.phplang_pl.inc.phplang_pt_PT.inc.phplang_tn.inc.phplang_zh.inc.phpserendipity_event_textile.phptextile.phpserendipity_event_textwiki
UTF-8
lang_bg.inc.phplang_de.inc.phplang_es.inc.phplang_fr.inc.phplang_ja.inc.phplang_ko.inc.phplang_pl.inc.phplang_pt_PT.inc.phplang_tn.inc.phplang_zh.inc.php
lang_bg.inc.phplang_de.inc.phplang_en.inc.phplang_es.inc.phplang_fr.inc.phplang_ja.inc.phplang_ko.inc.phplang_pl.inc.phplang_pt_PT.inc.phplang_tn.inc.phplang_zh.inc.phpserendipity_event_textwiki.phpserendipity_event_trackexits
UTF-8
lang_de.inc.phplang_es.inc.phplang_fr.inc.phplang_ja.inc.phplang_ko.inc.phplang_pl.inc.phplang_pt_PT.inc.phplang_tn.inc.phplang_zh.inc.php
lang_de.inc.phplang_en.inc.phplang_es.inc.phplang_fr.inc.phplang_ja.inc.phplang_ko.inc.phplang_pl.inc.phplang_pt_PT.inc.phplang_tn.inc.phplang_zh.inc.phpserendipity_event_trackexits.phpserendipity_event_weblogping
UTF-8
lang_de.inc.phplang_es.inc.phplang_fr.inc.phplang_ja.inc.phplang_ko.inc.phplang_pl.inc.phplang_pt_PT.inc.phplang_tn.inc.phplang_zh.inc.php
lang_de.inc.phplang_en.inc.phplang_es.inc.phplang_fr.inc.phplang_ja.inc.phplang_ko.inc.phplang_pl.inc.phplang_pt_PT.inc.phplang_tn.inc.phplang_zh.inc.phpserendipity_event_weblogping.phpservicesdb_de.inc.phpservicesdb_en.inc.phpservicesdb_ja.inc.phpservicesdb_tn.inc.phpserendipity_event_xhtmlcleanup
UTF-8
lang_bg.inc.phplang_de.inc.phplang_fr.inc.phplang_ja.inc.phplang_ko.inc.phplang_pl.inc.phplang_pt_PT.inc.phplang_tn.inc.phplang_zh.inc.php
lang_bg.inc.phplang_de.inc.phplang_en.inc.phplang_es.inc.phplang_fr.inc.phplang_ja.inc.phplang_ko.inc.phplang_pl.inc.phplang_pt_PT.inc.phplang_tn.inc.phplang_zh.inc.phpserendipity_event_xhtmlcleanup.phpserendipity_plugin_comments
UTF-8
lang_bg.inc.phplang_cn.inc.phplang_de.inc.phplang_es.inc.phplang_fr.inc.phplang_is.inc.phplang_ja.inc.phplang_ko.inc.phplang_pl.inc.phplang_pt_PT.inc.phplang_tn.inc.phplang_tr.inc.phplang_zh.inc.php
lang_bg.inc.phplang_cn.inc.phplang_de.inc.phplang_en.inc.phplang_es.inc.phplang_fr.inc.phplang_is.inc.phplang_ja.inc.phplang_ko.inc.phplang_pl.inc.phplang_pt_PT.inc.phplang_tn.inc.phplang_tr.inc.phplang_zh.inc.phpserendipity_plugin_comments.phpserendipity_plugin_creativecommons
UTF-8
lang_bg.inc.phplang_cn.inc.phplang_de.inc.phplang_es.inc.phplang_fr.inc.phplang_ja.inc.phplang_ko.inc.phplang_pl.inc.phplang_pt_PT.inc.phplang_tn.inc.phplang_zh.inc.php
lang_bg.inc.phplang_cn.inc.phplang_de.inc.phplang_en.inc.phplang_es.inc.phplang_fr.inc.phplang_ja.inc.phplang_ko.inc.phplang_pl.inc.phplang_pt_PT.inc.phplang_tn.inc.phplang_zh.inc.phpserendipity_plugin_creativecommons.phpserendipity_plugin_entrylinks
UTF-8
lang_bg.inc.phplang_de.inc.phplang_es.inc.phplang_fr.inc.phplang_ja.inc.phplang_ko.inc.phplang_pl.inc.phplang_pt_PT.inc.phplang_tn.inc.phplang_tr.inc.phplang_zh.inc.php
lang_bg.inc.phplang_de.inc.phplang_en.inc.phplang_es.inc.phplang_fr.inc.phplang_ja.inc.phplang_ko.inc.phplang_pl.inc.phplang_pt_PT.inc.phplang_tn.inc.phplang_tr.inc.phplang_zh.inc.phpserendipity_plugin_entrylinks.phpserendipity_plugin_eventwrapper
UTF-8
lang_bg.inc.phplang_de.inc.phplang_es.inc.phplang_fr.inc.phplang_ja.inc.phplang_ko.inc.phplang_pl.inc.phplang_pt_PT.inc.phplang_tn.inc.phplang_zh.inc.php
lang_bg.inc.phplang_de.inc.phplang_en.inc.phplang_es.inc.phplang_fr.inc.phplang_ja.inc.phplang_ko.inc.phplang_pl.inc.phplang_pt_PT.inc.phplang_tn.inc.phplang_zh.inc.phpserendipity_plugin_eventwrapper.phpserendipity_plugin_history
UTF-8
lang_bg.inc.phplang_de.inc.phplang_es.inc.phplang_fr.inc.phplang_ja.inc.phplang_ko.inc.phplang_pl.inc.phplang_pt_PT.inc.phplang_tn.inc.phplang_zh.inc.php
lang_bg.inc.phplang_de.inc.phplang_en.inc.phplang_es.inc.phplang_fr.inc.phplang_ja.inc.phplang_ko.inc.phplang_pl.inc.phplang_pt_PT.inc.phplang_tn.inc.phplang_zh.inc.phpserendipity_plugin_history.phpserendipity_plugin_recententries
UTF-8
lang_bg.inc.phplang_de.inc.phplang_es.inc.phplang_fr.inc.phplang_is.inc.phplang_ja.inc.phplang_ko.inc.phplang_pl.inc.phplang_pt_PT.inc.phplang_tn.inc.phplang_tr.inc.phplang_zh.inc.php
lang_bg.inc.phplang_de.inc.phplang_en.inc.phplang_es.inc.phplang_fa.inc.phplang_fr.inc.phplang_is.inc.phplang_ja.inc.phplang_ko.inc.phplang_pl.inc.phplang_pt_PT.inc.phplang_tn.inc.phplang_tr.inc.phplang_zh.inc.phpserendipity_plugin_recententries.phpserendipity_plugin_remoterss
UTF-8
lang_de.inc.phplang_es.inc.phplang_fr.inc.phplang_ja.inc.phplang_ko.inc.phplang_pl.inc.phplang_pt_PT.inc.phplang_tn.inc.phplang_zh.inc.php
lang_de.inc.phplang_en.inc.phplang_es.inc.phplang_fr.inc.phplang_ja.inc.phplang_ko.inc.phplang_pl.inc.phplang_pt_PT.inc.phplang_tn.inc.phplang_zh.inc.phpserendipity_plugin_remoterss.phpserendipity_plugin_shoutbox
UTF-8
lang_de.inc.phplang_es.inc.phplang_fr.inc.phplang_ja.inc.phplang_ko.inc.phplang_pl.inc.phplang_pt_PT.inc.phplang_tn.inc.phplang_zh.inc.php
lang_de.inc.phplang_en.inc.phplang_es.inc.phplang_fr.inc.phplang_ja.inc.phplang_ko.inc.phplang_pl.inc.phplang_pt_PT.inc.phplang_tn.inc.phplang_zh.inc.phpserendipity_plugin_shoutbox.phpserendipity_plugin_templatedropdown
UTF-8
lang_bg.inc.phplang_de.inc.phplang_es.inc.phplang_fr.inc.phplang_ja.inc.phplang_ko.inc.phplang_pl.inc.phplang_pt_PT.inc.phplang_tn.inc.phplang_zh.inc.php
lang_bg.inc.phplang_de.inc.phplang_en.inc.phplang_es.inc.phplang_fr.inc.phplang_ja.inc.phplang_ko.inc.phplang_pl.inc.phplang_pt_PT.inc.phplang_tn.inc.phplang_zh.inc.phpserendipity_plugin_templatedropdown.phpsql
db.sqldb_update_0.2_0.3_mysql.sqldb_update_0.2_0.3_postgres.sqldb_update_0.3_0.4_mysql.sqldb_update_0.3_0.4_postgres.sqldb_update_0.5.1_0.6_mysql.sqldb_update_0.5.1_0.6_postgres.sqldb_update_0.5_0.5.1_mysql.sqldb_update_0.5_0.5.1_postgres.sqldb_update_0.6.10_0.6.11_mysql.sqldb_update_0.6.10_0.6.11_postgres.sqldb_update_0.6.1_0.6.2_mysql.sqldb_update_0.6.1_0.6.2_postgres.sqldb_update_0.6.2_0.6.3_mysql.sqldb_update_0.6.2_0.6.3_postgres.sqldb_update_0.6.3_0.6.4_mysql.sqldb_update_0.6.3_0.6.4_postgres.sqldb_update_0.6.4_0.6.5_mysql.sqldb_update_0.6.4_0.6.5_postgres.sqldb_update_0.6.5_0.6.6_mysql.sqldb_update_0.6.5_0.6.6_postgres.sqldb_update_0.6.6_0.6.7_mysql.sqldb_update_0.6.6_0.6.7_postgres.sqldb_update_0.6.8_0.6.9_mysql.sqldb_update_0.6.8_0.6.9_postgres.sqldb_update_0.6.9_0.7.0_mysql.sqldb_update_0.6.9_0.7.0_postgresql.sqldb_update_0.6_0.6.1_mysql.sqldb_update_0.6_0.6.1_postgres.sqldb_update_0.8-alpha10_0.8-alpha11_mysql.sqldb_update_0.8-alpha11_0.8-alpha12_mysql.sqldb_update_0.8-alpha11_0.8-alpha12_postgres.sqldb_update_0.8-alpha11_0.8-alpha12_sqlite.sqldb_update_0.8-alpha12_0.8-alpha13_mysql.sqldb_update_0.8-alpha12_0.8-alpha13_postgres.sqldb_update_0.8-alpha12_0.8-alpha13_sqlite.sqldb_update_0.8-alpha1_0.8-alpha2_mysql.sqldb_update_0.8-alpha4_0.8-alpha5_mysql.sqldb_update_0.8-alpha4_0.8-alpha5_postgres.sqldb_update_0.8-alpha4_0.8-alpha5_sqlite.sqldb_update_0.8-alpha5_0.8-alpha6_mysql.sqldb_update_0.8-alpha5_0.8-alpha6_postgres.sqldb_update_0.8-alpha5_0.8-alpha6_sqlite.sqldb_update_0.8-beta3_0.8-beta4_mysql.sqldb_update_0.8-beta3_0.8-beta4_postgres.sqldb_update_0.8-beta3_0.8-beta4_sqlite.sqldb_update_0.8-beta5_0.8-beta6_mysql.sqldb_update_0.8-beta5_0.8-beta6_postgres.sqldb_update_0.8-beta5_0.8-beta6_sqlite.sqldb_update_0.9-alpha1_0.9-alpha2_mysql.sqldb_update_0.9-alpha1_0.9-alpha2_postgres.sqldb_update_0.9-alpha1_0.9-alpha2_sqlite.sqldb_update_0.9-alpha2_0.9-alpha3_mysql.sqldb_update_0.9-alpha3_0.9-alpha4_mysql.sqldb_update_0.9-alpha4_0.9-alpha5_mysql.sqldb_update_1.1-alpha1_1.1-alpha2_mysql.sqldb_update_1.1-alpha2_1.1-alpha3_mysql.sqldb_update_1.1-alpha3_1.1-alpha4_mysql.sqldb_update_1.1-alpha4_1.1-alpha5_mysql.sqldb_update_1.1-alpha4_1.1-alpha5_postgres.sqldb_update_1.1-alpha4_1.1-alpha5_sqlite.sqldb_update_1.1-alpha5_1.1-alpha6_mysql.sqldb_update_1.1-alpha5_1.1-alpha6_postgres.sqldb_update_1.1-alpha5_1.1-alpha6_sqlite.sql
templates
HOWTOentries.tplcontent.tplentries.tplentries_archives.tplentries_summary.tplhtmlarea.cssatom.csscommentform.tplcommentpopup.tplcomments.tplcontent.tplentries.tplentries_archives.tplentries_summary.tplfeed_0.91.tplfeed_1.0.tplfeed_2.0.tplfeed_atom0.3.tplfeed_atom1.0.tplfeed_opml1.0.tplhtmlarea.css
blue
carl_contest
admin
entries.tplentries_summary.tplimg
back.gifbackground.pngbackground_alternate.pngforward.gifgraph_bar_horisontal.pnginfo_header_text_tile.giflink_blue.giflink_ltblue.giflink_orange.gifxml.gif
index.tplinfo.txtplugin_calendar.tplpreview.pngscreenshot.pngstyle.csscompetition
admin
img
background.jpgbanner_background.pngbutton_background.pnginfobar_background.pngmenu_background.pngmenuheader_background.pngmenuitem.png
style.cssimg
index.tplinfo.txtpreview.pngstyle.csscontest
admin
img
Thumbs.dbbutton_background.pngheader_bar.pngheader_logo.pngmenuheader_background.pngsidebar_left.jpg
style.cssimg
Thumbs.dbback.pngdate_bar.pngforward.pngheader_bar.pngheader_logo.pngheader_spacer.pngsidebar_left.jpgsidebar_right.jpgsidebar_spacer.jpgxml.gif
index.tplinfo.txtplugin_calendar.tplpreview.pngstyle.cssdefault-php
IMPORTANT-TODOcommentform.tplcommentpopup.tplcomments.tplcontent.tplentries.tplentries_archives.tplentries_summary.tplfeed_0.91.tplfeed_1.0.tplfeed_2.0.tplfeed_atom0.3.tplfeed_atom1.0.tplfeed_opml1.0.tplindex.tplinfo.txtplugin_calendar.tplplugin_categories.tplpreview.pngpreview_iframe.tplsidebar.tpltemplate.inc.phptrackbacks.tpl
default-rtl
admin
img
background.jpgbanner_background.pngbutton_background.pnginfobar_background.pngmenu_background.pngmenuheader_background.png
style.cssimg
info.txtplugin_calendar.tplpreview.pngstyle.cssdefault-xml
default
admin
img
accept.pngbackground.jpgbanner_background.pngbig_delete.pngbig_rename.pngbig_resize.pngbig_rotate_ccw.pngbig_rotate_cw.pngbig_zoom.pngbutton_background.pngclock.pngclock_future.pngconfigure.pngdelete.pngdownarrow.pngedit.pngfolder.pnggrablet.gifgrablet_over.gifimgedit_area.gifimgedit_orientation.gifimgedit_slider.gifimgedit_varea.gifinfobar_background.pnginstall.pnginstall_now.pnginstall_now_spartacus.pnginstall_template.pngmenu_background.pngmenuheader_background.pngmenuitem.pngmime_unknown.pngnext.pngprevious.pngrotate.pngthumbnail.pngunconfigure.pnguparrow.pngupgrade_now.pnguser_admin.pnguser_chief.pnguser_editor.pngzoom.png
imgedit.cssmedia_choose.tplmedia_imgedit.tplmedia_imgedit_done.tplmedia_items.tplmedia_pane.tplmedia_properties.tplmedia_showitem.tplmedia_upload.tplpluginmanager.cssstyle.cssimg
back.pngbackground.pngblank.gifblank.pngdelete.pngdown.png
index.tplinfo.txtplugin_calendar.tplplugin_categories.tplpreview.pngpreview_iframe.tplsidebar.tplstyle.csstrackbacks.tplemoticons
forward.pnggraph_bar_horisontal.pngimg_align_left.pngimg_align_right.pngimg_align_top.pngminus.pngnorights.pngplus.pngrename.pngs9y_banner_small.pngscale.pngsomerights20.gifup.pngxml.gifzoom.pngtreeview
idea
kubrick
comments.tplconfig.inc.phpentries.tpl
images
kubrickbg.jpgkubrickbgcolor.jpgkubrickbgwide.jpgkubrickfooter.jpgkubrickheader.jpgkubricklogo.jpgkubrickportrait.png
img
index.tplinfo.txtlang_de.inc.phplang_en.inc.phplang_ko.inc.phppreview.pngsidebar.tplstyle.csstrackbacks.tplmoz-modern
mt-clean
mt-georgiablue
mt-gettysburg
mt-plainjane
mt-rusty
mt-stormy
mt-trendy
mt3-chalkboard
mt3-gettysburg
mt3-independence
mt3-squash
newspaper
wp
templates_c
uploads
wfwcomment.php
299
include/template_api.inc.php
Normal file
299
include/template_api.inc.php
Normal file
@ -0,0 +1,299 @@
|
||||
<?php # $Id: plugin_api.inc.php 1228 2006-06-01 11:18:53Z garvinhicking $
|
||||
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
|
||||
# All rights reserved. See LICENSE file for licensing details
|
||||
|
||||
/*
|
||||
*@author Garvin Hicking
|
||||
*@state EXPERIMENTAL
|
||||
|
||||
This file provides a basic Smarty emulating layer
|
||||
You can use different template engines than the default Smarty one
|
||||
by putting a "template.inc.php" file into your template directory.
|
||||
It should look something like this:
|
||||
|
||||
<?php
|
||||
include_once S9Y_INCLUDE_PATH . 'include/template_api.inc.php';
|
||||
$GLOBALS['template'] = new serendipity_smarty_emulator();
|
||||
$GLOBALS['serendipity']['smarty'] =& $GLOBALS['template'];
|
||||
?>
|
||||
|
||||
You could of course also use inherited different template classes. It is important
|
||||
that your own template object contains method declarations like the class below
|
||||
for full interoperability to Serendipity templates. It is important that
|
||||
you assign a reference copy of your template object to the $serendipity['smarty']
|
||||
object for backwards compatibility.
|
||||
|
||||
All variables that are assigned from this class to your templates/.php files
|
||||
will be put into $GLOBALS['tpl'].
|
||||
|
||||
Since the scope of includes can vary, you'll need to use $GLOBALS['tpl'] instead
|
||||
of just $tpl in some cases. Thus it's recommended to always use the $GLOBALS['tpl']
|
||||
way. Also it's safer to use $GLOBALS['serendipity'] / $GLOBALS['template'] in most
|
||||
cases because of the same reason.
|
||||
|
||||
Instead of Smarty $CONST.xxx constants you can use the usual 'xxx' constant access
|
||||
method by PHP.
|
||||
|
||||
You can use any Smarty template file to construct your custom PHP template. You
|
||||
just need to do this:
|
||||
|
||||
- Replace '{$variable}' calls with '<?= $GLOBALS['tpl']['variable'] ?>'.
|
||||
|
||||
- Replace '{$variable|XXX}' smarty modifiers with corresponding PHP code, like:
|
||||
'<?= substr($GLOBALS['tpl']['XXX'], 0, 25) ?>'
|
||||
would correspond with
|
||||
'{$variable|truncate:'...':25}'
|
||||
- Replace '{if CONDITION} ... {/if}' checks with '<?php if (CONDITION): ?> ... <?php endif; ?>'
|
||||
|
||||
- Replace '{foreach} ... {/foreach}' calls correspondingly.
|
||||
|
||||
- Replace '{smartycommand param1=x param2=x}' function calls with
|
||||
'<?php $GLOBALS['template']->call('smartycommand', array('param1' => 'x', 'param2' => 'x')); ?>' ones
|
||||
|
||||
- NOTA BENE: Be aware that many smarty function calls are just wrappers to Serendipity API
|
||||
calls. To save grandma's performance pennies you should search the original Serendipity API
|
||||
function before calling them with the $GLOBALS['template']->call() wrapper! This costs dearly.
|
||||
|
||||
The Serendipity Admin backend will still make use of Smarty. It rocks.
|
||||
|
||||
Know your PHP before you think about using this. :-)
|
||||
*/
|
||||
|
||||
class serendipity_smarty_emulator {
|
||||
var $compile_dir = '/tmp'; // Not used
|
||||
var $security_settings = array(); // Not used
|
||||
|
||||
/**
|
||||
* Assign one or multiple template variable
|
||||
*
|
||||
* @param mixed Either a variable name, or an array of variables
|
||||
* @param mixed Either null or the variable content.
|
||||
* @access public
|
||||
* @return null
|
||||
*/
|
||||
function assign($tpl_var, $value = null) {
|
||||
if (is_array($tpl_var)) {
|
||||
foreach ($tpl_var as $key => $val) {
|
||||
if ($key != '') {
|
||||
$GLOBALS['tpl'][$key] = $tpl_var[$key];
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$GLOBALS['tpl'][$tpl_var] = $value;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Assign one or multiple template variable by reference
|
||||
*
|
||||
* @param string Variable name
|
||||
* @param mixed Referenced variable
|
||||
* @access public
|
||||
* @return null
|
||||
*/
|
||||
function assign_by_ref($tpl_var, &$value) {
|
||||
$GLOBALS['tpl'][$tpl_var] =& $value;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper function to call a 'serendipity_smarty_xx' function with less parameters.
|
||||
*
|
||||
* @param string Function name to call.
|
||||
* @param array Array of parameters
|
||||
* @access public
|
||||
* @return string Output
|
||||
*/
|
||||
function call($funcname, $params) {
|
||||
if (function_exists('serendipity_smarty_' . $funcname)) {
|
||||
return call_user_func('serendipity_smarty_' . $funcname, $params, $this);
|
||||
} elseif (function_exists('serendipity_' . $funcname)) {
|
||||
return call_user_func('serendipity_' . $funcname, $params, $this);
|
||||
} elseif (function_exists($funcname)) {
|
||||
return call_user_func($funcname, $params, $this);
|
||||
} else {
|
||||
return "ERROR: " . htmlspecialchars($funcname) . " NOT FOUND.<br />\n";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Outputs a smarty template.
|
||||
*
|
||||
* @param string Full path to template file
|
||||
* @access public
|
||||
* @return boolean
|
||||
*/
|
||||
function display($resource_name) {
|
||||
return include $resource_name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Triggers a template error
|
||||
*
|
||||
* @param string Error message
|
||||
* @access public
|
||||
* @return null
|
||||
*/
|
||||
function trigger_error($txt) {
|
||||
echo '<b>SMARTY EMULATOR ERROR: ' . $txt;
|
||||
}
|
||||
|
||||
/**
|
||||
* Echoes a default value. Append multiple values and will output the first non empty value.
|
||||
*
|
||||
* @param mixed The value to emit.
|
||||
* @access public
|
||||
* @return null
|
||||
*/
|
||||
function getdefault() {
|
||||
$vars = func_get_args();
|
||||
foreach($vars as $title) {
|
||||
if (!empty($GLOBALS['tpl'][$title])) {
|
||||
return $GLOBALS['tpl'][$title];
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses a template file into another.
|
||||
*
|
||||
* @param string The path to the resource name (prefixed with 'file:' usually)
|
||||
* @param string The Cache ID (not used)
|
||||
* @param string The Compile ID (not used)
|
||||
* @param boolean Output data (true) or return it (false)?
|
||||
* @access public
|
||||
* @return null
|
||||
*/
|
||||
function &fetch($resource_name, $cache_id = null, $compile_id = null, $display = false) {
|
||||
$resource_name = str_replace('file:', '', $resource_name);
|
||||
|
||||
if (!$display) {
|
||||
ob_start();
|
||||
}
|
||||
|
||||
include $resource_name;
|
||||
|
||||
if (!$display) {
|
||||
$out = ob_get_contents();
|
||||
ob_end_clean();
|
||||
return $out;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
*@author Garvin Hicking
|
||||
*@state EXPERIMENTAL
|
||||
*
|
||||
* XML Engine
|
||||
*/
|
||||
|
||||
class serendipity_smarty_emulator_xml extends serendipity_smarty_emulator {
|
||||
/**
|
||||
* Parses a template file into another.
|
||||
*
|
||||
* @access public
|
||||
* @return null
|
||||
*/
|
||||
function fetch() {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Outputs a smarty template.
|
||||
*
|
||||
* @access public
|
||||
* @return null
|
||||
*/
|
||||
function display() {
|
||||
echo "</serendipity>\n";
|
||||
return true;
|
||||
}
|
||||
|
||||
function __construct() {
|
||||
header('Content-Type: text/xml; charset=' . LANG_CHARSET);
|
||||
echo '<?xml version="1.0" encoding="' . LANG_CHARSET . '" ?>' . "\n";
|
||||
/*
|
||||
echo '<?xml-stylesheet href="' . serendipity_getTemplateFile('xml.css') . '" type="text/css" ?>' . "\n";
|
||||
*/
|
||||
echo "<serendipity>\n";
|
||||
ob_end_flush(); // This ends the started ob from index.php!
|
||||
}
|
||||
|
||||
function serendipity_smarty_emulator_xml() {
|
||||
$this->__construct();
|
||||
}
|
||||
|
||||
/**
|
||||
* Assign one or multiple template variable
|
||||
* @TODO: Why can't this function accept references. This sucks.
|
||||
*
|
||||
* @param mixed Either a variable name, or an array of variables
|
||||
* @param mixed Either null or the variable content.
|
||||
* @access public
|
||||
* @return null
|
||||
*/
|
||||
function assign($tpl_var, $value = null, $level = 0) {
|
||||
if (is_array($tpl_var)) {
|
||||
foreach ($tpl_var as $key => $val) {
|
||||
$this->createXML($level, $key, $val);
|
||||
}
|
||||
} else {
|
||||
$this->createXML($level, $tpl_var, $value);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Assign one or multiple template variable by reference
|
||||
*
|
||||
* @param string Variable name
|
||||
* @param mixed Referenced variable
|
||||
* @access public
|
||||
* @return null
|
||||
*/
|
||||
function assign_by_ref($tpl_var, &$value) {
|
||||
if (is_array($value)) {
|
||||
foreach ($value as $key => $val) {
|
||||
$this->createXML($level, $key, $val);
|
||||
}
|
||||
} else {
|
||||
$this->createXML($level, $tpl_var, $value);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create the XML output for an element
|
||||
*
|
||||
* @param int The intend level
|
||||
* @param mixed The XML element name
|
||||
* @param mixed The XML element value
|
||||
*/
|
||||
function createXML(&$level, &$key, &$val) {
|
||||
if (is_numeric($key)) {
|
||||
$openkey = 'item index="' . $key . '"';
|
||||
$closekey = 'item';
|
||||
} else {
|
||||
$openkey = $closekey = str_replace(':', '_', $key);
|
||||
}
|
||||
|
||||
if (is_array($val)) {
|
||||
echo str_repeat("\t", $level) . "<$openkey>\n";
|
||||
$this->assign($val, null, $level + 1);
|
||||
echo str_repeat("\t", $level) . "</$closekey>\n";
|
||||
} else {
|
||||
echo str_repeat("\t", $level) . "<$openkey>" . htmlspecialchars($val) . "</$closekey>\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user