seisler Posted February 22, 2014 Share Posted February 22, 2014 Hola. Tengo un problemilla. Utilizo Prestashop 1.5 con el theme Transformer. Instalé el modulo feedback como dice en el comentario 194 de aquí: http://www.prestashop.com/forums/topic/61451-module-feedback/page-10 Pero cuando entro dentro para comentar, me aparece así: http://www.rillocomplementos.com/modules/feedback/signfeedback.php El problema, supongo que es que esta página tiene una left-column (aunque en el themeeditor ya he dicho que todas las páginas de CMS... solo tengan una columna, sin laterales) La pregunta es: ¿Cómo puedo quitar esa columna de esa página?¿He de modificar el PHP o tpl del módulo?¿Si es así que líneas tendría que quitar? signfeedback.tpl {literal} <SCRIPT TYPE="text/javascript" LANGUAGE=JAVASCRIPT> function acceptCGV() { if (document.fdbform.checkbox_1.checked == false) { alert('{/literal}{l s='Por favor acepte los terminos de privacidad antes de seguir.' mod='feedback'}{literal}'); return false; } } </SCRIPT> {/literal} <!-- added by ariom --> <script type="text/javascript"> //<![CDATA[ var RecaptchaOptions = { theme : 'white' }; //]]> </script> <!-- eof added by ariom --> {capture name=path}{l s='feedback' mod='feedback'}{/capture} {include file="$tpl_dir./breadcrumb.tpl"} <div id="feedbak_mod"> <h2 class="fdbtitolo_pagina">{l s='Opina' mod='feedback'}</h2> {if isset($confirmation)} <p class="fdbconfirm"> <br/> <strong>{l s='Gracias!' mod='feedback'}</strong> <img title="ok" src="img/button-ok.png" alt="OK" /> <br/><strong>{l s='Su comentario se ha enviado correctamente a nuestro equipo' mod='feedback'}</strong> <br/>{l s='Gracias por tomarse un momento para opinar' mod='feedback'} {$shop_name} </p> <div class="fdbnospam"> <br/> {l s='To prevent spam, the comment will be subject to approval before we publish it online.' mod='feedback'} </div> {else} {if $err_name OR $err_mail_name OR $err_feedback_text OR $err_permission OR $err_resp} <div class="alert error" id="errorDiv"> <p><img alt="{l s='Error:' mod='feedback'}" src="{$base_dir}img/admin/forbbiden.gif" /> {l s='One or more errors were encountered. Please review your informations to continue.' mod='feedback'}</p> <p style="color:red;{if !$err_name}display:none;{/if}">{if $err_name}- {l s='Valid Name is Required' mod='feedback'}{/if}</p> <p style="color:red;{if !$err_feedback_text}display:none;{/if}">{if $err_feedback_text}- {l s='Valid comment is Required' mod='feedback'}{/if}</p> <p style="color:red;{if !$err_mail_name}display:none;{/if}">{if $err_mail_name}- {l s='Email address is optional... but the entered Email address is incorrect' mod='feedback'}{/if}</p> <p style="color:red;{if !$err_permission}display:none;{/if}">{if $err_permission}- {l s='Permission choice is Required. Select: (Yes) or (No)' mod='feedback'}{/if}</p> <p style="color:red;">{if !$resp}- {l s='Invalid captcha. Please digit the two words separated by space' mod='feedback'}{/if}</p> </div> {/if} <form name="fdbform" action="{$request_uri|escape:'htmlall':'UTF-8'}" method="post" class="std" onsubmit="return acceptCGV();"> <fieldset> <p class="fdbtext"> {l s='Feel free to write any comments you have, whether they are positive or negative. Improvement suggestions are also nice.' mod='feedback'} </p> <p class="textfdb"> <label for="name">{l s='Name:' mod='feedback'}</label> <input type="textarea" size="30" name="name" value="{if isset($smarty.post.name)}{$smarty.post.name|escape:'htmlall':'UTF-8'|stripslashes}{/if}" /> </p> <p class="fdbunderlabel"><em>{l s='Name: you can enter an nickname or your firstname and lastname... you decide.' mod='feedback'}</em></p> <p class="textfdb"> <label for="email">{l s='E-mail address: (optional)' mod='feedback'}</label> <input type="textarea" size="30" id="email" name="email" value="{if isset($smarty.post.email)}{$smarty.post.email|escape:'htmlall':'UTF-8'|stripslashes}{/if}" /> </p> <p class="fdbunderlabel"><em>{l s='Your email address is never published nor shared.' mod='feedback'}</em></p> <p class="textarea" style="margin-bottom:0.5em"> <label for="feedback">{l s='Comments:' mod='feedback'}</label> <textarea id="feedback" name="feedback" rows="3" cols="37">{if isset($smarty.post.feedback)}{$smarty.post.feedback|escape:'htmlall':'UTF-8'|stripslashes}{/if}</textarea> </p> <p> {l s='I grant the ' mod='feedback'}{$shop_name} {l s='permission to use my comments for promotional purposes:' mod='feedback'} </p> <p class="radio" style="margin-left:235px;margin-top:-1.6em"> <input type="radio" name="permission" id="permission1" value="1" {if isset($smarty.post.permission) && $smarty.post.permission == 1}checked="checked"{/if} /> <label for="permission1" class="top">{l s='Yes' mod='feedback'}</label> <input type="radio" name="permission" id="permission2" value="2" {if isset($smarty.post.permission) && $smarty.post.permission == 2}checked="checked"{/if} /> <label for="permission2" class="top">{l s='No' mod='feedback'}</label> </p> <p class="privacy"> <input type="checkbox" name="checkbox_1" value="1" {if isset($smarty.post.checkbox_1)}checked="checked"{/if} /> <label for="checkbox_1">{l s='I authorize to use my data according to Italian D.Lgs. 196/2003.' mod='feedback'}</label><a href="{$link_conditions}" class="iframe">{l s='(read)' mod='feedback'}</a> </p> <input type="hidden" name="process" value="1" /> <div class="captcha"> <script type="text/javascript" src="http://www.google.com/recaptcha/api/challenge?k=6LfEsOoSAAAAAEMPZXVdE8WRDRjZznPX0m9Nlm0v"> </script> <noscript> <iframe src="http://www.google.com/recaptcha/api/noscript?k=6LfEsOoSAAAAAEMPZXVdE8WRDRjZznPX0m9Nlm0v" height="300" width="500" frameborder="0"></iframe><br> <textarea name="recaptcha_challenge_field" rows="3" cols="40"> </textarea> <input type="hidden" name="recaptcha_response_field" value="manual_challenge"> </noscript> </div> <p class="submit" style="margin-left:40%"><input type="submit" class="button" value="{l s='Send Feedback!' mod='feedback'}" /></p> </fieldset> </form> {/if} </div> signfidback.php <?php $useSSL = true; include(dirname(__FILE__).'/../../config/config.inc.php'); // modified by ariom // include(dirname(__FILE__).'/../../init.php'); require_once('recaptchalib.php'); // eof modified by ariom global $cookie, $smarty; $err_name = false; $err_mail_name = false; $err_feedback_text = false; $err_permission = false; // modified by ariom for google recaptcha validation $err_resp = false; // eof modified by ariom for google recaptcha validation $cmsprivacyid = (int)(Configuration::get('CMSFEEDBACK')); $cms = new CMS((int)$cmsprivacyid, (int)($cookie->id_lang)); $link = new Link(); $link_conditions = $link->getCMSLink($cms, $cms->link_rewrite, true, (int)($cookie->id_lang)); if (!strpos($link_conditions, '?')) $link_conditions .= '?content_only=1'; else $link_conditions .= '&content_only=1'; if(isset($_POST['process']) AND $_POST['process']==1) { // modified by ariom for google recaptcha validation $privatekey = "6LfEsOoSAAAAAAkpOL-A7Ygs_4-nmgbQeX9_4iCY"; $resp = recaptcha_check_answer ($privatekey, $_SERVER["REMOTE_ADDR"], $_POST["recaptcha_challenge_field"], $_POST["recaptcha_response_field"]); // eof modified by ariom for google recaptcha validation $tofind = array('"', "'"); $toreplace = array("", ""); $name = pSQL(htmlentities(Tools::getValue('name'), ENT_COMPAT, 'UTF-8')); $feedback = pSQL(htmlentities(str_replace($tofind, $toreplace, Tools::getValue('feedback')), ENT_COMPAT, 'UTF-8')); $permission = isset($_POST['permission']) ? $_POST['permission'] : ""; $email = pSQL(htmlentities(Tools::getValue('email'), ENT_COMPAT, 'UTF-8')); $date = date('Y-m-d'); if(strlen($name) < 2 || !Validate::isName($name)) $err_name = true; if(!empty($email)) { if(!Validate::isEmail($email)) $err_mail_name = true; } if(strlen($feedback) < 5 || !Validate::isMessage($feedback)) $err_feedback_text = true; if(empty($permission)) $err_permission = true; if (!$resp->is_valid) $err_resp = true; if($err_name || $err_mail_name || $err_feedback_text || $err_permission || $err_resp) { $smarty->assign(array( 'err_name' => $err_name, 'err_mail_name' => $err_mail_name, 'err_feedback_text' => $err_feedback_text, 'err_permission' => $err_permission, 'name' => $name, 'feedback' => $feedback, 'permission' => $permission, 'email' => $email, 'link_conditions' => $link_conditions, 'err_resp' => $err_resp )); } else { $query = Db::getInstance()->Execute(' INSERT INTO `'._DB_PREFIX_.'feedback` ( `name`,`feedback`,`permission`,`email`,`date`) VALUES ("'.$name.'","'.$feedback.'","'.$permission.'","'.$email.'","'.$date.'") '); $subject = $name.' '.'has posted a new feedback'; $templateVars = array( '{name}' => Tools::safeOutput($name), '{email}' => Tools::safeOutput($email), '{feedback}' => stripslashes($feedback) ); Mail::Send((int)($cookie->id_lang), 'feedback', $subject, $templateVars, Configuration::get('PS_SHOP_EMAIL'), NULL, NULL, NULL, NULL, NULL, dirname(__FILE__).'/mails/'); $smarty->assign('confirmation', 1); } } else { $smarty->assign(array( 'err_name' => $err_name, 'err_mail_name' => $err_mail_name, 'err_feedback_text' => $err_feedback_text, 'err_permission' => $err_permission, 'link_conditions' => $link_conditions, 'err_resp' => $err_resp )); } include(dirname(__FILE__).'/../../header.php'); $smarty->display(dirname(__FILE__).'/signfeedback.tpl'); include(dirname(__FILE__).'/../../footer.php'); Gracias. Saludos. Link to comment Share on other sites More sharing options...
seisler Posted February 22, 2014 Author Share Posted February 22, 2014 Bueno. He podido hacer algo. No quitar la columna de la izquierda, pero al quitarle el hook de left column block al modulo feedback se me ha centrado el formulario que era lo que quería. De todos modos la pregunta sigue ahí. Me parece interesante saber como se quita una columna de una página de un modulo que no es ni nativo ni del tema. Saludos Link to comment Share on other sites More sharing options...
Josraso Posted February 22, 2014 Share Posted February 22, 2014 Mirate este post http://www.prestashop.com/forums/topic/171659-hidedisable-left-and-right-columns-on-the-basis-of-current-page/ 1 Link to comment Share on other sites More sharing options...
Recommended Posts