WordPress.org

Forums

[Plugin: Aleph] Changing the look of users.php and profiles.php (2 posts)

  1. kezmanomania
    Member
    Posted 6 years ago #

    Hi,

    First off all I want to give you a big compliment because your plugin helped me very much. There is only one simple thing. I'm not that advanced with php. Copy and paste of code is one thing but writing some code is much more difficult. Thats why I need your help.

    I'm trying to edit the look of my users.php page.

    The current look is like this.

    I would like to have it something like this.

    The same thing goes for profiles.php page.

    My current profile page looks like this.

    And I would like to have it something like this.

    I used the code of the example templates in the latest zip file and I pasted it to my default page.php file and saved it as users.php and as profile.php. I replaced only the code representing content because I wanted to keep the sidebars.

    My current users.php code looks like this:

    <?php get_header(); ?>
    <div class="contentLayout">
    <div class="sidebar1">
    <?php include (TEMPLATEPATH . '/sidebar1.php'); ?>
    </div>
    <div class="content">
    
    	<?php
    	aleph_users_list(
    		array(
    			'before_title' => '<h2 class="center">',
    			'after_title' => '</h2>',
    			'before_found_users' => '<p class="center">',
    			'after_found_users' => '</p>',
    			'before_navigation' => '<div class="navigation">',
    			'after_navigation' => '</div>'
    		)
    	);
    	?>
    </div>
    <div class="sidebar2">
    <?php include (TEMPLATEPATH . '/sidebar2.php'); ?>
    </div>
    
    </div>
    <div class="cleared"></div>
    
    <?php get_footer(); ?>

    And my current profile.php looks like this:

    <?php get_header(); ?>
    <div class="contentLayout">
    <div class="sidebar1">
    <?php include (TEMPLATEPATH . '/sidebar1.php'); ?>
    </div>
    <div class="content">
    
    <?php
    		aleph_user_profile(
    			array(
    				'before_title' => '<h2 class="center">',
    				'after_title' => '</h2>',
    				'before_section' => '<h3>',
    				'after_section' => '</h3>',
    				'before_avatar' => '<div style="float: right;">',
    				'after_avatar' => '</div>'
    			)
    		);
    		?>
    
    </div>
    <div class="sidebar2">
    <?php include (TEMPLATEPATH . '/sidebar2.php'); ?>
    </div>
    
    </div>
    <div class="cleared"></div>
    
    <?php get_footer(); ?>

    My single.php looks like this:

    <?php get_header(); ?>
    <div class="contentLayout">
    <div class="sidebar1">
    <?php include (TEMPLATEPATH . '/sidebar1.php'); ?>
    </div>
    <div class="content">
    
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <div class="Post">
        <div class="Post-body">
    <div class="Post-inner article">
    <h2 class="PostHeaderIcon-wrapper">
    <span class="PostHeader"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(__('Permanent Link to %s', 'kubrick'), the_title_attribute('echo=0')); ?>">
    <?php the_title(); ?>
    </a></span>
    </h2>
    <?php ob_start(); ?>
    <?php $icons = array(); ?>
    <?php if (!is_page()) : ?>
    <?php ob_start(); ?>
    <?php the_time(__('F jS, Y', 'kubrick')) ?>
    <?php $icons[] = ob_get_clean(); ?>
    <?php endif; ?>
    <?php if (!is_page()) : ?>
    <?php ob_start(); ?>
    <?php _e('Author', 'kubrick'); ?>: <a href="#" title="<?php _e('Author', 'kubrick'); ?>"><?php the_author() ?></a>
    <?php $icons[] = ob_get_clean(); ?>
    <?php endif; ?>
    <?php if (0 != count($icons)): ?>
    <div class="PostHeaderIcons metadata-icons">
    <?php echo implode(' | ', $icons); ?>
    
    </div>
    <?php endif; ?>
    <?php $metadataContent = ob_get_clean(); ?>
    <?php if (trim($metadataContent) != ''): ?>
    <div class="PostMetadataHeader">
    <?php echo $metadataContent; ?>
    
    </div>
    <?php endif; ?>
    <div class="PostContent">
    <?php if (is_search()) the_excerpt(); else the_content(__('Read the rest of this entry &raquo;', 'kubrick')); ?>
    
    </div>
    <div class="cleared"></div>
    <?php ob_start(); ?>
    <?php $icons = array(); ?>
    <?php if (!is_page()) : ?>
    <?php ob_start(); ?>
    <?php printf(__('Posted in %s', 'kubrick'), get_the_category_list(', ')); ?>
    <?php $icons[] = ob_get_clean(); ?>
    <?php endif; ?>
    <?php if (!is_page() &amp;&amp; get_the_tags()) : ?><?php ob_start(); ?>
    <?php the_tags(__('Tags:', 'kubrick') . ' ', ', ', ' '); ?>
    <?php $icons[] = ob_get_clean(); ?><?php endif; ?>
    <?php if (!is_page() &amp;&amp; !is_single()) : ?><?php ob_start(); ?>
    <?php comments_popup_link(__('No Comments »', 'kubrick'), __('1 Comment »', 'kubrick'), __('% Comments »', 'kubrick'), '', __('Comments Closed', 'kubrick') ); ?>
    <?php $icons[] = ob_get_clean(); ?><?php endif; ?>
    <?php if (0 != count($icons)): ?>
    <div class="PostFooterIcons metadata-icons">
    <?php echo implode(' | ', $icons); ?>
    
    </div>
    <?php endif; ?>
    <?php $metadataContent = ob_get_clean(); ?>
    <?php if (trim($metadataContent) != ''): ?>
    <div class="PostMetadataFooter">
    <?php echo $metadataContent; ?>
    
    </div>
    <?php endif; ?>
    
    </div>
    
        </div>
    </div>
    
    <?php comments_template(); ?>
    <?php endwhile; ?>
    <?php else: ?>
    <p><?php _e('Sorry, no posts matched your criteria.', 'kubrick'); ?></p>
    <?php endif; ?>
    
    </div>
    <div class="sidebar2">
    <?php include (TEMPLATEPATH . '/sidebar2.php'); ?>
    </div>
    
    </div>
    <div class="cleared"></div>
    
    <?php get_footer(); ?>

    And my current page.php looks like this:

    <?php get_header(); ?>
    <div class="contentLayout">
    <div class="sidebar1">
    <?php include (TEMPLATEPATH . '/sidebar1.php'); ?>
    </div>
    <div class="content">
    
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <div class="Post">
        <div class="Post-body">
    <div class="Post-inner article">
    <h2 class="PostHeaderIcon-wrapper">
    <span class="PostHeader"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(__('Permanent Link to %s', 'kubrick'), the_title_attribute('echo=0')); ?>">
    <?php the_title(); ?>
    </a></span>
    </h2>
    <?php ob_start(); ?>
    <?php $icons = array(); ?>
    <?php if (!is_page()) : ?>
    <?php ob_start(); ?>
    <?php the_time(__('F jS, Y', 'kubrick')) ?>
    <?php $icons[] = ob_get_clean(); ?>
    <?php endif; ?>
    <?php if (!is_page()) : ?>
    <?php ob_start(); ?>
    <?php _e('Author', 'kubrick'); ?>: <a href="#" title="<?php _e('Author', 'kubrick'); ?>"><?php the_author() ?></a>
    <?php $icons[] = ob_get_clean(); ?>
    <?php endif; ?>
    <?php if (0 != count($icons)): ?>
    <div class="PostHeaderIcons metadata-icons">
    <?php echo implode(' | ', $icons); ?>
    
    </div>
    <?php endif; ?>
    <?php $metadataContent = ob_get_clean(); ?>
    <?php if (trim($metadataContent) != ''): ?>
    <div class="PostMetadataHeader">
    <?php echo $metadataContent; ?>
    
    </div>
    <?php endif; ?>
    <div class="PostContent">
    <?php if (is_search()) the_excerpt(); else the_content(__('Read the rest of this entry &raquo;', 'kubrick')); ?>
    
    </div>
    <div class="cleared"></div>
    <?php ob_start(); ?>
    <?php $icons = array(); ?>
    <?php if (!is_page()) : ?>
    <?php ob_start(); ?>
    <?php printf(__('Posted in %s', 'kubrick'), get_the_category_list(', ')); ?>
    <?php $icons[] = ob_get_clean(); ?>
    <?php endif; ?>
    <?php if (!is_page() &amp;&amp; get_the_tags()) : ?><?php ob_start(); ?>
    <?php the_tags(__('Tags:', 'kubrick') . ' ', ', ', ' '); ?>
    <?php $icons[] = ob_get_clean(); ?><?php endif; ?>
    <?php if (!is_page() &amp;&amp; !is_single()) : ?><?php ob_start(); ?>
    <?php comments_popup_link(__('No Comments »', 'kubrick'), __('1 Comment »', 'kubrick'), __('% Comments »', 'kubrick'), '', __('Comments Closed', 'kubrick') ); ?>
    <?php $icons[] = ob_get_clean(); ?><?php endif; ?>
    <?php if (0 != count($icons)): ?>
    <div class="PostFooterIcons metadata-icons">
    <?php echo implode(' | ', $icons); ?>
    
    </div>
    <?php endif; ?>
    <?php $metadataContent = ob_get_clean(); ?>
    <?php if (trim($metadataContent) != ''): ?>
    <div class="PostMetadataFooter">
    <?php echo $metadataContent; ?>
    
    </div>
    <?php endif; ?>
    
    </div>
    
        </div>
    </div>
    
    <?php endwhile; endif; ?>
    
    </div>
    <div class="sidebar2">
    <?php include (TEMPLATEPATH . '/sidebar2.php'); ?>
    </div>
    
    </div>
    <div class="cleared"></div>
    
    <?php get_footer(); ?>

    Hopefully you can help me because I dont know how to edit this. Thanks in advance!

    Greets, Marko

  2. Detective
    Member
    Posted 6 years ago #

    Hi,

    Looking at your screenshots, I noticed that most of your changes require only css changes. Please check the generated profiles to see the corresponding classes to the elements you want to modify.

    Other changes require more template editing. The function aleph_user_lists and aleph_user_profile are helper functions, you could copy and paste their content into your templates and modify the output there. The problem is this won't be future-proof as the behavior of the plugin could change.

Topic Closed

This topic has been closed to new replies.

About this Topic