Welcome to TalkGraphics.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2017
    Location
    NJ, near Princeton Univ (USA), midway between NYC and Philly
    Posts
    49

    Default How find "hidden" code in web project (placeholders, widgets, etc)?

    I just started experimenting with some 3rd party web templates, and while waiting for feedback from the developer, started to explore on my own to see if I could figure out how text objects on a hidden page become image files for the included WowSlider to display. I still haven't figured that out just yet, but...while investigating I've been looking at properties of seemingly related objects, and noticed a name "htmlclass = hide recipient-email" assigned to a few otherwise innocent looking placeholder items.

    So...I was hoping to understand what this is intended to accomplish, and started looking for other placeholders that might hold embedded Javascript. So far, no luck.

    This raises a couple of questions for me:

    1. Is it possible to search through an entire project (I'm using Designer Pro, but this would apply to that or to Web Designer) to locate ALL placeholders, anywhere in the project?
    2. Is there documentation available to us that illustrates how widgets are built for use / integration with these Xara products?
    3. Any insight into a way of using WowSlider where I can essentially have it convert text objects, on the fly, into the image objects it displays?



    While I like being able to add in extra functionality and features via widgets and placeholders, I'm also concerned about "black boxes" winding up embedded in my projects, perhaps via these 3rd party widgets and/or templates.

    Thanks for any thoughts on these.

    Jon

    EDIT: Well, I figured out the WowSlider text question. Turns out that the object holding the text that winds up animated in the slider was in a copy on one of the variant pages that I had missed editing (and that was the one showing when I tested the page... DOH!). I'm starting to think perhaps the hidden recipient email address will turn out to be associated with some contact-us logic, but I'm not certain yet... Again though - if anyone knows how to locate any/all placeholders in a project, I'd be very interested in this, as well as learning about how Widgets are developed / coded, etc. Thx!
    Last edited by jonstrong; 17 March 2018 at 01:22 AM.

  2. #2
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,814

    Info Re: How find "hidden" code in web project (placeholders, widgets, etc)?

    Jon, if you place code in the Placeholder body, the Page & Layer gallery shows it as HTML Placeholder.
    Sadly, if it is in the Placeholder head, it states as the particular shape, typically Rectangle.

    Ignoring Xara's inconsistencies, you can give each Placeholder a Name.
    This means, the HTML code will show it as have an ID of that Name.
    Also, the Name gallery will display the Used Names on a Page so it is easy to find one. Sadly, page by page and only for XDPX.

    I occasionally, add a !Code layer and hide it. You have to name it !something so it is published even when hidden (https://www.talkgraphics.com/showthr...anced-features #2).

    Finally, I sometimes create a very special Shape with a label it "CSS3-style effect" or "jQuery-action" and change that into a Placeholder so I can remember which blob is doing what.

    No documentation on how Widgets are assembled but siran is the one who has done the most on this aspect.
    Dig out a text editor and look at some *.xwr files in your local cache.

    I need an example of what you are trying in WowSlider.

    The htmlclass was a Tweak introduced after I asked for it.
    It is a special Name that adds the quoted text as a number of classes.
    Your example htmlclass = "hide recipient-email" (corrected the quotes) adds the class of hide and the class of recipient-email to the object's HTML.

    Acorn
    Acorn - installed Xara software: Cloud+/Pro+ and most others back through time (to CC's Artworks). Contact for technical remediation/consultancy for your web designs.
    When we provide assistance, your responses are valuable as they benefit the community. TG Nuggets you might like. Report faults: Xara Cloud+/Pro+/Magix Legacy; Xara KB & Chat

  3. #3
    Join Date
    Apr 2017
    Location
    NJ, near Princeton Univ (USA), midway between NYC and Philly
    Posts
    49

    Default Re: How find "hidden" code in web project (placeholders, widgets, etc)?

    Quote Originally Posted by Acorn View Post
    Jon, if you place code in the Placeholder body, the Page & Layer gallery shows it as HTML Placeholder.
    Sadly, if it is in the Placeholder head, it states as the particular shape, typically Rectangle.

    Ignoring Xara's inconsistencies, you can give each Placeholder a Name.
    This means, the HTML code will show it as have an ID of that Name.
    Also, the Name gallery will display the Used Names on a Page so it is easy to find one. Sadly, page by page and only for XDPX.

    I occasionally, add a !Code layer and hide it. You have to name it !something so it is published even when hidden
    Acorn
    Excellent - good info - thank you. I've created my own placeholders for various projects in the past, embedding CSS, jQuery and PHP code in pages, all to good effect. But I wasn't aware of the items you describe; good to know.

    What I was frustrated at, though, occurred when I tried loading up a 3rd party web template as a starting point, and realized there were various placeholders strewn throughout it. I wanted to know what kind of code might be hidden in whatever placeholders were there, so I was hoping to be able to find / search for placeholders in the project. I can open up the pages and layers, and inspect the objects on them one by one, but this can be awfully tedious and time consuming. I was hoping that there might be an option in the Find dialogue to let me search for (for example) the next placeholder. But that feature doesn't seem to exist. Additionally, it appears that Find doesn't look at text that IS embedded in placeholders. So - even if I tried doing a Find for "div" or "class" or "html" I would get no search results, even if these words were part of the text embedded in a placeholder within the site project. While using your suggestions would make it easy for me to keep track of my own placeholders, it would be truly useful to be able to easily locate placeholders via the Find dialogue - for those projects where I might not have been so disciplined, or that I inherit from somebody else, or when I use a third party template.

    Quote Originally Posted by Acorn View Post
    No documentation on how Widgets are assembled but siran is the one who has done the most on this aspect.
    Dig out a text editor and look at some *.xwr files in your local cache.
    Thanks. I'll do some sleuthing. This seems like an enormous lost opportunity for Magix / Xara. I'd think many more developers would create widgets if the process were more accessible.

    Quote Originally Posted by Acorn View Post
    I need an example of what you are trying in WowSlider.
    I got that working. Turns out that what I hadn't edited the relevant items in all the site variants -- I had been sloppy. Once I found and edited all the variants, the slider works as expected.

    Thanks again for the quick response and great info!

    Jon

 

 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •