{"id":2393620,"date":"2011-11-11T15:12:25","date_gmt":"2011-11-11T15:12:25","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/plugin-voucherpress-some-plugins-customizzations\/"},"modified":"2016-08-20T03:22:11","modified_gmt":"2016-08-20T03:22:11","slug":"plugin-voucherpress-some-plugins-customizzations","status":"closed","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/plugin-voucherpress-some-plugins-customizzations\/","title":{"rendered":"[Plugin: VoucherPress] Some plugins customizzations"},"content":{"rendered":"<p>I&#8217;ve customization this plugins. I&#8217;ve got a complete voucher in jpeg format. This voucher include name, slogan and term of conditions. This voucher has dark tones.<br \/>\nThe plugins can&#8217;t write a white text and hide some text.<br \/>\nTo do this I edited the source code of voucerpress.php and inserted at line 2195 my code:<\/p>\n<pre><code>\/\/set font color\n$pdf-&gt;SetTextColor(255,255,255,false);<\/code><\/pre>\n<p>the numbers represent RGB color.<\/p>\n<p>To hide some text I insert two if condition. The adminuser can show or hide some text just writing two different keyword.<br \/>\nIf Voucher-title is &#8220;voucher&#8221; the title is not visible on voucher.<br \/>\nand<br \/>\nIf Voucher-text is &#8220;hide&#8221; the text is not printed on voucher.<\/p>\n<p>My code:<\/p>\n<pre><code>\/\/Manage voucher title. If Voucher title is &quot;voucher&quot; the title is not visible on voucher. (by polecat)\n\t\tif($voucher-&gt;name == &quot;voucher&quot;) {\n\t\t\t$vouchername = &quot;&amp;nbsp;&quot;;\n\t\t} else\n\t\t{\n\t\t\t$vouchername = $voucher-&gt;name;\n\t\t}\n\t\t\/\/This code $voucher-&gt;name must be replace into stripslashes function to set the original code (by polecat)\n\t\t\/\/ print title\n\t\t$pdf-&gt;writeHTML( stripslashes( $vouchername ), $ln=true, $fill=false, $reseth=false, $cell=false, $align=&#039;C&#039;);<\/code><\/pre>\n<p>and<\/p>\n<pre><code>\/\/Manage voucher text. If Voucher text is &quot;hide&quot; the text is not printed on voucher. (by polecat)\n\t\tif($voucher-&gt;text == &quot;hide&quot;) {\n\t\t\t$vouchertext = &quot;&quot;;\n\t\t} else\n\t\t{\n\t\t\t$vouchertext = $voucher-&gt;text;\n\t\t}\n\t\t\/\/ print text\n\t\t$pdf-&gt;Write( 5,  stripslashes( $vouchertext ), $link = &#039;&#039;, $fill = 0, $align = &#039;C&#039;, $ln = true);<\/code><\/pre>\n<p>https:\/\/wordpress.org\/extend\/plugins\/voucherpress\/<\/p>\n","protected":false},"template":"","class_list":["post-2393620","topic","type-topic","status-closed","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/2393620","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/2393620\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=2393620"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}