<?xml version="1.0"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Kishoreweblabs Blog</title>
    <link>http://kishoreweblabs.com/blog/blog?id=1</link>
    <description/>
    <atom:link href="https://kishoreweblabs.com/blog?format=raw" rel="self" type="application/rss+xml"/>
    <item>
      <title>New Subscription plugin for Sobipro will be released very soon</title>
      <link>http://kishoreweblabs.com/blog/post/2/new-subscription-plugin-for-sobipro-will-be-released-very-soon</link>
      <description>&lt;p&gt;A native sobipro subscription plugin allow you offer unlimited subscription plans to user without modifying your template. There is a simple subscription template offered by sobipro but you need to modify your multiple files in template and must have knowledge for xsl template system which is not quite easy to understand.&lt;/p&gt;&#xD;
&lt;p&gt;So I a came with the subscription plugin which will offer two types of subscriptions without modifying your template files.&lt;/p&gt;&#xD;
&lt;hr class="blogfactory-read-more" /&gt;&#xD;
&lt;p&gt;&lt;strong&gt;Based on Subscription period&lt;/strong&gt; &ndash;The plugin allow you offer different subscription based on different subscription period. Now, you can have free/paid entry having different expiry date and different pricing based on the subscription selected by the user. Now you can offer unlimited subscription as -&lt;/p&gt;&#xD;
&lt;ul&gt;&#xD;
&lt;li&gt;Bronze - 1month($10)&lt;/li&gt;&#xD;
&lt;li&gt;Silver - 3 month($20)&lt;/li&gt;&#xD;
&lt;li&gt;Gold - 1year ($50)&lt;/li&gt;&#xD;
&lt;/ul&gt;&#xD;
&lt;p&gt;&lt;strong&gt;Based on Entry Field &lt;/strong&gt;&ndash;&lt;strong&gt; The&lt;/strong&gt; plugin also allow you to have different entry field for different subscription level. Now free and paid plans can have same and different entry fields.&lt;/p&gt;&#xD;
&lt;ul&gt;&#xD;
&lt;li&gt;Bronze &ndash; Can have basic fields like name, address, email, description etc&lt;/li&gt;&#xD;
&lt;li&gt;Silver &ndash; Can have all Bronze level fields as well as have additional fields like map, website etc&lt;/li&gt;&#xD;
&lt;li&gt;Gold &ndash; can have all fields of Bronze and Silver, as well as have additional fields like gallery, video etc&lt;/li&gt;&#xD;
&lt;/ul&gt;&#xD;
&lt;h3&gt;Main Feature of Sobipro Subscription application&lt;/h3&gt;&#xD;
&lt;ul&gt;&#xD;
&lt;li&gt;It is a sobipro native application. So you don&rsquo;t have to change anything in the template and config files&lt;/li&gt;&#xD;
&lt;li&gt;It will works with all templates of sobipro.If you have changed the template for section then your changes will not be lost and you donot have to copy the code from one file to another.&lt;/li&gt;&#xD;
&lt;li&gt;In Sobipro Subscription template you cannot have required fields; you have to make all field options and cannot validate data. But In subscription plugin you can have required fields and can check and validate the data&lt;/li&gt;&#xD;
&lt;li&gt;Allow you to offer unlimited subscription plans&lt;/li&gt;&#xD;
&lt;/ul&gt;&#xD;
&lt;p&gt;I am currently working on this plugin and hope to release this plugin very soon. Please do let me your feedback,requirements and the features I have missed in subscription plugin for sobipro.&lt;/p&gt;</description>
      <guid>http://kishoreweblabs.com/blog/post/2/new-subscription-plugin-for-sobipro-will-be-released-very-soon</guid>
    </item>
    <item>
      <title>Translate Language String in default value of jfield Joomla</title>
      <link>http://kishoreweblabs.com/blog/post/1/translate-language-string-in-default-value-of-jfield-joomla</link>
      <description>&lt;p&gt;Recently I was developing the &lt;a href="http://kishoreweblabs.com/products/14-magic-scroller-for-virtuemart"&gt;Magic Scroller Plugin for Virtuemart&lt;/a&gt; also called ajax infinite pagination. It requires some html content to be entered by user. So a textarea field is added in plugin manifest file.But it also needs to be prefilled with some html content, so that user can easily understand how to change content. I entered a language string in the default value and saved it as shown below in code&lt;/p&gt;&#xD;
&lt;pre&gt;&lt;code&gt; &lt;field&#xD;
type="textarea"&#xD;
name="mscroll_loading_html"&#xD;
label="PLG_CONTENT_VM_MSCROLL_LOADING_HTML"&#xD;
description="PLG_CONTENT_VM_MSCROLL_LOADING_HTML_EXPL"&#xD;
editor="false" rows="3" cols="50"&#xD;
default="PLG_CONTENT_VM_MSCROLL_LOADING_HTML_VALUE" filter="raw"&#xD;
 /&gt; &lt;/code&gt;&lt;/pre&gt;&#xD;
&lt;p&gt;Now I refreshed the backend , and to my surprise the html content is not there, instead the language string &lt;strong&gt;PLG_CONTENT_VM_MSCROLL_LOADING_HTML_VALUE&lt;/strong&gt; is prefilled there. Label and description attribute of field are sucessfully translated but not the default value.&lt;/p&gt;&#xD;
&lt;hr class="blogfactory-read-more" /&gt;&#xD;
&lt;p&gt;While searching on Joomla forum, I got to know a new attribute &lt;strong&gt;translate_default="true"&lt;/strong&gt; must be added to the field to translte the default value.&lt;/p&gt;&#xD;
&lt;pre&gt;&lt;code&gt; &lt;field&#xD;
type="textarea"&#xD;
name="mscroll_loading_html"&#xD;
label="PLG_CONTENT_VM_MSCROLL_LOADING_HTML"&#xD;
description="PLG_CONTENT_VM_MSCROLL_LOADING_HTML_EXPL"&#xD;
editor="false" rows="3" cols="50"&#xD;
default="PLG_CONTENT_VM_MSCROLL_LOADING_HTML_VALUE" filter="raw"&#xD;
translate_default="true"&#xD;
 /&gt; &lt;/code&gt;&#xD;
&lt;/pre&gt;&#xD;
&lt;p&gt;Now I refreshed the module backend, and default value is translated and textarea is now prefilled with html. So trick is to add new attribute &lt;strong&gt;translate_default="true"&lt;/strong&gt; to field. After finishing with coding, I made a plugin zip package to install it from the joomla installer and now it's time for testing. Installation goes fine without any errors on my dev server.&lt;/p&gt;&#xD;
&lt;p&gt;When edited the plugin from Joomla Plugin manager, to my surprise textarea is not prefilled with html content, but with language string. I installed the plugin on other two joomla installation, but stuck with same un translated language string in textarea. Now I googled for the same issue, but found nothing to fix it. I spent more than 3-4 hr to fix this issue, but without any success.&lt;/p&gt;&#xD;
&lt;p&gt;Ultimately, I looked down the joomla core files and found that upon installation, the default values are stored in joomla extension table &lt;strong&gt;#__extensions&lt;/strong&gt; in &lt;strong&gt;params&lt;/strong&gt; column. Now inspecting &lt;strong&gt;params&lt;/strong&gt; column from phpMyAdmin , I noticed language string is present there. After more digging in joomla core file in noticed, if params column is empty then the default value is taken from xml files and joomla will successfully translate it. If there are values against the field Joomla assume it has already translated the fields and just display them as it. Immediately clearly the params column and refreshed the plugin backend. I can see html content is prefilled in textarea.&lt;/p&gt;&#xD;
&lt;p&gt;So culprit is upon plug in installation joomla store un translated values.&lt;strong&gt;Now solution is params column should be empty when the plugin first installed.&lt;/strong&gt;&lt;/p&gt;&#xD;
&lt;p&gt;So question is how to make the params column to be empty after installation? The solution is very simple add installation script in plugin xml file. &lt;br /&gt;For complete reference on add installation script check this &lt;a href="https://docs.joomla.org/J2.5:Developing_a_MVC_Component/Adding_an_install-uninstall-update_script_file"&gt;tutorial&lt;/a&gt; &lt;br /&gt;So, I add a scriptfile tag in xml file &lt;code&gt; &lt;scriptfile&gt;vmmscroll.script.php&lt;/scriptfile&gt;&lt;/code&gt;&lt;/p&gt;&#xD;
&lt;p&gt;Now &lt;strong&gt;vmmscroll.script.php&lt;/strong&gt; is executed after installation of plugin and write a simple query to clear params in install function.&lt;/p&gt;&#xD;
&lt;pre&gt;&lt;code&gt; public function install() {&#xD;
$db=Jfactory::getDbo();&#xD;
$query="update #__extensions set params='' where element='vmmscroll' limit 1";&#xD;
$db-&gt;setQuery($query);&#xD;
$db-&gt;query();&#xD;
} &lt;/code&gt;&#xD;
&lt;/pre&gt;&#xD;
&lt;p&gt;I again make a zip package and tested on other joomla installation and plugin &lt;a href="http://kishoreweblabs.com/products/14-magic-scroller-for-virtuemart"&gt;infinite pagination for virtuemart&lt;/a&gt; is working successfully.&lt;/p&gt;</description>
      <guid>http://kishoreweblabs.com/blog/post/1/translate-language-string-in-default-value-of-jfield-joomla</guid>
    </item>
  </channel>
</rss>
