Help popup
From Sohowiki
(Difference between revisions)
(→How to create a help popup within you plugin's php code) |
(→Basic Syntax) |
||
Line 4: | Line 4: | ||
===Basic Syntax=== | ===Basic Syntax=== | ||
− | help_popup("popup-id-name", "title text", | + | help_popup("popup-id-name", "title text", "My html content" [,additional inline css]); |
+ | |||
+ | ===Quick Example=== | ||
+ | |||
+ | <pre> | ||
+ | <?php | ||
+ | $popupHTML = "<p>This is my help pop-up. It explains stuff.</p>" | ||
+ | $popupHTML .= "<p>And also explains some other stuff.</p>"; | ||
+ | |||
+ | echo help_popup("pophelp-explain-stuff", "My Help Popup Explains Stuff", %popupHTML); | ||
+ | ?> | ||
+ | |||
+ | <span class="help_link" onlick="showid('pophelp-explain-stuff');">[?] Launch help popup</span> | ||
+ | </pre> | ||
==Notes== | ==Notes== | ||
*'''You can use it anywhere.''' The help_popup() function is included in shared_functions.php and is therefore available globally in both the Soholaunch admin tool window as well as on the client (website) side. | *'''You can use it anywhere.''' The help_popup() function is included in shared_functions.php and is therefore available globally in both the Soholaunch admin tool window as well as on the client (website) side. |
Revision as of 15:49, 14 July 2008
Within the Soholaunch product architecture there is a php function called help_popup. It standardizes the creation of popup layers that can be used to include help text or even config options.
Contents |
How to create a help popup within you plugin's php code
Basic Syntax
help_popup("popup-id-name", "title text", "My html content" [,additional inline css]);
Quick Example
<?php $popupHTML = "<p>This is my help pop-up. It explains stuff.</p>" $popupHTML .= "<p>And also explains some other stuff.</p>"; echo help_popup("pophelp-explain-stuff", "My Help Popup Explains Stuff", %popupHTML); ?> <span class="help_link" onlick="showid('pophelp-explain-stuff');">[?] Launch help popup</span>
Notes
- You can use it anywhere. The help_popup() function is included in shared_functions.php and is therefore available globally in both the Soholaunch admin tool window as well as on the client (website) side.