-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoptions.php
155 lines (109 loc) · 9.67 KB
/
options.php
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
<div class="wrap">
<h2>SPDM Shortcode Slider Multisite</h2>
<ul class="subsubsub" style="width:100%;clear:both;">
<li><a href="#1">Shortcode & Embed Tags</a>|</li>
<li><a href="#3">Slide Content</a>|</li>
<li><a href="#4">Slider Display</a>|</li>
<li><a href="#5">Custom Image Sizes</a>|</li>
<li><a href="#6">Slider Effects</a>|</li>
<li><a href="#7">Help Finding Id's</a></li>
</ul>
<p>Each instance of the slider can have a unique content and appearance using the shortcode attributes and values outlined below.</p>
<div class="clear"></div>
<form method="post" >
<h3 style="margin-bottom:5px;"><a name="3"></a>Embed tags:</h3>
<p style="margin-bottom:0;">You can embed the slider directly into your template files with this code:</p>
<input style="font-weight:bold;color:#666;" size="100" type="text" name="" value="<?php echo "<?php do_shortcode('[spdm_slider]'); ?>" ?>" />
<h3 style="margin-bottom:5px;">Complex Examples:</h3>
<p style="margin-bottom:0;">Pages, posts and custom post types by custom taxonomy term:</p>
<textarea style="font-weight:bold;color:#666;" cols="100" rows="2" >
<?php
echo "<?php do_shortcode('[spdm_slider max_slides=\"6\" slider_layout=\"buttons\" term_slug=\"slideshow\" tax_slug=\"display\" slider_fx=\"zoom\" ]'); ?> "
?>
</textarea>
<p style="margin-bottom:0;">Posts by tag alternating between zoom and fade effects:</p>
<textarea style="font-weight:bold;color:#666;" cols="100" rows="2" >
<?php
echo "<?php do_shortcode('[spdm_slider slider_layout=\"numbers-top\" post_type=\"post\" tag_id=\"72\" slider_display_slide_excerpt=\"no\" slider_fx=\"fade,zoom\"]'); ?> "
?>
</textarea>
<p style="margin-bottom:0;">Page & Post by their ids:</p>
<textarea style="font-weight:bold;color:#666;" cols="100" rows="2" >
<?php
echo "<?php do_shortcode('[spdm_slider slider_layout=\"thumbnails-bottom\" pageorpost_ids=\"6,12,22,8,9\" hidearrows=\"yes\" ]'); ?> "
?>
</textarea>
<p style="margin-bottom:0;">Posts by their sites ids (for multisite):</p>
<textarea style="font-weight:bold;color:#666;" cols="100" rows="2" >
<?php
echo "<?php do_shortcode('[spdm_slider slider_layout=\"thumbnails-bottom\" post_type=\"post\" sites__in=\"1,5,6\" hidearrows=\"yes\" ]'); ?> "
?>
</textarea>
<p style="margin-bottom:0;">Posts & Pages from all sites except the specify ones (for multisite):</p>
<textarea style="font-weight:bold;color:#666;" cols="100" rows="2" >
<?php
echo "<?php do_shortcode('[spdm_slider slider_layout=\"thumbnails-bottom\" sites__not_in=\"2,4\" hidearrows=\"yes\" ]'); ?> "
?>
</textarea>
<hr />
<h3><a name="3"></a>Attributes for Slide Content:</h3>
<p><strong>cat_id</strong> <em>(no default value)</em> <br /> Use id of category to show slides from that category</p>
<p><strong>tag_id</strong> <em>(no default value)</em><br />Use id of tag to show slides from that tag</p>
<p><strong>term_slug</strong> <em>(no default value)</em><br />Use term slug to show slides from that term.
<strong>important: will only work if you also specify the taxonomy as well.</strong></p>
<p><strong>tax_slug</strong> <em>(no default value)</em><br />Define the parent custom taxonomy slug when you want to show slides from term (above).</p>
<p><strong>author_id</strong> <em>(no default value)</em><br />Use author id to show slides written by that author</p>
<p><strong>pageorpost_ids</strong> <em>(no default value)</em><br />Use page or post ids separated by commas to show slides with those pages and posts.</p>
<p><strong>sites__in</strong> <em>(no default value)</em><br />Use site ids separated by commas to show slides with posts from those sites (for multisite).</p>
<p><strong>sites__not_in</strong> <em>(no default value)</em><br />Use site ids separated by commas to show slides with posts from all sites except those ones (for multisite).</p>
<p><strong>post_type</strong> <em>(default value: "any" other options: page, post, attachment, or custom post type)</em><br />Use post type name to show slides from that post type.</p>
<p><strong>orderby</strong> <em>(default value: "date" other options: none, ID ,author, title, modified, parent, rand, comment_count)<br />Use to control how slides are ordered</em></p>
<p><strong>order</strong> <em>(default value: "DESC" other options: ASC )<br />Use to control in what direction the order goes</em></p>
<p><strong>max_slides</strong> <em>(default value: "5" other options: any other number )<br />Use to control the max amount of slides.</em></p>
<hr />
<h3><a name="4"></a>Attributes for Slider Layout:</h3>
<p><strong>slider_layout</strong> <em>(default value: "plain" other options: thumbnails-side, thumbnails-bottom, numbers-top, numbers-bottom, buttons )</em><br />Use to specify which layout you want to display</em></p>
<p><strong>hide_arrows </strong> <em>(default value: "no" other options: yes )</em> Use to hide prev/next arrows that appear when you hover over slide edges. </em></p>
<p><strong>slider_display_slide_title </strong><em>(default value: "yes" other options: no )</em> Use to display or hide slides title. </em></p>
<p><strong>slider_display_slide_excerpt </strong><em>(default value: "yes" other options: no )</em> Use to display or hide slides title. </em></p>
<p><strong>slider_display_thumb_title </strong><em>(default value: "yes" other options: no )</em> Use to display or hide thumbnails title.</p>
<hr />
<h3><a name="5"></a>Attributes for Custom Image Sizes:</h3>
<p><strong>slide_img_size</strong> <em>(default value: "default-slide-img" other options: large, medium, full, thumbnail or custom size )</em> Use to set slide image size.</p>
<p><strong>thumb_img_size</strong> <em>(default value: "default-thumb-img" other options: large, medium, full, thumbnail or custom size )</em> Use to set thumbnail image size.</p>
<p>The Default slide_img_size is set in the plugin as 600 px wide and 400 high, and thumb_img_size as 50px by 50px. You can replace the Custom thumbnail name with standard wordpress image sizes (large, medium, full, thumbnail) which you can change the sizes in settings> media.</p>
<p>You can also create your own Custom thumbnail sizes by pasting the following code in your functions file. remember to update the image sizes to what you want. Also be careful when working with your themes function file - always have access to via ftp in case something goes wrong. </p>
<textarea style="font-weight:bold;color:#666;" cols="100" rows="9" >
<?php
echo "if (function_exists('add_theme_support')){ \n";
echo " add_theme_support('post-thumbnails'); \n";
echo "} \n";
echo "function add_slider_imgsize(){ \n";
echo " if (function_exists('add_image_size')){ \n";
echo " add_image_size('new-slide-img', 600, 400, true); \n";
echo " add_image_size('new-thumb-img', 50, 50, true); \n";
echo " } \n";
echo "} \n";
echo "add_action('admin_init', 'add_slider_imgsize'); \n";
?>
</textarea>
<p style="color:red;font-weight:bold;"> Also remember that any changes to image sizes will not be applied to your current images, and you will have to Regenerate your existing thumbnails to see changes on your images that were uploaded before you changed the image size.<br /> Use <a href="http://wordpress.org/extend/plugins/regenerate-thumbnails/">Regenerate Thumbnails</a> plugin to do so easily. </p>
<p>This Plugin uses featured post images, for the slide and thumb images. If you do not have featured images set for your posts and pages - <a href="http://wordpress.org/extend/plugins/auto-post-thumbnail/">Auto Post Thumbnail</a> will search for the first image in every post and set it as the featured image. </p>
<hr />
<h3><a name="6"></a>Slider Effects:</h3>
<p><strong>slider_fx</strong> <em>(default value: "fade" other options: blindY, blindZ, cover, curtainX, curtainY, fade, fadeZoom, growX, growY, none, scrollUp, scrollDown, scrollLeft, scrollRight, scrollHorz, scrollVert, shuffle, slideX, slideY, toss, turnUp, turnDown, turnLeft, turnRight, uncover, wipe, zoom
)</em> Use to set slider transition effect. Test out all effects at <a href="http://jquery.malsup.com/cycle/browser.html" >malsup.com</a>.</p>
<p><strong>slider_timeout</strong> <em>(default value: "5000" other options: any integer )</em> Use to set how many milliseconds will elapse between the start of each transition.</p>
<p><strong>slider_effect_speed</strong> <em>(default value: "300" other options: any integer )</em> Use to set the number of milliseconds it will take to transition from one slide to the next.</p>
<hr />
<h3><a name="7"></a>Help Finding ID's:</h3>
<ul>
<li><strong>Category and Tag ID:</strong> find your tag/cat id right after <strong>tag_ID=</strong> in the browser's address bar when editing the Individual Category or Tag</li>
<li><strong>Term slug:</strong> find your term slug in the <strong>slug field</strong> while editing the term.</li>
<li><strong>Term's Taxonomy slug:</strong> find your custom tax slug right after <strong>taxonomy=</strong> in the browser's address bar while editing the term</li>
<li><strong>Post or Page ID:</strong> find your Post/Page id right after <strong>post=</strong> in the browser's address bar when editing the actual Post or Page</li>
<li><strong>Author ID:</strong> find the Author's id right after <strong>user_id=</strong> in browsers address bar when editing the user profile</li>
<li><strong> You can also install a plugin such as <a href="http://wordpress.org/extend/plugins/showid-for-postpagecategorytagcomment/">ShowID</a> that makes finding the id's easier. </strong></li>
</ul>
</form>
</div><!-- end wrap-->