I copied all of this code and replaced it in my gallery.php file, but I got a parsing error in Line 21. Was I only supposed to replace part of the code? This is in reference to http://mrsasecret.com/ where the home page is showing an archive of the featured content erroneously.
Thanks, WebWeaver
- Code: Select all
[quote]
here I post the code for gallery.php that you need to replace..[code]<div id="featured">
<script type="text/javascript">
function startGallery() {
var myGallery = new gallery($('myGallery'), {
timed: true
});
}
window.addEvent('domready',startGallery);
</script>
<style type="text/css">
.jdGallery .slideInfoZone
{
height: <?php echo get_option('gallery-info'); ?>px;
}
</style>
<div id="myGallery">
<?php
$imgthumb = get_option('gallery-use-thumb-image') ? "thumbnailimg" : "articleimg";
$wordquantity = get_option('gallery-rss-word-quantity') ? get_option('gallery-rss-word-quantity') : 100;
if (get_option('gallery-way') == 'new') {//new way
$arr = split(",",get_option('gallery-items-pages'));
if (get_option('gallery-randomize-pages'))
{
shuffle($arr);
}
foreach ($arr as $post_or_page_id)
{
get_a_post($post_or_page_id); ?>
<div class="imageElement">
<h2><?php the_title() ?></h2>
<?php
if(get_option('gallery-use-featured-content')) {?>
<p><?php $key="featuredtext"; echo get_post_meta($post->ID, $key, true); ?></p>
<?php
} else {
?>
<p><?php the_content_rss('', 0, '', $wordquantity); ?></p>
<?php
}
?>
<a href="<?php the_permalink() ?>" title="Read More" class="open"></a>
<img src="<?php $key="articleimg"; echo get_post_meta($post->ID, $key, true); ?>" alt="<?php $key="alttext"; echo get_post_meta($post->ID, $key, true); ?>" class="full" />
<img src="<?php $key=$imgthumb; echo get_post_meta($post->ID, $key, true); ?>" alt="<?php $key="alttext"; echo get_post_meta($post->ID, $key, true); ?>" class="thumbnail" />
</div>
<?php
} ?>
</div>
<?php
}
else { ?>
<?php $my_query = new WP_Query('category_name=' . get_option('gallery-category') . '&showposts=' . get_option('gallery-items')); ?>
<?php while ($my_query->have_posts())
{
$my_query->the_post(); ?>
<div class="imageElement">
<h2><?php the_title() ?></h2>
<?php
if(get_option('gallery-use-featured-content')) {?>
<p><?php $key="featuredtext"; echo get_post_meta($post->ID, $key, true); ?></p>
<?php
} else {
?>
<p><?php the_content_rss('', 0, '', $wordquantity); ?></p>
<?php
}
?>
<a href="<?php the_permalink() ?>" title="Read More" class="open"></a>
<img src="<?php $key="articleimg"; echo get_post_meta($post->ID, $key, true); ?>" alt="<?php $key="alttext"; echo get_post_meta($post->ID, $key, true); ?>" class="full" />
<img src="<?php $key=$imgthumb; echo get_post_meta($post->ID, $key, true); ?>" alt="<?php $key="alttext"; echo get_post_meta($post->ID, $key, true); ?>" class="thumbnail" />
</div>
<?php } ?>
</div>
<?php
}?>
</div>









