Help popup
From Sohowiki
(Difference between revisions)
(→Naming conventions) |
(→Naming conventions) |
||
Line 23: | Line 23: | ||
'''Preferred ID name prefixes...''' | '''Preferred ID name prefixes...''' | ||
− | + | ;'''pophelp-''' : Use for most help popups, if it contains purely information. | |
− | + | ;'''popconfig-''' : Use if popup contains config form. | |
==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:59, 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>
Naming conventions
Generally, we have a convention for prefixing the id name of the popup layer.
Preferred ID name prefixes...
- pophelp-
- Use for most help popups, if it contains purely information.
- popconfig-
- Use if popup contains config form.
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.