Welcome to TalkGraphics.com
Results 1 to 8 of 8

Thread: Hacking Xara...

  1. #1
    Join Date
    Nov 2000
    Location
    Wichita Falls, Texas
    Posts
    300

    Default

    Not to shock anyone, but I call it "hacking" because what I'm looking for is not obvious and I suspect it would take some in-depth code manipulation...

    So, here it is...

    I like using Xara X to create navbars with mouseover effects. The only thing that I really detest is the fact that all the images get put in the same folder as the .htm file. When I design websites I like to keep all my images in one folder (separate from the webpages). So I have to go into the htm file that Xara generates and do a find and replace to add /images in from of every graphic - quite a pain... not mention what happens if you try creating two navbars on one webpage.

    Why not this...
    It would be great if I could find the template Xara uses to generate this html and modify it.

    How is everyone else working with this issue?

    Robert
    Robert Steflik
    www.wfcentral.com
    ASUS Laptop / Windows 10 ---- Xara Designer Pro X11 ---- Xara owner since version 1.0

  2. #2
    Join Date
    Nov 2000
    Location
    Wichita Falls, Texas
    Posts
    300

    Default

    Not to shock anyone, but I call it "hacking" because what I'm looking for is not obvious and I suspect it would take some in-depth code manipulation...

    So, here it is...

    I like using Xara X to create navbars with mouseover effects. The only thing that I really detest is the fact that all the images get put in the same folder as the .htm file. When I design websites I like to keep all my images in one folder (separate from the webpages). So I have to go into the htm file that Xara generates and do a find and replace to add /images in from of every graphic - quite a pain... not mention what happens if you try creating two navbars on one webpage.

    Why not this...
    It would be great if I could find the template Xara uses to generate this html and modify it.

    How is everyone else working with this issue?

    Robert
    Robert Steflik
    www.wfcentral.com
    ASUS Laptop / Windows 10 ---- Xara Designer Pro X11 ---- Xara owner since version 1.0

  3. #3
    Join Date
    Dec 2002
    Location
    Nr. Reading, UK
    Posts
    147

    Default

    If finding and modifying the Xara "Template" (if there is one) isn't easy, why not just postprocess the files?

    A few years ago on a Unix box you'd have used the shell and sed (stream editor), these days most people use perl, and that runs on almost all platforms.

    Perl is excellent at this kind of text processing.
    If you have any coding/scripting experience writing a fairly general bulk-edit script in perl is pretty straightforward.

    Regards: Vole

    Regards: Colin

  4. #4
    Join Date
    Feb 2002
    Location
    Westminster, Colorado USA
    Posts
    1,017

    Default


    It is much quicker to alter the code for the few other graphics slightly, such as <2img src="...., then use this to Replace: Find [img] and Replace with <img src=[/img]

    http://talkgraphics.infopop.net/1/Op...&ul=1101906325
    Why, I’m afraid I can’t explain myself, sir, because I’m not myself, you know...
    - Lewis Carroll

  5. #5
    Join Date
    Feb 2002
    Location
    Westminster, Colorado USA
    Posts
    1,017

    Default


    This forum has a tendency to lose the Disable HTML function when you edit a post.

    Here is what you do for global replacement:

    1 - Change the image tags for the images you do NOT want to change. Use <img2 src=" or something like that.

    2 - Replace - <img src="

    3 - Replace All with - <img src="images/

    4 - Change back your other image tags

    The entire process takes only a minute or two, which is much quicker than going through and changing every tag one by one.

    http://talkgraphics.infopop.net/1/Op...&ul=1101906325
    Why, I’m afraid I can’t explain myself, sir, because I’m not myself, you know...
    - Lewis Carroll

  6. #6
    Join Date
    Apr 2003
    Location
    Blacksburg, VA USA
    Posts
    223

    Default

    Robert,

    I use Dreamweaver to make my WebPages and inside Dreamweaver you have a simple file manager that when you move, copy or change the files name or location it automatically updates the code of the referenced WebPages...

    So doing a move for all the image files to another image folder is quite easy...

  7. #7
    Join Date
    Nov 2000
    Location
    Wichita Falls, Texas
    Posts
    300

    Default

    Here are my responses to your comments...

    PERL - yes, I can do perl but I'm not going to write a custom script just to go in and replace img tags on the fly. It's easier to use Homesite and do a find-and-replace.

    FIND AND REPLACE - this is what I currently do. I move the images to a subfolder called "images" then I use homesite to do a find and replace to set the new image path. It gets tricky if you are dealing with advanced navbars that have mouseovers because the img tags inside the javascript are different. It's a real pain.

    DREAMWEAVER - I prefer not to use dreamweaver. I have coded all of my pages by hand since 1997 and prefer to be in total control of my code. I am not happy with all the extra junk that WYSIWYG editors add in - though dreamweaver has gotten "better"

    THE SIMPLE SOLUTION - most sophisticated programs use a template to base their automatic outputs on. Xara has chosen to hide this template "inside" their program so that you can't customize it. It would be FAR more useful to the xara community if these were external.

    Thanks anyway...
    Robert Steflik
    www.wfcentral.com
    ASUS Laptop / Windows 10 ---- Xara Designer Pro X11 ---- Xara owner since version 1.0

  8. #8
    Join Date
    Dec 2002
    Location
    Nr. Reading, UK
    Posts
    147

    Default

    Re: "yes, I can do perl but I'm not going to write a custom script just to go in and replace img tags on the fly. It's easier to use Homesite and do a find-and-replace."

    Your decision of course as to what works best for you. The advantage of a filter script is that you
    may find other repeated edits can be easily incorporated, you don't forget to make the some of the edits required if the script does them all, and maybe you could make the script an automated task (scheduled or cron job, for Windoze/Unix) so You don't have to remember to do anything at all.

    Regards: Colin

 

 

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
  •