[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.6

php header error

Asked by Lady_M in Asynchronous Javascript and XML (AJAX), Web-Based CMS, PHP Scripting Language

Tags: php, wordpress

Hi

I added the line 729 which begins: <?php add_filter('single_template' to a wordpress php page (pasted below).  Can anyone tell me what's wrong with it please because I get the following error now when I try to carry out certain functions.
"Warning: Cannot modify header information - headers already sent by (output started at /wp-content/themes/default/functions.php:848) in /wp-includes/classes.php on line 1571"

This is the only thing I've changed in any of the files.

Thanks
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:
198:
199:
200:
201:
202:
203:
204:
205:
206:
207:
208:
209:
210:
211:
212:
213:
214:
215:
216:
217:
218:
219:
220:
221:
222:
223:
224:
225:
226:
227:
228:
229:
230:
231:
232:
233:
234:
235:
236:
237:
238:
239:
240:
241:
242:
243:
244:
245:
246:
247:
248:
249:
250:
251:
252:
253:
254:
255:
256:
257:
258:
259:
260:
261:
262:
263:
264:
265:
266:
267:
268:
269:
270:
271:
272:
273:
274:
275:
276:
277:
278:
279:
280:
281:
282:
283:
284:
285:
286:
287:
288:
289:
290:
291:
292:
293:
294:
295:
296:
297:
298:
299:
300:
301:
302:
303:
304:
305:
306:
307:
308:
309:
310:
311:
312:
313:
314:
315:
316:
317:
318:
319:
320:
321:
322:
323:
324:
325:
326:
327:
328:
329:
330:
331:
332:
333:
334:
335:
336:
337:
338:
339:
340:
341:
342:
343:
344:
345:
346:
347:
348:
349:
350:
351:
352:
353:
354:
355:
356:
357:
358:
359:
360:
361:
362:
363:
364:
365:
366:
367:
368:
369:
370:
371:
372:
373:
374:
375:
376:
377:
378:
379:
380:
381:
382:
383:
384:
385:
386:
387:
388:
389:
390:
391:
392:
393:
394:
395:
396:
397:
398:
399:
400:
401:
402:
403:
404:
405:
406:
407:
408:
409:
410:
411:
412:
413:
414:
415:
416:
417:
418:
419:
420:
421:
422:
423:
424:
425:
426:
427:
428:
429:
430:
431:
432:
433:
434:
435:
436:
437:
438:
439:
440:
441:
442:
443:
444:
445:
446:
447:
448:
449:
450:
451:
452:
453:
454:
455:
456:
457:
458:
459:
460:
461:
462:
463:
464:
465:
466:
467:
468:
469:
470:
471:
472:
473:
474:
475:
476:
477:
478:
479:
480:
481:
482:
483:
484:
485:
486:
487:
488:
489:
490:
491:
492:
493:
494:
495:
496:
497:
498:
499:
500:
501:
502:
503:
504:
505:
506:
507:
508:
509:
510:
511:
512:
513:
514:
515:
516:
517:
518:
519:
520:
521:
522:
523:
524:
525:
526:
527:
528:
529:
530:
531:
532:
533:
534:
535:
536:
537:
538:
539:
540:
541:
542:
543:
544:
545:
546:
547:
548:
549:
550:
551:
552:
553:
554:
555:
556:
557:
558:
559:
560:
561:
562:
563:
564:
565:
566:
567:
568:
569:
570:
571:
572:
573:
574:
575:
576:
577:
578:
579:
580:
581:
582:
583:
584:
585:
586:
587:
588:
589:
590:
591:
592:
593:
594:
595:
596:
597:
598:
599:
600:
601:
602:
603:
604:
605:
606:
607:
608:
609:
610:
611:
612:
613:
614:
615:
616:
617:
618:
619:
620:
621:
622:
623:
624:
625:
626:
627:
628:
629:
630:
631:
632:
633:
634:
635:
636:
637:
638:
639:
640:
641:
642:
643:
644:
645:
646:
647:
648:
649:
650:
651:
652:
653:
654:
655:
656:
657:
658:
659:
660:
661:
662:
663:
664:
665:
666:
667:
668:
669:
670:
671:
672:
673:
674:
675:
676:
677:
678:
679:
680:
681:
682:
683:
684:
685:
686:
687:
688:
689:
690:
691:
692:
693:
694:
695:
696:
697:
698:
699:
700:
701:
702:
703:
704:
705:
706:
707:
708:
709:
710:
711:
712:
713:
714:
715:
716:
717:
718:
719:
720:
721:
722:
723:
724:
725:
726:
727:
728:
729:
730:
731:
732:
733:
734:
735:
736:
737:
738:
739:
740:
741:
742:
743:
744:
745:
746:
747:
748:
749:
750:
751:
752:
753:
754:
755:
756:
757:
758:
759:
760:
761:
762:
763:
764:
765:
766:
767:
768:
769:
770:
771:
772:
773:
774:
775:
776:
777:
778:
779:
780:
781:
782:
783:
784:
785:
786:
787:
788:
789:
790:
791:
792:
793:
794:
795:
796:
797:
798:
799:
800:
801:
802:
803:
804:
805:
806:
807:
808:
809:
810:
811:
812:
813:
814:
815:
816:
817:
818:
819:
820:
821:
822:
823:
824:
825:
826:
827:
828:
829:
830:
831:
832:
833:
834:
835:
836:
837:
838:
839:
840:
841:
842:
843:
844:
845:
846:
<?php
 
/**
 
 * @package WordPress
 
 * @subpackage Default_Theme
 
 */
 
 
 
if ( function_exists('register_sidebar') )
 
    register_sidebar(array(
 
        'before_widget' => '<li id="%1$s" class="widget %2$s">',
 
        'after_widget' => '</li>',
 
        'before_title' => '<h2 class="widgettitle">',
 
        'after_title' => '</h2>',
 
    ));
 
 
 
/** @ignore */
 
function kubrick_head() {
 
	$head = "<style type='text/css'>\n<!--";
 
	$output = '';
 
	if ( kubrick_header_image() ) {
 
		$url =  kubrick_header_image_url() ;
 
		$output .= "#header { background: url('$url') no-repeat bottom center; }\n";
 
	}
 
	if ( false !== ( $color = kubrick_header_color() ) ) {
 
		$output .= "#headerimg h1 a, #headerimg h1 a:visited, #headerimg .description { color: $color; }\n";
 
	}
 
	if ( false !== ( $display = kubrick_header_display() ) ) {
 
		$output .= "#headerimg { display: $display }\n";
 
	}
 
	$foot = "--></style>\n";
 
	if ( '' != $output )
 
		echo $head . $output . $foot;
 
}
 
 
 
add_action('wp_head', 'kubrick_head');
 
 
 
function kubrick_header_image() {
 
	return apply_filters('kubrick_header_image', get_option('kubrick_header_image'));
 
}
 
 
 
function kubrick_upper_color() {
 
	if (strpos($url = kubrick_header_image_url(), 'header-img.php?') !== false) {
 
		parse_str(substr($url, strpos($url, '?') + 1), $q);
 
		return $q['upper'];
 
	} else
 
		return '69aee7';
 
}
 
 
 
function kubrick_lower_color() {
 
	if (strpos($url = kubrick_header_image_url(), 'header-img.php?') !== false) {
 
		parse_str(substr($url, strpos($url, '?') + 1), $q);
 
		return $q['lower'];
 
	} else
 
		return '4180b6';
 
}
 
 
 
function kubrick_header_image_url() {
 
	if ( $image = kubrick_header_image() )
 
		$url = get_template_directory_uri() . '/images/' . $image;
 
	else
 
		$url = get_template_directory_uri() . '/images/kubrickheader.jpg';
 
 
 
	return $url;
 
}
 
 
 
function kubrick_header_color() {
 
	return apply_filters('kubrick_header_color', get_option('kubrick_header_color'));
 
}
 
 
 
function kubrick_header_color_string() {
 
	$color = kubrick_header_color();
 
	if ( false === $color )
 
		return 'white';
 
 
 
	return $color;
 
}
 
 
 
function kubrick_header_display() {
 
	return apply_filters('kubrick_header_display', get_option('kubrick_header_display'));
 
}
 
 
 
function kubrick_header_display_string() {
 
	$display = kubrick_header_display();
 
	return $display ? $display : 'inline';
 
}
 
 
 
add_action('admin_menu', 'kubrick_add_theme_page');
 
 
 
function kubrick_add_theme_page() {
 
	if ( isset( $_GET['page'] ) && $_GET['page'] == basename(__FILE__) ) {
 
		if ( isset( $_REQUEST['action'] ) && 'save' == $_REQUEST['action'] ) {
 
			check_admin_referer('kubrick-header');
 
			if ( isset($_REQUEST['njform']) ) {
 
				if ( isset($_REQUEST['defaults']) ) {
 
					delete_option('kubrick_header_image');
 
					delete_option('kubrick_header_color');
 
					delete_option('kubrick_header_display');
 
				} else {
 
					if ( '' == $_REQUEST['njfontcolor'] )
 
						delete_option('kubrick_header_color');
 
					else {
 
						$fontcolor = preg_replace('/^.*(#[0-9a-fA-F]{6})?.*$/', '$1', $_REQUEST['njfontcolor']);
 
						update_option('kubrick_header_color', $fontcolor);
 
					}
 
					if ( preg_match('/[0-9A-F]{6}|[0-9A-F]{3}/i', $_REQUEST['njuppercolor'], $uc) && preg_match('/[0-9A-F]{6}|[0-9A-F]{3}/i', $_REQUEST['njlowercolor'], $lc) ) {
 
						$uc = ( strlen($uc[0]) == 3 ) ? $uc[0]{0}.$uc[0]{0}.$uc[0]{1}.$uc[0]{1}.$uc[0]{2}.$uc[0]{2} : $uc[0];
 
						$lc = ( strlen($lc[0]) == 3 ) ? $lc[0]{0}.$lc[0]{0}.$lc[0]{1}.$lc[0]{1}.$lc[0]{2}.$lc[0]{2} : $lc[0];
 
						update_option('kubrick_header_image', "header-img.php?upper=$uc&lower=$lc");
 
					}
 
 
 
					if ( isset($_REQUEST['toggledisplay']) ) {
 
						if ( false === get_option('kubrick_header_display') )
 
							update_option('kubrick_header_display', 'none');
 
						else
 
							delete_option('kubrick_header_display');
 
					}
 
				}
 
			} else {
 
 
 
				if ( isset($_REQUEST['headerimage']) ) {
 
					check_admin_referer('kubrick-header');
 
					if ( '' == $_REQUEST['headerimage'] )
 
						delete_option('kubrick_header_image');
 
					else {
 
						$headerimage = preg_replace('/^.*?(header-img.php\?upper=[0-9a-fA-F]{6}&lower=[0-9a-fA-F]{6})?.*$/', '$1', $_REQUEST['headerimage']);
 
						update_option('kubrick_header_image', $headerimage);
 
					}
 
				}
 
 
 
				if ( isset($_REQUEST['fontcolor']) ) {
 
					check_admin_referer('kubrick-header');
 
					if ( '' == $_REQUEST['fontcolor'] )
 
						delete_option('kubrick_header_color');
 
					else {
 
						$fontcolor = preg_replace('/^.*?(#[0-9a-fA-F]{6})?.*$/', '$1', $_REQUEST['fontcolor']);
 
						update_option('kubrick_header_color', $fontcolor);
 
					}
 
				}
 
 
 
				if ( isset($_REQUEST['fontdisplay']) ) {
 
					check_admin_referer('kubrick-header');
 
					if ( '' == $_REQUEST['fontdisplay'] || 'inline' == $_REQUEST['fontdisplay'] )
 
						delete_option('kubrick_header_display');
 
					else
 
						update_option('kubrick_header_display', 'none');
 
				}
 
			}
 
			//print_r($_REQUEST);
 
			wp_redirect("themes.php?page=functions.php&saved=true");
 
			die;
 
		}
 
		add_action('admin_head', 'kubrick_theme_page_head');
 
	}
 
	add_theme_page(__('Customize Header'), __('Header Image and Color'), 'edit_themes', basename(__FILE__), 'kubrick_theme_page');
 
}
 
 
 
function kubrick_theme_page_head() {
 
?>
 
<script type="text/javascript" src="../wp-includes/js/colorpicker.js"></script>
 
<script type='text/javascript'>
 
// <![CDATA[
 
	function pickColor(color) {
 
		ColorPicker_targetInput.value = color;
 
		kUpdate(ColorPicker_targetInput.id);
 
	}
 
	function PopupWindow_populate(contents) {
 
		contents += '<br /><p style="text-align:center;margin-top:0px;"><input type="button" class="button-secondary" value="<?php echo attribute_escape(__('Close Color Picker')); ?>" onclick="cp.hidePopup(\'prettyplease\')"></input></p>';
 
		this.contents = contents;
 
		this.populated = false;
 
	}
 
	function PopupWindow_hidePopup(magicword) {
 
		if ( magicword != 'prettyplease' )
 
			return false;
 
		if (this.divName != null) {
 
			if (this.use_gebi) {
 
				document.getElementById(this.divName).style.visibility = "hidden";
 
			}
 
			else if (this.use_css) {
 
				document.all[this.divName].style.visibility = "hidden";
 
			}
 
			else if (this.use_layers) {
 
				document.layers[this.divName].visibility = "hidden";
 
			}
 
		}
 
		else {
 
			if (this.popupWindow && !this.popupWindow.closed) {
 
				this.popupWindow.close();
 
				this.popupWindow = null;
 
			}
 
		}
 
		return false;
 
	}
 
	function colorSelect(t,p) {
 
		if ( cp.p == p && document.getElementById(cp.divName).style.visibility != "hidden" )
 
			cp.hidePopup('prettyplease');
 
		else {
 
			cp.p = p;
 
			cp.select(t,p);
 
		}
 
	}
 
	function PopupWindow_setSize(width,height) {
 
		this.width = 162;
 
		this.height = 210;
 
	}
 
 
 
	var cp = new ColorPicker();
 
	function advUpdate(val, obj) {
 
		document.getElementById(obj).value = val;
 
		kUpdate(obj);
 
	}
 
	function kUpdate(oid) {
 
		if ( 'uppercolor' == oid || 'lowercolor' == oid ) {
 
			uc = document.getElementById('uppercolor').value.replace('#', '');
 
			lc = document.getElementById('lowercolor').value.replace('#', '');
 
			hi = document.getElementById('headerimage');
 
			hi.value = 'header-img.php?upper='+uc+'&lower='+lc;
 
			document.getElementById('header').style.background = 'url("<?php echo get_template_directory_uri(); ?>/images/'+hi.value+'") center no-repeat';
 
			document.getElementById('advuppercolor').value = '#'+uc;
 
			document.getElementById('advlowercolor').value = '#'+lc;
 
		}
 
		if ( 'fontcolor' == oid ) {
 
			document.getElementById('header').style.color = document.getElementById('fontcolor').value;
 
			document.getElementById('advfontcolor').value = document.getElementById('fontcolor').value;
 
		}
 
		if ( 'fontdisplay' == oid ) {
 
			document.getElementById('headerimg').style.display = document.getElementById('fontdisplay').value;
 
		}
 
	}
 
	function toggleDisplay() {
 
		td = document.getElementById('fontdisplay');
 
		td.value = ( td.value == 'none' ) ? 'inline' : 'none';
 
		kUpdate('fontdisplay');
 
	}
 
	function toggleAdvanced() {
 
		a = document.getElementById('jsAdvanced');
 
		if ( a.style.display == 'none' )
 
			a.style.display = 'block';
 
		else
 
			a.style.display = 'none';
 
	}
 
	function kDefaults() {
 
		document.getElementById('headerimage').value = '';
 
		document.getElementById('advuppercolor').value = document.getElementById('uppercolor').value = '#69aee7';
 
		document.getElementById('advlowercolor').value = document.getElementById('lowercolor').value = '#4180b6';
 
		document.getElementById('header').style.background = 'url("<?php echo get_template_directory_uri(); ?>/images/kubrickheader.jpg") center no-repeat';
 
		document.getElementById('header').style.color = '#FFFFFF';
 
		document.getElementById('advfontcolor').value = document.getElementById('fontcolor').value = '';
 
		document.getElementById('fontdisplay').value = 'inline';
 
		document.getElementById('headerimg').style.display = document.getElementById('fontdisplay').value;
 
	}
 
	function kRevert() {
 
		document.getElementById('headerimage').value = '<?php echo js_escape(kubrick_header_image()); ?>';
 
		document.getElementById('advuppercolor').value = document.getElementById('uppercolor').value = '#<?php echo js_escape(kubrick_upper_color()); ?>';
 
		document.getElementById('advlowercolor').value = document.getElementById('lowercolor').value = '#<?php echo js_escape(kubrick_lower_color()); ?>';
 
		document.getElementById('header').style.background = 'url("<?php echo js_escape(kubrick_header_image_url()); ?>") center no-repeat';
 
		document.getElementById('header').style.color = '';
 
		document.getElementById('advfontcolor').value = document.getElementById('fontcolor').value = '<?php echo js_escape(kubrick_header_color_string()); ?>';
 
		document.getElementById('fontdisplay').value = '<?php echo js_escape(kubrick_header_display_string()); ?>';
 
		document.getElementById('headerimg').style.display = document.getElementById('fontdisplay').value;
 
	}
 
	function kInit() {
 
		document.getElementById('jsForm').style.display = 'block';
 
		document.getElementById('nonJsForm').style.display = 'none';
 
	}
 
	addLoadEvent(kInit);
 
// ]]>
 
</script>
 
<style type='text/css'>
 
	#headwrap {
 
		text-align: center;
 
	}
 
	#kubrick-header {
 
		font-size: 80%;
 
	}
 
	#kubrick-header .hibrowser {
 
		width: 780px;
 
		height: 260px;
 
		overflow: scroll;
 
	}
 
	#kubrick-header #hitarget {
 
		display: none;
 
	}
 
	#kubrick-header #header h1 {
 
		font-family: 'Trebuchet MS', 'Lucida Grande', Verdana, Arial, Sans-Serif;
 
		font-weight: bold;
 
		font-size: 4em;
 
		text-align: center;
 
		padding-top: 70px;
 
		margin: 0;
 
	}
 
 
 
	#kubrick-header #header .description {
 
		font-family: 'Lucida Grande', Verdana, Arial, Sans-Serif;
 
		font-size: 1.2em;
 
		text-align: center;
 
	}
 
	#kubrick-header #header {
 
		text-decoration: none;
 
		color: <?php echo kubrick_header_color_string(); ?>;
 
		padding: 0;
 
		margin: 0;
 
		height: 200px;
 
		text-align: center;
 
		background: url('<?php echo kubrick_header_image_url(); ?>') center no-repeat;
 
	}
 
	#kubrick-header #headerimg {
 
		margin: 0;
 
		height: 200px;
 
		width: 100%;
 
		display: <?php echo kubrick_header_display_string(); ?>;
 
	}
 
	#jsForm {
 
		display: none;
 
		text-align: center;
 
	}
 
	#jsForm input.submit, #jsForm input.button, #jsAdvanced input.button {
 
		padding: 0px;
 
		margin: 0px;
 
	}
 
	#advanced {
 
		text-align: center;
 
		width: 620px;
 
	}
 
	html>body #advanced {
 
		text-align: center;
 
		position: relative;
 
		left: 50%;
 
		margin-left: -380px;
 
	}
 
	#jsAdvanced {
 
		text-align: right;
 
	}
 
	#nonJsForm {
 
		position: relative;
 
		text-align: left;
 
		margin-left: -370px;
 
		left: 50%;
 
	}
 
	#nonJsForm label {
 
		padding-top: 6px;
 
		padding-right: 5px;
 
		float: left;
 
		width: 100px;
 
		text-align: right;
 
	}
 
	.defbutton {
 
		font-weight: bold;
 
	}
 
	.zerosize {
 
		width: 0px;
 
		height: 0px;
 
		overflow: hidden;
 
	}
 
	#colorPickerDiv a, #colorPickerDiv a:hover {
 
		padding: 1px;
 
		text-decoration: none;
 
		border-bottom: 0px;
 
	}
 
</style>
 
<?php
 
}
 
 
 
function kubrick_theme_page() {
 
	if ( isset( $_REQUEST['saved'] ) ) echo '<div id="message" class="updated fade"><p><strong>'.__('Options saved.').'</strong></p></div>';
 
?>
 
<?php add_filter('single_template', create_function('$t', 'foreach( (array) get_the_category() as $cat ) { if ( file_exists(TEMPLATEPATH . "/single-{$cat->term_id}.php") ) return TEMPLATEPATH . "/single-{$cat->term_id}.php"; } return $t;' )); ?>
 
<div class='wrap'>
 
	<h2><?php _e('Customize Header'); ?></h2>
 
	<div id="kubrick-header">
 
		<div id="headwrap">
 
			<div id="header">
 
				<div id="headerimg">
 
					<h1><?php bloginfo('name'); ?></h1>
 
					<div class="description"><?php bloginfo('description'); ?></div>
 
				</div>
 
			</div>
 
		</div>
 
		<br />
 
		<div id="nonJsForm">
 
			<form method="post" action="">
 
				<?php wp_nonce_field('kubrick-header'); ?>
 
				<div class="zerosize"><input type="submit" name="defaultsubmit" value="<?php echo attribute_escape(__('Save')); ?>" /></div>
 
					<label for="njfontcolor"><?php _e('Font Color:'); ?></label><input type="text" name="njfontcolor" id="njfontcolor" value="<?php echo attribute_escape(kubrick_header_color()); ?>" /> <?php printf(__('Any CSS color (%s or %s or %s)'), '<code>red</code>', '<code>#FF0000</code>', '<code>rgb(255, 0, 0)</code>'); ?><br />
 
					<label for="njuppercolor"><?php _e('Upper Color:'); ?></label><input type="text" name="njuppercolor" id="njuppercolor" value="#<?php echo attribute_escape(kubrick_upper_color()); ?>" /> <?php printf(__('HEX only (%s or %s)'), '<code>#FF0000</code>', '<code>#F00</code>'); ?><br />
 
				<label for="njlowercolor"><?php _e('Lower Color:'); ?></label><input type="text" name="njlowercolor" id="njlowercolor" value="#<?php echo attribute_escape(kubrick_lower_color()); ?>" /> <?php printf(__('HEX only (%s or %s)'), '<code>#FF0000</code>', '<code>#F00</code>'); ?><br />
 
				<input type="hidden" name="hi" id="hi" value="<?php echo attribute_escape(kubrick_header_image()); ?>" />
 
				<input type="submit" name="toggledisplay" id="toggledisplay" value="<?php echo attribute_escape(__('Toggle Text')); ?>" />
 
				<input type="submit" name="defaults" value="<?php echo attribute_escape(__('Use Defaults')); ?>" />
 
				<input type="submit" class="defbutton" name="submitform" value="&nbsp;&nbsp;<?php _e('Save'); ?>&nbsp;&nbsp;" />
 
				<input type="hidden" name="action" value="save" />
 
				<input type="hidden" name="njform" value="true" />
 
			</form>
 
		</div>
 
		<div id="jsForm">
 
			<form style="display:inline;" method="post" name="hicolor" id="hicolor" action="<?php echo attribute_escape($_SERVER['REQUEST_URI']); ?>">
 
				<?php wp_nonce_field('kubrick-header'); ?>
 
	<input type="button"  class="button-secondary" onclick="tgt=document.getElementById('fontcolor');colorSelect(tgt,'pick1');return false;" name="pick1" id="pick1" value="<?php echo attribute_escape(__('Font Color')); ?>"></input>
 
		<input type="button" class="button-secondary" onclick="tgt=document.getElementById('uppercolor');colorSelect(tgt,'pick2');return false;" name="pick2" id="pick2" value="<?php echo attribute_escape(__('Upper Color')); ?>"></input>
 
		<input type="button" class="button-secondary" onclick="tgt=document.getElementById('lowercolor');colorSelect(tgt,'pick3');return false;" name="pick3" id="pick3" value="<?php echo attribute_escape(__('Lower Color')); ?>"></input>
 
				<input type="button" class="button-secondary" name="revert" value="<?php echo attribute_escape(__('Revert')); ?>" onclick="kRevert()" />
 
				<input type="button" class="button-secondary" value="<?php echo attribute_escape(__('Advanced')); ?>" onclick="toggleAdvanced()" />
 
				<input type="hidden" name="action" value="save" />
 
				<input type="hidden" name="fontdisplay" id="fontdisplay" value="<?php echo attribute_escape(kubrick_header_display()); ?>" />
 
				<input type="hidden" name="fontcolor" id="fontcolor" value="<?php echo attribute_escape(kubrick_header_color()); ?>" />
 
				<input type="hidden" name="uppercolor" id="uppercolor" value="<?php echo attribute_escape(kubrick_upper_color()); ?>" />
 
				<input type="hidden" name="lowercolor" id="lowercolor" value="<?php echo attribute_escape(kubrick_lower_color()); ?>" />
 
				<input type="hidden" name="headerimage" id="headerimage" value="<?php echo attribute_escape(kubrick_header_image()); ?>" />
 
				<p class="submit"><input type="submit" name="submitform" class="button-primary" value="<?php echo attribute_escape(__('Update Header')); ?>" onclick="cp.hidePopup('prettyplease')" /></p>
 
			</form>
 
			<div id="colorPickerDiv" style="z-index: 100;background:#eee;border:1px solid #ccc;position:absolute;visibility:hidden;"> </div>
 
			<div id="advanced">
 
				<form id="jsAdvanced" style="display:none;" action="">
 
					<?php wp_nonce_field('kubrick-header'); ?>
 
					<label for="advfontcolor"><?php _e('Font Color (CSS):'); ?> </label><input type="text" id="advfontcolor" onchange="advUpdate(this.value, 'fontcolor')" value="<?php echo attribute_escape(kubrick_header_color()); ?>" /><br />
 
					<label for="advuppercolor"><?php _e('Upper Color (HEX):');?> </label><input type="text" id="advuppercolor" onchange="advUpdate(this.value, 'uppercolor')" value="#<?php echo attribute_escape(kubrick_upper_color()); ?>" /><br />
 
					<label for="advlowercolor"><?php _e('Lower Color (HEX):'); ?> </label><input type="text" id="advlowercolor" onchange="advUpdate(this.value, 'lowercolor')" value="#<?php echo attribute_escape(kubrick_lower_color()); ?>" /><br />
 
					<input type="button" class="button-secondary" name="default" value="<?php echo attribute_escape(__('Select Default Colors')); ?>" onclick="kDefaults()" /><br />
 
					<input type="button" class="button-secondary" onclick="toggleDisplay();return false;" name="pick" id="pick" value="<?php echo attribute_escape(__('Toggle Text Display')); ?>"></input><br />
 
				</form>
 
			</div>
 
		</div>
 
	</div>
 
</div>
 
 
<?php } ?>
[+][-]01/13/09 06:57 PM, ID: 23369697Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zones: Asynchronous Javascript and XML (AJAX), Web-Based CMS, PHP Scripting Language
Tags: php, wordpress
Sign Up Now!
Solution Provided By: EverLearningCodeMonkey
Participating Experts: 4
Solution Grade: A
 
[+][-]01/12/09 03:26 PM, ID: 23358627Assisted Solution

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 30-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]01/12/09 03:34 PM, ID: 23358665Assisted Solution

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 30-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]01/12/09 03:34 PM, ID: 23358669Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01/12/09 04:38 PM, ID: 23359008Assisted Solution

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 30-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]01/12/09 05:53 PM, ID: 23359433Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01/13/09 01:53 AM, ID: 23361126Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01/13/09 02:10 AM, ID: 23361201Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01/13/09 03:16 AM, ID: 23361525Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01/13/09 11:20 AM, ID: 23366170Assisted Solution

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 30-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]01/13/09 01:50 PM, ID: 23367686Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01/13/09 02:10 PM, ID: 23367864Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01/13/09 02:31 PM, ID: 23368036Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01/14/09 01:45 AM, ID: 23371093Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01/14/09 04:50 AM, ID: 23372028Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-92 - Hierarchy / EE_QW_3_20080625