Example #1
0
 /**
  * 
  * set image style and preview url
  */
 private function setImage()
 {
     //get slider id
     if (!empty($this->item->id)) {
         $sliderID = $this->item->sliderid;
     } else {
         $sliderID = JRequest::getVar("sliderid");
     }
     $slider = HelperUniteHCar::getSlider($sliderID);
     $params = $slider["params"];
     $imageHeight = $params->get("image_height", 100);
     $imageWidth = $params->get("image_width", 150);
     $this->slider = $slider;
     //put image
     if ($this->isEmpty == false) {
         $filenameImage = $this->params->get("image");
         $this->urlPreview = UniteFunctionJoomlaHCar::getImageOutputUrl($filenameImage, $imageWidth, $imageHeight, true);
     } else {
         $this->imagePreviewStyle = "style='display:none;'";
     }
     //add image pattern to js
     $pattern = UniteFunctionJoomlaHCar::getImageOutputUrl("IMAGE_PLACE", $imageWidth, $imageHeight, true, false);
     UniteFunctionJoomlaHCar::addScriptDeclaration("var g_imagePattern='{$pattern}';");
 }
Example #2
0
    /**
     * 
     * output the slides
     */
    private function putSlides()
    {
        $imageWidth = $this->params->get("image_width", 150);
        $imageHeight = (int) $this->params->get("image_height");
        foreach ($this->arrSlides as $slide) {
            $slideParams = $slide["params"];
            $slideImage = $slideParams->get("image");
            $activateLink = trim($slideParams->get("activate_link", "no"));
            $openIn = $slideParams->get("link_open_in", "new");
            $htmlTarget = $openIn == "new" ? 'target="_blank"' : '';
            $link = $slideParams->get("link", "javascript:void(0)");
            $urlImageReized = UniteFunctionJoomlaHCar::getImageOutputUrl($slideImage, $imageWidth, $imageHeight, true);
            ?>
				<li>
					<?php 
            if ($activateLink == "yes") {
                ?>
					<a href='<?php 
                echo $link;
                ?>
' <?php 
                echo $htmlTarget;
                ?>
>
					<?php 
            }
            ?>
						<img width="<?php 
            echo $imageWidth;
            ?>
" alt="slide image" height="<?php 
            echo $imageHeight;
            ?>
" src="<?php 
            echo $urlImageReized;
            ?>
" />
					<?php 
            if ($activateLink == "yes") {
                ?>
					</a>
					<?php 
            }
            ?>
				</li>
				<?php 
        }
    }
Example #3
0
    //$user->authorise('core.create',		'com_contact.category.'.$item->catid);
    $canEdit = true;
    //$user->authorise('core.edit',			'com_contact.category.'.$item->catid);
    $canCheckin = true;
    //$user->authorise('core.manage',		'com_checkin') || $item->checked_out == $userId || $item->checked_out == 0;
    $canEditOwn = true;
    //$user->authorise('core.edit.own',		'com_contact.category.'.$item->catid) && $item->created_by == $userId;
    $canChange = true;
    //$user->authorise('core.edit.state',	'com_contact.category.'.$item->catid) && $canCheckin;
    //get params
    $params = new JRegistry();
    $params->loadString($item->params, "json");
    $urlRoot = JURI::root();
    //get image url's:
    $image = $params->get("image");
    $thumbUrl = UniteFunctionJoomlaHCar::getImageOutputUrl($image, 200, 100, true);
    $imageUrl = $urlRoot . $image;
    $img_file = pathinfo($imageUrl, PATHINFO_BASENAME);
    $itemTitle = $item->title . " ({$img_file})";
    ?>
			<tr class="row<?php 
    echo $i % 2;
    ?>
">
				<td class="center">
					<?php 
    echo JHtml::_('grid.id', $i, $item->id);
    ?>
				</td>
				<td>
					<?php