@@ -45,14 +45,14 @@ discard block |
||
45 | 45 | { |
46 | 46 | $gallery_info = new stdClass(); |
47 | 47 | $gallery_info->srl = rand(111111, 999999); |
48 | - $gallery_info->border_thickness = (int)$xml_obj->attrs->border_thickness; |
|
48 | + $gallery_info->border_thickness = (int) $xml_obj->attrs->border_thickness; |
|
49 | 49 | $gallery_info->gallery_style = $xml_obj->attrs->gallery_style; |
50 | 50 | $color_preg = "/^([a-fA-F0-9]{6})/"; |
51 | - $gallery_info->border_color = preg_replace($color_preg,"#$1",$xml_obj->attrs->border_color); |
|
52 | - $gallery_info->bg_color = preg_replace($color_preg,"#$1",$xml_obj->attrs->bg_color); |
|
51 | + $gallery_info->border_color = preg_replace($color_preg, "#$1", $xml_obj->attrs->border_color); |
|
52 | + $gallery_info->bg_color = preg_replace($color_preg, "#$1", $xml_obj->attrs->bg_color); |
|
53 | 53 | $gallery_info->gallery_align = $xml_obj->attrs->gallery_align; |
54 | 54 | |
55 | - if(!in_array($gallery_info->gallery_align, array('left', 'center', 'right'))) { |
|
55 | + if (!in_array($gallery_info->gallery_align, array('left', 'center', 'right'))) { |
|
56 | 56 | $gallery_info->gallery_align = 'center'; |
57 | 57 | } |
58 | 58 | |
@@ -62,10 +62,10 @@ discard block |
||
62 | 62 | $gallery_info->images_list = preg_grep("/^[a-z0-9\/]+\.(gif|jpe?g|png)+$/i", $images_list); |
63 | 63 | |
64 | 64 | // If you set the output to output the XML code generated a list of the image |
65 | - if(Context::getResponseMethod() == 'XMLRPC') |
|
65 | + if (Context::getResponseMethod() == 'XMLRPC') |
|
66 | 66 | { |
67 | 67 | $output = array(); |
68 | - for($i=0;$i<count($gallery_info->images_list);$i++) |
|
68 | + for ($i = 0; $i < count($gallery_info->images_list); $i++) |
|
69 | 69 | { |
70 | 70 | $output[] = sprintf('<img src="%s" alt="" />', $gallery_info->images_list[$i]); |
71 | 71 | } |
@@ -73,16 +73,16 @@ discard block |
||
73 | 73 | return implode('<br />', $output); |
74 | 74 | } |
75 | 75 | // HTML gallery output, the output settings via the template for the conversion to generate the html code should |
76 | - preg_match_all('/(width|height)([^[:digit:]]+)([0-9]+)/i',$xml_obj->attrs->style,$matches); |
|
76 | + preg_match_all('/(width|height)([^[:digit:]]+)([0-9]+)/i', $xml_obj->attrs->style, $matches); |
|
77 | 77 | $gallery_info->width = trim($matches[3][0]); |
78 | - if(!$gallery_info->width) $gallery_info->width = 400; |
|
78 | + if (!$gallery_info->width) $gallery_info->width = 400; |
|
79 | 79 | |
80 | 80 | Context::set('gallery_info', $gallery_info); |
81 | 81 | |
82 | 82 | $tpl_path = $this->component_path.'tpl'; |
83 | 83 | Context::set("tpl_path", $tpl_path); |
84 | 84 | |
85 | - if($gallery_info->gallery_style == "list") $tpl_file = 'list_gallery.html'; |
|
85 | + if ($gallery_info->gallery_style == "list") $tpl_file = 'list_gallery.html'; |
|
86 | 86 | else $tpl_file = 'slide_gallery.html'; |
87 | 87 | |
88 | 88 | $oTemplate = &TemplateHandler::getInstance(); |