This modification adds a BBCode & HTML link for embedding a thumbnail with a link to the main image in the 'Share' link block in IP.Gallery
Find:
Before:
Add:
ACP >> Look & Feel >> Manage Languages >> English (USA) >> Gallery >> Public Gallery
Add string
Open {forum}/admin/applications_addon/ips/gallery/modules_public/images/viewimage.php
Find Line 554:
Add before closing brace '}'
Find Line 723:
Add before closing brace '}'
Find:
<if test="showhotlinking:|:$this->settings['display_hotlinking'] == 1 AND $this->settings['gallery_web_accessible']=='yes' AND !$info['media']">
<h3 class='maintitle no-border'>{$this->lang->words['image_share']}</h3>
<div class='generic_bar'></div>
<ul class='image_info'>
<li class='row1'>
<strong>{$this->lang->words['gal_bbcode_pre']}</strong>
<input onclick="this.select();" type='text' size='40' readonly='readonly' name='bbcode1' value='[URL={$this->settings['board_url']}/index.php?app=gallery&module=images&img={$info['id']}][IMG]{$info['image_url']}[/IMG][/URL]' class='input_text' />
</li>
<li class='row2'>
<strong>{$this->lang->words['gal_html_pre']}</strong>
<input onclick="this.select();" type='text' size='40' readonly='readonly' name='html1' value='<a href='{$this->settings['board_url']}/index.php?app=gallery&module=images&img={$info['id']}'><img src='{$info['image_url']}' alt='<if test="set_cleancaption:|:$info['clean_caption'] = htmlspecialchars( $info['caption'], ENT_QUOTES )">{$info['clean_caption']}</if>' /></a>' class='input_text'/>
</li>
<li class='row1'>
<strong>{$this->lang->words['gal_imgurl_pre']}</strong>
<input onclick="this.select();" type='text' size='40' readonly='readonly' name='link1' value='{$info['image_url']}' class='input_text' />
</li>
<li class='row2'>
<strong>{$this->lang->words['gal_pgurl_pre']}</strong>
<input onclick="this.select();" type='text' size='40' readonly='readonly' name='link2' value='{$this->settings['board_url']}/index.php?app=gallery&module=images&img={$info['id']}' class='input_text' />
</li>
<li class='row1'>
<strong>{$this->lang->words['gal_bbcode_pre_thumb']}</strong>
<input onclick="this.select();" type='text' size='40' readonly='readonly' name='bbcode1' value='[URL={$this->settings['board_url']}/index.php?app=gallery&module=images&img={$info['id']}][IMG]{$info['image_url_thumb']}[/IMG][/URL]' class='input_text' />
</li>
<li class='row2'>
<strong>{$this->lang->words['gal_html_pre_thumb']}</strong>
<input onclick="this.select();" type='text' size='40' readonly='readonly' name='html1' value='<a href='{$this->settings['board_url']}/index.php?app=gallery&module=images&img={$info['id']}'><img src='{$info['image_url_thumb']}' alt='<if test="set_cleancaption:|:$info['clean_caption'] = htmlspecialchars( $info['caption'], ENT_QUOTES )">{$info['clean_caption']}</if>' /></a>' class='input_text'/>
</li>
</ul>
</if>
Before:
</ul>
</if>
Add:
<li class='row1'>
<strong>{$this->lang->words['gal_bbcode_pre_thumb']}</strong>
<input onclick="this.select();" type='text' size='40' readonly='readonly' name='bbcode1' value='[URL={$this->settings['board_url']}/index.php?app=gallery&module=images&img={$info['id']}][IMG]{$info['image_url_thumb']}[/IMG][/URL]' class='input_text' />
</li>
<li class='row2'>
<strong>{$this->lang->words['gal_html_pre_thumb']}</strong>
<input onclick="this.select();" type='text' size='40' readonly='readonly' name='html1' value='<a href='{$this->settings['board_url']}/index.php?app=gallery&module=images&img={$info['id']}'><img src='{$info['image_url_thumb']}' alt='<if test="set_cleancaption:|:$info['clean_caption'] = htmlspecialchars( $info['caption'], ENT_QUOTES )">{$info['clean_caption']}</if>' /></a>' class='input_text'/>
</li>
ACP >> Look & Feel >> Manage Languages >> English (USA) >> Gallery >> Public Gallery
Add string
key = gal_bbcode_pre_thumb default text = BBCode (Thumb): key = gal_html_pre_thumb text = HTML (Thumb):
Open {forum}/admin/applications_addon/ips/gallery/modules_public/images/viewimage.php
Find Line 554:
else
{
$this->data['image'] = $this->registry->glib->makeImageTag( $this->data, 0, 1 );
$this->data['image_url'] = $this->settings['gallery_images_url'] . '/' . $dir . $this->data['masked_file_name'];
}
Add before closing brace '}'
$this->data['image_url_thumb'] = $this->settings['gallery_images_url'] . '/' . $dir . 'tn_' . $this->data['masked_file_name'];
Find Line 723:
else
{
$this->data['image'] = $this->registry->glib->makeImageTag( $this->data, 0, 1 );
$this->data['image_url'] = $this->settings['gallery_images_url'] . '/' . $dir . $this->data['masked_file_name'];
}
Add before closing brace '}'
$this->data['image_url_thumb'] = $this->settings['gallery_images_url'] . '/' . $dir . 'tn_' . $this->data['masked_file_name'];
- Lucky One likes this











