Jeremy D commited on 2013-07-21 20:18:43
Showing 3 changed files, with 77 additions and 11 deletions.
... | ... |
@@ -244,7 +244,13 @@ class pB |
244 | 244 |
$this->title = pBL('index_title'); |
245 | 245 |
|
246 | 246 |
if (is_callable(array($this->tpl, 'htmlHead'))) |
247 |
+ { |
|
248 |
+ echo ' |
|
249 |
+ <!-- Start HTML Header -->'; |
|
247 | 250 |
$this->tpl->htmlHead($this->title); |
251 |
+ echo ' |
|
252 |
+ <!-- End HTML Header -->'; |
|
253 |
+ } |
|
248 | 254 |
|
249 | 255 |
// Trying to save this paste? |
250 | 256 |
if (isset($_POST['save'])) |
... | ... |
@@ -252,12 +258,21 @@ class pB |
252 | 258 |
|
253 | 259 |
// Show any errors. |
254 | 260 |
if (!empty($warnings)) |
255 |
- echo '<div class="error_message">', implode('<br />', $warnings), '</div>'; |
|
261 |
+ echo ' |
|
262 |
+ <!-- Start Warnings --> |
|
263 |
+ <div class="error_message">', implode('<br />', $warnings), '</div> |
|
264 |
+ <!-- End Warnings -->'; |
|
256 | 265 |
|
257 | 266 |
$this->postForm((!empty($_POST['code']) ? $_POST['code'] : '')); |
258 | 267 |
|
259 | 268 |
if (is_callable(array($this->tpl, 'htmlFooter'))) |
269 |
+ { |
|
270 |
+ echo ' |
|
271 |
+ <!-- Start HTML Footer -->'; |
|
260 | 272 |
$this->tpl->htmlFooter(); |
273 |
+ echo ' |
|
274 |
+ <!-- End HTML Footer -->'; |
|
275 |
+ } |
|
261 | 276 |
} |
262 | 277 |
|
263 | 278 |
/* |
... | ... |
@@ -269,34 +284,52 @@ class pB |
269 | 284 |
$this->title = pBL('view_title', $id); |
270 | 285 |
|
271 | 286 |
if (is_callable(array($this->tpl, 'htmlHead'))) |
287 |
+ { |
|
288 |
+ echo ' |
|
289 |
+ <!-- Start HTML Header -->'; |
|
272 | 290 |
$this->tpl->htmlHead($this->title); |
291 |
+ echo ' |
|
292 |
+ <!-- End HTML Header -->'; |
|
293 |
+ } |
|
273 | 294 |
|
274 | 295 |
// Give admins a hint what the key is. |
275 | 296 |
if (!empty($this->warnings)) |
276 | 297 |
echo ' |
298 |
+ <!-- Start Admin Warning --> |
|
277 | 299 |
<div class="alert alert-error"> |
278 | 300 |
<h4 class="alert-heading">This paste has failed to be created because:</h4> |
279 | 301 |
', implode('<br />', $this->warnings), ' |
280 |
- </div>'; |
|
302 |
+ </div> |
|
303 |
+ <!-- End Admin Warning -->'; |
|
281 | 304 |
|
282 | 305 |
$paste = $this->showPaste($id); |
283 | 306 |
|
284 | 307 |
// Give admins a hint what the key is. |
285 | 308 |
if (!empty($paste['key']) && $this->usr->is_admin()) |
286 | 309 |
echo ' |
287 |
- <div class="information"><b>Key:</b> ', $paste['key'], '</div>'; |
|
310 |
+ <!-- Start Admin Key Hint --> |
|
311 |
+ <div class="information"><b>Key:</b> ', $paste['key'], '</div> |
|
312 |
+ <!-- End Admin Key Hint -->'; |
|
288 | 313 |
|
289 | 314 |
if (!empty($paste['parsed'])) |
290 | 315 |
echo ' |
316 |
+ <!-- Start Parsed Content --> |
|
291 | 317 |
<div id="formated"> |
292 | 318 |
<h2>', pBL('formated_paste'), '</h2> |
293 | 319 |
<div id="formated_paste">', $paste['parsed'], '</div> |
294 |
- </div>'; |
|
320 |
+ </div> |
|
321 |
+ <!-- End Parsed Content -->'; |
|
295 | 322 |
|
296 | 323 |
$this->postForm($paste['body'], $id, $paste['use_geshi'], $paste['language']); |
297 | 324 |
|
298 | 325 |
if (is_callable(array($this->tpl, 'htmlFooter'))) |
326 |
+ { |
|
327 |
+ echo ' |
|
328 |
+ <!-- Start HTML Footer -->'; |
|
299 | 329 |
$this->tpl->htmlFooter(); |
330 |
+ echo ' |
|
331 |
+ <!-- End HTML Footer -->'; |
|
332 |
+ } |
|
300 | 333 |
} |
301 | 334 |
|
302 | 335 |
/* |
... | ... |
@@ -371,10 +404,17 @@ class pB |
371 | 404 |
|
372 | 405 |
// Start to wrap it in a template if needed. |
373 | 406 |
if (is_callable(array($this->tpl, 'recentTop'))) |
407 |
+ { |
|
408 |
+ echo ' |
|
409 |
+ <!-- Start Show Recent Top -->'; |
|
374 | 410 |
$this->tpl->recentTop(); |
411 |
+ echo ' |
|
412 |
+ <!-- End Show Recent Top -->'; |
|
413 |
+ } |
|
375 | 414 |
|
376 | 415 |
// Output this. |
377 | 416 |
echo ' |
417 |
+ <!-- Start Recent --> |
|
378 | 418 |
<ul> |
379 | 419 |
<li class="widget"> |
380 | 420 |
<h2 class="widgettitle" title="I am not a Easter Egg">', pBL('recent'), '</h2> |
... | ... |
@@ -388,11 +428,18 @@ class pB |
388 | 428 |
echo ' |
389 | 429 |
</ul> |
390 | 430 |
</li> |
391 |
- </ul>'; |
|
431 |
+ </ul> |
|
432 |
+ <!-- End Recent -->'; |
|
392 | 433 |
|
393 | 434 |
// Close up the wrapper. |
394 | 435 |
if (is_callable(array($this->tpl, 'recentBottom'))) |
436 |
+ { |
|
437 |
+ echo ' |
|
438 |
+ <!-- End Show Recent Bottom -->'; |
|
395 | 439 |
$this->tpl->recentBottom(); |
440 |
+ echo ' |
|
441 |
+ <!-- End Show Recent Bottom -->'; |
|
442 |
+ } |
|
396 | 443 |
} |
397 | 444 |
|
398 | 445 |
/* |
... | ... |
@@ -405,9 +452,16 @@ class pB |
405 | 452 |
public function postForm($code, $id = 0, $use_geshi = true, $geshi_language = 'php') |
406 | 453 |
{ |
407 | 454 |
if (is_callable(array($this->tpl, 'postTop'))) |
455 |
+ { |
|
456 |
+ echo ' |
|
457 |
+ <!-- Start New Paste Top -->'; |
|
408 | 458 |
$this->tpl->postTop(); |
459 |
+ echo ' |
|
460 |
+ <!-- End New Paste Top -->'; |
|
461 |
+ } |
|
409 | 462 |
|
410 | 463 |
echo ' |
464 |
+ <!-- Start Post Form --> |
|
411 | 465 |
<form method="post" action="', $this->URL('post'), '"> |
412 | 466 |
<div id="name_container"> |
413 | 467 |
<span id="name_text" class="container_text">', pBL('user_name'), ':</span> |
... | ... |
@@ -475,7 +529,8 @@ class pB |
475 | 529 |
|
476 | 530 |
if (pBS::get('human_check')) |
477 | 531 |
{ |
478 |
- echo '<li>'; |
|
532 |
+ echo ' |
|
533 |
+ <li>'; |
|
479 | 534 |
$this->antispam->template(); |
480 | 535 |
echo '</li>'; |
481 | 536 |
} |
... | ... |
@@ -489,10 +544,17 @@ class pB |
489 | 544 |
|
490 | 545 |
echo ' |
491 | 546 |
<input id="submit" type="submit" name="submit" value="', pBL('submit'), '" /> |
492 |
- </form>'; |
|
547 |
+ </form> |
|
548 |
+ <!-- End Post Form -->'; |
|
493 | 549 |
|
494 | 550 |
if (is_callable(array($this->tpl, 'postBottom'))) |
551 |
+ { |
|
552 |
+ echo ' |
|
553 |
+ <!-- Start New Paste Bottom -->'; |
|
495 | 554 |
$this->tpl->postBottom(); |
555 |
+ echo ' |
|
556 |
+ <!-- End New Paste Bottom -->'; |
|
557 |
+ } |
|
496 | 558 |
} |
497 | 559 |
|
498 | 560 |
/* |
... | ... |
@@ -53,6 +53,7 @@ class pTPL_smf extends pTPL |
53 | 53 |
public function recentTop() |
54 | 54 |
{ |
55 | 55 |
echo ' |
56 |
+ <!-- Start Recent Box --> |
|
56 | 57 |
<div id="paste_recent" class="floatright">'; |
57 | 58 |
} |
58 | 59 |
|
... | ... |
@@ -62,6 +63,7 @@ class pTPL_smf extends pTPL |
62 | 63 |
public function recentBottom() |
63 | 64 |
{ |
64 | 65 |
echo ' |
65 |
- </div>'; |
|
66 |
+ </div> |
|
67 |
+ <!-- End Recent Box -->'; |
|
66 | 68 |
} |
67 | 69 |
} |
68 | 70 |
\ No newline at end of file |
... | ... |
@@ -49,16 +49,18 @@ class pTPL_wp extends pTPL |
49 | 49 |
// Lets not always show the source links. |
50 | 50 |
if (defined('PB_SHOW_SOURCE')) |
51 | 51 |
echo ' |
52 |
+ <!-- Start Show Source --> |
|
52 | 53 |
<br /> |
53 | 54 |
<ul> |
54 | 55 |
<li class="widget"> |
55 | 56 |
<h2 class="widgettitle">See the Source</h2> |
56 | 57 |
<ul> |
57 |
- <li><a href="http://git.sleepycode.com/?a=summary&p=SMF%20Pastebin">Local Source</li> |
|
58 |
- <li><a href="https://github.com/jdarwood007/pastebin">GitHub</li> |
|
58 |
+ <li><a href="http://git.sleepycode.com/?a=summary&p=SMF%20Pastebin">Local Source</a></li> |
|
59 |
+ <li><a href="https://github.com/jdarwood007/pastebin">GitHub</a></li> |
|
59 | 60 |
</ul> |
60 | 61 |
</li> |
61 |
- </ul>'; |
|
62 |
+ </ul> |
|
63 |
+ <!-- End Show Source -->'; |
|
62 | 64 |
|
63 | 65 |
$specialPage['sidebar'] = ob_get_contents(); |
64 | 66 |
ob_end_clean(); |
65 | 67 |