-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgallery.php
More file actions
97 lines (86 loc) · 2.85 KB
/
gallery.php
File metadata and controls
97 lines (86 loc) · 2.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<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
}
/* Grab some variables for below */
$width = get_option('gallery-width');
$height = get_option('gallery-height');
the_post_thumbnail(array($width,$height), array('class' => 'full'));
?>
<a href="<?php the_permalink() ?>" title="Read More" class="open"></a>
<?php
the_post_thumbnail(array($width,$height), array('class' => 'thumbnail'));
?>
</div>
<?php
} ?>
</div>
<?php
}
else { ?>
<?php $temp_query = $wp_query; ?>
<?php query_posts('category_name=' . get_option('gallery-category') . '&showposts=' . get_option('gallery-items')); ?>
<?php if (have_posts()) : while (have_posts()) : 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
}
/* Grab some variables for below */
$width = get_option('gallery-width');
$height = get_option('gallery-height');
the_post_thumbnail(array($width,$height), array('class' => 'full'));
?>
<a href="<?php the_permalink() ?>" title="Read More" class="open"></a>
<?php
the_post_thumbnail(array($width,$height), array('class' => 'thumbnail'));
?>
</div>
<?php endwhile; else: ?>
<?php endif; ?>
<?php $wp_query = $temp_query; ?>
</div>
<?php
}?>
</div>