Warning: This page has not been updated in over over a year and may be outdated or deprecated.
legacy:vufind_1.x_developer_manual:building_a_smarty_plugin
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revisionLast revisionBoth sides next revision | ||
building_a_plugin [2007/11/20 20:29] – created asnagy | legacy:vufind_1.x_developer_manual:building_a_smarty_plugin [2015/12/11 19:15] – ↷ Page moved and renamed from building_a_plugin to legacy:vufind_1.x_developer_manual:building_a_smarty_plugin demiankatz | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Building | + | ====== Building |
- | VuFind uses the [[http:// | + | VuFind uses the [[http://www.smarty.net/ |
+ | |||
+ | Here is an arbitrary example of a plugin that interacts with the Solr data store: | ||
+ | |||
+ | <code php> | ||
+ | filename: / | ||
+ | <?php | ||
+ | /* | ||
+ | * Smarty plugin | ||
+ | * ------------------------------------------------------------- | ||
+ | * File: | ||
+ | * Type: | ||
+ | * Name: Show Q Authors | ||
+ | * Purpose: | ||
+ | * ------------------------------------------------------------- | ||
+ | */ | ||
+ | function smarty_modifier_showqauthors() | ||
+ | { | ||
+ | global $solr; | ||
+ | |||
+ | $solr-> | ||
+ | |||
+ | $result = $solr-> | ||
+ | |||
+ | // Create Output | ||
+ | $html = "< | ||
+ | foreach ($result[' | ||
+ | $html .= '< | ||
+ | } | ||
+ | $html .= "</ | ||
+ | |||
+ | // Return Output | ||
+ | return $html; | ||
+ | } | ||
+ | ?> | ||
+ | </ | ||
---- struct data ---- | ---- struct data ---- | ||
---- | ---- | ||
legacy/vufind_1.x_developer_manual/building_a_smarty_plugin.txt · Last modified: 2018/12/19 14:12 by demiankatz