Recent Topics

1 Sep 25, 2008 19:43    

My b2evolution Version: 2.x

Hi, I'm a PHP novice but this is about to drive me crazy.

I created a custom skin to match my website per the b2evo tutorial and I know the PHP is working because I had three major errors I had to research and fix...I was getting PHP error messages...but...

Now when you pull up my site it looks really pretty (well not in FireFox but I'll address that later) but it also has NO blog stuff on it...no posts not comments no nothing...but the PHP code is all there on my custom page.

I really need help fast...this is just a test page...I need to have three working b2evo blogs by Monday...

http://www.waitegenealogy.org/b2evo/blog1.php

I can send my code if you tell me which part you think you need to look at.

THANKS

3 Sep 25, 2008 23:03

OK...I hope it's OK to post the page code here...this is my index.main.php

I knew something was messed up ;o)

<?php
/**
 * This is the main template. It displays the blog.
 */
if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
?>
<!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" lang="<?php locale_lang() ?>">
<head>
<?php $Plugins->trigger_event( 'SkinBeginHtmlHead' ); ?>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $io_charset; ?>" >
<title>&lt;?php $Blog-&gt;disp('name', 'htmlhead'); request_title( ' - ', '', 
' - ', 'htmlhead' ); ?&gt;</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 ?>" > <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" href="style.css" type="text/css" >
<?php
                $Blog->disp( 'blog_css', 'raw');
                $Blog->disp( 'user_css', 'raw');
        ?>
<style type="text/css">
.style1 {
 line-height: 150%;
 font-size: x-small;
}
.style2 {
 text-align: center;
}
</style>
</head>
<body>

<div id="header">
<h1><a href="#">wgrf</a></h1>
<h2>Waite Genealogy</h2>
</div>
<div id="page">
<div id="content">
<h1>Thanks For Writing!</h1><br>
&nbsp;
<?php
        // ------------------------- MESSAGES GENERATED FROM ACTIONS -------------------------
        if( empty( $preview ) ) $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();
        ?>
<div class="bPost bPost<?php $Item->status( 'raw' ) ?>" 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 ', by ';
                        $Item->author();
                        $Item->msgform_link( $Blog->get('msgformurl') );
                        echo ', ';
                        $Item->wordcount();
                        echo ' ', T_('words');
                        echo ', ';
                        $Item->views();
                        echo '   ';
                        locale_flag( $Item->locale, 'h10px' );
                        echo '<br /> ', T_('Categories'), ': ';
                        $Item->categories();
                ?>
</div>
<h3 class="bTitle"><?php $Item->title(); ?></h3>
<div class="bText">
<?php $Item->content(); ?>
<?php link_pages() ?>
</div>
<div class="bSmallPrint">
<?php $Item->permanent_link( '#', '#', 'permalink_right' ); ?>

<?php $Item->feedback_link( 'comments' ) // Link to comments ?>
<?php $Item->feedback_link( 'trackbacks', ' &bull; ' ) // Link to trackbacks ?>
<?php $Item->feedback_link( 'pingbacks', ' &bull; ' ) // Link to trackbacks ?>
<?php $Item->edit_link( ' &bull; ' ) // Link to backoffice for editing ?>

<?php $Item->trackback_rdf() // trackback autodiscovery information ?>
</div>
<?php
                        // ------------- START OF INCLUDE FOR COMMENTS, TRACKBACK, PINGBACK, ETC. -------------
                        $disp_comments = 1;                                     // Display the comments if requested
                        $disp_comment_form = 1;                 // Display the comments form if comments requested
                        $disp_trackbacks = 1;                           // Display the trackbacks if requested

                        $disp_trackback_url = 1;                // Display the trackbal URL if trackbacks requested
                        $disp_pingbacks = 1;                            // Display the pingbacks if requested
                        require( dirname(__FILE__).'/_feedback.php' );
                        // ---------------- END OF INCLUDE FOR COMMENTS, TRACKBACK, PINGBACK, ETC. ----------------

                        locale_restore_previous();      // Restore previous locale (Blog locale)
                ?>
</div>
<?php
        } // ---------------------------------- END OF POSTS ------------------------------------
        ?>

<p class="center"><strong>
<?php 
if( isset($MainList) ) 
{ // Links to list pages: 
$MainList->page_links( '<p class="center">'.T_('Pages:').' <strong>', '</strong></p>' ); 
} 
?>               
<?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;
        }
        // ------------------- END OF INCLUDES FOR LAST COMMENTS, ETC. -------------------
?>
<p class="image" style="height: 130px;"><img src="http://www.waitegenealogy.org/images/gpa.jpg" alt="" width="120" height="120"></p>
<p style="margin-top: 0; margin-bottom: 12px; line-height: 20px">
<span lang="en-us">&quot;</span>...I look into this mirror and see a thousand mirrors 
behind me: My mother's face, between bright curtains, watches the damp 
garden. My father sits under a lamp with his eyes closed.&quot;</p>

Elmaz Abi-Nader | New Year's Morning | The Poetry of Arab Women</div>

<div id="sidebar">
<p>Sue Waite-Langley&nbsp;</p>
<p>346 South University #4</p>
<p>Salt Lake City, UT 84102</p>
<p>214-763-8456</p>
<p class="style8">&nbsp;</p>
<span class="style24"></span>
<ul>
<li id="menu">
<h2>Pages</h2>
<ul>
<li><a href="http://www.waitegenealogy.orgindex.htm">Homepage</a></li>
<li><a href="http://www.waitegenealogy.orgcontactform.htm">Contact Us</a></li>
<li><a href="http://www.waitegenealogy.org/b2evo/blog1.php">WGRFblog</a></li>
<li><a href="http://www.waitegenealogy.orgdna.htm">DNA Research</a></li>
<li><a href="http://www.waitegenealogy.orgdatabases.htm">Database Extractions</a></li>
<li><a href="http://www.waitegenealogy.orgarticles.htm">Articles</a></li>
<li><a href="http://www.waitegenealogy.orgfgs.htm">Family Groups</a></li>
<li><a href="http://www.waitegenealogy.orgtranscriptions.htm">Transcriptions</a></li>
<li><a href="http://www.waitegenealogy.orgmiscellany.htm">Miscellany</a></li>
<li><a href="http://www.waitegenealogy.orgeditorials.htm">Editorials</a></li>
<li><a href="http://www.waitegenealogy.orgkudos.htm">Kudos</a></li>
</ul>
<h2 class="style12">Search WGRF</h2>
			
<font size=1 face="arial,helvetica" >
			
<form action="http://search.freefind.com/find.html" method="get" accept-charset="utf-8" target="_self">
				
<div class="center">
<input type="hidden" name="id" value="42532932">
<input type="hidden" name="pageid" value="r">
<input type="hidden" name="mode" value="all">
<input type="hidden" name="n" value="0">
<input type="hidden" name="_charset_" value="">
<input type="hidden" name="bcd" value="รท">
<input type="text" name="query" size="15"><small>
<input type="submit" value="find"><br></small>powered by
<a href="http://www.freefind.com">FreeFind</a>
</div>
					
</form></font>
			
<li id="news"><h2>Recent Updates</h2></li>
			
<ul>
<li>
<h3>August 31, 2008</h3>
<p class="style9"><a href="http://www.waitegenealogy.orgFGS/Selected%20Lapeer%20County.pdf">Lapeer Co. Death Records</a></p>
<p class="style9"><a href="http://www.waitegenealogy.orgFGS/mideathindex.pdf">Michigan Death Index</a></p>
</li>
</ul>
			
			
<ul>
<li>
<h3>August 30, 2008</h3>
<p class="style9"><a href="http://www.waitegenealogy.org/index.htm">Total site makeover...</a></p>
</li>
</ul>
			
<ul>
<li><h2 style="margin-top: 0; margin-bottom: 6px">The Watchman</h2></li>
</ul>
			
<p style="margin-top: 0; margin-bottom: 6px">
<a href="http://www.waitegenealogy.org/FGS/volvno4.pdf">Vol. 5 No. 4</a></p>
<p style="margin-top: 0; margin-bottom: 6px">
<a href="http://www.waitegenealogy.org/FGS/volvno3.pdf">Vol. 5 No. 3</a></p>
<p style="margin-top: 0; margin-bottom: 6px">
<a href="http://www.waitegenealogy.org/FGS/volvno2.pdf">Vol. 5 No. 2</a></p>
<p style="margin-top: 0; margin-bottom: 6px">
<a href="http://www.waitegenealogy.org/FGS/volvno1.pdf">Vol. 5 No. 1</a></p>

<h2 style="margin-top: 0; margin-bottom: 6px">
<span style="font-weight: 400"><strong>Support wgrf</strong></span></h2>
<p style="margin-top: 0; margin-bottom: 6px"><span class="style15">I've setup a</span>
<a href="http://s1.amazon.com/exec/varzea/pay/T29H6MINJ1JDBK/058-5476430-6659827" class="style15">PayPage</a>
<span class="style15"> on&nbsp; Amazon.com's Honor System. Please consider making a 
small contribution if you've found this site useful. Hosting 
and research fees are very difficult to meet on a fixed income. Thanks in 
advance!</span></p>
<h2 style="margin-top: 0; margin-bottom: 6px">Website Content</h2>
<p style="line-height: 100%; " align="center"><font size="1"><img alt="" height="143" src="http://www.waitegenealogy.org/images/cicada.gif" width="99"></font></p>
</ul>
</div>
</div>

</body>
<div id="footer"></div>
</html>

4 Sep 25, 2008 23:22

Try replacing


<?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();
?> 


with this one


	<?php
		// --------------------------------- START OF POSTS -------------------------------------
		display_if_empty();

		while( $Item = & mainlist_get_item() )
		{	
		?>

5 Sep 25, 2008 23:38

OK...I fixed that but no noticeable change. Please tell me you might be able to find something else....

THANK YOU

6 Sep 26, 2008 00:03

try removing - producing ideas :-/

<?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;
}
// ------------------- END OF INCLUDES FOR LAST COMMENTS, ETC. -------------------
?> 

7 Sep 26, 2008 00:19

Try to add

skin_init( $disp );


right after the

if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );

8 Sep 26, 2008 00:45

Replace the posts loop with this one. I'd recommend you to copy some stuff from any default skin i.e. custom or miami_blue. Your skin has deprecated functions and methods and returns many errors.

<?php
while( $Item = & mainlist_get_item() )
{
$MainList->date_if_changed();
?>
<div class="bPost bPost<?php $Item->status_raw() ?>" 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();
echo ' ';
$Item->issue_time();
echo ', by ';
$Item->author();
$Item->msgform_link();
echo ', ';
$Item->wordcount();
echo ' ', T_('words');
echo ', ';
$Item->views();
echo ' ';
locale_flag( $Item->locale, 'h10px' );
echo '<br /> ', T_('Categories'), ': ';
$Item->categories();
?>
</div>
<h3 class="bTitle"><?php $Item->title(); ?></h3>
<div class="bText">
<?php $Item->content(); ?>
<?php link_pages() ?>
</div>
<div class="bSmallPrint">
<?php
$Item->permanent_link( array(
		'text' => get_icon('permalink'),
		'afer' => ' &bull; ',
	) );
	
// Link to comments, trackbacks, etc.:
$Item->feedback_link( array(
				'type' => 'feedbacks',
				'link_before' => '',
				'link_after' => '',
				'link_text_zero' => '#',
				'link_text_one' => '#',
				'link_text_more' => '#',
				'link_title' => '#',
				'use_popup' => false,
			) );

$Item->edit_link( array( // Link to backoffice for editing
		'before'    => ' &bull; ',
		'after'     => '',
	) );	
?>
</div>
<?php
	// ------------------ FEEDBACK (COMMENTS/TRACKBACKS) INCLUDED HERE ------------------
	skin_include( '_item_feedback.inc.php', array(
			'before_section_title' => '<h4>',
			'after_section_title'  => '</h4>',
		) );
	// Note: You can customize the default item feedback by copying the generic
	// /skins/_item_feedback.inc.php file into the current skin folder.
	// ---------------------- END OF FEEDBACK (COMMENTS/TRACKBACKS) ---------------------

locale_restore_previous(); // Restore previous locale (Blog locale)
?>
</div>
<?php
} // ---------------------------------- END OF POSTS ------------------------------------

9 Sep 26, 2008 01:16

Removing the last comments made no noticeable change...

The skin_init thing made my posts show up but with errors...

The third suggestion returned this error...
Parse error: syntax error, unexpected '<' in /home/waitegen/public_html/b2evo/skins/wrgf/index.main.php on line 137

These are the lines of code I think it's talking about...

<p class="center"><strong>

<?php
if( isset($MainList) )
{ // Links to list pages:
$MainList->page_links( '<p class="center">'.T_('Pages:').' <strong>', '</strong></p>' );
}
?>
<?php
// previous_post( '<p class="center">%</p>' );
// next_post( '<p class="center">%</p>' );
?>

</p></strong>

I deleted the <p><strong> and the closing for them...but still have the same error...now it looks like the program is objecting to the <?php but to my untrained eye...everything looks matched and closed...what now do you think?

10 Sep 26, 2008 04:23

Hi swaitela.

Hey check out the

code

button. It puts code into a little box for ya ;)

So here's the thing: the instructions you followed are obsolete because they were written before v2 came out. What you are now trying to do is "upgrade a custom skin" - not that I know of directions to do that. Much easier to pick a skin for v2 that is close to yours and customize it than to try to modify a (custom) skin for v1 to v2 compatibility!


Form is loading...