15 |
16 |
17 |
18 |
19 | {L_QUOTE}:
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
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 | {DESCRIPTION}
71 |
72 | {EMAIL}
73 |
74 |
75 |
--------------------------------------------------------------------------------
/templates/phpbbSilver/konkurs.tpl:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {CURRENT_TIME}
5 |
19 |
20 |
21 |
22 |
23 |
24 |
25 | {L_INFO}
26 |
27 |
28 |
29 |
30 |
31 | ::
32 | {linkrow.NAME}
33 |
34 |
35 |
39 |
40 |
41 |
42 |
43 | {L_LAUREACI}
44 |
45 |
46 |
47 |
48 | {yearrow.YEAR} :
49 |
54 |
55 |
56 |
57 |
58 |
59 | {L_TOP_10}
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 | {top10row.NUMBER}.
68 |
69 | {top10row.LINK}
70 | »
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 | {DATE}
80 |
81 |
82 |
83 |
84 |
94 |
95 |
96 |
97 | {MESSAGE} {LAUREACI} {WYNIKI} {FORMULARZ} {KOMENTARZE} {RECENZJE}
98 |
99 |
100 |
--------------------------------------------------------------------------------
/templates/phpbbSilver/memberlist_body.tpl:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
75 |
76 |
77 |
97 |
98 |
99 |
102 |
103 |
104 | {PAGINATION}
105 |
106 | {JUMPBOX}
107 |
--------------------------------------------------------------------------------
/tinycon.min.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Tinycon - A small library for manipulating the Favicon
3 | * Tom Moor, http://tommoor.com
4 | * Copyright (c) 2012 Tom Moor
5 | * MIT Licensed
6 | * @version 0.2.5
7 | */
8 |
9 | (function(){var Tinycon={};var currentFavicon=null;var originalFavicon=null;var originalTitle=document.title;var faviconImage=null;var canvas=null;var options={};var defaults={width:7,height:9,font:'10px arial',colour:'#ffffff',background:'#F03D25',fallback:true};var ua=(function(){var agent=navigator.userAgent.toLowerCase();return function(browser){return agent.indexOf(browser)!==-1}}());var browser={chrome:ua('chrome'),webkit:ua('chrome')||ua('safari'),safari:ua('safari')&&!ua('chrome'),mozilla:ua('mozilla')&&!ua('chrome')&&!ua('safari')};var getFaviconTag=function(){var links=document.getElementsByTagName('link');for(var i=0,len=links.length;i0)drawBubble(context,num,colour);refreshFavicon()};if(!src.match(/^data/)){faviconImage.crossOrigin='anonymous'}faviconImage.src=src};var updateTitle=function(num){if(options.fallback){if(num>0){document.title='('+num+') '+originalTitle}else{document.title=originalTitle}}};var drawBubble=function(context,num,colour){var len=(num+"").length-1;var width=options.width+(6*len);var w=16-width;var h=16-options.height;context.font=(browser.webkit?'bold ':'')+options.font;context.fillStyle=options.background;context.strokeStyle=options.background;context.lineWidth=1;context.fillRect(w,h,width-1,options.height);context.beginPath();context.moveTo(w-0.5,h+1);context.lineTo(w-0.5,15);context.stroke();context.beginPath();context.moveTo(15.5,h+1);context.lineTo(15.5,15);context.stroke();context.beginPath();context.strokeStyle="rgba(0,0,0,0.3)";context.moveTo(w,16);context.lineTo(15,16);context.stroke();context.fillStyle=options.colour;context.textAlign="right";context.textBaseline="top";context.fillText(num,15,browser.mozilla?7:6)};var refreshFavicon=function(){if(!getCanvas().getContext)return;setFaviconTag(getCanvas().toDataURL())};Tinycon.setOptions=function(custom){options={};for(var i in defaults){options[i]=custom[i]?custom[i]:defaults[i]}return this};Tinycon.setImage=function(url){currentFavicon=url;refreshFavicon();return this};Tinycon.setBubble=function(num,colour){if(isNaN(num))return log('Bubble must be a number');drawFavicon(num,colour);return this};Tinycon.reset=function(){Tinycon.setImage(originalFavicon)};Tinycon.setOptions(defaults);window.Tinycon=Tinycon})();
--------------------------------------------------------------------------------
/templates/phpbbSilver/modcp_split.tpl:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/templates/phpbbSilver/viewforum_body.tpl:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
15 |
16 | {L_POST_NEW_TOPIC}
17 |
18 |
19 |
23 |
24 |
25 |
26 |
27 |
38 |
39 |
40 |
41 |
42 |
43 | {L_TOPICS} {topicrow.NEWEST_POST_IMG}{topicrow.TOPIC_TYPE}{topicrow.TOPIC_TITLE}
44 |
45 | {topicrow.GOTO_PAGE}
46 |
47 |
48 | {L_AUTHOR}
49 | {topicrow.TOPIC_AVATAR} {topicrow.FIRST_POST_TIME} {topicrow.TOPIC_AUTHOR}
50 | {L_REPLIES}
51 | {topicrow.REPLIES}
52 | {L_VIEWS}
53 | {topicrow.VIEWS}
54 | {L_LASTPOST}
55 | {topicrow.LAST_POST_AVATAR} {topicrow.LAST_POST_TIME} {topicrow.LAST_POST_AUTHOR} {topicrow.LAST_POST_IMG}
56 |
57 |
58 |
59 |
60 |
{L_NO_TOPICS}
61 |
62 |
63 |
69 |
70 |
71 | {L_POST_NEW_TOPIC}
72 |
73 |
74 |
78 |
79 |
80 |
81 | {PAGINATION}
82 | {JUMPBOX}
83 |
84 |
85 |
86 | {FEED}
87 | {L_MARK_TOPICS_READ}
88 | {L_MODERATOR}: {MODERATORS}
89 | {LOGGED_IN_USER_LIST}
90 |
91 |
92 |
93 |
94 | {L_NEW_POSTS}
95 | {L_NO_NEW_POSTS}
96 | {L_ANNOUNCEMENT}
97 | {L_NEW_POSTS_HOT}
98 | {L_NO_NEW_POSTS_HOT}
99 | {L_STICKY}
100 | {L_NEW_POSTS_LOCKED}
101 | {L_NO_NEW_POSTS_LOCKED}
102 |
103 |
104 | {S_AUTH_LIST}
105 |
--------------------------------------------------------------------------------
/templates/phpbbSilver/overall_header.tpl:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | {META}{META_ROBOTS}
9 |
10 |
11 |
12 | {PAGE_TITLE}
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
26 |
27 |
30 |
31 |
32 |
33 |
80 |
81 |
--------------------------------------------------------------------------------
/templates/phpbbSilver/modcp_viewip.tpl:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
11 |
12 |
13 |
14 |
15 |
16 | {L_IP_INFO}
17 |
18 |
19 |
20 |
21 | {L_THIS_POST_IP}
22 |
23 |
24 |
25 |
26 |
31 |
32 |
33 |
34 | {L_OTHER_USERS}
35 |
36 |
37 |
38 |
39 |
40 |
47 |
48 |
49 |
50 |
51 | {L_OTHER_IPS}
52 |
53 |
54 |
55 |
56 |
57 |
58 | {iprow.IP} [ {iprow.POSTS} ] [
59 | {L_LOOKUP_IP} ]
60 |
61 |
62 |
63 |
64 |
65 |
66 | {L_CLIENT_OTHER_USERS}
67 |
68 |
69 |
70 |
71 |
72 |
78 |
79 |
80 |
81 |
82 |
83 |
133 |
134 |
135 |
136 |
137 |
138 |
143 |
144 |
145 |
146 |
--------------------------------------------------------------------------------
/templates/phpbbSilver/subscribe.tpl:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/templates/phpbbSilver/profile_view_body.tpl:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
8 |
9 | {L_VIEWING_PROFILE}
10 |
11 | {L_AVATAR}
12 |
13 | {AVATAR_IMG}
14 | {POSTER_RANK}
15 |
16 |
17 |
18 | {L_CONTACT} {USERNAME}
19 |
20 | {L_EMAIL_ADDRESS}:
21 | {EMAIL_IMG}
22 | {L_PM}:
23 | {PM_IMG}
24 | {L_GG}:
25 | {GG_IMG} {GG_STATUS_IMG}
26 | {L_TLEN}:
27 | {TLEN_IMG} {TLEN_STATUS_IMG}
28 | {L_JABBER}:
29 | {JABBER_IMG} {JABBER_STATUS_IMG}
30 | {L_SKYPE}:
31 | {SKYPE_IMG} {SKYPE_STATUS_IMG}
32 | {L_ICQ_NUMBER}:
33 | {ICQ_IMG} {ICQ_STATUS_IMG}
34 | {L_MESSENGER}:
35 | {MSN}
36 | {L_YAHOO}:
37 | {YIM_IMG}
38 | {L_AIM}:
39 | {AIM_IMG}
40 | {L_FACEBOOK}:
41 | {FACEBOOK_IMG}
42 |
43 |
44 |
45 | {L_OBSERVING} {USERNAME}
46 |
47 | {L_OBSERVES}
48 | {OBSERVES}
49 | {L_IS_OBSERVED}
50 | {IS_OBSERVED}
51 |
52 | {L_OBSERVE_USER}
53 |
54 | {switch_user_not_self.OBSERVE}
55 | {L_OBSERVE_USER_EXPLAIN}
56 |
57 |
58 |
59 | {L_YOU_OBSERVE}
60 |
61 |
66 |
67 |
68 |
69 |
70 |
71 | {L_ABOUT_USER}
72 |
73 | {L_JOINED}:
74 | {JOINED}
75 | {L_LASTVISIT}:
76 | {LASTVISIT}
77 | {L_LANGUAGE}:
78 | {LANGUAGE}
79 | {L_TIMEZONE}:
80 | {TIMEZONE} {DST}
81 | {L_TOTAL_POSTS}:
82 | {POSTS}
83 | [{POST_PERCENT_STATS} / {POST_DAY_STATS}]
84 | {L_SEARCH_USER_POSTS}
85 | {L_TOTAL_HELPS}:
86 | {HELPS}
87 | [{POSTS_PER_HELPS_STATS} / {HELPS_PER_DAY_STATS}]
88 | {L_SEARCH_USER_HELPS}
89 | {L_TOTAL_HELPS_TO}:
90 | {HELPS_TO}
91 | [{POSTS_PER_HELPS_TO_STATS} / {HELPS_TO_PER_DAY_STATS}]
92 | {L_SEARCH_USER_HELPS_TO}
93 | {L_LOCATION}:
94 | {LOCATION}
95 | {L_WEBSITE}:
96 | {WWW}
97 | {L_OCCUPATION}:
98 | {OCCUPATION}
99 | {L_INTERESTS}:
100 | {INTERESTS}
101 |
102 | {L_GENDER}:
103 | {GENDER}
104 |
105 | {L_DATE_OF_BIRTH}:
106 | {BIRTH}
107 | {L_AGE}:
108 | {AGE}
109 | {L_SIGNATURE}:
110 | {SIGNATURE}
111 |
112 | {switch_viewclient.L_BROWSER}:
113 | {switch_viewclient.BROWSER_IMG}
114 | {switch_viewclient.L_OPERATING_SYSTEM}:
115 | {switch_viewclient.OPERATING_SYSTEM_IMG}
116 | {switch_viewclient.L_SCREEN}:
117 | {switch_viewclient.SCREEN_IMG}
118 |
119 |
120 | {switch_mod.L_HOST}:
121 | {switch_mod.HOST}
122 | {switch_mod.L_CLIENT}:
123 | {switch_mod.CLIENT}
124 | {switch_mod.L_USER_AGENT}:
125 | {switch_mod.USER_AGENT}
126 | {switch_mod.L_SIMILAR_USERS}:
127 | {switch_mod.SIMILAR_USERS}
128 |
129 |
130 |
131 |
132 |
133 | {JUMPBOX}
134 |
--------------------------------------------------------------------------------
/templates/phpbbSilver/js/plugins.js:
--------------------------------------------------------------------------------
1 |
2 | // usage: log('inside coolFunc', this, arguments);
3 | // paulirish.com/2009/log-a-lightweight-wrapper-for-consolelog/
4 | window.log = function(){
5 | log.history = log.history || []; // store logs to an array for reference
6 | log.history.push(arguments);
7 | if(this.console) {
8 | arguments.callee = arguments.callee.caller;
9 | var newarr = [].slice.call(arguments);
10 | (typeof console.log === 'object' ? log.apply.call(console.log, console, newarr) : console.log.apply(console, newarr));
11 | }
12 | };
13 |
14 | // make it safe to use console.log always
15 | (function(b){function c(){}for(var d="assert,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,timeStamp,profile,profileEnd,time,timeEnd,trace,warn".split(","),a;a=d.pop();){b[a]=b[a]||c}})((function(){try
16 | {console.log();return window.console;}catch(err){return window.console={};}})());
17 |
18 |
19 | // place any jQuery/helper plugins in here, instead of separate, slower script files.
20 |
21 | //MD5
22 | /*
23 | * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message
24 | * Digest Algorithm, as defined in RFC 1321.
25 | * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009
26 | * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
27 | * Distributed under the BSD License
28 | * See http://pajhome.org.uk/crypt/md5 for more info.
29 | */
30 |
31 | function md5(m){function g(b,d,a,c,e,f,g){return h(l(h(h(b,d&a|~d&c),h(e,g)),f),d)}function i(b,d,a,c,e,f,g){return h(l(h(h(b,d&c|a&~c),h(e,g)),f),d)}function j(b,d,a,c,e,f,g){return h(l(h(h(b,d^a^c),h(e,g)),f),d)}function k(b,d,a,c,e,f,g){return h(l(h(h(b,a^(d|~c)),h(e,g)),f),d)}function h(b,d){var a=(b&65535)+(d&65535);return(b>>16)+(d>>16)+(a>>16)<<16|a&65535}function l(b,d){return b<
>>32-d}return function(b){for(var d="",a,c=0;c>>
32 | 4&15)+"0123456789abcdef".charAt(a&15);return d}(function(b){for(var d=Array(b.length>>2),a=0;a>5]|=(b.charCodeAt(a/8)&255)<>5]|=128<>>9<<4)+14]=b;for(var b=1732584193,a=-271733879,c=-1732584194,e=271733878,f=0;f>5]>>>a%32&255);return b}(function(b){for(var d="",a=-1,c,e;++a=c&&56320<=e&&57343>=e&&(c=65536+((c&1023)<<10)+(e&1023),a++),127>=c?d+=String.fromCharCode(c):2047>=c?d+=String.fromCharCode(192|c>>>6&31,128|c&63):65535>=c?d+=String.fromCharCode(224|c>>>12&15,128|c>>>6&63,128|c&63):2097151>=c&&(d+=String.fromCharCode(240|c>>>18&7,128|c>>>
38 | 12&63,128|c>>>6&63,128|c&63));return d}(m)))};
--------------------------------------------------------------------------------
/templates/phpbbSilver/groupcp_info_body.tpl:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
14 |
15 | {S_HIDDEN_FIELDS}
57 |
58 |
59 |
132 | {PENDING_USER_BOX} {S_HIDDEN_FIELDS}
149 |
150 |
151 | {JUMPBOX}
152 |
153 |
154 |
--------------------------------------------------------------------------------
/templates/phpbbSilver/konkurs_wyniki.tpl:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tinycon.js:
--------------------------------------------------------------------------------
1 | /*!
2 | * Tinycon - A small library for manipulating the Favicon
3 | * Tom Moor, http://tommoor.com
4 | * Copyright (c) 2012 Tom Moor
5 | * MIT Licensed
6 | * @version 0.2.5
7 | */
8 |
9 | (function(){
10 |
11 | var Tinycon = {};
12 | var currentFavicon = null;
13 | var originalFavicon = null;
14 | var originalTitle = document.title;
15 | var faviconImage = null;
16 | var canvas = null;
17 | var options = {};
18 | var defaults = {
19 | width: 7,
20 | height: 9,
21 | font: '10px arial',
22 | colour: '#ffffff',
23 | background: '#F03D25',
24 | fallback: true
25 | };
26 |
27 | var ua = (function () {
28 | var agent = navigator.userAgent.toLowerCase();
29 | // New function has access to 'agent' via closure
30 | return function (browser) {
31 | return agent.indexOf(browser) !== -1;
32 | };
33 | }());
34 |
35 | var browser = {
36 | chrome: ua('chrome'),
37 | webkit: ua('chrome') || ua('safari'),
38 | safari: ua('safari') && !ua('chrome'),
39 | mozilla: ua('mozilla') && !ua('chrome') && !ua('safari')
40 | };
41 |
42 | // private methods
43 | var getFaviconTag = function(){
44 |
45 | var links = document.getElementsByTagName('link');
46 |
47 | for(var i=0, len=links.length; i < len; i++) {
48 | if ((links[i].getAttribute('rel') || '').match(/\bicon\b/)) {
49 | return links[i];
50 | }
51 | }
52 |
53 | return false;
54 | };
55 |
56 | var removeFaviconTag = function(){
57 |
58 | var links = document.getElementsByTagName('link');
59 | var head = document.getElementsByTagName('head')[0];
60 |
61 | for(var i=0, len=links.length; i < len; i++) {
62 | var exists = (typeof(links[i]) !== 'undefined');
63 | if (exists && links[i].getAttribute('rel') === 'icon') {
64 | head.removeChild(links[i]);
65 | }
66 | }
67 | };
68 |
69 | var getCurrentFavicon = function(){
70 |
71 | if (!originalFavicon || !currentFavicon) {
72 | var tag = getFaviconTag();
73 | originalFavicon = currentFavicon = tag ? tag.getAttribute('href') : '/favicon.ico';
74 | }
75 |
76 | return currentFavicon;
77 | };
78 |
79 | var getCanvas = function (){
80 |
81 | if (!canvas) {
82 | canvas = document.createElement("canvas");
83 | canvas.width = 16;
84 | canvas.height = 16;
85 | }
86 |
87 | return canvas;
88 | };
89 |
90 | var setFaviconTag = function(url){
91 | removeFaviconTag();
92 |
93 | var link = document.createElement('link');
94 | link.type = 'image/x-icon';
95 | link.rel = 'icon';
96 | link.href = url;
97 | document.getElementsByTagName('head')[0].appendChild(link);
98 | };
99 |
100 | var log = function(message){
101 | if (window.console) window.console.log(message);
102 | };
103 |
104 | var drawFavicon = function(num, colour) {
105 |
106 | // fallback to updating the browser title if unsupported
107 | if (!getCanvas().getContext || browser.safari || options.fallback === 'force') {
108 | return updateTitle(num);
109 | }
110 |
111 | var context = getCanvas().getContext("2d");
112 | var colour = colour || '#000000';
113 | var num = num || 0;
114 | var src = getCurrentFavicon();
115 |
116 | faviconImage = new Image();
117 | faviconImage.onload = function() {
118 |
119 | // clear canvas
120 | context.clearRect(0, 0, 16, 16);
121 |
122 | // draw original favicon
123 | context.drawImage(faviconImage, 0, 0, faviconImage.width, faviconImage.height, 0, 0, 16, 16);
124 |
125 | // draw bubble over the top
126 | if (num > 0) drawBubble(context, num, colour);
127 |
128 | // refresh tag in page
129 | refreshFavicon();
130 | };
131 |
132 | // allow cross origin resource requests if the image is not a data:uri
133 | // as detailed here: https://github.com/mrdoob/three.js/issues/1305
134 | if (!src.match(/^data/)) {
135 | faviconImage.crossOrigin = 'anonymous';
136 | }
137 |
138 | faviconImage.src = src;
139 | };
140 |
141 | var updateTitle = function(num) {
142 |
143 | if (options.fallback) {
144 | if (num > 0) {
145 | document.title = '('+num+') ' + originalTitle;
146 | } else {
147 | document.title = originalTitle;
148 | }
149 | }
150 | };
151 |
152 | var drawBubble = function(context, num, colour) {
153 |
154 | // bubble needs to be larger for double digits
155 | var len = (num+"").length-1;
156 | var width = options.width + (6*len);
157 | var w = 16-width;
158 | var h = 16-options.height;
159 |
160 | // webkit seems to render fonts lighter than firefox
161 | context.font = (browser.webkit ? 'bold ' : '') + options.font;
162 | context.fillStyle = options.background;
163 | context.strokeStyle = options.background;
164 | context.lineWidth = 1;
165 |
166 | // bubble
167 | context.fillRect(w,h,width-1,options.height);
168 |
169 | // rounded left
170 | context.beginPath();
171 | context.moveTo(w-0.5,h+1);
172 | context.lineTo(w-0.5,15);
173 | context.stroke();
174 |
175 | // rounded right
176 | context.beginPath();
177 | context.moveTo(15.5,h+1);
178 | context.lineTo(15.5,15);
179 | context.stroke();
180 |
181 | // bottom shadow
182 | context.beginPath();
183 | context.strokeStyle = "rgba(0,0,0,0.3)";
184 | context.moveTo(w,16);
185 | context.lineTo(15,16);
186 | context.stroke();
187 |
188 | // number
189 | context.fillStyle = options.colour;
190 | context.textAlign = "right";
191 | context.textBaseline = "top";
192 |
193 | // unfortunately webkit/mozilla are a pixel different in text positioning
194 | context.fillText(num, 15, browser.mozilla ? 7 : 6);
195 | };
196 |
197 | var refreshFavicon = function(){
198 | // check support
199 | if (!getCanvas().getContext) return;
200 |
201 | setFaviconTag(getCanvas().toDataURL());
202 | };
203 |
204 |
205 | // public methods
206 | Tinycon.setOptions = function(custom){
207 | options = {};
208 |
209 | for(var i in defaults){
210 | options[i] = custom[i] ? custom[i] : defaults[i];
211 | }
212 | return this;
213 | };
214 |
215 | Tinycon.setImage = function(url){
216 | currentFavicon = url;
217 | refreshFavicon();
218 | return this;
219 | };
220 |
221 | Tinycon.setBubble = function(num, colour){
222 |
223 | // validate
224 | if(isNaN(num)) return log('Bubble must be a number');
225 |
226 | drawFavicon(num, colour);
227 | return this;
228 | };
229 |
230 | Tinycon.reset = function(){
231 | Tinycon.setImage(originalFavicon);
232 | };
233 |
234 | Tinycon.setOptions(defaults);
235 | window.Tinycon = Tinycon;
236 | })();
237 |
--------------------------------------------------------------------------------
/notifier.js:
--------------------------------------------------------------------------------
1 | var Notifier = function(url, time, data)
2 | {
3 | this.isActive = function()
4 | {
5 | return container.className.indexOf('notifications_show') >= 0;
6 | };
7 |
8 | this.initialize = function(data)
9 | {
10 | if (data && !Notifier.instances[url].isActive())
11 | {
12 | if (typeof data.data != 'undefined' && data.data.length > 0)
13 | {
14 | var number = 0;
15 | var html = '';
16 | for (var i = 0; i < data.data.length; ++i)
17 | {
18 | var date = typeof data.data[i].time != 'undefined' ? new Date(data.data[i].time) : null;
19 | var notification_new = date && date > new Date(time);
20 | if (notification_new) ++number;
21 | var itemUrl = data.data[i].url;
22 | if (typeof data.data[i].time != 'undefined')
23 | {
24 | var itemTime = (itemUrl.indexOf('?') < 0 ? '?' : '&') + (Date.parse(data.data[i].time) / 1000);
25 | if (itemUrl.indexOf('#') < 0) itemUrl += itemTime;
26 | else itemUrl = itemUrl.replace(/#/, itemTime + '#');
27 | }
28 | html += '' + data.data[i].name + ' ';
29 | }
30 | if (typeof time == 'undefined' || !time || new Date(data.time) > new Date(time))
31 | {
32 | if (container.className.indexOf('notifications_notify') < 0) container.className += ' notifications_notify';
33 | Tinycon.setBubble(number);
34 | }
35 | else
36 | {
37 | if (container.className.indexOf('notifications_notify') >= 0) container.className = container.className.replace(/\s*notifications_notify/, '');
38 | Tinycon.setBubble(0);
39 | }
40 | html = '' + (number > 0 ? '' + number + ' ' : number) + '/' + data.data.length + ' ' + html;
41 | container.innerHTML = html;
42 | container.style.display = '';
43 | }
44 | else
45 | {
46 | container.innerHTML = '';
47 | container.style.display = 'none';
48 | Tinycon.setBubble(0);
49 | }
50 | }
51 | };
52 |
53 | this.toggle = function(newTime)
54 | {
55 | if (container.className.indexOf('notifications_show') >= 0) container.className = container.className.replace(/\s*notifications_show/, '');
56 | else
57 | {
58 | container.className += ' notifications_show';
59 | if (typeof newTime != 'undefined' && newTime && (typeof time == 'undefined' || !time || new Date(newTime) > new Date(time)))
60 | {
61 | time = newTime;
62 | var xhr = getAJAX();
63 | if (xhr)
64 | {
65 | xhr.open('POST', url, true);
66 | xhr.onreadystatechange = function()
67 | {
68 | if (xhr.readyState == 4)
69 | {
70 | var response = null;
71 | try
72 | {
73 | eval('response = ' + xhr.responseText + ';');
74 | }
75 | catch (e) {}
76 | if (response && typeof response.error == 'undefined')
77 | {
78 | container.className = container.className.replace(/\s*notifications_notify/, '');
79 | Tinycon.setBubble(0);
80 | }
81 | }
82 | };
83 | xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
84 | xhr.send('time=' + escape(newTime));
85 | }
86 | }
87 | }
88 | };
89 |
90 | function hide(e)
91 | {
92 | var node = typeof e.target != 'undefined' ? e.target : e.srcElement;
93 | do
94 | {
95 | if (node == container) return;
96 | node = node.parentNode;
97 | }
98 | while (node);
99 | container.className = container.className.replace(/\s*notifications_show/, '');
100 | }
101 |
102 | function htmlspecialchars(text)
103 | {
104 | return text.replace(/&/g, '&').replace(//g, '>').replace(/"/g, '"');
105 | }
106 |
107 | function getAJAX()
108 | {
109 | var ajax = null;
110 | if (window.XMLHttpRequest) ajax = new XMLHttpRequest();
111 | else if (window.ActiveXObject)
112 | {
113 | try
114 | {
115 | ajax = new ActiveXObject('Msxml2.XMLHTTP');
116 | }
117 | catch (e)
118 | {
119 | try
120 | {
121 | ajax = new ActiveXObject('Microsoft.XMLHTTP');
122 | }
123 | catch (e) {}
124 | }
125 | }
126 | return ajax;
127 | }
128 |
129 | Notifier.instances[url] = this;
130 |
131 | var ajax = getAJAX();
132 |
133 | var container = document.createElement('dl');
134 | container.className = 'notifications';
135 | container.style.display = 'none';
136 | document.getElementsByTagName('body')[0].appendChild(container);
137 |
138 | if (typeof window.addEventListener != 'undefined') document.getElementsByTagName('body')[0].addEventListener('click', hide, false);
139 | else if (typeof window.attachEvent != 'undefined') document.getElementsByTagName('body')[0].attachEvent('onclick', hide);
140 |
141 | if (typeof data != 'undefined') this.initialize(data);
142 |
143 | if (ajax)
144 | {
145 | var timeoutID = null;
146 | var period = 60000;
147 |
148 | function check()
149 | {
150 | if (timeoutID) window.clearTimeout(timeoutID);
151 | if (Notifier.instances[url].isActive()) timeoutID = window.setTimeout(check, period);
152 | else
153 | {
154 | ajax.open('GET', url, true);
155 | ajax.send('');
156 | }
157 | }
158 |
159 | ajax.onreadystatechange = function()
160 | {
161 | if (ajax.readyState == 4)
162 | {
163 | if (!Notifier.instances[url].isActive())
164 | {
165 | try
166 | {
167 | eval('data = ' + ajax.responseText + ';');
168 | }
169 | catch (e) {}
170 | Notifier.instances[url].initialize(data);
171 | }
172 | timeoutID = window.setTimeout(check, period);
173 | }
174 | };
175 |
176 | if (typeof data != 'undefined') timeoutID = window.setTimeout(check, period);
177 | else
178 | {
179 | if (typeof window.addEventListener != 'undefined') window.addEventListener('load', check, false);
180 | else if (typeof window.attachEvent != 'undefined') window.attachEvent('onload', check);
181 | }
182 | }
183 | };
184 |
185 | Notifier.instances = {};
--------------------------------------------------------------------------------
/templates/phpbbSilver/viewtopic_body.tpl:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {MODERATOR}
6 | {S_TOPIC_ADMIN}
7 | {PAGINATION}
8 |
9 |
10 |
11 |
15 |
16 |
17 |
18 | {S_WATCH_TOPIC}
19 | {FEED}
20 |
21 |
22 | {L_POST_REPLY_TOPIC}
23 |
24 |
25 |
26 |
27 |
28 |
29 |
33 |
34 |
35 | {POLL_DISPLAY}
36 |
37 |
38 |
39 |
40 | {L_MESSAGE} {postrow.POST_SUBJECT}
41 |
42 | {L_VIEW_FIRST_POST}
43 |
44 |
45 | {L_AUTHOR}
46 |
47 |
48 | {postrow.POSTER_NAME}
49 | {postrow.POSTER_RANK}
50 | {postrow.RANK_IMAGE}
51 | {postrow.POSTER_AVATAR}
52 | {postrow.POSTER_GENDER}
53 | {postrow.POSTER_AGE}
54 | {postrow.POSTER_JOINED}
55 | {postrow.POSTER_POSTS}
56 | {postrow.POSTER_HELPS}
57 | {postrow.POSTER_FROM}
58 | {postrow.POSTER_STATUS}
59 |
60 |
61 | {L_POSTED}
62 | {postrow.POST_DATE}
63 |
64 |
65 | {postrow.AHM}
66 | {L_QUOTE_SELECTED}
67 | {postrow.QUOTE}
68 | {postrow.SPELLING}
69 | {postrow.EDIT}
70 | {postrow.DELETE}
71 | {postrow.SPLIT}
72 | {postrow.REPORT}
73 | {postrow.HISTORY}
74 | {postrow.IP}
75 | {L_TOP}
76 |
77 |
78 |
79 |
101 |
102 |
103 |
104 |
105 |
106 | {L_DISPLAY_POSTS}: {S_SELECT_POST_DAYS} {S_SELECT_POST_ORDER}
107 | {L_GO}
108 |
109 |
110 |
111 | {L_POST_REPLY_TOPIC}
112 |
113 |
114 |
118 |
119 |
120 |
123 |
124 |
125 | {QUICKREPLY_OUTPUT}
126 |
127 |
128 |
129 | {L_RELATED_TOPICS}
130 |
137 |
138 | {L_TAGS}:
139 |
140 |
141 |
142 | {tagrow.TAG_NAME} {tagrow.SEPARATOR}
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 | {PAGINATION}
151 | {JUMPBOX}
152 | {S_TOPIC_ADMIN}
153 |
154 |
155 | {FEED}
156 | {S_WATCH_TOPIC}
157 |
158 |
159 |
160 |
164 |
165 |
166 |
{S_AUTH_LIST}
167 |
168 |
174 |
175 |
--------------------------------------------------------------------------------
/templates/phpbbSilver/phpbbSilver.cfg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/css/normalize.css:
--------------------------------------------------------------------------------
1 | /*! normalize.css 2011-09-22T17:42 UTC - http://github.com/necolas/normalize.css */
2 |
3 | /* ========== ========== ========== DEFINICJE HTML5 ========== ========== ========== */
4 | /*
5 | * Corrects block display not defined in IE6/7/8/9 & FF3
6 | */
7 | article,
8 | aside,
9 | details,
10 | figcaption,
11 | figure,
12 | footer,
13 | header,
14 | hgroup,
15 | nav,
16 | section{
17 | display:block;}
18 |
19 | /*
20 | * Corrects inline-block display not defined in IE6/7/8/9 & FF3
21 | */
22 | audio,
23 | canvas,
24 | video{
25 | display:inline-block;
26 | *display:inline;
27 | *zoom:1;}
28 |
29 | /*
30 | * Prevents modern browsers from displaying 'audio' without controls
31 | */
32 | audio:not([controls]){
33 | display:none;}
34 |
35 | /*
36 | * Addresses styling for 'hidden' attribute not present in IE7/8/9, FF3, S4
37 | */
38 | [hidden]{
39 | display:none;}
40 |
41 | /* ========== ========== ========== PODSTAWA ========== ========== ========== */
42 | /*
43 | * 1. Keeps page centred in all browsers regardless of content height
44 | * 2. Prevents iOS text size adjust after orientation change, without disabling user zoom
45 | * www.456bereastreet.com/archive/201012/controlling_text_size_in_safari_for_ios_without_disabling_user_zoom/
46 | */
47 | html{
48 | overflow-y:scroll; /*1*/
49 | -webkit-text-size-adjust:100%; /*2*/
50 | -ms-text-size-adjust:100%;} /*2*/
51 |
52 | body{
53 | margin:0;}
54 |
55 | /*
56 | * Addresses font-family inconsistency between 'textarea' and other form elements.
57 | */
58 | body,
59 | button,
60 | input,
61 | select,
62 | textarea{
63 | font-family: sans-serif;}
64 |
65 | /* ========== ========== ========== LINKI ========== ========== ========== */
66 | a{
67 | color:#00e;}
68 |
69 | a:visited{
70 | color:#551a8b;}
71 |
72 | /*
73 | * Addresses outline displayed oddly in Chrome
74 | */
75 | a:focus{
76 | outline:thin dotted;}
77 |
78 | /*
79 | * Improves readability when focused and also mouse hovered in all browsers
80 | * people.opera.com/patrickl/experiments/keyboard/test
81 | */
82 | a:hover,
83 | a:active{
84 | outline:0;}
85 |
86 | /* ========== ========== ========== TOPOGRAFIA ========== ========== ========== */
87 |
88 | /*
89 | * Addresses styling not present in IE7/8/9, S5, Chrome
90 | */
91 | abbr[title]{
92 | border-bottom:1px dotted;}
93 |
94 | /*
95 | * Addresses style set to 'bolder' in FF3/4, S4/5, Chrome
96 | */
97 | b,
98 | strong{
99 | font-weight:bold;}
100 |
101 | blockquote{
102 | margin:1em 40px;}
103 |
104 | /*
105 | * Addresses styling not present in S5, Chrome
106 | */
107 | dfn{
108 | font-style:italic;}
109 |
110 | /*
111 | * Addresses styling not present in IE6/7/8/9
112 | */
113 | mark{
114 | background:#ff0;
115 | color:#000;}
116 |
117 | /*
118 | * Corrects font family set oddly in S4/5, Chrome
119 | * en.wikipedia.org/wiki/User:Davidgothberg/Test59
120 | */
121 | pre,
122 | code,
123 | kbd,
124 | samp{
125 | font-family:monospace, serif;
126 | font-size:1em;}
127 |
128 | /*
129 | * Improves readability of pre-formatted text in all browsers
130 | */
131 | pre{
132 | white-space:pre;
133 | white-space:pre-wrap;
134 | word-wrap:break-word;}
135 |
136 | small{
137 | font-size:75%;}
138 |
139 | /*
140 | * Prevents sub and sup affecting line-height in all browsers
141 | * gist.github.com/413930
142 | */
143 | sub,
144 | sup{
145 | font-size:75%;
146 | line-height:0;
147 | position:relative;
148 | vertical-align:baseline;}
149 |
150 | sup{
151 | top:-0.5em;}
152 |
153 | sub{
154 | bottom:-0.25em;}
155 |
156 |
157 | /* ========== ========== ========== LISTY ========== ========== ========== */
158 | ul,
159 | ol{
160 | margin:1em 0;
161 | padding:0 0 0 40px;}
162 |
163 | dd{
164 | margin:0 0 0 40px;}
165 |
166 | nav ul,
167 | nav ol{
168 | list-style:none;
169 | list-style-image:none;}
170 |
171 |
172 | /* ========== ========== ========== TREŚĆ ZALĄCZANA ========== ========== ========== */
173 |
174 | /*
175 | * 1. Removes border when inside 'a' element in IE6/7/8/9, FF3
176 | */
177 | img{
178 | border:0;} /*1*/
179 |
180 | /*
181 | * Corrects overflow displayed oddly in IE9
182 | */
183 | svg:not(:root){
184 | overflow:hidden;}
185 |
186 |
187 | /* ========== ========== ========== ELEMENTY FIGURE ========== ========== ========== */
188 |
189 | /*
190 | * Addresses margin not present in IE6/7/8/9, S5, O11
191 | */
192 | figure{
193 | margin:0;}
194 |
195 | /* ========== ========== ========== FORMULARZE ========== ========== ========== */
196 |
197 | /*
198 | * Define consistent border, margin, and padding
199 | */
200 | fieldset{
201 | border:1px solid #c0c0c0;
202 | margin:0 2px;
203 | padding:0.35em 0.625em 0.75em;}
204 |
205 | /*
206 | * 1. Corrects color not being inherited in IE6/7/8/9
207 | */
208 | legend{
209 | border:0;} /*1*/
210 |
211 | /*
212 | * 1. Corrects font size not being inherited in all browsers
213 | * 2. Addresses margins set differently in IE6/7, FF3/4, S5, Chrome
214 | * 3. Improves appearance and consistency in all browsers
215 | */
216 | button,
217 | input,
218 | select,
219 | textarea{
220 | font-size:100%; /*1*/
221 | margin:0; /*2*/
222 | vertical-align:baseline;} /*3*/
223 |
224 | /*
225 | * Addresses FF3/4 setting line-height on 'input' using !important in the UA stylesheet
226 | */
227 | button,
228 | input{
229 | line-height:normal;} /*1*/
230 |
231 | /*
232 | * 1. Improves usability and consistency of cursor style between image-type 'input' and others
233 | * 2. Corrects inability to style clickable 'input' types in iOS
234 | */
235 | button,
236 | input[type="button"],
237 | input[type="reset"],
238 | input[type="submit"]{
239 | cursor:pointer; /*1*/
240 | -webkit-appearance:button;} /*2*/
241 |
242 | /*
243 | * 1. Addresses box sizing set to content-box in IE8/9
244 | * 2. Addresses excess padding in IE8/9
245 | */
246 | input[type="checkbox"],
247 | input[type="radio"]{
248 | box-sizing:border-box; /*1*/
249 | padding:0;} /*2*/
250 |
251 | /*
252 | * 1. Addresses appearance set to searchfield in S5, Chrome
253 | * 2. Addresses box sizing set to border-box in S5, Chrome (include -moz to future-proof)
254 | */
255 | input[type="search"]{
256 | -webkit-appearance:textfield; /*1*/
257 | -moz-box-sizing:content-box;
258 | -webkit-box-sizing:content-box; /*2*/
259 | box-sizing:content-box;}
260 |
261 | /*
262 | * Corrects inner padding displayed oddly in S5, Chrome on OSX
263 | */
264 | input[type="search"]::-webkit-search-decoration{
265 | -webkit-appearance:none;}
266 |
267 | /*
268 | * Corrects inner padding and border displayed oddly in FF3/4
269 | * www.sitepen.com/blog/2008/05/14/the-devils-in-the-details-fixing-dojos-toolbar-buttons/
270 | */
271 | button::-moz-focus-inner,
272 | input::-moz-focus-inner{
273 | border:0;
274 | padding:0;}
275 |
276 | /*
277 | * 1. Removes default vertical scrollbar in IE6/7/8/9
278 | * 2. Improves readability and alignment in all browsers
279 | */
280 | textarea{
281 | overflow:auto; /*1*/
282 | vertical-align:top; /*2*/}
283 |
284 |
285 | /* ========== ========== ========== TABELE ========== ========== ========== */
286 |
287 | /*
288 | * Remove most spacing between table cells
289 | */
290 | table{
291 | border-collapse:collapse;
292 | border-spacing:0;}
--------------------------------------------------------------------------------
/templates/phpbbSilver/index_body.tpl:
--------------------------------------------------------------------------------
1 |
2 |
{L_POPULAR_TOPICS}
3 |
13 |
14 |
15 |
16 | {LAST_VISIT_DATE}
17 |
18 |
19 |
20 |
28 |
29 |
30 |
31 |
32 |
35 |
36 |
37 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
63 |
64 | {L_TOPICS}
65 | {catrow.forumrow.TOPICS}
66 | {L_POSTS}
67 | {catrow.forumrow.POSTS}
68 | {L_LASTPOST}
69 | {catrow.forumrow.LAST_POST_AVATAR} {catrow.forumrow.LAST_POST}
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 | {TOTAL_POSTS}
81 | {TOTAL_USERS}
82 | {NEWEST_USER}
83 |
84 |
85 | {TOTAL_USERS_ONLINE} [{L_WHOSONLINE_ADMIN} ] [{L_WHOSONLINE_MOD} ]
86 | {RECORD_USERS}
87 | {LOGGED_IN_USER_LIST}
88 |
89 |
90 | Online :
91 | {L_ONLINE_EXPLAIN}
92 |
93 |
94 |
95 |
96 |
97 |
98 | {L_LOGIN_LOGOUT}
99 |
100 | {L_USERNAME}
101 |
102 | {L_PASSWORD}
103 |
104 |
105 | {L_AUTO_LOGIN}
106 |
107 |
108 |
109 | {L_LOGIN}
110 |
111 |
112 |
113 |
114 |
115 |
123 |
130 |
137 |
144 |
145 |
146 |
147 |
152 |
153 |
154 |
155 |
156 | {observerow.AVATAR_IMG} {observerow.USERNAME}
157 |
158 | {L_POSTS}:
159 | {observerow.POSTS}
160 | {L_TOTAL_HELPS}:
161 | {observerow.HELPS}
162 |
163 | {observerow.OBSERVE}
164 |
165 |
166 |
167 |
168 |
169 |
170 |
171 | {L_NEW_POSTS}
172 | {L_NO_NEW_POSTS}
173 | {L_FORUM_LOCKED}
174 |
175 |
--------------------------------------------------------------------------------
/foldbox.js:
--------------------------------------------------------------------------------
1 | var foldbox_width = 0;
2 | var foldbox_items = [];
3 |
4 | function foldbox(el, id)
5 | {
6 | if (document.getElementById(id).style.overflow == 'scroll')
7 | {
8 | with (document.getElementById(id).style)
9 | {
10 | overflow = 'visible';
11 | width = height = 'auto'
12 | }
13 | el.innerHTML = foldbox_lang['Fold'];
14 | }
15 | else
16 | {
17 | with(document.getElementById(id))
18 | {
19 | style.overflow = 'scroll';
20 | if (foldbox_width) style.width = foldbox_width + 'px';
21 | if (offsetHeight && offsetHeight > 300) style.height = '300px';
22 | }
23 | el.innerHTML = foldbox_lang['Unfold'];
24 | }
25 | }
26 |
27 | window.setTimeout(
28 | function()
29 | {
30 | with (document.querySelectorAll ? document.querySelectorAll('div.foldbox') : document.getElementsByTagName('div'))
31 | {
32 | for (var i = 0; i < length; i++)
33 | {
34 | if (/(^| )foldbox( |$)/.test(item(i).className) && (item(i).offsetHeight && item(i).offsetHeight > 300 || item(i).offsetWidth && screen.availWidth && item(i).offsetWidth > screen.availWidth))
35 | {
36 | foldbox_items[foldbox_items.length] = [item(i), item(i).innerHTML];
37 | item(i).innerHTML = '
';
38 | }
39 | }
40 |
41 | if (foldbox_items.length > 0)
42 | {
43 | foldbox_width = foldbox_items[0][0].offsetWidth;
44 | for (i = 0; i < foldbox_items.length; i++)
45 | {
46 | foldbox_items[i][0].style.overflow = 'scroll';
47 | if (foldbox_width) foldbox_items[i][0].style.width = foldbox_width + 'px';
48 | foldbox_items[i][0].innerHTML = foldbox_items[i][1];
49 | if (foldbox_items[i][0].offsetHeight && foldbox_items[i][0].offsetHeight > 300) foldbox_items[i][0].style.height = '300px';
50 | document.getElementById(foldbox_items[i][0].id + '_link').innerHTML = '' + foldbox_lang['Unfold'] + ' ';
51 | }
52 | }
53 | }
54 |
55 | foldbox_items = [];
56 |
57 | function viewbox_show()
58 | {
59 | window.clearTimeout(this._id);
60 | var self = this;
61 | this._id = window.setTimeout(function()
62 | {
63 | with (self.getElementsByTagName('select')[0])
64 | {
65 | style.display = 'inline';
66 | }
67 | },
68 | 500
69 | );
70 | }
71 |
72 | function viewbox_hide()
73 | {
74 | window.clearTimeout(this._id);
75 | var self = this;
76 | this._id = window.setTimeout(function()
77 | {
78 | with (self.getElementsByTagName('select')[0])
79 | {
80 | if (value == '') style.display = 'none';
81 | }
82 | },
83 | 1000
84 | );
85 | }
86 |
87 | var run_lang = {
88 | "7": "Ada", "13": "Assembler", "104": "AWK (gawk)", "105": "AWK (mawk)",
89 | "28": "Bash", "110": "bc", "12": "Brainf**k",
90 | "11": "C", "27": "C#", "1": "C++", "106": "COBOL", "32": "Common Lisp (clisp)",
91 | "102": "D (dmd)",
92 | "36": "Erlang",
93 | "107": "Forth", "5": "Fortran",
94 | "21": "Haskell",
95 | "16": "Icon",
96 | "10": "Java", "35": "JavaScript (rhino)", "112": "JavaScript (spidermonkey)",
97 | "26": "Lua",
98 | "8": "Ocaml",
99 | "22": "Pascal (fpc)", "2": "Pascal (gpc)", "3": "Perl", "29": "PHP", "19": "Pike", "108": "Prolog (gnu)", "15": "Prolog (swi)", "4": "Python",
100 | "17": "Ruby",
101 | "39": "Scala", "33": "Scheme (guile)", "23": "Smalltalk",
102 | "38": "Tcl", "62": "Text",
103 | "100": "Vala", "101": "Visual Basic .NET"
104 | };
105 | var run_select = ' ';
106 | for (var p in run_lang)
107 | {
108 | if (typeof p != 'function') run_select += '' + run_lang[p] + ' ';
109 | }
110 | run_select += ' ';
111 |
112 | with (document.querySelectorAll ? document.querySelectorAll('span.viewbox, span.runbox') : document.getElementsByTagName('span'))
113 | {
114 | for (var i = 0; i < length; i++)
115 | {
116 | if (/(^| )viewbox( |$)/.test(item(i).className))
117 | {
118 | item(i).innerHTML = 'CSS JS HTML ' + item(i).innerHTML;
119 | item(i).onmouseover = viewbox_show;
120 | item(i).onmouseout = viewbox_hide;
121 | }
122 | else if (/(^| )runbox( |$)/.test(item(i).className))
123 | {
124 | item(i).innerHTML = run_select + item(i).innerHTML;
125 | item(i).onmouseover = viewbox_show;
126 | item(i).onmouseout = viewbox_hide;
127 | }
128 | }
129 | }
130 | },
131 | 200
132 | );
133 |
134 | function viewbox_striptags(code)
135 | {
136 | return code == '' ? '' : code.replace(/ /gi, '\n').replace(/<[^>]*>/g, '').replace(/ /g, ' ');
137 | }
138 |
139 | function viewbox(el, id_form, id_code)
140 | {
141 | function viewbox_replacetag(tag, code, message)
142 | {
143 | if (code != '' && code != message.value)
144 | {
145 | var open_tag = false;
146 | if (tag.charAt(0) != '/')
147 | {
148 | open_tag = true;
149 | var m = message.value.match(new RegExp('<(' + tag + '(\\s.*?|\\s*/)?)>', 'i'));
150 | if (m) tag = m[1];
151 | }
152 | tag = '<' + tag + '>';
153 | var pos = message.value.toLowerCase().indexOf(tag);
154 | if (pos < 0) message.value = code + message.value;
155 | else
156 | {
157 | if (open_tag) pos += tag.length;
158 | message.value = message.value.substring(0, pos) + code + message.value.substring(pos);
159 | }
160 | }
161 | }
162 |
163 | with (document.getElementById(id_form))
164 | {
165 | var code = {'css': '', 'js': '', 'html': ''};
166 | var code_selected = false;
167 |
168 | with (document.querySelectorAll ? document.querySelectorAll('select.viewbox') : document.getElementsByTagName('select'))
169 | {
170 | for (var i = 0; i < length; i++)
171 | {
172 | if (/(^| )viewbox( |$)/.test(item(i).className) && item(i).value != '')
173 | {
174 | code[item(i).value] += document.getElementById(item(i).parentNode.id.replace(/^viewbox_/, '')).innerHTML;
175 | if (item(i).parentNode.getElementsByTagName('a')[0] == el) code_selected = true;
176 | }
177 | }
178 | }
179 |
180 | message.value = code_selected ? '' : (selectedTexts[id_code] ? document.getElementById(id_code).innerHTML.replace(/^]*)?>|<\/textarea>$/gi, '') : viewbox_striptags(document.getElementById(id_code).innerHTML));
181 |
182 | viewbox_replacetag('body', viewbox_striptags(code['html']), message);
183 | if (code['js'] != '') viewbox_replacetag('body', '<script type="text/javascript">\n// <![CDATA[\n' + viewbox_striptags(code['js']) + '\n// ]]>\n</script>', message);
184 | if (code['css'] != '') viewbox_replacetag('/head', '<style type="text/css">\n/* <![CDATA[ */\n' + viewbox_striptags(code['css']) + '\n/* ]]> */\n</style>', message);
185 |
186 | window.setTimeout(function() { submit(); }, 0);
187 | }
188 | }
189 |
190 | function runbox(el, id_form, id_code)
191 | {
192 | with (document.getElementById(id_form))
193 | {
194 | with (document.querySelectorAll ? document.querySelectorAll('select.runbox') : document.getElementsByTagName('select'))
195 | {
196 | for (var i = 0; i < length; i++)
197 | {
198 | if (/(^| )runbox( |$)/.test(item(i).className) && item(i).value != '')
199 | {
200 | if (item(i).parentNode.getElementsByTagName('a')[0] == el)
201 | {
202 | lang.value = item(i).value;
203 | break;
204 | }
205 | }
206 | }
207 | }
208 |
209 | file.value = selectedTexts[id_code] ? document.getElementById(id_code).innerHTML.replace(/^]*)?>|<\/textarea>$/gi, '') : viewbox_striptags(document.getElementById(id_code).innerHTML);
210 | file.value = file.value.replace(/<br ?\/?>/gi, '\n').replace(/</g, '<').replace(/>/g, '>').replace(/&/g, '&');
211 |
212 | window.setTimeout(function() { submit(); }, 0);
213 | }
214 | }
--------------------------------------------------------------------------------