-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoptions.php
More file actions
169 lines (166 loc) · 9.67 KB
/
options.php
File metadata and controls
169 lines (166 loc) · 9.67 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
<?php
$location = $options_page; // Form Action URI
?>
<div class="wrap">
<h2>Optimized Content Gallery Configuration</h2>
<p>Use the options below to select the content for your gallery, to style your gallery, and to configure the gallery slides and transitions.</p>
<form method="post" action="options.php"><?php wp_nonce_field('update-options'); ?>
<fieldset name="general_options" class="options">
<div style="padding-top: 15px"></div>
<u><strong>Optimized Content Gallery Code</strong></u> - If not already included, add this code to your template file where you want the Content Gallery to be displayed:<br />
<blockquote><?php include (ABSPATH . '/wp-content/plugins/optimized-content-gallery/gallery.php'); ?></blockquote>
<div style="padding-top: 10px"></div>
<?php $galleryoldway = (get_option('gallery-way') == 'old' || get_option('gallery-way') == '') ? "checked" : "";
$gallerynewway = get_option('gallery-way') == 'new' ? "checked" : "";
?>
<u><strong>Featured Content Selection</strong></u> - Select either a blog category or individual post/page IDs for your featured content:<br />
<div style="padding-top: 5px"></div>
<table width="690" border="0" cellpadding="0" cellspacing="7">
<tr>
<td width="330">
<input type="radio" name="gallery-way" id="gallery-way" size="25" value="old" <?php print $galleryoldway; ?>>
Select here to use category selection
</td>
<td width="360">
<input type="radio" name="gallery-way" id="gallery-way" size="25" value="new" <?php print $gallerynewway; ?>>
Select here to use individual post or page IDs
</td>
</tr>
<tr>
<td>
Category Name:<br />
<input name="gallery-category" id="gallery-category" size="25" value="<?php echo get_option('gallery-category'); ?>"></input>
</td>
<td>
Post or Page IDs <span class="style1">(comma separated no spaces)</span>:<br />
<input name="gallery-items-pages" id="gallery-items-pages" size="25" value="<?php echo get_option('gallery-items-pages'); ?>"></input>
</td>
</tr>
<tr>
<td>
Number of Items to Display:<br />
<input name="gallery-items" id="gallery-items" size="25" value="<?php echo get_option('gallery-items'); ?>"></input>
</td>
<td>
<?php $checked3 = get_option('gallery-randomize-pages') ? "checked" : ""; ?>
<input type="checkbox" name="gallery-randomize-pages" id="gallery-randomize-pages" <?php print $checked3 ?>>
Check here to randomize post/page ID display
</td>
</tr>
</table>
<div style="padding-top: 10px"></div>
<u><strong>Gallery Style</strong></u> - Choose your gallery size and colors:<br />
<div style="padding-top: 10px"></div>
<table width="690" border="0" cellpadding="0" cellspacing="7">
<tr>
<td width="330">
Gallery Width in Pixels:<br />
<input name="gallery-width" id="gallery-width" size="25" value="<?php echo get_option('gallery-width'); ?>"></input>
</td>
<td width="360">
Gallery Border Color (#hex or color name):<br />
<input name="gallery-border-color" id="gallery-border-color" size="25" value="<?php echo get_option('gallery-border-color'); ?>"></input>
</td>
</tr>
<tr>
<td>
Gallery Height in Pixels:<br />
<input name="gallery-height" id="gallery-height" size="25" value="<?php echo get_option('gallery-height'); ?>"></input>
</td>
<td>
Gallery Background Color (#hex or color name):<br />
<input name="gallery-bg-color" id="gallery-bg-color" size="25" value="<?php echo get_option('gallery-bg-color'); ?>"></input>
</td>
</tr>
<tr>
<td>
Text Overlay Height in Pixels:<br />
<input name="gallery-info" id="gallery-info" size="25" value="<?php echo get_option('gallery-info'); ?>"></input>
</td>
<td>
Gallery Text Color (#hex or color name):<br />
<input name="gallery-text-color" id="gallery-text-color" size="25" value="<?php echo get_option('gallery-text-color'); ?>"></input>
</td>
</tr>
</table>
<div style="padding-top: 10px"></div>
<u><strong>Slide Transition Times and Other Options</strong></u> - Choose your slide and fade duration, carousel button name and text overlay word quantity:<br />
<div style="padding-top: 10px"></div>
<table width="690" border="0" cellpadding="0" cellspacing="10">
<tr>
<td width="330">
Slide Display Duration (milliseconds):<br />
<input name="gallery-delay" id="gallery-delay" size="25" value="<?php echo get_option('gallery-delay'); ?>"></input><br />
(Default: 9000 milliseconds / 9 seconds)
</td>
<td width="360">
Carousel Button Name:<br />
<input name="gallery-fcg-button" id="gallery-fcg-button" size="25" value="<?php echo get_option('gallery-fcg-button'); ?>"></input><br />
(Default: "Featured Content")
</td>
</tr>
<tr>
<td>
Slide Fade Duration (milliseconds):<br />
<input name="gallery-fade-duration" id="gallery-fade-duration" size="25" value="<?php echo get_option('gallery-fade-duration'); ?>"></input><br />
(Default: 500 milliseconds / .5 seconds)
</td>
<td>
Number of Words in Text Overlay:<br />
<input name="gallery-rss-word-quantity" id="gallery-rss-word-quantity" size="25" value="<?php echo get_option('gallery-rss-word-quantity'); ?>"></input><br />
(Default: 100 words)
</td>
</tr>
</table>
<div style="padding-top: 10px"></div>
<u><strong>Slide Transition Type</strong></u> - Choose your slide transition effect:<br />
<div style="padding-top: 10px"></div>
<?php $galleryfade = (get_option('gallery-default-transaction') == 'fade' || get_option('gallery-default-transaction') == '') ? "checked" : "";
$galleryfadeslideleft = get_option('gallery-default-transaction') == 'fadeslideleft' ? "checked" : "";
$gallerycontinuoushorizontal = get_option('gallery-default-transaction') == 'continuoushorizontal' ? "checked" : "";
$gallerycontinuousvertical = get_option('gallery-default-transaction') == 'continuousvertical' ? "checked" : "";
?>
<table width="500" border="0" cellpadding="0" cellspacing="10">
<tr>
<td width="250">
<input type="radio" name="gallery-default-transaction" id="gallery-default-transaction" size="25" value="fade" <?php print $galleryfade; ?>> Simple Fade
</td>
<td width="250">
<input type="radio" name="gallery-default-transaction" id="gallery-default-transaction" size="25" value="fadeslideleft" <?php print $galleryfadeslideleft; ?>> Slide Left with Fade
</td>
</tr>
<tr>
<td>
<input type="radio" name="gallery-default-transaction" id="gallery-default-transaction" size="25" value="continuoushorizontal" <?php print $gallerycontinuoushorizontal; ?>> Continuous Horizontal
</td>
<td>
<input type="radio" name="gallery-default-transaction" id="gallery-default-transaction" size="25" value="continuousvertical" <?php print $gallerycontinuousvertical; ?>> Continuous Vertical
</td>
</tr>
</table>
<div style="padding-top: 10px"></div>
<u><strong>Required Custom Fields</strong></u>
<div style="padding-top: 5px"></div>
For each post or page you want to display in your gallery, regardless of your selections above, you <strong>must</strong> include a custom field. For the main gallery image, use the key <strong>articleimg</strong> and the full url of your image in the value. You <strong>must</strong> have at least two (2) items featured for the gallery to work.
<div style="padding-top: 10px"></div>
<u><strong>Advanced Custom Fields</strong></u>
<div style="padding-top: 5px"></div>
<?php $checked1 = get_option('gallery-use-featured-content') ? "checked" : ""; ?>
<input type="checkbox" name="gallery-use-featured-content" id="gallery-use-featured-content" <?php print $checked1 ?>>
Check here if you want to use custom text under the post/page title.<br />
Key: <strong>featuredtext</strong> - Insert custom text in the value. HTML is allowed.
<div style="padding-top: 10px"></div>
<?php $checked2 = get_option('gallery-use-thumb-image') ? "checked" : ""; ?>
<input type="checkbox" name="gallery-use-thumb-image" id="gallery-use-thumb-image" <?php print $checked2 ?>>
Check here if you want to use a custom thumbnail image in your gallery.<br />
Key: <strong>thumbnailimg</strong> - Insert the url of the image in the value.
<div style="padding-top: 5px"></div>
You can also add alt text to your gallery images with a custom field.<br />
Key: <strong>alttext</strong> - Insert the alt text in the value.
<div style="padding-top: 15px"></div>
<input type="hidden" name="action" value="update" />
<input type="hidden" name="page_options" value="gallery-width,gallery-height,gallery-info,gallery-items,gallery-border-color,gallery-bg-color,gallery-text-color,gallery-use-featured-content,gallery-use-thumb-image,gallery-way,gallery-items-pages,gallery-category,gallery-fcg-button,gallery-fade-duration,gallery-delay,gallery-randomize-pages,gallery-rss-word-quantity,gallery-default-transaction" />
</fieldset>
<p class="submit"><input type="submit" name="Submit" value="<?php _e('Update Options') ?>" /></p>
</form>
</div>