--
You received this message because you are subscribed to the Google Groups "Joomla Component Builder" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jcb+uns...@vdm.io.
To view this discussion on the web visit https://groups.google.com/a/vdm.io/d/msgid/jcb/4c7634ff-bba8-4fbc-a9b9-34f31c7722f5%40vdm.io.
<form action="<?php echo JRoute::_('index.php'); ?>" id="ricerca_circolare_dynamic" method="post">
<?php echo JHtml::_( 'form.token' ); ?>
<input type="hidden" name="option" value="com_circolari" />
<input type="hidden" name="view" value="risultatiricercaricolari" />
<input type="hidden" name="task"/>
<input type="hidden" name="itemId" value="855" />
and so on...
</form>
To view this discussion on the web visit https://groups.google.com/a/vdm.io/d/msgid/jcb/914b9b1d-bfe4-4f88-b04d-97983e5fa358%40vdm.io.
To view this discussion on the web visit https://groups.google.com/a/vdm.io/d/msgid/jcb/a567b8aa-89ba-4e32-827a-b32d70e1291f%40vdm.io.
<?php JHtml::_('formbehavior.chosen', 'select'); ?>
<form action="<?php echo JRoute::_('index.php'); ?>" id="ricerca_circolare_dynamic" method="get">
<?php echo JHtml::_( 'form.token' ); ?>
<input type="hidden" name="option" value="com_circolari" />
<input type="hidden" name="view" value="risultatiricercaricolari" />
<input type="hidden" name="task"/>
<input type="hidden" name="itemId" value="855" />
<h3>Ricerca circolari</h3>
<p>Per la ricerca delle circolari compilare almeno un campo.</p>
<input name="oggetto" id="oggetto" type="text" placeholder="Oggetto" />
<input type="image" src="images/lente.png" value="cerca" id="modulocerca_btn" class="btn btn-primary" />
</form>
<hr/>
<h2>Tutte le circolari</h2>
<?php foreach ($this->items as $item): ?>
<b><?php
$newdate = new DateTime($item->data);
echo $newdate->format('d-m-Y');
?></b><br/>
<b>Circolare nr. </b><?php echo $item->numerocircolare; ?><br/>
<b>Oggetto: </b><?php echo $item->oggetto; ?><br/>
<b>Fonte: </b><?php echo $item->circolari_fonte_fonte; ?><br/>
<b>Tags: </b>
<?php
$tags = new JHelperTags;
$tags->getItemTags('com_circolari.circ', $item->id);
echo JLayoutHelper::render('joomla.content.tags', $tags->itemTags);
?>
<a href="/<?php echo $item->filecircolare; ?>"class="download_button_circolare" download><img src="/images/pdf.png" style="width:20px;margin-right:5px;"></img><strong>Download</strong></a><br/><hr/>
<?php endforeach; ?>To view this discussion on the web visit https://groups.google.com/a/vdm.io/d/msgid/jcb/d62932aa-8f07-4124-8762-049e82fed5be%40vdm.io.
<h1>Hello!</h1> <form id="#something" action="something">
<input>
<select>
<send button>
</form>
<p>bottom of the page</p>
<form action="***" method="post" name="adminForm" id="adminForm">
<input>
<select>
<send button>
<p>bottom of the page</p>
<pagination>
</form>Hmmm you will have the give exact code... since this does not look like JCB code, remember it all is in the details.I just for fun dumped a form in the SD component list view, which also has pagination... this is how it comes out.
https://youtu.be/BcyunEt37Ms (side note I placed the code in the Custom Script area of the PHP tab... I see that part was not recorded)
<?php
/*----------------------------------------------------------------------------------| www.vdm.io |----/
Pixed
/-------------------------------------------------------------------------------------------------------/
@version 1.0.7
@build 1st Dicembre, 2018
@created 14th Ottobre, 2018
@package Circolari FFBO
@subpackage default.php
@author Gianluca Gabella <http://www.pixed.it>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
____ _____ _____ __ __ __ __ ___ _____ __ __ ____ _____ _ _ ____ _ _ ____
(_ _)( _ )( _ )( \/ )( ) /__\ / __)( _ )( \/ )( _ \( _ )( \( )( ___)( \( )(_ _)
.-_)( )(_)( )(_)( ) ( )(__ /(__)\ ( (__ )(_)( ) ( )___/ )(_)( ) ( )__) ) ( )(
\____) (_____)(_____)(_/\/\_)(____)(__)(__) \___)(_____)(_/\/\_)(__) (_____)(_)\_)(____)(_)\_) (__)
/------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
?>
<?php echo $this->toolbar->render(); ?>
<?php JHtml::_('formbehavior.chosen', 'select'); ?>
<form action="<?php echo JRoute::_('index.php'); ?>" id="ricerca_circolare_dynamic" name="ricerca_circolare_dynamic" method="get">
<?php
$db =& JFactory::getDBO();
?>
<?php echo JHtml::_( 'form.token' ); ?>
<input type="hidden" name="option" value="com_circolari" />
<input type="hidden" name="view" value="risultatiricercaricolari" />
<input type="hidden" name="task"/>
<input type="hidden" name="itemId" value="855" />
<h3>Ricerca circolari</h3>
<p>Per la ricerca delle circolari compilare almeno un campo.</p>
<input name="oggetto" id="oggetto" type="text" placeholder="Oggetto" />
<button id="modulocerca_btn" class="btn btn-primary btn-success" onclick="Joomla.submitbutton('compiler.compiler')" ><span class="icon-cog icon-white"></span>Cerca</button>
<p></p><br/>
<h3>Ricerca filtrata</h3>
<p>Puoi filtrare la tua ricerca per AREA, TAG o PERIODO. Lascia vuoti questi campi per cercare indistintamente tra tutte le circolari</p>
<h4>1) AREA:</h4>
<select data-placeholder="Area" class="chosen-select" id="area_select" tabindex="4" name="area[]" multiple="multiple">
<?php
$query = "SELECT id, fonte FROM #__circolari_fonte WHERE published=1 ORDER BY fonte ASC";
//echo $query;
$db->setQuery($query);
$data = $db->loadObjectList();
foreach($data as $tipo){
$title = $tipo->fonte;
$idfonte = $tipo->id;
echo "<option value=\"$idfonte\" id=\"item_$idfonte\">$title</option>";
}
?>
</select>
<br/>
<h4>2) TAGS:</h4>
<select data-placeholder="Tags" class="chosen-select" id="tags_select" tabindex="4" name="tags[]" multiple="multiple">
<?php
//$query = "SELECT DISTINCT tag_id FROM #__contentitem_tag_map WHERE type_alias LIKE 'com_circolari.circ' INNER JOIN #__tags ";
//echo $query;
$query = $db->getQuery(true);
//$query->select(array('a.tag_id', 'b.title'));
$query->select('DISTINCT a.tag_id, b.title');
$query->from($db->quoteName('#__contentitem_tag_map', 'a'));
$query->join('INNER', $db->quoteName('#__tags', 'b') . ' ON (' . $db->quoteName('a.tag_id') . ' = ' . $db->quoteName('b.id') . ')');
$query->where($db->quoteName('a.type_alias') . ' LIKE "com_circolari.circ"');
$query->order($db->quoteName('b.title') . ' ASC');
$db->setQuery($query);
$data = $db->loadObjectList();
foreach($data as $tipo){
$tagid = $tipo->tag_id;
$tagname = $tipo->title;
echo "<option value=\"$tagid\" id=\"id_$tagid\">$tagname</option>";
}
?>
</select>
<br/>
<h4>3) PERIODO:</h4>
<label for="datadal">Dal:</label> <input type="date" id="datadal" name="datadal" min="2009-01-01" /><br/>
<label for="dataal">Al</label> <input type="date" id="dataal" name="dataal" min="2009-01-01" />
<p></p>
<button id="modulocerca_btn" class="btn btn-primary btn-success" onclick="Joomla.submitbutton('compiler.compiler')"><span class="icon-cog icon-white"></span>Cerca</button>
</form>
<hr/>
<h2>Tutte le circolari</h2>
<?php foreach ($this->items as $item): ?>
<b>
<?php
$newdate = new DateTime($item->data);
echo $newdate->format('d-m-Y');
?>
</b><br/>
<b>Circolare nr. </b><?php echo $item->numerocircolare; ?><br/>
<b>Oggetto: </b><?php echo $item->oggetto; ?><br/>
<b>Fonte: </b><?php echo $item->circolari_fonte_fonte; ?><br/>
<b>Tags: </b>
<?php
$tags = new JHelperTags;
$tags->getItemTags('com_circolari.circ', $item->id);
echo JLayoutHelper::render('joomla.content.tags', $tags->itemTags);
?>
<a href="/<?php echo $item->filecircolare; ?>"class="download_button_circolare" download><img src="/images/pdf.png" style="width:20px;margin-right:5px;"></img><strong>Download</strong></a><br/><hr/>
<?php endforeach; ?><?php
/*----------------------------------------------------------------------------------| www.vdm.io |----/
Pixed
/-------------------------------------------------------------------------------------------------------/
@version 1.0.7
@build 1st Dicembre, 2018
@created 14th Ottobre, 2018
@package Circolari FFBO
@subpackage default.php
@author Gianluca Gabella <http://www.pixed.it>
@copyright Copyright (C) 2015. All Rights Reserved
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
____ _____ _____ __ __ __ __ ___ _____ __ __ ____ _____ _ _ ____ _ _ ____
(_ _)( _ )( _ )( \/ )( ) /__\ / __)( _ )( \/ )( _ \( _ )( \( )( ___)( \( )(_ _)
.-_)( )(_)( )(_)( ) ( )(__ /(__)\ ( (__ )(_)( ) ( )___/ )(_)( ) ( )__) ) ( )(
\____) (_____)(_____)(_/\/\_)(____)(__)(__) \___)(_____)(_/\/\_)(__) (_____)(_)\_)(____)(_)\_) (__)
/------------------------------------------------------------------------------------------------------*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
?>
<form action="<?php echo JRoute::_('index.php?option=com_circolari'); ?>" method="post" name="adminForm" id="adminForm">
<?php echo $this->toolbar->render(); ?><?php JHtml::_('formbehavior.chosen', 'select'); ?>
<form action="<?php echo JRoute::_('index.php'); ?>" id="ricerca_circolare_dynamic" name="ricerca_circolare_dynamic" method="get">
<?php
$db =& JFactory::getDBO();
?>
<?php echo JHtml::_( 'form.token' ); ?>
<input type="hidden" name="option" value="com_circolari" />
<input type="hidden" name="view" value="risultatiricercaricolari" />
<input type="hidden" name="task"/>
<input type="hidden" name="itemId" value="855" />
<h3>Ricerca circolari</h3>
<p>Per la ricerca delle circolari compilare almeno un campo.</p>
<input name="oggetto" id="oggetto" type="text" placeholder="Oggetto" />
<button id="modulocerca_btn" class="btn btn-primary btn-success" onclick="Joomla.submitbutton('compiler.compiler')" ><span class="icon-cog icon-white"></span>Cerca</button>
<p></p><br/>
<h3>Ricerca filtrata</h3>
<p>Puoi filtrare la tua ricerca per AREA, TAG o PERIODO. Lascia vuoti questi campi per cercare indistintamente tra tutte le circolari</p>
<h4>1) AREA:</h4>
<select data-placeholder="Area" class="chosen-select" id="area_select" tabindex="4" name="area[]" multiple="multiple">
<?php
$query = "SELECT id, fonte FROM #__circolari_fonte WHERE published=1 ORDER BY fonte ASC";
//echo $query;
$db->setQuery($query);
$data = $db->loadObjectList();
foreach($data as $tipo){
$title = $tipo->fonte;
$idfonte = $tipo->id;
echo "<option value=\"$idfonte\" id=\"item_$idfonte\">$title</option>";
}
?>
</select>
<br/>
<h4>2) TAGS:</h4>
<select data-placeholder="Tags" class="chosen-select" id="tags_select" tabindex="4" name="tags[]" multiple="multiple">
<?php
//$query = "SELECT DISTINCT tag_id FROM #__contentitem_tag_map WHERE type_alias LIKE 'com_circolari.circ' INNER JOIN #__tags ";
//echo $query;
$query = $db->getQuery(true);
//$query->select(array('a.tag_id', 'b.title'));
$query->select('DISTINCT a.tag_id, b.title');
$query->from($db->quoteName('#__contentitem_tag_map', 'a'));
$query->join('INNER', $db->quoteName('#__tags', 'b') . ' ON (' . $db->quoteName('a.tag_id') . ' = ' . $db->quoteName('b.id') . ')');
$query->where($db->quoteName('a.type_alias') . ' LIKE "com_circolari.circ"');
$query->order($db->quoteName('b.title') . ' ASC');
$db->setQuery($query);
$data = $db->loadObjectList();
foreach($data as $tipo){
$tagid = $tipo->tag_id;
$tagname = $tipo->title;
echo "<option value=\"$tagid\" id=\"id_$tagid\">$tagname</option>";
}
?>
</select>
<br/>
<h4>3) PERIODO:</h4>
<label for="datadal">Dal:</label> <input type="date" id="datadal" name="datadal" min="2009-01-01" /><br/>
<label for="dataal">Al</label> <input type="date" id="dataal" name="dataal" min="2009-01-01" />
<p></p>
<button id="modulocerca_btn" class="btn btn-primary btn-success" onclick="Joomla.submitbutton('compiler.compiler')"><span class="icon-cog icon-white"></span>Cerca</button>
</form>
<hr/>
<h2>Tutte le circolari</h2>
<?php foreach ($this->items as $item): ?>
<b><?php
$newdate = new DateTime($item->data);
echo $newdate->format('d-m-Y');
?></b><br/>
<b>Circolare nr. </b><?php echo $item->numerocircolare; ?><br/>
<b>Oggetto: </b><?php echo $item->oggetto; ?><br/>
<b>Fonte: </b><?php echo $item->circolari_fonte_fonte; ?><br/>
<b>Tags: </b>
<?php
$tags = new JHelperTags;
$tags->getItemTags('com_circolari.circ', $item->id);
echo JLayoutHelper::render('joomla.content.tags', $tags->itemTags);
?>
<a href="/<?php echo $item->filecircolare; ?>"class="download_button_circolare" download><img src="/images/pdf.png" style="width:20px;margin-right:5px;"></img><strong>Download</strong></a><br/><hr/>
<?php endforeach; ?>
<?php if (isset($this->items) && isset($this->pagination) && isset($this->pagination->pagesTotal) && $this->pagination->pagesTotal > 1): ?>
<div class="pagination">
<?php if ($this->params->def('show_pagination_results', 1)) : ?>
<p class="counter pull-right"> <?php echo $this->pagination->getPagesCounter(); ?> <?php echo $this->pagination->getLimitBox(); ?></p>
<?php endif; ?>
<?php echo $this->pagination->getPagesLinks(); ?>
</div>
<?php endif; ?>
<input type="hidden" name="task" value="" />
<?php echo JHtml::_('form.token'); ?>
</form>Copyright © Vast Development Method | Terms of Service | Privacy Policy | Company
$search_string = $this->input->get('search_name', null, 'STRING');
if ([[[Component]]]Helper::checkString($search_string))
{
$search = $db->quote('%' . $db->escape($search_string, true) . '%');
$query->where('(a.name LIKE '.$search.' OR a.name_code LIKE '.$search.' OR a.short_description LIKE '.$search.' OR a.getbuilder LIKE '.$search.' OR g.name LIKE '.$search.')');
}