snipt

Ctrl+h for KB shortcuts

HTML

PrettyPhoto ultra/hyper/über slow when loading

1
2
3
4
5
6
7
8
<!-- The problem is the mini gallery which loads all the photos in full size... -->
<script type="text/javascript" charset="utf-8">
    $(document).ready(function(){
    	$("a[rel^='prettyPhoto']").prettyPhoto({
    		overlay_gallery: false
    	});
    });
</script>
https://snipt.net/embed/7d83508cd96739bec864e29acc20df2a/
/raw/7d83508cd96739bec864e29acc20df2a/
7d83508cd96739bec864e29acc20df2a
html
HTML
8
2016-11-30T02:50:51
True
False
True
Oct 07, 2013 at 02:17 PM
/api/public/snipt/86141/
prettyphoto-ultrahyperuber-slow-when-loading
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a> <a href="#L-6">6</a> <a href="#L-7">7</a> <a href="#L-8">8</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="c">&lt;!-- The problem is the mini gallery which loads all the photos in full size... --&gt;</span> </span><span id="L-2"><a name="L-2"></a><span class="p">&lt;</span><span class="nt">script</span> <span class="na">type</span><span class="o">=</span><span class="s">&quot;text/javascript&quot;</span> <span class="na">charset</span><span class="o">=</span><span class="s">&quot;utf-8&quot;</span><span class="p">&gt;</span> </span><span id="L-3"><a name="L-3"></a> <span class="nx">$</span><span class="p">(</span><span class="nb">document</span><span class="p">).</span><span class="nx">ready</span><span class="p">(</span><span class="kd">function</span><span class="p">(){</span> </span><span id="L-4"><a name="L-4"></a> <span class="nx">$</span><span class="p">(</span><span class="s2">&quot;a[rel^=&#39;prettyPhoto&#39;]&quot;</span><span class="p">).</span><span class="nx">prettyPhoto</span><span class="p">({</span> </span><span id="L-5"><a name="L-5"></a> <span class="nx">overlay_gallery</span><span class="o">:</span> <span class="kc">false</span> </span><span id="L-6"><a name="L-6"></a> <span class="p">});</span> </span><span id="L-7"><a name="L-7"></a> <span class="p">});</span> </span><span id="L-8"><a name="L-8"></a><span class="p">&lt;/</span><span class="nt">script</span><span class="p">&gt;</span> </span></pre></div> </td></tr></table>

Text only

Drupal 7: CKEditor doesn't work in Colorbox modal (403 Forbidden or 404)

1
2
3
4
5
6
7
It worked in development environment but not in production server so I thought it was a chmod stuff, but nah...

In my case the issue came from the "Agregate JS files" option here /admin/config/development/performance. I disabled it and it worked.

Apparently the problem is that some libraries can't be cleanly agregated.

If you reaaaally want to agregate, then try something like that https://drupal.org/project/advagg/
https://snipt.net/embed/d82dcd5d51ed017f41ca8b70e47cb4fb/
/raw/d82dcd5d51ed017f41ca8b70e47cb4fb/
d82dcd5d51ed017f41ca8b70e47cb4fb
text
Text only
7
2016-12-24T12:11:56
True
False
True
Sep 09, 2013 at 08:38 AM
/api/public/snipt/79843/
drupal-7-ckeditor-doesnt-work-in-colorbox-modal-403-forbidden-or-404
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a> <a href="#L-6">6</a> <a href="#L-7">7</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>It worked in development environment but not in production server so I thought it was a chmod stuff, but nah... </span><span id="L-2"><a name="L-2"></a> </span><span id="L-3"><a name="L-3"></a>In my case the issue came from the &quot;Agregate JS files&quot; option here /admin/config/development/performance. I disabled it and it worked. </span><span id="L-4"><a name="L-4"></a> </span><span id="L-5"><a name="L-5"></a>Apparently the problem is that some libraries can&#39;t be cleanly agregated. </span><span id="L-6"><a name="L-6"></a> </span><span id="L-7"><a name="L-7"></a>If you reaaaally want to agregate, then try something like that https://drupal.org/project/advagg/ </span></pre></div> </td></tr></table>