Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 12 of 12

Thread: Watermark text on only large/medium

  1. #1
    Amazing is offline Senior Member
    Join Date
    Nov 2008
    Posts
    103

    Default Watermark text on only large/medium

    Can someone point me to the logic where I could prevent the small icon images from having the watermark text.

    We use a very small icon size 80x80 and with the watermark at that size... it isn't completely visible, and over takes the photo so much it is distracting. Large and Medium are fine so don't want to disrupt those watermarks... although increasing the text size or allowing multiple line strings would be nice.

  2. #2
    ASPAlfred is offline Senior Member
    Join Date
    Nov 2007
    Posts
    2,244

    Default

    Open up the {root}\wolthuis.aspx.cs file, inside the page_load() method under line 98 or somewhere from there, add an If statement that looks like below.

    Code:
    if (ImgSize != "icon")
    {
        imgPhoto = CommonLogic.AddWatermark(imgPhoto, CopyrightText, CopyrightImage);
    }

  3. #3
    Amazing is offline Senior Member
    Join Date
    Nov 2008
    Posts
    103

    Default

    Excellent... Thanks!

  4. #4
    Amazing is offline Senior Member
    Join Date
    Nov 2008
    Posts
    103

    Default

    Alfred,

    Did the update as you indicated, and all seems to work until you select an image from the multi-image selection... at that time the medium image in the product details reverts to not having a watermark.

  5. #5
    Jao is offline Senior Member
    Join Date
    Oct 2008
    Posts
    1,132

    Default

    Could you tell us what version you're on?

  6. #6
    Amazing is offline Senior Member
    Join Date
    Nov 2008
    Posts
    103

    Default

    version 8.0.0.0

  7. #7
    Amazing is offline Senior Member
    Join Date
    Nov 2008
    Posts
    103

    Default

    Any more ideas on how to disable watermark only on icon images, yet keep the watermark on medium and large (for multi-images too)?

  8. #8
    Jao is offline Senior Member
    Join Date
    Oct 2008
    Posts
    1,132

    Default

    Code-Behind file: wolthuis.aspx.cs
    Event: Page_Load

    Code:
                        if (AppLogic.AppConfigBool("Watermark.Enabled") && ImgUrl.IndexOf("nopicture") == -1 && (CopyrightText.Length != 0 || CopyrightImage.Length != 0))
                        {
                        try
                        {
                            if (ImgSize == "icon")
                            {
                                imgPhoto = CommonLogic.AddWatermark(imgPhoto,"", CopyrightImage);
                            }
                            else
                            {
                                imgPhoto = CommonLogic.AddWatermark(imgPhoto, CopyrightText, CopyrightImage);
                            }
                        }
    See if that works for you...

  9. #9
    Amazing is offline Senior Member
    Join Date
    Nov 2008
    Posts
    103

    Default

    I see your logic, and while it seems it should work.. it yeilds the same result.

    Let me clarify... this is how we are setup
    1) Large, Medium and Icon images like normal are entered only as Large images and auto resized
    2) Multiple large images are also added to the Multi-image manager, which also get auto resized
    3) it is setup to use the mouse-over function on the product details such that the medium picutre auto updates on mouse-over.
    4) We are setup to watermark using text only, not images (for watermark)

    With the default code in 8.0.0.0. it watermarks everything...

    With the first mod in this thread it works great to eliminate the icon watermarks, and still show the medium and large images with watermarks... but as soon as you do a mouseover on one of the additional images the watermark is gone.

    With the additonal else clause as shown in the last post.. the result is exactly the same as without...

    I think it must be handling the mouse-over images differently, but the confusing part is when you remove the if all together, everything is watermarked including the mouse-over images... go figure.

  10. #10
    Jao is offline Senior Member
    Join Date
    Oct 2008
    Posts
    1,132

    Default

    Try adding this:
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    on the template.ascx directive. Let's give this one a shot. Please remember to ensure a backup of everything prior to any change...

  11. #11
    Amazing is offline Senior Member
    Join Date
    Nov 2008
    Posts
    103

    Default

    Sadly... didn't help.

    It did cause a bunch of other CSS problems, but the result with the watermarking was still the same.

    1) no watermark on icons (which is good)
    2) watermark on medium images on page render (which is good)
    3) when mouseover action on micro-images happens watermarks on the medium images displayed are shown without watermark.
    4) watermark on all large images (which is good)

  12. #12
    Jao is offline Senior Member
    Join Date
    Oct 2008
    Posts
    1,132

    Default

    Could you provide us a link to that product so that we could clearly see what you mean?