Additional Info |
---|
Type
|
Package ID
anteprimorac:apimage
|
First Created
March 31, 2012, 07:23:24 PM
|
Last Updated
September 11, 2012, 06:14:49 AM
|
QuoteThis Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
If a copy of the MPL was not distributed with this file,
You can obtain one at http://mozilla.org/MPL/2.0/.
.apimage {
background: #000;
margin: 5px;
padding: 10px;
}
.apimage-gallery .images {
margin-top: 10px;
overflow: auto;
}
.apimage-gallery .images .list {
width: auto;
white-space: nowrap;
}
.apimage-gallery .images .apimage {
display: inline-block;
margin: 0 5px;
}
.apimage-gallery .images {
margin-top: 5px;
overflow: none;
}
.apimage-gallery .images .apimage {
float: left;
margin: 5px 5px;
}
<tr class="windowbg2">
<td align="center"><img height="' . $context['gallery_pic']['height'] . '" width="' . $context['gallery_pic']['width'] . '" src="' . $modSettings['gallery_url'] . $context['gallery_pic']['filename'] . '" alt="" /></td>
</tr>
<tr class="windowbg2">
<td align="center"><div class="apimage loading" data-image="' . $modSettings['gallery_url'] . $context['gallery_pic']['filename'] . '"></div></td>
</tr>
echo $context['html_headers'];
if(!empty($modSettings['apimage_enabled']) && function_exists($context['get_message'])) {
$context['get_message'](true);
global $messages_request;
$context['messages_request'] = $messages_request;
while($post = $context['get_message']()) {
$apimages = array();
preg_match_all("/(?<=\<div class\=\"apimage loading\" data\-image\=\")[^\">]*(?=\")/", $post["body"], $apimages);
for($nj=0; $nj < count($apimages[0]); $nj++) {
echo '<meta property="og:image" content="' . $apimages[0][$nj] . '" />';
}
}
$context['get_message'](true);
$messages_request = $context['messages_request'];
}
[img off=true width=200 height=200]http://image.com/link.jpg[/img]