Icy Phoenix


Archived phpBB Topics (Styles, Mods, Support) - FAP CUSTOMIZATION - Direct Link To Photo Location With Watermark



DWho [ Tue 27 Jan, 2009 12:09 ]
Post subject: FAP CUSTOMIZATION - Direct Link To Photo Location With Watermark
Hi I know this add on has been done here

http://www.icyphoenix.com/viewtopic...&p=28334#p28334

But I want to protect my album images and needed the watermark to show if I anyone used the links on other sites and I did not want anyone to know where my album pics where stored on my server

the add on above links directly to the folder on your server...

I have made this small piece of code work so that any image using the direct image link will show the picture with your watermark intact (if you are using one) Also if the image is clicked on it will direct the user back to your gallery where you are showing the image..(as long as it is set to public use else they will have to register..maybe a good thing but no image will show if it is set to registered or above for viewing)

Anyway here is the code... this is still using the tpl code from the above add-on with some small changes and a quick edit of showpage.php..

OPEN album_showpage.php
FIND
Code: [Hide] [Select]
'U_PIC_FULL_URL' => $server_path . ALBUM_UPLOAD_PATH . $thispic['pic_filename'],

AFTER ADD
Code: [Hide] [Select]
'U_PIC_FULL_HTTP' => 'http://' . $board_config['server_name'] . $board_config['script_path'] . 'album_showpage.' . $phpEx . '?' . pic_id . '=' . $pic_id,

'U_PIC_FULL_IMG' => '[url=http://' . $board_config['server_name'] . $board_config['script_path'] . 'album_showpage.' . $phpEx . '?' . pic_id . '=' . $pic_id . ']' . '[img]' . $server_path . 'album_pic.' . $phpEx . '?' . pic_id . '=' . $pic_id . '[/img]' . '[/url]',

'U_PIC_FULL_HTML' => '<a href=http://' . $board_config['server_name'] . $board_config['script_path'] . 'album_showpage.' . $phpEx . '?' . pic_id . '=' . $pic_id . '>' . '<img src=' . $server_path . 'album_pic.' . $phpEx . '?' . pic_id . '=' . $pic_id . ' width=250' . '/>' . '</a>',

L_DIRECT_LINKS => $lang['Direct_Links'],
L_PHOTO_LINKS => $lang['Photo_Links'],
L_FORUM_CODE => $lang['Forum_Links'],
L_HTML_CODE => $lang['Html_Links'],


OPEN templates/mg_themes/album_showpage_body.tpl
FIND
Code: [Hide] [Select]
<!-- END pics_nav -->

AFTER ADD
Code: [Hide] [Select]
{IMG_THL}{IMG_THC}<span class="forumlink">{L_DIRECT_LINKS}</span>{IMG_THR}
<table cellspacing="1" cellpadding="2" border="0" align="center" class="forumlinenb" width="100%">
<tr align="center">
<td align="right" width="30%"><span class="gensmall">{L_PHOTO_LINKS}</span></td>
<td align="left"><input type="text" readonly onClick="this.select();" value="{U_PIC_FULL_HTTP}" size="65" style="background-color: #EFEFEF;" /></td>

</tr>
<tr>
<td align="right"><span class="gensmall">{L_FORUM_CODE}</span></td>
<td align="left"><input type="text" readonly onClick="this.select();" value="{U_PIC_FULL_IMG}" size="65" style="background-color: #EFEFEF;" /></td>
</tr>
<tr>
<td align="right"><span class="gensmall">{L_HTML_CODE}</span></td>
<td align="left"><input type="text" readonly onClick="this.select();" value="{U_PIC_FULL_HTML}" size="65" style="background-color: #EFEFEF;" /></td>
</tr>
</table>
{IMG_TFL}{IMG_TFC}{IMG_TFR}


OPEN language/your language file/lang_album_main.php
FIND
Code: [Hide] [Select]
$lang['Pic_RDF'] = 'RSS Feed 1.0';
$lang['Pic_RSS'] = 'RSS Feed 2.0';

AFTER ADD
Code: [Hide] [Select]
$lang['Direct_Links'] = 'Direct Photo Links';
$lang['Photo_Links'] = 'Direct Photo Links';
$lang['Forum_Links'] = 'Forum Code';
$lang['Html_Links'] = 'Html Code';


On the html code I have added an image width of 250 in case other sites do not shrink images this can be removed by not including

Code: [Hide] [Select]
' width=250' . '


in this line

Code: [Hide] [Select]
'U_PIC_FULL_HTML' => '<a href=http://' . $board_config['server_name'] . $board_config['script_path'] . 'album_showpage.' . $phpEx . '?' . pic_id . '=' . $pic_id . '>' . '<img src=' . $server_path . 'album_pic.' . $phpEx . '?' . pic_id . '=' . $pic_id . ' width=250' . '/>' . '</a>',


Thats it obviously you can change the html code to however it fits your sit but now if your members link your album photos to other sites at least the watermark is present and your album pic files are safer..

here is an example using the bbcode tag..see that water mark is showing

album_pic

Any problems...please let me know..



Enjoy


TheSteffen [ Tue 27 Jan, 2009 13:31 ]
Post subject: Re: Direct Link To Photo Location With Watermark
Thanks for sharing DWho

Very nice Customization


Chaotic [ Tue 27 Jan, 2009 17:18 ]
Post subject: Re: Direct Link To Photo Location With Watermark
Awesome stuff.

I'll give this a try later on.


DWho [ Sat 31 Jan, 2009 20:37 ]
Post subject: Re: Direct Link To Photo Location With Watermark
Has anyone tried this ... so I know it isn't just my boards it works on...



stunnah83 [ Sat 31 Jan, 2009 22:38 ]
Post subject: Re: Direct Link To Photo Location With Watermark
DWho thanks for this, the same idea i had too


DWho [ Sun 01 Feb, 2009 00:58 ]
Post subject: Re: Direct Link To Photo Location With Watermark
your welcome



Chaotic [ Sun 01 Feb, 2009 14:36 ]
Post subject: Re: Direct Link To Photo Location With Watermark
DWho wrote: [View Post]
Has anyone tried this ... so I know it isn't just my boards it works on...



I was going to put this on my board a few days ago, but I forgot I don't have a watermark image...

I need to make one!


DWho [ Sun 01 Feb, 2009 16:07 ]
Post subject: Re: Direct Link To Photo Location With Watermark
if you need a hand with that let me know


Chaotic [ Mon 02 Feb, 2009 00:23 ]
Post subject: Re: Direct Link To Photo Location With Watermark
As far as I can remember, viewing some of the watermark topics on here, it looks quite complicated. I'm pretty bad at Photoshop, so I may take you up on that offer DWHO.


DWho [ Mon 02 Feb, 2009 00:30 ]
Post subject: Re: Direct Link To Photo Location With Watermark
let me know what you want it to say and a kinda style for it and i will do a few for you....



Chaotic [ Mon 02 Feb, 2009 00:34 ]
Post subject: Re: Direct Link To Photo Location With Watermark
Perhaps I'll send you a PM since I got us off-topic, lol.


Nirose [ Tue 01 Sep, 2009 04:26 ]
Post subject: Re: Direct Link To Photo Location With Watermark
cool i will try this


arthate [ Sat 14 Jan, 2012 12:03 ]
Post subject: Re: Direct Link To Photo Location With Watermark
DWho, could you please tell how add highslide or lightbox fuction to your addon if I post image with html <a href=""><img scr> in blocks of portal as administrator? (my portal is Integramod 1.4.1, phpBB2)

Because now there is no direct url to image on server, but Highslide is required such url...


mort [ Sat 14 Jan, 2012 23:27 ]
Post subject: Re: Direct Link To Photo Location With Watermark
arthate wrote: [View Post]
(my portal is Integramod 1.4.1, phpBB2)


I think I answered this here?

http://www.icyphoenix.com/viewtopic.php?p=55044#p55044




Powered by Icy Phoenix