<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
      <title>Developers - Vanilla Community</title>
      <link>http://vanillaforums.org/categories/developers/feed.rss</link>
      <pubDate>Fri, 24 May 2013 23:21:44 +0000</pubDate>
         <description>Developers - Vanilla Community</description>
   <language>en-CA</language>
   <atom:link href="http://vanillaforums.org/categories/developers/feed.rss" rel="self" type="application/rss+xml" />
   <item>
      <title>Some tips I learned during plugin development</title>
      <link>http://vanillaforums.org/discussion/23694/some-tips-i-learned-during-plugin-development</link>
      <pubDate>Fri, 10 May 2013 07:35:02 +0000</pubDate>
      <category>Developers</category>
      <dc:creator>lifeisfoo</dc:creator>
      <guid isPermaLink="false">23694@/discussions</guid>
      <description><![CDATA[<h1>Paths</h1>

<p>In <a rel="nofollow" href="http://vanillaforums.org/discussion/23672/scandinavian-letters-not-working">a recent discussion</a> I outlined that (sorry for the autoreference):</p>

<blockquote>
  <p>(plugins) use hardcoded directory name inside .php files</p>
</blockquote>

<p>I say that since many plugins that I've seen use this approach:</p>

<blockquote>
  <p>include_once(PATH_PLUGINS.DS . 'MyPluginDirectoryName' . DS . 'class.myclass.php');</p>
</blockquote>

<p>Not so clean, since you can use (beware of yourself):</p>

<blockquote>
  <p>include_once(dirname(<strong>FILE</strong>) . DS . 'class.myclass.php');</p>
</blockquote>

<h2>Views paths</h2>

<p>When you need to set a view, you can use a similar approch:</p>

<blockquote>
  <p>$Sender-&gt;View = dirname(<strong>FILE</strong>) . DS . 'views' . DS . 'myview.php';</p>
  
  <p>$Sender-&gt;Render();</p>
</blockquote>

<p>or a (better? I found it just now) method form the class.plugin.php</p>

<blockquote>
  <p>$Sender-&gt;Render($this-&gt;GetView('myview.php'));</p>
</blockquote>

<p>Note: Please contribute below with your own tips or with your critique.</p>

<p>Thank you to <a rel="nofollow" href="/profile/hgtonight">@hgtonight</a> for this discussion.</p>
]]></description>
   </item>
   <item>
      <title>solution needed -  storing  data between events in 2.1  (routines work in 2.0.18 but not 2.1)</title>
      <link>http://vanillaforums.org/discussion/23793/solution-needed-storing-data-between-events-in-2-1-routines-work-in-2-0-18-but-not-2-1</link>
      <pubDate>Mon, 20 May 2013 23:44:55 +0000</pubDate>
      <category>Developers</category>
      <dc:creator>peregrine</dc:creator>
      <guid isPermaLink="false">23793@/discussions</guid>
      <description><![CDATA[<p>In 2.0.18 this would work perfectly well  caching the info with the first routine in one event and pulling it back in another event with the second routine.</p>

<ul>
<li><p>Problem 1</p>

<p>public function CacheUnread($CountUnreadComments){
$this-&gt;CountUnreadComments=$CountUnreadComments;
}</p>

<p>public function GetCacheUnread(){
return $this-&gt;CountUnreadComments;
}</p></li>
</ul>

<p>If I get the answer to this I'll fix an existing plugin</p>

<hr />

<ul>
<li>Problem 2 </li>
</ul>

<p>In 2.0.18  I could also store an array of variables  (but not in 2.1)</p>

<p>via the following in an event in a plugin</p>

<p>$Sender-&gt;MyData[DataItem1] = "blahblah"</p>

<p>and then using the following in a view and retrieve the variable.</p>

<p>$thedata = $this-&gt;MyData[DataItem1]</p>

<p>I'm just curious what would be the correct way to do this in vanilla 2.1.</p>
]]></description>
   </item>
   <item>
      <title>Introducing Gdn_PScaffold a plugin scaffold/mini framework for your convenience</title>
      <link>http://vanillaforums.org/discussion/23629/introducing-gdn_pscaffold-a-plugin-scaffoldmini-framework-for-your-convenience</link>
      <pubDate>Wed, 01 May 2013 22:31:37 +0000</pubDate>
      <category>Developers</category>
      <dc:creator>x00</dc:creator>
      <guid isPermaLink="false">23629@/discussions</guid>
      <description><![CDATA[<p>I'm releasing Gdn_Scaffold shortly on an MIT licence, which is a utility/script which will help your organise, often cluttered plugins.</p>

<p><a href="https://github.com/x00/Gdn_PScaffold" target="_blank" rel="nofollow">https://github.com/x00/Gdn_PScaffold</a></p>

<p>Requires php &gt;= 5.2 to run</p>

<p>For those that already have IDE templating and automation regimes, you probably don't need this. You might want to look at the utility methods though.</p>

<p>What it is NOT for:</p>

<ul>
<li>Plugins that only have one or two files and a few lines of code (as it will create extra files).</li>
<li>Plugns that already have a more specific organised structure </li>
</ul>

<p>You can use on a plugin that needs some organisation, or a new project.</p>

<p>It is a scaffold it does not make your plugin automatically work, you need to implement along the lines suggested.</p>

<p>Treat it like beta software. It does backup within the plugin file, but it is not substitute for an external backup regime.</p>

<p>This is a tool/helper, don't trust it to be perfect.</p>
]]></description>
   </item>
   <item>
      <title>formatting for badge information page</title>
      <link>http://vanillaforums.org/discussion/23389/formatting-for-badge-information-page</link>
      <pubDate>Wed, 10 Apr 2013 08:31:28 +0000</pubDate>
      <category>Developers</category>
      <dc:creator>hbf</dc:creator>
      <guid isPermaLink="false">23389@/discussions</guid>
      <description><![CDATA[<p>I just downloaded and installed this plugin. fantastic work man. really. and thanks for integrating it with my i like this plugin, bravo.</p>

<p>i noticed a couple of things while playing with it tonight:
1. the url when clicking on a badge does not use a prettified url syntax
2. i get some crazy formatting with my theme on the badge information page</p>

<p><a href="http://homebrewforums.net/badges/index.php?badgetype=LikedBadge" target="_blank" rel="nofollow">http://homebrewforums.net/badges/index.php?badgetype=LikedBadge</a></p>

<p>I'll be poking around later this week, but i thought i would ring it to your attention.</p>
]]></description>
   </item>
   <item>
      <title>[HOW TO] Register files and folders in the Garden autoloader (2.1)</title>
      <link>http://vanillaforums.org/discussion/23402/how-to-register-files-and-folders-in-the-garden-autoloader-2-1</link>
      <pubDate>Wed, 10 Apr 2013 22:37:20 +0000</pubDate>
      <category>Developers</category>
      <dc:creator>kasperisager</dc:creator>
      <guid isPermaLink="false">23402@/discussions</guid>
      <description><![CDATA[<p>Hi ya'll devs,</p>

<p>As some of you may or may not know by now, I'm pretty darned nit-picky when it comes to organizing my code and having nice, semantic directory structures. However, the Garden autoloader is rather limited to only searching a couple of default directories when you're coding applications, plugins and themes. Everything in the base dir gets loaded and so does stuff in <code>library</code>, <code>controllers</code>, <code>settings</code>, <code>locale</code>, <code>views</code> and perhaps some others folders I've forgotten about.</p>

<p>I did however finally read through the <code>Gdn_Autoloader</code> class as I wanted to find a way to autoload stuff within sub-directories of my <code>library</code> folder without having to write my own autoloader, which I'm doing in Vanilla API (will change in 0.0.3-dev). Turns out it's pretty straight forward registering recursive autoloading of this directory (and of course other directories too):</p>

<pre><code>$Map        = Gdn_Autoloader::MAP_LIBRARY;
$Context    = Gdn_Autoloader::CONTEXT_APPLICATION;
$Path       = PATH_APPLICATIONS . DS . '[foobar]/library';

$Options    = array();
$Options['Extension'] = '[foobar]';

Gdn_Autoloader::RegisterMap($Map, $Context, $Path, $Options);
</code></pre>

<p>These are the accepted <code>$MapType</code> and <code>$Context</code> constants:</p>

<pre><code>const CONTEXT_CORE            = 'core';
const CONTEXT_APPLICATION     = 'application';
const CONTEXT_PLUGIN          = 'plugin';
const CONTEXT_LOCALE          = 'locale';
const CONTEXT_THEME           = 'theme';

const MAP_LIBRARY             = 'library';
const MAP_CONTROLLER          = 'controller';
const MAP_PLUGIN              = 'plugin';
const MAP_VENDORS             = 'vendors';
</code></pre>

<p>Just a helping hand to people looking to do the same thing!</p>
]]></description>
   </item>
   <item>
      <title>Does anybody want to help develop a RESTful API for Vanilla?</title>
      <link>http://vanillaforums.org/discussion/23112/does-anybody-want-to-help-develop-a-restful-api-for-vanilla</link>
      <pubDate>Mon, 18 Mar 2013 18:09:19 +0000</pubDate>
      <category>Developers</category>
      <dc:creator>kasperisager</dc:creator>
      <guid isPermaLink="false">23112@/discussions</guid>
      <description><![CDATA[<p>Hi all,</p>

<p>So I decided to write a proper and useful Vanilla API. So far it's going pretty well: I've created APIs for the category and session controllers (only GET methods so far) and got the API controller to respond in both JSON and XML. Also created a documentation and visualization layer using Swagger so exploring the API is super easy and fun. You can find a couple of screens here: <a href="http://imgur.com/a/zvMB8/embed" target="_blank" rel="nofollow">http://imgur.com/a/zvMB8/embed</a></p>

<p>However, I'm a moron when it comes to more advanced stuff like SSL, auth and tokens. What I'm doing now with the GET requests is pretty darned simple: Get data from Vanilla using default methods, turn the data into arrays, render the data and deliver it using either XML or JSON.</p>

<p>My question to ya'll devs is therefore this: Is there anyone out there who'd be interested in joining in? I think this could be a pretty awesome project and definitely be of great use to a lot of people out there.</p>

<p>I think that was my 50 cents for today :-)</p>

<p>All the best as always,<br />
Kasper Kronborg Isager</p>
]]></description>
   </item>
   <item>
      <title>Let's Talk about Improving Vanilla's Addons</title>
      <link>http://vanillaforums.org/discussion/23323/lets-talk-about-improving-vanillas-addons</link>
      <pubDate>Thu, 04 Apr 2013 01:10:45 +0000</pubDate>
      <category>Developers</category>
      <dc:creator>Todd</dc:creator>
      <guid isPermaLink="false">23323@/discussions</guid>
      <description><![CDATA[<p>There's been a bit of a mega conversation going on amongst some of the vips in Vanilla's community. Besides exposing a bit of a UX bug in our conversation emails there's been some good discussion. I'm putting my response here because I want things out in the open.</p>

<p>So let's face it. There are a lot of addons on the Addons site that just don't work. There are several reasons why this is the case. Maybe a plugin was developed by an inexperienced developer. Maybe someone developed against an old version of Vanilla. I'm not casting judgment here it happens. <strong>But the fact of the matter is that addons that don't work or of low-quality are bad for Vanilla.</strong></p>

<p>This is an important point. Vanilla has grown a lot in the past years and we have to start working towards more quality in the addons on this site. At the very least we need to give people that come to the addons site more information about an addon before they try and go installing it.</p>

<p>Here's the thing though. We here at Vanilla HQ can't go through everyone's addons and make sure they work. What we can do is give better tools on the addons site and give some better guidance on addon development in general. Here are some thoughts on that front.</p>

<h2>Keeping Addons Current</h2>

<ol>
<li><p>I want to move from addons being approved/unapproved to being "works with". Rather than having us approve addons we'll have the community say whether an addon works or doesn't work with certain versions of Vanilla.</p></li>
<li><p>Using the above information we will mark plugins as abandoned if they stop working with newer versions of Vanilla. Addon authors have a responsibility to fix their addons, but if they aren't notified then it's really not their fault.</p></li>
<li><p>Abandoned plugins will be removed from the addon site. This means that the addon will be gone and someone else that wants to pick it up can re-upload it and start maintaining it themselves. This is a bit of a clunky workflow so I'm not sure if I'm decided on this. Philosophically though I'm not against changing the maintainer of an addon if the original author abandons it. As a courtesy the original author should be given credit for their work.</p></li>
</ol>

<h2>Using Gith(hub) to Develop Addons</h2>

<ol>
<li><p>I really want to start encouraging people to develop their addons on github. We totally know that github can be difficult to get into, but you are doing yourself a disservice by not learning how to use git. And yes, I even think theme developers should be getting into git.</p></li>
<li><p>Having your addon up on github allows others to collaborate with you and help fix issues. People can fork your repo and give you pull requests or you can even give other people commit access to make changes directly to your addon.</p></li>
<li><p>I think that you should create a seperate repository per addon you develop. This makes it easier for people to fork just your one addon. If you develop a lot of addons you can create one master repo that contains all of your addons as submodules.</p></li>
<li><p>If enough people start maintaining their addons through github then we can build some nifty tools into the addons site that will automatically grab updates directly from the repo.</p></li>
</ol>

<h2>Addon Ratings</h2>

<p>I'm in favor of adding a simple five-star rating system to addons. There are a lot of addons and having some way to help people decide on which ones to install is becoming more important.</p>

<h2>Commercial Addons</h2>

<p>We are not interested in creating a site that allows people to sell commercial Vanilla addons. Changing our minds is in the realm of possibility, but is highly unlikely.</p>

<h2>Vanilla 1 Addons</h2>

<p>We'll most likely stop supporting Vanilla 1 addon downloads at some point.</p>
]]></description>
   </item>
   <item>
      <title>Ninja - A Node.js, Grunt and Bower powered scaffold for building Vanilla themes</title>
      <link>http://vanillaforums.org/discussion/23003/ninja-a-node-js-grunt-and-bower-powered-scaffold-for-building-vanilla-themes</link>
      <pubDate>Sat, 09 Mar 2013 19:46:13 +0000</pubDate>
      <category>Developers</category>
      <dc:creator>kasperisager</dc:creator>
      <guid isPermaLink="false">23003@/discussions</guid>
      <description><![CDATA[<p>Hi all!</p>

<p>Here's the thing: A write a s**t-load of Vanilla themes - I absolutely hate writing boilerplate, I hate setting up a project structure and I hate having to rely on desktop applications for compiling my code. I want to be able to boot up my terminal, my text editor as well as my browser and then simply start working. But what about all the cool stuff? What if I want to use CoffeeScript and SASS? Then I can simply install <a rel="nofollow" href="http://vanillaforums.org/addon/austere-theme">Austere</a> and I get the power of some of the most awesome preprocessors out there right in my hands. Problem solved!</p>

<p>But... what if I'm too lazy to actually switch to my browser and reload it every time I change my code? What if I want to compile assets and manage dependencies from a separate server to make things more efficient? Sure, I could download and install applications such as <a rel="nofollow" href="http://incident57.com/codekit/">CodeKit</a> and <a rel="nofollow" href="http://livereload.com/">LiveReload</a> but again, I don't want to rely on desktop applications for stuff like this as it greatly complicates multi-author projects. Plus, I want to be able to easily share my code without people having to buy applications to actually use it! What if I could simply sit back, write a couple of lines in my terminal, write some CoffeScript and SASS, save it and then see the changes instantly in my browser without even having to lift a finger - all without the power of funky desktop applications?</p>

<p>Right, enough with the sales speech - let's get down to business! Over the past couple of weeks I've written a scaffold called <strong>Ninja</strong> that allows you do the all of the stuff I've been talking about and even more. It's heavily inspired by Yeoman's scaffolding component, Yo, and also includes the two other main components that Yeoman uses: Grunt and Bower. Here's a short introduction to Ninja:</p>

<blockquote>
  <p><em>Ninja is a super sneaky Node.js, Grunt and Bower powered scaffold for building superb Vanilla themes. Ninja allows you to easily use your choice of preprocessors and languages in your themes and enables you to write kick-ass build processes using the many plugins available for Grunt.</em></p>
  
  <p><em>Ninja will also stealthily do browser sniffing and feature detection using Conditionizr and Modernizr and will also reload your assets whenever they change using LiveReload - like a true shinobi!</em></p>
</blockquote>

<p>Sound good? Trust me, it is! Ninja is my personal workflow in a neat and tiny package - it combines all the stuff I use for building Vanilla themes and enables me to scaffold out new themes in mere seconds. Furthermore, Ninja bundles with an example Bootstrap-ish theme and a bit of other good stuff to get you started. Ninja hasn't "officially" dinged 1.0.0 yet, but feel free to take it for a spin: <a href="https://github.com/kasperisager/Ninja" target="_blank" rel="nofollow">https://github.com/kasperisager/Ninja</a></p>

<p>I'm still documenting stuff but have included installation and usage instructions in the README. If you have any thoughts about Ninja, feel free to share them - and now go write some cool stuff!</p>

<p>All the best,<br />
Kasper Kronborg Isager<br />
<a href="http://webhutt.com" target="_blank" rel="nofollow">http://webhutt.com</a></p>
]]></description>
   </item>
   <item>
      <title>Version 3.1 is shown below version 3.03 in addons section. Some Bug I think</title>
      <link>http://vanillaforums.org/discussion/22571/version-3-1-is-shown-below-version-3-03-in-addons-section-some-bug-i-think</link>
      <pubDate>Fri, 25 Jan 2013 01:08:24 +0000</pubDate>
      <category>Developers</category>
      <dc:creator>aery</dc:creator>
      <guid isPermaLink="false">22571@/discussions</guid>
      <description><![CDATA[<p>Please see here - <a href="http://vanillaforums.org/addon/nebula-theme" target="_blank" rel="nofollow">http://vanillaforums.org/addon/nebula-theme</a></p>

<p>Under versions detail, 3.1 is after 3.03.</p>
]]></description>
   </item>
   <item>
      <title>Best htaccess practices for scurity and performance</title>
      <link>http://vanillaforums.org/discussion/22853/best-htaccess-practices-for-scurity-and-performance</link>
      <pubDate>Thu, 21 Feb 2013 10:03:36 +0000</pubDate>
      <category>Developers</category>
      <dc:creator>aery</dc:creator>
      <guid isPermaLink="false">22853@/discussions</guid>
      <description><![CDATA[<p>Recently, there was a thread about tightening vanilla security. So I thought I will share mine htaccess with you guys so everyone can benefit -</p>

<p>1) Open .htaccess file from forum root folder in any text editor</p>

<p>2) **Add ** below changes that suites you -</p>

<pre><code># ----------------------------------------------------------------------
# Better website experience for IE users
# ----------------------------------------------------------------------

# Force the latest IE version, in various cases when it may fall back to IE7 mode
# Use ChromeFrame if it's installed for a better experience for the poor IE folk

&lt;IfModule mod_headers.c&gt;
  Header set X-UA-Compatible "IE=Edge,chrome=1"
  # mod_headers can't match by content-type, but we don't want to send this header on *everything*...
  &lt;FilesMatch "\.(appcache|crx|css|eot|gif|htc|ico|jpe?g|js|m4a|m4v|manifest|mp4|oex|oga|ogg|ogv|otf|pdf|png|safariextz|svg|svgz|ttf|vcf|webm|webp|woff|xml|xpi)$"&gt;
    Header unset X-UA-Compatible
  &lt;/FilesMatch&gt;
&lt;/IfModule&gt;




# ----------------------------------------------------------------------
# Gzip compression
# ----------------------------------------------------------------------

&lt;IfModule mod_deflate.c&gt;

  # Force deflate for mangled headers developer.yahoo.com/blogs/ydn/posts/2010/12/pushing-beyond-gzipping/
  &lt;IfModule mod_setenvif.c&gt;
    &lt;IfModule mod_headers.c&gt;
      SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding
      RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding
    &lt;/IfModule&gt;
  &lt;/IfModule&gt;

  # Compress all output labeled with one of the following MIME-types
  # (for Apache versions below 2.3.7, you don't need to enable `mod_filter`
  # and can remove the `&lt;IfModule mod_filter.c&gt;` and `&lt;/IfModule&gt;` lines as
  # `AddOutputFilterByType` is still in the core directives)
  &lt;IfModule mod_filter.c&gt;
    AddOutputFilterByType DEFLATE application/atom+xml \
                                  application/javascript \
                                  application/json \
                                  application/rss+xml \
                                  application/vnd.ms-fontobject \
                                  application/x-font-ttf \
                                  application/xhtml+xml \
                                  application/xml \
                                  font/opentype \
                                  image/svg+xml \
                                  image/x-icon \
                                  text/css \
                                  text/html \
                                  text/plain \
                                  text/x-component \
                                  text/xml
  &lt;/IfModule&gt;

&lt;/IfModule&gt;


# ----------------------------------------------------------------------
# Expires headers (for better cache control)
# ----------------------------------------------------------------------

# These are pretty far-future expires headers.
# They assume you control versioning with filename-based cache busting
# Additionally, consider that outdated proxies may miscache
#   www.stevesouders.com/blog/2008/08/23/revving-filenames-dont-use-querystring/

# If you don't use filenames to version, lower the CSS and JS to something like
# "access plus 1 week".

&lt;IfModule mod_expires.c&gt;
  ExpiresActive on

# Perhaps better to whitelist expires rules? Perhaps.
  ExpiresDefault                          "access plus 1 month"

# cache.appcache needs re-requests in FF 3.6 (thanks Remy ~Introducing HTML5)
  ExpiresByType text/cache-manifest       "access plus 0 seconds"

# Your document html
  ExpiresByType text/html                 "access plus 0 seconds"

# Data
  ExpiresByType application/json          "access plus 0 seconds"
  ExpiresByType application/xml           "access plus 0 seconds"
  ExpiresByType text/xml                  "access plus 0 seconds"

# Feed
  ExpiresByType application/atom+xml      "access plus 1 hour"
  ExpiresByType application/rss+xml       "access plus 1 hour"

# Favicon (cannot be renamed)
  ExpiresByType image/x-icon              "access plus 1 week"

# Media: images, video, audio
  ExpiresByType audio/ogg                 "access plus 1 month"
  ExpiresByType image/gif                 "access plus 1 month"
  ExpiresByType image/jpeg                "access plus 1 month"
  ExpiresByType image/png                 "access plus 1 month"
  ExpiresByType video/mp4                 "access plus 1 month"
  ExpiresByType video/ogg                 "access plus 1 month"
  ExpiresByType video/webm                "access plus 1 month"

# HTC files  (css3pie)
  ExpiresByType text/x-component          "access plus 1 month"

# Webfonts
  ExpiresByType application/vnd.ms-fontobject "access plus 1 month"
  ExpiresByType application/x-font-ttf    "access plus 1 month"
  ExpiresByType application/x-font-woff   "access plus 1 month"
  ExpiresByType font/opentype             "access plus 1 month"
  ExpiresByType image/svg+xml             "access plus 1 month"

# CSS and JavaScript
  ExpiresByType application/javascript    "access plus 1 year"
  ExpiresByType text/css                  "access plus 1 year"

&lt;/IfModule&gt;


# ----------------------------------------------------------------------
# Prevent mobile network providers from modifying your site
# ----------------------------------------------------------------------

# The following header prevents modification of your code over 3G on some
# European providers.
# This is the official 'bypass' suggested by O2 in the UK.

# &lt;IfModule mod_headers.c&gt;
# Header set Cache-Control "no-transform"
# &lt;/IfModule&gt;


# ----------------------------------------------------------------------
# ETag removal
# ----------------------------------------------------------------------

# FileETag None is not enough for every server.
&lt;IfModule mod_headers.c&gt;
  Header unset ETag
&lt;/IfModule&gt;

# Since we're sending far-future expires, we don't need ETags for
# static content.
#   developer.yahoo.com/performance/rules.html#etags
FileETag None



# ----------------------------------------------------------------------
# Suppress or force the "www." at the beginning of URLs
# ----------------------------------------------------------------------

# The same content should never be available under two different URLs -
# especially not with and without "www." at the beginning, since this can cause
# SEO problems (duplicate content). That's why you should choose one of the
# alternatives and redirect the other one.

# By default option 1 (no "www.") is activated.
# no-www.org/faq.php?q=class_b

# If you'd prefer to use option 2, just comment out all option 1 lines
# and uncomment option 2.

# IMPORTANT: NEVER USE BOTH RULES AT THE SAME TIME!

# ----------------------------------------------------------------------

# Option 1:
# Rewrite "www.example.com -&gt; example.com".

&lt;IfModule mod_rewrite.c&gt;
  RewriteCond %{HTTPS} !=on
  RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
  RewriteRule ^ <a href="http://%1%" target="_blank" rel="nofollow">http://%1%</a>{REQUEST_URI} [R=301,L]
&lt;/IfModule&gt;

# ----------------------------------------------------------------------

# Option 2:
# Rewrite "example.com -&gt; www.example.com".
# Be aware that the following rule might not be a good idea if you use "real"
# subdomains for certain parts of your website.

# &lt;IfModule mod_rewrite.c&gt;
#   RewriteCond %{HTTPS} !=on
#   RewriteCond %{HTTP_HOST} !^www\..+$ [NC]
#   RewriteRule ^ <a href="http://www.%" target="_blank" rel="nofollow">http://www.%</a>{HTTP_HOST}%{REQUEST_URI} [R=301,L]
# &lt;/IfModule&gt;
</code></pre>
]]></description>
   </item>
   <item>
      <title>Version Check/Required Ambiguity</title>
      <link>http://vanillaforums.org/discussion/22410/version-checkrequired-ambiguity</link>
      <pubDate>Tue, 08 Jan 2013 10:15:43 +0000</pubDate>
      <category>Developers</category>
      <dc:creator>x00</dc:creator>
      <guid isPermaLink="false">22410@/discussions</guid>
      <description><![CDATA[<p>This is something that I will open an issue with but I thought I would discuss it here first, to see what people think.</p>

<p>At the moment the version check for addons is:</p>

<p><code>version_compare($NewVersion, $Version, '&gt;')</code></p>

<p>this is ok but it is limited in a way, it always assumes that it is compatible with future versions.</p>

<p>You can actually put additional logic in setup, but it would be good if could be integrated.</p>

<p>I will be doing a lot of development into the future and I want to be flexible, especially as I will be developing quite atomically.</p>

<p>I can think of a number of scenarios:</p>

<ol>
<li>One version only, exact match, stop gap solution perhaps. </li>
<li>Quite often you see stuff like this <code>&gt;=2.0.18</code> it would be useful if it could detect those operators an plug into into the function since it has that capability to be exact.</li>
<li>in other cases you need an <em>range</em> you could have for instance  <code>&gt;=2.0.17,&lt;=2.0.18</code></li>
</ol>

<p>Another scenario that I personally faced was I wanted to require one plugin or another. Actually EXOR. I think it fair that I put my own logic in the setup, which I did. However I think it would be good to give some clue in the Requirements. Perhaps a way to put a requirement that is ignored.</p>

<p>I suppose you could always unset the key, before it gets checked. All scenarios have hacks, but might as well make it sleek.</p>
]]></description>
   </item>
   <item>
      <title>Cannot post or modify Activities anymore?</title>
      <link>http://vanillaforums.org/discussion/22284/cannot-post-or-modify-activities-anymore</link>
      <pubDate>Wed, 26 Dec 2012 14:26:32 +0000</pubDate>
      <category>Developers</category>
      <dc:creator>oliverraduner</dc:creator>
      <guid isPermaLink="false">22284@/discussions</guid>
      <description><![CDATA[<p>Hi there,</p>

<p>I figured out a strange issues on the Activity page in my installation (latest 2.0.18.4): myself and no other Users are able to post or modify to the Activity page? Just nothing is being updated in the database. Strangely there is also no error message - so I have no clue what could be going on.</p>

<p>Does anybody have a possible hint on this issue?</p>

<p>Thanks for any help,
Oliver</p>
]]></description>
   </item>
   <item>
      <title>trouble implementing function RemoveCssFile() with theme css in a plugin.</title>
      <link>http://vanillaforums.org/discussion/22167/trouble-implementing-function-removecssfile-with-theme-css-in-a-plugin</link>
      <pubDate>Wed, 12 Dec 2012 07:31:57 +0000</pubDate>
      <category>Developers</category>
      <dc:creator>peregrine</dc:creator>
      <guid isPermaLink="false">22167@/discussions</guid>
      <description><![CDATA[<p>I tried to remove a particular stylesheet via RemoveCssFile, with no success.
It seems to remove ones that were added via the plugin.</p>

<p>but within a plugin it won't remove an application theme css.</p>

<pre><code>public function Base_Render_Before($Sender) {

all of the following
$Sender-&gt;RemoveCssFile("custom.css") 
$Sender-&gt;RemoveCssFile("vanilla/themes/mobile/design/custom.css")
$Sender-&gt;RemoveCssFile("/vanilla/themes/mobile/design/custom.css")
$Sender-&gt;RemoveCssFile("themes/mobile/design/custom.css")
$Sender-&gt;RemoveCssFile("/themes/mobile/design/custom.css")
$Sender-&gt;RemoveCssFile("http:example.com/vanilla/themes/mobile/design/custom.css")
$Sender-&gt;RemoveCssFile("http:example.com/vanilla/themes/mobile/design/custom.css?v=1.1.1")
$Sender-&gt;RemoveCssFile("var/www/vanilla/themes/mobile/design/custom.css")
$Sender-&gt;RemoveCssFile("var/www/vanilla/themes/mobile/design/custom.css?v=1.1.1")
</code></pre>

<p>and with a few other events.</p>

<p>The only way I could remove it was via js.  But it would probably be better if it worked with php.
 Any ideas how to remove the themes/mobile/design/custom.css from within a plugin via RemoveCssFile() or with another php function.</p>

<p>on a side note - it seems that $this-&gt;GetResource('examplefile.css', FALSE, TRUE) called from a plugin will not really do an absolute call it is always relative to the plugin path.  And I thought the second variable makes it absolute instead of relative.</p>
]]></description>
   </item>
   <item>
      <title>Page summaries for discussions when linked from google+ and facebook</title>
      <link>http://vanillaforums.org/discussion/22118/page-summaries-for-discussions-when-linked-from-google-and-facebook</link>
      <pubDate>Thu, 06 Dec 2012 22:54:20 +0000</pubDate>
      <category>Developers</category>
      <dc:creator>ddumont</dc:creator>
      <guid isPermaLink="false">22118@/discussions</guid>
      <description><![CDATA[<p>Just posted this pull request: <a href="https://github.com/vanillaforums/Garden/pull/1497" target="_blank" rel="nofollow">https://github.com/vanillaforums/Garden/pull/1497</a>
For those who don't wait for releases, merry christmas :)</p>
]]></description>
   </item>
   <item>
      <title>Can any function be overridden via bootstrap?</title>
      <link>http://vanillaforums.org/discussion/22107/can-any-function-be-overridden-via-bootstrap</link>
      <pubDate>Wed, 05 Dec 2012 01:11:26 +0000</pubDate>
      <category>Developers</category>
      <dc:creator>peregrine</dc:creator>
      <guid isPermaLink="false">22107@/discussions</guid>
      <description><![CDATA[<ul>
<li><p>some clarification of the process needed.</p></li>
<li><p>Can any function be overridden in /bootstrap.before.php?</p></li>
<li><p>also  what about</p></li>
</ul>

<p>/bootstrap.after.php.  what would be an example of something you would do in bootstrap.<b>after</b>.php rather thanbootstrap.before.php.  And why?</p>
]]></description>
   </item>
   <item>
      <title>Code review request: Gdn_Format::Url regex</title>
      <link>http://vanillaforums.org/discussion/22101/code-review-request-gdn_formaturl-regex</link>
      <pubDate>Tue, 04 Dec 2012 00:48:35 +0000</pubDate>
      <category>Developers</category>
      <dc:creator>Lincoln</dc:creator>
      <guid isPermaLink="false">22101@/discussions</guid>
      <description><![CDATA[<p>I refactored the Url method, which is pretty core to the system. I found a lot of problems in it, especially weirdly over-expressive regex and a lot of duplicated code. If anyone who feels good about regex wants to have a look to make sure I didn't commit a grievous error I'd appreciate it. I'm especially interested in testing for my rewritten $UnicodeSupport test.</p>

<p><a href="https://github.com/vanillaforums/Garden/commit/f7f348b419b6a3600d00ac9d66bc279f469db99e" target="_blank" rel="nofollow">https://github.com/vanillaforums/Garden/commit/f7f348b419b6a3600d00ac9d66bc279f469db99e</a></p>
]]></description>
   </item>
   <item>
      <title>A little something extra for the release of Vanilla 2.1</title>
      <link>http://vanillaforums.org/discussion/21795/a-little-something-extra-for-the-release-of-vanilla-2-1</link>
      <pubDate>Sun, 28 Oct 2012 16:28:06 +0000</pubDate>
      <category>Developers</category>
      <dc:creator>kasperisager</dc:creator>
      <guid isPermaLink="false">21795@/discussions</guid>
      <description><![CDATA[<p>Hi community!</p>

<p>As some of you already know, I'm currently working on a theme called "Apptastic" scheduled for release when Vanilla 2.1 hits the deck. It's currently being tested by a bunch of awesome community members who have already helped eliminate a heap of bugs - thanks for your help guys! What most of you might <em>not</em> know, is that "Apptastic" is the reincarnation of my previous theme, VanillaBootstrap, and a whole bunch of code from that theme can actually be found within "Apptastic". As with VanillaBootstrap, "Apptastic" is a proof of concept - a crazy idea that sprung out of my messy mind last week. This means that it's not a theme for the mainstream user, as it requires a whole bunch of customization to work with a lot of plugins - and customizing it requires knowledge about Assetic, SASS and Compass.</p>

<p>Therefore, with the birth of Apptastic comes the death of VanillaBootstrap - at least the death of the theme some of you have come to know. Now comes the "little something extra": Besides working on Apptastic, I'm also working on version 1.0 of <strong><em>Bootstrap</em></strong> - hooray! I released version 0.9 of Bootstrap (which is known as VanillaBootstrap on Github) back in April and since then I've released 4 other version as well - all being proofs of concept like Apptastic. All these versions will be deleted soon-ish and the code cast into the abyss and version 1.0 will mark the end of the beginning of my Bootstrap theme for Vanilla. I'm coding it using Compass and the SASS version of Bootstrap and it will include <em>no markup-altering js</em>  and will rely entirely on the default Vanilla markup (almost, a few extra divs are added here and there) - this meaning that it will be exactly as "default" as Baseline, the official default theme, and therefore also be a theme perfectly suited for any type of user.</p>

<p><strong>tl;dr</strong><br />
Bootstrap 1.0 will be an alternative to the default Baseline theme and will be fully extensible using SASS. The old VanillaBootstrap code will be deleted as it's causing more problems than it's solving. Parts of the VanillaBootstrap code will live on in a heavily modified version in Apptastic. All of this will hopefully be ready for release when Vanilla 2.1 comes out.</p>

<p>I think that was about it! From the looks of it, I won't have any time off for the next few weeks...</p>
]]></description>
   </item>
   <item>
      <title>Enabling plugins via code</title>
      <link>http://vanillaforums.org/discussion/21849/enabling-plugins-via-code</link>
      <pubDate>Mon, 05 Nov 2012 04:09:02 +0000</pubDate>
      <category>Developers</category>
      <dc:creator>businessdad</dc:creator>
      <guid isPermaLink="false">21849@/discussions</guid>
      <description><![CDATA[<p>I'm finalizing some scripts to automate testing of Vanilla Plugins, but I stumbled upon an odd behaviour: if a plugin depends on another, enabling them one after the other via <code>EnablePlugin()</code> doesn't work as expected. To be more specific, the following code will generate an error:</p>

<pre><code>// This will work
Gdn::PluginManager()-&gt;EnablePlugin('SomePlugin', $Validation);

// This will not work if, while being enabled, the plugin uses anything  from SomePlugin. 
// In my case, ChildPlugin uses SomePlugin, who, in turn, needs one of its models to carry 
// on. In such case, the error "Class not found" is returned
Gdn::PluginManager()-&gt;EnablePlugin('ChildPlugin', $Validation); 
</code></pre>

<p>If the same tests are run immediately after the first fail, they will succeed. In short:<br />
    phpunit sometests.php // This will fail with "class not found"
    phpunit sometests.php // This will run correctly</p>

<p>It seems, to me, that <code>EnablePlugin()</code> doesn't expose the plugin to the various classes until next bootstrap. However, this is a speculation, as I haven't found an explanation for such behaviour.</p>

<p>If anyone has any suggestion, it would be very welcome. Thanks. :)</p>
]]></description>
   </item>
   <item>
      <title>Something super cool is in the works...</title>
      <link>http://vanillaforums.org/discussion/21756/something-super-cool-is-in-the-works</link>
      <pubDate>Mon, 22 Oct 2012 21:54:12 +0000</pubDate>
      <category>Developers</category>
      <dc:creator>kasperisager</dc:creator>
      <guid isPermaLink="false">21756@/discussions</guid>
      <description><![CDATA[<p>Hiya community,</p>

<p>As I heard rumors that Vanilla 2.1 is going into beta soon, I decided to create something awesome for its release. I've been using Vanilla for about half a year now and although I love the platform itself, I've always hated its interface. I don't really feel like it justifies the pure awesomeness that is Vanilla. I've tried doing something about it with my VanillaBootstrap theme but however great it has grown to be, it still doesn't quite cut it. I've searched far and wide and have noticed one particular thing during my adventure through UX: Desktop-like interfaces built on CSS3 simply are some of the most beautiful and modern UIs one can find.</p>

<p>What I'm therefore doing as you're reading this, is write a super modern, top-notch, mega shiny and totally awesome interface for Vanilla based on the interface of the great OS application "Sentry" (<a href="http://getsentry.com/" target="_blank" rel="nofollow">http://getsentry.com/</a>). Sentry's interface is based on Bootstrap so I've been able to reuse a whole bunch of stuff from VanillaBootstrap. Currently, my architecture is a cluster-f*** to say the least, as I'm building the theme using Austere as my asset manager and Compass as my SCSS framework. This means that the source code consists of a huge mix of both plain CSS, SCSS, SASS, LESS and Javascript. Hopefully, I'll be able to clean it up a bit so customizing it won't be too difficult.</p>

<p>Anywho, here's a little sneak peek for the curious:</p>

<p><img src="http://i.imgur.com/yUlZd.png" alt="Sentry UI" /></p>

<p>Being a desktop-like interface it will be fluid-width with completely fixed content. This means that the header, toolbar and footer will always stay in place while the content and sidebar while be scrollable. Grooveshark (<a href="http://grooveshark.com" target="_blank" rel="nofollow">http://grooveshark.com</a>) is a good example of how this works. I've just started writing the theme today, so there's still a long way to go before it's ready to release. I'm very open to sponsorships and donations though as well as other developers who might want to join in on the project.</p>

<p>Hope you like it!</p>

<p>Edit: Actually, I'd <em>really</em> like some help with this one, especially from someone experienced with UX as I'm facing quite a few problems regarding usability.</p>
]]></description>
   </item>
   <item>
      <title>How to save form data thru multiple models</title>
      <link>http://vanillaforums.org/discussion/17063/how-to-save-form-data-thru-multiple-models</link>
      <pubDate>Tue, 06 Sep 2011 17:42:07 +0000</pubDate>
      <category>Developers</category>
      <dc:creator>Csabbencs</dc:creator>
      <guid isPermaLink="false">17063@/discussions</guid>
      <description><![CDATA[I have a form based on a model.<br />I'd like to save the form values as usual, plus some parts of the form to another table for which I have another model.<br />I'd like to handle this 2 "DB operation" as a single transaction so if something bad happens to any of them I could rollback.<br />So, in pseudo-code-like written:<br /><code><br />try {<br />$this-&gt;Database-&gt;BeginTransaction();<br />...<br />$this-&gt;Form-&gt;SetModel($this-&gt;MyFirstModel);		<br />$this-&gt;Form-&gt;Save(); <br />...<br />$this-&gt;Form-&gt;SetModel($this-&gt;MySecondModel);		<br />$this-&gt;Form-&gt;Save(); <br />...<br />$this-&gt;Database-&gt;CommitTransaction();<br />} catch (Exception $Ex) {<br />$this-&gt;Database-&gt;RollbackTransaction();<br />throw $Ex;<br />}<br /></code><br />Is it the correct way?<br />Should I rather forget the models and do the job by running separate DB calls? <br /><code><br />try {<br />$this-&gt;Database-&gt;BeginTransaction();<br />...<br />$this-&gt;Database-&gt;Query();	<br />...<br />$this-&gt;Database-&gt;Query();	<br />...<br />$this-&gt;Database-&gt;CommitTransaction();<br />} catch (Exception $Ex) {<br />$this-&gt;Database-&gt;RollbackTransaction();<br />throw $Ex;<br />}<br /></code><br />Or should I do something totally different?]]></description>
   </item>
   <item>
      <title>Austere: Advanced asset management - for themes at least</title>
      <link>http://vanillaforums.org/discussion/21584/austere-advanced-asset-management-for-themes-at-least</link>
      <pubDate>Thu, 04 Oct 2012 07:28:07 +0000</pubDate>
      <category>Developers</category>
      <dc:creator>kasperisager</dc:creator>
      <guid isPermaLink="false">21584@/discussions</guid>
      <description><![CDATA[<p>Hi all,</p>

<p>For the past few months I've been fighting a bit with development of themes for Vanilla as I like to utilize time-saving supersets of different languages to enhance both the quality of my code as well as syntax, readability and... well, time spent developing! As I also like to implement a heap of different jQuery plugins and other scripts, managing all this stuff quickly became next to impossible using Garden. I quickly found that while usage of stuff like LESS, SASS and CoffeeScript was indeed possible, it didn't work out quite as I had hoped it would.</p>

<p>So far, I've mostly relied on Coda and CodeKit for managing, compiling, concatenating and minifying stylesheets and scripts. For a long time though, I've wanted to be able to do all this using PHP so others could benefit from it without having to buy the third-party apps I use. What I therefore did yesterday, was write a small theme "framework" of sorts called Austere, that uses Assetic to manage all its assets and Composer to manage dependencies. These are some of the things Austere enables you to do:</p>

<ul>
<li>Compile LESS, SASS, SCSS, Stylus and Compass to CSS</li>
<li>Compile CoffeeScript to JS</li>
<li>Concatenate stylesheets and scripts and store them in custom.css and custom.js respectively</li>
<li>Compress stylesheets and scripts using Google Closure or YUI Compressor</li>
<li>Optimize JPEG's and PNG's</li>
</ul>

<p>The cool thing about handling assets in this way is that it creates a strong separation between the production and development environment. All the production code of a theme lives within custom.css and custom.js, just like it was originally intended to, while the development code and its dependencies can live elsewhere and are not required for the theme to function. This ensures a clean and optimized codebase and folder structure for the final and release-ready theme. All of this without having to spend a single dime on fancy software!</p>

<p>For more advanced uses, say where you need to include certain stylesheets and scripts in certain parts of Vanilla, you can combine Assetic and Garden: Doing asset management with Assetic combining stylesheets and scripts into packages and then loading these packages only where needed using Garden. Neat and easy!</p>

<p>You can find Austere here: <a href="https://github.com/kasperisager/Austere" target="_blank" rel="nofollow">https://github.com/kasperisager/Austere</a>. I'll be writing some documentation later today and hopefully it should be ready by tomorrow. I know Austere might be overkill for most theme developers, but I wrote it for people who, like me, are super lazy and want to write as little code as possible whilst still maintaining high standards for their code and architecture. I hope it will be of use to some!</p>

<p>// Kasper</p>
]]></description>
   </item>
   <item>
      <title>Changing the no of discussion in rss feed</title>
      <link>http://vanillaforums.org/discussion/21568/changing-the-no-of-discussion-in-rss-feed</link>
      <pubDate>Tue, 02 Oct 2012 03:53:16 +0000</pubDate>
      <category>Developers</category>
      <dc:creator>mclovin</dc:creator>
      <guid isPermaLink="false">21568@/discussions</guid>
      <description><![CDATA[<p>How do I change the no of discussions in the rss feed? 
Looking at the code (applications/vanilla/views/discussions/index_rss.php) which generates the feed,</p>

<p><code>$this-&gt;DiscussionData-&gt;Result()</code></p>

<p>is pulling the discussions.
Where would I go about changing what Result() returns.</p>
]]></description>
   </item>
   <item>
      <title>Let's talk Facebook Integration</title>
      <link>http://vanillaforums.org/discussion/21394/lets-talk-facebook-integration</link>
      <pubDate>Fri, 07 Sep 2012 15:13:55 +0000</pubDate>
      <category>Developers</category>
      <dc:creator>Todd</dc:creator>
      <guid isPermaLink="false">21394@/discussions</guid>
      <description><![CDATA[This discussion was created from comments split from: <a rel="nofollow" href="/discussion/20661/reducing-impact-of-dashboardnotificationsinform/">Reducing impact of /dashboard/notifications/inform</a>.]]></description>
   </item>
   <item>
      <title>Question about graph on dashboard.</title>
      <link>http://vanillaforums.org/discussion/21298/question-about-graph-on-dashboard</link>
      <pubDate>Sun, 26 Aug 2012 20:47:04 +0000</pubDate>
      <category>Developers</category>
      <dc:creator>peregrine</dc:creator>
      <guid isPermaLink="false">21298@/discussions</guid>
      <description><![CDATA[<p>logging in with Admin status and viewing the dashboard.  related to Vanilla 2.0.18.4</p>

<p>I was helping someone and the error that is presented in some browsers (e.g. firefox 14.0.1 on linux) and a few other browsers.</p>

<p>TypeError: rowStates is null</p>

<p>for (var i = 0; i &lt; rowStates.length; i++) {</p>

<p>graph.js line 163</p>

<p>any ideas why rowStates is null</p>

<p>the outline of the graph appears - but the lines (datapoints) are not visible.</p>

<p><a rel="nofollow" href="/profile/Todd">@Todd</a></p>
]]></description>
   </item>
   <item>
      <title>I finally released my first plugin!</title>
      <link>http://vanillaforums.org/discussion/21255/i-finally-released-my-first-plugin</link>
      <pubDate>Mon, 20 Aug 2012 23:14:28 +0000</pubDate>
      <category>Developers</category>
      <dc:creator>businessdad</dc:creator>
      <guid isPermaLink="false">21255@/discussions</guid>
      <description><![CDATA[<p>It was time to give something back to the Community, so I released my <a rel="nofollow" href="http://vanillaforums.org/addon/cronjobs-plugin">Cron Jobs plugin</a>. It's the second plugin I created (yes, it's the first I release, but the second in chronological order of development), therefore is far from perfect. However, I tried to document it as best as I could, and I also ran some unit tests against it to ensure a better quality.</p>

<p>It will probably undergo some major refactoring in the near future, but I welcome any feedback about current version so that I can add any request to the "to do" list. Enjoy!</p>
]]></description>
   </item>
   <item>
      <title>[Solved] How can I set $Sender-&gt;EventArguments['Object']  elements to my own values.</title>
      <link>http://vanillaforums.org/discussion/21238/solved-how-can-i-set-sender-eventargumentsobject-elements-to-my-own-values</link>
      <pubDate>Mon, 20 Aug 2012 00:55:10 +0000</pubDate>
      <category>Developers</category>
      <dc:creator>peregrine</dc:creator>
      <guid isPermaLink="false">21238@/discussions</guid>
      <description><![CDATA[<p>I am retrieving FormatBody in a plugin via this function</p>

<pre><code>public function DiscussionController_AfterCommentFormat_Handler($Sender) {
$Object = $Sender-&gt;EventArguments['Object'];
$Body =   $Object-&gt;FormatBody;
</code></pre>

<p>....
now I want to modify $Body and truncate.
works fine</p>

<hr />

<p>Ideally if there is a way to do something like this (I know it is incorrect code)</p>

<p>$Object-&gt;FormatBody = "";
$Sender-&gt;EventArguments['Object'] = $Object</p>

<p>But I don't want to have the original $Object-&gt;FormatBody;  printing</p>

<pre><code>short of modifying the helper functions and commenting out

// echo $Object-&gt;FormatBody;
</code></pre>

<p>Any other ideas of what can be done?</p>
]]></description>
   </item>
   <item>
      <title>My thoughts on Vanilla themes and (fairly) new technologies</title>
      <link>http://vanillaforums.org/discussion/21038/my-thoughts-on-vanilla-themes-and-fairly-new-technologies</link>
      <pubDate>Tue, 31 Jul 2012 13:09:02 +0000</pubDate>
      <category>Developers</category>
      <dc:creator>kasperisager</dc:creator>
      <guid isPermaLink="false">21038@/discussions</guid>
      <description><![CDATA[<p>Hi fellow devs (heh, that felt nice!),</p>

<p>First of all, a little background-stuff would be in order: I'm an 18-year old developer with a passion for UX currently living in Denmark. For the past 3 years I'm been coding, scripting and hacking my way around the web just for the fun of it. This means that what I'm about to say might seem somewhat trivial to you hardcore-devs, I can't tell for sure. However, I'd like to share some of my ideas and findings regarding Vanilla themes, as I believe that functionality (The Vanilla software itself...) and usability (...its UI) should go hand-in-hand. Here we go!</p>

<p>I had a little talk with <a rel="nofollow" href="/profile/422">@422</a> a few weeks back (<a href="http://vanilla.ungdomsrod.dk/discussion/55/few-questions" target="_blank" rel="nofollow">http://vanilla.ungdomsrod.dk/discussion/55/few-questions</a>) about my Vanilla / Bootstrap integration project and how it wasn't anywhere near as optimized, as it could be: The client-side LESS compiler caused dreadful loading times and the compiled CSS was way to huge to be any good. Having to use a static compiler might speed up the loading, but then you'd have to upload the compiled CSS each time you made a change and this also wasn't any good. He really got me thinking: How on earth would one use technologies such as LESS without slowing everything down?</p>

<p>I had tried earlier using the CSS version of Bootstrap and jQuery to add classes to the core markup of Vanilla, but this would in most cases cause a FOUC on each page load as the JS wouldn't fire until the DOM had been built. Fair enough I thought, a new solution is required. I therefore tried using the LESS version of Bootstrap and mixins and it worked perfectly! ...or so I thought. I was running the dev installation locally and a CSS file of 500 KB wasn't really a problem. Until it went online... Let's just say that at a loading time of 12 seconds (tested using Pingdom) it kinda sucked.</p>

<p>As of now, a lot of you might be looking like this...</p>

<p><img src="http://24.media.tumblr.com/tumblr_m7vrbfaAvJ1r0bikuo2_500.jpg" alt="Lol" /></p>

<p>I know, I was just fooling around with stuff I didn't fully understand (still don't probably). But I wanted it to work. I wanted to be able to use LESS and I wanted others to benefit from its simplicity and ease of use too. As it looked, I was in fact actively slowing down a lot of awesome sites that used my code.</p>

<p>Now to the point: I want theme developers to be able to use technologies such as LESS to create awesome stuff in no time. What I therefore did was combine all the stuff I had done earlier:</p>

<ol>
<li><p>LESS Mixins was a no-go. I had to resort to the jQuery solution as pointed out by <a rel="nofollow" href="/profile/422">@422</a> but also had to avoid a FOUC on each page load. I therefore placed all jQuery related to changing the DOM according to this lovely article: <a href="http://www.learningjquery.com/2008/10/1-way-to-avoid-the-flash-of-unstyled-content" target="_blank" rel="nofollow">http://www.learningjquery.com/2008/10/1-way-to-avoid-the-flash-of-unstyled-content</a>. Voilá, problem solved! (Again, "You don't say?". I'm still a newb!)</p></li>
<li><p>LESS had to be compiled server-time to avoid the horrible client-side compiling as well as static compilers. I therefore resorted to the LESS PHP Parser and blam! ...I am now able to write LESS and have it compile into beautiful, minified CSS without lifting a finger. All I have to do, is refresh my browser.</p></li>
</ol>

<p>Fast, easy and beautiful. That's what I'm trying to say. Constructive criticism would be very welcome, especially if you know of a way of better doing some of the things I've been trying to do :-)</p>

<p>If anyone wants to have a look at the latest version of VanillaBootstrap, you can find it here: <a href="https://github.com/kasperisager/VanillaBootstrap/tree/development" target="_blank" rel="nofollow">https://github.com/kasperisager/VanillaBootstrap/tree/development</a></p>

<p>// Kasper</p>
]]></description>
   </item>
   <item>
      <title>Which way is better to do an application?</title>
      <link>http://vanillaforums.org/discussion/21002/which-way-is-better-to-do-an-application</link>
      <pubDate>Thu, 26 Jul 2012 17:54:30 +0000</pubDate>
      <category>Developers</category>
      <dc:creator>peregrine</dc:creator>
      <guid isPermaLink="false">21002@/discussions</guid>
      <description><![CDATA[<p>It seems that the technique used in Members List 1.1 is clearly much easier to add an application, then using custom pages plugin or writing an application and placing in the applications directory.  I hadn't seen this technique used before,but I like it.</p>

<p>Any comments by the vanilla developers or any others?</p>

<p>also a question about this statement.  Where and what does default reference?  And can you explain this statement a little bit better.</p>

<p>$Sender-&gt;MasterView = 'default';</p>
]]></description>
   </item>
   <item>
      <title>Need help debugging a script for a plugin I'm working on</title>
      <link>http://vanillaforums.org/discussion/20993/need-help-debugging-a-script-for-a-plugin-im-working-on</link>
      <pubDate>Wed, 25 Jul 2012 22:58:39 +0000</pubDate>
      <category>Developers</category>
      <dc:creator>kasperisager</dc:creator>
      <guid isPermaLink="false">20993@/discussions</guid>
      <description><![CDATA[<p>Hi all,</p>

<p>I've always been a little annoyed by the limitations of the default category selector as it becomes impossible to work with once you have a ton of different categories. I therefore decided to write a plugin that utilizes "Chosen" by Harvest but in the process I ran into a small problem. I've written a script that turns the default options list into sorted optgroups in case top level categories are used as headers. The thing is that I'm having trouble copying the header text and using it as a label attribute in the optgroup; only the first word of each header gets copied. I've set up a Fiddle here: <a href="http://jsfiddle.net/KasperIsager/3x2TV/" target="_blank" rel="nofollow">http://jsfiddle.net/KasperIsager/3x2TV/</a></p>

<p>If someone with a better understanding of JS could help me debug it, it would be greatly appreciated!</p>

<p>// Kasper</p>
]]></description>
   </item>
   <item>
      <title>When I ran VB forums</title>
      <link>http://vanillaforums.org/discussion/20975/when-i-ran-vb-forums</link>
      <pubDate>Tue, 24 Jul 2012 16:26:15 +0000</pubDate>
      <category>Developers</category>
      <dc:creator>422</dc:creator>
      <guid isPermaLink="false">20975@/discussions</guid>
      <description><![CDATA[<p>We had activity bonueses for users who post regularly. Im not advocating any more badges, but would be nice to implement a message for users who havent posted in a while, growl or fixed alert</p>

<p>Perhaps get more activity from posters on the forums too.</p>
]]></description>
   </item>
   </channel>
</rss>