|
74 | 74 | color: black;
|
75 | 75 | text-decoration: none;
|
76 | 76 | }
|
| 77 | + table a { |
| 78 | + color: inherit; |
| 79 | + text-decoration: none; |
| 80 | + font-size: inherit; |
| 81 | + } |
77 | 82 | button[type="submit"] {
|
78 | 83 | font-size: 1.6rem;
|
79 | 84 | font-weight: bold;
|
@@ -132,23 +137,23 @@ function getResolverOption($name, $default = null)
|
132 | 137 | <fieldset class="options">
|
133 | 138 | <h2>Info options</h2>
|
134 | 139 |
|
135 |
| - <label><span>Min image width:</span> <input type="number" name="options[minImageWidth]" value="<?php echo getOption('minImageWidth', 0); ?>"></label> |
136 |
| - <label><span>Min image height:</span> <input type="number" name="options[minImageHeight]" value="<?php echo getOption('minImageHeight', 0); ?>"></label> |
137 |
| - <label><span>Get bigger image</span> <input type="checkbox" name="options[getBiggerImage]" value="1" <?php echo getOption('getBiggerImage') ? 'checked' : ''; ?>></label> |
138 |
| - <label><span>Get bigger icon</span> <input type="checkbox" name="options[getBiggerIcon]" value="1" <?php echo getOption('getBiggerIcon') ? 'checked' : ''; ?>></label> |
139 |
| - <label><span>Facebook access token:</span> <input type="text" name="options[facebookAccessToken]" value="<?php echo getOption('facebookAccessToken'); ?>"></label> |
140 |
| - <label><span>Embedly key:</span> <input type="text" name="options[embedlyKey]" value="<?php echo getOption('embedlyKey'); ?>"></label> |
141 |
| - <label><span>Soundcloud client id:</span> <input type="text" name="options[soundcloudClientId]" value="<?php echo getOption('soundcloudClientId', 'YOUR_CLIENT_ID'); ?>"></label> |
142 |
| - <label><span>Use facebook provider</span> <input type="checkbox" name="options[facebookProvider]" value="1" <?php echo getOption('facebookProvider') ? 'checked' : ''; ?>></label> |
143 |
| - <label><span>oEmbed extra Parameters (in json format):</span> <input type="text" name="options[oembedParameters]" value="<?php echo getOption('oembedParameters'); ?>"></label> |
| 140 | + <label><span>minImageWidth:</span> <input type="number" name="options[minImageWidth]" value="<?php echo getOption('minImageWidth', 0); ?>"></label> |
| 141 | + <label><span>minImageHeight:</span> <input type="number" name="options[minImageHeight]" value="<?php echo getOption('minImageHeight', 0); ?>"></label> |
| 142 | + <label><span>getBiggerImage</span> <input type="checkbox" name="options[getBiggerImage]" value="1" <?php echo getOption('getBiggerImage') ? 'checked' : ''; ?>></label> |
| 143 | + <label><span>getBiggerIcon</span> <input type="checkbox" name="options[getBiggerIcon]" value="1" <?php echo getOption('getBiggerIcon') ? 'checked' : ''; ?>></label> |
| 144 | + <label><span>facebookAccessToken:</span> <input type="text" name="options[facebookAccessToken]" value="<?php echo getOption('facebookAccessToken'); ?>"></label> |
| 145 | + <label><span>embedlyKey:</span> <input type="text" name="options[embedlyKey]" value="<?php echo getOption('embedlyKey'); ?>"></label> |
| 146 | + <label><span>soundcloudClientId:</span> <input type="text" name="options[soundcloudClientId]" value="<?php echo getOption('soundcloudClientId', 'YOUR_CLIENT_ID'); ?>"></label> |
| 147 | + <label><span>facebookProvider</span> <input type="checkbox" name="options[facebookProvider]" value="1" <?php echo getOption('facebookProvider') ? 'checked' : ''; ?>></label> |
| 148 | + <label><span>oembedParameters (in json format):</span> <input type="text" name="options[oembedParameters]" value="<?php echo getOption('oembedParameters'); ?>"></label> |
144 | 149 | </fieldset>
|
145 | 150 | <fieldset class="options">
|
146 | 151 | <h2>Request resolver options:</h2>
|
147 | 152 |
|
148 |
| - <label><span>User agent:</span> <input type="text" name="resolver[user_agent]" value="<?php echo getResolverOption('user_agent', 'Embed PHP Library'); ?>"></label> |
149 |
| - <label><span>Max redirections:</span> <input type="number" name="resolver[max_redirections]" value="<?php echo getResolverOption('max_redirections', 20); ?>"></label> |
150 |
| - <label><span>Connection timeout:</span> <input type="number" name="resolver[connection_timeout]" value="<?php echo getResolverOption('connection_timeout', 10); ?>"></label> |
151 |
| - <label><span>Timeout:</span> <input type="number" name="resolver[timeout]" value="<?php echo getResolverOption('timeout', 10); ?>"></label> |
| 153 | + <label><span>userAgent:</span> <input type="text" name="resolver[userAgent]" value="<?php echo getResolverOption('userAgent', 'Embed PHP Library'); ?>"></label> |
| 154 | + <label><span>maxRedirections:</span> <input type="number" name="resolver[maxRedirections]" value="<?php echo getResolverOption('maxRedirections', 20); ?>"></label> |
| 155 | + <label><span>connectionTimeout:</span> <input type="number" name="resolver[connectionTimeout]" value="<?php echo getResolverOption('connectionTimeout', 10); ?>"></label> |
| 156 | + <label><span>timeout:</span> <input type="number" name="resolver[timeout]" value="<?php echo getResolverOption('timeout', 10); ?>"></label> |
152 | 157 | </fieldset>
|
153 | 158 | <fieldset class="action">
|
154 | 159 | <button type="submit">Test</button>
|
@@ -202,92 +207,97 @@ function getResolverOption($name, $default = null)
|
202 | 207 |
|
203 | 208 | <table class="embed">
|
204 | 209 | <tr>
|
205 |
| - <th>Title</th> |
| 210 | + <th>title</th> |
206 | 211 | <td><?php echo $info->title; ?></td>
|
207 | 212 | </tr>
|
208 | 213 | <tr>
|
209 |
| - <th>Description</th> |
| 214 | + <th>description</th> |
210 | 215 | <td><?php echo $info->description; ?></td>
|
211 | 216 | </tr>
|
212 | 217 | <tr>
|
213 |
| - <th>Image</th> |
| 218 | + <th>image</th> |
214 | 219 | <td>
|
215 | 220 | <?php if ($info->image): ?>
|
216 |
| - <img src="<?php echo $info->image; ?>"> <?php echo $info->image; ?> |
| 221 | + <img src="<?php echo $info->image; ?>"><br> |
| 222 | + <a href="<?php echo $info->image; ?>" target="_blank"><?php echo $info->image; ?></a> |
217 | 223 | <?php endif; ?>
|
218 | 224 | </td>
|
219 | 225 | </tr>
|
220 | 226 | <tr>
|
221 |
| - <th>Image size</th> |
222 |
| - <td><?php echo $info->imageWidth.' x '.$info->imageHeight; ?></td> |
| 227 | + <th>imageWidth</th> |
| 228 | + <td><?php echo $info->imageWidth; ?></td> |
223 | 229 | </tr>
|
224 | 230 | <tr>
|
225 |
| - <th>All images</th> |
| 231 | + <th>imageHeight</th> |
| 232 | + <td><?php echo $info->imageHeight; ?></td> |
| 233 | + </tr> |
| 234 | + <tr> |
| 235 | + <th>images</th> |
226 | 236 | <td><pre><?php print_r($info->images); ?></pre></td>
|
227 | 237 | </tr>
|
228 | 238 | <tr>
|
229 |
| - <th>Embed code</th> |
| 239 | + <th>code</th> |
230 | 240 | <td>
|
231 | 241 | <?php echo $info->code; ?>
|
232 | 242 | <pre><?php echo htmlspecialchars($info->code, ENT_IGNORE); ?></pre>
|
233 | 243 | </td>
|
234 | 244 | </tr>
|
235 | 245 | <tr>
|
236 |
| - <th>Url</th> |
237 |
| - <td><?php echo $info->url; ?></td> |
| 246 | + <th>url</th> |
| 247 | + <td><a href="<?php echo $info->url; ?>" target="_blank"><?php echo $info->url; ?></a></td> |
238 | 248 | </tr>
|
239 | 249 | <tr>
|
240 |
| - <th>Type</th> |
| 250 | + <th>type</th> |
241 | 251 | <td><?php echo $info->type; ?></td>
|
242 | 252 | </tr>
|
243 | 253 | <tr>
|
244 |
| - <th>Source</th> |
| 254 | + <th>source</th> |
245 | 255 | <td><?php
|
246 | 256 | if ($info->source) {
|
247 |
| - echo $info->source; |
248 |
| - echo ' / <a href="test-sources.php?url='.urlencode($info->source).'" target="_blank">Test</a>'; |
| 257 | + echo '<a href="'.$info->source.'" target="_blank">'.$info->source.'</a>'; |
| 258 | + echo ' / <a href="sources.php?url='.urlencode($info->source).'" target="_blank">Test</a>'; |
249 | 259 | }
|
250 | 260 | ?>
|
251 | 261 | </td>
|
252 | 262 | </tr>
|
253 | 263 | <tr>
|
254 |
| - <th>Author name</th> |
| 264 | + <th>authorName</th> |
255 | 265 | <td><?php echo $info->authorName; ?></td>
|
256 | 266 | </tr>
|
257 | 267 | <tr>
|
258 |
| - <th>Author url</th> |
259 |
| - <td><?php echo $info->authorUrl; ?></td> |
| 268 | + <th>authorUrl</th> |
| 269 | + <td><a href="<?php echo $info->authorUrl; ?>" target="_blank"><?php echo $info->authorUrl; ?></a> |
260 | 270 | </tr>
|
261 | 271 | <tr>
|
262 |
| - <th>Provider icon</th> |
| 272 | + <th>providerIcon</th> |
263 | 273 | <td><img src="<?php echo $info->providerIcon; ?>"> <?php echo $info->providerIcon; ?></td>
|
264 | 274 | </tr>
|
265 | 275 | <tr>
|
266 |
| - <th>All icons</th> |
| 276 | + <th>providerIcons</th> |
267 | 277 | <td><pre><?php print_r($info->providerIcons); ?></pre></td>
|
268 | 278 | </tr>
|
269 | 279 | <tr>
|
270 |
| - <th>Provider name</th> |
| 280 | + <th>providerName</th> |
271 | 281 | <td><?php echo $info->providerName; ?></td>
|
272 | 282 | </tr>
|
273 | 283 | <tr>
|
274 |
| - <th>Provider url</th> |
275 |
| - <td><?php echo $info->providerUrl; ?></td> |
| 284 | + <th>providerUrl</th> |
| 285 | + <td><a href="<?php echo $info->providerUrl; ?>" target="_blank"><?php echo $info->providerUrl; ?></a> |
276 | 286 | </tr>
|
277 | 287 | <tr>
|
278 |
| - <th>Width</th> |
| 288 | + <th>width</th> |
279 | 289 | <td><?php echo $info->width; ?></td>
|
280 | 290 | </tr>
|
281 | 291 | <tr>
|
282 |
| - <th>Height</th> |
| 292 | + <th>height</th> |
283 | 293 | <td><?php echo $info->height; ?></td>
|
284 | 294 | </tr>
|
285 | 295 | <tr>
|
286 |
| - <th>Aspect ratio</th> |
| 296 | + <th>aspectRatio</th> |
287 | 297 | <td><?php echo $info->aspectRatio; ?></td>
|
288 | 298 | </tr>
|
289 | 299 | <tr>
|
290 |
| - <th>Http request result</th> |
| 300 | + <th>Http request info</th> |
291 | 301 | <td>
|
292 | 302 | <ul>
|
293 | 303 | <?php
|
|
0 commit comments