I did this and it works => check the demo link :
http://www.tinhoi.exofire.net/forum/viewtopic.php?t=5
Here is my version, not sure if i did it right way but at least it works :
first upload reflection.js to forum root
open includes/bbcode.php
find:
'img' => array(
'nested' => false,
'inurl' => true,
),
after add:
'imgreflect' => array(
'nested' => false,
'inurl' => true,
),
find:
// ALBUMIMG
before add:
// IMG REFLECT
if($tag === 'imgreflect')
{
if($this->is_sig)
{
return $error;
}
// main parameters
$params = array(
'src' => false,
'alt' => false,
'slide' => false,
);
// additional allowed parameters
$extras = $this->allow_styling ? array('width', 'height', 'border', 'style', 'class', 'title', 'align') : array('width', 'height', 'border', 'title', 'align');
// [img=blah]blah2[/img]
if(isset($item['params']['param']))
{
$params['src'] = $item['params']['param'];
if ( $config_mg['thumbnail_posts'] == 1 )
{
$params['src'] = "image_thumbnail.php?pic_id=" . $params['src'];
}
$params['alt'] = $content;
$params['slide'] = isset($item['params']['slide']) ? $item['params']['slide'] : '';
$slideshow = ($params['slide']) ? 'lightbox[' . $item['params']['slide'] . ']' : 'lightbox';
}
// [img src=blah alt=blah width=123][/img ]
elseif(isset($item['params']['src']))
{
$params['src'] = $item['params']['src'];
if ( $config_mg['thumbnail_posts'] == 1 )
{
$params['src'] = "image_thumbnail.php?pic_id=" . $params['src'];
}
$params['alt'] = isset($item['params']['alt']) ? $item['params']['alt'] : $content;
$params['slide'] = isset($item['params']['slide']) ? $item['params']['slide'] : '';
$slideshow = ($params['slide']) ? 'lightbox[' . $item['params']['slide'] . ']': 'lightbox';
for($i=0; $i<count($extras); $i++)
{
if(!empty($item['params'][$extras[$i]]))
{
if($extras[$i] === 'style')
{
$style = $this->valid_style($item['params']['style']);
if($style !== false)
{
$params['style'] = $style;
}
}
else
{
$params[$extras[$i]] = $item['params'][$extras[$i]];
}
}
}
}
// [img]blah[/img], [img width=blah]blah[/img ]
elseif(!empty($content))
{
$link_url = $content;
$params['src'] = $content;
// LIW - BEGIN
if ( ($board_config['liw_enabled'] == 1) && ($max_image_width > 0) && ($config_mg['thumbnail_posts'] == 0) )
{
if ( isset($item['params']['width']) )
{
$item['params']['width'] = ( $item['params']['width'] > $max_image_width ) ? $max_image_width : $item['params']['width'];
}
else
{
$image_size = @getimagesize($content);
$item['params']['width'] = ( $image_size[0] > $max_image_width ) ? $max_image_width : $image_size[0];
}
}
elseif ( $config_mg['thumbnail_posts'] == 1 )
{
/*
$image_size = @getimagesize($content);
if ($image_size[0] > $config_mg['thumbnail_size'])
{
$params['src'] = "image_thumbnail.php?pic_id=" . $params['src'];
}
*/
$params['src'] = "image_thumbnail.php?pic_id=" . $params['src'];
}
// LIW - END
$params['alt'] = isset($item['params']['alt']) ? $item['params']['alt'] : (isset($params['title']) ? $params['title'] : 'Image');
$params['slide'] = isset($item['params']['slide']) ? $item['params']['slide'] : '';
$slideshow = ($params['slide']) ? 'lightbox[' . $item['params']['slide'] . ']': 'lightbox';
for($i=0; $i<count($extras); $i++)
{
if(!empty($item['params'][$extras[$i]]))
{
if($extras[$i] === 'style')
{
$style = $this->valid_style($item['params']['style']);
if($style !== false)
{
$params['style'] = $style;
}
}
else
{
$params[$extras[$i]] = $item['params'][$extras[$i]];
}
}
}
}
// generate html
$html = '<img';
foreach($params as $var => $value)
{
$html .= ' ' . $var . '="' . $this->process_text($value) . '"';
}
if(!isset($params['title']))
{
$html .= ' title="' . $this->process_text($params['alt']) . '"';
}
$html .= ' class="reflect rheight33" />';
// add url
if(empty($item['inurl']))
{
if ( $config_mg['thumbnail_posts'] == 1 && $config_mg['thumbnail_lightbox'] == 1 )
{
$html = '<a href="' . $link_url . '" rel="' . $slideshow . '" title="' . $params['alt'] . '">' . $html . '</a>';
}
else
{
$html = '<a href="' . $params['src'] . '" target="_blank" title="' . $lang['OpenNewWindow'] . '">' . $html . '</a>';
}
}
return array(
'valid' => true,
'html' => $html,
'allow_nested' => false,
);
}
Open templates/ca_adphrodite/viewtopic_body.tpl
find:
<div class="forumline nav-div">
before add:
<script type="text/javascript" src="reflection.js"></script>
that's it
Download reflection.js here :
http://www.tinhoi.exofire.net/forum/reflection.js <=== Right click on link and Save Target As