php Zomag Yellow Designed by HPA Coded by misbah ini_misbah yahoo com

  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
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
<?php
/**
* Zomag Yellow
* Designed by HPA
* Coded by misbah (ini_misbah@yahoo.com)
*/
if ( function_exists('register_sidebar') ) {
register_sidebar(array(
'name' => 'Main Sidebar',
'before_widget' => '<li id="%1$s" class="widget %2$s"><div class="widget-in">',
'after_widget' => '</div></li>',
'before_title' => '<h2 class="widgettitle">',
'after_title' => '</h2>',
));
register_sidebar(array(
'name' => 'Front Widget',
'before_widget' => '<div id="%1$s" class="widget %2$s">',
'after_widget' => '</div>',
'before_title' => '<h2>',
'after_title' => '</h2>',
));
register_sidebars(2,array(
'name' => 'Small Sidebar %d',
'before_widget' => '<li>',
'after_widget' => '</li>',
'before_title' => '<h2>',
'after_title' => '</h2>',
));
}
//Check for widgets in widget-ready areas http://wordpress.org/support/topic/190184?replies=7#post-808787
//Thanks to Chaos Kaizer http://blog.kaizeku.com/
function is_sidebar_active( $index = 1){
$sidebars = wp_get_sidebars_widgets();
$key = (string) 'sidebar-'.$index;
return (isset($sidebars[$key]));
}
function my_excerpt($str)
{
$arrStr = explode(' ', $str);
if(count($arrStr) > 20){
$arrStr = array_slice($arrStr,0,20);
$str = implode(' ',$arrStr);
}
echo $str;
}
require_once(TEMPLATEPATH . '/widget.php');
include(dirname(__FILE__).'/themetoolkit.php');
$themeName = 'Promag Theme';
$codename = "promag";
$getCategories = get_categories('hide_empty=0&hierarchical=1');
$catArray = array();
foreach ($getCategories as $cat) {
$catArray[$cat->cat_ID] = $cat->cat_name;
}
array_unshift($catArray, "Select a category:");
$numberEntries = '|0|Select a Number:|1|1|2|2|3|3|4|4|5|5|6|6|7|7|8|8|9|9|10|10|12|12|14|14|16|16|18|18|20|20';
$catTmp = '';
foreach ($catArray as $key=>$cat) {
$catTmp .= "|$cat|$cat";
}
themetoolkit(
$codename,
array(
'separator1' => 'Featured Post Settings {separator}',
'featuredCat' => 'Featured Post Category {select'.$catTmp.'} ## Select the category that you would like to have displayed in the top featured post section on your homepage.',
'featuredWidth' => 'Featured Width ## Enter width your featured (default 630) pixel.',
'featuredHeight' => 'Featured Height ## Enter height your featured (default 350) pixel.',
'separator2' => 'Sliding Panel Settings {separator}',
'slideCat' => 'Sliding Panel Category {select'.$catTmp.'} ## Select the category that you would like to have displayed on the sliding.',
'slideNum' => 'Number of sliding panel {select'.$numberEntries.'} ## Select the number of posts to display.',
'feedBurnerID' => 'Feedburner ID ## Your feedburner ID',
'imageLogo' => 'Logo ## Your Logo Url (leave empty for default (text) logo',
),
__FILE__ /* Parent. DO NOT MODIFY THIS LINE !
* This is used to check which file (and thus theme) is calling
* the function (useful when another theme with a Theme Toolkit
* was installed before */
);
if (!$$codename->is_installed()) {
$set_defaults['featuredWidth'] = '630';
$set_defaults['featuredHeight'] = '350';
$result = $$codename->store_options($set_defaults);
}
?>