joomla i am bussy making mij own rating system

馋奶兔 提交于 2019-12-20 07:49:12

问题


hello im bussy making my own rating system bud i dont know how i get a to mij model can some one help me this mij code

controller/beer.php

<?php
defined('_JEXEC') or die;

class BierapiControllerBeer extends JControllerLegacy
{
    function save()
    {
        JRequest::checkToken() or die ('verkeerde token');
        $date = $this->input->post_ > get('jform', array(), ' array');
        $model = $this->getModel();
        if ($model->save($date)) {
            $this->setMessage('save succes');
        } else {
            JError::raiseWarning('', 'save gevaald/>');
        }
        $this->setRedirect(JRoute:: ('index.php?option=com_bierapi&view=beer'));


    } }

and this is mij star rating at views

<ul class="list-inline" data-rating="0" title="Average Rating - 0">
    <li><a title="1" beerid="1-1" data-index="1" href="<?php echo  \Joomla\CMS\Router\Route::_('index.php?option=com_bierapi$view=beer&task=1&beerid='.$row->beerid.'&rating=1')?>" data-beerid="1" data-rating="0" class="rating" style="cursor:pointer; color:#ccc; font-size:16px;">★</a></li>
    <li><a title="2" beerid="1-2" data-index="2" href="<?php echo  \Joomla\CMS\Router\Route::_('index.php?option=com_bierapi$view=beer&task=1&beerid='.$row->beerid.'&rating=2')?>" data-beerid="1" data-rating="0" class="rating" style="cursor:pointer; color:#ccc; font-size:16px;">★</a></li>
    <li><a title="3" beerid="1-3" data-index="3" href="<?php echo  \Joomla\CMS\Router\Route::_('index.php?option=com_bierapi$view=beer&task=1&beerid='.$row->beerid.'&rating=3')?>" data-beerid="1" data-rating="0" class="rating" style="cursor:pointer; color:#ccc; font-size:16px;">★</a></li>
    <li><a title="4" beerid="1-4" data-index="4" href="<?php echo  \Joomla\CMS\Router\Route::_('index.php?option=com_bierapi$view=beer&task=1&beerid='.$row->beerid.'&rating=4')?>" data-beerid="1" data-rating="0" class="rating" style="cursor:pointer; color:#ccc; font-size:16px;">★</a></li>
    <li><a title="5" beerid="1-5" data-index="5" href="<?php echo  \Joomla\CMS\Router\Route::_('index.php?option=com_bierapi$view=beer&task=1&beerid='.$row->beerid.'&rating=5')?>" data-beerid="1" data-rating="0" class="rating" style="cursor:pointer; color:#ccc; font-size:16px;">★</a></li>

 </ul>

来源:https://stackoverflow.com/questions/59264218/joomla-i-am-bussy-making-mij-own-rating-system

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!