Welcome to TalkGraphics.com
Page 2 of 2 FirstFirst 12
Results 11 to 20 of 20
  1. #11
    Join Date
    Feb 2001
    Location
    Surrey, BC, Canada
    Posts
    2,379

    Default Re: Dynamic content. Volunteers needed.

    Hi don't know if you referiring to my attempt or not.
    but here is the "theme" I am tring to mimick.
    fiblack3.zip
    I am attempting to decipher which is the part to use.
    Jim
    IP

  2. #12
    Join Date
    Mar 2009
    Posts
    21

    Default Re: Dynamic content. Volunteers needed.

    I run a few cms/data-based sites using SohoLaunch and Php Runner.
    I'd be more than happy to test. I was planning on seeing how far I could get with placeholders over the next couple of days anyway and this sounds far more promising.
    IP

  3. #13

    Default Re: Dynamic content. Volunteers needed.

    Quote Originally Posted by covoxer View Post
    If you want to insert server script generated content into WD design then you may encounter a problem with a static layout of the page. One solution is to place it within a scroll box. But this doesn't look great.
    So I think I can try to write a snippet to provide some dynamic capabilities.

    Now, if enyone is interested and have a design that he want to use with dynamic content and has a server that generates this content, so, generally is ready to try out the script, please answer in this thread.

    Thank you.
    I routinely build my pages using PHP includes. Notices for holidays, sales etc., appear and disappear according to date. Clients love it because they don't have to pay for these changes - they are programmed into the site. The problem is the include sizes can vary. This isn't a problem unless one is using fixed layouts like XWD.
    Adding a PHP include is certainly no issue since one can use a placeholder but the differing size of the includes will create havoc with the displayed page. A program that seems to get around this issue well is Dynamic HTML Editor from Italy. I already love XWD and don't know if I can be any help resolving this issue or not. Let me know.

    Richard
    IP

  4. #14
    Join Date
    Aug 2004
    Location
    Ukraine
    Posts
    3,904

    Default Re: Dynamic content. Volunteers needed.

    Yes, you can help.
    Provide me with the example of WD design that you want to use with dynamic content (PHP include). Use placeholder for the PHP content.
    Also it would be great if you publish it. Do not bother with overflowing content yet, that's what I'm going to fix with your assistance. Lookig at your design I'll be able to use an optimum approach for this solution.
    John.
    IP

  5. #15
    Join Date
    Aug 2000
    Location
    Raisio, Finland
    Posts
    1,341

    Default Re: Dynamic content. Volunteers needed.

    I'm interested... I would like to have some non-blog pages that would match my "blog-design" which is Wordpress generated, and it would be nice to insert for example the latest headers or posts from the blog. My wordpress pages are located at http://www.gnurf.net/v3/
    Paul the Gnurfmeister!
    Home: http://www.gnurf.net/v3/ | My stuff for sale: http://www.zazzle.com/gnurf* | Follow me on Twitter: http://twitter.com/pasoderholm


    IP

  6. #16
    Join Date
    Aug 2004
    Location
    Ukraine
    Posts
    3,904

    Default Re: Dynamic content. Volunteers needed.

    Ok, I have something to show you.
    Here you can see the example of WD page with dynamic content: http://rgaa.co.uk/newsrelease/members/johntest2d.php
    The design file is attached (except for the php code which you have to replace with your own).

    So, how is it done?
    The main idea is that you have your main design as usually, and you have a footer part. When inserted content is larger than its placeholder, the footer part is automatically pushed down. This is somewhat similar to the sticky footer tweak ( http://www.talkgraphics.com/showthread.php?t=36983 ).
    One another optional element (same as in sticky footer tweak), is a background object. This object is automatically stretched vertically to the height of the page.

    So, here we go:
    1. Place your footer on a separate static layer in your design to make following manipulations easier.
    2. Add two placeholders with any size and positioning to this layer. Make sure that first one is the bottom object in this layer (Ctrl+B), and the second is the topmost (Ctrl+F).
    Actually you can skip the layer, simply all object between these two placeholders will be treated as a footer.
    3. Add following code the bottom placeholder:
    Code:
    </div>
    <script type="text/javascript">
    var my_d_oldload=window.onload;
    window.onload=my_d_load;
    function my_d_load(e){
    if(my_d_oldload) my_d_oldload(e);
    var dc=document.getElementById('my_d_content');
    var ft=document.getElementById('my_d_footer');
    var bg=document.getElementById('my_background');
    var dx=0;
    if(dc){var h0=parseInt(dc.parentNode.style.height);
    if(h0<dc.offsetHeight)dx=dc.offsetHeight-h0;
    ft.style.top=dx+'px';
    xr_xr.style.clip='rect(0px, '+parseInt(xr_xr.style.width)+'px, '+(parseInt(xr_xr.style.height)+dx)+'px, 0px)';
    if(bg)bg.style.height=parseInt(xr_xr.style.height)+dx-parseInt(bg.style.top)+'px';
    };};
    </script>
    <div id='my_d_footer' style="top:0px;left:0px;position:absolute;">
    <div>
    4. Add following code to the topmost placeholder:
    Code:
    </div>
    5. If you have a background object, add name "my_background" to it.
    6. Create placeholder for the dynamic content. It has to represent minimum area used for this content. It will grow if needed. Replace empty php with your php in the following code and put it to the placeholder:
    Code:
    <div id="my_d_content" style="width:100%; position:absolute;">
    
    <?php ?>
    
    </div>
    All comment and suggestions are welcome.
    Attached Files Attached Files
    John.
    IP

  7. #17

    Default Re: Dynamic content. Volunteers needed.

    That's very smart John.

    I will need to study this a bit to fully appreciate how this works.
    IP

  8. #18

    Default Re: Dynamic content. Volunteers needed.

    Quote Originally Posted by covoxer
    The main idea is that you have your main design as usually, and you have a footer part. When inserted content is larger than its placeholder, the footer part is automatically pushed down.
    This directly addresses a feature-want that I'd not yet published here!

    While at jury duty last friday, I wrote:
    Why not have a dynamic page lengthing option (at 'Web Properties > Page')? As content is added beyond the current page length, it is dynamically adjusted (based on some margin setting and/or the position of some defined footer).
    Thanks for shifting in that direction.
    IP

  9. #19

    Default Re: Dynamic content. Volunteers needed.

    Hey John ... did you hear the improvements to Placeholders that I was thinking about this last Sunday afternoon, too?
    IP

  10. #20

    Thumbs up Re: Dynamic content. Volunteers needed.

    Quote Originally Posted by covoxer View Post
    Ok, I have something to show you.
    Here you can see the example of WD page with dynamic content: http://rgaa.co.uk/newsrelease/members/johntest2d.php
    The design file is attached (except for the php code which you have to replace with your own).

    So, how is it done?
    The main idea is that you have your main design as usually, and you have a footer part. When inserted content is larger than its placeholder, the footer part is automatically pushed down. This is somewhat similar to the sticky footer tweak ( http://www.talkgraphics.com/showthread.php?t=36983 ).
    One another optional element (same as in sticky footer tweak), is a background object. This object is automatically stretched vertically to the height of the page.

    So, here we go:
    1. Place your footer on a separate static layer in your design to make following manipulations easier.
    2. Add two placeholders with any size and positioning to this layer. Make sure that first one is the bottom object in this layer (Ctrl+B), and the second is the topmost (Ctrl+F).
    Actually you can skip the layer, simply all object between these two placeholders will be treated as a footer.
    3. Add following code the bottom placeholder:
    Code:
    </div>
    <script type="text/javascript">
    var my_d_oldload=window.onload;
    window.onload=my_d_load;
    function my_d_load(e){
    if(my_d_oldload) my_d_oldload(e);
    var dc=document.getElementById('my_d_content');
    var ft=document.getElementById('my_d_footer');
    var bg=document.getElementById('my_background');
    var dx=0;
    if(dc){var h0=parseInt(dc.parentNode.style.height);
    if(h0<dc.offsetHeight)dx=dc.offsetHeight-h0;
    ft.style.top=dx+'px';
    xr_xr.style.clip='rect(0px, '+parseInt(xr_xr.style.width)+'px, '+(parseInt(xr_xr.style.height)+dx)+'px, 0px)';
    if(bg)bg.style.height=parseInt(xr_xr.style.height)+dx-parseInt(bg.style.top)+'px';
    };};
    </script>
    <div id='my_d_footer' style="top:0px;left:0px;position:absolute;">
    <div>
    4. Add following code to the topmost placeholder:
    Code:
    </div>
    5. If you have a background object, add name "my_background" to it.
    6. Create placeholder for the dynamic content. It has to represent minimum area used for this content. It will grow if needed. Replace empty php with your php in the following code and put it to the placeholder:
    Code:
    <div id="my_d_content" style="width:100%; position:absolute;">
    
    <?php ?>
    
    </div>
    All comment and suggestions are welcome.
    BRILLIANT! I tested it out online every way to Sunday and it worked! I was so excited that I tweaked the page a bit and now, even with dynamic content - the page validates. See attached .txt file which needs to be renamed to a .php file and my .php includes replaced by your php code. All that was needed was the opening and closing brackets inside your script that eliminates the validation errors.
    This is definitely a XWD gem! I also realize most graphic, non-coders will think we have a mental problem.
    Attached Files Attached Files
    Last edited by richinri; 20 March 2009 at 05:02 AM.
    IP

 

 

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
  •