1 | <?php
|
---|
2 | if( ! defined( 'XOOPS_ROOT_PATH' ) ) exit ;
|
---|
3 | $mydirname = basename( dirname( dirname( __FILE__ ) ) ) ;
|
---|
4 |
|
---|
5 | eval( '
|
---|
6 | function b_'.$mydirname.'_tag_cloud_show($options){
|
---|
7 | return _b_tag_cloud_show($options) ;
|
---|
8 | }
|
---|
9 | function b_'.$mydirname.'_tag_cloud_edit($options){
|
---|
10 | return _b_tag_cloud_edit($options) ;
|
---|
11 | }
|
---|
12 | ' ) ;
|
---|
13 |
|
---|
14 | if( ! defined( 'XPRESS_TAG_CLOUD_BLOCK_INCLUDED' ) ) {
|
---|
15 | define( 'XPRESS_TAG_CLOUD_BLOCK_INCLUDED' , 1 ) ;
|
---|
16 |
|
---|
17 | function _b_tag_cloud_edit($options)
|
---|
18 | {
|
---|
19 | $mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ;
|
---|
20 | $this_template = empty( $options[1] ) ? 'db:'.$mydirname.'_tag_cloud_block.html' : trim( $options[1] );
|
---|
21 | $smallest = !is_numeric( $options[2] ) ? 8 : $options[2] ;
|
---|
22 | $largest = !is_numeric( $options[3] ) ? 22 : $options[3] ;
|
---|
23 | $unit = empty( $options[4] ) ? 'pt' : $options[4] ;
|
---|
24 | $number = !is_numeric( $options[5] ) ? 45 : $options[5] ;
|
---|
25 | $format = empty( $options[6] ) ? 'flat' : $options[6] ;
|
---|
26 | $orderby = empty( $options[7] ) ? 'name' : $options[7] ;
|
---|
27 | $order = empty( $options[8] ) ? 'ASC' : $options[8] ;
|
---|
28 | $exclude = is_null( $options[9] ) ? '' : $options[9] ;
|
---|
29 | $wp_include = is_null( $options[10] ) ? '' : $options[10] ;
|
---|
30 |
|
---|
31 | require_once(XOOPS_ROOT_PATH.'/modules/'.$mydirname.'/blocks/block_common.php');
|
---|
32 |
|
---|
33 | $form = "MyDirectory <input type='text' name='options[0]' value='" . $mydirname . "' /><br />";
|
---|
34 | $form .= "<input type='hidden' name='options[1]' id='this_template' value='".htmlspecialchars($this_template,ENT_QUOTES)."' /><br />";
|
---|
35 | $form .= "<br />";
|
---|
36 | $form .= _MB_XP2_CLOUD_SMALLEST .": <input type='text' size='4' name='options[2]' value='" . $smallest . "' /><br />";
|
---|
37 | $form .= _MB_XP2_CLOUD_LARGEST .": <input type='text' size='4' name='options[3]' value='" . $largest . "' /><br />";
|
---|
38 | $form .= _MB_XP2_CLOUD_UNIT .": ";
|
---|
39 | $form .= "<select name='options[4]'>";
|
---|
40 | if ($unit =='pt')
|
---|
41 | $form .= "<option value='pt' selected='selected'>pt";
|
---|
42 | else
|
---|
43 | $form .= "<option value='pt'>pt";
|
---|
44 | if ($unit =='px')
|
---|
45 | $form .= "<option value='px' selected='selected'>px";
|
---|
46 | else
|
---|
47 | $form .= "<option value='px'>px";
|
---|
48 | if ($unit =='em')
|
---|
49 | $form .= "<option value='em' selected='selected'>em";
|
---|
50 | else
|
---|
51 | $form .= "<option value='em'>em";
|
---|
52 | if ($unit =='%')
|
---|
53 | $form .= "<option value='%' selected='selected'>%";
|
---|
54 | else
|
---|
55 | $form .= "<option value='%'>%";
|
---|
56 | $form .= "</select><br/>";
|
---|
57 |
|
---|
58 | $form .= _MB_XP2_CLOUD_NUMBER .": <input type='text' size='4' name='options[5]' value='" . $number . "' /><br />";
|
---|
59 |
|
---|
60 | $form .= _MB_XP2_CLOUD_FORMAT .": ";
|
---|
61 | $form .= "<select name='options[6]'>";
|
---|
62 | if ($format =='flat')
|
---|
63 | $form .= "<option value='flat' selected='selected'>" . _MB_XP2_FLAT;
|
---|
64 | else
|
---|
65 | $form .= "<option value='flat'>" . _MB_XP2_FLAT;
|
---|
66 | if ($format =='list')
|
---|
67 | $form .= "<option value='list' selected='selected'>". _MB_XP2_LIST;
|
---|
68 | else
|
---|
69 | $form .= "<option value='list'>". _MB_XP2_LIST;
|
---|
70 | $form .= "</select><br/>";
|
---|
71 |
|
---|
72 | $form .= _MB_XP2_CLOUD_ORDERBY .": ";
|
---|
73 | $form .= "<select name='options[7]'>";
|
---|
74 | if ($orderby =='name')
|
---|
75 | $form .= "<option value='name' selected='selected'>". _MB_XP2_TAG_NAME;
|
---|
76 | else
|
---|
77 | $form .= "<option value='name'>". _MB_XP2_TAG_NAME;
|
---|
78 | if ($orderby =='count')
|
---|
79 | $form .= "<option value='count' selected='selected'>". _MB_XP2_TAG_COUNT;
|
---|
80 | else
|
---|
81 | $form .= "<option value='count'>". _MB_XP2_TAG_COUNT;
|
---|
82 | $form .= "</select><br/>";
|
---|
83 |
|
---|
84 | $form .= _MB_XP2_CLOUD_ORDER .": ";
|
---|
85 | $form .= "<select name='options[8]'>";
|
---|
86 | if ($order =='ASC')
|
---|
87 | $form .= "<option value='ASC' selected='selected'>" . _MB_XP2_SORT_ASC;
|
---|
88 | else
|
---|
89 | $form .= "<option value='ASC'>" . _MB_XP2_SORT_ASC;
|
---|
90 | if ($order =='DESC')
|
---|
91 | $form .= "<option value='DESC' selected='selected'>" . _MB_XP2_SORT_DESC;
|
---|
92 | else
|
---|
93 | $form .= "<option value='DESC'>" . _MB_XP2_SORT_DESC;
|
---|
94 | if ($order =='RAND')
|
---|
95 | $form .= "<option value='RAND' selected='selected'>" . _MB_XP2_RAND;
|
---|
96 | else
|
---|
97 | $form .= "<option value='RAND'>" . _MB_XP2_RAND;
|
---|
98 | $form .= "</select><br/>";
|
---|
99 |
|
---|
100 | $form .= _MB_XP2_CLOUD_EXCLUDE .": <input type='text' size='25' name='options[9]' value='" . $exclude . "' /><br />";
|
---|
101 | $form .= _MB_XP2_CLOUD_INCLUDE .": <input type='text' size='25' name='options[10]' value='" . $wp_include . "' /><br />";
|
---|
102 |
|
---|
103 |
|
---|
104 | // $form .="<br /><input type='text' size='60' name='options[8]' id='this_template' value='".htmlspecialchars($this_template,ENT_QUOTES)."' />";
|
---|
105 |
|
---|
106 | return $form;
|
---|
107 | }
|
---|
108 |
|
---|
109 | function _b_tag_cloud_show($options)
|
---|
110 | {
|
---|
111 | $mydirname = empty( $options[0] ) ? 'xpress' : $options[0] ;
|
---|
112 | $mydirpath = XOOPS_ROOT_PATH . '/modules/' . $mydirname;
|
---|
113 | $block_function_name = basename( __FILE__ );
|
---|
114 |
|
---|
115 | require_once $mydirpath.'/include/xpress_block_render.php';
|
---|
116 | return xpress_block_render($mydirname,$block_function_name,$options);
|
---|
117 | }
|
---|
118 |
|
---|
119 | }
|
---|
120 |
|
---|
121 | ?> |
---|