当前位置: 首页>>代码示例>>PHP>>正文


PHP plgFabrik_Element::renderListData方法代码示例

本文整理汇总了PHP中plgFabrik_Element::renderListData方法的典型用法代码示例。如果您正苦于以下问题:PHP plgFabrik_Element::renderListData方法的具体用法?PHP plgFabrik_Element::renderListData怎么用?PHP plgFabrik_Element::renderListData使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在plgFabrik_Element的用法示例。


在下文中一共展示了plgFabrik_Element::renderListData方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: renderListData

 /**
  * shows the data formatted for the table view
  * @param string data
  * @param object all the data in the tables current row
  * @return string formatted value
  */
 function renderListData($data, $oAllRowsData)
 {
     $data = parent::renderListData($data, $oAllRowsData);
     $params = $this->getParams();
     if ($params->get('textarea-tagify') == true) {
         $data = $this->tagify($data);
     }
     //$$$rob dont strip slashes here - this is done when saving to db now
     if ($params->get('use_wysiwyg', 0) == 0) {
         if (is_array($data)) {
             for ($i = 0; $i < count($data); $i++) {
                 $data[$i] = nl2br($data[$i]);
             }
         } else {
             if (is_object($data)) {
                 $this->convertDataToString($data);
             }
             $data = nl2br($data);
         }
     }
     if (!$params->get('textarea-tagify') && $data !== '' && (int) $params->get('textarea-truncate', 0) !== 0) {
         $opts = array();
         $opts['wordcount'] = (int) $params->get('textarea-truncate', 0);
         $opts['tip'] = $params->get('textarea-hover');
         $opts['position'] = $params->get('textarea_hover_location', 'top');
         $data = fabrikString::truncate($data, $opts);
     }
     return $data;
 }
开发者ID:romuland,项目名称:khparts,代码行数:35,代码来源:textarea.php

示例2: renderListData

 /**
  * Shows the data formatted for the list view
  *
  * @param   string  $data      elements data
  * @param   object  &$thisRow  all the data in the lists current row
  *
  * @return  string	formatted value
  */
 public function renderListData($data, &$thisRow)
 {
     $params = $this->getParams();
     $format = $params->get('text_format_string');
     if ($format != '') {
         $str = sprintf($format, $data);
         $data = eval($str);
     }
     return parent::renderListData($data, $thisRow);
 }
开发者ID:rogeriocc,项目名称:fabrik,代码行数:18,代码来源:jsperiodical.php

示例3: renderListData

 /**
  * shows the data formatted for the table view
  * @param string data
  * @param object all the data in the tables current row
  * @return string formatted value
  */
 function renderListData($data, $oAllRowsData)
 {
     static $range;
     static $fullName;
     if (!isset($range)) {
         $range = $this->getRange();
         $fullName = $this->getDataElementFullName();
     }
     $data = $oAllRowsData->{$fullName};
     $data = $this->_renderListData($data, $range);
     return parent::renderListData($data, $oAllRowsData);
 }
开发者ID:rhotog,项目名称:fabrik,代码行数:18,代码来源:googleometer.php

示例4: renderListData

 /**
  * shows the data formatted for the table view
  * @param string data
  * @param object all the data in the tables current row
  * @return string formatted value
  */
 function renderListData($data, $oAllRowsData)
 {
     $params = $this->getParams();
     $data = $this->numberFormat($data);
     $format = $params->get('text_format_string');
     if ($format != '') {
         $data = sprintf($format, $data);
     }
     if ($params->get('password') == "1") {
         $data = str_pad('', strlen($data), '*');
     }
     $this->_guessLinkType($data, $oAllRowsData, 0);
     return parent::renderListData($data, $oAllRowsData);
 }
开发者ID:romuland,项目名称:khparts,代码行数:20,代码来源:field.php

示例5: renderListData

 /**
  * Shows the data formatted for the list view
  *
  * @param   string  $data      elements data
  * @param   object  &$thisRow  all the data in the lists current row
  *
  * @return  string	formatted value
  */
 public function renderListData($data, &$thisRow)
 {
     $user = JFactory::getUser();
     $params = $this->getParams();
     $ext = $params->get('rating-pngorgif', '.png');
     $imagepath = JUri::root() . '/plugins/fabrik_element/rating/images/';
     $data = FabrikWorker::JSONtoData($data, true);
     $url = COM_FABRIK_LIVESITE . 'index.php?option=com_fabrik&amp;format=raw&amp;view=plugin&amp;task=pluginAjax&amp;g=element&amp;plugin=rating&amp;method=ajax_rate&amp;element_id=' . $this->getElement()->id;
     FabrikHelperHTML::addPath(COM_FABRIK_BASE . 'plugins/fabrik_element/rating/images/', 'image', 'list', false);
     $insrc = FabrikHelperHTML::image("star_in{$ext}", 'list', @$this->tmpl, array(), true);
     $outsrc = FabrikHelperHTML::image("star_out{$ext}", 'list', @$this->tmpl, array(), true);
     $url .= '&amp;row_id=' . $thisRow->__pk_val;
     $url .= '&amp;elementname=' . $this->getElement()->id;
     $url .= '&amp;userid=' . $user->get('id');
     $url .= '&amp;nonajax=1';
     $row_id = isset($thisRow->__pk_val) ? $thisRow->__pk_val : $thisRow->id;
     $ids = JArrayHelper::getColumn($this->getListModel()->getData(), '__pk_val');
     $canRate = $this->canRate($row_id, $ids);
     for ($i = 0; $i < count($data); $i++) {
         $avg = $this->_renderListData($data[$i], $thisRow);
         if (!$canRate) {
             $atpl = '';
             $a2 = '';
         } else {
             $atpl = "<a href=\"{$url}&amp;rating={r}\">";
             $a2 = "</a>";
         }
         $str = array();
         $str[] = '<div style="width:101px">';
         for ($s = 0; $s < $avg; $s++) {
             $r = $s + 1;
             $a = str_replace('{r}', $r, $atpl);
             $str[] = $a . '<img src="' . $imagepath . 'star_in' . $ext . '" style="padding-left:1px;" alt="' . $r . '" class="starRating rate_' . $r . '"/>' . $a2;
         }
         for ($s = $avg; $s < 5; $s++) {
             $r = $s + 1;
             $a = str_replace('{r}', $r, $atpl);
             $str[] = $a . '<img src="' . $imagepath . 'star_out' . $ext . '" style="padding-left:1px;" alt="' . $r . '" class="starRating rate_' . $r . '"/>' . $a2;
         }
         if ($params->get('rating-mode') != 'creator-rating') {
             $str[] = '<div class="ratingMessage">' . $avg . '</div>';
         }
         $str[] = '</div>';
         $data[$i] = implode("\n", $str);
     }
     $data = json_encode($data);
     return parent::renderListData($data, $thisRow);
 }
开发者ID:rogeriocc,项目名称:fabrik,代码行数:56,代码来源:rating.php

示例6: renderListData

 /**
  * shows the data formatted for the table view
  * @param string data
  * @param object all the data in the tables current row
  * @return string formatted value
  */
 function renderListData($data, $oAllRowsData)
 {
     $user =& JFactory::getUser();
     $params =& $this->getParams();
     $ext = $params->get('rating-pngorgif', '.png');
     $imagepath = JUri::root() . '/plugins/fabrik_element/rating/images/';
     $data = FabrikWorker::JSONtoData($data, true);
     $url = COM_FABRIK_LIVESITE . 'index.php?option=com_fabrik&amp;format=raw&amp;view=plugin&amp;task=pluginAjax&amp;g=element&amp;plugin=rating&amp;method=ajax_rate&amp;element_id=' . $this->getElement()->id;
     FabrikHelperHTML::addPath(JPATH_SITE . DS . 'plugins/fabrik_element/rating/images/', 'image', 'list', false);
     $insrc = FabrikHelperHTML::image("star_in{$ext}", 'list', @$this->tmpl, '', true);
     $outsrc = FabrikHelperHTML::image("star_out{$ext}", 'list', @$this->tmpl, '', true);
     $url .= '&amp;row_id=' . $oAllRowsData->__pk_val;
     $url .= '&amp;elementname=' . $this->getElement()->id;
     $url .= '&amp;userid=' . $user->get('id');
     $url .= '&amp;nonajax=1';
     $row_id = isset($oAllRowsData->__pk_val) ? $oAllRowsData->__pk_val : $oAllRowsData->id;
     $ids = JArrayHelper::getColumn($this->getListModel()->getData(), '__pk_val');
     $canRate = $this->canRate($row_id, $ids);
     for ($i = 0; $i < count($data); $i++) {
         $avg = $this->_renderListData($data[$i], $oAllRowsData);
         if (!$canRate) {
             $atpl = '';
             $a2 = '';
         } else {
             $atpl = "<a href=\"{$url}&amp;rating={r}\">";
             $a2 = "</a>";
         }
         $str = '<div style="width:100px">';
         for ($s = 0; $s < $avg; $s++) {
             $r = $s + 1;
             $a = str_replace('{r}', $r, $atpl);
             $str .= "{$a}<img src=\"{$imagepath}" . "star_in{$ext}\" style=\"padding-left:1px;\" alt=\"{$r}\" class=\"starRating rate_{$r}\"/>{$a2}";
         }
         for ($s = $avg; $s < 5; $s++) {
             $r = $s + 1;
             $a = str_replace('{r}', $r, $atpl);
             $str .= "{$a}<img src=\"{$imagepath}" . "star_out{$ext}\" style=\"padding-left:1px;\" alt=\"{$r}\" class=\"starRating rate_{$r}\"/>{$a2}";
         }
         if ($params->get('rating-mode') != 'creator-rating') {
             $str .= "<div class=\"ratingMessage\">{$avg}</div>";
         }
         $str .= '</div>';
         $data[$i] = $str;
     }
     //$data = implode(GROUPSPLITTER, $data);
     $data = json_encode($data);
     return parent::renderListData($data, $oAllRowsData);
 }
开发者ID:juliano-hallac,项目名称:fabrik,代码行数:54,代码来源:rating.php

示例7: renderListData

	/**
	 * shows the data formatted for the table view
	 * @param string data
	 * @param object all the data in the tables current row
	 * @return string formatted value
	 */

	function renderListData($data, $oAllRowsData)
	{
		$params = $this->getParams();
		$meta = array();
		$config = JFactory::getConfig();
		$ex = $_SERVER['SERVER_PORT'] == 80 ? 'http://' : 'https://';
		// $$$ rob no need to get other meta data as we are linking to the details which contains full meta info on what it is
		// you are liking
		$meta['og:url'] = $ex.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
		$meta['og:site_name'] = $config->getValue('sitename');
		$meta['fb:admins'] = $params->get('fblike_opengraph_applicationid');
		$str = FabrikHelperHTML::facebookGraphAPI($params->get('opengraph_applicationid'), $params->get('fblike_locale', 'en_US'), $meta);
		//in table view we like the detailed record not the table view itself
		$url = $this->getListModel()->linkHref($this, $oAllRowsData);
		return $str.$this->_render($url);
		return parent::renderListData($data, $oAllRowsData);
	}
开发者ID:Jobar87,项目名称:fabrik,代码行数:24,代码来源:fblike.php

示例8: renderListData

	/**
	 * shows the data formatted for the table view
	 * @param string data
	 * @param object all the data in the tables current row
	 * @return string formatted value
	 */

	function renderListData($data, $oAllRowsData)
	{
		$listModel = $this->getlistModel();
		$params = $this->getParams();
		$target = $params->get('link_target', '');
		$smart_link = $params->get('link_smart_link', false);
		if ($listModel->getOutPutFormat() != 'rss' && ($smart_link || $target == 'mediabox')) {
			FabrikHelperHTML::slimbox();
		}
		//$data = explode(GROUPSPLITTER, $data);
		$data = FabrikWorker::JSONtoData($data, true);
		for ($i=0; $i < count($data); $i++) {
			$data[$i] = $this->_renderListData($data[$i], $oAllRowsData);
		}
		//$data = implode(GROUPSPLITTER, $data);
		$data = json_encode($data);
		return parent::renderListData($data, $oAllRowsData);
	}
开发者ID:Jobar87,项目名称:fabrik,代码行数:25,代码来源:link.php

示例9: renderListData

	/**
	 * shows the data formatted for the table view
	 * @param string data (should be in mySQL format already)
	 * @param string element name
	 * @param object all the data in the tables current row
	 * @return string formatted value
	 */

	function renderListData($data, $oAllRowsData)
	{
		//@TODO: deal with time options (currently can be defined in date_table_format param).

		$config = JFactory::getConfig();
		$tzoffset = new DateTimeZone($config->get('offset'));

		$aNullDates = $this->getNullDates();
		$params = $this->getParams();
		$store_as_local = (int)$params->get('date_store_as_local', 0);

		$groupModel = $this->getGroup();
		$data = FabrikWorker::JSONtoData($data, true);

		$f = $params->get('date_table_format', '%Y-%m-%d');

		if ($f == 'Y-m-d') {
			$f = '%Y-%m-%d';
		}
		$format = array();
		foreach ($data as $d) {
			if (!in_array($d, $aNullDates)) {
				$date = JFactory::getDate($d);
				//$$$ rob - if not time selector then the date gets stored as 2009-11-13 00:00:00
				//if we have a -1 timezone then date gets set to 2009-11-12 23:00:00
				//then shown as 2009-11-12 which is wrong
				if ($params->get('date_showtime') && !$store_as_local) {
					$date->setTimeZone($tzoffset);
				}
				if ($f == '{age}') {
					$format[] = date('Y') - $date->toFormat('%Y', true);
				} else {
					$format[] = $date->toFormat($f, true);
				}
			} else {
				$format[] = '';
			}
		}
		$data = json_encode($format);
		return parent::renderListData($data, $oAllRowsData);
	}
开发者ID:Jobar87,项目名称:fabrik,代码行数:49,代码来源:date.php

示例10: renderListData

	/**
	 * shows the data formatted for the table view
	 * @param string data
	 * @param object all the data in the tables current row
	 * @return string formatted value
	 */

	function renderListData($data, $oAllRowsData)
	{

		$params = $this->getParams();
		$imagepath = COM_FABRIK_LIVESITE.'/plugins/fabrik_element/thumbs/images/';
		//$data = explode(GROUPSPLITTER, $data);
		$data = FabrikWorker::JSONtoData($data, true);
		$listid = $this->getlistModel()->getTable()->id;
		$formid = $this->getlistModel()->getTable()->form_id;
		$row_id = $oAllRowsData->__pk_val;
		$str = '';
		for ($i=0; $i <count($data); $i++) {
			JRequest::setVar('rowid', $row_id);
			$myThumb = $this->_getMyThumb($listid, $formid, $row_id);
			$imagefileup = 'thumb_up_out.gif';
			$imagefiledown = 'thumb_down_out.gif';
			if ($myThumb == 'up') {
				$imagefileup = 'thumb_up_in.gif';
				$imagefiledown = 'thumb_down_out.gif';
			}
			else if ($myThumb == 'down') {
				$imagefileup = 'thumb_up_out.gif';
				$imagefiledown = 'thumb_down_in.gif';
			}
			$count = $this->_renderListData($data[$i], $oAllRowsData);
			//$count = explode(GROUPSPLITTER2, $count);
			$count = FabrikWorker::JSONtoData($count, true);
			$countUp = $count[0];
			$countDown = $count[1];
			$countDiff = $countUp - $countDown;
			$str .= "<span style='color:#32d723;' id='count_thumbup$row_id'>$countUp</span><img src='$imagepath"."$imagefileup' style='padding:0px 5px 0 1px;' alt='UP' class='thumbup' id='thumbup$row_id'/>";
			$str .= "<span style='color:#f82516;' id='count_thumbdown$row_id'>$countDown</span><img src='$imagepath"."$imagefiledown' style='padding:0px 5px 0 1px;' alt='DOWN' class='thumbdown' id='thumbdown$row_id'/>";
			//$str .= "</div>";
			$data[$i] = $str;
		}
		//$data = implode(GROUPSPLITTER, $data);
		$data = json_encode($data);

		return parent::renderListData($data, $oAllRowsData);
	}
开发者ID:Jobar87,项目名称:fabrik,代码行数:47,代码来源:thumbs.php

示例11: renderListData

 /**
  * shows the data formatted for the table view
  * @param string data
  * @param object all the data in the tables current row
  * @return string formatted value
  */
 function renderListData($data, $oAllRowsData)
 {
     $listModel = $this->getlistModel();
     $params = $this->getParams();
     $target = $params->get('link_target', '');
     $smart_link = $params->get('link_smart_link', false);
     if ($listModel->getOutPutFormat() != 'rss' && ($smart_link || $target == 'mediabox')) {
         FabrikHelperHTML::slimbox();
     }
     $data = FabrikWorker::JSONtoData($data, true);
     if (!empty($data)) {
         if (array_key_exists('label', $data)) {
             $data = (array) $this->_renderListData($data, $oAllRowsData);
         } else {
             for ($i = 0; $i < count($data); $i++) {
                 $data[$i] = JArrayHelper::fromObject($data[$i]);
                 $data[$i] = $this->_renderListData($data[$i], $oAllRowsData);
             }
         }
     }
     $data = json_encode($data);
     return parent::renderListData($data, $oAllRowsData);
 }
开发者ID:rhotog,项目名称:fabrik,代码行数:29,代码来源:link.php

示例12: renderListData

 /**
  * shows the data formatted for the table view
  * @param string data (should be in mySQL format already)
  * @param string element name
  * @param object all the data in the tables current row
  * @return string formatted value
  */
 function renderListData($data, $oAllRowsData)
 {
     if ($data == '') {
         return '';
     }
     //@TODO: deal with time options (currently can be defined in date_table_format param).
     $timeZone = new DateTimeZone(JFactory::getConfig()->get('offset'));
     $aNullDates = $this->getNullDates();
     $params = $this->getParams();
     $store_as_local = (int) $params->get('date_store_as_local', 0);
     $groupModel = $this->getGroup();
     $data = FabrikWorker::JSONtoData($data, true);
     $f = $params->get('date_table_format', '%Y-%m-%d');
     if ($f == 'Y-m-d') {
         $f = '%Y-%m-%d';
     }
     $format = array();
     foreach ($data as $d) {
         if (!in_array($d, $aNullDates)) {
             $date = JFactory::getDate($d);
             //$$$ rob - dates always stored with time (and hence timezone offset) so, unless stored_as_local
             // we must set the timezone
             if (!$store_as_local) {
                 $date->setTimeZone($timeZone);
             }
             if ($f == '{age}') {
                 $format[] = date('Y') - $date->toFormat('%Y', true);
             } else {
                 $format[] = $date->toFormat($f, true);
             }
         } else {
             $format[] = '';
         }
     }
     $data = json_encode($format);
     return parent::renderListData($data, $oAllRowsData);
 }
开发者ID:rhotog,项目名称:fabrik,代码行数:44,代码来源:date.php

示例13: renderListData

 function renderListData($data, $oAllRowsData)
 {
     $db = FabrikWorker::getDbo();
     $aNullDates = array('0000-00-000000-00-00', '0000-00-00 00:00:00', '0000-00-00', '', $db->getNullDate());
     $params =& $this->getParams();
     $monthlabels = array(JText::_('January'), JText::_('February'), JText::_('March'), JText::_('April'), JText::_('May'), JText::_('June'), JText::_('July'), JText::_('August'), JText::_('September'), JText::_('October'), JText::_('November'), JText::_('December'));
     $monthnumbers = array('01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12');
     $daysys = array('01', '02', '03', '04', '05', '06', '07', '08', '09');
     $daysimple = array('1', '2', '3', '4', '5', '6', '7', '8', '9');
     $jubileum = array('0', '25', '75');
     $groupModel =& $this->getGroup();
     $data = $groupModel->canRepeat() ? json_decode($data) : array($data);
     $data = (array) $data;
     $ft = $params->get('table_day_format', 'd.m.Y');
     $f = $params->get('birthday_format', '%Y-%m-%d');
     $fta = $params->get('table_age_format', 'no');
     $format = array();
     foreach ($data as $d) {
         if (!in_array($d, $aNullDates)) {
             //$date 	= JFactory::getDate($d);
             list($year, $month, $day) = explode('-', $d);
             $daydisp = str_replace($daysys, $daysimple, $day);
             $monthdisp = str_replace($monthnumbers, $monthlabels, $month);
             $nextyear = date('Y') + 1;
             $lastyear = date('Y') - 1;
             $thisyear = date('Y');
             $dmy = $day . '.' . $month . '.' . $year;
             $mdy = $month . '/' . $day . '/' . $year;
             $dmonthyear = $daydisp . '. ' . $monthdisp . ' ' . $year;
             $monthdyear = $monthdisp . ' ' . $daydisp . ', ' . $year;
             if ($ft == "d.m.Y") {
                 $datedisp = $dmy;
             } else {
                 if ($ft == "m.d.Y") {
                     $datedisp = $mdy;
                 }
                 if ($ft == "D. month YYYY") {
                     $datedisp = $dmonthyear;
                 }
                 if ($ft == "Month d, YYYY") {
                     $datedisp = $monthdyear;
                 }
             }
             if ($fta == 'no') {
                 $format[] = $datedisp;
             } else {
                 if (date('m-d') == $month . '-' . $day) {
                     if ($fta == '{age}') {
                         $format[] = "<font color = '#DD0000'><b>" . ($thisyear - $year) . "</b></font>";
                     } else {
                         if ($fta == '{age} date') {
                             $format[] = "<font color = '#DD0000'><b>" . $datedisp . " (" . ($thisyear - $year) . ")</b></font>";
                         }
                         if ($fta == '{age} this') {
                             $format[] = "<font color = '#DD0000'><b>" . ($thisyear - $year) . " (" . $datedisp . ")</b></font>";
                         }
                         if ($fta == '{age} next') {
                             $format[] = "<font color = '#DD0000'><b>" . ($nextyear - $year) . " (" . $datedisp . ")</b></font>";
                         }
                     }
                 } else {
                     if ($fta == '{age} date') {
                         if (date('m-d') > $month . '-' . $day) {
                             $format[] = $datedisp . ' (' . ($thisyear - $year) . ')';
                         } else {
                             $format[] = $datedisp . ' (' . ($lastyear - $year) . ')';
                         }
                     } else {
                         if ($fta == '{age}') {
                             if (date('m-d') > $month . '-' . $day) {
                                 $format[] = $thisyear - $year;
                             } else {
                                 $format[] = $lastyear - $year;
                             }
                         } else {
                             if ($fta == '{age} this') {
                                 if (in_array(substr($thisyear - $year, -1), $jubileum) || in_array(substr($thisyear - $year, -2), $jubileum)) {
                                     $format[] = '<b>' . ($thisyear - $year) . ' (' . $datedisp . ')</b>';
                                 } else {
                                     $format[] = $thisyear - $year . ' (' . $datedisp . ')';
                                 }
                             }
                             if ($fta == '{age} next') {
                                 if (in_array(substr($nextyear - $year, -1), $jubileum) || in_array(substr($nextyear - $year, -2), $jubileum)) {
                                     $format[] = '<b>' . ($nextyear - $year) . ' (' . $datedisp . ')</b>';
                                 } else {
                                     $format[] = $nextyear - $year . ' (' . $datedisp . ')';
                                 }
                             }
                         }
                     }
                 }
             }
         } else {
             $format[] = '';
         }
     }
     $data = json_encode($format);
     return parent::renderListData($data, $oAllRowsData);
 }
开发者ID:juliano-hallac,项目名称:fabrik,代码行数:100,代码来源:birthday.php

示例14: renderListData

 /**
  * shows the data formatted for the table view
  * @param string data
  * @param object all the data in the tables current row
  * @return string formatted value
  */
 function renderListData($data, $oAllRowsData)
 {
     $data = FabrikWorker::JSONtoData($data, true);
     $params = $this->getParams();
     $pathset = false;
     foreach ($data as $d) {
         if (strstr($d, '/')) {
             $pathset = true;
             break;
         }
     }
     if ($data === '' || empty($data) || !$pathset) {
         //no data so default to image (or simple image name stored).
         $iPath = $params->get('imagepath');
         if (!strstr($iPath, '/')) {
             //single file specified so find it in tmpl folder
             $data = (array) FabrikHelperHTML::image($iPath, 'list', @$this->tmpl, array(), true);
         } else {
             $data = (array) $iPath;
         }
     }
     $selectImage_root_folder = $params->get('selectImage_root_folder', '');
     // $$$ hugh - tidy up a bit so we don't have so many ///'s in the URL's
     $selectImage_root_folder = ltrim($selectImage_root_folder, '/');
     $selectImage_root_folder = rtrim($selectImage_root_folder, '/');
     $showImage = $params->get('show_image_in_table', 0);
     $linkURL = $params->get('link_url', '');
     if (empty($data) || $data[0] == '') {
         //$data[] = $params->get('imagefile');
         $data[] = $params->get('imagepath');
     }
     for ($i = 0; $i < count($data); $i++) {
         if ($showImage) {
             // $$$ rob 30/06/2011 - say if we import via csv a url to the image check that and use that rather than the relative path
             $src = substr($data[$i], 0, 4) == 'http' ? $data[$i] : COM_FABRIK_LIVESITE . $selectImage_root_folder . '/' . $data[$i];
             $data[$i] = '<img src="' . $src . '" alt="' . $data[$i] . '" />';
         }
         if ($linkURL) {
             $data[$i] = '<a href="' . $linkURL . '" target="_blank">' . $data[$i] . '</a>';
         }
     }
     $data = json_encode($data);
     return parent::renderListData($data, $oAllRowsData);
 }
开发者ID:rhotog,项目名称:fabrik,代码行数:50,代码来源:image.php

示例15: renderListData

	/**
	 * shows the data formatted for the table view
	 * @param string data
	 * @param object all the data in the tables current row
	 * @return string formatted value
	 */

	function renderListData($data, $oAllRowsData)
	{
		$params = $this->getParams();
		$data = $this->format($data);
		return parent::renderListData($data, $oAllRowsData);
	}
开发者ID:Jobar87,项目名称:fabrik,代码行数:13,代码来源:twitter_profile.php


注:本文中的plgFabrik_Element::renderListData方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。