Welcome to TalkGraphics.com
Page 1 of 2 12 LastLast
Results 1 to 10 of 16
  1. #1
    Join Date
    Dec 2000
    Location
    Canada
    Posts
    48

    Default Help with inserting PHP in web page

    I am sooo sorry if I am asking a repeat question, but I have been looking for hours and am just spinning my wheels.

    I am using Xara Designer Pro 8. My page is at http://www.angelchild.com/AngelChildXara/legacies.php . Most of the instructions for what I want to do are there, but the first thing I am struggling with is that the block with the names in it (mid page in blue as they will be links) will grow; they are fed from a database. I would like the names to flow into a second column (as the names/column gets too long) moving from the left column to the right that starts with "Leigh: Children's names inserted here. I also need those name-blocks to expand downward as there are more names added when both columns are full.

    Based on what I am reading and trying, a placeholder is what you need, but remains the size you make it and text will be hidden if it isn't big enough. Also, I believe text can't flow over to a second column; it will remain in one long column. I tried using a text flow box and placing the placeholder code within on the off chance that would work, but it didn't. The names all showing in one column will make for a very long page and for a lack of balance in this page. I will also have to come back occasionally and manually increase the size of my placeholder and lengthen my page - both not great solutions. Lots of advice I am seeing is from 2009 and later, and I am hoping someone has figured out a work around, or has some suggestions on how to accomplish what I am trying to do by now.

    Oh, and I don't know PHP; I am having someone else do that and he's pretty frustrated with me working with Xara as the generated code is "unfriendly" to him. I need a friendly solution that will work for both of us. Any thoughts?

    Anna

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

    Default Re: Help with inserting PHP in web page

    Anna, I would move away from a growing list as when it gets too big for two columns where do you go?

    Can you get the data in JSON format for ["Last Name", "First Name", "Date Added", etc]?
    If so then you can combine your Sort options and your data into a Table that automatically paginates, sorts and filters.

    That data can be manipulated as in http://www.datatables.net/examples/d...rces/ajax.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
    Dec 2000
    Location
    Canada
    Posts
    48

    Default Re: Help with inserting PHP in web page

    Thanks Acorn; I really appreciate your attempt to help me. This is very likely a very intelligent answer that is simply beyond my limited comprehension. I think what you're saying is to make it a "table" with columns of data that will result in a wider "table" that fills my page. Then, have 10 or so results (rows) per page, and to view other names/data, one selects the second page which load in the same spot - resulting in nothing that needs to grow up or downward. Phew! I think I have that right. My preference is to have most names on the first page, however, maybe that just can't work; the reason is the same as if you're name starts with a "V", no one ever gets to your record as it's buried on the 10th page.

    However, if I was to go in this direction, I am guessing that I can get the fellow to rearrange to that format (last name, first name, date added, etc) in the DB. But, and please excuse my rookie question and ignorance, where does one go from there? Is it a Java script that he needs or can that be done in PHP? And, is that all placed in a placeholder in Xara Designer.

  4. #4
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,744

    Default Re: Help with inserting PHP in web page

    Anna, here is a mini tutorial using an in-line HTML table.


    1. On a web page, create a largish Box
    2. Go to http://www.datatables.net/examples/b...iguration.html
    3. Find the HTML Tab under that displayed table
    4. Copy everything from <table> down to </table>
    5. With it selected, open Web Properties > Placeholder > HTML code (body)
    6. Paste in your table
    7. Click OK and then click Apply.


    If you Preview the page you will have a long table, which is truncated after a number of rows.


    1. On the web Properties > Page > HTML code (head) you would paste the following;
    2. Code:
      <link rel="stylesheet" type="text/css" href="//cdn.datatables.net/1.10.1/css/jquery.dataTables.css">
      
      <script type="text/javascript" language="javascript" src="//code.jquery.com/jquery-1.11.1.min.js"></script>
      <script type="text/javascript" language="javascript" src="//cdn.datatables.net/1.10.1/js/jquery.dataTables.min.js"></script>
          
      <script>
      $(document).ready(function() {
          $('#example').dataTable();
      } );
      </script>



    If you Preview the page, the table is now paginated.
    Unfortunately, at this point the detail as explained is not fully working as I've done something silly.

    To develop this for your needs, your PHP programmer has to create a file structure that can be AJAXed or JSONed from your server.
    You need to alter the zero configuration code to match the source format so it would be a search across the DataTables site.

    I have a working file somewhere but I thought giving you a heads up would get you started.

    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

  5. #5
    Join Date
    Dec 2000
    Location
    Canada
    Posts
    48

    Default Re: Help with inserting PHP in web page

    Whoa ..... That's amazingly above and beyond!!!!THANK YOU!!!

    I apologize for my late reply, but my checks of this page earlier this morning and afternoon didn't result in seeing this response from you; somehow I missed it as I see you responded last night. I'll work through this very thorough reply and see what my result is.

    Again, thank you!

    Anna

  6. #6
    Join Date
    Dec 2000
    Location
    Canada
    Posts
    48

    Default Re: Help with inserting PHP in web page

    Ok Acorn, I think that's working as expected ... http://www.angelchild.com/AngelChildXara/legacies.php Does that look right to you?

    Anna

  7. #7
    Join Date
    Aug 2000
    Location
    Harwich, Essex, England
    Posts
    21,895

    Default Re: Help with inserting PHP in web page

    Can't view your site Anna.
    It's not just you! http://www.angelchild.com looks down from here.
    Egg

    Intel i7 - 4790K Quad Core + 16 GB Ram + NVIDIA Geforce GTX 1660 Graphics Card + MSI Optix Mag321 Curv monitor
    + Samsung 970 EVO Plus 500GB SSD + 232 GB SSD + 250 GB SSD portable drive + ISP = BT + Web Hosting = TSO Host

  8. #8
    Join Date
    Dec 2000
    Location
    Canada
    Posts
    48

    Default Re: Help with inserting PHP in web page

    Thanks for the alert Egg. It's 9:30am here and I contacted the server owner as soon as I got your message. They need to do some changes to the server, but that will not be before about 11:30pm your time (4:30 mine). I get the site intermittently, but not enough for you fellows to see, I suspect. I'll let you know when it's up again.
    Anna

  9. #9
    Join Date
    Aug 2000
    Location
    Harwich, Essex, England
    Posts
    21,895

    Default Re: Help with inserting PHP in web page

    No problem Anna. Seven hours for a server to be down is pretty crap service
    Egg

    Intel i7 - 4790K Quad Core + 16 GB Ram + NVIDIA Geforce GTX 1660 Graphics Card + MSI Optix Mag321 Curv monitor
    + Samsung 970 EVO Plus 500GB SSD + 232 GB SSD + 250 GB SSD portable drive + ISP = BT + Web Hosting = TSO Host

  10. #10
    Join Date
    Dec 2000
    Location
    Canada
    Posts
    48

    Default Re: Help with inserting PHP in web page

    LOL; you're right. However, this is a friend's server and he does this as a favour to me, so I am patient and wait for him to have time. He will do it after work this evening.

    The site is a service and just me so any costs go out of my pocket, but never comes in. All good reasons for me to appreciate his contribution and support, and to wait as patiently as I am able.

 

 

Tags for this Thread

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
  •