Forum

Questions and discussions

Template Modification

Discuss template's customization

Re: Template Modification

Postby arabiansoura » Sun Apr 10, 2011 7:14 pm

Dear Alfred, you are so kind, that you are willing to help me on my installation, I have sent you the email with all the details required to connect to my live site.
arabiansoura
 
Posts: 25
Joined: Tue Jan 04, 2011 8:32 am

Re: Template Modification

Postby funmediapicture » Mon Apr 11, 2011 8:55 am

Hello arabiansoura,

your files are ok. You have insert the changes correctly.
Only one file you have forgotten to change: functions.php

I have made three test photos ( folder 7489, 7490, 7491 )
in category: Business.

For the preview I have changed the entry in your admin
Templates - Home page your COMPONENT_19:

Category: Business

Your setting: nothing

Please change it again to your setting. This I have only changed
for the test.

Anton has in the section Catalog below Select action - Regenerate Thumbs.
This can you take to make new previews also the thumb3.jpg from your
existing photos.

This file I have not yet processed. I make a test and post the new file
entrys here.

Note. I have delete all downloads and the access data to your server also
the mail with the datas. I have no more data from you.

Greetings
Alfred
funmediapicture
 
Posts: 73
Joined: Tue Apr 27, 2010 2:45 pm

Re: Template Modification

Postby arabiansoura » Mon Apr 11, 2011 9:27 am

funmediapicture wrote:your files are ok. You have insert the changes correctly.
Only one file you have forgotten to change: functions.php


This file I replaced this morning, since Anton had send a new file, to disable the users putting in the price.

Now I see the gallery is working, but the problem is with the rates users are able to add to file. I would have disabled this option and then have the gallery.

Also is there any other files I will have to change for the whole gallery to work, since in earlier post you had mentioned we need to edit many other files and you have edited just bulk_upload.
arabiansoura
 
Posts: 25
Joined: Tue Jan 04, 2011 8:32 am

Re: Template Modification

Postby funmediapicture » Mon Apr 11, 2011 1:55 pm

I have ready the function to make new preview thumbs also the thumb3.jpg
( This are made for the version: store11_03_correction )

For this you must change: admin/categories/edit.php

Search:

//Regeneration thumbs for the photos

and then: photo_resize

Copy one of this code and replace the end like this:

/thumb3.jpg",3); ( we need only change the thumb to 3 and the end to 3 )

Example:

..... $res_id[$i]."/thumb2.jpg",2);

change to:

..... $res_id[$i]."/thumb3.jpg",3);


Then search: publication_watermark_add

Copy this code and replace the end like this:

/thumb3.jpg");

So we have added the new thumb3.jpg as photo_resize and as publication_watermark_add

That's all. We must now have:

photo_resize thumb1
photo_resize thumb2
photo_resize thumb3

publication_watermark_add thumb2
publication_watermark_add thumb3

##########

The most work are the changes for the sql and the admin section. This are ready.
The only what we must do are insert this new:

photo_resize
publication_watermark_add

in the files.

This feature are made for photos and vectors.

At the moment I have only ready make the bulk_upload/photo_upload.php
You can without problem change the vector_upload.php. Search the both
inserts like as in photo_upload.php.

The upload for the seller here I must look in the new files. I have this not updated
so I must first look who are this entrys. Anton change very often this entrys
and i must first search the entrys.

##########

Very important is to mark the changes. If anton makes a new version you
must the changes insert again. With the mark you will found your changes
better.

I hope I understand this right. To disable the option rates you must change
the templates. For photo: item_photo.tpl

Search ITEM_RATING

So you can delete this entry.
funmediapicture
 
Posts: 73
Joined: Tue Apr 27, 2010 2:45 pm

Re: Template Modification

Postby arabiansoura » Mon Apr 11, 2011 3:48 pm

funmediapicture wrote:I hope I understand this right. To disable the option rates you must change the templates. For photo: item_photo.tpl

Search ITEM_RATING So you can delete this entry.


Oh I was ignorant, the rate here means not rating :-) it was actually meant the option user has while uploading the image, to set the price for their photo, I asked Anton to disable this for me, since I don't want the user to set the price and site has multiple price. But somehow the file Anton sent me didn't disable it.

My normal front end upload doesn't generate the gallery, though the gallery looks sharp, its little slow, to load, since I changed the setting to featured, it didn't work, so i made it again Business category, also I uploaded files from front end to business category still it didn't work.
What could be the issue.
arabiansoura
 
Posts: 25
Joined: Tue Jan 04, 2011 8:32 am

Re: Template Modification

Postby funmediapicture » Mon Apr 11, 2011 4:55 pm

At the moment work only the admin/bulk_upload/photo_upload.php
and the generate new thumbs in catalog. So you can make from your
content new thumbs for preview ( also thumb3.jpg ).

The other files I must look where are they stored.
funmediapicture
 
Posts: 73
Joined: Tue Apr 27, 2010 2:45 pm

Re: Template Modification

Postby arabiansoura » Thu Apr 14, 2011 8:09 pm

Any final remedy to make this gallery work without any issue, I'm unable to make this work, when i change the category to business and to featured it doesn't work, and I tried even uploading images from backend.

May be Admin has some solution a permanent fix for this mod.
arabiansoura
 
Posts: 25
Joined: Tue Jan 04, 2011 8:32 am

Re: Template Modification

Postby funmediapicture » Fri Apr 15, 2011 10:13 am

At the moment i work on the update to version 11.03 so that all files
are new. Please be patient. In the next days I have this ready.

Can you send me your account details again. I will look why your gallery
not work.
funmediapicture
 
Posts: 73
Joined: Tue Apr 27, 2010 2:45 pm

Re: Template Modification

Postby funmediapicture » Thu Apr 21, 2011 9:19 am

Here are the changes for the other files to create the thumb3.jpg

We can create the thumb3.jpg in:

1.) admin/bulk_upload

a.) Upload photo
b.) Upload vector normal
c.) Upload vector zip


2.) admin/catalog

a.) Upload photo
b.) Upload vector normal
c.) Upload vector zip


3.) Filemanager ( seller )

a.) Upload photo
b.) Upload vector normal
c.) Upload vector zip

So we can create the thumb3.jpg nine times.



Changed files for thumb3.jpg

Insert the whole code or insert only the marked changes.


1.) admin/bulk_upload/photo_upload.php
2.) admin/bulk_upload/vector_upload.php


3.) members/filemanager_photo_flash.php
4.) members/upload_photo_flash.php
5.) members/upload_photo_flash2.php


6.) admin/function/upload.php



1.) admin/bulk_upload/photo_upload.php

Search:
//create thumbs and watermark

Replace this:

Code: Select all
photo_resize($_SERVER["DOCUMENT_ROOT"].$photo,$_SERVER["DOCUMENT_ROOT"].site_root.$site_servers[$site_server_activ]."/".$folder."/thumb1.jpg",1);

photo_resize($_SERVER["DOCUMENT_ROOT"].$photo,$_SERVER["DOCUMENT_ROOT"].site_root.$site_servers[$site_server_activ]."/".$folder."/thumb2.jpg",2);

publication_watermark_add($id,$_SERVER["DOCUMENT_ROOT"].site_root.$site_servers[$site_server_activ]."/".$folder."/thumb2.jpg");


With this:

Code: Select all
photo_resize($_SERVER["DOCUMENT_ROOT"].$photo,$_SERVER["DOCUMENT_ROOT"].site_root.$site_servers[$site_server_activ]."/".$folder."/thumb1.jpg",1);
photo_resize($_SERVER["DOCUMENT_ROOT"].$photo,$_SERVER["DOCUMENT_ROOT"].site_root.$site_servers[$site_server_activ]."/".$folder."/thumb2.jpg",2);

// Freddy BOF
photo_resize($_SERVER["DOCUMENT_ROOT"].$photo,$_SERVER["DOCUMENT_ROOT"].site_root.$site_servers[$site_server_activ]."/".$folder."/thumb3.jpg",3);
// Freddy EOF

publication_watermark_add($id,$_SERVER["DOCUMENT_ROOT"].site_root.$site_servers[$site_server_activ]."/".$folder."/thumb2.jpg");
// Freddy BOF
publication_watermark_add($id,$_SERVER["DOCUMENT_ROOT"].site_root.$site_servers[$site_server_activ]."/".$folder."/thumb3.jpg");
// Freddy EOF




2.) admin/bulk_upload/vector_upload.php

Search:
//Photo preview

Replace this:

Code: Select all
photo_resize($_SERVER["DOCUMENT_ROOT"].$previewphoto,$_SERVER["DOCUMENT_ROOT"].site_root.$site_servers[$site_server_activ]."/".$folder."/thumb1.jpg",1);

photo_resize($_SERVER["DOCUMENT_ROOT"].$previewphoto,$_SERVER["DOCUMENT_ROOT"].site_root.$site_servers[$site_server_activ]."/".$folder."/thumb2.jpg",2);

publication_watermark_add($id,$_SERVER["DOCUMENT_ROOT"].site_root.$site_servers[$site_server_activ]."/".$folder."/thumb2.jpg");

publication_iptc_add($id,$_SERVER["DOCUMENT_ROOT"].$previewphoto);


With this:

Code: Select all
photo_resize($_SERVER["DOCUMENT_ROOT"].$previewphoto,$_SERVER["DOCUMENT_ROOT"].site_root.$site_servers[$site_server_activ]."/".$folder."/thumb1.jpg",1);
photo_resize($_SERVER["DOCUMENT_ROOT"].$previewphoto,$_SERVER["DOCUMENT_ROOT"].site_root.$site_servers[$site_server_activ]."/".$folder."/thumb2.jpg",2);
// Freddy BOF
photo_resize($_SERVER["DOCUMENT_ROOT"].$previewphoto,$_SERVER["DOCUMENT_ROOT"].site_root.$site_servers[$site_server_activ]."/".$folder."/thumb3.jpg",3);
// Freddy EOF

publication_watermark_add($id,$_SERVER["DOCUMENT_ROOT"].site_root.$site_servers[$site_server_activ]."/".$folder."/thumb2.jpg");
// Freddy BOF
publication_watermark_add($id,$_SERVER["DOCUMENT_ROOT"].site_root.$site_servers[$site_server_activ]."/".$folder."/thumb3.jpg");
// Freddy EOF

publication_iptc_add($id,$_SERVER["DOCUMENT_ROOT"].$previewphoto);




3.) members/filemanager_photo_flash.php

Search:
custom_settings

Replace this:

Code: Select all
thumbnail_height: "<?=$site_thumb_height?>|<?=$site_thumb_height2?><?=$sizelist?>",
thumbnail_width: "<?=$site_thumb_width?>|<?=$site_thumb_width2?><?=$sizelist?>",


With this:

Code: Select all
thumbnail_height: "<?=$site_thumb_height?>|<?=$site_thumb_height2?>|<?=$site_thumb_height3?><?=$sizelist?>",
thumbnail_width: "<?=$site_thumb_width?>|<?=$site_thumb_width2?>|<?=$site_thumb_width3?><?=$sizelist?>",




4.) members/upload_photo_flash.php

Search:
$j=3;

Replace this:

$j=3;


with this:

// Freddy BOF
// The original entry makes two thumbs ( thumb1 and thumb2 )
// Original entry $j=3;
$j=4;
// Freddy EOF



5.) members/upload_photo_flash2.php

Search:
//upload file for sale

Replace this:

Code: Select all
$photo=site_root.$site_servers[$site_server_activ]."/".$folder."/".$afiles[$n];
$photo_thumb1=site_root."/content/".$folder."/".$fileName."_thumb1.jpg";
$photo_thumb2=site_root."/content/".$folder."/".$fileName."_thumb1.jpg";
$size = getimagesize ($DOCUMENT_ROOT.site_upload_directory."/".$tmp_folder."/".$afiles[$n]);


With this:

Code: Select all
$photo=site_root.$site_servers[$site_server_activ]."/".$folder."/".$afiles[$n];
$photo_thumb1=site_root."/content/".$folder."/".$fileName."_thumb1.jpg";
$photo_thumb2=site_root."/content/".$folder."/".$fileName."_thumb1.jpg";
// Freddy BOF
$photo_thumb3=site_root."/content/".$folder."/".$fileName."_thumb1.jpg";
// Freddy EOF
$size = getimagesize ($DOCUMENT_ROOT.site_upload_directory."/".$tmp_folder."/".$afiles[$n]);




Search:

//Copy thumb1

//Copy thumb2

and insert under this:

Code: Select all
// Freddy BOF
//Copy thumb3
if(file_exists($DOCUMENT_ROOT.site_upload_directory."/".$tmp_folder."/".$fileName."_thumb3.jpg"))
{
@copy($DOCUMENT_ROOT.site_upload_directory."/".$tmp_folder."/".$fileName."_thumb3.jpg",$_SERVER["DOCUMENT_ROOT"].site_root.$site_servers[$site_server_activ]."/".$folder."/thumb3.jpg");

publication_watermark_add($id,$DOCUMENT_ROOT.$site_servers[$site_server_activ]."/".$folder."/thumb3.jpg");

}
// Freddy EOF




6.) admin/function/upload.php

Search:
publication_zip_preview

Replace this:

Code: Select all
if($n==0)
{
photo_resize($_SERVER["DOCUMENT_ROOT"].site_root.$site_servers[$site_server_activ]."/".$folder."/".$file,$_SERVER["DOCUMENT_ROOT"].site_root.$site_servers[$site_server_activ]."/".$folder."/thumb1.jpg",1);
photo_resize($_SERVER["DOCUMENT_ROOT"].site_root.$site_servers[$site_server_activ]."/".$folder."/".$file,$_SERVER["DOCUMENT_ROOT"].site_root.$site_servers[$site_server_activ]."/".$folder."/thumb2.jpg",2);
publication_watermark_add(0,$_SERVER["DOCUMENT_ROOT"].site_root.$site_servers[$site_server_activ]."/".$folder."/thumb2.jpg");
}


With this:

Code: Select all
if($n==0)
{
photo_resize($_SERVER["DOCUMENT_ROOT"].site_root.$site_servers[$site_server_activ]."/".$folder."/".$file,$_SERVER["DOCUMENT_ROOT"].site_root.$site_servers[$site_server_activ]."/".$folder."/thumb1.jpg",1);
photo_resize($_SERVER["DOCUMENT_ROOT"].site_root.$site_servers[$site_server_activ]."/".$folder."/".$file,$_SERVER["DOCUMENT_ROOT"].site_root.$site_servers[$site_server_activ]."/".$folder."/thumb2.jpg",2);
// Freddy BOF
photo_resize($_SERVER["DOCUMENT_ROOT"].site_root.$site_servers[$site_server_activ]."/".$folder."/".$file,$_SERVER["DOCUMENT_ROOT"].site_root.$site_servers[$site_server_activ]."/".$folder."/thumb3.jpg",3);
// Freddy EOF

publication_watermark_add(0,$_SERVER["DOCUMENT_ROOT"].site_root.$site_servers[$site_server_activ]."/".$folder."/thumb2.jpg");
// Freddy BOF
publication_watermark_add(0,$_SERVER["DOCUMENT_ROOT"].site_root.$site_servers[$site_server_activ]."/".$folder."/thumb3.jpg");
// Freddy EOF
}




6.1.) admin/function/upload.php ( for members/upload_vector.php )

Search:
publication_vector_upload

and then:
//Upload photo preview and reads IPTC

Replace this:

Code: Select all
photo_resize($_SERVER["DOCUMENT_ROOT"].$vp,$_SERVER["DOCUMENT_ROOT"].site_root.$site_servers[$site_server_activ]."/".$folder."/thumb1.jpg",1);

photo_resize($_SERVER["DOCUMENT_ROOT"].$vp,$_SERVER["DOCUMENT_ROOT"].site_root.$site_servers[$site_server_activ]."/".$folder."/thumb2.jpg",2);

publication_watermark_add($id,$_SERVER["DOCUMENT_ROOT"].site_root.$site_servers[$site_server_activ]."/".$folder."/thumb2.jpg");


With this:

Code: Select all
photo_resize($_SERVER["DOCUMENT_ROOT"].$vp,$_SERVER["DOCUMENT_ROOT"].site_root.$site_servers[$site_server_activ]."/".$folder."/thumb1.jpg",1);
photo_resize($_SERVER["DOCUMENT_ROOT"].$vp,$_SERVER["DOCUMENT_ROOT"].site_root.$site_servers[$site_server_activ]."/".$folder."/thumb2.jpg",2);
// Freddy BOF
photo_resize($_SERVER["DOCUMENT_ROOT"].$vp,$_SERVER["DOCUMENT_ROOT"].site_root.$site_servers[$site_server_activ]."/".$folder."/thumb3.jpg",3);
// Freddy EOF
publication_watermark_add($id,$_SERVER["DOCUMENT_ROOT"].site_root.$site_servers[$site_server_activ]."/".$folder."/thumb2.jpg");
// Freddy BOF
publication_watermark_add($id,$_SERVER["DOCUMENT_ROOT"].site_root.$site_servers[$site_server_activ]."/".$folder."/thumb3.jpg");
// Freddy EOF




6.2.) admin/function/upload.php ( for catalog/add.php - publication_photo_upload )

Search:
publication_photo_upload

and then this:
//Create thumbs

Replace this:

Code: Select all
photo_resize($_SERVER["DOCUMENT_ROOT"].$photo,$_SERVER["DOCUMENT_ROOT"].site_root.$site_servers[$site_server_activ]."/".$folder."/thumb1.jpg",1);

photo_resize($_SERVER["DOCUMENT_ROOT"].$photo,$_SERVER["DOCUMENT_ROOT"].site_root.$site_servers[$site_server_activ]."/".$folder."/thumb2.jpg",2);

publication_watermark_add($id,$_SERVER["DOCUMENT_ROOT"].site_root.$site_servers[$site_server_activ]."/".$folder."/thumb2.jpg");


With this:

Code: Select all
photo_resize($_SERVER["DOCUMENT_ROOT"].$photo,$_SERVER["DOCUMENT_ROOT"].site_root.$site_servers[$site_server_activ]."/".$folder."/thumb1.jpg",1);
photo_resize($_SERVER["DOCUMENT_ROOT"].$photo,$_SERVER["DOCUMENT_ROOT"].site_root.$site_servers[$site_server_activ]."/".$folder."/thumb2.jpg",2);
// Freddy BOF
photo_resize($_SERVER["DOCUMENT_ROOT"].$photo,$_SERVER["DOCUMENT_ROOT"].site_root.$site_servers[$site_server_activ]."/".$folder."/thumb3.jpg",3);
// Freddy EOF

publication_watermark_add($id,$_SERVER["DOCUMENT_ROOT"].site_root.$site_servers[$site_server_activ]."/".$folder."/thumb2.jpg");
// Freddy BOF
publication_watermark_add($id,$_SERVER["DOCUMENT_ROOT"].site_root.$site_servers[$site_server_activ]."/".$folder."/thumb3.jpg");
// Freddy EOF


That are all changes to make the thumb3.jpg.

One thing. Please make a test with all opportunities and give me a answer whether
the vector upload in admin/bulk_upload work. Make the test with ONLY the zip file for
preview. Look in the folder whether the thumbs are created. This is at the moment the
only problem.

Greetings
Alfred
funmediapicture
 
Posts: 73
Joined: Tue Apr 27, 2010 2:45 pm

Previous

Return to Design & Templates

Who is online

Users browsing this forum: No registered users and 3 guests

cron
  Photo Store Script

Professional php photo stock script and WordPress plug-in for photographers and video producers.

  Support
  CMSaccount Inc.