Example #1
0
    /**
     * The admin page where the user selects the services that
     * should be notified whenever a blog post is published.
     */
    function notifyMenu()
    {
        $notify = new NotifyAdmin();
        $wp_notify = wp_get_option('notify');
        if ($_GET['page'] == basename(__FILE__)) {
            if ('add' == $_REQUEST['action']) {
                $notify->add($_REQUEST);
            } elseif ('delete' == $_REQUEST['action']) {
                $notify->burninate($_REQUEST['id']);
            }
        }
        ?>
		<?php 
        if (isset($_REQUEST['add'])) {
            ?>
		<div id="message" class="updated fade"><p><strong><?php 
            echo __('Service added.');
            ?>
</strong></p></div>
		<?php 
        }
        ?>
			<div class="wrap">
			
				<div id="admin-options">
					<h2><?php 
        _e('Notification Settings');
        ?>
</h2>
                    <?php 
        if ($wp_notify != 1) {
            ?>
                    <p><strong>WicketPixie Notifications are currently disabled, please go to the WicketPixie Options page to enable them.</strong><br /></p>
                    <?php 
        }
        ?>
                    <p>What are WicketPixie Notifications? They send out messages to different services like Twitter and Ping.fm to let your followers know of any new blog posts. Need more help? <a href="#explain" title="Click for more info" id="explaintext">It's only a click away</a>.</p>
					<div id="explain">
                        <h3>For those that need help, here's some guidelines:</h3>
                            <ol>
                                <li>Use of the Ping.fm service only requires you to enter your App key, which you can obtain <a href="http://ping.fm/key">here</a>.</li>
                                <li>Use of the Twitter service only requires you to enter your Twitter username and password, no API/App key required.</li>
                                <li>WicketPixie is completely open-source, so if you don't believe this doesn't steal your information, check the source code ;)</li>
                            </ol>
					</div>
                    <p>If you choose to use Ping.fm, unless the other services are not setup in your Ping.fm account please do not add your details for them, as the notification will be sent out twice.</p>
                    <p><strong>Please note:</strong> <em>When entering service details, you may only need to enter a username and password, you may only need to enter an API/App key, or you may enter both. It all depends on which service you select.</em></p>
					<?php 
        if ($notify->check() != 'false' && $notify->count() != '') {
            ?>
					<table class="form-table" style="margin-bottom:30px;">
						<tr>
							<th>Service</th>
							<th style="text-align:center;">Username</th>
							<th style="text-align:center;" colspan="1">Actions</th>
						</tr>
					<?php 
            foreach ($notify->collect() as $service) {
                ?>
		
						<tr>
							<td><?php 
                echo $service->service;
                ?>
</td>
						   	<td style="text-align:center;"><?php 
                echo $service->username;
                ?>
</td>
							<td style="text-align:center;">
							<form method="post" action="<?php 
                echo $_SERVER['PHP_SELF'];
                ?>
?page=notify.php&amp;delete=true&amp;id=<?php 
                echo $service->id;
                ?>
">
								<input type="submit" name="action" value="Delete" />
								<input type="hidden" name="action" value="delete" />
							</form>
							</td>
						</tr>
					<?php 
            }
            ?>
					</table>
					<?php 
        } else {
            ?>
						<p>You haven't added any services, add them here.</p>
					<?php 
        }
        ?>
						<form method="post" action="<?php 
        echo $_SERVER['PHP_SELF'];
        ?>
?page=notify.php&amp;add=true" class="form-table">
							<h2>Add a Service</h2>
							<p><select name="service" id="title">
                            <option value="ping.fm">Ping.fm</option>
                            <option value="twitter">Twitter</option>
                            </select></p>
                            <p><input type="text" name="username" id="url" onfocus="if(this.value=='Username')value=''" onblur="if(this.value=='')value='Username';" value="Username" /></p>
                            <p><input type="text" name="password" id="url" onfocus="if(this.value=='Password')value=''" onblur="if(this.value=='')value='Password';" value="Password" /></p>
                            <p><input type="text" name="apikey" id="url" onfocus="if(this.value=='API/App Key')value=''" onblur="if(this.value=='')value='API/App Key';" value="API/App Key" /></p>
                            <p class="submit">
                                <input name="save" type="submit" value="Add Service" /> 
                                <input type="hidden" name="action" value="add" />
							</p>
						</form>
				</div>
                <?php 
        include_once 'advert.php';
    }
Example #2
0
function wicketpixie_wp_head()
{
    ?>
	<?php 
    global $options;
    foreach ($options as $value) {
        if (wp_get_option($value['id']) === FALSE) {
            ${$value}['id'] = $value['std'];
        } else {
            ${$value}['id'] = wp_get_option($value['id']);
        }
    }
    $image_check = wp_get_option('body_bg_image');
    if (isset($image_check) && $image_check != '') {
        $image_check = wp_get_option('body_bg_image');
    } else {
        $image_check = 'false';
    }
    ?>
	
	<style type="text/css">
		body { font-family: <?php 
    echo $body_font;
    ?>
; background: <?php 
    echo $body_bg_color;
    ?>
 <?php 
    if (wp_get_option('body_bg_image') != 'false') {
        ?>
url("<?php 
        bloginfo('template_directory');
        ?>
/images/backgrounds/<?php 
        echo $body_bg_image;
        ?>
") <?php 
        echo $body_bg_position;
        ?>
 <?php 
        echo $body_bg_repeat;
        ?>
 50% 0<?php 
    }
    ?>
; }
		#logo { font-family: <?php 
    echo $headings_font;
    ?>
; color: <?php 
    echo $color_logo;
    ?>
; }
		#logo a:link, #logo a:visited, #logo a:active { color: <?php 
    echo $color_logo;
    ?>
; }
		#logo a:hover { color: #fff; }
		#description, #status p, #status a:link, #status a:active, #status a:visited { color: <?php 
    echo $color_description;
    ?>
; }
		.content a:link, .content a:visited, .content a:active { color: <?php 
    echo $color_links_content;
    ?>
; }
		.content a:hover { color: #000; border-bottom: 1px solid <?php 
    echo $color_links_content;
    ?>
; }
		.content h1, .content h2, .content h3, .content h4, .content h5, .content h6 { color: <?php 
    echo $color_titles;
    ?>
; font-family: <?php 
    echo $headings_font;
    ?>
; font-weight: bold; }
		.content h1 a:link, .content h1 a:visited, .content h1 a:active, .content h2 a:link, .content h2 a:visited, .content h2 a:active, .content h3 a:link, .content h3 a:visited, .content h3 a:active, .content h4 a:link, .content h4 a:visited, .content h4 a:active, .content h5 a:link, .content h5 a:visited, .content h5 a:active, .content h6 a:link, .content h6 a:visited, .content h6 a:active { color: <?php 
    echo $color_titles;
    ?>
; }
		.content h1 a:hover, .content h2 a:hover, .content h3 a:hover, .content h4 a:hover, .content h5 a:hover, .content h6 a:hover { color: #000; }
		#content .comment h3 a:link, #content .comment h3 a:active, #content .comment h3 a:visited { color: <?php 
    echo $color_links_content;
    ?>
; }
		#content .comment h3 a:hover { color: #000; border-bottom: 1px solid <?php 
    echo $color_links;
    ?>
; }
		#content .comment h5 { font-family: <?php 
    echo $body_font;
    ?>
; }
		#comment-form input, #comment-form textarea { font-family: <?php 
    echo $body_font;
    ?>
; }
		#sidebar a:link, #sidebar a:visited, #sidebar a:active { color: <?php 
    echo $color_links_sidebar;
    ?>
; }
		#sidebar a:hover { color: #000; }
		#sidebar h1, #sidebar h2, #sidebar h3, #sidebar h3 a:link, #sidebar h3 a:visited, #sidebar h3 a:active, #sidebar h4, #sidebar h5, #sidebar h6 { color: <?php 
    echo $color_headings;
    ?>
; font-family: <?php 
    echo $headings_font;
    ?>
; font-weight: bold; }
		#sidebar h5 { font-family: <?php 
    echo $body_font;
    ?>
; }
	</style>
<?php 
}
    /**
     * The admin menu for our AdSense system
     */
    function adsenseMenu()
    {
        $adsense = new AdsenseAdmin();
        if ($_GET['page'] == basename(__FILE__)) {
            if ('add' == $_REQUEST['action']) {
                $adsense->add($_REQUEST);
            } elseif ('toggle' == $_REQUEST['action']) {
                $adsense->toggle();
            } elseif ('pubid' == $_REQUEST['action']) {
                $adsense->pub_id($_REQUEST);
            } elseif ('delete' == $_REQUEST['action']) {
                $adsense->burninate($_REQUEST['id']);
            }
        }
        ?>
		<?php 
        if (isset($_REQUEST['add'])) {
            ?>
		<div id="message" class="updated fade"><p><strong><?php 
            echo __('Service added.');
            ?>
</strong></p></div>
		<?php 
        }
        ?>
			<div class="wrap">
			
				<div id="admin-options">
					<h2><?php 
        _e('AdSense Settings');
        ?>
</h2>
                    <p>Here you can add in your AdSense information and ad slot info so it can be displayed
                    on your blog. Need more help? <a href="#explain" title="Click for more info" id="explaintext">It's only a click away</a>.</p>
					<div id="explain">
                        <h3>For those that need help, here's a rundown:</h3>
                            <ol>
                                <li>Create an ad slot after logging into Google AdSense.</li>
                                <li>On this page, enter your pub-id and add enter ad details.</li>
                                <li>Enjoy. :-)</li>
                            </ol>
					</div>
					<form method="post" action="<?php 
        echo $_SERVER['PHP_SELF'];
        ?>
?page=adsenseads.php&toggle=true" class="form-table">
					<h2>Toggle AdSense Ads</h2>
					<p>One click button to disable the showing of AdSense ads.</p>
					<?php 
        if (wp_get_option('enable_adsense')) {
            if (wp_get_option('enable_adsense') == "true") {
                $val = "off";
            } else {
                $val = "on";
            }
        } else {
            $val = "on";
        }
        ?>
					<p class="submit">
					<input type="submit" name="toggle" value="Turn <?php 
        echo $val;
        ?>
 AdSense Ads" />
					<input type="hidden" name="action" value="toggle" />
					</p>
					</form>
					<p>To find an ad's ID number, first log in to Google AdSense. Next, click 'AdSense Setup' and then 'Manage Ads'.
					In the 'Name (#ID)' column find the ad you've created. The ad's ID will be underneath the ad's name in gray font.</p>
					<?php 
        if ($adsense->check() != 'false' && $adsense->count() != '') {
            ?>
					<table class="form-table" style="margin-bottom:30px;">
						<tr>
							<th>Ad ID</th>
							<th style="text-align:center;">Placement</th>
							<th style="text-align:center;" colspan="1">Actions</th>
						</tr>
					<?php 
            foreach ($adsense->collect() as $adslot) {
                ?>
		
						<tr>
							<td><?php 
                echo $adslot->ad_id;
                ?>
</td>
						   	<td style="text-align:center;">
        					   	<?php 
                if ($adslot->placement == 'blog_header') {
                    echo "Blog Header (728x90)";
                } elseif ($adslot->placement == 'blog_post_side') {
                    echo "Right of Blog Post (120x240)";
                } elseif ($adslot->placement == 'blog_post_bottom') {
                    echo "Underneath Home Post (300x250)";
                } elseif ($adslot->placement == 'blog_sidebar') {
                    echo "Bottom-left of Sidebar (120x600)";
                } else {
                    echo $adslot - placement;
                }
                ?>
						   	</td>
							<td style="text-align:center;">
							<form method="post" action="<?php 
                echo $_SERVER['PHP_SELF'];
                ?>
?page=adsenseads.php&amp;delete=true&amp;id=<?php 
                echo $adslot->id;
                ?>
">
								<input type="submit" name="action" value="Delete" />
								<input type="hidden" name="action" value="delete" />
							</form>
							</td>
						</tr>
					<?php 
            }
            ?>
					</table>
					<?php 
        } else {
            ?>
						<p>You haven't added any ad slots, add them here.</p>
					<?php 
        }
        ?>
					    <form method="post" action="<?php 
        echo $_SERVER['PHP_SELF'];
        ?>
?page=adsenseads.php&amp;pubid=true" class="form-table">
					        <h2>Google AdSense Publisher ID</h2>
					        <p>Please enter your AdSense Publisher ID here.</p>
					        <p style="font-style:italic;">The Publisher ID currently in use is:<br />
					        <?php 
        if (wp_get_option('adsense_pubid') != false && wp_option_isempty('adsense_pubid') == false) {
            echo wp_get_option('adsense_pubid');
        } else {
            echo "N/A";
        }
        ?>
					        </p>
					        <?php 
        if (wp_get_option('adsense_pubid')) {
            $pub_id = wp_get_option('adsense_pubid');
        } else {
            $pub_id = "Pub-ID";
        }
        ?>
					        <p><input type="text" name="pubid" id="pubid" onfocus="if(this.value=='<?php 
        echo $pub_id;
        ?>
')value=''" value="<?php 
        echo $pub_id;
        ?>
" /></p>
					        <p class="submit">
					            <input name="save" type="submit" value="Save Pub-ID" />
					            <input type="hidden" name="action" value="pubid" />
					        </p>
					    </form>
					    
						<form method="post" action="<?php 
        echo $_SERVER['PHP_SELF'];
        ?>
?page=adsenseads.php&amp;add=true" class="form-table">
							<h2>Add an Ad Slot</h2>
							<p>Please leave off the pound sign (#) when entering the Ad ID. Also remember, only one ad per placement. ;-)</p>
							<p><input type="text" name="ad_id" id="ad_id" onfocus="if(this.value=='Ad ID')value=''" value="Ad ID" /></p>
							<p><select name="placement" id="title">
                            <option value="blog_header">Blog header (728x90)</option>
                            <option value="blog_post_side">Right of Blog Post (120x240)</option>
                            <option value="blog_post_bottom">Underneath Home Post (300x250)</option>
                            <option value="blog_sidebar">Bottom-left of Sidebar (120x600)</option>
                            </select></p>
                            <p class="submit">
                                <input name="save" type="submit" value="Add Ad Slot" /> 
                                <input type="hidden" name="action" value="add" />
							</p>
						</form>
				</div>
                <?php 
        include_once 'advert.php';
    }
Example #4
0
        ?>
					</div>
					<?php 
        wp_after_posts_code();
        ?>
				</div>
				<!-- /post -->
				
                <!-- google_ad_section_end -->
				<?php 
    }
    ?>

				<!-- Page Navigation -->
                <?php 
    if (wp_get_option('plug_pagenavi')) {
        ?>
                <div id="paginator" style='text-align: center'><?php 
        if (function_exists('wp_pagenavi')) {
            wp_pagenavi();
        }
        ?>
</div>
                <?php 
    } else {
        ?>
				<div class="navigation">
					<div class="left"><?php 
        next_posts_link('<span>&nbsp;</span>Older Posts');
        ?>
 </div>
function wicketpixie_admin_index()
{
    global $settings;
    ?>
			<div class="wrap">
				
                <div id="admin-options">
				
                    <h2>WicketPixie Setup</h2>
                    <p>We will need a few things from you to enable some of WicketPixie's features.</p>
				    
                    <h3>IDs and URLs</h3>
                    <p id="flickrid_tip">You can obtain your Flickr ID by using <a href="http://idgettr.com">idGettr</a>.</p>
                    <p id="ustreamchannel_tip">Your Ustream Channel is the name of the Ustream channel you'd like to stream from. For example, the channel 'Chris Pirillo Live' (url of which is http://ustream.tv/channel/chris-pirillo-live) would be entered as 'chris-pirillo-live'. (Like you'd see it in the Ustream URL.)</p>
		            <form method="post" style="padding:20px 0 40px;" action="<?php 
    echo $_SERVER['PHP_SELF'];
    ?>
?page=wicketpixie-admin.php">
		            <?php 
    wp_nonce_field('wicketpixie-settings');
    ?>
		            <table class="form-table">
			            <?php 
    foreach ($settings as $value) {
        ?>
			            <tr valign="top"> 
				<th scope="row" style="font-size:12px;text-align:left;padding-right:10px;">
					<acronym title="<?php 
        echo $value['description'];
        ?>
"><?php 
        echo $value['name'];
        ?>
</acronym>
				</th>
				<td style="padding-right:10px;">
					<?php 
        if (wp_get_option($value['id']) != false) {
            $optdata = wp_get_option($value['id']);
        } else {
            $optdata = $value['std'];
        }
        ?>
					<input name="<?php 
        echo $value['id'];
        ?>
" id="<?php 
        echo $value['id'];
        ?>
" type="<?php 
        echo $value['type'];
        ?>
" value="<?php 
        echo $optdata;
        ?>
" <?php 
        if ($optdata === '1') {
            echo "checked='checked'";
        }
        ?>
 />
				</td>
			</tr>
			<?php 
    }
    ?>
		</table>
			<p class="submit">
			<input name="save_settings" type="submit" value="Save changes" />    
			<input type="hidden" name="action" value="save_settings" />
			</p>
		</form>
		
		<h3>Global Announcement</h3>
		    <?php 
    require_once TEMPLATEPATH . '/app/customcode.php';
    if (function_exists(fetchcustomcode)) {
        $glob = fetchcustomcode('global_announcement.php', true);
        if ($glob == fetchcustomcode('idontexist.no')) {
            $glob = "";
        }
    } else {
        $glob = "";
    }
    ?>
                <p>The text you enter here will appear on the home page and all your posts as a global announcement. HTML is allowed.</p>
                <form method="post" action="<?php 
    echo $_SERVER['PHP_SELF'];
    ?>
?page=wicketpixie-admin.php&amp;ccode=true" class="form-table">
                    <p><textarea name="code" id="code" style="border: 1px solid #999999;" cols="80" rows="15" /><?php 
    echo $glob;
    ?>
</textarea></p>
                    <p class="submit">
                        <input name="save" type="submit" value="Save Global Announcement" /> 
                        <input type="hidden" name="action" value="ccode" />
                        <input type="hidden" name="file" value="global_announcement" />
                    </p>
                </form>
                </div>
                <?php 
    include_once 'app/advert.php';
}
Example #6
0
	<!-- share -->
	<div id="share">
		
	</div>
	<!-- /share -->
    
	<!-- header -->
	<div id="header">
		
		<!-- header-inner -->
		<div id="header-inner">
			
			<div id="logo">
                <?php 
if (wp_get_option('headersize')) {
    $fontsize = wp_get_option('headersize');
    echo "<font style='font-size: " . $fontsize . "px;'>";
    ?>
                        <a href="<?php 
    echo get_option('home');
    ?>
/" rel="nofollow"><?php 
    bloginfo('name');
    ?>
</a>
                    <?php 
    echo "</font>";
} else {
    ?>
                <a href="<?php 
    echo get_option('home');
function wp_plugins_admin_index()
{
    global $plugins;
    ?>
            <?php 
    if (isset($_REQUEST['saved'])) {
        echo '<div id="message" class="updated fade"><p><strong>' . __('Plugin preferences saved.') . '</strong></p></div>';
    }
    ?>
			<div class="wrap">
				
                <div id="admin-options">
				    <h2><?php 
    echo $themename;
    ?>
 Plugins</h2>
		<form method="post" style="padding:20px 0 40px;" action="<?php 
    echo $_SERVER['PHP_SELF'];
    ?>
?page=wp_plugins.php&amp;saved=true">
        <?php 
    wp_nonce_field('wicketpixie-settings');
    ?>
		<table class="form-table">
			<?php 
    foreach ($plugins as $value) {
        ?>
			<tr valign="top"> 
				<th scope="row" style="font-size:12px;text-align:left;padding-right:10px;">
					<acronym title="<?php 
        echo $value['description'];
        ?>
"><?php 
        echo $value['name'];
        ?>
</acronym>
				</th>
				<td style="padding-right:10px;">
					<?php 
        if (wp_get_option($value['id']) != false) {
            $checked = wp_get_option($value['id']);
        } else {
            $checked = $value['std'];
        }
        ?>
					<input name="<?php 
        echo $value['id'];
        ?>
" id="<?php 
        echo $value['id'];
        ?>
" type="<?php 
        echo $value['type'];
        ?>
" value="<?php 
        echo $value['id'];
        ?>
" <?php 
        if ($checked === '1') {
            echo "checked='checked'";
        }
        ?>
 />
				</td>
			</tr>
			<?php 
    }
    ?>
		</table>
			<p class="submit">
			<input name="save_plugins" type="submit" value="Save changes" />    
			<input type="hidden" name="action" value="save_plugins" />
			</p>
		</form>
                </div>
                <?php 
    include_once 'app/advert.php';
}
    /**
     * The admin page for our home editor.
     **/
    function homeMenu()
    {
        global $homeoptions;
        require_once TEMPLATEPATH . '/app/customcode.php';
        if (isset($_POST['ccode'])) {
            writeto($_POST['code'], 'homesidebar.php');
        } elseif (isset($_POST['clearcc'])) {
            unlink(CUSTOMPATH . '/homesidebar.php');
        }
        if (isset($_REQUEST['saved'])) {
            echo '<div id="message" class="updated fade"><p><strong>' . __('Options saved.') . '</strong></p></div>';
        }
        ?>
    <div class="wrap">
	
	    <div id="admin-options">
	
		    <h2>Home Editor</h2>
            
		    <form method="post" style="padding:20px 0 10px;" enctype="multipart/form-data" action="<?php 
        echo $_SERVER['PHP_SELF'];
        ?>
?page=homeeditor.php&amp;saved=true">
			    <table class="form-table">

			    <?php 
        foreach ($homeoptions as $value) {
            if ($value['type'] == "textarea") {
                if ($value['id'] == "home_video" || $value['id'] == "home_custom") {
                    if (wp_get_option($value['id']) != false && wp_get_option($value['id']) != '') {
                        $content = stripslashes(wp_get_option($value['id']));
                    } else {
                        $content = $value['std'];
                    }
                } else {
                    if (wp_get_option($value['id']) != false && wp_get_option($value['id']) != '') {
                        $content = wp_get_option($value['id']);
                    } else {
                        $value['std'];
                    }
                }
                ?>
			    <tr valign="top"> 
			        <th scope="row" style="font-size:12px; text-align:left; padding-right:10px;"><acronym title="<?php 
                echo $value['description'];
                ?>
"><?php 
                echo $value['name'];
                ?>
</acronym></th>
			        <td style="padding-bottom:10px;">
			            <textarea name="<?php 
                echo $value['id'];
                ?>
" id="<?php 
                echo $value['id'];
                ?>
" value="<?php 
                stripslashes($content);
                ?>
"><?php 
                echo stripslashes($content);
                ?>
</textarea>
			        </td>
			    </tr>

			    <?php 
            } elseif ($value['type'] == "select") {
                ?>

			        <tr valign="top"> 
			            <th scope="row" style="font-size:12px; text-align:left; padding-right:10px;"><acronym title="<?php 
                echo $value['description'];
                ?>
"><?php 
                echo $value['name'];
                ?>
</acronym></th>
			            <td style="padding-bottom:10px;">
			                <select name="<?php 
                echo $value['id'];
                ?>
" id="<?php 
                echo $value['id'];
                ?>
">
			                    <?php 
                foreach ($value['options'] as $option) {
                    ?>
			                    <option<?php 
                    if ($option == wp_get_option($value['id'])) {
                        echo ' selected="selected"';
                    } elseif ($option == $value['std'] && !wp_get_option($value['id'])) {
                        echo ' selected="selected"';
                    }
                    ?>
							    ><?php 
                    echo $option;
                    ?>
</option>
			                    <?php 
                }
                ?>
			                </select>
			            </td>
			        </tr>

			    <?php 
            } elseif ($value['type'] == 'checkbox') {
                ?>
				    <tr valign="top">
				        <th scope="row" style="font-size:12px; text-align:left; padding-right:10px;"><acronym title="<?php 
                echo $value['description'];
                ?>
"><?php 
                echo $value['name'];
                ?>
</acronym></th>
			            <td style="padding-right:10px;">
					        <?php 
                if (wp_get_option($value['id']) != false) {
                    $checked = wp_get_option($value['id']);
                } else {
                    $checked = $value['std'];
                }
                ?>
					        <input name="<?php 
                echo $value['id'];
                ?>
" id="<?php 
                echo $value['id'];
                ?>
" type="<?php 
                echo $value['type'];
                ?>
" value="<?php 
                echo $value['id'];
                ?>
" <?php 
                if ($checked === '1') {
                    echo "checked='checked'";
                }
                ?>
 />
					</tr>
			    <?php 
            } elseif ($value['type'] == 'textbox') {
                ?>
				    <tr valign="top"> 
			        <th scope="row" style="font-size:12px; text-align:left; padding-right:10px;"><acronym title="<?php 
                echo $value['description'];
                ?>
"><?php 
                echo $value['name'];
                ?>
</acronym></th>
			        <td style="padding-bottom:10px;">
			            <input type="<?php 
                echo $value['type'];
                ?>
" name="<?php 
                echo $value['id'];
                ?>
" id="<?php 
                echo $value['id'];
                ?>
" value="<?php 
                if (wp_get_option($value['id']) != false && wp_get_option($value['id']) != '') {
                    echo wp_get_option($value['id']);
                } else {
                    echo $value['std'];
                }
                ?>
"><?php 
                wp_get_option($value['id']) != false && wp_get_option($value['id']) != '' ? wp_get_option($value['id']) : $value['std'];
                ?>
</input>
			        </td>
			    </tr>
			    <?php 
            }
        }
        ?>

			    </table>

			    <p class="submit">
				    <input name="save" type="submit" value="Save changes" class="button" />    
				    <input type="hidden" name="action" value="save" />
			    </p>

		    </form>
		    <?php 
        require_once TEMPLATEPATH . '/app/customcode.php';
        ?>
		    <h3>Custom Sidebar Code</h3>
                <p>Enter HTML markup, PHP code, or JavaScript that you would like to appear between the after the Recent Posts section of the homepage sidebar.</p>
                <form method="post" action="<?php 
        echo $_SERVER['PHP_SELF'];
        ?>
?page=homeeditor.php&amp;ccode=true" class="form-table">
                    <h4>Edit Custom Sidebar code</h4>
                    <p><textarea name="code" id="code" style="border: 1px solid #999999;" cols="80" rows="25" /><?php 
        echo fetchcustomcode("homesidebar.php", true);
        ?>
</textarea></p>
                    <p class="submit">
                        <input name="save" type="submit" value="Save Custom Sidebar code" /> 
                        <input type="hidden" name="ccode" value="true" />
                        <input type="hidden" name="file" value="homesidebar" />
                    </p>
                </form>
                <form method="post" action="<?php 
        echo $_SERVER['PHP_SELF'];
        ?>
?page=homeeditor.php&amp;clearcc=true" class="form-table">
                    <h4>Clear Custom Sidebar code</h4>
                    <p>WARNING: This will delete all custom code you have entered to appear after the Recent Posts section of the homepage sidebar, if you want to continue, click 'Clear Custom Sidebar code'</p>
                    <p class="submit">
                        <input name="clear" type="submit" value="Clear Custom Sidebar code" />
                        <input type="hidden" name="clearcc" value="true" />
                        <input type="hidden" name="file" value="homesidebar" />
                    </p>
                </form>
	    </div>
	    <?php 
        include_once 'advert.php';
        ?>
    <?php 
    }
if (wp_get_option('sidebar_ustreamchannel') != false && wp_get_option('sidebar_ustreamchannel') != "") {
    $chan = wp_get_option('sidebar_ustreamchannel');
} else {
    $trip = true;
}
if (wp_get_option('sidebar_ustream_height') != false && wp_get_option('sidebar_ustream_height') != "") {
    $height = wp_get_option('sidebar_ustream_height');
} else {
    $trip = true;
}
if (wp_get_option('sidebar_ustream_width') != false && wp_get_option('sidebar_ustream_width') != "") {
    $width = wp_get_option('sidebar_ustream_width');
} else {
    $trip = true;
}
if (wp_get_option('sidebar_ustream_autoplay') == "1") {
    $autoplay = 'true';
} else {
    $autoplay = 'false';
}
if ($trip == true) {
    $out = "<!-- Please go back to the Widget Page and set the settings for this widget. -->";
} else {
    $url = "http://api.ustream.tv/php/channel/{$chan}/getInfo?key={$key}";
    $cl = curl_init($url);
    curl_setopt($cl, CURLOPT_HEADER, false);
    curl_setopt($cl, CURLOPT_RETURNTRANSFER, true);
    $resp = curl_exec($cl);
    curl_close($cl);
    $resultsArray = unserialize($resp);
    $out = $resultsArray['results'];
Example #10
0
 if (wp_get_option('ustreamchannel') != false && wp_get_option('ustreamchannel') != "") {
     $chan = wp_get_option('ustreamchannel');
 } else {
     $trip = true;
 }
 if (wp_get_option('home_ustream_height') != false && wp_get_option('home_ustream_height') != "") {
     $height = wp_get_option('home_ustream_height');
 } else {
     $trip = true;
 }
 if (wp_get_option('home_ustream_width') != false && wp_get_option('home_ustream_width') != "") {
     $width = wp_get_option('home_ustream_width');
 } else {
     $trip = true;
 }
 if (wp_get_option('home_ustream_autoplay') == "1") {
     $autoplay = true;
 } else {
     $autoplay = false;
 }
 if ($trip == true) {
     $out = "<!-- Please go back to the Home Editor and set the settings for this widget. -->";
 } else {
     $url = "http://api.ustream.tv/php/channel/{$chan}/getInfo?key={$key}";
     $cl = curl_init($url);
     curl_setopt($cl, CURLOPT_HEADER, false);
     curl_setopt($cl, CURLOPT_RETURNTRANSFER, true);
     $resp = curl_exec($cl);
     curl_close($cl);
     $resultsArray = unserialize($resp);
     $out = $resultsArray['results'];
<!-- social-buttons -->
<?php 
$blogfeed = wp_get_option("blog_feed_url");
$podcastfeed = wp_get_option("podcastfeed");
$twitter = wp_get_option("twitterid");
$youtube = wp_get_option("youtubeid");
$wcount = 0;
if ($blogfeed != false && $blogfeed != "") {
    $witem[$wcount] = "<a href='{$blogfeed}' target='_blank'><img src='" . get_template_directory_uri() . "/images/button-feed.png' style='float:left;padding:10px 10px 20px 14px' height='60' width='60' border='0' alt='Subscribe'/></a>\n";
    $wcount++;
}
if ($podcastfeed != false && $podcastfeed != "") {
    $witem[$wcount] = "<a href='{$podcastfeed}' target='_blank'><img src='" . get_template_directory_uri() . "/images/button-podcast-feed.png' style='float:left;padding:10px 10px 20px 14px' height='60' width='60' border='0' alt='Podcast'/></a>\n";
    $wcount++;
}
if ($twitter != false && $twitter != "") {
    $witem[$wcount] = "<a href='http://twitter.com/{$twitter}' target='_blank'><img src='" . get_template_directory_uri() . "/images/button-twitter.png' style='float:left;padding:10px 10px 20px 14px' height='60' width='60' border='0' alt='Twitter'/></a>\n";
    $wcount++;
}
if ($youtube != false && $youtube != "") {
    $witem[$wcount] = "<a href='http://youtube.com/{$youtube}' target='_blank'><img src='" . get_template_directory_uri() . "/images/button-youtube.png' style='float:left;padding:10px 10px 20px 14px' height='60' width='60' border='0' alt='YouTube'/></a>\n";
    $wcount++;
}
$wwidget = $wcount * 0.25 * 340;
echo "<div style='margin:0 auto 0 auto;width:" . $wwidget . "px'>";
foreach ($witem as $item) {
    echo $item;
}
?>
</div>
<div style="clear:both"></div>
Example #12
0
<?php

get_header();
?>
			
			<!-- content -->
			<div id="content">
					
				<!-- page -->
				<div class="page">
					<?php 
if (wp_get_option('plug_aagoog404') && function_exists("aa_google_404")) {
    ?>
					<?php 
    aa_google_404();
    ?>
                    <?php 
} else {
    ?>
					<h1>We Can't Find the Droid You're Looking For</h1>
					<p>The page may have been removed or renamed. Be sure to check your spelling.  If all else fails, you can <a href="javascript:history.back()">go back to the page you came from</a>, return to the <a href="<?php 
    echo get_option('home');
    ?>
/">homepage</a>, or try searching.</p>
					<?php 
}
?>
				</div>
				<!-- /page -->

			</div>
Example #13
0
                    <div class="KonaBody">
					<?php 
        the_content();
        ?>
					</div>					
					
				</div>
				<!-- /post -->
				
				<!-- google_ad_section_end -->
				
				<!-- post-meta -->
				<div class="post-meta">
					
					<?php 
        if (wp_get_option('plug_related-posts') && function_exists(wp_related_posts)) {
            ?>
					<!-- related-posts -->
					<div id="related-posts">
						<h3>You might also be interested in...</h3>
						<ul>
							<?php 
            wp_related_posts();
            ?>
						</ul>						
					</div>
					<!-- /related-posts -->
					<?php 
        }
        ?>