Plugin watermark

cachousam

Avatar: cachousam

2013-07-10 12:24

Hello,
It's summer, and the life is beautiful , and I take to dream!
Is someone could help me in completing my adaptation of the watermark plugin for QCv3.7 ?
I changed the file librarie/FOtoJobs.php to accept the watermark function and I think I succeeded.
My only problem is that the function call in the core file / files-admin.php me creates a non-functioning.

I wrote this:



 
* @param int    $iLinkType
  
*/
  function 
addFiles$iLinkType ){
    if( isset( 
$this->mData ) && is_array$this->mData ) ){
      
$oFF      =& FlatFiles::getInstance( );
      
$sFile    $this->throwDbNames$iLinkType );
      
$iLastId  $oFF->throwLastId$sFile'iFile' );
      
$iCount   count$this->mData );
      
$i        0;

      foreach( 
$this->mData as $iKey => $aData ){
        
$aData['iPhoto'] = ( $oFF->checkCorrectFile$aData['sFileName'], 'gif|jpg|png|jpeg' ) == true ) ? 0;

        if( 
$aData['iPhoto'] == ){
          
$this->generateThumbs$aData['sFileName'], $aData['iSize1'], $aData['iSize2'] );      
          
          
          
          
          if( !isset( 
$oFoto ) )
            
$oFoto  =& FotoJobs::getInstance( );
            
$aImgSize $oFoto->throwImgSizeDIR_FILES.$sFileName );            
            
$oFoto->createCustomThumbDIR_FILES.$sFileNameDIR_FILES$oFoto->throwImgSizeDIR_FILES.$sFileName'longer' ), $aData['sFileName'], true, Array( 'bWatermark' => true ) );    
        
        }
        
        
        
        else{
          
$aData['iType']   = null;
          
$aData['iSize1']  = null;
          
$aData['iSize2']  = null;



Thank you for an answer that would fill me with joy.
Dominique

» Quick.Cart v3.x

cachousam

Avatar: cachousam

2013-07-16 12:46

Hello,
Well, I do the necessary corrections on the FotoJobs.php file (for my qc3.7) and in the file file-admin.php like this:


if( is_fileDIR_FILES.DIR_NO_WATERMARK.$sFileName ) )
      
unlink DIR_FILES.DIR_NO_WATERMARK.$sFileName );
.
.
.
.
if( !isset( 
$oFoto ) )
    
$oFoto FotoJobs::getInstance( );
  
$oFoto->createCustomThumbDIR_FILES.$aData['sFileName'], DIR_FILES$oFoto->throwImgSizeDIR_FILES.$aData['sFileName'], 'longer' ), $aData['sFileName'], true, Array( 'bWatermark' => true ) );



In config/general.php i have wrote this:


define
'DIR_NO_WATERMARK''no_watermark/' );
define'WATERMARK_IMG'DIR_FILES.DIR_NO_WATERMARK.'copyrights_small.png' );




and now I can create articles as before.

Nonetheless, the images on the site does not contain a watermark.
I have upload the no_watermark files in the directory /files
Where can I send the file to a teacher can correct me, because I do not want to pollute this message with the 449 lines of the file.

Thank you in advance

cachousam

Avatar: cachousam

2013-07-16 13:15

Hello,
I just installed the plugin watermark for QC4.2 version on a brand new 4.2 site to see if it worked and the result is the same.
I have create many items but no watermark in the images.

This is to information.I think that my change is good but he must miss a small detail in the How to
Thanks

cachousam

Avatar: cachousam

2013-07-16 13:35

Excuse me, it works well on a brand new qc4.2 ..
So if a teacher could correct my FotoJobs file I would be very happy.
thank you very much

cachousam

Avatar: cachousam

2013-07-16 14:21

Hello
The files FotoJobs.php is on this link:

http://dl.free.fr/mvNmkxjZK

Thanks

cachousam

Avatar: cachousam

2013-07-17 09:08

Hello,
I know I'm on older version, but my site is big and it's hard for me to change to another version.
Also I know really well the structure of my v3.7.
I also used the many changes I made to learn PHP, CSS ...
I am at your feet for asking you to dedicate myself a little time.
You can see on the forum that I do not expect doing nothing.
When I asked for help it's really that I'm stuck.
In this case, I'm sure for brains like you, it will only take a few minutes to correct my file or get in the right way.
I hope I have convinced you to give me this service.
A thousand thank you.
Dominique

cachousam

Avatar: cachousam

2013-07-19 14:53

Hello,
Nobody on the forum to help me ?
You dont like french guy?
Dominique

cachousam

Avatar: cachousam

2013-07-22 07:12

Please...

Claps

Avatar: Claps

2013-07-23 19:08

you have wrong argument list for function 'createThumb( $sImgSource, $sImgDestDir, $sImgOutput = false, $iQuality = null, $sOption = null ) ' in your FotoJobs.php modification.
It should be 'function createThumb( $sImgSource, $sImgDestDir, $sImgOutput = false, $iQuality = null, $aOptions = null )' to work.

Claps

Claps

Avatar: Claps

2013-07-23 19:18

if you want more details send me an email at qcloaded@gmail.com

Claps

cachousam

Avatar: cachousam

2013-07-25 06:43

Hello everyone.
I want to tell you that I have successfully adapted this plugin for QC3.7 with the above post. Claps was very nice to spend me a little time.
In fact, my little mistake was to have called the variable $aOptions instead of the variable $sOption .
Yet it was easy to see that in the original file for fotojob.php qc3.7, there was no variable $aOptions .
But I'm not as talented as you.
Fortunately, I'm very persistent and hardworking.

If this interresse the staff to put in the archives of plugins, here FotoJobs.php modified file.
http://dl.free.fr/kOIB0AtUN
The "how to" is the same as the version of qc4.2

Dominique

Back to top
about us | contact