We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 11410
    • 3 Posts
    Hi All,

    First of all this is my first time on the forums so hello! Name’s Owen. smiley

    Secondly I’ve just finished the beta of my first ModX site. Thought I’d give everyone a sneak peak at it. The code is a mess and I have a feeling its not compliant but its working so thats a start at least smiley...

    The Concept:
    Make a site that provides Flash-like effects, is search engine indexable, and has ModX on the backend.

    Details:
    I chose to stick with Scriptaculous for the moment even though its a little heavy for what the site needs to do. I’ve also avoided unobtrusive script and standards compliance until it was fully functioning. This was largely due to timeline and laziness. I’ll be reworking the code over the next month or so.

    Feedback:
    I’d certainly welcome it including advise on how to clean things up. This is my first use of ModX so it could use improvement. Please keep them constructive however smiley

    Anyways... enjoy!

    http://www.thirdfloordesign.com

    Oh one last thing this site is a fashion lingerie site... so viewer discression is advised... tongue

    Cheers,
    Owen
      • 25663 MODX Staff
      • 12,272 Posts
      Nicely done. Doesn’t play nicely in Safari though (doesn’t load). Nice galleries across the board.
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 22303 MODX Staff
        • 10,725 Posts
        Very nice concept and implementation Owen, and welcome to the MODx community.

        I’ll save the design criticism for, well, designers, but my only thought is that, like many Flash sites, none of the pages (or even sections) of content can be bookmarked uniquely (i.e. the URL is always the same). Not sure there is an easy way around that with this type of site now that I think about it, but if there was...that’d be cool.

        Cheers indeed!
          • 11410
          • 3 Posts
          rthrash... thanks... and thanks for the info... yeah I’ve only been working with Firefox and IE for the moment. I’m certainly concerned about Mac users, but I don’t happen to have one at home yet so I usually test things post for it... I expect Safari will be broken till I’ve rewritten the code to something a little more managable as it would be difficult to debug before then... smiley

          opengeek... thats interesting cuz thats actually how I had it originally... I had it so that all pages were individual complete pages... however the framework for the site would stall on loading, and the constant reloading of the menu had an irritating visual effect... also having everything reloading made everything jerky because of the page loading time so I opted out of that approach towards the current system even though iframes are not my prefered technique... bookmarking is a problem... I think this could be handled a little bit with some custom scripts for bookmarking or deliciousing (word?) the page... but you’re right its a bit of a technology issue... lesser of two evils as it were...

          that reminds me of something interesting that I was running into... the ability to share a library script like scriptaculous across multiple files... what I’d like to do is load scriptaculous in the main file once... then have the individual pages (or an external library) control the DOM for all the transitions in different frames... now admittedly I haven’t played with it too much so maybe its very simple and already exists... does anyone know if this can be done? target elements outside of the active frame with Scriptaculous? Here’s a couple of horrible examples... smiley

          New Effect.Opacity(top.main_content.loader, ... // targets the "loader" in the "main_content" frame of the top level
          New Effect.Opacity(_parent.top_navigation, ... // targets the "top_navigation" of the parent frame

          You get the idea... it would be really nice to do that as then I wouldn’t need to worry about justifying the filesize of the library... just include it in a hidden frame or something and manipulate the DOM through Ajax or the like...

          Again thanks for the comments!

          Cheers,
          Owen
            • 2873
            • 106 Posts
            nice girls.
            nothing more to say.
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              The Manager does that a lot to work between the Document Tree and the main working frame. I’ve learned how to manipulate it so that clicking on a document in the Tree returns the document’s ID to a given function in the main frame for processing. Neat stuff...if you like frames.

              In manager/frames/3.php (the document tree frame):
              		if(ca=="parent") {
              			try {
              				parent.main.setParent(id, name);
              			} catch(oException) {
              				alert('<?php echo $_lang['unable_set_parent']; ?>');
              			}
              		}
              		if(ca=="link") {
              			try {
              				parent.main.setLink(id);
              			} catch(oException) {
              				alert('<?php echo $_lang['unable_set_link']; ?>');
              			}
              		}
              

              and in manager/actions/dynamic/mutate_content.dynamic.php :
              function enableLinkSelection(b){
                parent.menu.ca = "link";
              	var closed = "media/style/<?php echo $manager_theme ? "$manager_theme/":""; ?>images/tree/folder.gif";
              	var opened = "media/style/<?php echo $manager_theme ? "$manager_theme/":""; ?>images/tree/folderopen.gif";
              	if(b) {
              		document.images["llock"].src = opened;
              		allowLinkSelection = true;
              	}
              	else {
              		document.images["llock"].src = closed;
              		allowLinkSelection = false;
              	}
              }
              
              function setLink(lId) {
              	if (!allowLinkSelection) {
              		window.location.href="index.php?a=3&id="+lId;
              		return;
              	}
              	else {	
              			documentDirty=true;
              			document.mutate.ta.value=lId;
              	}
              }
              

              The setLink function will cause the click on the tree to behave normally if link selection hasn’t been allowed, while if it has (the little folder icon has been clicked) it sets the ID as the value for the link. This is a hack I did to let you click on the document tree to use the document ID as an internal link in weblinks. It’s pretty much just a slight variation on the set parent feature.
                Studying MODX in the desert - http://sottwell.com
                Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                Join the Slack Community - http://modx.org
                • 11410
                • 3 Posts
                hmmm good input... i’ll have to look in depth into the code in that area... and the content manager in general... one thing though your example code doesn’t seem to have any scriptaculous specific code... am I missing something? The problem for me isn’t so much the communication between frames as the communication between frames through scriptaculous... just to clarify... I like your suggestion a lot its as good a place as anywhere to look into the problem I would think laugh Thanks again for the suggestion!
                  • 36805
                  • 354 Posts
                  A very nice website design. However the links in the navigation and to an even greater extend the links in the content area are very difficult to see. On my screen they are nearly as white as the background.
                    • 22302
                    • 42 Posts
                    The navigation is great and I like how the products are shown. But please work on the typography. Text is way too small and hardly readable when it’s light gray on white. Maybe try to add some colors in the text too, for the links or the titles. Keep the good work.
                      [b]Benoit Deziel[b]