Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search

foleyatwork

Member
  • Posts

    1,269
  • Joined

  • Last visited

  • Days Won

    4

Community Answers

  1. foleyatwork's post in Can I develop a database driven application on Squarespace? was marked as the answer   
    The modeling of the database is defined by Squarespace. That means you can't define your own data dictionary, for now at least. And our template language doesn't offer the logic a PHP developer would be used to.
    Squarespace is really great at giving end-users a seamless experience and giving developers solid building blocks to create templates. It is not an application framework.
    But if you are interested in using Squarespace as the host and template language, you can use Parse.com and create a JavaScript application. Check out this post for more info on that:
    http://answers.squarespace.com/questions/171/how-do-i-connect-a-developer-site-to-a-database
  2. foleyatwork's post in Can I backup my site? was marked as the answer   
    There are two reasons I can think of someone might want to backup their site:
    1. To maintain the freedom to switch platforms.
    You own your data on Squarespace and you can export it at any time. Just go to the Import / Export area of the config and you'll see a button like the one in the top right of this image. This keeps a backup of your data, not the site as a whole.

    2. To restore the site if you ever need to.
    You don't have to worry about backing up your site for this reason.
    I think a good analogy for non-managed hosts vs. Squarespace is the difference between a desktop computer and something like, say, Google Drive or Dropbox. With the former you are in charge of updates, backups, and other systems tasks. With the latter those things are taken care of for you.
    Squarespace is a managed service and, like Dropbox or Google Drive, we don't want our customers to have to worry about backing up their sites, updating software, or any other tasks that are better handled by an engineer.
  3. foleyatwork's post in How can I track form submissions in Google Analytics? was marked as the answer   
    Paste the following code into the footer code injection of your site.
    <script> Y.use('node', function() { Y.on('domready', function() { Y.all('.form-block').each(function(n) { var d = n.getData('block-json'); d = Y.JSON.parse(d); n.one('form').on('submit',function() { _gaq.push(['_trackEvent', d.formName + ' Submission', 'Form Submission', 'Submit']); }); }); }); }); </script>
    This is a one step process. Once you paste this code in your footer, each form will be tracked automatically with the form name in Google Analytics.
    Please post any feedback as a comment here. If there is a bug I will try and fix it.
    Also, please note this is not supported by Squarespace, even though I am a Squarespace employee. Support won't be able to help you out, but I will do my best to make sure this code works and stays up-do-date.
  4. foleyatwork's post in Code Block: How can I autoplay a video? was marked as the answer   
    Disclaimer: I almost always think autostarting videos is a terrible idea. Just my personal opinion. Please do good, not evil, with this answer.
    With YouTube you can just add ?autoplay=1 to the end of the iframe URL. For instance:
    <iframe width="420" height="315" src="http://www.youtube.com/embed/4KRZQQ_eICo?autoplay=1" frameborder="0" allowfullscreen></iframe>
  5. foleyatwork's post in How do I add a 'back' button? was marked as the answer   
    Here's a good post on CSS-Tricks about adding a back button to a page.
    http://css-tricks.com/snippets/javascript/go-back-button/
    As Chris points out, browsers have back buttons so this isn't necessary usually. But if you need to get it done, this code sample from the post will do the trick.
    <input type="button" value="Go Back From Whence You Came!" onclick="history.back(-1)" />
  6. foleyatwork's post in Can a block have its own background colour? was marked as the answer   
    Sure, it's not supported in most templates, but all it would take is a little Custom CSS. This is available on the consumer platform, but it will require a little bit of HTML/CSS knowledge.
    Each Squarespace block has the following markup by default.
    <div class="sqs-block-content" id="yui_3_5_0_1_1351742388720_92">...some block content...</div>
    You want to target the ID as the selector to change the background color of one specific block. It would be something like this in the Custom CSS.
    #yui_3_5_0_1_1351742388720_92 { background-color: #009999; }
    NOTE: The ID will be unique for your own block. The one I put in here is just some code I pasted from one of my sites. You will have to located the ID you want to target for this to work. The best way to do this is by using the element inspector in Chrome, Safari, or Firefox.
    UPDATE:I answered this a long time ago and it's a little inaccurate. The YUI IDs really shouldn't be styled, they are created dynamically and change on every page load.
  7. foleyatwork's post in How do I display a Facebook feed on my site? was marked as the answer   
    There are a few different ways to do this. By far the easiest is to use one of Facebook's social plugins:
    http://developers.facebook.com/docs/plugins/ (Like Box does what you're looking for, I think.)
    Those will generate code for you and all you have to do is paste it into the Code Block in Squarespace.
  8. foleyatwork's post in Can I control the size of images on mobile devices? was marked as the answer   
    This isn't a native Squarespace 6 option, but if you're handy with coding you could make it happen in developer mode. Just use a media query to target screens below a certain size; it might look something like this:
    @media screen and (max-device-width: 480px) { img { float: left; width: 200px; } }
    Here's a really great article on using media queries if you'd like to look into this a bit more.
    http://www.alistapart.com/articles/responsive-web-design/
×
×
  • Create New...