how to create a joomla hit counter
Juanjo vazquez real
New Member
Posts: 9
9 år 1 uge siden - 9 år 1 uge siden #1087
af Juanjo vazquez real
how to create a joomla hit counter blev oprettet af 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
then in site / item / view file view.html.php
we add this code within the function display
I hope this helps someone
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
Sidste redigering: 9 år 1 uge siden ved Juanjo vazquez real.
Følgende bruger(e) sagde tak: Виталий
Venligst Log på eller Opret en konto for at deltage i samtalen
Andres Maeso
Platinum Member
Posts: 338
9 år 1 uge siden #1088
af Andres Maeso
Andrés Maeso
Customer relations manager at Joomla Component Creator.
Denne e-mail adresse bliver beskyttet mod spambots. Du skal have JavaScript aktiveret for at vise den.
Besvaret af Andres Maeso på emne 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.
Denne e-mail adresse bliver beskyttet mod spambots. Du skal have JavaScript aktiveret for at vise den.
Venligst Log på eller Opret en konto for at deltage i samtalen
Tid til at oprette siden: 0.049 sekunder