1 lauren Sep 12, 2006 22:36
3 lauren Sep 13, 2006 00:34
in my blog via index.php ;)
4 lauren Sep 13, 2006 00:38
moreover, I visualize the smilies in the backoffice, when I insert a post, but the smilies in the comments there aren't and therefore they cannot be inserted in the comments. I don't know the code for to make appear them for to use in the comments :(
5 balupton Sep 13, 2006 00:47
For the date display, open up your skin's _main.php and look for;
$Item->issue_time();
And replace with
$Item->issue_time('l dS \of F Y h:i:s A');
Or to do specificly what you wanted, this
$Item->issue_time('l, dS F Y');
For the smilies, post that as another topic, its fixable, and someone that knows how can answer that :)
Have fun ;)
6 lauren Sep 13, 2006 01:09
great! :D
thank you :-*
7 hudson2001 Sep 13, 2006 02:22
Awesome! I was coming here to ask the same thing!
8 hudson2001 Sep 13, 2006 03:11
I spoke too soon. There is no
$Item->issue_time();
in my main php file. In fact, there is no "time" at all.
What to do now?? :) I am using [url=http://skins.b2evolution.net/a.php?skin=TicTac]TicTac[/url].
9 lauren Sep 13, 2006 03:15
balupton wrote:
open up your skin's _main.php
;)
10 hudson2001 Sep 13, 2006 03:17
Lauren wrote:
balupton wrote:
open up your skin's _main.php
;)
Hmmm, I think that's what I have open. The file I have opened is in blogs/skins/tictac/_main.php:
<?php
/**
* This is the main template. It displays the blog.
*
* However this file is not meant to be called directly.
* It is meant to be called automagically by b2evolution.
* To display a blog, the easiest way is to call index.php?blog=#
* where # is the number of your blog.
*
* This file is part of the b2evolution project - {@link http://b2evolution.net/}
*
* @copyright (c)2003-2006 by Francois PLANQUE - {@link http://fplanque.net/}
* Parts of this file are copyright (c)2005 by Jason EDGECOMBE.
* Parts of this file are copyright (c)2004-2005 by Daniel HAHLER.
*
* @license http://b2evolution.net/about/license.html GNU General Public License (GPL)
*
* @package evoskins
* @subpackage tictac
*/
if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
header( 'Content-type: text/html; charset='.$io_charset );
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php locale_lang() ?>" lang="<?php locale_lang() ?>">
<head>
<?php $Plugins->trigger_event( 'SkinBeginHtmlHead' ); ?>
<title><?php
$Blog->disp('name', 'htmlhead');
request_title( ' - ', '', ' - ', 'htmlhead' );
?></title>
<?php skin_base_tag(); /* Base URL for this skin. You need this to fix relative links! */ ?>
<meta name="description" content="<?php $Blog->disp( 'shortdesc', 'htmlattr' ); ?>" />
<meta name="keywords" content="<?php $Blog->disp( 'keywords', 'htmlattr' ); ?>" />
<meta name="generator" content="b2evolution <?php echo $app_version ?>" /> <!-- Please leave this for stats -->
<link rel="alternate" type="text/xml" title="RDF" href="<?php $Blog->disp( 'rdf_url', 'raw' ) ?>" />
<link rel="alternate" type="text/xml" title="RSS .92" href="<?php $Blog->disp( 'rss_url', 'raw' ) ?>" />
<link rel="alternate" type="text/xml" title="RSS 2.0" href="<?php $Blog->disp( 'rss2_url', 'raw' ) ?>" />
<link rel="alternate" type="application/atom+xml" title="Atom" href="<?php $Blog->disp( 'atom_url', 'raw' ) ?>" />
<link rel="pingback" href="<?php $Blog->disp( 'pingback_url', 'raw' ) ?>" />
<link rel="stylesheet" type="text/css" media="print" href="print.css" />
<link rel="stylesheet" type="text/css" media="screen" href="tictac.css" />
<?php
$Blog->disp( 'blog_css', 'raw');
$Blog->disp( 'user_css', 'raw');
// comments_popup_script() // Uncomment to include javascript to open pop up windows
?>
</head>
<body>
<div id="wrapper">
<div class="pageHeader">
<?php // ---------------------- BLOG LIST INCLUDED HERE ------------------------
require( dirname(__FILE__).'/_bloglist.php' );
// ------------------------------ END OF BLOG LIST -------------------------- ?>
<h1 id="pageTitle"><?php $Blog->disp('name', 'htmlbody') ?></h1>
<div class="pageSubTitle">
<?php $Blog->disp('tagline', 'htmlbody') ?>
</div>
</div>
<div id="content">
<?php // ======== START OF MAIN AREA ======== ?>
<div class="bPosts">
<?php // ------------------ MESSAGES GENERATED FROM ACTIONS --------------------
$Messages->disp( );
// ----------------------------- END OF MESSAGES ---------------------------- ?>
<?php // --------------------- TITLE FOR THE CURRENT REQUEST -------------------
request_title( '<h2>', '</h2>' );
// ----------------------------- END OF REQUEST TITLE ----------------------- ?>
<?php // -------- START OF POSTS --------
if( isset($MainList) ) $MainList->display_if_empty(); // Display message if no post
if( isset($MainList) ) while( $Item = $MainList->get_item() ) {
$MainList->date_if_changed(); // display post date if it changed
locale_temp_switch( $Item->locale ); // Temporarily switch to post locale
$Item->anchor(); // Anchor for permalinks to refer to
?>
<div class="bPost bPost<?php $Item->status( 'raw' ) ?>" lang="<?php $Item->lang() ?>">
<div class="bSmallHead">
<?php $Item->permanent_link( '#icon#' ); ?>
<?php
echo T_('Categories'), ': ';
$Item->categories();
// un-comment the next three lines to include the author's name and message form link
// echo ', by ';
// $Item->author(); // Load Item's creator User:
// $Item->msgform_link( $Blog->get('msgformurl') );
echo ' ';
locale_flag( $Item->locale, 'h10px' ); // Display flag for post locale
?>
</div>
<h3 class="bTitle"><?php $Item->title(); ?></h3>
<div class="bText">
<?php
$Item->content();
link_pages();
?>
</div>
<div class="bSmallPrint">
<?php $Item->feedback_link( 'comments' ) // Link to comments ?>
<?php $Item->feedback_link( 'trackbacks', ' • ' ) // Link to trackbacks ?>
<?php $Item->trackback_rdf() // trackback autodiscovery information ?>
<?php $Item->feedback_link( 'pingbacks', ' • ' ) // Link to trackbacks ?>
-
<a href="<?php $Item->permanent_url() ?>" title="<?php echo T_('Permanent link to full entry') ?>" ><?php echo T_('Permalink') ?></a>
</div>
<?php // START OF INCLUDE FOR COMMENTS, PINGBACKS, & TRACKBACKS
$disp_comments = 1; // Display comments if requested
$disp_comment_form = 1; // Display comments form if requested
if ( $Blog->get('allowpingbacks') == 1 ) {
$disp_pingbacks = 1; // Display pingbacks if requested
} else {
$disp_pingbacks = 0; // or don't
}
if ( $Blog->get('allowtrackbacks') == 1 ) {
$disp_trackbacks = 1; // Display trackbacks if requested
$disp_trackback_url = 1; // Display trackback URL if requested
} else {
$disp_trackbacks = 0; // or don't
$disp_trackback_url = 0; // or don't
}
require( dirname(__FILE__).'/_feedback.php' );
locale_restore_previous(); // Restore previous locale (Blog locale)
// END INCLUDES FOR COMMENTS, PINGBACKS, & TRACKBACKS ?>
</div>
<?php } ?>
<p class="center"><strong>
<?php posts_nav_link(); ?>
<?php
// previous_post( '<p class="center">%</p>' );
// next_post( '<p class="center">%</p>' );
?>
</strong></p>
<?php // ------------- START OF INCLUDES FOR LAST COMMENTS, ETC. -------------
switch( $disp )
{
case 'comments':
// this includes the last comments if requested:
require( dirname(__FILE__).'/_lastcomments.php' );
break;
case 'arcdir':
// this includes the archive directory if requested
require( dirname(__FILE__).'/_arcdir.php');
break;
case 'profile':
// this includes the profile form if requested
require( dirname(__FILE__).'/_profile.php');
break;
case 'msgform':
// this includes the email form if requested
require( dirname(__FILE__).'/_msgform.php');
break;
case 'subs':
// this includes the subscription form if requested
require( dirname(__FILE__).'/_subscriptions.php');
break;
default:
}
// ------------- END OF INCLUDES FOR LAST COMMENTS, ETC. ------------- ?>
</div>
</div>
<?php // ========================= START OF SIDEBAR ========================= ?>
<div class="bSideBar">
<div class="bSideItem">
<h3><?php echo T_('Who I Am') ?></h3>
<center><img src="http://www.hudson2001.com/miscpics/avatars/jentilt-longhair.gif" alt="November 2004" border=1> <img src="http://www.hudson2001.com/miscpics/avatars/orangepink.gif" alt="October 2005" border=1> <img src="http://www.hudson2001.com/miscpics/avatars/tcf.gif" alt="October 2005" border=1> <br>
<img src="http://www.hudson2001.com/miscpics/avatars/sears.gif" alt="March 2006" border=1> <img src="http://www.hudson2001.com/miscpics/avatars/tcr-tcf.gif" alt="April 2006" border=1> <img src="http://www.hudson2001.com/miscpics/avatars/jenbar65.gif" alt="June 2006" border=1> </center>
<center>
<!-- Begin Shinystat Free code -->
<script type="text/javascript" language="JavaScript" SRC="http://codice.shinystat.com/cgi-bin/getcod.cgi?USER=hudson2001"></script>
<noscript>
<A HREF="http://www.shinystat.com" target="_top">
<IMG SRC="http://www.shinystat.com/cgi-bin/shinystat.cgi?USER=hudson2001" ALT="Free web counters" BORDER="0"></A>
</noscript>
<!-- Begin Shinystat Free code -->
</center>
</div>
<div class="bSideItem">
<h3><?php $Blog->disp('name', 'htmlbody') ?></h3>
<p><?php $Blog->disp('longdesc', 'htmlbody'); ?></p>
<p class="center"><strong><?php posts_nav_link(); ?></strong></p>
<!--?php next_post(); // activate this if you want a link to the next post in single page mode ?-->
<!--?php previous_post(); // activate this if you want a link to the previous post in single page mode ?-->
<ul>
<li><a href="<?php $Blog->disp( 'dynurl', 'raw' ) ?>" title="<?php echo T_('Recently') ?>"><strong><?php echo T_('Recently') ?></strong></a></li>
<li><a href="<?php $Blog->disp( 'lastcommentsurl', 'raw' ) ?>" title="<?php echo T_('Last comments') ?>"><strong><?php echo T_('Last comments') ?></strong></a></li>
</ul>
<?php // ---------------------- CALL THE CALENDAR PLUGIN -----------------------
$Plugins->call_by_code( 'evo_Calr', array( // Add parameters below:
'block_start'=>'',
'block_end'=>'',
'title'=>'', // No title.
) );
// ----------------------------- END OF CALENDAR -------------------------- ?>
</div>
<div class="bSideItem">
<h3><?php echo T_('Last Listened To') ?></h3></div>
<center><a href="http://www.last.fm/user/hudson2001/?chartstyle=hudson2001"><img src="http://imagegen.last.fm/hudson2001/recenttracks/5/hudson2001.gif" border="0" /></a></center>
<div class="bSideItem">
<h3 class="sideItemTitle"><?php echo T_('Search') ?></h3>
<?php form_formstart( $Blog->dget( 'blogurl', 'raw' ), 'search', 'SearchForm' ) ?>
<input type="text" name="s" size="30" value="<?php echo htmlspecialchars($s) ?>" class="SearchField" /><br />
<input type="radio" name="sentence" value="AND" id="sentAND" <?php if( $sentence=='AND' ) echo 'checked="checked" ' ?>/><label for="sentAND"><?php echo T_('All Words') ?></label>
<input type="radio" name="sentence" value="OR" id="sentOR" <?php if( $sentence=='OR' ) echo 'checked="checked" ' ?>/><label for="sentOR"><?php echo T_('Some Words') ?></label>
<input type="radio" name="sentence" value="sentence" id="sentence" <?php if( $sentence=='sentence' ) echo 'checked="checked" ' ?>/><label for="sentence"><?php echo T_('Entire phrase') ?></label>
<input type="submit" name="submit" value="<?php echo T_('Search') ?>" />
<input type="reset" value="<?php echo T_('Reset form') ?>" />
</form>
</div>
<?php // --------------------- CALL THE CATEGORIES PLUGIN ----------------------
$Plugins->call_by_code( 'evo_Cats', array( // Add parameters below:
) );
// ---------------------------- END OF CATEGORIES ------------------------- ?>
<?php // ---------------------- CALL THE ARCHIVES PLUGIN -----------------------
$Plugins->call_by_code( 'evo_Arch', array( // Add parameters below:
) );
// ----------------------------- END OF ARCHIVES -------------------------- ?>
<?php // --------------------- SKINS LIST INCLUDED HERE ------------------------
if( ! $Blog->get('force_skin') ) {
require( dirname(__FILE__).'/_skinslist.php');
} // -------------------------- END OF SKINS LIST ------------------------- ?>
<?php // ----------------------- LINKBLOG INCLUDED HERE ------------------------
require( dirname(__FILE__).'/_linkblog.php' );
// ------------------------------- END OF LINKBLOG -------------------------- ?>
<div class="bSideItem">
<h3><?php echo T_('Misc') ?></h3>
<ul>
<?php
user_login_link( '<li>', '</li>' );
user_register_link( '<li>', '</li>' );
user_admin_link( '<li>', '</li>' );
user_profile_link( '<li>', '</li>' );
user_subs_link( '<li>', '</li>' );
user_logout_link( '<li>', '</li>' );
?>
</ul>
</div>
<div class="bSideItem">
<h3><?php echo T_('Syndicate this blog') ?> <img src="<?php echo $rsc_url ?>img/xml.gif" alt="XML" width="36" height="14" class="middle" /></h3>
<ul>
<li>RSS 0.92: <a href="<?php $Blog->disp( 'rss_url', 'raw' ) ?>"><?php echo T_('Posts') ?></a>, <a href="<?php $Blog->disp( 'comments_rss_url', 'raw' ) ?>"><?php echo T_('Comments') ?></a></li>
<li>RSS 1.0: <a href="<?php $Blog->disp( 'rdf_url', 'raw' ) ?>"><?php echo T_('Posts') ?></a>, <a href="<?php $Blog->disp( 'comments_rdf_url', 'raw' ) ?>"><?php echo T_('Comments') ?></a></li>
<li>RSS 2.0: <a href="<?php $Blog->disp( 'rss2_url', 'raw' ) ?>"><?php echo T_('Posts') ?></a>, <a href="<?php $Blog->disp( 'comments_rss2_url', 'raw' ) ?>"><?php echo T_('Comments') ?></a></li>
<li>Atom 1.0: <a href="<?php $Blog->disp( 'atom_url', 'raw' ) ?>"><?php echo T_('Posts') ?></a>, <a href="<?php $Blog->disp( 'comments_atom_url', 'raw' ) ?>"><?php echo T_('Comments') ?></a></li>
</ul>
<a href="http://fplanque.net/Blog/itTrends/2004/01/10/rss_rdf_and_atom_in_a_nutshell" title="External - English"><?php echo T_('What is RSS?') ?></a>
</div>
<p class="center">powered by<br />
<a href="http://b2evolution.net/" title="b2evolution home"><img src="img/b2evolution_button.png" alt="b2evolution" width="80" height="15" border="0" class="middle" /></a></p>
</div>
<div class="clear"> </div>
<div id="footer">
<?php
// Display additional credits (see /conf/_advanced.php):
// If you can add your own credits without removing the defaults, you'll be very cool :))
// Please leave this at the bottom of the page to make sure your blog gets listed on b2evolution.net
if( function_exists( 'display_list' ) ) {
display_list( $sponsored_links, '<p class="baseline">'.T_('Credits').': ', '', '|', ' ', ' ' );
} ?>
<br /> <br />
<a href="http://validator.w3.org/check?uri=referer" title="Valid XHTML 1.0!"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" width="88" height="31" class="middle" /></a>
<a href="http://jigsaw.w3.org/css-validator/" title="Valid CSS!"><img src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!" width="88" height="31" class="middle" /></a>
<a href="http://feedvalidator.org/check.cgi?url=<?php $Blog->disp( 'rss2_url', 'raw' ) ?>" title="Valid RSS 2.0!"><img src="<?php echo $rsc_url; ?>img/valid-rss.png" alt="Valid RSS 2.0!" width="88" height="31" class="middle" /></a>
<a href="http://feedvalidator.org/check.cgi?url=<?php $Blog->disp( 'atom_url', 'raw' ) ?>" title="Valid Atom 1.0!"><img src="<?php echo $rsc_url; ?>img/valid-atom.png" alt="Valid Atom 1.0!" width="88" height="31" class="middle" /></a>
</p>
</div>
</div>
<?php
$Hit->log(); // log the hit on this page
debug_info(); // output debug info if requested
?>
</body>
</html>
11 lauren Sep 13, 2006 03:41
there isn't.... :-/
I don't know... you test to add it
<!-- =================================== START OF MAIN AREA =================================== -->
<?php // ------------------------------------ START OF POSTS ----------------------------------------
if( isset($MainList) ) $MainList->display_if_empty(); // Display message if no post
if( isset($MainList) ) while( $Item = $MainList->get_item() )
{
$MainList->date_if_changed();
?>
<div class="bPost" lang="<?php $Item->lang() ?>">
<?php
locale_temp_switch( $Item->locale ); // Temporarily switch to post locale
$Item->anchor(); // Anchor for permalinks to refer to
?>
<div class="bSmallHead">
<?php
$Item->permanent_link( '#icon#' );
echo ' ';
$Item->issue_time();
echo ', ', T_('Categories'), ': ';
$Item->categories();
echo ' ';
?>
</div>
12 hudson2001 Sep 13, 2006 04:53
After some trial and error, it works if you put it in PHP terms. :D
BUT (isn't there always a but?)..... I wanted to change a different date than that one. That changes the date/time/day of the post in the actual post, as in:
Tuesday, 12th September 2006 Categories: News, Recipes
and I was hoping to change the main date, as seen on the identical skin I use at [url=http://www.hudson2001.com/jen/blog/]blogger[/url] - you see where it says Friday, September 08, 2006? On the b2evo skin, it just says 9/12/06.
13 balupton Sep 13, 2006 13:32
Replace;
<?php
echo T_('Categories'), ': ';
$Item->categories();
With
<?php
echo $Item->issue_time('l, F dS, Y');
echo T_('Categories'), ': ';
$Item->categories();
For more info on date formats read this;
http://au3.php.net/manual/en/function.date.php
14 hudson2001 Sep 13, 2006 15:02
That didn't work, either. :(
It changed the date/time of the actual post, but NOT the main date line that appears above the post. See what I mean [url=http://www.hudson2001.com/blogs/]here[/url].
15 balupton Sep 13, 2006 15:14
K remove that change and do this.
Replace
if( isset($MainList) ) while( $Item = $MainList->get_item() ) {
$MainList->date_if_changed(); // display post date if it changed
With
if( isset($MainList) ) while( $Item = $MainList->get_item() ) {
$MainList->date_if_changed('<h2>','</h2>','l, F dS, Y'); // display post date if it changed
16 hudson2001 Sep 13, 2006 17:36
Nope, nothing. See http://www.hudson2001.com/blogs/index.php - it still just has the date. Just to make sure, here's what that entire section of code says:
<?php // -------- START OF POSTS --------
if( isset($MainList) ) $MainList->display_if_empty(); // Display message if no post
if( isset($MainList) ) while( $Item = $MainList->get_item() ) {
$MainList->date_if_changed('<h2>','</h2>','l, F dS, Y'); // display post date if it changed
locale_temp_switch( $Item->locale ); // Temporarily switch to post locale
$Item->anchor(); // Anchor for permalinks to refer to
?>
As a sidenote, I tried to change the other code back and it didn't work - now there's nothing there in the way of times and I can't get it back to what it was - but I can revert it when I get home (to an older saved version).
17 balupton Sep 14, 2006 00:15
Can you attach a copy of your _main.php file, and i will make the changes myself and see if i can get it working?
18 hudson2001 Sep 14, 2006 00:33
THANKS!!!
FYI, though: I reverted back to what I started with at the beginning - with the time on the same line as the category.
In a perfect world, I would like the dates of the [url=http://www.hudson2001.com/blogs/index.php]new blog[/url] to look like the [url=http://www.hudson2001.com/jen/blog/]old blog[/url].
19 balupton Sep 14, 2006 01:46
I just applied what i said in the previous post and it is working fine on my side...
20 hudson2001 Sep 14, 2006 03:27
It works! AWESOME!!!!! Thank you SOOOO much!!
I'm not sure what happened before - I probably accidentally erased something while I was cutting and pasting! Now I just have to find the place in my css sheet to change the size! WOO HOO!!!
21 hudson2001 Sep 15, 2006 03:25
Okay, one last teeny tiny thing (I tried to go to that site you gave earlier but it had trouble loading)...
How can I get rid of the THs and RDs on the dates (i.e. 3rd, 4th)? I assume it's one of those letters you added in that sequence?
Thanks, you're the bomb. :D
22 balupton Sep 15, 2006 04:19
K try;
http://php.net/manual/en/function.date.php
And to answer your question remove the capital S.
23 filthio Oct 09, 2006 00:00
What a great hack - it was one of the first things I tried to do with my spiffy new 1.8 installation and you answered it for me before I even asked. I inserted the fix you recommended and it worked first time. I was even able to adjust the order of the date (being English, I like to say D,M,Y not M,D,Y) as required. So thanks.
:)
And one more thing - is there a way of stripping out the extra 0 in dates with a single digit?
(edit) Oh, actually, I sorted that one out myself by a bit of RTFM. To strip out leading zeros the date format code should read jS not dS. Simple!
Do you want it that way when you are viewing your blog via index.php (so with your skin), or in the backoffice (admin.php)