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.6 (6 years 6 months 3 weeks 1 days 2 hours 50 minutes 22 seconds ago) by estlane
Changed : +17 -9 lines
Comment: Pure magic...
No, actually updated the blocks to be only on right side. Added an extra table for that, it was the best solution again.


# Author Rev Line
1 nanocaio 1.1 <?php
2 nanocaio 1.1 /*********************************************
3 nanocaio 1.1 CPG Dragonfly™ CMS
4 nanocaio 1.1 ********************************************
5 nanocaio 1.1 Copyright © 2004 - 2007 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.6 $Revision: 1.5 $
13 estlane 1.3 $Author: estlane $
14 estlane 1.6 $Date: 2007/09/23 01:13:51 $
15 nanocaio 1.1 **********************************************/
16 nanocaio 1.1 if (!defined('CPG_NUKE')) { exit; }
17 nanocaio 1.1 //Theme versions' first two digits must be same as DF's version it's built for (i.e 9.1)
18 nanocaio 1.1 //Last two are theme's version(i.e 1.0)
19 nanocaio 1.1 define('THEME_VERSION', '9.1.1.0');
20 nanocaio 1.1  
21 nanocaio 1.1 /* Text color on security image, THIS_THEME/images/code_bg.png */
22 nanocaio 1.1 $gfxcolor = '#1A712B';
23 nanocaio 1.1  
24 nanocaio 1.1 /* Some background colours used by DF */
25 nanocaio 1.1 $bgcolor1 = '#FFFFFF';
26 nanocaio 1.1 $bgcolor2 = '#F2F9F2';/*darker*/
27 nanocaio 1.1 $bgcolor3 = '#F2FFFF';/*lighter*/
28 nanocaio 1.1 $bgcolor4 = '#D7FFD7';
29 nanocaio 1.1  
30 nanocaio 1.1 /* Some text colours used by DF */
31 nanocaio 1.1 $textcolor1 = '#009900';
32 nanocaio 1.1 $textcolor2 = '#000000';
33 nanocaio 1.1  
34 nanocaio 1.1 /* If value is 1 not 0, then in comments hr is shown instead of table bgcolor */
35 nanocaio 1.1 $hr = 1;
36 nanocaio 1.1  
37 nanocaio 1.1 /* Beginning of an usual table of untemplated modules */
38 nanocaio 1.1 function OpenTable() {echo '<div class="table1">';}
39 nanocaio 1.1 /* End of an usual table of untemplated modules */
40 nanocaio 1.1 function CloseTable() {echo '</div>';}
41 nanocaio 1.1  
42 nanocaio 1.1  
43 nanocaio 1.1 /* Beginning of some subtable in untemplated modules */
44 nanocaio 1.1 function OpenTable2() {echo '<div class="table2">';}
45 nanocaio 1.1 /* End of some subtable in untemplated modules */
46 nanocaio 1.1 function CloseTable2() {echo '</div>';}
47 nanocaio 1.1  
48 nanocaio 1.1  
49 nanocaio 1.1 function themeheader() {
50 nanocaio 1.1 global $slogan, $sitename, $banners, $mainindex, $adminindex, $cpgtpl, $site_logo,
51 nanocaio 1.1 $CPG_SESS, $MAIN_CFG, $userinfo, $module_name, $home, $Blocks;
52 nanocaio 1.1  
53 nanocaio 1.1 /* CSS Menu */
54 nanocaio 1.1 if ($MAIN_CFG['global']['admingraphic'] & 4) {
55 nanocaio 1.1 include('themes/'.$CPG_SESS['theme'].'/includes/cssmainmenu.php');
56 nanocaio 1.1 }
57 nanocaio 1.1  
58 nanocaio 1.1 //include file to have proper language selection URL (or prevtheme)
59 nanocaio 1.1 include_once('themes/'.$CPG_SESS['theme'].'/includes/valikurl.php');
60 nanocaio 1.1  
61 nanocaio 1.1 $user_agent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : '';
62 nanocaio 1.1 $pngfix = 0;
63 nanocaio 1.1 if (ereg('MSIE 7.0', $user_agent)) {
64 nanocaio 1.1 $specific = 'ie7.css';
65 nanocaio 1.1 } else if (ereg('MSIE ([0-6].[0-9]{1,2})', $user_agent)) {
66 nanocaio 1.1 $specific = 'ie6.css';
67 nanocaio 1.1 $pngfix = 1;
68 nanocaio 1.1 } else if (ereg('Opera Mini', $user_agent)) {
69 nanocaio 1.1 $specific = 'operamini.css';
70 nanocaio 1.1 } else if (ereg('Opera', $user_agent) xor ereg('Opera/9.[5-9]', $user_agent)) {
71 nanocaio 1.1 $specific = 'opera.css';
72 nanocaio 1.1 } else if (ereg('Safari', $user_agent)) {
73 nanocaio 1.1 $specific = 'safari.css';
74 nanocaio 1.1 } else {
75 nanocaio 1.1 $specific = 0;
76 nanocaio 1.1 }
77 nanocaio 1.1 //We want to use some strings, which exists only in forums.php languagefile, it may cause a small downtime though
78 nanocaio 1.1 get_lang('forums');
79 nanocaio 1.1 global $lang;
80 nanocaio 1.1  
81 estlane 1.6 /*Add left blocks to header.html*/
82 estlane 1.6 $Blocks->display('l');
83 estlane 1.6 /*Add right blocks to footer.html*/
84 estlane 1.6 $Blocks->display('r');
85 estlane 1.6  
86 nanocaio 1.1 $cpgtpl->assign_vars(array(
87 nanocaio 1.1 'BROWSER_CSS' => $specific ? "\n".'<link rel="stylesheet" type="text/css" href="themes/'.$CPG_SESS['theme'].'/style/browsers/'.$specific.'" />'."\n" : "\n",
88 nanocaio 1.1 'PNG_FIX' => $pngfix ? '<script defer type="text/javascript" src="themes/'.$CPG_SESS['theme'].'/includes/pngfix.js"></script>'."\n" : '',
89 nanocaio 1.1 'PUBLIC_HEADER'=> !defined('ADMIN_PAGES'),
90 nanocaio 1.1 'B_L_VISIBLE' => $Blocks->hideblock('600') ? ' style="display: none"' : '',
91 estlane 1.6 'B_R_VISIBLE' => $Blocks->hideblock('601') ? ' style="display: none"' : '',
92 nanocaio 1.1 'S_MAIN_MENU' => isset($mmcontent) ? $mmcontent : false,
93 estlane 1.6 'S_LIMAGE' => ($Blocks->l && ($Blocks->showblocks & 1)) ? ($Blocks->hideblock('600') ? 'rightplus.gif' : 'rightminus.gif') : '',
94 nanocaio 1.1 'S_RIMAGE' => ($Blocks->r && ($Blocks->showblocks & 2)) ? ($Blocks->hideblock('601') ? 'rightplus.gif' : 'rightminus.gif') : '',
95 nanocaio 1.1 'S_IS_ADMIN' => is_admin(),
96 nanocaio 1.1 'S_CAN_ADMIN' => can_admin(),
97 nanocaio 1.1 'S_IS_USER' => is_user(),
98 nanocaio 1.1 //Is user logged in and pm's are active?
99 nanocaio 1.1 'S_PM_OK' => is_user() ? (is_active('Private_Messages') ? true : false) : false,
100 nanocaio 1.1 /*the one should be uncommented if you DONT want to use forums langfile */
101 nanocaio 1.1 //'S_NEW_PM' => ($userinfo['user_new_privmsg'] > 0) ? (($userinfo['user_new_privmsg'] > 1) ? _YOUHAVE.' '.$userinfo['user_new_privmsg'].' '._PRIVATEMSG : _YOUHAVEONEMSG) : sprintf(_ERROR_NONE_TO_DISPLAY, MB::tolower(_NEWPMSG)),
102 nanocaio 1.1 'S_NEW_PM' => ($userinfo['user_new_privmsg'] > 0) ? (($userinfo['user_new_privmsg'] > 1) ? $lang['You_new_pms'] : $lang['You_new_pm']) : $lang['You_no_new_pm'],
103 nanocaio 1.1 'S_NEW_PM_IMG' => ($userinfo['user_new_privmsg'] > 0) ? '_new' : '_no_new',
104 nanocaio 1.1 'S_LOGO' => $site_logo,
105 nanocaio 1.1 'S_SITENAME' => $sitename,
106 nanocaio 1.1 'S_USER_NAME' => $userinfo['username'],
107 nanocaio 1.1 'S_LOGINRDRT' => (isset($CPG_SESS['user']['redirect']) ? $CPG_SESS['user']['redirect'] : getlink()),
108 nanocaio 1.1 'S_NOT_NEWS' => ($module_name != 'News') || $home,
109 nanocaio 1.1 'S_HOME' => _HOME,
110 nanocaio 1.1 'S_TOGGLE' => _TOGGLE, /*9.1.2.7 - at last*/
111 nanocaio 1.1 'S_NICKNAME' => _NICKNAME,
112 nanocaio 1.1 'S_WELCOME' => _BWEL,
113 nanocaio 1.1 'S_PASSWORD' => _PASSWORD,
114 nanocaio 1.1 'S_LOGIN' => _LOGIN,
115 nanocaio 1.1 'S_LOGOUT' => _LOGOUT,
116 nanocaio 1.1 'S_FORUMS' => _ForumsLANG,
117 nanocaio 1.1 'S_REGISTER' => _BREG,
118 nanocaio 1.1 'S_PASSLOSS' => _PASSWORD,
119 nanocaio 1.1 'S_DOWNLOADS' => is_active('Downloads') ? _DownloadsLANG : false,
120 nanocaio 1.1 'S_MY_ACCOUNT' => is_user() ? _Your_AccountLANG : _BREG,
121 estlane 1.5 'S_ADMINISTR' => _ADMINISTRATION,
122 nanocaio 1.1 'BC_DELIM' => _BC_DELIM,
123 nanocaio 1.1 'S_BANNER_ACT' => $banners,
124 nanocaio 1.1 'S_BANNER' => ($banners) ? viewbanner() : '',
125 nanocaio 1.1 'S_EDIT' => _EDIT,
126 nanocaio 1.1 'S_SEARCH' => _SEARCH,
127 nanocaio 1.1 'S_SEARCH_ACT' => is_active('Search'),
128 nanocaio 1.1 'U_SEARCH' => getlink('Search'),
129 nanocaio 1.1 'U_MAININDEX' => $mainindex,
130 nanocaio 1.1 'U_LOGOUT' => getlink('Your_Account&amp;op=logout&amp;redirect'),
131 nanocaio 1.1 'U_REGISTER' => getlink('Your_Account&amp;file=register'),
132 nanocaio 1.1 'U_PASSLOSS' => getlink('Your_Account&amp;op=pass_lost'),
133 nanocaio 1.1 'U_DOWNLOADS' => getlink('Downloads'),
134 nanocaio 1.1 'U_FORUMS' => getlink('Forums'),
135 nanocaio 1.1 'U_MY_ACCOUNT' => getlink(is_user() ? 'Your_Account' : 'Your_Account&amp;file=register'),
136 nanocaio 1.1 'U_PM' => getlink('Private_Messages'),
137 nanocaio 1.1 'U_ESTONIAN' => valikvastus('newlang','estonian'),
138 nanocaio 1.1 'U_ENGLISH' => valikvastus('newlang','english'),
139 nanocaio 1.1 'U_ADMININDEX' => $adminindex,
140 nanocaio 1.1 'U_NEWSADMIN' => adminlink('News&amp;edit='),
141 nanocaio 1.1 'S_LASTVISIT' => is_user() ? sprintf($lang['You_last_visit'], formatDateTime($userinfo['user_lastvisit'], _DATESTRING)) : '',
142 nanocaio 1.1 'S_TIMENOW' => is_user() ? sprintf($lang['Current_time'], formatDateTime(gmtime(), _DATESTRING)) : '',
143 estlane 1.6 'S_NEW_POSTS' => $lang['New_posts']
144 nanocaio 1.1 ));
145 estlane 1.6  
146 nanocaio 1.1 }
147 nanocaio 1.1  
148 nanocaio 1.1 function themefooter() {
149 nanocaio 1.1 global $showblocks, $banners, $cpgtpl, $foot1, $foot2, $foot3, $copyright, $db, $Blocks;
150 estlane 1.6  
151 estlane 1.6 /*Add left blocks to footer.html*/
152 estlane 1.6 $Blocks->display('l');
153 estlane 1.6 /*Add right blocks to footer.html*/
154 nanocaio 1.1 $Blocks->display('r');
155 estlane 1.6  
156 nanocaio 1.1 $cpgtpl->assign_vars(array(
157 estlane 1.6 'B_L_VISIBLE' => $Blocks->hideblock('600') ? ' style="display: none"' : '',
158 nanocaio 1.1 'B_R_VISIBLE' => $Blocks->hideblock('601') ? ' style="display: none"' : '',
159 nanocaio 1.1 //'B_R_HIDDEN' => $Blocks->hideblock('601') ? '' : ' style="display: none"',
160 estlane 1.4 'S_BANNER_ACT' => $banners,
161 estlane 1.4 'S_BANNER' => ($banners) ? viewbanner() : '',
162 nanocaio 1.1 'S_FOOTER' => footmsg()
163 nanocaio 1.1 ));
164 nanocaio 1.1 $cpgtpl->set_filenames(array('footer' => 'footer.html'));
165 nanocaio 1.1 $cpgtpl->display('footer');
166 nanocaio 1.1 }
167 nanocaio 1.1  
168 nanocaio 1.1  
169 nanocaio 1.1 /***********************************************************************************
170 nanocaio 1.1  
171 nanocaio 1.1 string theme_open_form
172 nanocaio 1.1  
173 nanocaio 1.1 Creates start tag for form
174 nanocaio 1.1 $get_link : link for action default blank
175 nanocaio 1.1 $form_name : useful for styling and nbbcode
176 nanocaio 1.1 $legend: optional string value is used in form lagend tag
177 nanocaio 1.1 $border: optional use 1 to not show border on fieldset from stylesheet
178 nanocaio 1.1 ************************************************************************************/
179 nanocaio 1.1 function theme_open_form($link, $form_name=false, $legend=false,$tborder=false) {
180 nanocaio 1.1 $leg = $legend ? "<legend>$legend</legend>" : '';
181 nanocaio 1.1 $bord = $tborder ? $tborder : '';
182 nanocaio 1.1 $form_name = $form_name ? ' id="'.$form_name.'"' :'';
183 nanocaio 1.1 return '<form method="post" action="'.$link.'"'.$form_name.' enctype="multipart/form-data" accept-charset="utf-8"><fieldset '.$bord.'>'.$leg;
184 nanocaio 1.1 }
185 nanocaio 1.1 function theme_close_form() {
186 nanocaio 1.1 return '</fieldset></form>';
187 nanocaio 1.1 }
188 nanocaio 1.1 /***********************************************************************************
189 nanocaio 1.1  
190 nanocaio 1.1 string theme_yesno_option
191 nanocaio 1.1  
192 nanocaio 1.1 Creates 2 radio buttons with a Yes and No option
193 nanocaio 1.1 $name : name for the <input>
194 nanocaio 1.1 $value: current value, 1 = yes, 0 = no
195 nanocaio 1.1  
196 nanocaio 1.1 ************************************************************************************/
197 nanocaio 1.1 function theme_yesno_option($name, $value=0) {
198 nanocaio 1.1 $sel[(!$value)] = '';
199 nanocaio 1.1 $sel[$value] = ' selected="selected"';
200 nanocaio 1.1 $select = '<select class="set" name="'.$name.'" id="'.$name."\">\n";
201 nanocaio 1.1 $select .= '<option value="1"'.$sel[1].">"._YES."</option>\n";
202 nanocaio 1.1 $select .= '<option value="0"'.$sel[0].">"._NO."</option>\n";
203 nanocaio 1.1 return $select.'</select>';
204 nanocaio 1.1 }
205 nanocaio 1.1 /***********************************************************************************
206 nanocaio 1.1  
207 nanocaio 1.1 string theme_select_option
208 nanocaio 1.1  
209 nanocaio 1.1 Creates a selection dropdown box of all given variables in the array
210 nanocaio 1.1 $name : name for the <select>
211 nanocaio 1.1 $value: current/default value
212 nanocaio 1.1 $array: array like array("value1","value2")
213 nanocaio 1.1  
214 nanocaio 1.1 ************************************************************************************/
215 nanocaio 1.1 function theme_select_option($name, $value, $array) {
216 nanocaio 1.1 $sel[$value] = ' selected="selected"';
217 nanocaio 1.1 $select = '<select class="set" name="'.$name.'" id="'.$name."\">\n";
218 nanocaio 1.1 foreach($array as $var) {
219 nanocaio 1.1 $select .= '<option'.(isset($sel[$var])?$sel[$var]:'').">$var</option>\n";
220 nanocaio 1.1 }
221 nanocaio 1.1 return $select.'</select>';
222 nanocaio 1.1 }
223 nanocaio 1.1 /***********************************************************************************
224 nanocaio 1.1  
225 nanocaio 1.1 string theme_select_box
226 nanocaio 1.1  
227 nanocaio 1.1 Creates a selection dropdown box of all given variables in the multi array
228 nanocaio 1.1 $name : name for the <select>
229 nanocaio 1.1 $value: current/default value
230 nanocaio 1.1 $array: array like array("value1 => title1","value2 => title2")
231 nanocaio 1.1  
232 nanocaio 1.1 ************************************************************************************/
233 nanocaio 1.1 function theme_select_box($name, $value, $array) {
234 nanocaio 1.1 $select = '<select class="set" name="'.$name.'" id="'.$name."\">\n";
235 nanocaio 1.1 foreach($array as $val => $title) {
236 nanocaio 1.1 $select .= "<option value=\"$val\"".(($val==$value) ? ' selected="selected"' : '').">$title</option>\n";
237 nanocaio 1.1 }
238 nanocaio 1.1 return $select.'</select>';
239 nanocaio 1.1 }


Code Credits - Privacy Policy