1 maxsideburn Aug 20, 2009 18:14
3 maxsideburn 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 maxsideburn 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 john 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 edb 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 maxsideburn 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 maxsideburn 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 yabba 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 edb 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.
Hi and welcome to the forum
You will need to edit the skin for the Gadget Tree blog to add the author. This has already been covered on the forums so check out this thread:
http://forums.b2evolution.net/viewtopic.php?t=19018
and it should get you well on the way.
L