Re: [robin] Displaying records on Wordpress Blog
Hi,
The following code works in a template but throws up errors
A blank template page .i.e before I drop in database query code, displays without errors
This code is the same code that works without problem on non wordpress sites any ideas how to get rid of the error messages?
Code:
<?php
?>
This is the snarfer2 template with old css taken out
<?php
// load viewer library
$libraryPath = 'cmsAdmin/lib/viewer_functions.php';
$dirsToCheck = array('/home/melsview/public_html/','','../','../../','../../../');
foreach ($dirsToCheck as $dir) { if (@include_once("$dir$libraryPath")) { break; }}
if (!function_exists('getRecords')) { die("Couldn't load viewer library, check filepath in sourcecode."); }
// load records
list($biosRecords, $biosMetaData) = getRecords(array(
'tableName' => 'bios',
'where' => 'tw1=1',
));
?>
<div>
<div><h2>Heading</h2></div>
<!-- start of gallery layout -->
<div>
<?php foreach ($biosRecords as $biosRecord): ?><!-- master foreach-->
<div>
<div>
<h2><?php echo $biosRecord['name'] ?> Age: <?php echo $biosRecord['age'] ?></h2>
</div>
<div align="center"><?php foreach ($biosRecord['newimage'] as $upload): ?>
<?php if ($upload['isImage']): ?>
<a href="<?php echo $biosRecord['_link'] ?>" target="_self"><img src="<?php echo get_custom_watermark_url($upload['urlPath'], 'testwater.gif') ?>" width="<?php echo $upload['width'] ?>" height="<?php echo $upload['height'] ?>" alt="<?php echo $biosRecord['name'] ?>"></a>
<?php else: ?>
<?php endif ?>
</div>
<?php endforeach ?>
<p align="center"><a href="<?php echo $biosRecord['_link'] ?>" target="_self">Click to view details</a></p>
<!-- end viewme--></div>
<!-- finish master foreach--><?php endforeach ?>
<!-- end regionGallery --></div>
<!-- end of gallery layout -->
<!-- end wrapperMain --></div>
Error Messages:
Strict Standards: Non-static method GA_Filter::widget_content() cannot be called statically in /home/melhud/public_html/wp-includes/plugin.php on line 170 Strict Standards: Non-static method GA_Filter::widget_content() cannot be called statically in /home/melhud/public_html/wp-includes/plugin.php on line 170 Strict Standards: Non-static method GA_Filter::widget_content() cannot be called statically in /home/melhud/public_html/wp-includes/plugin.php on line 170
And These error messages appear at the bottom of the page:
Strict Standards: is_a(): Deprecated. Please use the instanceof operator in /home/melhud/public_html/wp-includes/script-loader.php on line 660
Strict Standards: Creating default object from empty value in /home/melhud/public_html/wp-includes/user.php on line 660
Strict Standards: Creating default object from empty value in /home/melhud/public_html/wp-includes/user.php on line 660
Strict Standards: Creating default object from empty value in /home/melhud/public_html/wp-includes/class-wp-admin-bar.php on line 167
Strict Standards: Only variables should be passed by reference in /home/melhud/public_html/wp-includes/admin-bar.php on line 266
Strict Standards: Creating default object from empty value in /home/melhud/public_html/wp-includes/class-wp-admin-bar.php on line 167
Strict Standards: Creating default object from empty value in /home/melhud/public_html/wp-includes/class-wp-admin-bar.php on line 167
Strict Standards: Creating default object from empty value in /home/melhud/public_html/wp-includes/class-wp-admin-bar.php on line 167
Strict Standards: Creating default object from empty value in /home/melhud/public_html/wp-includes/class-wp-admin-bar.php on line 167
Strict Standards: Creating default object from empty value in /home/melhud/public_html/wp-includes/class-wp-admin-bar.php on line 167
Strict Standards: Creating default object from empty value in /home/melhud/public_html/wp-includes/class-wp-admin-bar.php on line 167