skip to content

 Web design 

Database-driven systems

Easy-to-maintain web sites


 



ShadowBox Droplet

This Droplet will display your content from a specified section inside a shadowed box. 
There are a variety of border colors available. Most of them use a ridged border with a white background 
but there are a few boxes that use a slightly different style.

To see examples of the available styles, click here.

The droplet accepts the following parms:

  • section=section id
  • style=the style for the box (box_color - default box_black)
  • title=your title (places a bolded title at the top of the box)
  • width=box width (default 100%)

The droplet code it provided below. You can copy it and add it to your droplets by
going to Admin-Tools and the Droplet section.

 

Shadow Box droplet include filedownloads: 700 | type: php | size: 0 kB

You need to download this file and insert it into a new directory:
include/droplet_include/shadowbox

 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/*
     ShadowBox droplet
     Version 1
     Chris Shea
     Feb 16, 2011
 
     This allows you to display a specific section inside a shadow box.
 
     The format with the parms is as follows:
     [[x_boxes?section=the_section_id&style=box_style&title=the title&width=the box width]]
 
     The styles are pre-defined in the module box_def_1.0.php which must be placed in
     includes/droplet_includes_shadowbox
 
*/
 
// [[x_boxes?section=the_section_id&style=box_bold_plain&title=width=]]
 
global $database, $wb;
 
     include_once WB_PATH."/include/droplet_include/shadowbox/box_def_1.0.php";
 
 
     if ($section == "") {
          return "<br>No section number provided ";
     }
 
     if ($style == "") {
          $style = "box_black";
     }
 
     if ($width == "") {
          $width = "100%";
     }
 
     if ($title == "") {
          $title2 == "";
     }
     else {
          $title2 = $title;
     }
 
 
      $get_content = $database->query("SELECT content FROM ".TABLE_PREFIX."mod_wysiwyg WHERE section_id = '$section'");
      $fetch_content = $get_content->fetchRow();
      $content = ($fetch_content['content']);
      $wb->preprocess($content);
 
 
      // instead of echoing anything here, you return it and the droplet writes it out.
 
     $content2 = "<div class=$style width=$width><strong><font size=4>$title2</font></strong><br />$content</div>";
 
 
return $content2;
 
   

Powered by Website Baker,
Design by Innovations Design based on a template by gavjof