Forum

Current User: Guest Login Register
Please consider registering

Search 
Search Forums:


 




Probleme avec plugin PWG SecureImages - resolu

UserPost

23:59
2/5/2007


nicolas

New Member

posts 1

1

J’ai rencontré des problèmes de visualisation de vignettes après l’installation du plugin SecureImages pour PhpWebGallery.

Pour corriger, j’ai modifié le fichier photon-func.php ainsi :
### Dans la fonction photon_replaceLink :
### Trouver les lignes
function photon_replaceLink($StringLink) {
$PosToStart=1;
while($PosToStart)
    {
    if ($PosToStart<strlen($StringLink))
        $PosToStart=strpos($StringLink,’href=’,$PosToStart+1);
    else
        $PosToStart=false;
    $CheckPositionEnd=strpos($StringLink,’</a>’,$PosToStart);
### Ajouter à la suite
// Ajout pour Intégration avec SecureImage
$CheckPositionImg=strpos($StringLink,’<img ‘,$PosToStart);
if ($CheckPositionImg!=false)
    {
    if ($CheckPositionImg < $CheckPositionEnd)
        {
        $CheckPositionEnd=$CheckPositionImg;
        }
    }
// FIN - Ajout pour Intégration avec SecureImage
### Trouver les lignes
$ToReplace="phpWGOpenWindow(’.";
$Replaceby="phpWGOpenWindow(’".PHPWEB_REL_ROOT_PATH.’.';
$LocalSubString=str_replace($ToReplace,$Replaceby,$LocalSubString);
### Ajouter à la suite
// Ajout pour Intégration avec SecureImage
$ToReplace="phpWGOpenWindow(’";
$Replaceby="phpWGOpenWindow(’".PHPWEB_REL_ROOT_PATH;
$LocalSubString=str_replace($ToReplace,$Replaceby,$LocalSubString);
// A revoir …
$ToReplace="plus";
$Replaceby="&amp;";
$LocalSubString=str_replace($ToReplace,$Replaceby,$LocalSubString);
// FIN - Ajout  pour Intégration avec SecureImage
### FIN ###

J’ai fait cette modification rapidement et elle n’est pas très propre, en effet je pense qu’il faudrait revoir la fonction photon_replaceLink (Il ne faut pas faire la substitution dans tout le code <A href="">…</A> mais uniquement dans <A href="">).

Voila, sinon un grand bravo pour ce fabuleux plugin !

Nicolas

http://blog.homenico.org



Reply to Topic: Probleme avec plugin PWG SecureImages - resolu

NOTE: New Posts are subject to administrator approval before being displayed

Guest Name (Required):

Guest EMail (Required):

Guest URL (required)

Math Required!
What is the sum of: 4 + 1        (Required)

Topic Reply:


 

About the All is in the title forum

Currently Online:

2 Guests

Maximum Online: 73

Forums:

Groups: 4

Forums: 15

Topics: 284

Posts: 1173

Members:

There are 200 members

There are 96 guests


Jillij has made 323 posts

Top Posters:

Mael - 29

John - 24

Okaryn - 21

zoom.photos - 18

stevenew - 14

Administrator: Jillij | Moderators: Jillij


© Simple:Press Forum - Version 3.1.2 (Build 340)  

Tags:

Comments are closed.