History: Wiki Plugin Development
Source of version: 4 (current)
Copy to clipboard
!!How to access the database from within a Wiki Plugin? There are three ways to access the DB: # __$tikilib->query($sql, $attributes);__ - This method allows you to utilize any functionality your MySQL username is allowed to use. it returns an AdoDB object. # [PluginSQL] # [PluginDBReport ] !!Using JQuery JQuery gets included at the bottom of the page, so it isn't accessible in your plugins' template. To access JQuery: #Make sure you have the global variable $headerlib defined. #Add your JS with $headerlib->add_js( ''your js code'' ); You won't have the $() syntax. Use $jq() instead.