[geeklog-cvs] geeklog: Call PLG_templateSetVars for the Advanced Search form
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Sun May 30 04:05:30 EDT 2010
changeset 7944:9fb7d4fd3169
url: http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/9fb7d4fd3169
user: Dirk Haun <dirk at haun-online.de>
date: Sun May 30 09:29:02 2010 +0200
description:
Call PLG_templateSetVars for the Advanced Search form
diffstat:
public_html/docs/history | 1 +
system/classes/search.class.php | 1 +
system/lib-custom.php.dist | 3 ++-
system/lib-plugins.php | 18 +++++++++++++++---
4 files changed, 19 insertions(+), 4 deletions(-)
diffs (82 lines):
diff -r 25ec534988b1 -r 9fb7d4fd3169 public_html/docs/history
--- a/public_html/docs/history Mon May 24 18:03:16 2010 +0200
+++ b/public_html/docs/history Sun May 30 09:29:02 2010 +0200
@@ -3,6 +3,7 @@
??? ?, 2010 (1.7.1)
-----------
+- Call PLG_templateSetVars for the Advanced Search form [Dirk]
- Make sure we keep the current status of the user's Advanced Editor option
even when Advanced Editor is disabled for the site (Thanks, Markus) [Dirk]
- Comment submissions for plugins were missing the type [Dirk]
diff -r 25ec534988b1 -r 9fb7d4fd3169 system/classes/search.class.php
--- a/system/classes/search.class.php Mon May 24 18:03:16 2010 +0200
+++ b/system/classes/search.class.php Sun May 30 09:29:02 2010 +0200
@@ -306,6 +306,7 @@
$searchform->set_var('search_limits', $options);
$searchform->set_var('lang_search', $LANG09[10]);
+ PLG_templateSetVars('search', $searchform);
$searchform->parse('output', 'searchform');
$retval .= $searchform->finish($searchform->get_var('output'));
diff -r 25ec534988b1 -r 9fb7d4fd3169 system/lib-custom.php.dist
--- a/system/lib-custom.php.dist Mon May 24 18:03:16 2010 +0200
+++ b/system/lib-custom.php.dist Sun May 30 09:29:02 2010 +0200
@@ -2,7 +2,7 @@
/* Reminder: always indent with 4 spaces (no tabs). */
// +---------------------------------------------------------------------------+
-// | Geeklog 1.6 |
+// | Geeklog 1.7 |
// +---------------------------------------------------------------------------+
// | lib-custom.php |
// | |
@@ -127,6 +127,7 @@
* - 'emailstory' (email story to a friend)
* - 'loginblock' (login form in the side bar)
* - 'loginform' (login form in the content area)
+* - 'search' (advanced search form; simple search is usually part of 'header')
*
* This function is called whenever PLG_templateSetVars is called, i.e. in
* addition to the templates listed here, it may also be called from plugins.
diff -r 25ec534988b1 -r 9fb7d4fd3169 system/lib-plugins.php
--- a/system/lib-plugins.php Mon May 24 18:03:16 2010 +0200
+++ b/system/lib-plugins.php Sun May 30 09:29:02 2010 +0200
@@ -2,7 +2,7 @@
/* Reminder: always indent with 4 spaces (no tabs). */
// +---------------------------------------------------------------------------+
-// | Geeklog 1.6 |
+// | Geeklog 1.7 |
// +---------------------------------------------------------------------------+
// | lib-plugins.php |
// | |
@@ -1405,13 +1405,25 @@
}
/**
-* This function can be called to check if an plugin wants to set a template
+* This function can be called to check if a plugin wants to set a template
* variable
*
-* Example in COM_siteHeader, the API call is now added
* A plugin can check for $templatename == 'header' and then set additional
* template variables
*
+* Called from within Geeklog for:
+* - 'header' (site header)
+* - 'footer' (site footer)
+* - 'storytext', 'featuredstorytext', 'archivestorytext' (story templates)
+* - 'story' (story submission)
+* - 'comment' (comment submission form)
+* - 'registration' (user registration form)
+* - 'contact' (email user form)
+* - 'emailstory' (email story to a friend)
+* - 'loginblock' (login form in the side bar)
+* - 'loginform' (login form in the content area)
+* - 'search' (advanced search form; simple search is usually part of 'header')
+*
* @param string $templatename Name of calling template
* @param ref &$template reference for the Template
* @return void
More information about the geeklog-cvs
mailing list