Bonjour à tous,
je crée un site pour une agence immobilière avec le composant JUX REAL ESTATE tout se deroulait bien en loal mais depuis le transfert en ligne le site ne s'affiche plus et voici le message d'erreur "
Parse error: syntax error, unexpected 'public' (T_PUBLIC) in /htdocs/immobilier/components/com_jux_real_estate/libraries/factory.php on line 15"
voici le code de page
ça fait des jours que je galère svp aidez moi.
cordialement,
je crée un site pour une agence immobilière avec le composant JUX REAL ESTATE tout se deroulait bien en loal mais depuis le transfert en ligne le site ne s'affiche plus et voici le message d'erreur "
Parse error: syntax error, unexpected 'public' (T_PUBLIC) in /htdocs/immobilier/components/com_jux_real_estate/libraries/factory.php on line 15"
voici le code de page
Code PHP:
<?php /** * @version $Id$ * @author JoomlaUX * @package Joomla * @subpackage com_jux_real_estate * * @copyright Copyright (C) 2012 - 2015 by JoomlaUX. All rights reserved. * @license http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL, See LICENSE.txt *///
// no direct access
defined('_JEXEC') or die('Restricted access');
class JUX_Real_EstateFactory { /** * Get model for the component. */
public static function getModel($type, $prefix = 'JUX_Real_EstateModel', $config = array()) { static $instance; if (!isset($instance[$type]) || !is_object($instance[$type])) { $instance[$type] = JModelLegacy::getInstance($type, $prefix, $config); } return $instance[$type]; } /** * Get component config. */
public static function getConfiguration() { $config_model = JUX_Real_EstateFactory::getModel('configuration'); $config = $config_model->getData(); return $config; } public static function getFacebookButton($link) { return '<div style="float:left; margin: 0 0 0 10px;width: 80px; height:30px !important;">
<iframe src="//www.facebook.com/plugins/like.php?href=' . $link . ';width=450&height=21&colorscheme=light&layout=button_count&action=like&show_faces=true&send=false" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:65px;" allowTransparency="true"></iframe> </div>'; }
public static function getGoogleButton($title, $link) { return '<div style="float:left; margin:0 0 0 10px;width:60px !important;"> <script type="text/javascript" src="https://apis.google.com/js/plusone.js">{lang: ' . $link . '}</script><g:plusone size="medium"></g:plusone> </div>'; }
public static function getTwitterButton($title, $link) { $document = JFactory::getDocument(); $js_twitter = "http://platform.twitter.com/widgets.js"; $document->addScript($js_twitter); $img_url = JUri::base() . "media/zj_fileseller/socialbtn/twitter.png"; return '<div style="float:left; margin: 0 0 0 10px;width: 150px !important;"><a href="http://twitter.com/share" class="twitter-share-button" style="width: 96px;" data-url="' . $link . '" data-count="Horizontal Count" >Twitter</a> </div>'; }
public static function getFacebookCMT($link) { return '<div class="fb-comments" data-href="' . $link . '"></div>'; } public static function renderFacebookCmt() { $document = JFactory::getDocument(); $link = JURI::getInstance(); $link = $link->toString(); $title = $document->getTitle(); $title = rawurlencode($title); return JUX_Real_EstateFactory::getFacebookCMT($link); }
public static function renderSocialButtons() { $document = JFactory::getDocument(); $link = JURI::getInstance(); $link = $link->toString(); $title = $document->getTitle(); $title = rawurlencode($title); $link = rawurlencode($link); return JUX_Real_EstateFactory::getGoogleButton($title, $link) . JUX_Real_EstateFactory::getFacebookButton($link) . JUX_Real_EstateFactory::getTwitterButton($title, $link) ; }
public static function renderMetaData($item) { $document = JFactory::getDocument(); // set meta keyworks if ($item->meta_keywords) { $document->setMetaData('keywords', $item->meta_keywords); } // set meta description if ($item->meta_desc) { $document->setDescription($item->meta_desc); } //Set Facebook Metadata $document->addCustomTag('<meta property="og:title" content="' . $item->title . '" />'); $meta_desc = $item->meta_desc; if (!$meta_desc) { $meta_desc = strip_tags($item->description); } $document->addCustomTag('<meta property="og:description" content="' . $meta_desc . '" />'); $gconfig = JFactory::getConfig(); $document->addCustomTag('<meta property="og:site_name" content="' . $gconfig->get('sitename') . '" />'); }
public static function getPayments($name = 'payment_method') { $name = ($name != '') ? trim($name) : JRequest::getVar('payment_method', ''); $jspayments = JPluginHelper::getPlugin('jspayment'); $dispatcher = &JDispatcher::getInstance(); JPluginHelper::importPlugin('jspayment'); $out = ''; if (count($jspayments)) { $data = $dispatcher->trigger('onPaymentInfo');
for ($i = 0, $n = count($data); $i < $n; $i++) { $row = $data[$i]; $checked = '';
if (!$i) { $checked = ' checked'; } $out .= '<input type="radio" id="' . $row['code'] . '_payment" name="' . $name . '" value="' . $row['code'] . '" ' . $checked . '>' . ' <label for="' . $row['code'] . '_payment"><span>' . $row['name'];
if ($row['image'] != '') { $out .= '<span><img src="' . $row['image'] . '" width="149" height="100" align="middle"></span>';} $out .= '</span></label>'; } }
return $out; } // clean text
public static function cleanText($text, $limit) { $text = JFilterOutput::cleanText($text); $text = explode(' ', $text); $etc = (count($text) > $limit) ? '...' : ':'; $text = implode(' ', array_slice($text, 0, $limit)) . $etc; return $text; }
public static function countNumberRealty($id) { $db = JFactory::getDbo(); $query = $db->getQuery(true); $query->select('count(r.id) as number_realty')->from('#__re_realties as r')->where('agent_id = ' . (int) $id)->where('r.published = 1 AND r.approved = 1'); $db->setQuery($query); $result = $db->loadObject();
return $result; }
public static function getAgentInfor($realty_id = null) { $db = JFactory::getDbo(); $query = $db->getQuery(true); $query->select('a.* , CONCAT(first_name, " ", last_name) AS agent_name')->from('#__re_agents AS a')->leftJoin('#__re_realties AS r ON r.agent_id = a.id')->where('r.id = ' . (int) $realty_id)->where('a.id = r.agent_id')->where('a.published = 1')->group('a.id'); $db->setQuery($query); $result = $db->loadObject();
return $result; }}
cordialement,
Commentaire