Dragonfly CMS logo Server sponsored and hosted by
DedicatedNOW
CVS logo  
.:: Home :: Dev. Resources :: Forums ::.
Dragonfly CMS CVS Repository
 Location: / cvs / themes / reDesign / theme.php
This is a web interface to the Dragonfly CMS CVS tree. You can browse the file hierarchy by picking directories. If you pick a file, you will see the revision history for that file.
Selecting a revision number will show that revision of the file. There are links at each revision to display diffs, annotate and download.
Note: Info about CVS and our commits can be found at our CVS Info Forum
File name: themes/reDesign/theme.php
Revision : 1.47 (4 years 7 months 1 weeks 4 days 22 hours 27 minutes 12 seconds ago) by estlane
Changed : +13 -3 lines
Comment: New Members List template.


# Author Rev Line
1 nanocaio 1.1 <?php
2 nanocaio 1.1 /*********************************************
3 nanocaio 1.1 CPG Dragonfly™ CMS
4 nanocaio 1.1 ********************************************
5 estlane 1.37 Copyright © 2004 - 2009 by CPG-Nuke Dev Team
6 nanocaio 1.1 http://dragonflycms.org
7 nanocaio 1.1  
8 nanocaio 1.1 Dragonfly is released under the terms and conditions
9 nanocaio 1.1 of the GNU GPL version 2 or any later version
10 nanocaio 1.1  
11 estlane 1.3 $Source: /cvs/themes/reDesign/theme.php,v $
12 estlane 1.47 $Revision: 1.46 $
13 estlane 1.3 $Author: estlane $
14 estlane 1.47 $Date: 2009/04/15 10:58:26 $
15 estlane 1.45 $Version: 9.2.2.1
16 nanocaio 1.1 **********************************************/
17 nanocaio 1.1 if (!defined('CPG_NUKE')) { exit; }
18 estlane 1.27  
19 estlane 1.27 //Required Dragonfly version
20 estlane 1.27 define('THEME_VERSION', '9.2');
21 nanocaio 1.1  
22 nanocaio 1.1 /* Text color on security image, THIS_THEME/images/code_bg.png */
23 estlane 1.36 $gfxcolor = '#000000';
24 nanocaio 1.1  
25 nanocaio 1.1 /* Some background colours used by DF */
26 estlane 1.37 $bgcolor1 = '#FFFFFF'; /*topics, modules admin*/
27 estlane 1.9 $bgcolor2 = '#F2F9F2';
28 estlane 1.37 $bgcolor3 = '#F2FFFF';/*topics*/
29 estlane 1.37 $bgcolor4 = '#D7FFD7';/*modules admin*/
30 estlane 1.9 $textcolor1 = '#009900';
31 estlane 1.21 $textcolor2 = '#000000';
32 estlane 1.9  
33 estlane 1.44 $hr = 1; /*deprecated? (not used in DF 10) */
34 nanocaio 1.1  
35 nanocaio 1.1 /* Beginning of an usual table of untemplated modules */
36 estlane 1.29 function OpenTable() {
37 estlane 1.41 global $no_border;
38 estlane 1.41  
39 estlane 1.41 //$no_border : coppermine/theme.inc and template/forums/images.cfg
40 estlane 1.29  
41 estlane 1.41 if (isset($no_border)) {
42 estlane 1.35 echo '<div>';
43 estlane 1.35 } else {
44 estlane 1.35 echo '<div class="table1">';
45 estlane 1.35 }
46 estlane 1.29 }
47 nanocaio 1.1 /* End of an usual table of untemplated modules */
48 nanocaio 1.1 function CloseTable() {echo '</div>';}
49 nanocaio 1.1  
50 nanocaio 1.1  
51 nanocaio 1.1 /* Beginning of some subtable in untemplated modules */
52 nanocaio 1.1 function OpenTable2() {echo '<div class="table2">';}
53 nanocaio 1.1 /* End of some subtable in untemplated modules */
54 nanocaio 1.1 function CloseTable2() {echo '</div>';}
55 nanocaio 1.1  
56 estlane 1.45 /*Current time, depends what df version is used*/
57 estlane 1.45 function current_time() {
58 estlane 1.45 //Dragonfly 10+
59 estlane 1.45 if (version_compare(CPG_NUKE, '10.0.0', '>=')) {
60 estlane 1.45 return time();
61 estlane 1.45 //Older
62 estlane 1.45 } else {
63 estlane 1.45 return gmtime();
64 estlane 1.45 }
65 estlane 1.45 }
66 nanocaio 1.1  
67 nanocaio 1.1 function themeheader() {
68 estlane 1.32 global $slogan, $sitename, $banners, $mainindex, $adminindex, $cpgtpl, $site_logo, $BASEHREF,
69 estlane 1.46 $CPG_SESS, $MAIN_CFG, $pagetitle, $userinfo, $module_name, $home, $Blocks, $my_page_title,
70 estlane 1.46 $multilingual, $currentlang, $no_border;
71 nanocaio 1.1  
72 estlane 1.41  
73 estlane 1.41 if ($MAIN_CFG['global']['maintenance'] && !is_admin()) {
74 estlane 1.41 echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
75 estlane 1.41 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
76 estlane 1.41 <html xmlns="http://www.w3.org/1999/xhtml" dir="'._TEXT_DIR.'" xml:lang="'._BROWSER_LANGCODE.'" lang="'._BROWSER_LANGCODE.'">
77 estlane 1.41 <head>
78 estlane 1.41 <title>'.$sitename.'</title>
79 estlane 1.41 </head>
80 estlane 1.41 <body>
81 estlane 1.41 <strong>'._SYS_MESSAGE.'</strong><br />'._SYS_MAINTENANCE.'
82 estlane 1.41 </body>
83 estlane 1.41 </html>';
84 estlane 1.41 return;
85 estlane 1.41 }
86 estlane 1.41  
87 nanocaio 1.1 /* CSS Menu */
88 nanocaio 1.1 if ($MAIN_CFG['global']['admingraphic'] & 4) {
89 nanocaio 1.1 include('themes/'.$CPG_SESS['theme'].'/includes/cssmainmenu.php');
90 nanocaio 1.1 }
91 nanocaio 1.1  
92 nanocaio 1.1 //include file to have proper language selection URL (or prevtheme)
93 estlane 1.43 require_once('themes/'.$CPG_SESS['theme'].'/includes/valikurl.php');
94 estlane 1.43 if ($multilingual) show_langs();//Make languageselection array if site is multilingual
95 nanocaio 1.1  
96 nanocaio 1.1 $user_agent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : '';
97 nanocaio 1.1 $pngfix = 0;
98 estlane 1.8 $specific = 0;
99 estlane 1.29 if (preg_match('#MSIE ([0-6].[0-9]{1,2})#', $user_agent)) {
100 nanocaio 1.1 $specific = 'ie6.css';
101 nanocaio 1.1 $pngfix = 1;
102 estlane 1.35 } else if (preg_match('#Opera/([0-9].[0-2][0-9])#', $user_agent)) {
103 estlane 1.31 $specific = 'opera_merlin.css';
104 estlane 1.35 } else if (isset($_SESSION['SECURITY']['UA']) && $_SESSION['SECURITY']['UA'] == 'Safari') {
105 nanocaio 1.1 $specific = 'safari.css';
106 nanocaio 1.1 }
107 estlane 1.20  
108 estlane 1.31  
109 nanocaio 1.1 //We want to use some strings, which exists only in forums.php languagefile, it may cause a small downtime though
110 estlane 1.37 if (!isset($lang['Back_to_top'])) {
111 estlane 1.37 get_lang('forums');
112 estlane 1.37 global $lang;
113 estlane 1.37 }
114 estlane 1.26 if (!defined('_PASSWORDLOST')) { get_lang('your_account'); }
115 estlane 1.37  
116 estlane 1.47 $modspecific_css = '';
117 estlane 1.47  
118 estlane 1.47 if ($module_name == 'Members_List') {
119 estlane 1.47 $modspecific_css = 'memberslist.css';
120 estlane 1.47 }
121 estlane 1.47  
122 estlane 1.47 if ($modspecific_css) {
123 estlane 1.47 $modspecific_css = '<link rel="stylesheet" type="text/css" media="screen" href="themes/'.$CPG_SESS['theme'].'/style/modules/'.$modspecific_css.'" />';
124 estlane 1.47 }
125 nanocaio 1.1  
126 estlane 1.6 /*Add left blocks to header.html*/
127 estlane 1.6 $Blocks->display('l');
128 estlane 1.17 /*Add right blocks to header.html*/
129 estlane 1.6 $Blocks->display('r');
130 estlane 1.6  
131 nanocaio 1.1 $cpgtpl->assign_vars(array(
132 estlane 1.38 'BROWSER_CSS' => $specific ? "\n".'<link rel="stylesheet" type="text/css" href="themes/'.$CPG_SESS['theme'].'/style/browsers/'.$specific.'" />'."\n" : "\n",
133 estlane 1.38 'PNG_FIX' => $pngfix ? '<script defer="defer" type="text/javascript" src="themes/'.$CPG_SESS['theme'].'/javascript/pngfix.js"></script>'."\n" : '',
134 estlane 1.38 'PUBLIC_HEADER' => !defined('ADMIN_PAGES'),
135 estlane 1.38 'CURRENT_URL' => ereg_replace('&','&amp;',get_uri()),
136 estlane 1.38 'B_L_VISIBLE' => $Blocks->hideblock('600') ? ' style=" display: none"' : '',
137 estlane 1.38 'B_R_VISIBLE' => $Blocks->hideblock('601') ? ' style=" display: none"' : '',
138 estlane 1.41 //'B_CENTERBLOCKS'=> $Blocks->c,
139 estlane 1.38 'S_MAIN_MENU' => isset($mmcontent) ? $mmcontent : false,
140 estlane 1.38 'S_LIMAGE' => ($Blocks->l)? ($Blocks->hideblock('600')? 'left_plus' : 'left_minus') : '',
141 estlane 1.38 'S_RIMAGE' => ($Blocks->r)? ($Blocks->hideblock('601')? 'right_plus' : 'right_minus') : '',
142 estlane 1.38 'S_IS_ADMIN' => is_admin(),
143 estlane 1.38 'ALL_OK' => !$MAIN_CFG['global']['maintenance'] || is_admin(),
144 estlane 1.38 'S_CAN_ADMIN' => can_admin(),
145 estlane 1.38 'S_IS_USER' => is_user(),
146 estlane 1.38 'B_ANONYMOUS' => !is_user(),
147 estlane 1.38 'S_NEW_PM' => is_user() && is_active('Private_Messages') && ($userinfo['user_new_privmsg'] > 0)?(($userinfo['user_new_privmsg']>1)?$lang['You_new_pms']:$lang['You_new_pm']):false,
148 estlane 1.38 'S_LOGO' => $site_logo,
149 estlane 1.38 'S_SITENAME' => $sitename,
150 estlane 1.38 'S_USER_NAME' => $userinfo['username'],
151 estlane 1.38 'S_LOGINRDRT' => (isset($CPG_SESS['user']['redirect']) ? $CPG_SESS['user']['redirect'] : getlink()),
152 estlane 1.38 'S_REG_ALLOWED' => $MAIN_CFG['member']['allowuserreg'],
153 estlane 1.38 'S_NOT_NEWS' => ($module_name != 'News') || $home,
154 estlane 1.38 'MY_PAGE_TITLE' => (($module_name != 'Forums') && ($module_name != 'Wiki') && ($module_name != 'coppermine'))? '<a href="'.$mainindex.'">'._HOME.'</a> '._BC_DELIM.' '.$pagetitle : '',
155 estlane 1.38 'CUR_LANGUAGE' => $currentlang,
156 estlane 1.38 'S_FORUMS' => _ForumsLANG,
157 estlane 1.38 'S_DOWNLOADS' => is_active('Downloads') ? _DownloadsLANG : false,
158 estlane 1.38 'S_MY_ACCOUNT' => is_user() ? _Your_AccountLANG : _BREG,
159 estlane 1.38 'S_ADMINISTR' => _ADMINISTRATION,
160 estlane 1.38 'BC_DELIM' => _BC_DELIM,
161 estlane 1.38 'S_BANNER_ACT' => $banners,
162 estlane 1.38 'S_BANNER' => ($banners) ? viewbanner() : '',
163 estlane 1.38 'S_EDIT' => _EDIT,
164 estlane 1.38 'S_MULTILANG' => $multilingual,
165 estlane 1.38 'S_SEARCH_ACT' => is_active('Search'),
166 estlane 1.38 'U_SEARCH' => getlink('Search'),
167 estlane 1.38 'U_MAININDEX' => $mainindex,
168 estlane 1.38 'U_LOGOUT' => getlink('Your_Account&amp;op=logout&amp;redirect'),
169 estlane 1.38 'U_REGISTER' => getlink('Your_Account&amp;file=register'),
170 estlane 1.38 'U_PASSLOSS' => getlink('Your_Account&amp;op=pass_lost'),
171 estlane 1.38 'U_DOWNLOADS' => getlink('Downloads'),
172 estlane 1.38 'U_FORUMS' => getlink('Forums'),
173 estlane 1.38 'U_LOG_IN' => getlink('Your_Account'),
174 estlane 1.38 'U_MY_ACCOUNT' => getlink(is_user() ? 'Your_Account' : 'Your_Account&amp;file=register'),
175 estlane 1.38 'U_PM' => getlink('Private_Messages'),
176 estlane 1.38 'U_ADMININDEX' => $adminindex,
177 estlane 1.38 'U_NEWSADMIN' => adminlink('News&amp;edit='),
178 estlane 1.38 'S_LASTVISIT' => is_user() ? sprintf($lang['You_last_visit'], formatDateTime($userinfo['user_lastvisit'], _DATESTRING)) : '',
179 estlane 1.45 'S_TIMENOW' => sprintf($lang['Current_time'], formatDateTime(current_time(), _DATESTRING)),
180 estlane 1.38 'S_NEW_POSTS' => $lang['New_posts'],
181 estlane 1.38 'S_CLOSE_WIN' => $lang['Close_window'],
182 estlane 1.38 'BACK_TO_TOP' => $lang['Back_to_top'],
183 estlane 1.38 'PM_IMAGE' => 'themes/'.$CPG_SESS['theme'].'/images/forums/lang_'.$currentlang.'/icon_contact_pm.gif',
184 estlane 1.38 'WWW_IMAGE' => 'themes/'.$CPG_SESS['theme'].'/images/forums/lang_'.$currentlang.'/icon_contact_www.gif',
185 estlane 1.38 'BASE_URL' => $BASEHREF,
186 estlane 1.42 'HEADVARS_OK' => 1, //makes possible to check if we need to reassign some vars in footer if this is false
187 estlane 1.47 'B_DRAGON_10' => version_compare(CPG_NUKE, '10.0.0', '>='), //If Dragonfly version is 10+
188 estlane 1.47 'S_MODULE_SPECIFIC_CSS' => $modspecific_css,
189 nanocaio 1.1 ));
190 estlane 1.6  
191 nanocaio 1.1 }
192 nanocaio 1.1  
193 nanocaio 1.1 function themefooter() {
194 estlane 1.38 global $MAIN_CFG, $cpgtpl, $banners;
195 estlane 1.6  
196 estlane 1.38 if ($MAIN_CFG['global']['maintenance'] && !is_admin()) {
197 estlane 1.38 echo '</body></html>';
198 estlane 1.38 return;
199 estlane 1.38 }
200 estlane 1.38  
201 estlane 1.38 $cpgtpl->assign_vars(array(
202 estlane 1.38 'S_BANNER_ACT' => $banners,
203 estlane 1.38 'S_BANNER' => ($banners) ? viewbanner() : '',
204 estlane 1.38 'S_FOOTER' => footmsg()
205 estlane 1.38 ));
206 estlane 1.37  
207 estlane 1.37  
208 estlane 1.38 /*
209 estlane 1.37 In case the template array gets emptied, i.e during forums admin messages
210 estlane 1.37 We assign some again, that are also used in footer
211 estlane 1.38 */
212 estlane 1.42  
213 estlane 1.43 //Dragonfly 10 or load only if needed
214 estlane 1.42 if (version_compare(CPG_NUKE, '10.0.0', '>=') || !isset($cpgtpl->_tpldata['.'][0]['HEADVARS_OK'])) {
215 estlane 1.42  
216 estlane 1.38 global $CPG_SESS, $mainindex, $adminindex;
217 estlane 1.37  
218 estlane 1.37 /* CSS Menu */
219 estlane 1.37 if ($MAIN_CFG['global']['admingraphic'] & 4) {
220 estlane 1.37 include('themes/'.$CPG_SESS['theme'].'/includes/cssmainmenu.php');
221 estlane 1.37 }
222 estlane 1.37 //We want to use some strings, which exists only in forums.php languagefile, it may cause a small downtime though
223 estlane 1.37 if (!isset($lang['Back_to_top'])) {
224 estlane 1.37 get_lang('forums');
225 estlane 1.37 global $lang;
226 estlane 1.37 }
227 estlane 1.37 if (!defined('_PASSWORDLOST')) { get_lang('your_account'); }
228 estlane 1.37  
229 estlane 1.42 $cpgtpl->assign_vars(array(
230 estlane 1.42 'CURRENT_URL' => ereg_replace('&','&amp;',get_uri()),
231 estlane 1.45 'S_TIMENOW' => sprintf($lang['Current_time'], formatDateTime(current_time(), _DATESTRING)),
232 estlane 1.37 'S_IS_USER' => is_user(),
233 estlane 1.37 'S_LASTVISIT' => is_user() ? sprintf($lang['You_last_visit'], formatDateTime($userinfo['user_lastvisit'], _DATESTRING)) : '',
234 estlane 1.37 'BACK_TO_TOP' => $lang['Back_to_top'],
235 estlane 1.37 'S_MAIN_MENU' => isset($mmcontent) ? $mmcontent : false,
236 estlane 1.37 'U_MAININDEX' => $mainindex,
237 estlane 1.37 'U_DOWNLOADS' => getlink('Downloads'),
238 estlane 1.37 'U_FORUMS' => getlink('Forums'),
239 estlane 1.37 'U_MY_ACCOUNT' => getlink(is_user() ? 'Your_Account' : 'Your_Account&amp;file=register'),
240 estlane 1.37 'U_ADMININDEX' => $adminindex,
241 estlane 1.37 'S_DOWNLOADS' => is_active('Downloads') ? _DownloadsLANG : false,
242 estlane 1.37 'S_FORUMS' => _ForumsLANG,
243 estlane 1.37 'S_MY_ACCOUNT' => is_user() ? _Your_AccountLANG : _BREG,
244 estlane 1.37 'S_ADMINISTR' => _ADMINISTRATION
245 estlane 1.42 ));
246 estlane 1.42 }
247 estlane 1.37  
248 estlane 1.37  
249 nanocaio 1.1 $cpgtpl->set_filenames(array('footer' => 'footer.html'));
250 nanocaio 1.1 $cpgtpl->display('footer');
251 nanocaio 1.1 }
252 nanocaio 1.1  
253 nanocaio 1.1  
254 estlane 1.34  
255 estlane 1.34  
256 nanocaio 1.1 /***********************************************************************************
257 nanocaio 1.1  
258 nanocaio 1.1 string theme_open_form
259 nanocaio 1.1  
260 nanocaio 1.1 Creates start tag for form
261 nanocaio 1.1 $get_link : link for action default blank
262 nanocaio 1.1 $form_name : useful for styling and nbbcode
263 nanocaio 1.1 $legend: optional string value is used in form lagend tag
264 nanocaio 1.1 $border: optional use 1 to not show border on fieldset from stylesheet
265 nanocaio 1.1 ************************************************************************************/
266 nanocaio 1.1 function theme_open_form($link, $form_name=false, $legend=false,$tborder=false) {
267 estlane 1.41 $leg = $legend ? '<legend>'.$legend.'</legend>' : '';
268 nanocaio 1.1 $bord = $tborder ? $tborder : '';
269 nanocaio 1.1 $form_name = $form_name ? ' id="'.$form_name.'"' :'';
270 nanocaio 1.1 return '<form method="post" action="'.$link.'"'.$form_name.' enctype="multipart/form-data" accept-charset="utf-8"><fieldset '.$bord.'>'.$leg;
271 nanocaio 1.1 }
272 estlane 1.34  
273 nanocaio 1.1 function theme_close_form() {
274 nanocaio 1.1 return '</fieldset></form>';
275 nanocaio 1.1 }
276 estlane 1.34  
277 estlane 1.34  
278 estlane 1.34  
279 nanocaio 1.1 /***********************************************************************************
280 nanocaio 1.1  
281 nanocaio 1.1 string theme_yesno_option
282 nanocaio 1.1  
283 nanocaio 1.1 Creates 2 radio buttons with a Yes and No option
284 nanocaio 1.1 $name : name for the <input>
285 nanocaio 1.1 $value: current value, 1 = yes, 0 = no
286 nanocaio 1.1  
287 nanocaio 1.1 ************************************************************************************/
288 nanocaio 1.1 function theme_yesno_option($name, $value=0) {
289 estlane 1.33  
290 estlane 1.33 $sel = array('','');
291 estlane 1.35 $sel[$value] = ' checked="checked"';
292 estlane 1.33  
293 estlane 1.33 $select = '<input type="radio" name="'.$name.'" id="'.$name.'" value="1"'.$sel[1].' />
294 estlane 1.35 <label class="rdr" for="'.$name.'">'._YES.'</label>
295 estlane 1.35 <input type="radio" name="'.$name.'" id="'.$name.'" value="0" '.$sel[0].' />
296 estlane 1.35 <label class="rd" for="'.$name.'">'._NO.'</label> ';
297 estlane 1.35 return $select;
298 estlane 1.34 }
299 estlane 1.33  
300 estlane 1.33  
301 estlane 1.33  
302 estlane 1.33  
303 nanocaio 1.1 /***********************************************************************************
304 nanocaio 1.1  
305 nanocaio 1.1 string theme_select_option
306 nanocaio 1.1  
307 nanocaio 1.1 Creates a selection dropdown box of all given variables in the array
308 nanocaio 1.1 $name : name for the <select>
309 nanocaio 1.1 $value: current/default value
310 nanocaio 1.1 $array: array like array("value1","value2")
311 nanocaio 1.1  
312 nanocaio 1.1 ************************************************************************************/
313 nanocaio 1.1 function theme_select_option($name, $value, $array) {
314 nanocaio 1.1 $sel[$value] = ' selected="selected"';
315 nanocaio 1.1 $select = '<select class="set" name="'.$name.'" id="'.$name."\">\n";
316 nanocaio 1.1 foreach($array as $var) {
317 estlane 1.41 $select .= '<option'.(isset($sel[$var])?$sel[$var]:'').'>'.$var."</option>\n";
318 nanocaio 1.1 }
319 nanocaio 1.1 return $select.'</select>';
320 nanocaio 1.1 }
321 estlane 1.34  
322 estlane 1.34  
323 estlane 1.34  
324 nanocaio 1.1 /***********************************************************************************
325 nanocaio 1.1  
326 nanocaio 1.1 string theme_select_box
327 nanocaio 1.1  
328 nanocaio 1.1 Creates a selection dropdown box of all given variables in the multi array
329 nanocaio 1.1 $name : name for the <select>
330 nanocaio 1.1 $value: current/default value
331 nanocaio 1.1 $array: array like array("value1 => title1","value2 => title2")
332 nanocaio 1.1  
333 nanocaio 1.1 ************************************************************************************/
334 nanocaio 1.1 function theme_select_box($name, $value, $array) {
335 nanocaio 1.1 $select = '<select class="set" name="'.$name.'" id="'.$name."\">\n";
336 nanocaio 1.1 foreach($array as $val => $title) {
337 estlane 1.41 $select .= '<option value="'.$val.'"'.(($val==$value)? ' selected="selected"' : '').'>'.$title."</option>\n";
338 nanocaio 1.1 }
339 nanocaio 1.1 return $select.'</select>';
340 nanocaio 1.1 }


Code Credits - Privacy Policy