Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - DanielsImage

Pages: [1]
1
Thank you so much for the quick reply!  That is close to what I want, but it is not the "abc" that needs to change based on the Special Instructions, it is the "123" or "456"  The "abc" is always the same and always needs to change to the name of the picture.

Example: we sell our pictures.  each picture is a different size ratio.  the prices depend on the size ratio. 

The choices are different for each one.  We pass those values to PayPal.
When we upload the pictures to the site, the IPTC field "Special Instruction" contains the picture size ratio.  So if the picture is a 4x6 ratio, Special instructions will say  4x6.  If the picture is 5x7 ratio, Special Instructions will say 5x7.

Now I have to edit images and manually insert the correct code to pass to PayPal.  I have an additional field that is named "paypal". If the IPTC Special Instructions say 5x7, I copy and paste the correct code for 5x7.
All paypal codes for all sizes have the words "SOME COOL PICTURE" for the name of the picture. 
After I paste in all the correct codes for all the correct pictures, I go to MySql and batch change "SOME COOL PICTURE" for the actual picture name.

You will understand why the the additional field "PayPal" needs to have the html form code in it and why it does not work in the template file instead.  And really, setting up the paypal code there works elegantly with no problems.  (the actual values are in a javascript code in  header.html )  Of course {image_paypal} is on the details.html page.

Does that clarify my intent?
I think it will be the same as inserting other iptc values, except that it should probably say:
IF iptc_special_instructions="4x6" then insert {<form 4x6 gobbledygook code name="SOME COOL PICTURE" </form>}
ELSE IF iptc_special_instructions="5x7" then insert {<form 5x7 gobbledygook code name="SOME COOL PICTURE" </form>}
ELSE IF iptc_special_instructions="8x10" then insert {<form 8x10 gobbledygook code name="SOME COOL PICTURE" </form>}

and so on

Then, after all the code is in the PayPal field, we need to change SOME COOL PICTURE to the real name of the picture.

So, from my first example  the 123 or 456 represents the picture size.  the abc is just the picture name.

Does it make sense now?  I know it can all be done in checkimages.php, I'm just not that great at the correct syntax.

Thanks again for all your help!
 

2
Although I check in on a periodic basis and read what's new and do my upgrades, it has been so long since I have posted here (well before the hack) that I forgot my original user name and  had to register again.  I have been using 4 images since 2002 and have made many modifications, but I am unsure of how to accomplish this one.
In the checkimages.php file based on V@no's wonderful mod "Check new images in ALL categories v2.11", I need to add 2 things. 

1. I have numbers in the IPTC field "Special Instructions."  Depending on what the numbers are, it needs to insert a specific html block of code into an additional field that I have already created.
Example: if Special Instructions contains the numbers 123, then the code <h2>123 abc</h2> needs to be inserted into the additional field.  If Special Instructions contains 456, then the code <h2>456 abc</h2>  needs to be inserted into the additonal field.
This is much like inserting Title and Description from the IPTC fields.

2. Once the correct html code is inserted into the additional field (eg, <h2>123 abc</h2> or <h2>456 abc</h2> or whatever) then the "abc" part of the html code needs to be changed to the title of the picture.  <h2>123 abc</h2> becomes <h2>123 A Nice Picture</h2>

Currently I manually insert the code into the additional field in the Edit Images ACP  and then batch change the "abc" part in phpMyAdmin with the Update SQL command.


I really should be able to automate the whole process at the Check All New Images command, just like using the IPTC fields to update the name and description fields.

My programming skills are just not good enough to figure out the correct syntax.  I would appreciate the help!

Pages: [1]