<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Longhouses &#187; JS</title>
	<atom:link href="http://www.longhouses.nl/tag/js/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.longhouses.nl</link>
	<description>creëert business</description>
	<lastBuildDate>Mon, 10 Feb 2014 12:13:27 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.2.38</generator>
	<item>
		<title>Typography button</title>
		<link>http://www.longhouses.nl/typography-button/</link>
		<comments>http://www.longhouses.nl/typography-button/#comments</comments>
		<pubDate>Wed, 11 Jul 2012 14:52:14 +0000</pubDate>
		<dc:creator><![CDATA[webmaster]]></dc:creator>
				<category><![CDATA[Theme back-end]]></category>
		<category><![CDATA[back-end]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[JS]]></category>
		<category><![CDATA[shortcodes]]></category>
		<category><![CDATA[theme]]></category>
		<category><![CDATA[typography]]></category>

		<guid isPermaLink="false">http://www.longhouses.nl/?p=386</guid>
		<description><![CDATA[To simplify shortcodes use available in themes based on GavernWP framework, a button for theme&#8217;s typography has been implemented which is available in a posts editor: &#160; By clicking this button, you will see a list of available typography elements: &#160; It is possible to choose a version with a stylistic specified for the majority [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>To simplify shortcodes use available in themes based on GavernWP framework, a button for theme&#8217;s typography has been implemented which is available in a posts editor:<a href="http://www.longhouses.nl/wp-content/uploads/2012/07/Edit-Post-‹-Meet-Gavern-WP-—-WordPress-4.jpg"><img class="aligncenter size-full wp-image-705" title="button typo" src="http://www.longhouses.nl/wp-content/uploads/2012/07/Edit-Post-‹-Meet-Gavern-WP-—-WordPress-4.jpg" alt="" width="474" height="118" /></a></p>
<p>&nbsp;</p>
<p>By clicking this button, you will see a list of available typography elements:<a href="http://www.longhouses.nl/wp-content/uploads/2012/07/Edit-Post-‹-Meet-Gavern-WP-—-WordPress-5.jpg"><img class="aligncenter size-full wp-image-706" title="typo button popup" src="http://www.longhouses.nl/wp-content/uploads/2012/07/Edit-Post-‹-Meet-Gavern-WP-—-WordPress-5.jpg" alt="" width="265" height="353" /></a></p>
<p>&nbsp;</p>
<p>It is possible to choose a version with a stylistic specified for the majority of elements. After choosing a particular style, a shortcode will appear which will be replaced in entry content by scripts to structure styled in a way given.</p>
<p>Please, note that adding a new Shortcode code requires three operations:</p>
<ul>
<li>adding an entry in shortcodes.js configuration file</li>
<li>adding PHP code supporting a shortcode given</li>
<li>adding optional CSS and JavaScript code (if a shortcode given requires it)</li>
</ul>
<p><strong>shortcodes.js</strong> file in <strong>config</strong> catalog includes entries which are replaced to menu structure visible after clicking a typography button &#8211; it includes <strong>$GAVERNWP_SHORTCODES</strong> variable which is a table including objects representing elements of a menu. Each object has three features: <strong>title</strong>, <strong>code</strong> and <strong>submenu</strong>. Let&#8217;s analyze this structure with a <strong>Highlight</strong> position:</p>
<pre class="gk-code" data-style="style1"><code>{
"title": "Highlight",<br />
"code": "[highlight]Your text[/highlight]",<br />
"submenu": [<br />
{<br />
"title": "Style I",<br />
"code": "[highlight style=\"1\"]Your text[/highlight]"<br />
},<br />
{<br />
"title": "Style II",<br />
"code": "[highlight style=\"2\"]Your text[/highlight]"<br />
},<br />
{<br />
"title": "Style III",<br />
"code": "[highlight style=\"3\"]Your text[/highlight]"<br />
}<br />
]<br />
},</code></pre>
<ul>
<li><strong>title</strong> &#8211; it includes a menu positon name displayed by a script</li>
<li><strong>code</strong> &#8211; it is a shortcode code which will be added to an entry when clicking a menu position given &#8211; you have to remember that not all menu positions on the first level have a value in this field &#8211; if it was an empty sequence of symbols, it means for a script that clicking on a menu position given does not request any action.</li>
<li><strong>submenu</strong> &#8211; it is a table  of a submenu of a menu position given. Each submenu position is built the same as menu positions as these on the first level but with one difference &#8211; a submenu cannot have the next submenu, so you do not add a <strong>submenu</strong> feature in a submenu object.</li>
</ul>
<p>Let&#8217;s say, we added our shortcode to a typography button using shortcodes.js file. So, there is one thing left to do &#8211; support our shortcode from a theme side.</p>
<p>To do this, you have to open <strong>gavern/helpers/helpers.shortcodes.php</strong> file.</p>
<p>This file is divided into three main sections starting with lines similar to:</p>
<pre class="gk-code" data-style="style1"><code>if(get_option($tpl-&gt;name . '_shortcodes1_state', 'Y') == 'Y') {</code></pre>
<p>It is a conditional  IF instruction connected with a group of typography elements given. Gavern icludes three groups:</p>
<ul>
<li>typography elements &#8211; functions connected with it have <strong>gavern_ts_</strong> prefix in the title</li>
<li>interactive elements &#8211; functions connected with it have <strong>gavern_ies_</strong> prefix in the title</li>
<li>elements characteristic for a particular theme &#8211; functions connected with it have <strong>gavern_tss_</strong> prefix in the title</li>
</ul>
<p>We recommend to add new typography elements in the last group &#8211; in Meet GavernWP theme, it is empty by default. Please, remember about using an appropriate prefix in a function name for a group given, e.g. in the case of the third group, it will be <strong>gavern_tss_</strong>. The code itself of a shortcode given has to be created according to guidelines described in<a href="http://codex.wordpress.org/Shortcode_API"> Shortcode API</a>.</p>
<p>The last step is rather optional and depends on your Shortcode type. If your Shortcode requires additional CSS or JavaScript code, you have to define it in <strong>shortcodes.*.css</strong> i <strong>shortcodes.*.js</strong> files, where <strong>*</strong> is a group name to which a Shortcode given was assigned.</p>
<p>It is very important to place elements of CSS and JavaScript code in an appropriate file, as it will give a possibility of optimizing whole theme code when switching off given group of Shortcodes codes.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.longhouses.nl/typography-button/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Framework structure</title>
		<link>http://www.longhouses.nl/framework-structure-2/</link>
		<comments>http://www.longhouses.nl/framework-structure-2/#comments</comments>
		<pubDate>Sun, 08 Jul 2012 09:30:56 +0000</pubDate>
		<dc:creator><![CDATA[webmaster]]></dc:creator>
				<category><![CDATA[Theme essentials]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Custom Pages]]></category>
		<category><![CDATA[fonts]]></category>
		<category><![CDATA[Framework]]></category>
		<category><![CDATA[JS]]></category>
		<category><![CDATA[JSON]]></category>
		<category><![CDATA[translations]]></category>

		<guid isPermaLink="false">http://www.longhouses.nl/?p=330</guid>
		<description><![CDATA[Gavern Framework has a quite extensive files structure. It is similar to a standard structure of majority of the themes, however, because of many functionalities, there are some new elements. The overall outline of files structure is presented below: theme&#8217;s catalog It includes all basic files and catalogs for a theme. It is worth seeing [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Gavern Framework has a quite extensive files structure. It is similar to a standard structure of majority of the themes, however, because of many functionalities, there are some new elements.</p>
<p><span id="more-330"></span></p>
<p>The overall outline of files structure is presented below:</p>
<ol>
<li><strong>theme&#8217;s catalog</strong><br />
<small>It includes all basic files and catalogs for a theme. It is worth seeing that Custom Pages templats have a <strong>theme.</strong> prefix at the beginning of their names which helps to find them in files structure.</small></p>
<ol>
<li><strong>css</strong><br />
<small>There are all CSS theme&#8217;s files in it. They are described in details in an entry about framework&#8217;s CSS code.<br />
</small></p>
<ol>
<li><strong>back-end</strong><br />
<small>To have everything ordered, CSS files connected with an administration panel were placed in this catalog.<br />
</small></li>
</ol>
</li>
<li><strong>fonts</strong><br />
<small>This catalog is used for storing files with additional fonts. You have to remember that each font must have its own catalog including a stylesheet.css file. More information about fonts service can be found in an entry about <strong>Fonts</strong> in an administration panel.<strong></strong><br />
</small></li>
<li><strong>gavern</strong><br />
<small>A catalog including the base of whole GavernWP framework work.<br />
</small></p>
<ol>
<li><strong>classes</strong><br />
<small>Files with supporting classes used in framework&#8217;s code.<br />
</small></li>
<li><strong>config</strong><br />
<small>Files including framework&#8217;s configuration. It has to be remembered that there are additional catalogs used for making transalations.<br />
</small></li>
<li><strong>form_elements</strong><br />
<small>It includes a main file with a code which generates basic form elements in an administration panel, as well as, catalogs with elements created by a user.<br />
</small></li>
<li><strong>helpers</strong><br />
<small>A collection of classes connected with specific framework&#8217;s tasks, e.g. with generating layout fragments.<br />
</small></li>
<li><strong>layouts</strong><br />
<small>Files used for generating HTML code of an administration panel.<br />
</small></li>
<li><strong>options</strong><br />
<small>Files which store options of particular sections of theme&#8217;s administration panel. Similarly to <strong>config</strong> catalog; there are also additional catalogs used for making translations.<strong></strong><br />
</small></li>
</ol>
</li>
<li><strong>images</strong><br />
<small>Graphic files used with a theme<br />
</small></p>
<ol>
<li><strong>back-end</strong><br />
<small>Files connected with an administration panel.<br />
</small></li>
<li><strong>headers</strong><br />
<small>Default header&#8217;s images.<br />
</small></li>
<li><strong>post_formats</strong><br />
<small>Images connected with entries formats.<br />
</small></li>
</ol>
</li>
<li><strong>js</strong><br />
<small>JavaScript scripts files used in a thme<br />
</small></p>
<ol>
<li><strong>back-end</strong><br />
<small>Likewise in <strong>css</strong> and <strong>images</strong> catalogs there are files included used in an administration panel.<strong></strong><strong></strong><br />
</small></li>
<li><strong>templates</strong><br />
<small>Additional JavaScript files used by some Custom Pages.<br />
</small></li>
</ol>
</li>
<li><strong>languages</strong><br />
<small>Main files used for creating translations.<br />
</small></li>
<li><strong>layouts</strong><br />
<small>Files used for generating subpages; they include elements which are used very often; e.g. a head section.<br />
</small></li>
</ol>
</li>
</ol>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.longhouses.nl/framework-structure-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
