Example #1
0
<?php

/**
* $Id: customtag.php 159 2007-12-17 16:44:05Z malanciault $
* Module: SmartRental
* Author: The SmartFactory <www.smartfactory.ca>
* Licence: GNU
*/
if (!defined("XOOPS_ROOT_PATH")) {
    die("XOOPS root path not defined");
}
function smart_customtag_initiate()
{
    global $xoopsTpl, $smartobject_customtag_handler;
    if (is_object($xoopsTpl)) {
        foreach ($smartobject_customtag_handler->objects as $k => $v) {
            $xoopsTpl->assign($k, $v->render());
        }
    }
}
if (!defined('SMARTOBJECT_URL')) {
    include_once XOOPS_ROOT_PATH . '/modules/smartobject/include/common.php';
}
smart_loadLanguageFile('smartobject', 'customtag');
include_once XOOPS_ROOT_PATH . "/modules/smartobject/include/functions.php";
include_once SMARTOBJECT_ROOT_PATH . "class/customtag.php";
$smartobject_customtag_handler = xoops_getModuleHandler('customtag', 'smartobject');
$smartobject_customTagsObj = $smartobject_customtag_handler->getCustomtagsByName();
Example #2
0
function smart_loadCommonLanguageFile()
{
    smart_loadLanguageFile('smartobject', 'common');
}
Example #3
0
/**
* $Id: rating.rate.php 159 2007-12-17 16:44:05Z malanciault $
* Module: SmartRental
* Author: The SmartFactory <www.smartfactory.ca>
* Licence: GNU
*/
if (!defined("XOOPS_ROOT_PATH")) {
    die("XOOPS root path not defined");
}
if (!defined('SMARTOBJECT_URL')) {
    include_once XOOPS_ROOT_PATH . '/modules/smartobject/include/common.php';
}
include_once SMARTOBJECT_ROOT_PATH . "class/rating.php";
include_once SMARTOBJECT_ROOT_PATH . "include/functions.php";
smart_loadLanguageFile('smartobject', 'rating');
$module_dirname = $xoopsModule->dirname();
// Retreive the SmartObject Rating plugin for the current module if it exists
$smartobject_rating_handler = xoops_getModuleHandler('rating', 'smartobject');
$smartobject_plugin_handler = new SmartPluginHandler();
$pluginObj = $smartobject_plugin_handler->getPlugin($module_dirname);
if ($pluginObj) {
    $rating_item = $pluginObj->getItem();
    if ($rating_item) {
        $rating_itemid = $pluginObj->getItemIdForItem($rating_item);
        $stats = $smartobject_rating_handler->getRatingAverageByItemId($rating_itemid, $module_dirname, $rating_item);
        $xoopsTpl->assign('smartobject_rating_stats_total', $stats['sum']);
        $xoopsTpl->assign('smartobject_rating_stats_average', $stats['average']);
        $xoopsTpl->assign('smartobject_rating_item', $rating_item);
        if (is_object($xoopsUser)) {
            $ratingObj = $smartobject_rating_handler->already_rated($rating_item, $rating_itemid, $module_dirname, $xoopsUser->getVar('uid'));
Example #4
0
        $adsenseObj->setVar('adsenseid', 0);
        $adsenseObj->setVar('tag', '');
        if ($showmenu) {
            smart_adminMenu(3, _AM_SOBJECT_ADSENSES . " > " . _CO_SOBJECT_CREATINGNEW);
        }
        smart_collapsableBar('adsensecreate', _AM_SOBJECT_ADSENSES_CREATE, _AM_SOBJECT_ADSENSES_CREATE_INFO);
        $sform = $adsenseObj->getForm(_AM_SOBJECT_ADSENSES_CREATE, 'addadsense', false, false, false, true);
        $sform->display();
        smart_close_collapsable('adsensecreate');
    }
}
include_once "admin_header.php";
include_once SMARTOBJECT_ROOT_PATH . "class/smartobjecttable.php";
include_once SMARTOBJECT_ROOT_PATH . "class/adsense.php";
$smartobject_adsense_handler = xoops_getmodulehandler('adsense');
smart_loadLanguageFile('smartobject', 'adsense');
$op = '';
if (isset($_GET['op'])) {
    $op = $_GET['op'];
}
if (isset($_POST['op'])) {
    $op = $_POST['op'];
}
switch ($op) {
    case "mod":
        $adsenseid = isset($_GET['adsenseid']) ? intval($_GET['adsenseid']) : 0;
        smart_xoops_cp_header();
        editclass(true, $adsenseid);
        break;
    case "clone":
        $adsenseid = isset($_GET['adsenseid']) ? intval($_GET['adsenseid']) : 0;