I am writing the following code for making a plugin
<?php
header("Content-Type: text/css");
/*
Plugin Name: Name of the plugin.
Plugin URI: The page having information related to plugin.
Version: 0.1
Description: Your plugin description.
Author: Your name
Author URI: Author's website.
*/
?>
<?php
function box()
{
?><div class="box">
<p><b>Author:</b> <?php the_author_link(); ?><p>
<?php echo get_avatar( get_the_author_email(), '50' ); ?>
<p><?php the_author_description(); ?></p>
</div>
<?php
}
function style() {
echo "
<style>
<!--
.avatar{
float:left;
background-color: #fff;
border:1px solid #ccc;
padding: 4px;
margin: 0 7px 2px 0;
display: inline;
}
.box{
color: #666;
font-weight: normal;
background: #fff;
border: 1px solid #ccc;
padding: 12px;
margin-bottom:8px;
}
-->
</style>
";
}
function author_box_ContentFilter($content)
{
if (is_single())
return $content.box().style();
else
return $content;
}
add_filter('the_content', 'author_box_ContentFilter');
?>
This code is appending the author info box at the start of post.But i want to add the box a the end of post.I also tried
{
if (is_single())
return box().$content.style();
else
return $content;
}
But this is also not working.
Seeking for help to append the box at the end of post.
Thanks in anticipation
How to set pass login name from htaccess to php
When the user logs into my members page via htaccess, I'd like to retain the username so that I can call upon his account info later. Is there a way to save his user name in a cookie (or some other
Code error with Index.php
Error: Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/runevid/public_html/index.php on line 25<html><head><title>CrazyQuest -
MYSQL gen help
This is my Mysql gen. can anyone tell me why this echosMID(networkset.networkid, 3, 3) AS "MNC" SELECT FROM scan JOIN gps ON scan.gpsid = gps.gpsid JOIN gsmscanset ON scan.scanid =
writing a screen scraper
Hello,I'm writing a screen scraper application and want to be able to get absolute addresses for images from relative links.So a link like this: Code: <img
Storing the referrer in session... problems with tabs
Hello AllI am currently working on an ERP project based on the MVC methodology, when a user navigates the site we store the referrer in session.The problem we have is that using multiple tabs upsets
SAP Management Console is blank
Dear All ,I am facing problem in my des sever suddely in SAP Management Console is blank and there is no tree struce of sidand oracle is up and SAPOSCOL services is running but SAPDES_00 services
Transaction variant for VA02 not working
My requirement is to have transaction for user to only add the output and print a sales order.
Help adding strtolower( to my in_array
strtolower i need to add it to this to work, iuno how.Code: $moderators = array('Admin', 'banana', 'orange');if (in_array("{$_SESSION['user_name']}", $moderators)) print('Found it!');i
Multi language - seo links
Im trying to figure out the best method to have a multi language website that will function with seo friendly links.The code that ive used many times before.....Code: $_SESSION['lang'] = $lang =
Check Date/Time in PHP
What I need the code to check is that $reQuest is 24 hours in the past then return a time based on how long ago that was in the past if 24 hours has not passed.if ($reQuest!=""){ if