Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/nextcloud.com.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJos Poortvliet <jospoortvliet@gmail.com>2016-06-03 22:52:31 +0300
committerJos Poortvliet <jospoortvliet@gmail.com>2016-06-03 22:52:31 +0300
commit666499e6af49a0ffe6854d3854bb6d0fe9e40510 (patch)
treee3b15194ffa2ac59bcfa09fae02c79558deb79dd /content.php
parent02e22665f2c4718bfda2a169bf9e8e9a5265eb17 (diff)
first version
Diffstat (limited to 'content.php')
-rwxr-xr-xcontent.php46
1 files changed, 46 insertions, 0 deletions
diff --git a/content.php b/content.php
new file mode 100755
index 00000000..4c3e963a
--- /dev/null
+++ b/content.php
@@ -0,0 +1,46 @@
+<?php
+// Get the post user email
+$user = get_post( $post_id, $output )->post_author;
+$useremail = get_userdata($user)->user_email;
+// Check if icon has been uploaded
+$icon = get_feed_meta( 'iconpath' );
+if( !is_null( $icon ) && file_exists( $icon ) ){
+ $imgurl = home_url( '/' ) . $icon;
+} else {
+ // Try gravatar
+ // Specified email?
+ $gravmail = get_feed_meta('email');
+ // Try specified email, else default to blog email, else show default image
+ $imgurl = get_gravatar( $useremail, '60' );//get_gravatar( $gravmail, '60', get_gravatar( $useremail, '60' ) );
+//echo $imgurl;
+}
+// Compute link
+$target = is_syndicated() ? ' target="_blank"': '';
+$link = is_syndicated() ? get_syndication_permalink() : get_permalink();
+$title = is_syndicated() ? get_syndication_source() : get_the_title();
+?>
+<div class="row">
+ <div class="span1">
+ <a href="#"><img class="thumbnail" src="<?php echo $imgurl; ?>" alt="<?php echo $title; ?>"></a>
+ </div>
+ <div class="span11 post-header post-header-indent">
+ <a href="<?php echo $link; ?>"<?php echo $target; ?>><h2><?php the_title(); ?></h2></a>
+ <div class="post-info">
+ <small>Posted on
+ <?php the_date(); ?> by <?php the_author(); ?>
+ <?php if( is_syndicated() ){
+ echo 'from "'.get_syndication_source().'"';
+ }
+ ?>
+ </small>
+ <?php echo get_the_tags_html($post->ID); ?>
+ </div>
+ </div>
+</div>
+<div class="row">
+ <div class="span11 post post-indent">
+ <?php the_content(); ?>
+ </div>
+</div>
+<hr />
+