Help popup

From Sohowiki
Revision as of 15:56, 14 July 2008 by Soho (Talk | contribs)
Jump to: navigation, search

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.
Personal tools