Jump to content



Member Since 21 May 2010
Offline Last Active Jun 26 2016 12:42 AM

#146661 Stuck in an infinite loop

Posted by Marked on 05 June 2016 - 06:55 AM

Why does this loop infinity?


I'm trying to build a nested comments system:

{% for comment in kushi_post_comments %}

{% include "kushi/post/comment" %}

{% endfor %}

Inside refinery/post/comment

   {% if comment.children %}
                        {% for comment in comment.children %}
                        {% include "kushi/post/comment" %}
                        {% endfor %}
                {% endif %}

Therefore as long as a comment has data in the comments array, it will include itself. Eventually of course a child won't have any children itself. But this keeps looping :( Any ideas?

#145875 The importance of a local server?

Posted by Marked on 26 April 2015 - 01:25 AM

Hi guys 


I am setting up an ecommerce store for a client and we're about to make a decision on which company to purchase a dedicated server from. 


What I would like to know, is how important is it to have a sever located locally? The site is for New Zealand customers. We've got a shared hosting account on hostgator already, and we're considering using them for a dedicated server for this site. However, their servers are physically located in the US, which is approximately on the other side of the globe. 


Speed is a massive factor and that's why we've decided to invest in a dedicated server. Is the speed difference big enough to justify buying locally in the target country? And factoring in a CDN? 


Thanks in advance 


#135869 Form validation

Posted by Marked on 08 May 2013 - 08:39 PM

You could try
<div id="form_errors"></div>
$('#form1').submit(function() {
    if ($('input:checkbox', this).is(':checked') &&
        $('input:radio', this).is(':checked')) {
        // everything's fine...
    } else {
        $('#form_errors').append('<p class="alert-error">Please select the button<p>');
        return false;

#134593 Bootstrap - Is it worth it?

Posted by Marked on 10 March 2013 - 11:01 PM

Yeah I'm also for bootstrap and don't think it stifles creative design. Maybe for the designer who is uncreative to begin with, and his own personal project. I use bootstrap at my job, even for existing designs. For example, the following shows both a bootstrap nav bar and carousel (I made this just yesterday)
Posted Image
And you have no idea that its from bootstrap. The beauty is that you got all that stuff coded for you and its so simple to modify.

The result is we've got all that functionality built-in, eg the nav bar in bootstrap has all the js and css ready to go, and with a bit of css tweaking you've got this:
Posted Image

So yeah. Only downside is the size of it, which you can decrease by choosing what you want included.

Without bootstrap I would have to find the code for the responsive nav, the carousel and integrate it. It just saves so much time.