Version Description
Download this release
Release Info
Developer | marynixie |
Plugin | Related Posts Thumbnails Plugin for WordPress |
Version | 1.2.1 |
Comparing to | |
See all releases |
Code changes from version 1.2 to 1.2.1
- locale/related-posts-thumbnails-fr_FR.mo +0 -0
- locale/related-posts-thumbnails-fr_FR.po +228 -0
- locale/related-posts-thumbnails-ru_RU.mo +0 -0
- locale/related-posts-thumbnails-ru_RU.po +52 -11
- readme.txt +1 -1
- related-posts-thumbnails.php +61 -11
- screenshot-1.png +0 -0
- screenshot-2.png +0 -0
locale/related-posts-thumbnails-fr_FR.mo
ADDED
Binary file
|
locale/related-posts-thumbnails-fr_FR.po
ADDED
@@ -0,0 +1,228 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: Related Posts Thumbnails v1.2\n"
|
4 |
+
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: \n"
|
6 |
+
"PO-Revision-Date: 2010-06-11 20:50+0000\n"
|
7 |
+
"Last-Translator: lian <lian00@gmail.com>\n"
|
8 |
+
"Language-Team: \n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
13 |
+
"X-Poedit-Language: French\n"
|
14 |
+
"X-Poedit-Country: FRANCE\n"
|
15 |
+
"X-Poedit-SourceCharset: utf-8\n"
|
16 |
+
"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;\n"
|
17 |
+
"X-Poedit-Basepath: ../\n"
|
18 |
+
"X-Poedit-Bookmarks: \n"
|
19 |
+
"X-Poedit-SearchPath-0: .\n"
|
20 |
+
"X-Textdomain-Support: yes"
|
21 |
+
|
22 |
+
#: related-posts-thumbnails.php:232
|
23 |
+
#@ related-posts-thumbnails
|
24 |
+
msgid "Related Posts Thumbnails"
|
25 |
+
msgstr ""
|
26 |
+
|
27 |
+
#: related-posts-thumbnails.php:232
|
28 |
+
#@ related-posts-thumbnails
|
29 |
+
msgid "Related Posts Thumbs"
|
30 |
+
msgstr ""
|
31 |
+
|
32 |
+
#: related-posts-thumbnails.php:238
|
33 |
+
#@ related-posts-thumbnails
|
34 |
+
msgid "No access"
|
35 |
+
msgstr "Accès refusé"
|
36 |
+
|
37 |
+
#: related-posts-thumbnails.php:263
|
38 |
+
#@ related-posts-thumbnails
|
39 |
+
msgid "Settings updated"
|
40 |
+
msgstr "Réglages mis à jour"
|
41 |
+
|
42 |
+
#: related-posts-thumbnails.php:283
|
43 |
+
#@ related-posts-thumbnails
|
44 |
+
msgid "Related Posts Thumbnails Settings"
|
45 |
+
msgstr "Réglages de Related Posts Thumbnails"
|
46 |
+
|
47 |
+
#: related-posts-thumbnails.php:289
|
48 |
+
#@ related-posts-thumbnails
|
49 |
+
msgid "General Display Options"
|
50 |
+
msgstr "Options d'affichage général"
|
51 |
+
|
52 |
+
#: related-posts-thumbnails.php:292
|
53 |
+
#@ related-posts-thumbnails
|
54 |
+
msgid "Automatically append to the post content"
|
55 |
+
msgstr "Rajouter automatiquement au contenu du billet"
|
56 |
+
|
57 |
+
#: related-posts-thumbnails.php:295
|
58 |
+
#@ related-posts-thumbnails
|
59 |
+
msgid "Or use <b><?php get_related_posts_thumbnails(); ?></b> in the Loop"
|
60 |
+
msgstr "Ou utiliser <b><?php get_related_posts_thumbnails(); ?></b> à l'intérieur de la boucle."
|
61 |
+
|
62 |
+
#: related-posts-thumbnails.php:299
|
63 |
+
#@ related-posts-thumbnails
|
64 |
+
msgid "Page type"
|
65 |
+
msgstr "Type de page"
|
66 |
+
|
67 |
+
#: related-posts-thumbnails.php:302
|
68 |
+
#@ related-posts-thumbnails
|
69 |
+
msgid "Show on single posts only"
|
70 |
+
msgstr "Afficher seulement dans les billets uniques"
|
71 |
+
|
72 |
+
#: related-posts-thumbnails.php:306
|
73 |
+
#: related-posts-thumbnails.php:478
|
74 |
+
#@ related-posts-thumbnails
|
75 |
+
msgid "Categories"
|
76 |
+
msgstr "Catégories"
|
77 |
+
|
78 |
+
#: related-posts-thumbnails.php:321
|
79 |
+
#@ related-posts-thumbnails
|
80 |
+
msgid "All"
|
81 |
+
msgstr "Toutes "
|
82 |
+
|
83 |
+
#: related-posts-thumbnails.php:331
|
84 |
+
#@ related-posts-thumbnails
|
85 |
+
msgid "Top text"
|
86 |
+
msgstr "Texte de présentation"
|
87 |
+
|
88 |
+
#: related-posts-thumbnails.php:337
|
89 |
+
#@ related-posts-thumbnails
|
90 |
+
msgid "Number of similar posts to display"
|
91 |
+
msgstr "Nombre de billets similaires à afficher"
|
92 |
+
|
93 |
+
#: related-posts-thumbnails.php:343
|
94 |
+
#@ related-posts-thumbnails
|
95 |
+
msgid "Default image URL"
|
96 |
+
msgstr "Adresse URL de l'image par défaut"
|
97 |
+
|
98 |
+
#: related-posts-thumbnails.php:349
|
99 |
+
#: related-posts-thumbnails.php:375
|
100 |
+
#: related-posts-thumbnails.php:393
|
101 |
+
#@ related-posts-thumbnails
|
102 |
+
msgid "Thumbnails source"
|
103 |
+
msgstr "Source des miniatures"
|
104 |
+
|
105 |
+
#: related-posts-thumbnails.php:378
|
106 |
+
#@ related-posts-thumbnails
|
107 |
+
msgid "Post-thumbnails name"
|
108 |
+
msgstr "Nom des miniatures des billets"
|
109 |
+
|
110 |
+
#: related-posts-thumbnails.php:386
|
111 |
+
#@ related-posts-thumbnails
|
112 |
+
msgid "Your theme has to support post-thumbnails to have more choices"
|
113 |
+
msgstr "Votre thème doit être compatible avec les miniatures de billets pour avoir plus de choix"
|
114 |
+
|
115 |
+
#: related-posts-thumbnails.php:396
|
116 |
+
#@ related-posts-thumbnails
|
117 |
+
msgid "Custom field name"
|
118 |
+
msgstr "Nom du champ personnalisé"
|
119 |
+
|
120 |
+
#: related-posts-thumbnails.php:402
|
121 |
+
#@ related-posts-thumbnails
|
122 |
+
msgid "Size"
|
123 |
+
msgstr "Taille"
|
124 |
+
|
125 |
+
#: related-posts-thumbnails.php:404
|
126 |
+
#@ related-posts-thumbnails
|
127 |
+
msgid "Width"
|
128 |
+
msgstr "Largeur"
|
129 |
+
|
130 |
+
#: related-posts-thumbnails.php:405
|
131 |
+
#@ related-posts-thumbnails
|
132 |
+
msgid "Height"
|
133 |
+
msgstr "Hauteur"
|
134 |
+
|
135 |
+
#: related-posts-thumbnails.php:411
|
136 |
+
#@ related-posts-thumbnails
|
137 |
+
msgid "Style options"
|
138 |
+
msgstr "Options de style"
|
139 |
+
|
140 |
+
#: related-posts-thumbnails.php:414
|
141 |
+
#@ related-posts-thumbnails
|
142 |
+
msgid "Background color"
|
143 |
+
msgstr "Couleur de fond"
|
144 |
+
|
145 |
+
#: related-posts-thumbnails.php:420
|
146 |
+
#@ related-posts-thumbnails
|
147 |
+
msgid "Background color on mouse over"
|
148 |
+
msgstr "Couleur de fond au passage de la souris"
|
149 |
+
|
150 |
+
#: related-posts-thumbnails.php:426
|
151 |
+
#@ related-posts-thumbnails
|
152 |
+
msgid "Border color"
|
153 |
+
msgstr "Couleur du cadre"
|
154 |
+
|
155 |
+
#: related-posts-thumbnails.php:432
|
156 |
+
#@ related-posts-thumbnails
|
157 |
+
msgid "Font color"
|
158 |
+
msgstr "Couleur de la police de caractères"
|
159 |
+
|
160 |
+
#: related-posts-thumbnails.php:438
|
161 |
+
#@ related-posts-thumbnails
|
162 |
+
msgid "Font family"
|
163 |
+
msgstr "Police de caractères"
|
164 |
+
|
165 |
+
#: related-posts-thumbnails.php:444
|
166 |
+
#@ related-posts-thumbnails
|
167 |
+
msgid "Font size"
|
168 |
+
msgstr "Taille de la police de caractères"
|
169 |
+
|
170 |
+
#: related-posts-thumbnails.php:450
|
171 |
+
#@ related-posts-thumbnails
|
172 |
+
msgid "Text maximum length"
|
173 |
+
msgstr "Taille maximum du texte"
|
174 |
+
|
175 |
+
#: related-posts-thumbnails.php:453
|
176 |
+
#@ related-posts-thumbnails
|
177 |
+
msgid "Set 0 for no title"
|
178 |
+
msgstr "Mettre 0 pour ne pas avoir de titre"
|
179 |
+
|
180 |
+
#: related-posts-thumbnails.php:457
|
181 |
+
#@ related-posts-thumbnails
|
182 |
+
msgid "Excerpt maximum length"
|
183 |
+
msgstr "Taille maximum de l'extrait"
|
184 |
+
|
185 |
+
#: related-posts-thumbnails.php:460
|
186 |
+
#@ related-posts-thumbnails
|
187 |
+
msgid "Set 0 for no excerpt"
|
188 |
+
msgstr "Mettre 0 pour ne pas avoir d'extrait"
|
189 |
+
|
190 |
+
#: related-posts-thumbnails.php:464
|
191 |
+
#@ related-posts-thumbnails
|
192 |
+
msgid "Text block height"
|
193 |
+
msgstr "Hauteur du bloc de texte"
|
194 |
+
|
195 |
+
#: related-posts-thumbnails.php:472
|
196 |
+
#@ related-posts-thumbnails
|
197 |
+
msgid "Relation Builder Options"
|
198 |
+
msgstr "Options du gestionnaire de liens"
|
199 |
+
|
200 |
+
#: related-posts-thumbnails.php:475
|
201 |
+
#@ related-posts-thumbnails
|
202 |
+
msgid "Relation based on"
|
203 |
+
msgstr "Liens basés sur "
|
204 |
+
|
205 |
+
#: related-posts-thumbnails.php:480
|
206 |
+
#@ related-posts-thumbnails
|
207 |
+
msgid "Tags"
|
208 |
+
msgstr ""
|
209 |
+
|
210 |
+
#: related-posts-thumbnails.php:482
|
211 |
+
#@ related-posts-thumbnails
|
212 |
+
msgid "Categories and Tags"
|
213 |
+
msgstr "Catégories et tags"
|
214 |
+
|
215 |
+
#: related-posts-thumbnails.php:487
|
216 |
+
#@ related-posts-thumbnails
|
217 |
+
msgid "Save Changes"
|
218 |
+
msgstr "Sauvegarder les modifications "
|
219 |
+
|
220 |
+
#: related-posts-thumbnails.php:491
|
221 |
+
#@ related-posts-thumbnails
|
222 |
+
msgid "If you experience some problems with this plugin please let me know about it on <a href=\"http://wordpress.shaldybina.com/plugins/related-posts-thumbnails/\">Plugin's homepage</a>. If you think this plugin is awesome please vote on <a href=\"http://wordpress.org/extend/plugins/related-posts-thumbnails/\">Wordpress plugin page</a>. Thanks!"
|
223 |
+
msgstr "Si vous rencontrez des problèmes avec ce plugin, faites le moi savoir à <a href=\"http://wordpress.shaldybina.com/plugins/related-posts-thumbnails/\">la page du plugin</a>. Si vous trouvez ce plugin formidable, n'hésitez pas à aller voter sur <a href=\"http://wordpress.org/extend/plugins/related-posts-thumbnails/\">la page Wordpress du plugin</a>. Merci d'avance !"
|
224 |
+
|
225 |
+
#: related-posts-thumbnails.php:538
|
226 |
+
msgid "Title:"
|
227 |
+
msgstr ""
|
228 |
+
|
locale/related-posts-thumbnails-ru_RU.mo
CHANGED
Binary file
|
locale/related-posts-thumbnails-ru_RU.po
CHANGED
@@ -7,7 +7,7 @@ msgstr ""
|
|
7 |
"Project-Id-Version: Related Posts Thubmnails 1.0\n"
|
8 |
"Report-Msgid-Bugs-To: \n"
|
9 |
"POT-Creation-Date: 2010-05-19 17:17-0700\n"
|
10 |
-
"PO-Revision-Date: 2010-06-
|
11 |
"Last-Translator: M.Shaldybina <mary@shaldybina.com>\n"
|
12 |
"Language-Team: ru_RU <mary@shaldybina.com>\n"
|
13 |
"Language: ru_RU\n"
|
@@ -21,31 +21,37 @@ msgstr ""
|
|
21 |
|
22 |
#: related-posts-thumbnails.php:148 related-posts-thumbnails.php:194
|
23 |
#: related-posts-thumbnails.php:231 related-posts-thumbnails.php:232
|
|
|
24 |
msgid "Related Posts Thumbnails"
|
25 |
msgstr "Миниатюры похожих записей"
|
26 |
|
27 |
#: related-posts-thumbnails.php:148 related-posts-thumbnails.php:194
|
28 |
#: related-posts-thumbnails.php:231 related-posts-thumbnails.php:232
|
|
|
29 |
msgid "Related Posts Thumbs"
|
30 |
msgstr "Похожие записи"
|
31 |
|
32 |
#: related-posts-thumbnails.php:154 related-posts-thumbnails.php:200
|
33 |
#: related-posts-thumbnails.php:237 related-posts-thumbnails.php:238
|
|
|
34 |
msgid "No access"
|
35 |
msgstr "Нет доступа"
|
36 |
|
37 |
#: related-posts-thumbnails.php:170 related-posts-thumbnails.php:222
|
38 |
#: related-posts-thumbnails.php:261 related-posts-thumbnails.php:263
|
|
|
39 |
msgid "Settings updated"
|
40 |
msgstr "Настройки обновлены"
|
41 |
|
42 |
#: related-posts-thumbnails.php:182 related-posts-thumbnails.php:239
|
43 |
#: related-posts-thumbnails.php:281 related-posts-thumbnails.php:283
|
|
|
44 |
msgid "Related Posts Thumbnails Settings"
|
45 |
msgstr "Настройки миниатюр похожих записей"
|
46 |
|
47 |
#: related-posts-thumbnails.php:188 related-posts-thumbnails.php:245
|
48 |
#: related-posts-thumbnails.php:287 related-posts-thumbnails.php:289
|
|
|
49 |
msgid "General Display Options"
|
50 |
msgstr "Общие свойства отображения"
|
51 |
|
@@ -55,83 +61,99 @@ msgstr "Параметр отображения"
|
|
55 |
|
56 |
#: related-posts-thumbnails.php:194 related-posts-thumbnails.php:251
|
57 |
#: related-posts-thumbnails.php:300 related-posts-thumbnails.php:302
|
|
|
58 |
msgid "Show on single posts only"
|
59 |
msgstr "Показывать только на отдельной странице"
|
60 |
|
61 |
#: related-posts-thumbnails.php:198 related-posts-thumbnails.php:280
|
62 |
#: related-posts-thumbnails.php:329 related-posts-thumbnails.php:331
|
|
|
63 |
msgid "Top text"
|
64 |
msgstr "Верхний текст"
|
65 |
|
66 |
#: related-posts-thumbnails.php:204 related-posts-thumbnails.php:286
|
67 |
#: related-posts-thumbnails.php:335 related-posts-thumbnails.php:337
|
|
|
68 |
msgid "Number of similar posts to display"
|
69 |
msgstr "Количество похожих записей для отображения"
|
70 |
|
71 |
#: related-posts-thumbnails.php:212 related-posts-thumbnails.php:360
|
72 |
#: related-posts-thumbnails.php:409 related-posts-thumbnails.php:411
|
|
|
73 |
msgid "Style options"
|
74 |
msgstr "Опции стиля"
|
75 |
|
76 |
#: related-posts-thumbnails.php:215 related-posts-thumbnails.php:363
|
77 |
#: related-posts-thumbnails.php:412 related-posts-thumbnails.php:414
|
|
|
78 |
msgid "Background color"
|
79 |
msgstr "Цвет заднего фона"
|
80 |
|
81 |
#: related-posts-thumbnails.php:221 related-posts-thumbnails.php:369
|
82 |
#: related-posts-thumbnails.php:418 related-posts-thumbnails.php:420
|
|
|
83 |
msgid "Background color on mouse over"
|
84 |
msgstr "Цвет заднего фона при наведении курсора"
|
85 |
|
86 |
#: related-posts-thumbnails.php:227 related-posts-thumbnails.php:375
|
87 |
#: related-posts-thumbnails.php:424 related-posts-thumbnails.php:426
|
|
|
88 |
msgid "Border color"
|
89 |
msgstr "Цвет границы"
|
90 |
|
91 |
#: related-posts-thumbnails.php:233 related-posts-thumbnails.php:381
|
92 |
#: related-posts-thumbnails.php:430 related-posts-thumbnails.php:432
|
|
|
93 |
msgid "Font color"
|
94 |
msgstr "Цвет шрифта"
|
95 |
|
96 |
#: related-posts-thumbnails.php:239 related-posts-thumbnails.php:387
|
97 |
#: related-posts-thumbnails.php:436 related-posts-thumbnails.php:438
|
|
|
98 |
msgid "Font family"
|
99 |
msgstr "Стиль шрифта"
|
100 |
|
101 |
#: related-posts-thumbnails.php:245 related-posts-thumbnails.php:393
|
102 |
#: related-posts-thumbnails.php:442 related-posts-thumbnails.php:444
|
|
|
103 |
msgid "Font size"
|
104 |
msgstr "Размер шрифта"
|
105 |
|
106 |
#: related-posts-thumbnails.php:251 related-posts-thumbnails.php:399
|
107 |
#: related-posts-thumbnails.php:448 related-posts-thumbnails.php:450
|
|
|
108 |
msgid "Text maximum length"
|
109 |
msgstr "Максимальная длина текста"
|
110 |
|
111 |
#: related-posts-thumbnails.php:259 related-posts-thumbnails.php:407
|
112 |
#: related-posts-thumbnails.php:464 related-posts-thumbnails.php:472
|
|
|
113 |
msgid "Relation Builder Options"
|
114 |
msgstr "Настройки связей"
|
115 |
|
116 |
#: related-posts-thumbnails.php:262 related-posts-thumbnails.php:410
|
117 |
#: related-posts-thumbnails.php:467 related-posts-thumbnails.php:475
|
|
|
118 |
msgid "Relation based on"
|
119 |
msgstr "Связи расчитываются на основе"
|
120 |
|
121 |
#: related-posts-thumbnails.php:265 related-posts-thumbnails.php:255
|
122 |
#: related-posts-thumbnails.php:413 related-posts-thumbnails.php:304
|
123 |
#: related-posts-thumbnails.php:470 related-posts-thumbnails.php:306
|
124 |
-
#: related-posts-thumbnails.php:478
|
|
|
125 |
msgid "Categories"
|
126 |
msgstr "Категории"
|
127 |
|
128 |
#: related-posts-thumbnails.php:267 related-posts-thumbnails.php:415
|
129 |
#: related-posts-thumbnails.php:472 related-posts-thumbnails.php:480
|
|
|
130 |
msgid "Tags"
|
131 |
msgstr "Метки"
|
132 |
|
133 |
#: related-posts-thumbnails.php:269 related-posts-thumbnails.php:417
|
134 |
#: related-posts-thumbnails.php:474 related-posts-thumbnails.php:482
|
|
|
135 |
msgid "Categories and Tags"
|
136 |
msgstr "Категории и метки"
|
137 |
|
@@ -141,11 +163,13 @@ msgstr "Настройки миниатюр"
|
|
141 |
|
142 |
#: related-posts-thumbnails.php:278 related-posts-thumbnails.php:327
|
143 |
#: related-posts-thumbnails.php:376 related-posts-thumbnails.php:378
|
|
|
144 |
msgid "Post-thumbnails name"
|
145 |
msgstr "Название миниатюры"
|
146 |
|
147 |
#: related-posts-thumbnails.php:286 related-posts-thumbnails.php:335
|
148 |
#: related-posts-thumbnails.php:384 related-posts-thumbnails.php:386
|
|
|
149 |
msgid "Your theme has to support post-thumbnails to have more choices"
|
150 |
msgstr ""
|
151 |
"Для более широкого выбора размеров, ваша тема должна поддерживать post-"
|
@@ -153,21 +177,23 @@ msgstr ""
|
|
153 |
|
154 |
#: related-posts-thumbnails.php:291 related-posts-thumbnails.php:292
|
155 |
#: related-posts-thumbnails.php:341 related-posts-thumbnails.php:343
|
|
|
156 |
msgid "Default image URL"
|
157 |
msgstr "Ссылка на картинку по умолчанию, в случае, если нет миниатюры"
|
158 |
|
159 |
#: related-posts-thumbnails.php:299 related-posts-thumbnails.php:422
|
160 |
#: related-posts-thumbnails.php:479 related-posts-thumbnails.php:487
|
|
|
161 |
msgid "Save Changes"
|
162 |
msgstr "Сохранить изменения"
|
163 |
|
164 |
#: related-posts-thumbnails.php:248 related-posts-thumbnails.php:297
|
165 |
-
#: related-posts-thumbnails.php:299
|
166 |
msgid "Page type"
|
167 |
msgstr "Тип страницы"
|
168 |
|
169 |
#: related-posts-thumbnails.php:270 related-posts-thumbnails.php:319
|
170 |
-
#: related-posts-thumbnails.php:321
|
171 |
msgid "All"
|
172 |
msgstr "Все"
|
173 |
|
@@ -175,32 +201,33 @@ msgstr "Все"
|
|
175 |
#: related-posts-thumbnails.php:342 related-posts-thumbnails.php:347
|
176 |
#: related-posts-thumbnails.php:373 related-posts-thumbnails.php:391
|
177 |
#: related-posts-thumbnails.php:349 related-posts-thumbnails.php:375
|
178 |
-
#: related-posts-thumbnails.php:393
|
|
|
179 |
msgid "Thumbnails source"
|
180 |
msgstr "Источник миниатюр"
|
181 |
|
182 |
#: related-posts-thumbnails.php:345 related-posts-thumbnails.php:394
|
183 |
-
#: related-posts-thumbnails.php:396
|
184 |
msgid "Custom field name"
|
185 |
msgstr "Название произвольного поля"
|
186 |
|
187 |
#: related-posts-thumbnails.php:351 related-posts-thumbnails.php:400
|
188 |
-
#: related-posts-thumbnails.php:402
|
189 |
msgid "Size"
|
190 |
msgstr "Размер"
|
191 |
|
192 |
#: related-posts-thumbnails.php:353 related-posts-thumbnails.php:402
|
193 |
-
#: related-posts-thumbnails.php:404
|
194 |
msgid "Width"
|
195 |
msgstr "Ширина"
|
196 |
|
197 |
#: related-posts-thumbnails.php:354 related-posts-thumbnails.php:403
|
198 |
-
#: related-posts-thumbnails.php:405
|
199 |
msgid "Height"
|
200 |
msgstr "Высота"
|
201 |
|
202 |
#: related-posts-thumbnails.php:426 related-posts-thumbnails.php:483
|
203 |
-
#: related-posts-thumbnails.php:491
|
204 |
msgid ""
|
205 |
"If you experience some problems with this plugin please let me know about it "
|
206 |
"on <a href=\"http://wordpress.shaldybina.com/plugins/related-posts-"
|
@@ -214,10 +241,12 @@ msgstr ""
|
|
214 |
"related-posts-thumbnails/\">проголосуйте</a>. Спасибо!"
|
215 |
|
216 |
#: related-posts-thumbnails.php:290 related-posts-thumbnails.php:292
|
|
|
217 |
msgid "Automatically append to the post content"
|
218 |
msgstr ""
|
219 |
|
220 |
#: related-posts-thumbnails.php:293 related-posts-thumbnails.php:295
|
|
|
221 |
msgid ""
|
222 |
"Or use <b><?php get_related_posts_thumbnails(); ?></b> in the Loop"
|
223 |
msgstr ""
|
@@ -225,21 +254,33 @@ msgstr ""
|
|
225 |
"темы"
|
226 |
|
227 |
#: related-posts-thumbnails.php:451 related-posts-thumbnails.php:453
|
|
|
228 |
msgid "Set 0 for no title"
|
229 |
msgstr "Поставьте 0, чтобы не отображать заголовок"
|
230 |
|
231 |
#: related-posts-thumbnails.php:455 related-posts-thumbnails.php:457
|
|
|
232 |
msgid "Excerpt maximum length"
|
233 |
msgstr "Максимальная длина цитаты"
|
234 |
|
235 |
#: related-posts-thumbnails.php:458 related-posts-thumbnails.php:460
|
|
|
236 |
msgid "Set 0 for no excerpt"
|
237 |
msgstr "Поставьте 0, чтобы не отображать цитату"
|
238 |
|
239 |
#: related-posts-thumbnails.php:530 related-posts-thumbnails.php:538
|
|
|
240 |
msgid "Title:"
|
241 |
msgstr "Заголовок:"
|
242 |
|
243 |
-
#: related-posts-thumbnails.php:464
|
244 |
msgid "Text block height"
|
245 |
msgstr "Высота текстового блока"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
"Project-Id-Version: Related Posts Thubmnails 1.0\n"
|
8 |
"Report-Msgid-Bugs-To: \n"
|
9 |
"POT-Creation-Date: 2010-05-19 17:17-0700\n"
|
10 |
+
"PO-Revision-Date: 2010-06-16 12:09-0700\n"
|
11 |
"Last-Translator: M.Shaldybina <mary@shaldybina.com>\n"
|
12 |
"Language-Team: ru_RU <mary@shaldybina.com>\n"
|
13 |
"Language: ru_RU\n"
|
21 |
|
22 |
#: related-posts-thumbnails.php:148 related-posts-thumbnails.php:194
|
23 |
#: related-posts-thumbnails.php:231 related-posts-thumbnails.php:232
|
24 |
+
#: related-posts-thumbnails.php:273
|
25 |
msgid "Related Posts Thumbnails"
|
26 |
msgstr "Миниатюры похожих записей"
|
27 |
|
28 |
#: related-posts-thumbnails.php:148 related-posts-thumbnails.php:194
|
29 |
#: related-posts-thumbnails.php:231 related-posts-thumbnails.php:232
|
30 |
+
#: related-posts-thumbnails.php:273
|
31 |
msgid "Related Posts Thumbs"
|
32 |
msgstr "Похожие записи"
|
33 |
|
34 |
#: related-posts-thumbnails.php:154 related-posts-thumbnails.php:200
|
35 |
#: related-posts-thumbnails.php:237 related-posts-thumbnails.php:238
|
36 |
+
#: related-posts-thumbnails.php:279
|
37 |
msgid "No access"
|
38 |
msgstr "Нет доступа"
|
39 |
|
40 |
#: related-posts-thumbnails.php:170 related-posts-thumbnails.php:222
|
41 |
#: related-posts-thumbnails.php:261 related-posts-thumbnails.php:263
|
42 |
+
#: related-posts-thumbnails.php:305
|
43 |
msgid "Settings updated"
|
44 |
msgstr "Настройки обновлены"
|
45 |
|
46 |
#: related-posts-thumbnails.php:182 related-posts-thumbnails.php:239
|
47 |
#: related-posts-thumbnails.php:281 related-posts-thumbnails.php:283
|
48 |
+
#: related-posts-thumbnails.php:326
|
49 |
msgid "Related Posts Thumbnails Settings"
|
50 |
msgstr "Настройки миниатюр похожих записей"
|
51 |
|
52 |
#: related-posts-thumbnails.php:188 related-posts-thumbnails.php:245
|
53 |
#: related-posts-thumbnails.php:287 related-posts-thumbnails.php:289
|
54 |
+
#: related-posts-thumbnails.php:332
|
55 |
msgid "General Display Options"
|
56 |
msgstr "Общие свойства отображения"
|
57 |
|
61 |
|
62 |
#: related-posts-thumbnails.php:194 related-posts-thumbnails.php:251
|
63 |
#: related-posts-thumbnails.php:300 related-posts-thumbnails.php:302
|
64 |
+
#: related-posts-thumbnails.php:352
|
65 |
msgid "Show on single posts only"
|
66 |
msgstr "Показывать только на отдельной странице"
|
67 |
|
68 |
#: related-posts-thumbnails.php:198 related-posts-thumbnails.php:280
|
69 |
#: related-posts-thumbnails.php:329 related-posts-thumbnails.php:331
|
70 |
+
#: related-posts-thumbnails.php:381
|
71 |
msgid "Top text"
|
72 |
msgstr "Верхний текст"
|
73 |
|
74 |
#: related-posts-thumbnails.php:204 related-posts-thumbnails.php:286
|
75 |
#: related-posts-thumbnails.php:335 related-posts-thumbnails.php:337
|
76 |
+
#: related-posts-thumbnails.php:387
|
77 |
msgid "Number of similar posts to display"
|
78 |
msgstr "Количество похожих записей для отображения"
|
79 |
|
80 |
#: related-posts-thumbnails.php:212 related-posts-thumbnails.php:360
|
81 |
#: related-posts-thumbnails.php:409 related-posts-thumbnails.php:411
|
82 |
+
#: related-posts-thumbnails.php:461
|
83 |
msgid "Style options"
|
84 |
msgstr "Опции стиля"
|
85 |
|
86 |
#: related-posts-thumbnails.php:215 related-posts-thumbnails.php:363
|
87 |
#: related-posts-thumbnails.php:412 related-posts-thumbnails.php:414
|
88 |
+
#: related-posts-thumbnails.php:464
|
89 |
msgid "Background color"
|
90 |
msgstr "Цвет заднего фона"
|
91 |
|
92 |
#: related-posts-thumbnails.php:221 related-posts-thumbnails.php:369
|
93 |
#: related-posts-thumbnails.php:418 related-posts-thumbnails.php:420
|
94 |
+
#: related-posts-thumbnails.php:470
|
95 |
msgid "Background color on mouse over"
|
96 |
msgstr "Цвет заднего фона при наведении курсора"
|
97 |
|
98 |
#: related-posts-thumbnails.php:227 related-posts-thumbnails.php:375
|
99 |
#: related-posts-thumbnails.php:424 related-posts-thumbnails.php:426
|
100 |
+
#: related-posts-thumbnails.php:476
|
101 |
msgid "Border color"
|
102 |
msgstr "Цвет границы"
|
103 |
|
104 |
#: related-posts-thumbnails.php:233 related-posts-thumbnails.php:381
|
105 |
#: related-posts-thumbnails.php:430 related-posts-thumbnails.php:432
|
106 |
+
#: related-posts-thumbnails.php:482
|
107 |
msgid "Font color"
|
108 |
msgstr "Цвет шрифта"
|
109 |
|
110 |
#: related-posts-thumbnails.php:239 related-posts-thumbnails.php:387
|
111 |
#: related-posts-thumbnails.php:436 related-posts-thumbnails.php:438
|
112 |
+
#: related-posts-thumbnails.php:488
|
113 |
msgid "Font family"
|
114 |
msgstr "Стиль шрифта"
|
115 |
|
116 |
#: related-posts-thumbnails.php:245 related-posts-thumbnails.php:393
|
117 |
#: related-posts-thumbnails.php:442 related-posts-thumbnails.php:444
|
118 |
+
#: related-posts-thumbnails.php:494
|
119 |
msgid "Font size"
|
120 |
msgstr "Размер шрифта"
|
121 |
|
122 |
#: related-posts-thumbnails.php:251 related-posts-thumbnails.php:399
|
123 |
#: related-posts-thumbnails.php:448 related-posts-thumbnails.php:450
|
124 |
+
#: related-posts-thumbnails.php:500
|
125 |
msgid "Text maximum length"
|
126 |
msgstr "Максимальная длина текста"
|
127 |
|
128 |
#: related-posts-thumbnails.php:259 related-posts-thumbnails.php:407
|
129 |
#: related-posts-thumbnails.php:464 related-posts-thumbnails.php:472
|
130 |
+
#: related-posts-thumbnails.php:522
|
131 |
msgid "Relation Builder Options"
|
132 |
msgstr "Настройки связей"
|
133 |
|
134 |
#: related-posts-thumbnails.php:262 related-posts-thumbnails.php:410
|
135 |
#: related-posts-thumbnails.php:467 related-posts-thumbnails.php:475
|
136 |
+
#: related-posts-thumbnails.php:525
|
137 |
msgid "Relation based on"
|
138 |
msgstr "Связи расчитываются на основе"
|
139 |
|
140 |
#: related-posts-thumbnails.php:265 related-posts-thumbnails.php:255
|
141 |
#: related-posts-thumbnails.php:413 related-posts-thumbnails.php:304
|
142 |
#: related-posts-thumbnails.php:470 related-posts-thumbnails.php:306
|
143 |
+
#: related-posts-thumbnails.php:478 related-posts-thumbnails.php:356
|
144 |
+
#: related-posts-thumbnails.php:528
|
145 |
msgid "Categories"
|
146 |
msgstr "Категории"
|
147 |
|
148 |
#: related-posts-thumbnails.php:267 related-posts-thumbnails.php:415
|
149 |
#: related-posts-thumbnails.php:472 related-posts-thumbnails.php:480
|
150 |
+
#: related-posts-thumbnails.php:530
|
151 |
msgid "Tags"
|
152 |
msgstr "Метки"
|
153 |
|
154 |
#: related-posts-thumbnails.php:269 related-posts-thumbnails.php:417
|
155 |
#: related-posts-thumbnails.php:474 related-posts-thumbnails.php:482
|
156 |
+
#: related-posts-thumbnails.php:532
|
157 |
msgid "Categories and Tags"
|
158 |
msgstr "Категории и метки"
|
159 |
|
163 |
|
164 |
#: related-posts-thumbnails.php:278 related-posts-thumbnails.php:327
|
165 |
#: related-posts-thumbnails.php:376 related-posts-thumbnails.php:378
|
166 |
+
#: related-posts-thumbnails.php:428
|
167 |
msgid "Post-thumbnails name"
|
168 |
msgstr "Название миниатюры"
|
169 |
|
170 |
#: related-posts-thumbnails.php:286 related-posts-thumbnails.php:335
|
171 |
#: related-posts-thumbnails.php:384 related-posts-thumbnails.php:386
|
172 |
+
#: related-posts-thumbnails.php:436
|
173 |
msgid "Your theme has to support post-thumbnails to have more choices"
|
174 |
msgstr ""
|
175 |
"Для более широкого выбора размеров, ваша тема должна поддерживать post-"
|
177 |
|
178 |
#: related-posts-thumbnails.php:291 related-posts-thumbnails.php:292
|
179 |
#: related-posts-thumbnails.php:341 related-posts-thumbnails.php:343
|
180 |
+
#: related-posts-thumbnails.php:393
|
181 |
msgid "Default image URL"
|
182 |
msgstr "Ссылка на картинку по умолчанию, в случае, если нет миниатюры"
|
183 |
|
184 |
#: related-posts-thumbnails.php:299 related-posts-thumbnails.php:422
|
185 |
#: related-posts-thumbnails.php:479 related-posts-thumbnails.php:487
|
186 |
+
#: related-posts-thumbnails.php:537
|
187 |
msgid "Save Changes"
|
188 |
msgstr "Сохранить изменения"
|
189 |
|
190 |
#: related-posts-thumbnails.php:248 related-posts-thumbnails.php:297
|
191 |
+
#: related-posts-thumbnails.php:299 related-posts-thumbnails.php:349
|
192 |
msgid "Page type"
|
193 |
msgstr "Тип страницы"
|
194 |
|
195 |
#: related-posts-thumbnails.php:270 related-posts-thumbnails.php:319
|
196 |
+
#: related-posts-thumbnails.php:321 related-posts-thumbnails.php:371
|
197 |
msgid "All"
|
198 |
msgstr "Все"
|
199 |
|
201 |
#: related-posts-thumbnails.php:342 related-posts-thumbnails.php:347
|
202 |
#: related-posts-thumbnails.php:373 related-posts-thumbnails.php:391
|
203 |
#: related-posts-thumbnails.php:349 related-posts-thumbnails.php:375
|
204 |
+
#: related-posts-thumbnails.php:393 related-posts-thumbnails.php:399
|
205 |
+
#: related-posts-thumbnails.php:425 related-posts-thumbnails.php:443
|
206 |
msgid "Thumbnails source"
|
207 |
msgstr "Источник миниатюр"
|
208 |
|
209 |
#: related-posts-thumbnails.php:345 related-posts-thumbnails.php:394
|
210 |
+
#: related-posts-thumbnails.php:396 related-posts-thumbnails.php:446
|
211 |
msgid "Custom field name"
|
212 |
msgstr "Название произвольного поля"
|
213 |
|
214 |
#: related-posts-thumbnails.php:351 related-posts-thumbnails.php:400
|
215 |
+
#: related-posts-thumbnails.php:402 related-posts-thumbnails.php:452
|
216 |
msgid "Size"
|
217 |
msgstr "Размер"
|
218 |
|
219 |
#: related-posts-thumbnails.php:353 related-posts-thumbnails.php:402
|
220 |
+
#: related-posts-thumbnails.php:404 related-posts-thumbnails.php:454
|
221 |
msgid "Width"
|
222 |
msgstr "Ширина"
|
223 |
|
224 |
#: related-posts-thumbnails.php:354 related-posts-thumbnails.php:403
|
225 |
+
#: related-posts-thumbnails.php:405 related-posts-thumbnails.php:455
|
226 |
msgid "Height"
|
227 |
msgstr "Высота"
|
228 |
|
229 |
#: related-posts-thumbnails.php:426 related-posts-thumbnails.php:483
|
230 |
+
#: related-posts-thumbnails.php:491 related-posts-thumbnails.php:541
|
231 |
msgid ""
|
232 |
"If you experience some problems with this plugin please let me know about it "
|
233 |
"on <a href=\"http://wordpress.shaldybina.com/plugins/related-posts-"
|
241 |
"related-posts-thumbnails/\">проголосуйте</a>. Спасибо!"
|
242 |
|
243 |
#: related-posts-thumbnails.php:290 related-posts-thumbnails.php:292
|
244 |
+
#: related-posts-thumbnails.php:335
|
245 |
msgid "Automatically append to the post content"
|
246 |
msgstr ""
|
247 |
|
248 |
#: related-posts-thumbnails.php:293 related-posts-thumbnails.php:295
|
249 |
+
#: related-posts-thumbnails.php:338
|
250 |
msgid ""
|
251 |
"Or use <b><?php get_related_posts_thumbnails(); ?></b> in the Loop"
|
252 |
msgstr ""
|
254 |
"темы"
|
255 |
|
256 |
#: related-posts-thumbnails.php:451 related-posts-thumbnails.php:453
|
257 |
+
#: related-posts-thumbnails.php:503
|
258 |
msgid "Set 0 for no title"
|
259 |
msgstr "Поставьте 0, чтобы не отображать заголовок"
|
260 |
|
261 |
#: related-posts-thumbnails.php:455 related-posts-thumbnails.php:457
|
262 |
+
#: related-posts-thumbnails.php:507
|
263 |
msgid "Excerpt maximum length"
|
264 |
msgstr "Максимальная длина цитаты"
|
265 |
|
266 |
#: related-posts-thumbnails.php:458 related-posts-thumbnails.php:460
|
267 |
+
#: related-posts-thumbnails.php:510
|
268 |
msgid "Set 0 for no excerpt"
|
269 |
msgstr "Поставьте 0, чтобы не отображать цитату"
|
270 |
|
271 |
#: related-posts-thumbnails.php:530 related-posts-thumbnails.php:538
|
272 |
+
#: related-posts-thumbnails.php:588
|
273 |
msgid "Title:"
|
274 |
msgstr "Заголовок:"
|
275 |
|
276 |
+
#: related-posts-thumbnails.php:464 related-posts-thumbnails.php:514
|
277 |
msgid "Text block height"
|
278 |
msgstr "Высота текстового блока"
|
279 |
+
|
280 |
+
#: related-posts-thumbnails.php:342
|
281 |
+
msgid "Developer mode"
|
282 |
+
msgstr "Режим разработчика"
|
283 |
+
|
284 |
+
#: related-posts-thumbnails.php:345
|
285 |
+
msgid "This will add debugging information in HTML source"
|
286 |
+
msgstr "Это добавит отладочную информацию в HTML код"
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: http://wordpress.shaldybina.com/donate
|
|
4 |
Tags: related, posts, thumbnail
|
5 |
Requires at least: 2.9
|
6 |
Tested up to: 2.9.2
|
7 |
-
Stable tag: 1.2
|
8 |
|
9 |
Customizable plugin, that nicely displays related posts thumbnails under the post.
|
10 |
|
4 |
Tags: related, posts, thumbnail
|
5 |
Requires at least: 2.9
|
6 |
Tested up to: 2.9.2
|
7 |
+
Stable tag: 1.2.1
|
8 |
|
9 |
Customizable plugin, that nicely displays related posts thumbnails under the post.
|
10 |
|
related-posts-thumbnails.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
Plugin Name: Related Posts Thumbnails
|
3 |
Plugin URI: http://wordpress.shaldybina.com/plugins/related-posts-thumbnails/
|
4 |
Description: Showing related posts thumbnails under the post.
|
5 |
-
Version: 1.2
|
6 |
Author: Maria Shaldybina
|
7 |
Author URI: http://shaldybina.com/
|
8 |
*/
|
@@ -42,6 +42,7 @@ class RelatedPostsThumbnails {
|
|
42 |
public $text_block_height = '75';
|
43 |
public $thsource = 'post-thumbnails';
|
44 |
public $categories_all = '1';
|
|
|
45 |
|
46 |
function RelatedPostsThumbnails() { // initialization
|
47 |
load_plugin_textdomain( 'related-posts-thumbnails', false, basename( dirname( __FILE__ ) ) . '/locale' );
|
@@ -66,6 +67,8 @@ class RelatedPostsThumbnails {
|
|
66 |
$id = get_the_ID();
|
67 |
$relation = get_option( 'relpoststh_relation', $this->relation );
|
68 |
$posts_number = get_option( 'relpoststh_number', $this->number );
|
|
|
|
|
69 |
if ( $posts_number <= 0 ) { // return nothing if this parameter was set to <= 0
|
70 |
return '';
|
71 |
}
|
@@ -83,6 +86,7 @@ class RelatedPostsThumbnails {
|
|
83 |
|
84 |
/* Getting posts by relation */
|
85 |
if ( $relation == 'categories' || $relation == 'both' ) {
|
|
|
86 |
$query_args = array( 'category__in' => wp_get_object_terms( $id, array( 'category' ), array( 'fields' => 'ids' ) ) );
|
87 |
if ( $categories_all != '1') { // if only specific categories were selected
|
88 |
$relpoststh_categories = unserialize( get_option( 'relpoststh_categories' ) );
|
@@ -98,16 +102,19 @@ class RelatedPostsThumbnails {
|
|
98 |
}
|
99 |
|
100 |
if ( $relation == 'tags' || $relation == 'both' ) {
|
|
|
101 |
$query_args = array( 'tag__in' => wp_get_object_terms( $id, array( 'post_tag' ), array( 'fields' => 'ids' ) ) );
|
102 |
$query_args = ( is_array( $query_args ) ) ? array_merge( $args, $query_args ) : $args;
|
103 |
$posts = array_merge( $posts, $q->query( $query_args ) );
|
104 |
}
|
105 |
-
|
106 |
-
if ( ! ( is_array( $posts ) && count( $posts ) > 0 ) )
|
107 |
return '';
|
108 |
-
|
|
|
109 |
|
110 |
if ( $relation == 'both' ) {
|
|
|
111 |
foreach ( $posts as $post ) {
|
112 |
$posts_unique[ $post->ID ] = $post;
|
113 |
}
|
@@ -117,20 +124,25 @@ class RelatedPostsThumbnails {
|
|
117 |
|
118 |
/* Calculating sizes */
|
119 |
if ( $thsource == 'custom-field' ) {
|
|
|
120 |
$width = get_option( 'relpoststh_customwidth', $this->custom_width );
|
121 |
$height = get_option( 'relpoststh_customheight', $this->custom_height );
|
122 |
}
|
123 |
else { // post-thumbnails source
|
124 |
if ( $poststhname == 'thumbnail' || $poststhname == 'medium' || $poststhname == 'large' ) { // get thumbnail size for basic sizes
|
|
|
125 |
$width = get_option( "{$poststhname}_size_w" );
|
126 |
$height = get_option( "{$poststhname}_size_h" );
|
127 |
}
|
128 |
elseif ( current_theme_supports( 'post-thumbnails' ) ) { // get sizes for theme supported thumbnails
|
129 |
global $_wp_additional_image_sizes;
|
130 |
if ( isset( $_wp_additional_image_sizes[ $poststhname ] ) ) {
|
|
|
131 |
$width = $_wp_additional_image_sizes[ $poststhname ][ 'width' ];
|
132 |
$height = $_wp_additional_image_sizes[ $poststhname ][ 'height' ];
|
133 |
}
|
|
|
|
|
134 |
}
|
135 |
}
|
136 |
// displaying square if one size is not cropping
|
@@ -139,54 +151,79 @@ class RelatedPostsThumbnails {
|
|
139 |
if ( $width == 9999 )
|
140 |
$width = $height;
|
141 |
// theme is not supporting but settings were not changed
|
142 |
-
if ( empty( $width ) )
|
|
|
143 |
$width = get_option( "thumbnail_size_w" );
|
144 |
-
|
|
|
|
|
145 |
$height = get_option( "thumbnail_size_h" );
|
|
|
146 |
|
|
|
147 |
// rendering related posts HTML
|
148 |
$output = '<div style="clear: both"></div><div style="border: 0pt none ; margin: 0pt; padding: 0pt;">';
|
149 |
foreach( $posts as $post ) {
|
150 |
$image = '';
|
151 |
$url = '';
|
152 |
if ( $thsource == 'custom-field' ) {
|
|
|
153 |
$url = get_post_meta( $post->ID, get_option( 'relpoststh_customfield', $this->custom_field ), true );
|
154 |
}
|
155 |
else {
|
156 |
-
|
|
|
157 |
$post_thumbnail_id = get_post_thumbnail_id( $post->ID );
|
158 |
-
|
|
|
|
|
159 |
$image = wp_get_attachment_image_src( $post_thumbnail_id, $poststhname );
|
160 |
$url = $image[0];
|
|
|
161 |
}
|
|
|
|
|
162 |
}
|
163 |
-
|
|
|
164 |
$wud = wp_upload_dir();
|
165 |
preg_match_all( '|<img.*?src=[\'"](' . $wud['baseurl'] . '.*?)[\'"].*?>|i', $post->post_content, $matches ); // searching for the first uploaded image in text
|
166 |
if ( isset( $matches ) ) $image = $matches[1][0];
|
|
|
|
|
167 |
if ( strlen( trim( $image ) ) > 0 ) {
|
168 |
$image_sizes = @getimagesize( $image );
|
169 |
if ( isset( $image_sizes[0] ) && $image_sizes[0] == $width ) { // if this image is the same size as we need
|
|
|
170 |
$url = $image;
|
171 |
}
|
172 |
else { // if not, search for resized thumbnail according to Wordpress thumbnails naming function
|
|
|
173 |
$url = preg_replace( '/(-[0-9]+x[0-9]+)?(\.[^\.]*)$/', '-' . $width . 'x' . $height . '$2', $image );
|
174 |
}
|
175 |
}
|
|
|
|
|
176 |
}
|
177 |
}
|
|
|
|
|
178 |
if ( empty( $url ) || false === @fopen( $url, 'r' ) ) { // using default image if no image was found or no such file on server
|
|
|
179 |
$url = get_option( 'relpoststh_default_image', $this->default_image );
|
180 |
}
|
181 |
|
182 |
$title = $this->process_text_cut( $post->post_title, $text_length );
|
183 |
-
$
|
|
|
184 |
|
185 |
if ( !empty($title) && !empty($excerpt) ) {
|
186 |
$title = '<b>' . $title . '</b>';
|
187 |
$excerpt = '<br/>' . $excerpt;
|
188 |
}
|
189 |
|
|
|
|
|
190 |
$output .= '<a onmouseout="this.style.backgroundColor=\'' . get_option( 'relpoststh_background', $this->background ) . '\'" onmouseover="this.style.backgroundColor=\'' . get_option( 'relpoststh_hoverbackground', $this->hoverbackground ) . '\'" style="border-right: 1px solid ' . get_option( 'relpoststh_bordercolor', $this->border_color ) . '; border-bottom: medium none; margin: 0pt; padding: 6px; display: block; float: left; text-decoration: none; text-align: left; cursor: pointer;" href="' . get_permalink( $post->ID ) . '">';
|
191 |
$output .= '<div style="border: 0pt none ; margin: 0pt; padding: 0pt; width: ' . $width . 'px; height: ' . ( $height + get_option( 'relpoststh_textblockheight', $this->text_block_height ) ) . 'px;">';
|
192 |
$output .= '<div style="border: 0pt none ; margin: 0pt; padding: 0pt; background: transparent url(' . $url . ') no-repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous; width: ' . $width . 'px; height: ' . $height . 'px;"></div>';
|
@@ -196,14 +233,18 @@ class RelatedPostsThumbnails {
|
|
196 |
|
197 |
} // end foreach
|
198 |
$output .= '</div><div style="clear: both"></div>';
|
|
|
|
|
199 |
return $output;
|
200 |
}
|
201 |
|
202 |
function process_text_cut( $text, $length ) {
|
203 |
if ($length == 0)
|
204 |
return '';
|
205 |
-
else
|
|
|
206 |
return ( ( strlen( $text ) > $length ) ? substr( $text, 0, $length) . '...' : $text );
|
|
|
207 |
}
|
208 |
|
209 |
function is_relpoststh_show() { // Checking display options
|
@@ -260,6 +301,7 @@ class RelatedPostsThumbnails {
|
|
260 |
update_option( 'relpoststh_textblockheight', $_POST['relpoststh_textblockheight'] );
|
261 |
update_option( 'relpoststh_categoriesall', $_POST['relpoststh_categoriesall'] );
|
262 |
update_option( 'relpoststh_categories', serialize( $_POST['relpoststh_categories'] ) );
|
|
|
263 |
echo "<div class='updated fade'><p>" . __( 'Settings updated', 'related-posts-thumbnails' ) ."</p></div>";
|
264 |
}
|
265 |
$available_sizes = array( 'thumbnail' => 'thumbnail', 'medium' => 'medium' );
|
@@ -273,6 +315,7 @@ class RelatedPostsThumbnails {
|
|
273 |
$relpoststh_auto = get_option( 'relpoststh_auto', $this->auto );
|
274 |
$relpoststh_relation = get_option( 'relpoststh_relation', $this->relation );
|
275 |
$relpoststh_thsource = get_option( 'relpoststh_thsource', $this->thsource );
|
|
|
276 |
$relpoststh_categoriesall = get_option( 'relpoststh_categoriesall', $this->categories_all );
|
277 |
$relpoststh_categories = unserialize( get_option( 'relpoststh_categories' ) );
|
278 |
$thsources = array( 'post-thumbnails' => 'Post thumbnails', 'custom-field' => 'Custom field' );
|
@@ -295,6 +338,13 @@ class RelatedPostsThumbnails {
|
|
295 |
<label for="relpoststh_auto"><?php _e( 'Or use <b><?php get_related_posts_thumbnails(); ?></b> in the Loop', 'related-posts-thumbnails' ); ?></label><br />
|
296 |
</td>
|
297 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
298 |
<tr valign="top">
|
299 |
<th scope="row"><?php _e( 'Page type', 'related-posts-thumbnails' ); ?>:</th>
|
300 |
<td>
|
2 |
Plugin Name: Related Posts Thumbnails
|
3 |
Plugin URI: http://wordpress.shaldybina.com/plugins/related-posts-thumbnails/
|
4 |
Description: Showing related posts thumbnails under the post.
|
5 |
+
Version: 1.2.1
|
6 |
Author: Maria Shaldybina
|
7 |
Author URI: http://shaldybina.com/
|
8 |
*/
|
42 |
public $text_block_height = '75';
|
43 |
public $thsource = 'post-thumbnails';
|
44 |
public $categories_all = '1';
|
45 |
+
public $devmode = '0';
|
46 |
|
47 |
function RelatedPostsThumbnails() { // initialization
|
48 |
load_plugin_textdomain( 'related-posts-thumbnails', false, basename( dirname( __FILE__ ) ) . '/locale' );
|
67 |
$id = get_the_ID();
|
68 |
$relation = get_option( 'relpoststh_relation', $this->relation );
|
69 |
$posts_number = get_option( 'relpoststh_number', $this->number );
|
70 |
+
$devmode = get_option( 'relpoststh_devmode', $this->devmode );
|
71 |
+
$debug = 'Developer mode initialisation;';
|
72 |
if ( $posts_number <= 0 ) { // return nothing if this parameter was set to <= 0
|
73 |
return '';
|
74 |
}
|
86 |
|
87 |
/* Getting posts by relation */
|
88 |
if ( $relation == 'categories' || $relation == 'both' ) {
|
89 |
+
$debug .= 'Getting by categories;';
|
90 |
$query_args = array( 'category__in' => wp_get_object_terms( $id, array( 'category' ), array( 'fields' => 'ids' ) ) );
|
91 |
if ( $categories_all != '1') { // if only specific categories were selected
|
92 |
$relpoststh_categories = unserialize( get_option( 'relpoststh_categories' ) );
|
102 |
}
|
103 |
|
104 |
if ( $relation == 'tags' || $relation == 'both' ) {
|
105 |
+
$debug .= 'Getting by tags;';
|
106 |
$query_args = array( 'tag__in' => wp_get_object_terms( $id, array( 'post_tag' ), array( 'fields' => 'ids' ) ) );
|
107 |
$query_args = ( is_array( $query_args ) ) ? array_merge( $args, $query_args ) : $args;
|
108 |
$posts = array_merge( $posts, $q->query( $query_args ) );
|
109 |
}
|
110 |
+
|
111 |
+
if ( ! ( is_array( $posts ) && count( $posts ) > 0 ) ) // no posts
|
112 |
return '';
|
113 |
+
else
|
114 |
+
$debug .= 'Found ' . count( $posts ) . ' posts;';
|
115 |
|
116 |
if ( $relation == 'both' ) {
|
117 |
+
$debug .= 'Shuffling for both;';
|
118 |
foreach ( $posts as $post ) {
|
119 |
$posts_unique[ $post->ID ] = $post;
|
120 |
}
|
124 |
|
125 |
/* Calculating sizes */
|
126 |
if ( $thsource == 'custom-field' ) {
|
127 |
+
$debug .= 'Custom sizes;';
|
128 |
$width = get_option( 'relpoststh_customwidth', $this->custom_width );
|
129 |
$height = get_option( 'relpoststh_customheight', $this->custom_height );
|
130 |
}
|
131 |
else { // post-thumbnails source
|
132 |
if ( $poststhname == 'thumbnail' || $poststhname == 'medium' || $poststhname == 'large' ) { // get thumbnail size for basic sizes
|
133 |
+
$debug .= 'Basic sizes;';
|
134 |
$width = get_option( "{$poststhname}_size_w" );
|
135 |
$height = get_option( "{$poststhname}_size_h" );
|
136 |
}
|
137 |
elseif ( current_theme_supports( 'post-thumbnails' ) ) { // get sizes for theme supported thumbnails
|
138 |
global $_wp_additional_image_sizes;
|
139 |
if ( isset( $_wp_additional_image_sizes[ $poststhname ] ) ) {
|
140 |
+
$debug .= 'Additional sizes;';
|
141 |
$width = $_wp_additional_image_sizes[ $poststhname ][ 'width' ];
|
142 |
$height = $_wp_additional_image_sizes[ $poststhname ][ 'height' ];
|
143 |
}
|
144 |
+
else
|
145 |
+
$debug .= 'No additional sizes;';
|
146 |
}
|
147 |
}
|
148 |
// displaying square if one size is not cropping
|
151 |
if ( $width == 9999 )
|
152 |
$width = $height;
|
153 |
// theme is not supporting but settings were not changed
|
154 |
+
if ( empty( $width ) ) {
|
155 |
+
$debug .= 'Using default width;';
|
156 |
$width = get_option( "thumbnail_size_w" );
|
157 |
+
}
|
158 |
+
if ( empty( $height ) ) {
|
159 |
+
$debug .= 'Using default height;';
|
160 |
$height = get_option( "thumbnail_size_h" );
|
161 |
+
}
|
162 |
|
163 |
+
$debug .= 'Got sizes '.$width.'x'.$height.';';
|
164 |
// rendering related posts HTML
|
165 |
$output = '<div style="clear: both"></div><div style="border: 0pt none ; margin: 0pt; padding: 0pt;">';
|
166 |
foreach( $posts as $post ) {
|
167 |
$image = '';
|
168 |
$url = '';
|
169 |
if ( $thsource == 'custom-field' ) {
|
170 |
+
$debug .= 'Using custom field;';
|
171 |
$url = get_post_meta( $post->ID, get_option( 'relpoststh_customfield', $this->custom_field ), true );
|
172 |
}
|
173 |
else {
|
174 |
+
$from_post_body = true;
|
175 |
+
if ( current_theme_supports( 'post-thumbnails' ) ) { // using built in Wordpress feature
|
176 |
$post_thumbnail_id = get_post_thumbnail_id( $post->ID );
|
177 |
+
$debug .= 'Post-thumbnails enabled in theme;';
|
178 |
+
if ( $post_thumbnail_id !== false ) { // post has thumbnail
|
179 |
+
$debug .= 'Post has thumbnail;';
|
180 |
$image = wp_get_attachment_image_src( $post_thumbnail_id, $poststhname );
|
181 |
$url = $image[0];
|
182 |
+
$from_post_body = false;
|
183 |
}
|
184 |
+
else
|
185 |
+
$debug .= 'Post has no thumbnail;';
|
186 |
}
|
187 |
+
if ( $from_post_body ) { // Theme does not support post-thumbnails, or post does not have assigned thumbnail
|
188 |
+
$debug .= 'Getting image from post body;';
|
189 |
$wud = wp_upload_dir();
|
190 |
preg_match_all( '|<img.*?src=[\'"](' . $wud['baseurl'] . '.*?)[\'"].*?>|i', $post->post_content, $matches ); // searching for the first uploaded image in text
|
191 |
if ( isset( $matches ) ) $image = $matches[1][0];
|
192 |
+
else
|
193 |
+
$debug .= 'No image was found;';
|
194 |
if ( strlen( trim( $image ) ) > 0 ) {
|
195 |
$image_sizes = @getimagesize( $image );
|
196 |
if ( isset( $image_sizes[0] ) && $image_sizes[0] == $width ) { // if this image is the same size as we need
|
197 |
+
$debug .= 'Image used is the required size;';
|
198 |
$url = $image;
|
199 |
}
|
200 |
else { // if not, search for resized thumbnail according to Wordpress thumbnails naming function
|
201 |
+
$debug .= 'Changing image according to Wordpress standards;';
|
202 |
$url = preg_replace( '/(-[0-9]+x[0-9]+)?(\.[^\.]*)$/', '-' . $width . 'x' . $height . '$2', $image );
|
203 |
}
|
204 |
}
|
205 |
+
else
|
206 |
+
$debug .= 'Found wrong formatted image;';
|
207 |
}
|
208 |
}
|
209 |
+
|
210 |
+
$debug .= 'Image URL: '.$url.';';
|
211 |
if ( empty( $url ) || false === @fopen( $url, 'r' ) ) { // using default image if no image was found or no such file on server
|
212 |
+
$debug .= 'No image or no file. Using default image;';
|
213 |
$url = get_option( 'relpoststh_default_image', $this->default_image );
|
214 |
}
|
215 |
|
216 |
$title = $this->process_text_cut( $post->post_title, $text_length );
|
217 |
+
$post_excerpt = ( empty( $post->post_excerpt ) ) ? $post->post_content : $post->post_excerpt;
|
218 |
+
$excerpt = $this->process_text_cut( $post_excerpt, $excerpt_length );
|
219 |
|
220 |
if ( !empty($title) && !empty($excerpt) ) {
|
221 |
$title = '<b>' . $title . '</b>';
|
222 |
$excerpt = '<br/>' . $excerpt;
|
223 |
}
|
224 |
|
225 |
+
$debug .= 'Using title with size ' . $text_length . '. Using excerpt with size ' . $excerpt_length . ';';
|
226 |
+
|
227 |
$output .= '<a onmouseout="this.style.backgroundColor=\'' . get_option( 'relpoststh_background', $this->background ) . '\'" onmouseover="this.style.backgroundColor=\'' . get_option( 'relpoststh_hoverbackground', $this->hoverbackground ) . '\'" style="border-right: 1px solid ' . get_option( 'relpoststh_bordercolor', $this->border_color ) . '; border-bottom: medium none; margin: 0pt; padding: 6px; display: block; float: left; text-decoration: none; text-align: left; cursor: pointer;" href="' . get_permalink( $post->ID ) . '">';
|
228 |
$output .= '<div style="border: 0pt none ; margin: 0pt; padding: 0pt; width: ' . $width . 'px; height: ' . ( $height + get_option( 'relpoststh_textblockheight', $this->text_block_height ) ) . 'px;">';
|
229 |
$output .= '<div style="border: 0pt none ; margin: 0pt; padding: 0pt; background: transparent url(' . $url . ') no-repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous; width: ' . $width . 'px; height: ' . $height . 'px;"></div>';
|
233 |
|
234 |
} // end foreach
|
235 |
$output .= '</div><div style="clear: both"></div>';
|
236 |
+
if ( $devmode )
|
237 |
+
$output .= '<!-- '.$debug.' -->';
|
238 |
return $output;
|
239 |
}
|
240 |
|
241 |
function process_text_cut( $text, $length ) {
|
242 |
if ($length == 0)
|
243 |
return '';
|
244 |
+
else {
|
245 |
+
$text = strip_shortcodes( strip_tags( $text ) );
|
246 |
return ( ( strlen( $text ) > $length ) ? substr( $text, 0, $length) . '...' : $text );
|
247 |
+
}
|
248 |
}
|
249 |
|
250 |
function is_relpoststh_show() { // Checking display options
|
301 |
update_option( 'relpoststh_textblockheight', $_POST['relpoststh_textblockheight'] );
|
302 |
update_option( 'relpoststh_categoriesall', $_POST['relpoststh_categoriesall'] );
|
303 |
update_option( 'relpoststh_categories', serialize( $_POST['relpoststh_categories'] ) );
|
304 |
+
update_option( 'relpoststh_devmode', $_POST['relpoststh_devmode'] );
|
305 |
echo "<div class='updated fade'><p>" . __( 'Settings updated', 'related-posts-thumbnails' ) ."</p></div>";
|
306 |
}
|
307 |
$available_sizes = array( 'thumbnail' => 'thumbnail', 'medium' => 'medium' );
|
315 |
$relpoststh_auto = get_option( 'relpoststh_auto', $this->auto );
|
316 |
$relpoststh_relation = get_option( 'relpoststh_relation', $this->relation );
|
317 |
$relpoststh_thsource = get_option( 'relpoststh_thsource', $this->thsource );
|
318 |
+
$relpoststh_devmode = get_option( 'relpoststh_devmode', $this->devmode );
|
319 |
$relpoststh_categoriesall = get_option( 'relpoststh_categoriesall', $this->categories_all );
|
320 |
$relpoststh_categories = unserialize( get_option( 'relpoststh_categories' ) );
|
321 |
$thsources = array( 'post-thumbnails' => 'Post thumbnails', 'custom-field' => 'Custom field' );
|
338 |
<label for="relpoststh_auto"><?php _e( 'Or use <b><?php get_related_posts_thumbnails(); ?></b> in the Loop', 'related-posts-thumbnails' ); ?></label><br />
|
339 |
</td>
|
340 |
</tr>
|
341 |
+
<tr valign="top">
|
342 |
+
<th scope="row"><?php _e( 'Developer mode', 'related-posts-thumbnails' ); ?>:</th>
|
343 |
+
<td>
|
344 |
+
<input type="checkbox" name="relpoststh_devmode" id="relpoststh_devmode" value="1" <?php if ( $relpoststh_devmode ) echo 'checked="checked"'; ?>/>
|
345 |
+
<label for="relpoststh_devmode"><?php _e( 'This will add debugging information in HTML source', 'related-posts-thumbnails' ); ?></label><br />
|
346 |
+
</td>
|
347 |
+
</tr>
|
348 |
<tr valign="top">
|
349 |
<th scope="row"><?php _e( 'Page type', 'related-posts-thumbnails' ); ?>:</th>
|
350 |
<td>
|
screenshot-1.png
CHANGED
Binary file
|
screenshot-2.png
CHANGED
Binary file
|