Se afișează postările cu eticheta remove. Afișați toate postările
Se afișează postările cu eticheta remove. Afișați toate postările

miercuri, 8 decembrie 2010

How to remove newline character in PHP

I need to remove newline character using PHP from user input, so the input will show in one line for my CSV file. I’ve tried to use nl2br and str_replace the br tag but it doesn’t work. At the end, i need to use regular expression to solve this.

U can try the code below $str = "Haha\nHehe\n";$x = preg_replace("/\n|\r/", " ", $str);// if preg found new line, it will replace and store in array index 1if(isset($x[1]) { echo $x[1];}Output will be:- Haha Hehe

Notice that the newline now been replaced by white space


View the original article here

sâmbătă, 4 decembrie 2010

How to remove newline character in PHP

I need to remove newline character using PHP from user input, so the input will show in one line for my CSV file. I’ve tried to use nl2br and str_replace the br tag but it doesn’t work. At the end, i need to use regular expression to solve this.

U can try the code below $str = "Haha\nHehe\n";$x = preg_replace("/\n|\r/", " ", $str);// if preg found new line, it will replace and store in array index 1if(isset($x[1]) { echo $x[1];}Output will be:- Haha Hehe

Notice that the newline now been replaced by white space


View the original article here

sâmbătă, 20 noiembrie 2010

How to remove “Powered by PrestaShop” link


To remove the “Powered by PrestaShop” link at the footer, you just need to edit the blockvariouslinks.tpl file.


The file is located at:
\modules\blockvariouslinks\blockvariouslinks.tpl


You can edit this file directly, but I do not recommend changing any files outside of the themes folder. So, copy this file to your themes folder (there are a few files in the original folder, you just need to copy blockvariouslinks.tpl) :
\themes\YOUR_THEME\modules\blockvariouslinks\blockvariouslinks.tpl


Then open the file and remove the line containing the “Powered by PrestaShop” code (around line 10) :


  • {l s='Powered by' mod='blockvariouslinks'} PrestaShop

  • Compatibility: PrestaShop version 1.2.4, 1.2.5, 1.3, 1.3.1


    View the original article here


    Whole New Look! Get Paid To Shop!! 75% Commission. Better than paid surveys, data entry, detective sites and grants! Oto converting 20% Too! --- The Best mystery shopping, secret shopping, work at home site!


    Check it out!


     

    How to remove Powered By Prestashop footer link

    A friend ask me how to remove the “Powered by Prestashop” link from the footer of his site. After some study, i realize that “Powered by Prestashop” link is manage by a module and not hard coded within the template itself. So to remove the link you need to modify the module template file instead of theme template file.

    First go to your theme directory and check if there is any a ‘modules’ directory name “blockvariouslinks”. If yes, then u can easily remove the Powered By Prestashop link in the file below:- prestashop/yourtheme/modules/blockvariouslinks/blockvariouslinks.tplIf there is no “modules” directory in your theme, then you can modify this file instead:- prestashop/modules/blockvariouslinks/blockvariouslinks.tplOnce you remove the “Powered by Prestashop” code and save, refresh your front office and the link should be removed by now.

    happy shopping!

    Tags: delete powered by, powred by prestashop, prestashop, remove footer link, remove powered by link, remove powered by prestashop


    View the original article here


    eBooks on the French Canals, Living Aboard Around the World, La Rochelle Guide Book


    Check it out!