<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-622730475730131583</id><updated>2024-10-25T08:49:34.110+02:00</updated><category term="wordpress"/><category term="code"/><category term="magento"/><category term="$smarty"/><category term="$smarty.const"/><category term="$smarty.const."/><category term="1.5"/><category term="1.5.1"/><category term="1.5.2"/><category term="1.5.3"/><category term="1.5.4"/><category term="1.5.5"/><category term="1.5.x"/><category term="Heroku"/><category term="add"/><category term="bad"/><category term="blank"/><category term="calendar"/><category term="calendar.setup"/><category term="center"/><category term="centers"/><category term="column"/><category term="columns"/><category term="command"/><category term="constant"/><category term="constants"/><category term="credit"/><category term="css"/><category term="date"/><category term="day"/><category term="days"/><category term="descriptor"/><category term="disable"/><category term="disableFunc"/><category term="easy"/><category term="email"/><category term="external"/><category term="file"/><category term="foreman"/><category term="fromJson"/><category term="hello world blog start"/><category term="help"/><category term="html"/><category term="image"/><category term="images"/><category term="install"/><category term="installation"/><category term="javascript"/><category term="js"/><category term="json"/><category term="libgdx"/><category term="link"/><category term="magento url urls rewrite rewrites enable disable"/><category term="magic"/><category term="mailto"/><category term="memo"/><category term="memos"/><category term="menu"/><category term="meta"/><category term="metaslider"/><category term="month"/><category term="months"/><category term="node"/><category term="node.js"/><category term="npm"/><category term="ontology ontologies protégé protege"/><category term="page"/><category term="parse"/><category term="parser"/><category term="phonegap iscroll android eclipse javascript stack overflow onblur"/><category term="plugin"/><category term="plugins"/><category term="prestashop"/><category term="programming"/><category term="python"/><category term="read"/><category term="readString"/><category term="reader"/><category term="reset"/><category term="resets"/><category term="setElementType"/><category term="short"/><category term="shortcode"/><category term="shortcodes"/><category term="slider"/><category term="sliders"/><category term="smarty"/><category term="spanish stopword list stem stemming weka"/><category term="start"/><category term="toolbelt"/><category term="tutorial"/><category term="unknown"/><category term="web"/><category term="weka stemming data mining"/><category term="windows"/><category term="wordpress get page slug"/><category term="wordpress menu sub-menu submenu css php wp_get_nav_menu_items ricoh koala Wordpress.org ul li div hover show hide"/><category term="wordpress page paged permalink link url number"/><category term="wordpress supersized javascript php html theme background image images"/><category term="year"/><category term="years"/><title type='text'>OpenGLized</title><subtitle type='html'>Programming snippets and stuff like that.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://openglized.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/622730475730131583/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://openglized.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>19</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-622730475730131583.post-4972935621071942196</id><published>2013-10-10T01:32:00.000+02:00</published><updated>2013-10-10T01:37:14.396+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="bad"/><category scheme="http://www.blogger.com/atom/ns#" term="command"/><category scheme="http://www.blogger.com/atom/ns#" term="descriptor"/><category scheme="http://www.blogger.com/atom/ns#" term="file"/><category scheme="http://www.blogger.com/atom/ns#" term="foreman"/><category scheme="http://www.blogger.com/atom/ns#" term="help"/><category scheme="http://www.blogger.com/atom/ns#" term="Heroku"/><category scheme="http://www.blogger.com/atom/ns#" term="js"/><category scheme="http://www.blogger.com/atom/ns#" term="node"/><category scheme="http://www.blogger.com/atom/ns#" term="node.js"/><category scheme="http://www.blogger.com/atom/ns#" term="npm"/><category scheme="http://www.blogger.com/atom/ns#" term="programming"/><category scheme="http://www.blogger.com/atom/ns#" term="python"/><category scheme="http://www.blogger.com/atom/ns#" term="start"/><category scheme="http://www.blogger.com/atom/ns#" term="toolbelt"/><category scheme="http://www.blogger.com/atom/ns#" term="tutorial"/><category scheme="http://www.blogger.com/atom/ns#" term="unknown"/><category scheme="http://www.blogger.com/atom/ns#" term="windows"/><title type='text'>Starting with Heroku and node.js on Windows: tips , tricks and tutorial comments</title><content type='html'>It seems like &lt;a href=&quot;http://www.heroku.com/&quot; target=&quot;_blank&quot;&gt;Heroku&lt;/a&gt; is one of the few &quot;cloud hostings&quot; out there giving support to Windows. I&#39;m trying to start programming something with node.js and websockets, so that&#39;s why I played with it today. However, working on Windows and the toolbelt is not so easy.&lt;br /&gt;
&lt;br /&gt;
Here are some tips:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Once you have your Heroku account, you will find the basic tutorial for node.js &lt;a href=&quot;https://devcenter.heroku.com/articles/getting-started-with-nodejs&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Before doing anything install the Heroko toolbelt AND the Node.js installer for Windows. Node.js can be found &lt;a href=&quot;http://nodejs.org/&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;. RESTART windows so the PATH variable is set correctly. Save yourself a headache!&lt;/li&gt;
&lt;li&gt;Very important: Install both toolbelt and the node.js in a directory without spaces on it&#39;s path (avoid Program Files and similar). I installed them on c:\Heroku and c:\nodejs. This will save you trouble.&lt;/li&gt;
&lt;li&gt;Follow the tutorial. You will have to learn a bit of GIT usage if you don&#39;t know about it. Don&#39;t worry, the tutorial explains the basics.&lt;/li&gt;
&lt;li&gt;The toolbelt installs some basic GUI client for windows, so you can commit more easily. However the guy on the videos uses TortoiseGIT. I guess it&#39;s even more practical to use, take a look at it.&lt;/li&gt;
&lt;li&gt;You don&#39;t need to install GIT, it&#39;s included in the toolbelt (at least at present).&lt;/li&gt;
&lt;li&gt;You don&#39;t need to open the Node.js console to work with it.&lt;/li&gt;
&lt;li&gt;Here is a &lt;a href=&quot;http://www.youtube.com/watch?v=844xKbTLoWk&quot; target=&quot;_blank&quot;&gt;great video&lt;/a&gt; explaining some hidden tricks about the tutorial and Heroku. Follow it if you need to. Stop it also if you need to, because it&#39;s quite fast.&lt;/li&gt;
&lt;li&gt;Running &quot;&lt;span class=&quot;function&quot;&gt;npm install&quot; in your working directory is needed to copy the dependencies locally.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;function&quot;&gt;Remember to create the other files stated on the tutorial, you need them all. &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;function&quot;&gt;Foreman is your friend: you can test your app locally without commiting or deploying it to Heroku. Use it!&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;function&quot;&gt;Once started with foreman (&quot;foreman start&quot; command in your work dir) you can see your app by &lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;comment-copy&quot;&gt;typing this in your web browser: 127.0.0.1:5000 or localhost:5000. If you don&#39;t need much fancy graphics you can open a terminal an type curl &lt;/span&gt;&lt;span class=&quot;comment-copy&quot;&gt;127.0.0.1:5000 or curl localhost:5000 (curl is included in the toolbelt).&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;function&quot;&gt;Common problems with Foreman&lt;code&gt;:&amp;nbsp;&lt;/code&gt;&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;&lt;span class=&quot;typ&quot;&gt;Bad&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; file descriptor: it seems that there is a &lt;/span&gt;&lt;/code&gt;problem with latest versions of foreman you must run:&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;&lt;span class=&quot;pln&quot;&gt;gem uninstall foreman&amp;nbsp;&lt;/span&gt;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&lt;span class=&quot;pln&quot;&gt;gem install foreman &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;v &lt;/span&gt;&lt;span class=&quot;lit&quot;&gt;0.61 &lt;/span&gt;&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;node command unknown: You forgot to install node.js maybe?&lt;code&gt;&lt;span class=&quot;lit&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;span class=&quot;lit&quot;&gt;Well I hope to save someone some trouble with this info. In case of doubt look at the video, although it doesn&#39;t show the use of foreman, it&#39;s quite good at everything else.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;lit&quot;&gt;References: thanks to the guys on &lt;a href=&quot;http://stackoverflow.com/questions/15399637/cant-start-foreman-in-heroku-tutorial-using-python&quot; target=&quot;_blank&quot;&gt;Stack Overflow&lt;/a&gt; for some of the info contained here, and also thanks to &lt;a href=&quot;http://www.youtube.com/watch?v=844xKbTLoWk&quot; target=&quot;_blank&quot;&gt;mescalito2&lt;/a&gt; for his great video. &lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://openglized.blogspot.com/feeds/4972935621071942196/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://openglized.blogspot.com/2013/10/starting-with-heroku-and-nodejs-on.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/622730475730131583/posts/default/4972935621071942196'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/622730475730131583/posts/default/4972935621071942196'/><link rel='alternate' type='text/html' href='http://openglized.blogspot.com/2013/10/starting-with-heroku-and-nodejs-on.html' title='Starting with Heroku and node.js on Windows: tips , tricks and tutorial comments'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-622730475730131583.post-8108305529661114529</id><published>2013-09-05T14:55:00.005+02:00</published><updated>2013-09-05T15:01:24.077+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="$smarty"/><category scheme="http://www.blogger.com/atom/ns#" term="$smarty.const"/><category scheme="http://www.blogger.com/atom/ns#" term="$smarty.const."/><category scheme="http://www.blogger.com/atom/ns#" term="1.5"/><category scheme="http://www.blogger.com/atom/ns#" term="1.5.1"/><category scheme="http://www.blogger.com/atom/ns#" term="1.5.2"/><category scheme="http://www.blogger.com/atom/ns#" term="1.5.3"/><category scheme="http://www.blogger.com/atom/ns#" term="1.5.4"/><category scheme="http://www.blogger.com/atom/ns#" term="1.5.5"/><category scheme="http://www.blogger.com/atom/ns#" term="1.5.x"/><category scheme="http://www.blogger.com/atom/ns#" term="constant"/><category scheme="http://www.blogger.com/atom/ns#" term="constants"/><category scheme="http://www.blogger.com/atom/ns#" term="magic"/><category scheme="http://www.blogger.com/atom/ns#" term="prestashop"/><category scheme="http://www.blogger.com/atom/ns#" term="smarty"/><title type='text'>Prestashop 1.5.x Smarty Magic : Constants</title><content type='html'>Prestashop&#39;s Smarty has some hidden tricks. These constants are poorly documented. I found out the first of the list by googling, but no explanation appeared anywhere. So I decided to put this list here and maybe help other fellow programmers that are also struggling with Prestashop :-)&lt;br /&gt;
I will post more info about the missing ones as soon as I know about them.&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;{$smarty.const._CUSTOMIZE_TEXTFIELD_}: ???&lt;/li&gt;
&lt;li&gt;{$smarty.const._CUSTOMIZE_FILE_}: ???&lt;/li&gt;
&lt;li&gt;{$smarty.const._MODULE_DIR_} : will give you the module directory inside your /modules/ directory: Example of usage in the module &quot;Homeslider&quot; (.tpl):&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&amp;lt;img 
src=&quot;{$smarty.const._MODULE_DIR_}/homeslider/images/{$slide.image|escape:&#39;htmlall&#39;:&#39;UTF-8&#39;}&quot;
 alt=&quot;{$slide.legend|escape:&#39;htmlall&#39;:&#39;UTF-8&#39;}&quot; 
height=&quot;{$homeslider.height|intval}&quot; width=&quot;{$homeslider.width|intval}&quot; 
/&amp;gt;&amp;nbsp; &lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;{$smarty.const._THEME_PROD_DIR_}: Unknown.&lt;/li&gt;
&lt;li&gt;{$smarty.const._THEME_PROD_PIC_DIR_}: ??? &lt;/li&gt;
&lt;li&gt;{$smarty.const._THEME_CSS_DIR_}: CSS dir of your theme.&lt;/li&gt;
&lt;li&gt;{$smarty.const._THEME_DIR_} : will give tou the theme directory in your 
template (useful if you want to access your &quot;img&quot; folder, for example). &lt;/li&gt;
&lt;li&gt;{$smarty.const._PS_THEME_MOBILE_DIR_}: Theme mobile directory: themes/yourtheme/mobile.&lt;/li&gt;
&lt;li&gt;{$smarty.const._PS_ADMIN_IMG_}: /img/admin path.&lt;/li&gt;
&lt;li&gt;{$smarty.const._PS_VERSION_}: Get the version number of the Prestashop installation.&lt;/li&gt;
&lt;li&gt;{$smarty.const._PS_ROOT_DIR_}: Root PS installation dir. Example of usage:&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;{if file_exists($smarty.const._PS_ROOT_DIR_|cat:&quot;/img/co/$id_value.jpg&quot;)}&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;{$smarty.const._PS_JS_DIR_}: Javascript dir inside base PS directory: /js/&lt;/li&gt;
&lt;li&gt;{$smarty.const._PS_IMG_}: Prestashop /img/ folder.&lt;/li&gt;
&lt;li&gt;{$smarty.const.PS_TAX_EXC}: Tax excluded?&lt;/li&gt;
&lt;li&gt;{$smarty.const.PS_TAX_INC}: Tax included? &lt;/li&gt;
&lt;li&gt;{$smarty.const.PHP_URL_HOST}: Base URL?&lt;/li&gt;
&lt;li&gt;{$smarty.const.NULL}: NULL value, example:&amp;nbsp;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;{assign var=&#39;productPrice&#39; value=$product-&amp;gt;getPrice(true, $smarty.const.NULL, 2)}&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;br /&gt;
Please let me know if you know the usage or values of the ones that I don&#39;t know via comments.&lt;br /&gt;
&lt;br /&gt;
I hope it helps you a bit!&lt;br /&gt;
&lt;br /&gt;
See you! &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://openglized.blogspot.com/feeds/8108305529661114529/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://openglized.blogspot.com/2013/09/prestashop-15x-smarty-magic-constants.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/622730475730131583/posts/default/8108305529661114529'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/622730475730131583/posts/default/8108305529661114529'/><link rel='alternate' type='text/html' href='http://openglized.blogspot.com/2013/09/prestashop-15x-smarty-magic-constants.html' title='Prestashop 1.5.x Smarty Magic : Constants'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-622730475730131583.post-5123388190515745525</id><published>2013-08-02T21:08:00.001+02:00</published><updated>2013-08-02T21:24:32.577+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="wordpress page paged permalink link url number"/><title type='text'>Wordpress: Page permalink without page number, when showing paged posts</title><content type='html'>If you need to get the page permalink and you don&#39;t want to have /page/2 or whatever on your URL, you can use this function &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; global $post;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $theurl&amp;nbsp; = get_permalink( $post-&amp;gt;ID );&lt;br /&gt;
Cheers.</content><link rel='replies' type='application/atom+xml' href='http://openglized.blogspot.com/feeds/5123388190515745525/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://openglized.blogspot.com/2013/08/wordpress-page-permalink-without-page.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/622730475730131583/posts/default/5123388190515745525'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/622730475730131583/posts/default/5123388190515745525'/><link rel='alternate' type='text/html' href='http://openglized.blogspot.com/2013/08/wordpress-page-permalink-without-page.html' title='Wordpress: Page permalink without page number, when showing paged posts'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-622730475730131583.post-6346773421734055918</id><published>2013-07-17T14:44:00.003+02:00</published><updated>2013-07-17T14:45:55.226+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="wordpress menu sub-menu submenu css php wp_get_nav_menu_items ricoh koala Wordpress.org ul li div hover show hide"/><title type='text'>Working custom menu in Wordpress with submenu</title><content type='html'>Recently I had to create a custom menu in Wordpress. Searching how to do it, I stumbled with the &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_get_nav_menu_items&quot; target=&quot;_blank&quot;&gt;wp_get_nav_menu_items&lt;/a&gt; function. However, the example shown there does not work in my Wordpress installation. A nice koala-ish guy called ricoh &lt;a href=&quot;http://wordpress.org/support/topic/wp_get_nav_menu_items-showing-not-defined-with-all-menu-slugs&quot; target=&quot;_blank&quot;&gt;solved this problem&lt;/a&gt; in the Wordpress.org forums. But I needed more than that. I needed to place a sub-menu for the children pages of a certain page, and that wasn&#39;t made in the solution ricoh provided. So I took his solution and extended it to make this possible.&lt;br /&gt;
&lt;br /&gt;
Please also note that I added an extra DIV to contain it all and make it easily customizable via CSS. Also note that I added some standard Wordpress classes to the items of the lists, so it matches closely the output of the menu provided by Wordpress.&amp;nbsp; &lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&amp;nbsp;&amp;lt;?&amp;nbsp; $menu_name = &#39;your_menu&#39;;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; ?&amp;gt;&amp;lt;div class=&quot;menu-container menu-custom-&amp;lt;?echo $menu_name?&amp;gt;-container&quot;&amp;gt;&amp;lt;?&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; if ( ($menu = wp_get_nav_menu_object( $menu_name ) ) &amp;amp;&amp;amp; ( isset($menu) ) ) {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; $menu_items = wp_get_nav_menu_items($menu-&amp;gt;term_id);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; $menu_list = &#39;&amp;lt;ul id=&quot;menu-&#39; . $menu_name . &#39;&quot; class=&quot;menu&quot;&amp;gt;&#39;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; $children = false;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; $pos = 0;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; foreach ( (array) $menu_items as $key =&amp;gt; $menu_item ) {&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; $children = $menu_items[$pos+1]-&amp;gt;post_parent!=0;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; $parent = $menu_item-&amp;gt;post_parent;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if($parent==&#39;0&#39;){&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; $title = $menu_item-&amp;gt;title;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; $url = $menu_item-&amp;gt;url;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; $menu_list .= &#39;&amp;lt;li class=&quot;menu-item&quot;&amp;gt;&amp;lt;a href=&quot;&#39; . $url . &#39;&quot;&amp;gt;&#39; . $title . &#39;&amp;lt;/a&amp;gt;&#39;;//&amp;lt;/li&amp;gt;&#39;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }else{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; $menu_list .= &#39;&amp;lt;ul class=&quot;sub-menu&quot;&amp;gt;&#39;;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; foreach ( (array) $menu_items as $key2 =&amp;gt; $menu_item2 ) {&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; $parent2 = $menu_item2-&amp;gt;post_parent;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if($parent==$parent2){&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; $title = $menu_item2-&amp;gt;title;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; $url = $menu_item2-&amp;gt;url;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; $menu_list .= &#39;&amp;lt;li class=&quot;menu-item&quot;&amp;gt;&amp;lt;a href=&quot;&#39; . $url . &#39;&quot;&amp;gt;&#39; . $title . &#39;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&#39;;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; $menu_list .= &#39;&amp;lt;/ul&amp;gt;&#39;;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; $menu_list .= &#39;&amp;lt;/li&amp;gt;&#39;;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; //del nivell superior&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if (!$children) $menu_list .= &#39;&amp;lt;/li&amp;gt;&#39;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; $pos ++;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; $menu_list .= &#39;&amp;lt;/ul&amp;gt;&#39;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; } else {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; $menu_list = &#39;&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Menu &quot;&#39; . $menu_name . &#39;&quot; not defined.&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&#39;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; echo $menu_list;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; ?&amp;gt;&amp;lt;/div&amp;gt;&lt;/blockquote&gt;
&lt;br /&gt;
Extra tip 1: I placed this code in my sidebar.php file, after commenting the dynamic_sidebar(...) function, disabling the menu I placed there on the backend.&lt;br /&gt;
&lt;br /&gt;
Extra tip 2: if you want your sub-menu items to hide or show on parent&#39;s hover, add this CSS:&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
li.menu-item ul li {display:none;}&lt;br /&gt;
li.menu-item:hover ul li {display:block;} &lt;/blockquote&gt;
&amp;nbsp;Have fun and hope this helps you with your custom Wordpress menus!</content><link rel='replies' type='application/atom+xml' href='http://openglized.blogspot.com/feeds/6346773421734055918/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://openglized.blogspot.com/2013/07/working-custom-menu-in-wordpress-with.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/622730475730131583/posts/default/6346773421734055918'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/622730475730131583/posts/default/6346773421734055918'/><link rel='alternate' type='text/html' href='http://openglized.blogspot.com/2013/07/working-custom-menu-in-wordpress-with.html' title='Working custom menu in Wordpress with submenu'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-622730475730131583.post-963214972317446660</id><published>2013-06-24T02:18:00.000+02:00</published><updated>2013-06-24T02:19:25.092+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="fromJson"/><category scheme="http://www.blogger.com/atom/ns#" term="json"/><category scheme="http://www.blogger.com/atom/ns#" term="libgdx"/><category scheme="http://www.blogger.com/atom/ns#" term="parse"/><category scheme="http://www.blogger.com/atom/ns#" term="parser"/><category scheme="http://www.blogger.com/atom/ns#" term="read"/><category scheme="http://www.blogger.com/atom/ns#" term="reader"/><category scheme="http://www.blogger.com/atom/ns#" term="readString"/><category scheme="http://www.blogger.com/atom/ns#" term="setElementType"/><title type='text'>Reading and parsing a JSON file with LibGDX</title><content type='html'>There are many reasons why you would need to read a JSON file in your libgdx (android or desktop) application. For example, you could store the configuration of your app, or maybe data stored about some game configuration you need.&lt;br /&gt;
&lt;br /&gt;
If you need to read a JSON file, you can go and read the official LibGDX guide. I&#39;ve done so and after a lot of trial and error I made it work. I also include here the code needed to read a plain text JSON file using LibGDX, which is also very useful for many other tasks.&lt;br /&gt;
&lt;br /&gt;
First, you must know what kind of data you want to read, and therefore you must create the JSON file accordingly. I have taken the &lt;a href=&quot;http://code.google.com/p/libgdx/wiki/JsonParsing&quot; target=&quot;_blank&quot;&gt;official LibGDX documentation&lt;/a&gt; about JSON parsing, and twisted the example to fit my needs. Here is my JSON file:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
{&lt;br /&gt;
enemies: [&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; type: &quot;billy&quot;,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x: 10,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; y: 15&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; },&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; type: &quot;sammy&quot;,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x: 11,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; y: 13&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
],&lt;br /&gt;
name: Lab&lt;br /&gt;
}&lt;/blockquote&gt;
The example is supposed to be the configuration of a certain map. You can see that I have a list of enemies first, with three fields: type, x, and y (position of the enemy on the map). Finally I have the name of the map where the enemies are located.&lt;br /&gt;
&lt;br /&gt;
You need to create two classes: one for the enemies data (with the three members: type, x and y, it&#39;s better to use the same name you used on your JSON but you can change that too). And the root class. In my example I called them Config (for the root) and Position (for the enemy positions):&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public static class Config{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;private ArrayList enemies;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;private String name;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public static class Position {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; private String type;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; private int x;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; private int y;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/blockquote&gt;
Please note that these two classes are static! Otherwise the compiler will throw an error. Note also that I made this two classes internal for my Map class, and therefore it seems Java wants them to be static also.&lt;br /&gt;
Also note that we use ArrayList in order to store several elements, though we don&#39;t tell their type. &lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;Finally, here is the code to load and deserialize the JSON file you created some steps before (called &quot;map.json&quot; in my example). Please note also that there are many ways to set the FileHandle object, in my case I made the file internal and located it into the &quot;assets&quot; folder, since it&#39;s meant to be an android project someday:&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public void loadJson(){&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; FileHandle handle = Gdx.files.internal(&quot;assets/map.json&quot;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; String fileContent = handle.readString();&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Json&amp;nbsp; json = new Json();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; json.setElementType(Config.class, &quot;enemies&quot;, Position.class);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Config data = new Config();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; data = json.fromJson(Config.class, fileContent);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Gdx.app.log(GameManager.LOG, &quot;Data name = &quot; + data.name);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; for(Object e :data.enemies){&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Position p = (Position)e;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Gdx.app.log(GameManager.LOG, &quot;type = &quot; + p.type + &quot;x = &quot; + p.x + &quot;y =&quot; + p.y);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/blockquote&gt;
&lt;br /&gt;
The explanation is simple. Firstly, we create a FileHandle with the file name and the correct location of the JSON file. After that, we read it&#39;s contents and put them into a String object. After that, we create a JSON object and we tell it that there is some element into Config class that it&#39;s of Position class, and it&#39;s marked by the tag &quot;enemies&quot;. Then we create a Config object, which will hold the deserialized data. With the call to &quot;json.fromJson&quot; we deserialize the fileContent string and turn it into a Config object.&lt;br /&gt;
After that, we can print happily the contents of our object, in this case the Object returned by the ArrayList must be casted to Position in order to get the correct data to print.&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
I hope this helps the LibGDX community in some way, since the documentation is a bit scarce and examples of usage are not that easy to find on the net. Just let me know in the comments if you know how to improve this code, your impressions or problems with this stuff.&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://openglized.blogspot.com/feeds/963214972317446660/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://openglized.blogspot.com/2013/06/reading-and-parsing-json-file-with.html#comment-form' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/622730475730131583/posts/default/963214972317446660'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/622730475730131583/posts/default/963214972317446660'/><link rel='alternate' type='text/html' href='http://openglized.blogspot.com/2013/06/reading-and-parsing-json-file-with.html' title='Reading and parsing a JSON file with LibGDX'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-622730475730131583.post-956049053146993895</id><published>2013-06-14T14:06:00.000+02:00</published><updated>2013-06-14T14:07:31.165+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="code"/><category scheme="http://www.blogger.com/atom/ns#" term="column"/><category scheme="http://www.blogger.com/atom/ns#" term="columns"/><category scheme="http://www.blogger.com/atom/ns#" term="plugin"/><category scheme="http://www.blogger.com/atom/ns#" term="plugins"/><category scheme="http://www.blogger.com/atom/ns#" term="short"/><category scheme="http://www.blogger.com/atom/ns#" term="shortcode"/><category scheme="http://www.blogger.com/atom/ns#" term="shortcodes"/><category scheme="http://www.blogger.com/atom/ns#" term="wordpress"/><title type='text'>Wordpress: easy way to have colum shortcodes</title><content type='html'>Sometimes you have to create a new Wordpress template that requires columns. The hard way to achieve this is via CSS: you can somehow add HTML code to your posts and pages and then set the rules in your CSS files so they show as the columns.&lt;br /&gt;
&lt;br /&gt;
The easyest way I found to achieve this is via a cool Wordpress plugin called &lt;a href=&quot;http://wordpress.org/plugins/column-shortcodes/&quot; target=&quot;_blank&quot;&gt;Column Shortcodes&lt;/a&gt;. It lets you use a series of shortcodes so you can put many different column sizes in your pages with simply copying a shortcode. This way your posts are less messy and you don&#39;t have to touch it&#39;s HTML code.&lt;br /&gt;
&lt;br /&gt;
Just download the plugin, install it and then you will be able to use all these shortcodes:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;[full_width][/full_width]
[one_half][/one_half]
[one_half_last][/one_half_last]
[one_third][/one_third]
[one_third_last][/one_third_last]
[two_third][/two_third]
[two_third_last][/two_third_last]
[one_fourth][/one_fourth]
[one_fourth_last][/one_fourth_last]
[three_fourth][/three_fourth]
[three_fourth_last][/three_fourth_last]
[one_fifth][/one_fifth]
[one_fifth_last][/one_fifth_last]
[two_fifth][/two_fifth]
[two_fifth_last][/two_fifth_last]
[three_fifth][/three_fifth]
[three_fifth_last][/three_fifth_last]
[four_fifth][/four_fifth]
[four_fifth_last][/four_fifth_last]
[one_sixth][/one_sixth]
[one_sixth_last][/one_sixth_last]&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;&amp;nbsp;&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;&amp;nbsp;&lt;/code&gt;&lt;/pre&gt;
Remember to put your text between the tags. For example if you want a left text that is in a 2/3 column and a right column that has 1/3 your post should look like:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;[two_third]This is my left column text[/two_third]&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;&lt;code&gt;[two_third]This is my right column text[/two_third]&lt;/code&gt; &lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;
&lt;/code&gt;&lt;/pre&gt;
Just make sure you use the corresponding tags: if you use one_third then you should use two_thirds if you want to put something in the remaining text. Of course you could nest another column set inside a column set like:&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;[two_third]&lt;/code&gt;&lt;code&gt;&lt;code&gt;[one_half]Hello world[/one_half][one_half_last]Lorem ipsum[/one_half_last] &lt;/code&gt;[/two_third]&lt;/code&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre&gt;[one_third_last]Just another text[/one_third_last]&lt;/pre&gt;
...&lt;br /&gt;
&lt;br /&gt;
By the way, the &quot;_last&quot; word at the end of the tag just makes the column stick to the right, or that&#39;s what I guess looking at the CSS provided by the plugin.&lt;br /&gt;
&lt;br /&gt;
Have fun with the columns :D</content><link rel='replies' type='application/atom+xml' href='http://openglized.blogspot.com/feeds/956049053146993895/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://openglized.blogspot.com/2013/06/wordpress-easy-way-to-have-colum.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/622730475730131583/posts/default/956049053146993895'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/622730475730131583/posts/default/956049053146993895'/><link rel='alternate' type='text/html' href='http://openglized.blogspot.com/2013/06/wordpress-easy-way-to-have-colum.html' title='Wordpress: easy way to have colum shortcodes'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-622730475730131583.post-5888247801472040310</id><published>2013-06-14T13:52:00.000+02:00</published><updated>2013-06-14T14:07:55.652+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="add"/><category scheme="http://www.blogger.com/atom/ns#" term="easy"/><category scheme="http://www.blogger.com/atom/ns#" term="install"/><category scheme="http://www.blogger.com/atom/ns#" term="installation"/><category scheme="http://www.blogger.com/atom/ns#" term="meta"/><category scheme="http://www.blogger.com/atom/ns#" term="metaslider"/><category scheme="http://www.blogger.com/atom/ns#" term="slider"/><category scheme="http://www.blogger.com/atom/ns#" term="sliders"/><category scheme="http://www.blogger.com/atom/ns#" term="wordpress"/><title type='text'>Wordpress: Add a slider the easy way</title><content type='html'>If you need to add a slider to your wordpress theme you can do many things. You can hardcode it into your page template, but that&#39;s the hard way and not very flexible.&lt;br /&gt;
&lt;br /&gt;
You can make it quickly and easily using the &lt;a href=&quot;http://wordpress.org/plugins/ml-slider/&quot; target=&quot;_blank&quot;&gt;Meta Slider&lt;/a&gt; plugin. It&#39;s a very well made plugin for Wordpress that let&#39;s you easily put a slider into a post, page or even in all your pages if you wish.&lt;br /&gt;
&lt;br /&gt;
The steps to do it are:&lt;br /&gt;
&lt;br /&gt;
1. Download the plugin and install as stated in the link above (check &lt;a href=&quot;http://wordpress.org/plugins/ml-slider/installation/&quot; target=&quot;_blank&quot;&gt;Installation&lt;/a&gt;).&lt;br /&gt;
2. Activate your plugin in your admin panel.&lt;br /&gt;
3. Look to the bottom of the control column, you should see a green button tagged &quot;MetaSlider&quot;.&lt;br /&gt;
4. Press the &quot;+&quot; sign on top left of the screen to add a new slider.&lt;br /&gt;
5. Configure your slider with the images you want to show. Test it before you go to the next step (there is a button to save and test it).&lt;br /&gt;
6. Copy the shortcode (in case you want to put it into a post or page in your Wordpress) or the PHP code also provided by the plugin, and paste it where you need it.&lt;br /&gt;
7. Enjoy :-D&lt;br /&gt;
&lt;br /&gt;
Hope it helps you!</content><link rel='replies' type='application/atom+xml' href='http://openglized.blogspot.com/feeds/5888247801472040310/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://openglized.blogspot.com/2013/06/wordpress-add-slider-easy-way.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/622730475730131583/posts/default/5888247801472040310'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/622730475730131583/posts/default/5888247801472040310'/><link rel='alternate' type='text/html' href='http://openglized.blogspot.com/2013/06/wordpress-add-slider-easy-way.html' title='Wordpress: Add a slider the easy way'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-622730475730131583.post-5400555276137502898</id><published>2013-03-06T15:42:00.001+01:00</published><updated>2013-06-14T14:08:12.339+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="credit"/><category scheme="http://www.blogger.com/atom/ns#" term="magento"/><category scheme="http://www.blogger.com/atom/ns#" term="memo"/><category scheme="http://www.blogger.com/atom/ns#" term="memos"/><category scheme="http://www.blogger.com/atom/ns#" term="reset"/><category scheme="http://www.blogger.com/atom/ns#" term="resets"/><title type='text'>Magento: Reset Credit Memos</title><content type='html'>Sometimes in Magento you need to reset your database. The most common situation is when you need to pass your system from testing to production. Then, you may have a lot of test purchases, credit memos, invoices and other stuff in your database that you need to get rid of.&lt;br /&gt;
&lt;br /&gt;
I faced this situation in the past. I found many scripts in order to reset the database, but not ALL the tables of the database. The scripts I found missed to reset one important thing: credit memos.&lt;br /&gt;
&lt;br /&gt;
To solve this issue, I had to take a closer look at the Magento database structure and guess where the credit memo info was stored. The result is this small script, which will reset your credit memos, basically deleting them all:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
SET FOREIGN_KEY_CHECKS=0;&lt;br /&gt;
&lt;br /&gt;
TRUNCATE `sales_flat_creditmemo`;&lt;br /&gt;
TRUNCATE `sales_flat_creditmemo_grid`;&lt;br /&gt;
TRUNCATE `sales_flat_creditmemo_comment`;&lt;br /&gt;
TRUNCATE `sales_flat_creditmemo_item`;&lt;br /&gt;
&lt;br /&gt;
ALTER TABLE `sales_flat_creditmemo` AUTO_INCREMENT=1;&lt;br /&gt;
ALTER TABLE `sales_flat_creditmemo_grid` AUTO_INCREMENT=1;&lt;br /&gt;
ALTER TABLE `sales_flat_creditmemo_comment` AUTO_INCREMENT=1;&lt;br /&gt;
ALTER TABLE `sales_flat_creditmemo_item` AUTO_INCREMENT=1; &lt;/blockquote&gt;
&lt;br /&gt;
Of course, your tables might have some sort of prefix. In that case, just change the database table names accordingly.&lt;br /&gt;
&lt;br /&gt;
Hope this is helpful for you!</content><link rel='replies' type='application/atom+xml' href='http://openglized.blogspot.com/feeds/5400555276137502898/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://openglized.blogspot.com/2013/03/magento-reset-credit-memos.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/622730475730131583/posts/default/5400555276137502898'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/622730475730131583/posts/default/5400555276137502898'/><link rel='alternate' type='text/html' href='http://openglized.blogspot.com/2013/03/magento-reset-credit-memos.html' title='Magento: Reset Credit Memos'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-622730475730131583.post-6875288853360309455</id><published>2012-10-19T17:09:00.002+02:00</published><updated>2013-06-14T14:08:31.278+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="center"/><category scheme="http://www.blogger.com/atom/ns#" term="centers"/><category scheme="http://www.blogger.com/atom/ns#" term="css"/><category scheme="http://www.blogger.com/atom/ns#" term="html"/><category scheme="http://www.blogger.com/atom/ns#" term="image"/><category scheme="http://www.blogger.com/atom/ns#" term="images"/><category scheme="http://www.blogger.com/atom/ns#" term="web"/><title type='text'>Centering image in the middle of the browser window with CSS</title><content type='html'>Recently I needed to center an image in the middle of the window browser, just to make a loading screen for a Phonegap app.&lt;br /&gt;
&lt;br /&gt;
After googling for almost an hour and trying many ways, I just couldn&#39;t find the way to center it both vertically and horizontally. Finally , after reading &lt;a href=&quot;http://stackoverflow.com/questions/388180/how-to-make-an-image-center-vertically-horizontally-inside-a-bigger-div&quot; target=&quot;_blank&quot;&gt;this&lt;/a&gt; and trying many of the alternatives that the users have posted, it did the trick.&lt;br /&gt;
&lt;br /&gt;
The CSS code to use is:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;default prettyprint&quot;&gt;&lt;code&gt;#yourimageid&lt;span class=&quot;pun&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&amp;nbsp; &amp;nbsp; position&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; absolute&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&amp;nbsp; &amp;nbsp; margin&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;auto&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&amp;nbsp; &amp;nbsp; top&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&amp;nbsp; &amp;nbsp; left&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&amp;nbsp; &amp;nbsp; right&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&amp;nbsp; &amp;nbsp; bottom&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;lit&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
That&#39;s it, you don&#39;t need to put any more code in order to center your image! It will be always centered and in the middle of the browser, without any stretching applied.&lt;br /&gt;
&lt;br /&gt;
I guess you can use it to center also a div in the middle of the screen, in case you need to put other stuff centered. </content><link rel='replies' type='application/atom+xml' href='http://openglized.blogspot.com/feeds/6875288853360309455/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://openglized.blogspot.com/2012/10/centering-image-in-middle-of-browser.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/622730475730131583/posts/default/6875288853360309455'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/622730475730131583/posts/default/6875288853360309455'/><link rel='alternate' type='text/html' href='http://openglized.blogspot.com/2012/10/centering-image-in-middle-of-browser.html' title='Centering image in the middle of the browser window with CSS'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-622730475730131583.post-4806091403812774959</id><published>2012-10-14T20:54:00.004+02:00</published><updated>2013-06-14T14:09:02.757+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="calendar"/><category scheme="http://www.blogger.com/atom/ns#" term="calendar.setup"/><category scheme="http://www.blogger.com/atom/ns#" term="code"/><category scheme="http://www.blogger.com/atom/ns#" term="date"/><category scheme="http://www.blogger.com/atom/ns#" term="day"/><category scheme="http://www.blogger.com/atom/ns#" term="days"/><category scheme="http://www.blogger.com/atom/ns#" term="disable"/><category scheme="http://www.blogger.com/atom/ns#" term="disableFunc"/><category scheme="http://www.blogger.com/atom/ns#" term="javascript"/><category scheme="http://www.blogger.com/atom/ns#" term="magento"/><category scheme="http://www.blogger.com/atom/ns#" term="month"/><category scheme="http://www.blogger.com/atom/ns#" term="months"/><category scheme="http://www.blogger.com/atom/ns#" term="year"/><category scheme="http://www.blogger.com/atom/ns#" term="years"/><title type='text'>Disabling days in Magento calendar</title><content type='html'>Sometimes you need to modify the way Magento calendar works, so the user can&#39;t choose a holiday or a weekend day. This is not specifically explained by the Magento community or documentation, so I decided to post it here.&lt;br /&gt;
&lt;br /&gt;
My version of Magento is 1.7, just to let you know, but should work with others.&lt;br /&gt;
&lt;br /&gt;
Let&#39;s say you call your calendar via javascript like this:&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;lt;![CDATA[&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Calendar.setup({&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; inputField: &quot;sdate&quot;,&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; ifFormat: &quot;%Y-%m-%d&quot;,&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; showsTime: false,&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; button: &quot;_dob_trig&quot;,&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; align: &quot;Bl&quot;,&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; singleClick: true&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //]]&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;/script&amp;gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
Then you get a functional calendar, but the user can choose any day of the year, and that&#39;s something we want to prevent.&lt;br /&gt;
&lt;br /&gt;
So, what you have to do is to add a &quot;disableFunc&quot;&amp;nbsp; function to this calendar setup. &lt;br /&gt;
&lt;br /&gt;
disableFunc: function(date) {&lt;br /&gt;
&amp;nbsp;//return true if you want the day disabled, false otherwise&lt;br /&gt;
&amp;nbsp;... &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
For example, you could do something like this to disable sundays (remember, in javascript&#39;s Date object, Sunday is 0, Monday 1, ... until Saturday that is 6! &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;lt;![CDATA[&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Calendar.setup({&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; inputField: &quot;sdate&quot;,&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; ifFormat: &quot;%Y-%m-%d&quot;,&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; showsTime: false,&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; button: &quot;_dob_trig&quot;,&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; align: &quot;Bl&quot;,&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; singleClick: true,&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; disableFunc: function(date) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //disable all sundays and New Year day &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var month = date.getMonth() + 1; //add 1 because January = 0 and so on&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var day = date.getDate(); //get day number&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (month==1 &amp;amp;&amp;amp; day == 1) return true; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return date.getDay() == 0;&amp;nbsp; //0 for sunday, 1 for monday, etc&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //]]&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So the code above checks (the disableFunc is called for every day in the current month displayed by the calendar!) if the day is 1-1, if so, the day is disabled. Otherwise, it checks if the day is a Sunday, and if so, the day is also disabled.&lt;br /&gt;
&lt;br /&gt;
Hope this code helps you out with calendar manipulation in Magento! &lt;br /&gt;
&lt;pre class=&quot;default prettyprint&quot;&gt;&lt;code&gt;&lt;span class=&quot;pun&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
</content><link rel='replies' type='application/atom+xml' href='http://openglized.blogspot.com/feeds/4806091403812774959/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://openglized.blogspot.com/2012/10/disabling-days-in-magento-calendar.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/622730475730131583/posts/default/4806091403812774959'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/622730475730131583/posts/default/4806091403812774959'/><link rel='alternate' type='text/html' href='http://openglized.blogspot.com/2012/10/disabling-days-in-magento-calendar.html' title='Disabling days in Magento calendar'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-622730475730131583.post-2629682908436042223</id><published>2012-10-06T02:15:00.001+02:00</published><updated>2012-10-14T20:56:46.701+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="phonegap iscroll android eclipse javascript stack overflow onblur"/><title type='text'>Phonegap + iScroll: solving keyboard issues</title><content type='html'>First of all, i must say that I&#39;m using iScroll 4.2 with Phonegap 2.1 on an android project (eclipse), but this hack should work with other platforms and versions.&lt;br /&gt;
&lt;br /&gt;
If you tried to click an input field (text box, select, etc) when using iScroll and phonegap, you will find out that you can&#39;t. That&#39;s because iScroll prevents the default behaviour of your click, making impossible to enter text or select anything.&lt;br /&gt;
&lt;br /&gt;
I found the fix for this at &lt;a href=&quot;http://stackoverflow.com/questions/5745374/iscroll-4-not-working-with-form-select-element-iphone-safari-and-android-brows&quot; target=&quot;_blank&quot;&gt;Stack Overflow&lt;/a&gt;, however a new problem appears: the keyboard doesn&#39;t hide by itself when you put text inside the box!&lt;br /&gt;
&lt;br /&gt;
To fix this, i hacked a bit the code from Stack Overflow. The final result is like this:&lt;br /&gt;
&lt;br /&gt;
Step 1: change this code on iscroll.js :&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;default prettyprint&quot;&gt;
&lt;code&gt;&lt;span class=&quot;pln&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; onBeforeScrollStart&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; e&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;preventDefault&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;},&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;br /&gt;
and put this:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;default prettyprint&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; onBeforeScrollStart: function (e) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; var nodeType = e.explicitOriginalTarget ? e.explicitOriginalTarget.nodeName.toLowerCase():(e.target ? e.target.nodeName.toLowerCase():&#39;&#39;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if(nodeType !=&#39;select&#39; &amp;amp;&amp;amp; nodeType !=&#39;option&#39; &amp;amp;&amp;amp; nodeType !=&#39;input&#39; &amp;amp;&amp;amp; nodeType!=&#39;textarea&#39; &amp;amp;&amp;amp; !showkey) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;e.preventDefault();&amp;nbsp;&amp;nbsp;&amp;nbsp; //prevents showing keyboard - scrolling&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }//otherwise, show keyboard, do default&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if(!showkey) showkey = true;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; },&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
Then you must declare the variable &quot;showkey&quot; at the beginning of iscroll.js:&lt;br /&gt;
&lt;br /&gt;
var showkey =true;&lt;br /&gt;
&lt;br /&gt;
Then on your &quot;onblur&quot; events of your inputs you must put:&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;input onblur=&quot;showkey=false&quot; .../&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So when you make onblur, the &quot;e.preventDefault()&quot; code can&#39;t be executed just one time, making default behaviour (hiding keyboard) possible.&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://openglized.blogspot.com/feeds/2629682908436042223/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://openglized.blogspot.com/2012/10/phonegap-iscroll-solving-keyboard-issues.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/622730475730131583/posts/default/2629682908436042223'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/622730475730131583/posts/default/2629682908436042223'/><link rel='alternate' type='text/html' href='http://openglized.blogspot.com/2012/10/phonegap-iscroll-solving-keyboard-issues.html' title='Phonegap + iScroll: solving keyboard issues'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-622730475730131583.post-7824347830375271845</id><published>2012-09-23T12:58:00.001+02:00</published><updated>2013-06-14T13:53:12.294+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="magento url urls rewrite rewrites enable disable"/><title type='text'>Magento: URL Rewrite Disabled - How to force URL Rewrite</title><content type='html'>&lt;br /&gt;
&lt;br /&gt;
Yesterday I tried to make an URL rewrite or redirect in my local Magento 1.7. I just created a new category and needed it to redirect to the &quot;log in&quot; page.&lt;br /&gt;
&lt;br /&gt;
So I just entered the backend, clicked Catalog -&amp;gt; URL Rewrite Management. The problem was, that the &quot;Target Path&quot; was disabled! So stupid that the Magento team disabled that...&lt;br /&gt;
&lt;br /&gt;
EDIT: You can add Custom URL Rewrites and put any target and request paths if you create a new rule and set the type to &quot;Custom&quot;. I recommend to delete the rules that may interfere with this first (system rules created by magento by default), then on URL Rewrite Management, press the Add URL Rewrite Button (upper right). Then on Create URL Rewrite set the value to &quot;Custom&quot;. More info &lt;a href=&quot;http://www.magentocommerce.com/wiki/3_-_store_setup_and_management/seo/how_to_work_with_magento_url_rewrite_rules&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;. If you still have problems or want to change system URL rewrites, keep reading ;-)&lt;br /&gt;
&lt;br /&gt;
After trying many approaches (like creating a block, a widget, etc) it was clear that the solution was to access the database directly with PHPMyAdmin and change values manually! So sad that it has to be like that, but well...&lt;br /&gt;
&lt;br /&gt;
Here is the process to change the target path:&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;You have to open your PHPMyAdmin or similar, then go to your Magento Database. &lt;/li&gt;
&lt;li&gt;There, look for a table called &quot;core_url_rewrite&quot;.&lt;/li&gt;
&lt;li&gt;Browse it... then just look for your desired &quot;request_path&quot;, that&#39;s the path that will be redirected. The one you want to modify is &quot;target_path&quot;. Magento creates that value automatically, but now you can change it. The easy way is to press over it and change it manually.&lt;/li&gt;
&lt;li&gt;You are done!Go and test your cool URL Rewrite!!!&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
Hope it helps you out... :-)&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://openglized.blogspot.com/feeds/7824347830375271845/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://openglized.blogspot.com/2012/09/magento-url-rewrite-disabled-how-to.html#comment-form' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/622730475730131583/posts/default/7824347830375271845'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/622730475730131583/posts/default/7824347830375271845'/><link rel='alternate' type='text/html' href='http://openglized.blogspot.com/2012/09/magento-url-rewrite-disabled-how-to.html' title='Magento: URL Rewrite Disabled - How to force URL Rewrite'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-622730475730131583.post-209576435515611004</id><published>2012-03-07T14:31:00.002+01:00</published><updated>2013-06-14T14:09:30.425+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="blank"/><category scheme="http://www.blogger.com/atom/ns#" term="email"/><category scheme="http://www.blogger.com/atom/ns#" term="external"/><category scheme="http://www.blogger.com/atom/ns#" term="link"/><category scheme="http://www.blogger.com/atom/ns#" term="mailto"/><category scheme="http://www.blogger.com/atom/ns#" term="menu"/><category scheme="http://www.blogger.com/atom/ns#" term="page"/><category scheme="http://www.blogger.com/atom/ns#" term="wordpress"/><title type='text'>Wordpress page as external link</title><content type='html'>Let&#39;s say you need a &quot;Contact&quot; page in your Wordpress but you don&#39;t want a page displayed. All you want is to open the email client with a &quot;mailto&quot; link. How to do that?&lt;br /&gt;
&lt;br /&gt;
After digging on the web for some time i found this solution. You just have to create a blank page in your wordpress, and then put this in the title of the page:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&amp;lt;a href=”your-link”&amp;gt;The title&amp;lt;/a&amp;gt;&lt;/blockquote&gt;
&lt;br /&gt;
So for example, if you want to open the mail client to your&amp;nbsp; email address, you should put a page title like:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&amp;lt;a href=”mailto:contact@mysite.com”&amp;gt;Contact&amp;lt;/a&amp;gt;&lt;/blockquote&gt;
&lt;br /&gt;
And what if you want to point the link to another site?&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&amp;lt;a href=”http://www.google.com”&amp;gt;Go to Google&amp;lt;/a&amp;gt; &lt;/blockquote&gt;
&lt;br /&gt;
No plugins, no special tricks needed to put a link to a mail address or external link in your menu bar!&lt;br /&gt;
&lt;br /&gt;
Thanks to &lt;a href=&quot;http://ulyssesonline.com/2010/06/10/create-a-wordpress-page-with-an-external-link/&quot; target=&quot;_blank&quot;&gt;Ulysses&lt;/a&gt; for the info.&lt;br /&gt;
&lt;br /&gt;
Have fun!</content><link rel='replies' type='application/atom+xml' href='http://openglized.blogspot.com/feeds/209576435515611004/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://openglized.blogspot.com/2012/03/wordpress-page-as-external-link.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/622730475730131583/posts/default/209576435515611004'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/622730475730131583/posts/default/209576435515611004'/><link rel='alternate' type='text/html' href='http://openglized.blogspot.com/2012/03/wordpress-page-as-external-link.html' title='Wordpress page as external link'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-622730475730131583.post-2455149776971559271</id><published>2012-03-05T22:05:00.002+01:00</published><updated>2013-06-14T13:53:29.785+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="wordpress get page slug"/><title type='text'>Wordpress: Get page slug</title><content type='html'>So what if you need the page slug when programming on Wordpress? It doesn&#39;t have a function like &quot;the_slug()&quot;. But no problem! You can put this code inside your &quot;functions.php&quot;, located in your theme folder, and use it in your theme code!&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;br /&gt;
&lt;code&gt;function get_the_slug() {&lt;/code&gt;&lt;br /&gt;
&lt;code&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; global $post;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; if ( is_single() || is_page() ) {&lt;/code&gt;&lt;code&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;   &lt;/code&gt;&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;code&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return $post-&amp;gt;post_name;&lt;/code&gt;&lt;code&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt; &lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;code&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }else{&lt;/code&gt;&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;code&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return &quot;&quot;;&lt;/code&gt;&lt;code&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/code&gt;&lt;/blockquote&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;code&gt;}&lt;code&gt;&lt;/code&gt;&amp;nbsp; &amp;nbsp; &lt;/code&gt;&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;code&gt;&lt;code&gt;}&lt;/code&gt;&lt;/code&gt;&lt;/blockquote&gt;
You can use this function to generate a custom code for your page, according to the page you are in, like:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&amp;lt;?php &lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; if (get_the_slug()==&quot;Contact&quot;){ &lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo &quot;&amp;lt;span&amp;gt;Welcome to Contact section!&amp;lt;/span&amp;gt;&quot; &lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
?&amp;gt; &lt;/blockquote&gt;
&amp;nbsp;BTW I got the code from the Wordpress codex (link &lt;a href=&quot;http://wordpress.org/support/topic/how-to-get-the-current-post-slug&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;) , thanks to sligowaths for the code! I just tought that it would be nice to make it a bit more visible and show it&#39;s use.&lt;br /&gt;
&lt;br /&gt;
Have fun!&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;code&gt;&lt;/code&gt;&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;code&gt; &lt;/code&gt;&lt;/blockquote&gt;
</content><link rel='replies' type='application/atom+xml' href='http://openglized.blogspot.com/feeds/2455149776971559271/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://openglized.blogspot.com/2012/03/wordpress-get-page-slug.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/622730475730131583/posts/default/2455149776971559271'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/622730475730131583/posts/default/2455149776971559271'/><link rel='alternate' type='text/html' href='http://openglized.blogspot.com/2012/03/wordpress-get-page-slug.html' title='Wordpress: Get page slug'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-622730475730131583.post-2224156211129878937</id><published>2012-03-02T12:08:00.002+01:00</published><updated>2012-03-02T12:23:45.369+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="wordpress supersized javascript php html theme background image images"/><title type='text'>Custom background gallery with Wordpress</title><content type='html'>Recently I had to make a Wordpress based site with a custom background. A friend of mine suggested using Wordpress gallery (via attaching the images to the pages) to do it. It&#39;s possible, and I have done it, however the actual site has to be moved, and i experienced some problems &lt;a href=&quot;http://codex.wordpress.org/Backing_Up_Your_Database&quot; target=&quot;_blank&quot;&gt;exporting and importing the posts and pages&lt;/a&gt;. The problem is, that when exporting, it gives some kind of error about the attached images.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So, i tried to find out another way to set background images for a Wordpress site, in a more easy and movable way. My purpose was to put all images on some sub-folder of the theme, and then use a custom field the page. This, combined with some magic code inside &quot;functions.php&quot; code, can make it possible.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here are the steps!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. Add a custom field to your pages. In my case, i called it &quot;bgrange&quot;. (If you don&#39;t see custom fields it&#39;s because they are hidden, click &quot;Screen options&quot; upper right of the screen, for later Wordpress versions, after 3.2 i guess, then check &quot;custom fields&quot; check-box).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. Put a value in the custom field. The code i made is able to recognize background ranges. Note that your backgrounds must be named with the same prefix and suffix, for example &quot;my_background_XX.png&quot;, where XX is the number of the background. In the case of the image, the images selected are the named &quot;my_background_01.png&quot;, &quot;my_background_02.png&quot;,etc, until 8, and the final one is the image &quot;my_background_19.png&quot;, in this case. Prefix and suffix can be set later to fit your preferences, as will be seen. Do this operation on all the pages that you want to show the custom background. &lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnYuJ5juO87uBO8t5DIGqOfcxaxwFP9P123z4gFiizMFVdYYWMa1yep0mwZ3EjH8FMhP6HAmafavM9PnLC4uaV2RHGM3aA83cU3wiNHAN3y5KPry6EEyuVy-aQtiM8fl6yBmDmquFGeHw/s1600/cfield.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;180&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnYuJ5juO87uBO8t5DIGqOfcxaxwFP9P123z4gFiizMFVdYYWMa1yep0mwZ3EjH8FMhP6HAmafavM9PnLC4uaV2RHGM3aA83cU3wiNHAN3y5KPry6EEyuVy-aQtiM8fl6yBmDmquFGeHw/s400/cfield.png&quot; width=&quot;400&quot; /&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&amp;nbsp;3. Let&#39;s add some PHP code in your page header, for example.&lt;/div&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&amp;lt;div id=&quot;preload&quot; style=&quot;display:none;&quot;&amp;gt;&lt;/div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;?php &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; $bgpath = &quot;&quot;.get_bloginfo(&quot;template_directory&quot;).&quot;/images/backgrounds/&quot;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; $range = &quot;&quot;.get_post_meta($post-&amp;gt;ID, &#39;bgrange&#39;, true);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; echo &quot;\n&quot;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; get_backgrounds2($bgpath, &quot;my_background_&quot; ,&quot;.png&quot;, $range);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; ?&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/blockquote&gt;&lt;br /&gt;
Ok what this code does is: put a div with an ID called &quot;preload&quot; that is hidden, so images won&#39;t be displayed for now. Then, the php code gets the template directory of your theme, and supposes that your backgrounds are inside &quot;&amp;lt;yourthemename&amp;gt;/images/backgrounds&quot;. You can change that to fit your needs. The second php line gets the custom field that we just added to the page. This is a string, that will be treated afterward. After that, a simple &quot;echo \n&quot; to ease the readness of the code (not necessary but makes easier to read your code). The final statement uses a custom function that has to be defined on your &quot;functions.php&quot;, a file located in your theme folder in case you don&#39;t know, that includes a lot of functions used by your theme to make it work. So, the last step is to put these functions on functions.php file!&lt;br /&gt;
&lt;br /&gt;
3. Open your functions.php file and put this code:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;function get_backgrounds($path, $prefix, $sufix, $start, $end) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; if($start&amp;lt;=$end){&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; for($n=$start; $n&amp;lt;=$end; $n++){&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; $nstr = trim(&quot;&quot;.$n);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if($n&amp;lt;=9 &amp;amp;&amp;amp; $n&amp;gt;=0){$nstr = &quot;0&quot;.$nstr;}&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; echo &quot;&amp;lt;img class=\&quot;bgimage\&quot; src=\&quot;&quot;.$path.$prefix.$nstr.$sufix.&quot;\&quot;/&amp;gt;&quot;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; echo &quot;\n&quot;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; return true;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }else{&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; for($n=$start; $n&amp;gt;=$end; $n=$n-1){&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; $nstr = trim(&quot;&quot;.$n);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if($n&amp;lt;=9 &amp;amp;&amp;amp; $n&amp;gt;=0){$nstr = &quot;0&quot;.$nstr;}&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; echo &quot;&amp;lt;img class=\&quot;bgimage\&quot; src=\&quot;&quot;.$path.$prefix.$nstr.$sufix.&quot;\&quot;/&amp;gt;&quot;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; echo &quot;\n&quot;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; return true;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; return false;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function get_backgrounds2($path, $prefix, $sufix, $list) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; $data = explode(&#39;,&#39;, $list);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; for($n=0; $n&amp;lt;count($data); $n++){&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if(strpos($data[$n], &#39;-&#39;) !== false){&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; $rdata = explode(&#39;-&#39;, $data[$n]);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; get_backgrounds($path, $prefix, $sufix, $rdata[0], $rdata[1]);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }else{&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; $nstr = trim(&quot;&quot;.$data[$n]);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if(intval($data[$n])&amp;lt;=9 &amp;amp;&amp;amp; intval($data[$n])&amp;gt;=0){$nstr = &quot;0&quot;.$nstr;}&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; echo &quot;&amp;lt;img class=\&quot;bgimage\&quot; src=\&quot;&quot;.$path.$prefix.$nstr.$sufix.&quot;\&quot;/&amp;gt;&quot;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; echo &quot;\n&quot;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; return true;&lt;br /&gt;
}&lt;/blockquote&gt;&lt;br /&gt;
&lt;br /&gt;
What makes this code? Ok, let&#39;s start by the second function. Basically what it makes is to get a path (the path to your backgrounds) a prefix (remember, &quot;my_background_&quot; for example), a suffix (&quot;.png&quot; for example) and a list (that is, the custom field we added to our pages). The list is &quot;exploded&quot; into individual elements, separated by commas. Then, if a range of backgrounds is detected, the first function is called, that in turn explodes it and generates the list of images. If no range detected, the list elements generate individual backgrounds. You finally end up with a list of &quot;&amp;lt;img&amp;gt;&quot; elements &quot;echoed&quot; (that is, generated HTML put on your page). Since the &amp;lt;div&amp;gt; element that they are in is hidden, there is no problem. We just need that code in the page , so we can use it afterward.&lt;br /&gt;
&lt;br /&gt;
So, now we have our page with a hidden div, and the images on it, they are not displayed but the code is there, now what?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. Use a jQuery or JavaScript plug-in to show the images as backgrounds. I used successfully &lt;a href=&quot;http://buildinternet.com/project/supersized/&quot; target=&quot;_blank&quot;&gt;Supersized &lt;/a&gt;to do so. You just need to go to their page, i recommend you to check the demos and then download the source code. Then play with the downloaded demos locally, and check the code. It&#39;s really nice and easy to put it in your page. You will end up with a Javascript code like this:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&amp;nbsp; &lt;/blockquote&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; var slidelist=[]; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; function put_in(){&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; var x=$(this);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; var source= &quot;&quot;+x.attr(&quot;src&quot;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; slidelist.push({&#39;image&#39;: source});&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; var bgs = $(&quot;.bgimage&quot;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; bgs.each(put_in);&lt;/blockquote&gt;&lt;br /&gt;
&lt;br /&gt;
The code above will let you put all the elements of a certain class, in this case &quot;.bgimage&quot; into a list. Get a look at the php code on functions php, and you will notice that this class is added to every image. So once you have the list, you can call the Supersized plug-in like this:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; $.supersized({&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; // Functionality&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; slide_interval&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :&amp;nbsp;&amp;nbsp; 3000,&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; // Length between transitions&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; transition&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :&amp;nbsp;&amp;nbsp; 1, &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; // 0-None, 1-Fade, 2-Slide Top, 3-Slide Right, 4-Slide Bottom, 5-Slide Left, 6-Carousel Right, 7-Carousel Left&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; transition_speed&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; :&amp;nbsp;&amp;nbsp;&amp;nbsp; 700,&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; // Speed of transition&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; // Components&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; slide_links&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; :&amp;nbsp;&amp;nbsp;&amp;nbsp; &#39;blank&#39;,&amp;nbsp;&amp;nbsp;&amp;nbsp; // Individual links for each slide (Options: false, &#39;num&#39;, &#39;name&#39;, &#39;blank&#39;)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; slides &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; :&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; slidelist&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/blockquote&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;&amp;lt;/script&amp;gt; &lt;/blockquote&gt;&lt;br /&gt;
&amp;nbsp;I hope it helps you making your custom backgrounds easier and more movable, and without the long and boring process of attaching the images to your pages.&lt;br /&gt;
&lt;br /&gt;
See you soon!</content><link rel='replies' type='application/atom+xml' href='http://openglized.blogspot.com/feeds/2224156211129878937/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://openglized.blogspot.com/2012/03/custom-backgrounds-with-wordpress.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/622730475730131583/posts/default/2224156211129878937'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/622730475730131583/posts/default/2224156211129878937'/><link rel='alternate' type='text/html' href='http://openglized.blogspot.com/2012/03/custom-backgrounds-with-wordpress.html' title='Custom background gallery with Wordpress'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnYuJ5juO87uBO8t5DIGqOfcxaxwFP9P123z4gFiizMFVdYYWMa1yep0mwZ3EjH8FMhP6HAmafavM9PnLC4uaV2RHGM3aA83cU3wiNHAN3y5KPry6EEyuVy-aQtiM8fl6yBmDmquFGeHw/s72-c/cfield.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-622730475730131583.post-7570412565652004400</id><published>2011-04-05T12:33:00.001+02:00</published><updated>2013-06-14T13:53:46.708+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="spanish stopword list stem stemming weka"/><title type='text'>A spanish stopword list for stemming - Weka Stemming</title><content type='html'>As I posted last month, I was working on weka stemming. I finally was able to use it, but the problem is that i didn&#39;t find a weka-compatible stopword list.&lt;br /&gt;
So i made a little program that filtered &lt;a href=&quot;http://snowball.tartarus.org/algorithms/spanish/stop.txt&quot;&gt;this stopword list&lt;/a&gt; from the &lt;a href=&quot;http://snowball.tartarus.org/&quot;&gt;Snowball stemmer&lt;/a&gt; website. The result is at the end of this post.&lt;br /&gt;
Copy and paste into a text file between the comments if you need it in your program! Have fun :-)&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
//beginning of the list - don&#39;t copy this line&lt;br /&gt;
de&lt;br /&gt;
la&lt;br /&gt;
que&lt;br /&gt;
el&lt;br /&gt;
en&lt;br /&gt;
y&lt;br /&gt;
a&lt;br /&gt;
los&lt;br /&gt;
del&lt;br /&gt;
se&lt;br /&gt;
las&lt;br /&gt;
por&lt;br /&gt;
un&lt;br /&gt;
para&lt;br /&gt;
con&lt;br /&gt;
no&lt;br /&gt;
una&lt;br /&gt;
su&lt;br /&gt;
al&lt;br /&gt;
lo&lt;br /&gt;
como&lt;br /&gt;
más&lt;br /&gt;
pero&lt;br /&gt;
sus&lt;br /&gt;
le&lt;br /&gt;
ya&lt;br /&gt;
o&lt;br /&gt;
este&lt;br /&gt;
sí&lt;br /&gt;
porque&lt;br /&gt;
esta&lt;br /&gt;
entre&lt;br /&gt;
cuando&lt;br /&gt;
muy&lt;br /&gt;
sin&lt;br /&gt;
sobre&lt;br /&gt;
también&lt;br /&gt;
me&lt;br /&gt;
hasta&lt;br /&gt;
hay&lt;br /&gt;
donde&lt;br /&gt;
quien&lt;br /&gt;
desde&lt;br /&gt;
todo&lt;br /&gt;
nos&lt;br /&gt;
durante&lt;br /&gt;
todos&lt;br /&gt;
uno&lt;br /&gt;
les&lt;br /&gt;
ni&lt;br /&gt;
contra&lt;br /&gt;
otros&lt;br /&gt;
ese&lt;br /&gt;
eso&lt;br /&gt;
ante&lt;br /&gt;
ellos&lt;br /&gt;
e&lt;br /&gt;
esto&lt;br /&gt;
mí&lt;br /&gt;
antes&lt;br /&gt;
algunos&lt;br /&gt;
qué&lt;br /&gt;
unos&lt;br /&gt;
yo&lt;br /&gt;
otro&lt;br /&gt;
otras&lt;br /&gt;
otra&lt;br /&gt;
él&lt;br /&gt;
tanto&lt;br /&gt;
esa&lt;br /&gt;
estos&lt;br /&gt;
mucho&lt;br /&gt;
quienes&lt;br /&gt;
nada&lt;br /&gt;
muchos&lt;br /&gt;
cual&lt;br /&gt;
poco&lt;br /&gt;
ella&lt;br /&gt;
estar&lt;br /&gt;
estas&lt;br /&gt;
algunas&lt;br /&gt;
algo&lt;br /&gt;
nosotros&lt;br /&gt;
mi&lt;br /&gt;
mis&lt;br /&gt;
tú&lt;br /&gt;
te&lt;br /&gt;
ti&lt;br /&gt;
tu&lt;br /&gt;
tus&lt;br /&gt;
ellas&lt;br /&gt;
nosotras&lt;br /&gt;
vosotros&lt;br /&gt;
vosotras&lt;br /&gt;
os&lt;br /&gt;
mío&lt;br /&gt;
mía&lt;br /&gt;
míos&lt;br /&gt;
mías&lt;br /&gt;
tuyo&lt;br /&gt;
tuya&lt;br /&gt;
tuyos&lt;br /&gt;
tuyas&lt;br /&gt;
suyo&lt;br /&gt;
suya&lt;br /&gt;
suyos&lt;br /&gt;
suyas&lt;br /&gt;
nuestro&lt;br /&gt;
nuestra&lt;br /&gt;
nuestros&lt;br /&gt;
nuestras&lt;br /&gt;
vuestro&lt;br /&gt;
vuestra&lt;br /&gt;
vuestros&lt;br /&gt;
vuestras&lt;br /&gt;
esos&lt;br /&gt;
esas&lt;br /&gt;
estoy&lt;br /&gt;
estás&lt;br /&gt;
está&lt;br /&gt;
estamos&lt;br /&gt;
estáis&lt;br /&gt;
están&lt;br /&gt;
esté&lt;br /&gt;
estés&lt;br /&gt;
estemos&lt;br /&gt;
estéis&lt;br /&gt;
estén&lt;br /&gt;
estaré&lt;br /&gt;
estarás&lt;br /&gt;
estará&lt;br /&gt;
estaremos&lt;br /&gt;
estaréis&lt;br /&gt;
estarán&lt;br /&gt;
estaría&lt;br /&gt;
estarías&lt;br /&gt;
estaríamos&lt;br /&gt;
estaríais&lt;br /&gt;
estarían&lt;br /&gt;
estaba&lt;br /&gt;
estabas&lt;br /&gt;
estábamos&lt;br /&gt;
estabais&lt;br /&gt;
estaban&lt;br /&gt;
estuve&lt;br /&gt;
estuviste&lt;br /&gt;
estuvo&lt;br /&gt;
estuvimos&lt;br /&gt;
estuvisteis&lt;br /&gt;
estuvieron&lt;br /&gt;
estuviera&lt;br /&gt;
estuvieras&lt;br /&gt;
estuviéramos&lt;br /&gt;
estuvierais&lt;br /&gt;
estuvieran&lt;br /&gt;
estuviese&lt;br /&gt;
estuvieses&lt;br /&gt;
estuviésemos&lt;br /&gt;
estuvieseis&lt;br /&gt;
estuviesen&lt;br /&gt;
estando&lt;br /&gt;
estado&lt;br /&gt;
estada&lt;br /&gt;
estados&lt;br /&gt;
estadas&lt;br /&gt;
estad&lt;br /&gt;
he&lt;br /&gt;
has&lt;br /&gt;
ha&lt;br /&gt;
hemos&lt;br /&gt;
habéis&lt;br /&gt;
han&lt;br /&gt;
haya&lt;br /&gt;
hayas&lt;br /&gt;
hayamos&lt;br /&gt;
hayáis&lt;br /&gt;
hayan&lt;br /&gt;
habré&lt;br /&gt;
habrás&lt;br /&gt;
habrá&lt;br /&gt;
habremos&lt;br /&gt;
habréis&lt;br /&gt;
habrán&lt;br /&gt;
habría&lt;br /&gt;
habrías&lt;br /&gt;
habríamos&lt;br /&gt;
habríais&lt;br /&gt;
habrían&lt;br /&gt;
había&lt;br /&gt;
habías&lt;br /&gt;
habíamos&lt;br /&gt;
habíais&lt;br /&gt;
habían&lt;br /&gt;
hube&lt;br /&gt;
hubiste&lt;br /&gt;
hubo&lt;br /&gt;
hubimos&lt;br /&gt;
hubisteis&lt;br /&gt;
hubieron&lt;br /&gt;
hubiera&lt;br /&gt;
hubieras&lt;br /&gt;
hubiéramos&lt;br /&gt;
hubierais&lt;br /&gt;
hubieran&lt;br /&gt;
hubiese&lt;br /&gt;
hubieses&lt;br /&gt;
hubiésemos&lt;br /&gt;
hubieseis&lt;br /&gt;
hubiesen&lt;br /&gt;
habiendo&lt;br /&gt;
habido&lt;br /&gt;
habida&lt;br /&gt;
habidos&lt;br /&gt;
habidas&lt;br /&gt;
soy&lt;br /&gt;
eres&lt;br /&gt;
es&lt;br /&gt;
somos&lt;br /&gt;
sois&lt;br /&gt;
son&lt;br /&gt;
sea&lt;br /&gt;
seas&lt;br /&gt;
seamos&lt;br /&gt;
seáis&lt;br /&gt;
sean&lt;br /&gt;
seré&lt;br /&gt;
serás&lt;br /&gt;
será&lt;br /&gt;
seremos&lt;br /&gt;
seréis&lt;br /&gt;
serán&lt;br /&gt;
sería&lt;br /&gt;
serías&lt;br /&gt;
seríamos&lt;br /&gt;
seríais&lt;br /&gt;
serían&lt;br /&gt;
era&lt;br /&gt;
eras&lt;br /&gt;
éramos&lt;br /&gt;
erais&lt;br /&gt;
eran&lt;br /&gt;
fui&lt;br /&gt;
fuiste&lt;br /&gt;
fue&lt;br /&gt;
fuimos&lt;br /&gt;
fuisteis&lt;br /&gt;
fueron&lt;br /&gt;
fuera&lt;br /&gt;
fueras&lt;br /&gt;
fuéramos&lt;br /&gt;
fuerais&lt;br /&gt;
fueran&lt;br /&gt;
fuese&lt;br /&gt;
fueses&lt;br /&gt;
fuésemos&lt;br /&gt;
fueseis&lt;br /&gt;
fuesen&lt;br /&gt;
siendo&lt;br /&gt;
sido&lt;br /&gt;
tengo&lt;br /&gt;
tienes&lt;br /&gt;
tiene&lt;br /&gt;
tenemos&lt;br /&gt;
tenéis&lt;br /&gt;
tienen&lt;br /&gt;
tenga&lt;br /&gt;
tengas&lt;br /&gt;
tengamos&lt;br /&gt;
tengáis&lt;br /&gt;
tengan&lt;br /&gt;
tendré&lt;br /&gt;
tendrás&lt;br /&gt;
tendrá&lt;br /&gt;
tendremos&lt;br /&gt;
tendréis&lt;br /&gt;
tendrán&lt;br /&gt;
tendría&lt;br /&gt;
tendrías&lt;br /&gt;
tendríamos&lt;br /&gt;
tendríais&lt;br /&gt;
tendrían&lt;br /&gt;
tenía&lt;br /&gt;
tenías&lt;br /&gt;
teníamos&lt;br /&gt;
teníais&lt;br /&gt;
tenían&lt;br /&gt;
tuve&lt;br /&gt;
tuviste&lt;br /&gt;
tuvo&lt;br /&gt;
tuvimos&lt;br /&gt;
tuvisteis&lt;br /&gt;
tuvieron&lt;br /&gt;
tuviera&lt;br /&gt;
tuvieras&lt;br /&gt;
tuviéramos&lt;br /&gt;
tuvierais&lt;br /&gt;
tuvieran&lt;br /&gt;
tuviese&lt;br /&gt;
tuvieses&lt;br /&gt;
tuviésemos&lt;br /&gt;
tuvieseis&lt;br /&gt;
tuviesen&lt;br /&gt;
teniendo&lt;br /&gt;
tenido&lt;br /&gt;
tenida&lt;br /&gt;
tenidos&lt;br /&gt;
tenidas&lt;br /&gt;
tened&lt;br /&gt;
//end of list - don&#39;t copy this line!</content><link rel='replies' type='application/atom+xml' href='http://openglized.blogspot.com/feeds/7570412565652004400/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://openglized.blogspot.com/2011/04/spanish-stopword-list-for-stemming-weka.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/622730475730131583/posts/default/7570412565652004400'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/622730475730131583/posts/default/7570412565652004400'/><link rel='alternate' type='text/html' href='http://openglized.blogspot.com/2011/04/spanish-stopword-list-for-stemming-weka.html' title='A spanish stopword list for stemming - Weka Stemming'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-622730475730131583.post-56698724380023432</id><published>2011-04-05T12:03:00.000+02:00</published><updated>2013-06-14T13:54:16.346+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ontology ontologies protégé protege"/><title type='text'>Learning Semantic Web - Ontologies with Protégé and OWL</title><content type='html'>Lately in our master degree classes we are learning how to create Protégé ontologies.&lt;br /&gt;
One of the best tools out there to learn this kind of technólogy is &lt;a href=&quot;http://protege.stanford.edu/&quot;&gt;Protégé&lt;/a&gt;. It allows to create OWL ontologies in an easy way and also has an inference engine to work with.&lt;br /&gt;
I&#39;m actually learning with this tool using the &lt;a href=&quot;http://protege.stanford.edu/download/registered.html&quot;&gt;4.0.2 version&lt;/a&gt; of the software. Newer versions are said to have different features than older (that is, new versions aren&#39;t always better than old ones). So if you want to start from scratch and learn how to create your own OWL ontology (note: OWL stands for Ontology Web Language) I recommend you this version of the software. For learning purposes I recommend you to follow the famous &lt;a href=&quot;http://owl.cs.manchester.ac.uk/tutorials/protegeowltutorial/resources/ProtegeOWLTutorialP4_v1_3.pdf&quot;&gt;pizza tutorial for Protégé 4.0&lt;/a&gt;. It&#39;s about creating a simple yet complete ontology about pizzas. Once you complete it, you should be able to create your own ontology easily.&lt;br /&gt;
As a final note, It&#39;s also possible to publish your ontology and even connect it with others on the web - making an ontology network!&lt;br /&gt;
Good luck with OWL!!! :-)</content><link rel='replies' type='application/atom+xml' href='http://openglized.blogspot.com/feeds/56698724380023432/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://openglized.blogspot.com/2011/04/learning-semantic-web-ontologies-with.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/622730475730131583/posts/default/56698724380023432'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/622730475730131583/posts/default/56698724380023432'/><link rel='alternate' type='text/html' href='http://openglized.blogspot.com/2011/04/learning-semantic-web-ontologies-with.html' title='Learning Semantic Web - Ontologies with Protégé and OWL'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-622730475730131583.post-740821335636460209</id><published>2011-03-05T13:17:00.000+01:00</published><updated>2013-06-14T13:54:26.182+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="weka stemming data mining"/><title type='text'>Weka stemming</title><content type='html'>Since yesterday i&#39;ve been going crazy about getting Weka (Data Mining tool) to work with a stemmer (Snowball). I finally found a solution thanks to another &lt;a href=&quot;http://cebolladevidrio.blogspot.com/2009/01/stemmer-en-espaol-en-weka.html&quot;&gt;blogger&lt;/a&gt; . The process is as follows:&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Download the snowball stemmer .jar from Weka website (&lt;a href=&quot;http://www.cs.waikato.ac.nz/%7Eml/weka/stemmers/snowball.jar&quot;&gt;link&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;Put it into your Weka root directory.&lt;/li&gt;
&lt;li&gt;Modify your RunWeka.ini file at that directory so it seems like this: cp=%CLASSPATH%&lt;span style=&quot;font-weight: bold;&quot;&gt;;&lt;/span&gt;snowball.jar&lt;/li&gt;
&lt;/ol&gt;
Now when you use the StringToWordVector filter, you must choose at &quot;stemmer&quot; the SnowballStemmer option. After that click &lt;b&gt;over&lt;/b&gt; the text box on the filter UI. A popup should appear, and there you must enter the language you need to use, in my case I used the spanish stemmer, so i put &quot;spanish&quot; without the quotes.&lt;br /&gt;
&lt;br /&gt;
Note that you can also use a stopword list to remove them when processing the text with the filter. To do so, click over the text field at the GUI. A filechooser window should arise letting you choose your stopword list. The format of this file is: one word per line, lines starting with &quot;#&quot; are considered comments. You should take this into account when creating your own stopword list. Anyway, there are some available on the net for you to use.</content><link rel='replies' type='application/atom+xml' href='http://openglized.blogspot.com/feeds/740821335636460209/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://openglized.blogspot.com/2011/03/weka-stemming.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/622730475730131583/posts/default/740821335636460209'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/622730475730131583/posts/default/740821335636460209'/><link rel='alternate' type='text/html' href='http://openglized.blogspot.com/2011/03/weka-stemming.html' title='Weka stemming'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-622730475730131583.post-9161469516840934133</id><published>2010-12-22T13:32:00.000+01:00</published><updated>2013-06-14T13:53:58.004+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="hello world blog start"/><title type='text'>Blog start</title><content type='html'>This is my first post here :-)&lt;br /&gt;
I will dedicate this blog to OpenGL and other programming works that i have done.&lt;br /&gt;
See you soon :-)</content><link rel='replies' type='application/atom+xml' href='http://openglized.blogspot.com/feeds/9161469516840934133/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://openglized.blogspot.com/2010/12/blog-start.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/622730475730131583/posts/default/9161469516840934133'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/622730475730131583/posts/default/9161469516840934133'/><link rel='alternate' type='text/html' href='http://openglized.blogspot.com/2010/12/blog-start.html' title='Blog start'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>