We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4385
    • 372 Posts
    I just installed Revo last night on a site I am doing for a client. I going to use it to learn Revo real fast. I think it is going to be a simple site so I don’t think it will be any trouble.

    But as I am putting together the site I need to make an under construction page (client request, don’t ask). Any how I found this one that liked and thought it would be perfect for another site during maintenance. So I thought this would be a good opportunity to make a package template. But what is the best way to do this?

    Let me show what I’ve got.

    http://smartbizness.com/down-for-maintence.html

    I added three Property sets [message,description,date] I also added a system setting for site_logo (why isn’t this standard?).
    So you can go in and change the message from "offline" to "under construction" very easily.

    So the top part is handled by property sets, no template variables or chunks. But I am stuck for the bottom half. Should the other parts be snippet,chunks, etc.? I would like to share with others and make as turn-key as possible.


    I got the layout and code from here http://www.ourtuts.com/free-site-under-construction-template/ I sent the author an email asking if it was ok to convert to MODx. If he says no I can always take the time to re-skin it.

    Got the icons from http://webtreats.mysitemyway.com/108-free-matte-white-square-social-networking-icons/
      DropboxUploader -- Upload files to a Dropbox account.
      DIG -- Dynamic Image Generator
      gus -- Google URL Shortener
      makeQR -- Uses google chart api to make QR codes.
      MODxTweeter -- Update your twitter status on publish.
      • 3749
      • 24,544 Posts
      bwente, It’s a cool idea. I’m a little confused by your description, though. Default properties and property sets are new enough that it’s hard to know how to talk about them.

      It sounds like you have three properties, not three property sets, and I’m guessing that they are default properties of the template. If that’s right, then no actual property set is involved at all. Property sets are separate objects that exist independently of any element. Default properties are usually the ones created when the object is installed. They are stored in the same table as the object, while property sets are not.

      Also, the graphic (which is very cool) implies that the whole site is down, rather than that a page is under construction.

      That said, packaging this up would simply be a matter of using PackMan to package up the template. The default properties (assuming that I’m right about that) should come along for the ride.

      BTW, the suggestion of a site_logo system setting is a great one. I hope you’ll file it as a feature request in Jira so it doesn’t fall through the cracks. In the meantime, it’s easy to go to System->System Settings and add it yourself. Or you could just make it another default property of the template.
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 4385
        • 372 Posts
        BobRay

        You are right they are the default properties for the template. I just clicked and created things then put some tags in my template to see what showed up. wink

        The idea is that you could change the text and have say whatever you wanted for the countdown.

        Here is the package, but I am not sure if everything got in to the right place.

          DropboxUploader -- Upload files to a Dropbox account.
          DIG -- Dynamic Image Generator
          gus -- Google URL Shortener
          makeQR -- Uses google chart api to make QR codes.
          MODxTweeter -- Update your twitter status on publish.
          • 3749
          • 24,544 Posts
          It looks like the CSS files and images are not getting where they belong.

          It also looks like the component might use a custom database table (from the error message when installing it). PackMan can’t handle that, so you’d have to create a regular transport package script instead of using PackMan.

          BTW, I wonder if it might be better as a chunk rather than a template, with maybe a snippet in the chunk to inject the JS. That way you could insert it in any template with a chunk tag (and define the properties as parameters in the chunk tag).
            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting
            • 4385
            • 372 Posts
            Like I said I am not sure what is the best way to make it. In some case I would want to throw it on a site before I have anything. So a standalone template would be nice. In some case I would want it to match the site.

            Here is the template I am using.


            <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
            <html xmlns="http://www.w3.org/1999/xhtml">
            <head>
            <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
            <title>Site under construction</title>
            
            
            <link rel="stylesheet" type="text/css" href="countdown/css/style.css" />
            <script type="text/javascript" src="http://code.jquery.com/jquery-latest.pack.js"></script>
            <script type="text/javascript" src="countdown/js/jquery.countdown.js"></script>
            <script type="text/javascript" src="countdown/js/jcarousellite1.0.1_min.js"></script>
            
            
            <!-- jquery countdown-->
            <script type="text/javascript">
            $(function () {
            var austDay = new Date();
            	austDay = new Date("[[+date]]");
            	$('#defaultCountdown').countdown({until: austDay, layout: '{dn} {dl}, {hn} {hl}, {mn} {ml}, and {sn} {sl}'});
            	$('#year').text(austDay.getFullYear());
            	});
            </script>
            
            
            <!-- jquery slider -->
            <script type="text/javascript">
            
            $(function() {
                $("#slidertext").jCarouselLite({
                    btnNext: ".next",
                    btnPrev: ".prev"
                });
            });
            
            </script>
            
            <!--script for IE6-image transparency recover-->
            <!--[if IE 6]>
            <script type="text/javascript" src="countdown/js/DD_belatedPNG_0.0.7a-min.js"></script>
            <script>
              /* EXAMPLE */
              DD_belatedPNG.fix('#logo img,#main,.counter,.twitter,.flickr,.facebook,.delicious,#submit_button,.prev img,.next img,#email_input');
              
            </script>
            <![endif]--> 
            </head>
            
            <body>
            <div class="container">
            	
                <div id="header">
                
                	<div id="logo">
                    	<a href="[[++site_url]]"><img src="[[++site_logo]]" alt="logo"/></a>
                    </div><!--end logo-->
                        
                    <div id="contact_details">
                    	<p><a href="#">[email protected]</a></p>
            		<p><a href="#">phone : 555-534-231</a></p>
            		</div><!--end contact details-->     
                            
            	</div><!--end header-->
                          <div style="clear:both"></div> 
                          
            	<div id="main">
            
            		 <div id="content">
                                
                          <div class="text">
                          <h2>[[+message]]</h2>
                          </div><!--end text-->
                              
                          <div class="counter">
                          <h3>[[+description]]</h3>
                          <div id="defaultCountdown"></div>
            
                     </div><!--end counter-->
                             
                     <div class="details">
                          <!--slider prev button-->    
                        <a class="prev" href="#"><img src="countdown/images/prev.png" alt="" /> 
                        </a>
            
                              <div id="sliderwrap">
                              		<div id="slidertext"><!-- The slider -->
                                        
                                            <ul>
                                                 <li>
                                                     <h3>You may find us below:</h3>
                                                     <div class="social">
                                                     <a href="#" class="twitter"></a>
                                                     <a href="#" class="flickr"></a>
                                                     <a href="#" class="facebook"></a>
                                                     <a href="#" class="delicious"></a>
                                                     </div>
                                                 </li><!-- Slider item -->
                                        
                                            	 <li>
                                                    <h3>Type your email id to get the updates!</h3>
                                                   
                                                   
                                                   <!-- <form action="emailhandler.php" method="post" id="email">
                                                    <div id="submitwrapper">
                                                    <div ><input type="text" name="email" size="30" value="Enter Your E-mail" onfocus="if(this.value=='Enter Your E-mail'){this.value=''};" 	onblur="if(this.value==''){this.value='Enter Your E-mail'};" id="email_input" /> 
                                                    </div> 
                                                    <div ><input type="submit" name="Submit" value="Submit" border="none" id="submit_button"/>
                                                    </div>
                                                    </div>
                                                    </form> -->
            
            
                                                   
                                                   
                                                   
                                                 <form method="post" id="subscribeform" action="emailform.php">
                                                    <p>
                                                    <div id="email_input"><input name="email" type="text" size="30" value="Enter Your E-mail" onfocus="if(this.value=='Enter Your E-mail'){this.value=''};" 	onblur="if(this.value==''){this.value='Enter Your E-mail'};" id="email" /> 
                                                    <input type="submit" id="submit_button" value="Submit" size="80" />
                                                    </div>
                                                    <br />
                                                    
                                                    </p>
                                                    
                                                    </form>
            
            
                                             
                                             	</li><!-- Slider item -->
                                             
                                             	<li>
                                                     <h3>Some words about us</h3>
                                                     <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Phasellus hendrerit. Pellentesque aliquet nibh nec urna. In nisi neque, aliquet vel, dapibus id, mattis vel, nisi.</p>
                                                    
                                             
                                            	 </li><!-- Slider item -->
                                        
                                            </ul>
                                        
                         	 </div><!-- End of slidertext -->
                
                          </div><!-- End of sliderwrap -->
            
            					<!--slider next button-->
                         	<a class="next" href="#"><img src="countdown/images/next.png" alt=""/></a>
            
                              
                              </div><!--end details-->  
                            </div><!--end content-->
                        
            </div><!--end main-->
            
            </div><!--end class container-->
            
            </body>
            
            </html>
            
            
              DropboxUploader -- Upload files to a Dropbox account.
              DIG -- Dynamic Image Generator
              gus -- Google URL Shortener
              makeQR -- Uses google chart api to make QR codes.
              MODxTweeter -- Update your twitter status on publish.
              • 3749
              • 24,544 Posts
              If it were a chunk and snippet, you could still pop a tag for it into the MODx minimal template and it should work, but it’s your add-on and you know best how you want to use it.

              It didn’t work for me when I installed the package. The best thing to do when developing is to have a separate MODx install with none of the component’s parts. Then copy the transport.zip file from core/packages in your development site to core/packages at the test site. Search locally for packages in Package Manager and install it. You’ll see if it works or not. It probably didn’t work for me because the .js files either weren’t included, or ended up in the wrong place.
                Did I help you? Buy me a beer
                Get my Book: MODX:The Official Guide
                MODX info for everyone: http://bobsguides.com/modx.html
                My MODX Extras
                Bob's Guides is now hosted at A2 MODX Hosting
                • 4385
                • 372 Posts
                That is why I thought I would ask. I wasn’t what was the best way. I have it working for myself, kinda. Not sure if i would really use it. But I thought someone else would. I was trying to make it as simple and as self contained as I could. FWIW I installed Git and set up a project. I am not even sure if I did that right. I am not too comfortable with command line stuff.

                http://github.com/bwente/Countdown-Template


                I could use some help setting it up for other people.

                  DropboxUploader -- Upload files to a Dropbox account.
                  DIG -- Dynamic Image Generator
                  gus -- Google URL Shortener
                  makeQR -- Uses google chart api to make QR codes.
                  MODxTweeter -- Update your twitter status on publish.
                  • 3749
                  • 24,544 Posts
                  I was able to download the transport package from your GitHub repository, so it must be OK. You might add in a readme.txt describing the necessary .js files and where they need to go since they’re not in the package.

                  If you want to let other people work on the code, you’d need to create a real transport package build script and add files with the source code and properties. You could take a look at one of the other packages (preferably something simple) to see how it’s done. For example: http://github.com/opengeek/getResources. Notice that the transport package isn’t at GitHub. It’s built when you run build.transport.php.
                    Did I help you? Buy me a beer
                    Get my Book: MODX:The Official Guide
                    MODX info for everyone: http://bobsguides.com/modx.html
                    My MODX Extras
                    Bob's Guides is now hosted at A2 MODX Hosting