forum.coppermine-gallery.net

Support => cpg1.4 plugins => cpg1.4.x Support => Older/other versions => cpg1.4 plugin contributions => Topic started by: m@rk on January 26, 2007, 08:55:02 pm

Title: Login reference
Post by: m@rk on January 26, 2007, 08:55:02 pm
[placeholder to get corresponding thread link for plugin description]
Title: Re: Login reference
Post by: m@rk on January 26, 2007, 09:34:13 pm
I wrote a simple plugin that replaces the "The selected album/file does not exist !" message with a reference linked to the login form for guests (if they attempt to access a private file via static link).

This could be useful if you share private pictures with members of your gallery.

Languages available: English, German
Title: Re: Login reference
Post by: m@rk on January 26, 2007, 09:35:40 pm
Developers request:

This plugin replaces some html:

Code: [Select]
$html = preg_replace($exper,$newcpch,$html);
If I'd only knew a way to replace whole html blocks (set as $exper) instead of only a single line, it would be possible to replace the complete following html block with the login form...

I made some trials with EOT without success (don't bother about language variables not used so far):

Code: [Select]
$to_replace = <<<EOT
<!-- Start standard table -->
<table align="center" width="600" cellspacing="1" cellpadding="0" class="maintable">
        <tr>
                <td class="tableh1" colspan="1">Error</td>
        </tr>
<!-- cpg_die -->
        <tr>
                <td class="tableb" align="center">
                        <font size="3"><b>The selected album/file does not exist !</b></font>


                        <br /><br />
                </td>
        </tr>

</table>
<!-- End standard table -->
EOT;
Title: Re: Login reference
Post by: angeldevil on January 27, 2007, 10:54:25 am
Hi M@rk!

A simple italian translation is attacched