Back to top

Visualizza post

Questa sezione ti permette di visualizzare tutti i post inviati da questo utente. N.B: puoi vedere solo i post relativi alle aree dove hai l'accesso.


Post - robertoseveri1974

Pagine: [1] 2 3 4 ... 16
1
Joomla! 3 / Re:k2 non impagina correttamente l'articolo
« il: 29 Apr 2020, 15:22:04 »
in pratica il testo lo vedo così! ma non l ho scritto così nell'editor.....se uso invece joomla normale lo vedo correttamente. ho cercato tutti i settaggi di k2 che si diceva sopra ma non dipende da quello. qualche altra idea?

2
Joomla! 3 / Re:k2 non impagina correttamente l'articolo
« il: 29 Apr 2020, 15:03:42 »
K2- Categorie- seleziono la categoria, vado in opzione di visualizzazione poi impaginazione articoli categoria nella prima voce è normale che non ci siano template? "seleziona template" ho semplicemente usa i predefiniti....ma non ne ho altri.....cioè è normale che sia così?

3
Joomla! 3 / Re:k2 non impagina correttamente l'articolo
« il: 27 Apr 2020, 23:28:55 »
certo che le ho lette, e c'ho passato la mattina e parte del pomeriggio. ma non cambia nulla.....anche a me sembrava fosse solo nelle categorie.....boh, non capisco. quindi mi confermi che non c'è in nessun altro posto?


4
Joomla! 3 / k2 non impagina correttamente l'articolo
« il: 27 Apr 2020, 16:43:18 »
Buonasera, ho caricato un articolo di prova su un sito in cui devo usare k2. se lo pubblico con k2 il risultato è tutto testo, senza foto nell'articolo e non va nemmeno a capo quando dovrebbe. Se lo pubblico da joomla normale invece la visualizzazione è corretta. Immagino ci sia un settaggio di k2, ma sono ore che ci guardo e non riesco proprio a trovare dove siano questi settaggi. purtroppo k2 non lo conosco quasi per nulla. e in rete non mi è uscito nessuna soluzione valida. aiutoooooo

5
No, ho soltanto sbagliato il file in cui fare la modifica. In effetti questa modifica va fatta qui : templates/lt_aircoms/html/mod_login/default.php riga 81  perchè è da modificare la pagina che apre il tasto "registrati" del modulo login/nuova registrazione, di default non c'è un numero e quindi apre alla pagina predefinita principale. E si, tomtomeight, la conosco, ma per fortuna questa modifica non verrà sovrascritta perchè di aggiornamenti di questo template non ne faranno. Però si andrebbe fatto tramite l'override, altrimenti al primo aggiornamento la si perde. Grazie comunque, siete sempre presenti ed aiutate quelli come me che non ne sanno na cippa! Grazie.

6
Avevo trovato il modo di cambiare il template della pagina di registrazione nuovo utente andando nella cartella /components/com_users/views/registration/tmpl nel file default.php alla riga 22 l'ho modificata così : <form id="member-registration" action="<?php echo JRoute::_('index.php?option=com_users&task=registration.register&Itemid=137'  dove &Itemid=137 è il menù nascosto che ho precedentemente creato (collegato ad una pagina bianca) a cui ho attribuito un diverso template. Ora questa cosa l'avevo fatta un paio di mesi fa e se non ricordo male aveva funzionato. Ora ho fatto una modifica su questo template ma mi son accorto che non utilizza questo ma quello standard. Qualche santo mi sa dire dove ho sbagliato?

7
a dir la verità manco a pagamento te la danno. io è circa un annetto che ci lavoro sopra e ho scandagliato più volte il loro forum. hanno proprio mollato lo sviluppo, peccato perchè era un'ottimo componente, molto versatile e facilmente adattabile a molte particolarità del settore immobiliare. Grazie lo stesso per la disponibilità, cercherò una soluzione pian piano e appena l'avrò trovata la posterò qui di seguito, magari a qualcuno serve.

8
a dir la verità c'ho anche provato, ma oramai son troppo vecchio per imparare un linguaggio di programmazione (trovo più semplice fare una rianimazione ad esempio). che poi non mi sembra nemmeno così facile! io son rimasto al basic e al pascal......che poi non ho mai usato, perchè ho sempre fatto altro nella vita. se non è così semplice, pazienza, mi terrò l'errore, per ora. Tengo cmq monitorato il forum di bt property che magari qualcuno che ne sa risolve il problema.

9
non lo aggiornano da almeno 3 anni (quindi direi di no), hanno un forum ma è da allora che non rispondono. è così complesso il discorso? pensavo che per chi conosce il php fosse una cosa rapida.....cioè pensavo bastasse correggere la sintassi....

10
per il momento mi sono limitato a togliere la visualizzazione, ma se posso, vorrei risolvere l'errore. Grazie in anticipo.

11
Ho da pochissimo finito un sito web www.lecasediparma.it, in cui ho cambiato il php, dal 7.1 son passato al 7.2, come da segnalazione di joomla. ora però mi ritrovo questo errore:


Warning[/size]: count(): Parameter must be an array or an object that implements Countable in [/color][/size]/web/htdocs/www.lecasediparma.it/home/administrator/components/com_bt_property/tables/category.php[/color][/size] on line [/color][/size]104[/color]
[/size][/color]
[/size]ho aperto il file e alla riga 104 mi ritrovo: [/color]

Codice: [Seleziona]



if (!count($array['extra_fields'])) {
            $array['extra_fields'] = ",";
        }




io però di php non ne capisco nulla, qualcuno mi può aiutare?

12
ok, se riuscite mettete risolto visto che la soluzione di Limma funziona.

13
si l'ho scritto che ho risolto! usando anche i consigli di Limma (scritto sopra), poi vedete voi se mettere o meno risolto. lei ha postato una soluzione valida (io ho integrato con il plugin sourcerer ma non credo sia stato determinante).

14
Ho risolto, ho cambiato la versione di php ed ho usato i consigli di Limma, assieme al plugin Sourcerer, ora mi prende il codice e funziona tutto. per me è risolto.

15
aggiungo che ho trovato un post in cui consigliavano di risolvere installando Sourcerer, cosa che ho fatto ma non funziona. Non so più dove sbattere la testa, sinceramente, perchè ho riguardato tutti i vari settaggi per l'n-esima volta, mi sembrano tutti a posto. eppure non riesco ad inserire il codice.

16
io ho sempre usato codemirror per inserire i codici, ora la ricerca precisa non la ho più, l ho fatto la scorsa settimana e nel frattempo ho fatto un "check" ai box (di salute).
Ho ricontrollato tutti i vari settaggi ma non riesco a capire dove sia il blocco (interpreta codice plugin, compreso)
Ho provato ora come hai segnalato tu (Limma) usando Tiny ed includendo la possibilità di inserire iframe, ma continua a non funzionare.
Ricordo però che qualche mese fa andava, possibile che sia un bug di qualche aggiornamento fatto? in rete non ho trovato nulla, uso jce e il php è la vers 7.1.33 (potrebbe dipendere da questo?)

17
FHlipp, il discorso è lungo, non risolvibile in poche righe, salvo che non tu non sappia di cosa si sta parlando e da quello che scrivi direi proprio di no. La possibilità di usare quindi il sottodominio (che è una buona idea, ma bisogna saperlo fare, non dico per forza essere del mestiere, ma avere discrete conoscenze tecniche che tu non hai e che non si spiegano in poche righe) io la metterei da parte, invece userei l'area test esterna, io uso altervista.org che è gratuito, basta installare akeeba su joomla, fai un bel backup di tutto, anche del database e poi lo vai ad installare sull'area test con i file di kickstart sempre presenti sul sito di akeeba. le istruzioni di come si fa sono semplici e le trovi tutte credo anche in italiano. Inoltre Akeeba lo puoi usare anche per fare backup prima di ogni aggiornamento di joomla, che 99 volte su 100 va  a buon fine, ma se non ci va sei poi nella cacca, perchè non è reversibile.

18
scusami, anche io ho un problema simile, ma non ho trovato in rete o qui sul forum, una spiegazione. dipenderà dal fatto che non uso le parole corrette nella ricerca, ma son 3 gg che tento....invano.....

19
Ri-buongiorno, una domanda, sul sito www.lecasediparma.it ho alcuni moduli filtri (3 per l'esattezza) vorrei modificare questo modulo in modo da fargli scegliere in automatico nella casella "provincia" la option Parma così da poterla poi non visualizzare (perchè già scelta).
Metto il codice del php che gestisce il modulo, magari può aiutare
Codice: [Seleziona]

<?php
/**
 * @package    mod_bt_property_filter
 * @version      1.0
 * @created      Apr 2013


 * @author      BowThemes
 * @email      support@bowthems.com
 * @website      http://bowthemes.com
 * @support      Forum - http://bowthemes.com/forum/
 * @copyright   Copyright (C) 2012 Bowthemes. All rights reserved.
 * @license      http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 *
 */
// no direct access
defined('_JEXEC') or die('Restricted access');
$location_levels JComponentHelper::getParams('com_bt_property')->get('location_levels','3');
$advancedSearch '';
if(
$extrafield){
foreach (
$extrafield as $id => $extraoption) :
   if (isset(
$extraoption->checked)) {
      
$advancedSearch .= '<div class="form-group">';
      switch (
$extraoption->type) {
      case 
'dropdown':
         
$advancedSearch .= BTPropertyFilterHelper::extrafield_select($params,$extraoption->value$id);
         break;
      case 
'multiple':
         
$advancedSearch .= BTPropertyFilterHelper::extrafield_multiple($params,$extraoption->value$id);
         break;
      case 
'radio':
         
$advancedSearch .= BTPropertyFilterHelper::extrafield_radio($params,$extraoption->value$id);
         break;
      case 
'checkbox':
         
$advancedSearch .= BTPropertyFilterHelper::extrafield_checkbox($params$extraoption->value,$id);
         break;
      case 
'select':
         
$advancedSearch .= BTPropertyFilterHelper::extrafield_measure($params$extraoption->value$id);
         break;
      case 
'texrange':
         
$advancedSearch .= BTPropertyFilterHelper::extrafield_textrange($params$extraoption->value,$id);
         break;
      case 
'checkboxlist':
         
$advancedSearch .= BTPropertyFilterHelper::extrafield_checkboxlist($params$id);
         break;
      case
'textbox':            
         
$advancedSearch .= BTPropertyFilterHelper::extrafield_textbox($params,$extraoption->value,$id);      
         break;
      }
      
$advancedSearch .= '<>';
   }
endforeach;
}
?>

<div class="btp bt-propertyfilter<?php echo $moduleclass_sfx?>">
   <form role="form" id="form-map" class="form-map form-search" action="<?php echo JRoute::_(BT_PropertyHelperRoute::getCategoryRoute(0)); ?>"
      name="BTFilter" method="get">
      <input type="hidden" name="task" value="filter" />
      <input type="hidden" name="option" value="com_bt_property" />
      <input type="hidden" name="view" value="properties" />
      <?php if ($showsearchbox == 1) { ?>
      <div class="form-group">
         <?php echo BTPropertyFilterHelper::input_text($params$keysearch); ?>
      <>
      <?php ?>
      <?php if ($showstatus == 1) { ?>
      <div class="form-group">
         <?php echo BTPropertyFilterHelper::itemselect($params'prstatus'); ?>
      <>
      <?php ?>


      <?php if ($showlocation == 1) { ?>
         <div class="form-group">
            <?php echo BTPropertyFilterHelper::itemselect($params'location_lv1'); ?>
         <>
         <?php if($location_levels ) { ?>
         <div class="form-group">
            <?php echo BTPropertyFilterHelper::itemselect($params'location_lv2'); ?>
         <>
         <?php }?>
         <?php if($location_levels ) { ?>
         <div class="form-group">
            <?php echo BTPropertyFilterHelper::itemselect($params'location_lv3'); ?>
         <>
         <?php }?>
      <?php ?>


      <?php
      
if ($showcategory == 1) {
         if (
$params->get('category''')) {
            echo 
'<input type="hidden" name="category_select" value="' $params->get('category') . '"/>';
         } else {
            
?>



            <div class="form-group">
               <?php echo BTPropertyFilterHelper::categoryselect($params); ?>
            <>
         <?php }
      }
?>

      <?php if ($showprice) { ?>
      <div class="form-group">
         <?php echo BTPropertyFilterHelper::priceRange($params); ?>
      <>
      <?php ?>
      <?php if ($advancedSearch) { ?>
         <div class="form-group">
            <h4><a onclick="jQuery('#advanced-search').slideToggle();return false;" href="#"><?php echo JText::_('FILTER_ADVANCED_SEARCH');?>[/url]</h4>
            <div style="display:none" id="advanced-search">
               <?php echo $advancedSearch ?>
            <>
         <>
      <?php ?>
      <div class="filter-description">
         <?php
         
echo $descr;
         
?>

      <>


      <div class="filter-button">
         <input type="hidden" name="method" value="<?php echo $method ?>" />
         <input type="submit" value="<?php echo $buttontext?>" class="btn btn-default" />
         <?php if ($Itemid)
            echo 
'<input type="hidden" name="Itemid" value="' $Itemid '" />';
         
?>

      <>
   </form>
<>


mentre questo sarebbe il codice del file helper.php

Codice: [Seleziona]


<?php
/**
 * @package    mod_bt_property_filter
 * @version      1.1
 * @created      Apr 2013


 * @author      BowThemes
 * @email      support@bowthems.com
 * @website      http://bowthemes.com
 * @support      Forum - http://bowthemes.com/forum/
 * @copyright   Copyright (C) 2012 Bowthemes. All rights reserved.
 * @license      http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 *
 */
// no direct access
defined('_JEXEC') or die('Restricted access');   


class 
BTPropertyFilterHelper {
   public static function 
hasChildren($id) {


      
$mainframe JFactory::getApplication();      
      
$id = (int) $id;
      
$db JFactory::getDBO();
      
$query 'SELECT * FROM #__bt_property_categories  WHERE parent_id='.$id.' AND published = 1 AND language in (' $db->Quote(JFactory::getLanguage()->getTag()) . ',' $db->Quote('*') . ')';


      
$db->setQuery($query);
      
$rows $db->loadObjectList();
      if (
$db->getErrorNum()) {
         
$html .= $db->stderr();
         return 
false;
      }
      if (
count($rows)) {
         return 
true;
      } else {
         return 
false;
      }
   }
   
   public static function 
input_text(&$params,$opensearch_title){   
      
$html '';
      
$valueJRequest::getVar('searchword');
      
$html .= '<input name="searchword"  class="inputbox" type="text" value="'$value .'" placeholder="'.$opensearch_title.'" />';
      return 
$html;
   }
   public static function 
categoryselect(&$params$id 0$level 0) {      
      
$root_id "";         
      
$category JRequest::getVar('category_select');
      if(!
$category && $params->get('auto_detect_category'0)){
         
$app JFactory::getApplication();
         
$categoryId $app->input->getInt('catid') ? $app->input->getInt('catid') : $app->input->getInt('catid_rel');
         if(
$app->input->get('option') == 'com_bt_property' && $categoryId){
            
$category $categoryId;
         }
      }
      
$id = (int) $id;      
      
$db JFactory::getDBO();
      
      
$query "SELECT * FROM #__bt_property_categories WHERE parent_id={$id} AND published=1  ";
      
$query .= ' AND language in (' $db->Quote(JFactory::getLanguage()->getTag()) . ',' $db->Quote('*') . ')';
      
$query .= " ORDER BY ordering";


      
$db->setQuery($query);
      
$rows $db->loadObjectList();
      if (
$db->getErrorNum()) {
         echo 
$db->stderr();
         return 
false;
      }
      
$html '';
      if(
$level == 0) {      
      
$html .= "<select name=\"category_select\">";
      
$html .= "<option value=\"\">".JText::_("COM_BT_PROPERTY_CATEGORY")."</option>";
      
      }
      
$indent "";
      for (
$i 0$i $level$i++) {
         
$indent .= '&ndash; ';
      }
      
      foreach (
$rows as $k => $row) {      
         if ((
$category == $row->id)) {
            
$selected ' selected';
         } else {
            
$selected '';
         }
         if (
BTPropertyFilterHelper::hasChildren($row->id)) {
            
$html .= '<option value="'.$row->id.'"'.$selected.'>'.$indent.$row->title.'</option>';
            
$html .= BTPropertyFilterHelper::categoryselect($params$row->id$level 1$i);
         } else {
            
$html .= '<option value="'.$row->id.'"'.$selected.'>'.$indent.$row->title.'</option>';
         }
      }
      if (
$level == 0) {
         
$html .= "</select>";
      }
      return 
$html;
   }
   public static function 
itemSelect(&$params,$type) {
      
$value JRequest::getVar($type);
      
$db      JFactory::getDbo();
      
$query   $db->getQuery(true);
      
      
$query->select('id AS value, title AS text');
      
$query->from('#__bt_property_items');
      
$query->where('published=1');
      
$query->where('type=\''.$type.'\'');
      
$query->order('title');
      
$db->setQuery($query);
      if(
$type=='location_lv2'){
         
$query->where('parent_id = '.JRequest::getInt('location_lv1'));
      }else if(
$type=='location_lv3'){
         
$query->where('parent_id = '.JRequest::getInt('location_lv2'));
      }
      
$options =  $db->loadObjectList();
      foreach (
$options as & $option){
         
$option->text JText::_($option->text);
      }
      
$label str_replace('prstatus','status',$type);
      
$label strtoupper($label);
      
$options array_merge(array(JHtml::_('select.option',''JText::_('COM_BT_PROPERTY_'.$label))), $options);
      return 
JHtml::_('select.genericlist'$options$type'class="item_'.$type.'"''value''text',$value);
   }
   public static function 
extrafield_select(&$params,$extravalue,$extraid) {
      
$db JFactory::getDBO();         
      
$query "SELECT * FROM #__bt_property_extrafields  WHERE id IN ($extraid) AND published=1  ";
      
$db->setQuery($query);
      
$rows $db->loadObjectList();
      
$html '';
      
$selected'';
      foreach (
$rows as $k => $row) {
         if(!
trim($extravalue) && $row->type == "dropdown"){
            
$option $row->default_value;
            
$items explode("\r\n"$option);
         }else{   
            
$items explode(","$extravalue);
            
$items BTPropertyFilterHelper::remove_array_empty_values($items);
         }
         if(!
count($items)){
            
$items self::getExistingValues($extraid);
         }
         
$html .= '<div class="ex-'.preg_replace("/[^a-zA-Z0-9]/"""strtolower($row->name)).'">';
         
$html .= "<div class=\"filter-content\">";
         
$html .= "<input type=\"hidden\" name=\"extraid[".$extraid."]\" value=\"$row->id\">";
         
$html .= "<select  name=\"extraselect[".$extraid."]\">";
         
$html .= "<option value=\"\">".$row->name."</option>";
         
$extra_select JRequest::getVar('extraselect'null);         
         foreach(
$items as $item){
            if(isset(
$extra_select[$extraid]) && $extra_select[$extraid] == $item){
               
$selected ' selected="selected"';
            } else {
               
$selected '';
            }         
            if(
$item!=""){
               
$html .= '<option value="'.$item.'"'.$selected.'>'.$item.'</option>';
            }
         }
         
$html .= "
            </select>
            <>
            <>
         "
;   
      }
      return 
$html;   
   }
   public static function 
extrafield_textbox(&$params,$extravalue,$extraid) {
      
$db JFactory::getDBO();         
      
$query "SELECT * FROM #__bt_property_extrafields  WHERE id IN ($extraid) AND published=1  ";
      
$db->setQuery($query);
      
$rows $db->loadObjectList();
      
$html '';
      
$selected'';
      foreach (
$rows as $k => $row) {
         
$html .= '<div class="ex-'.preg_replace("/[^a-zA-Z0-9]/"""strtolower($row->name)).'">';
         
$html .= "<div class=\"filter-label\">";
         
$html .= "<label>".$row->name."</label>";
         
$html .="<>";
         
$html .= "<div class=\"filter-content\">";
         
$extra_select JRequest::getVar('exl-values'null);
         
$html .= '<input class="inputbox" type="text" name="exl-values['.$extraid.']" value="'.(isset($extra_select[$extraid])? $extra_select[$extraid]:'').'" >';
         
$html .= "<><>";
      }
      return 
$html;   
   }
   public static function 
extrafield_multiple(&$params,$extravalue,$extraid){
      
$db JFactory::getDBO();         
      
$query "SELECT * FROM #__bt_property_extrafields  WHERE id IN ($extraid) AND published=1  ";
      
$db->setQuery($query);
      
$rows $db->loadObjectList();   
      
$html '';
      foreach (
$rows as $k => $row) {   
         if(!
trim($extravalue) && $row->type == "dropdown"){
            
$option =$row->default_value;
            
$items explode("\r\n"$option);
         }else{   
            
$items explode(","$extravalue);
            
$items  =BTPropertyFilterHelper::remove_array_empty_values($items);
         }
         if(!
count($items)){
            
$items self::getExistingValues($extraid);
         }
         
$html .= '<div class="ex-'.preg_replace("/[^a-zA-Z0-9]/"""strtolower($row->name)).'">';
         
$html .= "<div class=\"filter-content\">";
         
$html .= "<input type=\"hidden\" name=\"extraarrayid[".$extraid."]\" value=\"$row->id\">";
         
$html .= "<select  name=\"extraselect_array[".$extraid."][]\" multiple=\"multiple\">";
         
$html .= "<option value=\"\">".$row->name."</option>";
         
$extra_multiple =JRequest::getVar('extraselect_array'null);         
         foreach(
$items as $item){
            
$selected '';
            if(
is_array($extra_multiple)==true) {               
               foreach(
$extra_multiple as $key=> $multi) {
                if(
is_array($multi)){
                  foreach(
$multi as $itemvalue){
                  if (
$itemvalue == $item) {                     
                     
$selected ' selected';
                     break;
                  } else {
                     
$selected '';
                  }
                  }
               }
               }
            }else {            
               if(
$extra_multiple == $item)
                     
$selected 'selected';
            }            
            if(
$item!=""){
            
$html .= '<option value="'.$item.'"'.$selected.'>'.$item.'</option>';
            }
         }
         
$html .= "
            </select>
            <>
            <>
         "
;
      }
      return 
$html;      
   }
   public static function 
extrafield_radio(&$params,$extravalue,$extraid){
      
$db JFactory::getDBO();         
      
$query "SELECT * FROM #__bt_property_extrafields  WHERE id IN ($extraid) AND published=1  ";
      
$db->setQuery($query);
      
$rows $db->loadObjectList();
      
$html '';
      foreach (
$rows as $k => $row) {
         if(!
trim($extravalue) && $row->type == "dropdown"){
            
$option =$row->default_value;
            
$items explode("\r\n"$option);
         }else{   
            
$items explode(","$extravalue);
            
$items  =BTPropertyFilterHelper::remove_array_empty_values($items);
         }
         if(!
count($items)){
            
$items self::getExistingValues($extraid);
         }   
         
$html .= '<div class="ex-'.preg_replace("/[^a-zA-Z0-9]/"""strtolower($row->name)).'">';
         
$html .= "<div  class=\"filter-label\">";
         
$html .= "<input type=\"hidden\" name=\"extraid[".$extraid."]\" value=\"$row->id\">";
         
$html .= "<label>".$row->name."</label>";
         
$html .="<>";
         
$html .= "<div class=\"filter-content\">";   
         
$extra_select JRequest::getVar('extraselect'null);   
         foreach(
$items as $item){
         if(isset(
$extra_select[$extraid]) && $extra_select[$extraid] == $item){
            
$selected ' checked="checked"';
         } else {
            
$selected '';
         }         
         
$html .= '<input  name="extraselect['.$extraid.']" type="radio" value="'.$item.'"';
         
$html .= ''.$selected.'';            
            
$html .= ' /><label for="'.$item.'">'.$item.'</label>[br /]';
         }
         
$html .= '<>';
         
$html .= '<>';
      }
      return 
$html;
   }
   public static function 
extrafield_checkbox(&$params,$extravalue,$extraid){
      
$db JFactory::getDBO();         
      
$query "SELECT * FROM #__bt_property_extrafields  WHERE id IN ($extraid) AND published=1  ";
      
$db->setQuery($query);
      
$rows $db->loadObjectList();   
      
$html '';
      foreach (
$rows as $k => $row) {   
         if(!
trim($extravalue) && $row->type == "dropdown"){
            
$option =$row->default_value;
            
$items explode("\r\n"$option);
         }else{   
            
$items explode(","$extravalue);
            
$items  =BTPropertyFilterHelper::remove_array_empty_values($items);
         }   
         if(!
count($items)){
            
$items self::getExistingValues($extraid);
         }   
         
$html .= '<div class="ex-'.preg_replace("/[^a-zA-Z0-9]/"""strtolower($row->name)).'">';
         
$html .= "<div  class=\"filter-label\">";
         
$html .= "<input type=\"hidden\" name=\"extraarrayid[".$extraid."]\" value=\"$row->id\">";
         
$html .= "<label>".$row->name."</label>";
         
$html .= "<>";
         
$html .= "<div class=\"filter-content\">";   
         
$searchchk JRequest::getVar('extraselect_array'null);
         
$search = array();
         (
is_array($searchchk) == false) ?   $search[] = $searchchk $search $searchchk ;      
         foreach(
$items as $item){
         
$html .= '<input  name="extraselect_array['.$extraid.'][]" type="checkbox" value="'.$item.'"';
            foreach (
$search as $arraysearch) {
                  if(
is_array($arraysearch)){
                     foreach(
$arraysearch as $itemvalue){
                        if (
trim($itemvalue) == trim($item)) $html .= 'checked="checked"';
                     }
                  }
               }
            
$html .= ' /><label for="'.$item.'">'.$item.'</label>[br /]';
         }
         
$html .="<>";
         
$html .="<>";
      }
      return 
$html;
   }
   public static function 
extrafield_measure(&$params,$extravalue,$extraid){   
   
      
$db JFactory::getDBO();
      
$cparams =  JComponentHelper::getParams("com_bt_property");         
      
$items explode(","$extravalue);
      
$items  =BTPropertyFilterHelper::remove_array_empty_values($items);
               
      
$query "SELECT * FROM #__bt_property_extrafields  WHERE  type=\"measurement\" AND id=$extraid AND published=1  ";
      
$db->setQuery($query);
      
$rows $db->loadObjectList();      
      
$arrayunit = @unserialize($rows[0]->default_value);      
      
      
$selected '';
      
$html '';
      
sort($items);
      if(!
count($items)){
         
$items self::getExistingValues($extraid);
      }
      
$html .= '<div class="ex-'.preg_replace("/[^a-zA-Z0-9]/"""strtolower($rows[0]->name)).' range-validator">';
      
$html .= '<div class="ex-min">';
      
$html .= "<div class=\"filter-label\">";
      
$html .= "<input type=\"hidden\" name=\"exmeasureID[".$extraid."]\" value=\"$extraid\">";
      
$html .= "<label>".sprintf(JText::_('MEASUREMENT_MIN'),$rows[0]->name).($arrayunit[1]? ' ('.$arrayunit[1].') ':'')."</label>";
      
$html .= "<>";      
      
$extra_min JRequest::getVar('extra_min'null);   
      
$html .= "<div class=\"filter-content\">";   
      
$html .= "<select name=\"extra_min[".$extraid."]\">";
      
      
$total count($items);      
      
$selected ='';      
      for (
$i0;$icount($items);$i++){      
         if (isset(
$extra_min[$extraid])){
            if(
$extra_min[$extraid] == $items[$i]){
               
$selected ' selected';                  
            }else{
               
$selected '';                  
            }
         }                
         
$html .= '<option value="'.($items[$i]).'"'.$selected.'>'.number_format($items[$i], 0$cparams->get('decimal_symbol''.'), $cparams->get('thousands_sep'',')).'</option>';
      }
      
$html .= "</select>";
      
$html .= '<>';
      
$html .= '<>';
      
//Max select
      
$sl ="";
      
$extra_max JRequest::getVar('extra_max'null);   
      
$html .= '<div class="ex-max">';
      
$html .= "<div  class=\"filter-label\">";
         
$html .= "<label>".sprintf(JText::_('MEASUREMENT_MAX'),$rows[0]->name).($arrayunit[1]? ' ('.$arrayunit[1].') ':'')."</label>";
      
$html .="<>";
      
$html .= "<div class=\"filter-content\">";
      
$html .= "<select  name=\"extra_max[".$extraid."]\">";   
      
      
$selected '';   
      for (
$i0;$i$total;$i++){   
         if (isset(
$extra_max[$extraid])){
            if(
$extra_max[$extraid] == $items[$i]){
               
$selected ' selected';                  
            }else{
               
$selected '';
            }
         } else {            
            if(!
$selected && $i == $total-1){
               
$selected ' selected';
            }
         }                  
         
$html .= '<option value="'.($items[$i]).'"'.$selected.'>'.number_format($items[$i], 0$cparams->get('decimal_symbol''.'), $cparams->get('thousands_sep'',')).'</option>';
      }
      
$html .= "</select>";      
      
$html .= '<>';
      
$html .= '<>';
      
$html .= '<>';
      return 
$html;
   }
   public static function 
extrafield_textrange(&$params,$extravalue,$extraid){
      
$db JFactory::getDBO();         
      
$query "SELECT * FROM #__bt_property_extrafields  WHERE id IN ($extraid) AND published=1  ";
      
$db->setQuery($query);
      
$row $db->loadObject();      
      
      
$arrayunit = @unserialize($row->default_value);            


      
      
$html '';            
      
$selected '';   
      
$html .= '<div class="ex-'.preg_replace("/[^a-zA-Z0-9]/"""strtolower($row->name)).'">';   
      
$html .= "<div  class=\"filter-label\">";
      
$html .= "<label>".sprintf(JText::_('MEASUREMENT_FROM'),$row->name).($arrayunit[1]? ' ('.$arrayunit[1].') ':'')."</label>";
      
$html .="<>";         
      
$extra_from JRequest::getVar('extra_from'null);         
      
$html .='<input type="hidden" name="exTextID[]" value="'.$extraid.'"/><input name="extra_from['.$extraid.']" value="'.($extra_from?$extra_from[$extraid]:'').'" />';               
      
$extra_to JRequest::getVar('extra_to'null);   
      
$html .= "<div  class=\"filter-label\">";
         
$html .= "<label>".sprintf(JText::_('MEASUREMENT_TO'),$row->name).($arrayunit[1]? ' ('.$arrayunit[1].') ':'')."</label>";
      
$html .="<>";               
      
$html .='<input name="extra_to['.$extraid.']" value="'.($extra_to?$extra_to[$extraid]:'').'" />';   
      
$html .="<>";      
      return 
$html;
   }
   public static function 
extrafield_checkboxlist(&$params,$extraid){
      
$db JFactory::getDBO();
      
$query "SELECT * FROM #__bt_property_extrafields  WHERE id IN ($extraid) AND published=1  ";
      
$db->setQuery($query);
      
$row $db->loadObject();
      
      if(
$row){
         
         
$html '<header><h3>'.$row->name.'</h3></header>';
         
$html .= '<ul class="submit-features">';
         
$options explode("\n",$row->default_value);
         
$exCblist JRequest::getVar('exCblist', array());
         if(isset(
$exCblist[$extraid])){
            
$exCblist $exCblist[$extraid];
         }else{
            
$exCblist = array();
         }
         foreach(
$options as $option){
            
$html.= '<li>';
            
$checked '';
            foreach(
$exCblist as $value){
               if(
trim($value) == trim($option)){
                  
$checked 'checked="checked"';
                  break;
               }
            }
            
$html.= '<div class="checkbox"><label><input name="exCblist['.$extraid.'][]" value="'.htmlspecialchars($option).'" '.$checked.' type="checkbox">'.$option.'</label><>';
            
$html.= '</li>';
            
         }
         
$html .= '</ul>';
         return 
$html;
      }
      return 
'';
   }
   
   
/** PRICE FILTER FUNCTION **/
   
public static function priceRange($params){
      
$html '';
      switch(
$params->get('showprice')){
         case 
1:
            
// Slider
            
$range $params->get('pricerange','1000;299000');
            
$curRange JFactory::getApplication()->input->getString('price'$range);
            if(!
$curRange$curRange $range;
            
$range explode(';',$range);


            list(
$curFrom$curTo) = explode(';'$curRange);
            if(
$curFrom<$range[0]){
               
$curFrom $range[0];
            }
            if(
$curTo>$range[1]){
               
$curTo $range[1];
            }
            
            
$step $params->get('pricestep',1000);
            
$uniqueId rand(01000);
            
$cparams JComponentHelper::getParams("com_bt_property");
            
$price_format $cparams->get('price_format''$ 000');
            
$currency $cparams->get('currency''USD');
            
$currency html_entity_decode(Bt_propertyLegacyHelper::getCurrencySymbols($currency),ENT_COMPAT'UTF-8');
            
$price_format str_replace(array('000','$'), array('###'.$cparams->get('thousands_sep',',').'###',$currency), $price_format);


            
$html '<div class="price-range"><input id="price-input'.$uniqueId.'" type="text" name="price" value="'.$curFrom.';'.$curTo.'"><>';
            
            
$html .= '<script type="text/javascript">
            BTP(document).ready(function(){
            BTP("#price-input'
.$uniqueId.'").slider({
               from: '
.$range[0].',
               to: '
.$range[1].',
               step: '
.$step.',
               round: 1,
               format: { format: \''
.$price_format.'\', locale: \'en\' }
            });});</script>'
;


            break;
         case 
2:
            
// One Dropdown List only
            
$priceValues $params->get('pricevalues','1000,2000,5000,10000,20000,50000,100000');
            
$priceValues explode(',',$priceValues);
            
$options = array();
            
$options[] = JHtml::_('select.option',''JText::_('COM_BT_PROPERTY_PRICE'));
            
            foreach(
$priceValues as $value){
               
$options[] = JHtml::_('select.option',$valuestr_replace(' ','',Bt_propertyHelper::formatPrice($value)). ' +');
            }
            
$html JHtml::_('select.genericlist'$options"price_from"'''value''text',JFactory::getApplication()->input->getString('price_from'), '');
            
            break;
         case 
3:
            
//Range Two Dropdown Lists
            
$priceValues $params->get('pricevalues','1000,2000,5000,10000,20000,50000,100000');
            
$priceValues explode(',',$priceValues);
            
$options = array();
            
$options[] = JHtml::_('select.option',''JText::_('FILTER_SELECT_PRICE_FROM'));
            
            foreach(
$priceValues as $value){
               
$options[] = JHtml::_('select.option',$valueBt_propertyHelper::formatPrice($value));
            }
            
$html .= '<div class="filter-label"><label>'.JText::_('COM_BT_PROPERTY_PRICE').'</label><>';
            
$html .= '<div class="range-validator">';
            
$html .= JHtml::_('select.genericlist'$options"price_from"'class="price_range"''value''text',JFactory::getApplication()->input->getString('price_from'), '');
            
            
$options[0] = JHtml::_('select.option',''JText::_('FILTER_SELECT_PRICE_TO'));
            
$html .= JHtml::_('select.genericlist'$options"price_to",  'class="price_range price_range_right"''value''text',JFactory::getApplication()->input->getString('price_to'), '');   
            
$html .= '<>';
         break;
         case 
4:
            
//Range Text Box & Auto complete HTML5
            
$priceValues $params->get('pricevalues','1000,2000,5000,10000,20000,50000,100000');
            
$priceValues explode(',',$priceValues);
            
$options = array();            
            foreach(
$priceValues as $value){
               
$options[] = JHtml::_('select.option',$valueBt_propertyHelper::formatPrice($value));
            }
            
$html .= '<div class="filter-label"><label>'.JText::_('COM_BT_PROPERTY_PRICE').'</label><>';
            
$html .= '<input autocomplete="off" type="text" placeholder="'.JText::_('FILTER_SELECT_PRICE_FROM').'" class="price_range" name="price_from" value="'.JFactory::getApplication()->input->getString('price_from').'" list="datalist1">';
            
$html .= '<input autocomplete="off" type="text" placeholder="'.JText::_('FILTER_SELECT_PRICE_TO').'" class="price_range price_range_right" name="price_to" value="'.JFactory::getApplication()->input->getString('price_to').'" list="datalist1">';
            
$html .= '<datalist id="datalist1">';
            foreach(
$options as $option){
               
$html .= '<option value="'.$option->value.'">'.$option->text.'</option]>';
            }
            
$html .= '</datalist>';
            break;
      }
      return 
$html;
   }
   
   public static function 
remove_array_empty_values($array)
   {
         
$new_array = array();          
         
$null_exceptions = array();          
         foreach (
$array as $key => $value)
         {
            
$value trim($value);      
            if(!
in_array($value$null_exceptions) && $value != "")
            {
               
$value htmlspecialchars($value);
               
$new_array[] = $value;
            }
         }
         return 
$new_array;
   }
   public static function 
getExistingValues($extraid){
      if(
$extraid){
         
$db JFactory::getDBO();
         
$query "SELECT DISTINCT(`value`) FROM #__bt_property_extrafields_values WHERE `value` is not null and `value` != '' and extrafields_id = ".intval($extraid). ' order by `value` limit 100';
         
$db->setQuery($query);
         return 
self::remove_array_empty_values($db->loadColumn());
      }
      return array();
   }
}

20
Joomla! 3 / Re:Attribuire una class a campi form
« il: 17 Dic 2019, 12:51:03 »
ce l'ho fatta!!! la soluzione è :


Codice: [Seleziona]

<li>
  <?php if(!$ex->format && $ex->show_label){
         echo 
'<span >' JText::_($ex->name) . '</span>';
           }
?>

                                                                                                       
 <span class="<?php if ($ex->alias == 'clen') {echo Bt_propertyHelper::extrafieldHTML ($ex) ; }?>"><strong><?php echo Bt_propertyHelper::extrafieldHTML($ex); ?></strong></span>
                                       
 </li>



Pagine: [1] 2 3 4 ... 16


Web Design Bolzano Kreatif