how to create a joomla hit counter

9 Anni 1 Settimana fa - 9 Anni 1 Settimana fa #1087 da Juanjo vazquez real
how to create a joomla hit counter è stato creato da Juanjo vazquez real
Hello
I finally managed to go well field hits, I will explain as e echo if anyone serves.

We must create a field hits, type TINYINT (11) in our table
Once we have our component in part site / models in our archive item.php add:
within the model class
public function hit($id = null)
        {
                if (empty($id)) {
                        $id = $this->getState('item.id');// item is the name of our item
                }

                $item = $this->getTable();
                return $item->hit($id);
        }

then in site / item / view file view.html.php
we add this code within the function display
$model = $this->getModel();
   $model->hit();

I hope this helps someone
Ultima Modifica 9 Anni 1 Settimana fa da Juanjo vazquez real.
Ringraziano per il messaggio: Виталий

Si prega Accedi o Crea un account a partecipare alla conversazione.

9 Anni 1 Settimana fa #1088 da Andres Maeso
Risposta da Andres Maeso al topic Hits
Thanks Juanjo. Do you mind if I rename it like "how to create a joomla hit counter"? :)

Andrés Maeso
Customer relations manager at Joomla Component Creator.

Questo indirizzo email è protetto dagli spambots. È necessario abilitare JavaScript per vederlo.

Si prega Accedi o Crea un account a partecipare alla conversazione.

Tempo creazione pagina: 0.055 secondi
Powered by Forum Kunena

We use cookies so that you can place orders and we can provide a better service. You can control the use of cookies at the individual browser level. If you reject cookies, you may still use our website, but your ability to use some features or areas of our website may be limited.