Recent Topics

1 Aug 20, 2009 18:14    

My b2evolution Version: 2.x

I have two blogs, apparently the skin on one blog allows you to see the author's name near the post title, the other does not though.

I really like the skin I'm using and don't want to change it, but I would really like this feature on both blogs.

http://www.moreau-island.com/blog

that is a link to my blog, the Gadget Tree one is the one I want it showing up on, if you click the link to the Media Dungeon you'll see that it appears on that blog.

Thanks in advance for your help!

3 Aug 20, 2009 19:54

yep, tried that. my .index.main.php looks NOTHING like the one they posted there.

and even if it did, WHERE in there do I add the additional lines?

4 Aug 20, 2009 19:57

here's what mine looks like:

<?php
/**
 * This is the main/default page template.
 *
 * For a quick explanation of b2evo 2.0 skins, please start here:
 * {@link http://manual.b2evolution.net/Skins_2.0}
 *
 * The main page template is used to display the blog when no specific page template is available
 * to handle the request (based on $disp).
 *
 * @package evoskins
 * @subpackage glossyblue
 *
 * @version $Id: index.main.php,v 1.1.2.1 2008/05/26 19:08:05 fplanque Exp $
 */
if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );

if( version_compare( $app_version, '2.4.1' ) < 0 )
{ // Older 2.x skins work on newer 2.x b2evo versions, but newer 2.x skins may not work on older 2.x b2evo versions.
	die( 'This skin is designed for b2evolution 2.4.1 and above. Please <a href="http://b2evolution.net/downloads/index.html">upgrade your b2evolution</a>.' );
}

// This is the main template; it may be used to display very different things.
// Do inits depending on current $disp:
skin_init( $disp );


// -------------------------- HTML HEADER INCLUDED HERE --------------------------
skin_include( '_html_header.inc.php' );
// Note: You can customize the default HTML header by copying the generic
// /skins/_html_header.inc.php file into the current skin folder.
// -------------------------------- END OF HEADER --------------------------------
?>


<?php
// ------------------------- BODY HEADER INCLUDED HERE --------------------------
skin_include( '_body_header.inc.php' );
// Note: You can customize the default BODY heder by copying the generic
// /skins/_body_footer.inc.php file into the current skin folder.
// ------------------------------- END OF FOOTER --------------------------------
?>


<div id="content" >

	<?php
		// ------------------------- MESSAGES GENERATED FROM ACTIONS -------------------------
		messages( array(
			'block_start' => '<div class="action_messages">',
			'block_end'   => '</div>',
		) );
		// --------------------------------- END OF MESSAGES ---------------------------------
	?>

	<?php
		// ------------------------- TITLE FOR THE CURRENT REQUEST -------------------------
		request_title( array(
				'title_before'=> '<h2>',
				'title_after' => '</h2>',
				'title_none'  => '',
				'glue'        => ' - ',
				'title_single_disp' => true,
				'format'      => 'htmlbody',
			) );
		// ------------------------------ END OF REQUEST TITLE -----------------------------
	?>

	<?php
		// -------------- MAIN CONTENT TEMPLATE INCLUDED HERE (Based on $disp) --------------
		skin_include( '$disp$', array(
			) );
		// Note: you can customize any of the sub templates included here by
		// copying the matching php file into your skin directory.
		// ------------------------- END OF MAIN CONTENT TEMPLATE ---------------------------
	?>

</div>


<?php
// ------------------------- SIDEBAR INCLUDED HERE --------------------------
skin_include( '_sidebar.inc.php' );
// Note: You can customize the default BODY footer by copying the
// _body_footer.inc.php file into the current skin folder.
// ----------------------------- END OF SIDEBAR -----------------------------
?>


<?php
// ------------------------- BODY FOOTER INCLUDED HERE --------------------------
skin_include( '_body_footer.inc.php' );
// Note: You can customize the default BODY footer by copying the
// _body_footer.inc.php file into the current skin folder.
// ------------------------------- END OF FOOTER --------------------------------
?>


<?php
// ------------------------- HTML FOOTER INCLUDED HERE --------------------------
skin_include( '_html_footer.inc.php' );
// Note: You can customize the default HTML footer by copying the
// _html_footer.inc.php file into the current skin folder.
// ------------------------------- END OF FOOTER --------------------------------
?>

5 Aug 20, 2009 20:48

In that skin skin look at editing posts.main.php and single.main.php
The section you add into is either before or after or within...

	<span class="post-cat"><?php
				$Item->categories( array(
					'before'          => '',
					'after'           => ' ',
					'include_main'    => true,
					'include_other'   => true,
					'include_external'=> true,
					'link_categories' => true,
				) );
			?></span>

6 Aug 20, 2009 21:31

And ... uh ... use the "Code" or "PHP" button to paste code in. Please. Not to mention that we pretty much know what files are when they aren't modified :roll:

Like John did. He used the "Code" button.

It just keeps things easier to read is all.

7 Aug 21, 2009 17:54

sorry. I'm an extremely computer and tech savvy, with the one exception being anything related to "code" (except HTML and some Qbasic, lol).

so add it before, or after, or within?? that's kinda vague. sorry but I just have NO idea about editing PHP

8 Aug 21, 2009 18:37

I tried adding this:

<?php
         $Item->author( array(
    'before'    => ', '.T_('by').' ',
    'after'     => '',
                    ) );
       ?>

into the code here:

'before'          => 'INSERTED IT HERE', 

and it crashed my site

I also tried just adding just $Item->author into those same quotation marks but instead of showing the author's name is shows " $Item->author"

9 Aug 21, 2009 19:25

// replace this line with Johns code ;)

<span class="post-cat"><?php
            $Item->categories( array(
               'before'          => '',
               'after'           => ' ',
               'include_main'    => true,
               'include_other'   => true,
               'include_external'=> true,
               'link_categories' => true,
            ) );
         ?></span>

¥

10 Aug 22, 2009 02:29

And do watch out that you are using => intead of => if you copy/paste from the forums. => is the smiley code for => is the thing.


Form is loading...