Новости Joomla

Вышел компонент J SMS Registration v.2.3.0

👩‍💻 Вышел компонент J SMS Registration v.2.3.0.Релиз связан с исправлениями, вызванными переходом социальной сети VK на домен VK.RU. Несмотря на то, что поддержка Joomla 3 прекращена, исправления вышли и для этой версии. Как итог: компонент обновился для Joomla 3 и Joomla 5. Номер новой версии: 2.3.0.Компонент распространяется на коммерческой основе.Разработчик - участник нашего сообщества Владимир Егоров (@sitogon).- Новость- Страница расширения@joomlafeed#joomla #расширения

Joomla REST API без прав суперадминистратора. RBAC в Joomla

Joomla REST API без прав суперадминистратора. RBAC в Joomla

👩‍💻 Joomla REST API без прав суперадминистратора. RBAC в Joomla.На канале известного французского разработчика и специалиста по Joomla REST API Alexandre ELISÉ вышло новое видео.RBAC (Role-Based Access Control) - это управление доступом на основе ролей, метод управления доступом к ресурсам, основанный на назначении ролей пользователям. Вместо назначения прав каждому пользователю точечно права доступа группируются по ролям, а пользователи получают доступ к ресурсам уже в зависимости от своей роли. В контексте Joomla и REST API он может даже мешать работе: без авторизованного пользователя вы не можете даже показать контент. В видео показано как решить данную проблему. Создаётся "технический пользователь", которому разрешается просматривать контент, но не разрешено создавать, редактировать, удалять и т.д. И все запросы к REST API идут с использованием его токена. [fr-FR] Services Web API Joomla SANS être Super Admin RBAC natif avec Joomla@joomlafeed #joomla #разработка #rest

InterLinked - плагин автоматической внутренней перелинковки для Joomla

InterLinked - плагин автоматической внутренней перелинковки для Joomla

👩‍💻 InterLinked - плагин автоматической внутренней перелинковки для Joomla.Несвязанные статьи - это молчаливый убийца привлекательности вашего сайта на Joomla, который заставляет читателей сворачивать работу и подрывает эффективность вашего SEO. Content - InterLinked - это бесплатный, проверенный в боях плагин, который кладет конец этой бессмыслице, автоматически генерируя ссылки на основе ключевых слов между статьями на вашем сайте Joomla 5. Он создает сеть связей, используя ключевые слова статей (metakey) и ассоциации категорий, с настраиваемыми всплывающими подсказками, целевыми объектами ссылок и классами CSS, сохраняя при этом существующие ссылки и повышая производительность за счет кэширования. Кроме того, ссылки со временем меняются по мере того, как в новых статьях используются ключевые слова, что делает ваш контент свежим и актуальным.Возможности.- автоматическая перелинковка на основе значения meta-keywords материалов- встроенная поддержка материалов Joomla- пользовательские ассоциации категорий для создания ссылок (например "Блог" к "Учбеникам")- показ всплывающих подсказок к автоматическим ссылкам (опционально)- настраиваемый атрибут target для ссылок.- указание CSS класса для стилизации ссылок- кэширование совпадений ключевых слов и их ассоциаций- учёт существующих тегов <a> во избежание дублирующих ссылок- автоматическое добавление новых ссылок при появлении новых ассоциаций- веб-доступность: ARIA для ссылок с target="_blank".Плагин бесплатный. Заявлена поддержка Joomla 4 и Joomla 5.Joomla Extensions DirectoryСтраница расширенияСкачать@joomlafeed#joomla #расширения #seo

0 Пользователей и 1 Гость просматривают эту тему.
  • 2 Ответов
  • 7532 Просмотров
*

squid

  • Захожу иногда
  • 85
  • 4 / 0
  • :P
JomSocial Profile Designer + AUP
« : 14.02.2011, 21:03:59 »
Подскажите пожалуйста куда мне нужно вставить код

Код: php
$api_AUP = JPATH_SITE.DS.'components'.DS.'com_alphauserpoints'.DS.'helper.php';
if ( file_exists($api_AUP))
{
    require_once ($api_AUP);
    AlphaUserPointsHelper::newpoints( 'function_name' );
}

чтобы при нажатии кнопки сохранить в плагине "Jom Social Profile Designer" пользователю добавлялись баллы в AUP?

profdesigner.php
Код: php
<?php
/**
* Profile Designer plugin for JomSocial Component
* @version $Id: profdesigner.php 2010-05-19 17:30:15
* @package Profile Designer plugin
* @subpackage profdesigner.php
* @author JoomPlace Team
* @copyright (C) JoomPlace, www.joomplace.com
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU/GPL version 2
*/
 
defined('_JEXEC') or die('Restricted access');

require_once( JPATH_BASE . DS . 'components' . DS . 'com_community' . DS . 'libraries' . DS . 'core.php');

if (!class_exists('plgCommunityProfdesigner')) {
class plgCommunityProfdesigner extends CApplications {
var $_ajax = false;

    function plgCommunityProfdesigner(&$subject, $config) {
parent::__construct($subject, $config);
JPlugin::loadLanguage('plg_profdesigner', JPATH_ADMINISTRATOR);
JHTML::_('behavior.mootools');
    }

function onSystemStart() {
// are we uploading an image?
if (JRequest::getBool('brkupload')) {
$this->_upload();
}
// add assets
if (JRequest::getCmd('view') == 'profile' && !JRequest::getCmd('task') && (JFactory::getUser()->id == JRequest::getInt('userid') || !JRequest::getInt('userid'))) {
CFactory::getToolbar()->addItem('PROFILE', 'BACKGROUND_EDIT', JText::_('Change background'), 'Profdesigner.cAppsBackground(\''.JString::str_ireplace("'", "\\'", JText::_('Change background')).'\');', '', true);
CFactory::getToolbar()->addItem('PROFILE', 'COLOR_EDIT', JText::_('Change font color'), 'Profdesigner.cAppsBackground2(\''.JString::str_ireplace("'", "\\'", JText::_('Change font color')).'\');', '', true);
JFactory::getDocument()->addScript(JUri::base(). 'plugins/community/profdesigner/script.js?v3');
}

if (JRequest::getCmd('view') == 'profile' && !JRequest::getCmd('task')) {
$data = $this->_getData();
if (isset($data['color'])) {
// color
$css = (strlen($data['color']))? '#'.$data['color'].' ' : '';
// attachment
$css .= $data['attach'].' ';
// images
switch($data['type']) {
case 'upload':
$cuser =& CFactory::getActiveProfile();
$css .= 'url("'.substr(JURI::base(), 0, -1).$this->params->get('upload_path').'/'.$cuser->id.'/'.$data['src'].'")   ';
break;

case 'gallery':
$css .= 'url("'.substr(JURI::base(), 0, -1).$this->params->get('gallery_path').'/'.$data['src'].'")   ';
break;

case 'external':
$css .= 'url('.$tmp->src.'")   ';
break;

case '':
break;
}
if ($css != ' ') {
JFactory::getDocument()->addStyleDeclaration('#'.$this->params->get('div').' {background:'.$css.';} div#maincontentTopBG {height:95px;} #maincontentBottomBG {display:none;}');
}
}
if (isset($data['text_color'])) {
$css = (strlen($data['text_color']))? '#'.$data['text_color'].' ' : '';
JFactory::getDocument()->addStyleDeclaration('#'.$this->params->get('div_text').' {color:'.$css.';}');
}
}
}

function ajaxShowBackgrounds(&$response) {
$data = $this->_getData();

$user =& JFactory::getUser();
if (!$user->id) die;

// image type
$types = array();
$types[] = JHTML::_('select.option', '', JText::_('No image'));
$types[] = JHTML::_('select.option', 'gallery', JText::_('Gallery image'));
$types[] = JHTML::_('select.option', 'upload', JText::_('Custom image'));
$imagesTypes = JHTML::_('select.genericlist', $types, 'type', ' class="inputbox" onchange="Profdesigner.changeImageType(this);"', 'value', 'text', @$data['type']);

// gallery images
$images = array();
jimport( 'joomla.filesystem.folder' );
jimport( 'joomla.filesystem.file' );
$files = JFolder::files(JPATH_SITE . $this->params->get('gallery_path'), '(\.jpg)|(\.gif)|(\.png)$', false);

$images[] = JHTML::_('select.option', '', '');
if (isset($files[0])) {
foreach($files as $file) {
$tmp = pathinfo($file);
$images[] = JHTML::_('select.option', $file, ucwords(str_replace('_', ' ', $tmp['filename'])));
}
}
$galleryImages = JHTML::_('select.genericlist', $images, 'gallery', ' class="inputbox" style="width:auto" onchange="Profdesigner.applyImageType();"', 'value', 'text', @$data['src']);

// repeat
if (!@$data['repeat']) $data['repeat'] = 'repeat';
$types = array();
$types[] = JHTML::_('select.option', 'repeat', JText::_('Cascade'));
$types[] = JHTML::_('select.option', 'no-repeat', JText::_('No repeat'));
$types[] = JHTML::_('select.option', 'repeat-x', JText::_('Repeat horizontally'));
$types[] = JHTML::_('select.option', 'repeat-y', JText::_('Repeat vertically'));
$repeat = JHTML::_('select.genericlist', $types, 'repeat', ' class="inputbox" onchange="Profdesigner.applyImageAttr();"', 'value', 'text', $data['repeat']);

// vertical position
if (!@$data['vpos']) $data['vpos'] = 'center';
$types = array();
$types[] = JHTML::_('select.option', 'center', JText::_('Center'));
$types[] = JHTML::_('select.option', 'top', JText::_('Top'));
$types[] = JHTML::_('select.option', 'bottom', JText::_('Bottom'));
$vpos = JHTML::_('select.genericlist', $types, 'vpos', ' class="inputbox" onchange="Profdesigner.applyImageAttr();"', 'value', 'text', $data['vpos']);

// horizontal position
if (!@$data['hpos']) $data['hpos'] = 'center';
$types = array();
$types[] = JHTML::_('select.option', 'center', JText::_('Center'));
$types[] = JHTML::_('select.option', 'left', JText::_('Left'));
$types[] = JHTML::_('select.option', 'right', JText::_('Right'));
$hpos = JHTML::_('select.genericlist', $types, 'hpos', ' class="inputbox" onchange="Profdesigner.applyImageAttr();"', 'value', 'text', $data['hpos']);

// attachment
if (!@$data['attach']) $data['attach'] = 'scroll';
$types = array();
$types[] = JHTML::_('select.option', 'scroll', JText::_('Scroll'));
$types[] = JHTML::_('select.option', 'fixed', JText::_('Fixed'));
$attach = JHTML::_('select.genericlist', $types, 'attach', ' class="inputbox" onchange="Profdesigner.applyImageAttr();"', 'value', 'text', $data['attach']);

ob_start();
?>
<style type="text/css" media="all">
#backgroundForm {
font-size:12px;
}
#backgroundForm table {
border-spacing:none;
border-collapse:separate;
}
#backgroundForm td {
padding:3px;
}
#backgroundForm input.inputbox, #backgroundForm select.inputbox {
border:1px solid #CCCCCC;
margin:0;
padding:3px 5px;
font-size:12px;
}
</style>
<div style="overflow:hidden;">
<iframe id="brkFrame" name="brkFrame" src="" style="display:none"></iframe>
<div id="colorsTable"></div>
<form action="index.php?option=com_community&brkupload=1" id="backgroundForm" name="backgroundForm" enctype="multipart/form-data" target="brkFrame" method="post">
<input type="hidden" name="upload" value="<?php echo @$data['src'];?>" />
<table width="100%" cellpadding="3" cellspacing="0">
<tr valign="top"><td width="1%"><b><?php echo JText::_('Color');?>:</b></td>
<td><input type="text" name="color" value="<?php echo @$data['color'];?>" maxlength="6" class="inputbox" style="width:50px" />
&nbsp;<img src="<?php echo JUri::base();?>/plugins/community/profdesigner/color_wh.png" alt="<?php echo JText::_('Choose color');?>" border="0" align="absmiddle" onclick="Profdesigner.renderColorMap(this.alt);" style="cursor:pointer" />
</td>
</tr>
<tr valign="top"><td><b><?php echo JText::_('Image');?>:</b></td>
<td><?php echo $imagesTypes;?>
<br />
<div id="berkImgallery" style="display:<?php echo (@$data['type']=='gallery')? 'block' : 'none';?>">
<p><?php echo JText::_('Select gallery image');?>: <br /><?php echo $galleryImages;?></p>
</div>
<div id="berkImupload" style="display:<?php echo (@$data['type']=='upload')? 'block' : 'none';?>">
<p id="brkUpFile"><?php echo JText::sprintf('Upload new image (max size is %s)', ini_get('upload_max_filesize'));?>: <br />
<input type="file" class="inputbox" name="Filedata" style="width:210px" />&nbsp;
<input type="button" value="<?php echo JText::_('Upload');?>" class="button" onclick="Profdesigner.uploadImage();" />
</p>
<center id="brkUpWait" style="display:none"><img src="<?php echo JUri::base();?>components/com_community/assets/wait.gif" vspace="10"/></center>
</div>
</td>
</tr>
</table>

<div id="brkImAttrs" style="display:<?php echo (@$data['type'])? 'block' : 'none';?>">
<table width="100%" cellpadding="3" cellspacing="0">
<tr valign="top"><td width="110px"><b><?php echo JText::_('Repeat style');?>:</b></td>
<td><?php echo $repeat;?></td>
</tr>
<tr valign="top"><td><b><?php echo JText::_('Vertical position');?>:</b></td>
<td><?php echo $vpos;?></td>
</tr>
<tr valign="top"><td><b><?php echo JText::_('Horizontal position');?>:</b></td>
<td><?php echo $hpos;?></td>
</tr>
<tr valign="top"><td><b><?php echo JText::_('Scrolling');?>:</b></td>
<td><?php echo $attach;?></td>
</tr>
</table>
</div>
</form>
</div>

<?php
$content = ob_get_contents();
ob_end_clean();
$response->addAssign('cWindowContent' , 'innerHTML' , $content);

$response->addScriptCall('Profdesigner.gallery_path="'.substr(JURI::base(), 0, -1).$this->params->get('gallery_path').'";');
$response->addScriptCall('Profdesigner.upload_path="'.substr(JURI::base(), 0, -1).$this->params->get('upload_path').'/'.$user->id.'";');
$response->addScriptCall('Profdesigner.div="'.$this->params->get('div').'";');
$response->addScriptCall('Profdesigner.base="'.JURI::base().'";');

if (@$data['type']) {
$response->addScriptCall('Profdesigner.changeImageType($(\'backgroundForm\').type);');
}

$buttons = '<form id="brkColBut" style="display:none">';
$buttons .= '<input type="button" value="'.JText::_('Continue').'" class="button" name="Apply" onclick="Profdesigner.hideColorMap();" />';
$buttons .= '</form>';
$buttons .= '<form id="brkUsBut">';
$buttons .= '<input type="button" value="'.JText::_('Save Settings').'" class="button" name="Submit" onclick="Profdesigner.cAppsBackgroundSave();" />';
$buttons .= '&nbsp;';
$buttons .= '<input onclick="cWindowHide();return false;" type="button" value="'.JText::_('Cancel').'" class="button" />';
$buttons .= '</form>';

$response->addScriptCall('cWindowActions', $buttons);
return $response;
}

function ajaxShowBackgrounds2(&$response) {
$data = $this->_getData();

$user =& JFactory::getUser();
if (!$user->id) die;

ob_start();
?>
<style type="text/css" media="all">
#backgroundForm {
font-size:12px;
}
#backgroundForm table {
border-spacing:none;
border-collapse:separate;
}
#backgroundForm td {
padding:3px;
}
#backgroundForm input.inputbox, #backgroundForm select.inputbox {
border:1px solid #CCCCCC;
margin:0;
padding:3px 5px;
font-size:12px;
}
</style>
<div style="overflow:hidden;">
<iframe id="brkFrame" name="brkFrame" src="" style="display:none"></iframe>
<div id="colorsTable"></div>
<form action="index.php?option=com_community&brkupload=1" id="backgroundForm" name="backgroundForm" enctype="multipart/form-data" target="brkFrame" method="post">
<table width="100%" cellpadding="3" cellspacing="0">
<tr valign="top"><td width="1%"><b><?php echo JText::_('Color');?>:</b></td>
<td><input type="text" name="color" value="<?php echo @$data['text_color'];?>" maxlength="6" class="inputbox" style="width:50px" />
&nbsp;<img src="<?php echo JUri::base();?>/plugins/community/profdesigner/color_wh.png" alt="<?php echo JText::_('Choose color');?>" border="0" align="absmiddle" onclick="Profdesigner.renderColorMap(this.alt);" style="cursor:pointer" />
</td>
</tr>
</table>
</form>
</div>

<?php
$content = ob_get_contents();
ob_end_clean();
$response->addAssign('cWindowContent' , 'innerHTML' , $content);

$response->addScriptCall('Profdesigner.div="'.$this->params->get('div_text').'";');
$response->addScriptCall('Profdesigner.base="'.JURI::base().'";');

$buttons = '<form id="brkColBut" style="display:none">';
$buttons .= '<input type="button" value="'.JText::_('Continue').'" class="button" name="Apply" onclick="Profdesigner.hideColorMap();" />';
$buttons .= '</form>';
$buttons .= '<form id="brkUsBut">';
$buttons .= '<input type="button" value="'.JText::_('Save Settings').'" class="button" name="Submit" onclick="Profdesigner.cAppsBackgroundSave2();" />';
$buttons .= '&nbsp;';
$buttons .= '<input onclick="cWindowHide();return false;" type="button" value="'.JText::_('Cancel').'" class="button" />';
$buttons .= '</form>';

$response->addScriptCall('cWindowActions', $buttons);
return $response;
}


function ajaxSaveBackgrounds(&$response, $color='', $type='', $gallery='', $repeat='', $vpos='', $hpos='', $upload='', $attach='') {
$response->addAssign('cWindowContent' , 'innerHTML' , '');
$response->addScriptCall('cWindowHide();');

$user =& JFactory::getUser();
$data = $this->_getData();

// check values
if (!$user->id ||
!in_array($type, array('', 'gallery', 'upload')) ||
!in_array($repeat, array('repeat', 'repeat-x', 'repeat-y','no-repeat')) ||
!in_array($vpos, array('center', 'top', 'bottom')) ||
!in_array($hpos, array('center', 'left', 'right')) ||
!in_array($attach, array('scroll', 'fixed'))
) {
return $response;
}

$color = preg_replace('/[^0-9A-Fa-f]/', '', $color);

$db =& JFactory::getDBO();

$row = new stdClass;
$row->user_id = $user->id;
$row->color = $color;
$row->type = $type;
$row->repeat = $repeat;
$row->vpos = $vpos;
$row->hpos = $hpos;
$row->attach = $attach;
$row->text_color = @$data['text_color'];
$row->date = gmdate('Y-m-d H:i:s', time());

if ($type == 'gallery') {
$row->src = $gallery;
}
else if ($type == 'upload') {
$row->src = $upload;
}
else {
$row->src = '';
$row->repeat = '';
$row->vpos = '';
$row->hpos = '';
$row->attach = '';
}

// store new data to log
$db->insertObject('#__community_backgrounds_log', $row);

// save as current data
$fmtsql = 'REPLACE INTO '.$db->nameQuote('#__community_backgrounds').' (%s) VALUES (%s) ';
$fields = array();
foreach (get_object_vars($row) as $k => $v) {
$fields[] = $db->nameQuote($k);
$values[] = $db->isQuoted($k)? $db->Quote($v) : (int) $v;
}
$db->setQuery(sprintf($fmtsql, implode(',', $fields), implode(',', $values)));
$db->query();

// update user's session
$user->JSB_data = array(
'user_id' => $row->user_id,
'color' => $row->color,
'type' => $row->type,
'src' => $row->src,
'repeat' => $row->repeat,
'vpos' => $row->vpos,
'hpos' => $row->hpos,
'attach' => $row->attach,
'text_color' => $row->text_color,
'date' => $row->date
);
JFactory::getSession()->set('user', $user);

return $response;
}

function ajaxSaveBackgrounds2(&$response, $color='') {
$response->addAssign('cWindowContent' , 'innerHTML' , '');
$response->addScriptCall('cWindowHide();');

$user =& JFactory::getUser();
$data = $this->_getData();

// check values
if (!$user->id) {
return $response;
}

$color = preg_replace('/[^0-9A-Fa-f]/', '', $color);

$db =& JFactory::getDBO();

$row = new stdClass;
$row->user_id = $user->id;
$row->color = @$data['color'];
$row->type = @$data['type'];
$row->repeat = @$data['repeat'];
$row->vpos = @$data['vpos'];
$row->hpos = @$data['hpos'];
$row->attach = @$data['attach'];
$row->text_color = $color;
$row->date = gmdate('Y-m-d H:i:s', time());
$row->src = @$data['src'];

// store new data to log
$db->insertObject('#__community_backgrounds_log', $row);

// save as current data
$fmtsql = 'REPLACE INTO '.$db->nameQuote('#__community_backgrounds').' (%s) VALUES (%s) ';
$fields = array();
foreach (get_object_vars($row) as $k => $v) {
$fields[] = $db->nameQuote($k);
$values[] = $db->isQuoted($k)? $db->Quote($v) : (int) $v;
}
$db->setQuery(sprintf($fmtsql, implode(',', $fields), implode(',', $values)));
$db->query();

// update user's session
$user->JSB_data = array(
'user_id' => $row->user_id,
'color' => $row->color,
'type' => $row->type,
'src' => $row->src,
'repeat' => $row->repeat,
'vpos' => $row->vpos,
'hpos' => $row->hpos,
'attach' => $row->attach,
'text_color' => $row->text_color,
'date' => $row->date
);
JFactory::getSession()->set('user', $user);

return $response;
}

function _getData() {
$user =& JFactory::getUser();
$cuser =& CFactory::getActiveProfile();
$data = false;

// we have cached data for this user?
if (isset($user->JSB_data['user_id'])) {
$data = ($user->JSB_data['user_id'] == $cuser->id)? $user->JSB_data : false;
if (strtotime(gmdate('Y-m-d H:i:s', time())) - strtotime($user->JSB_data['date']) > 5*60) { // expire in 5 mins
$data = false;
}
}
if (!isset($data['user_id'])) {
$db =& JFactory::getDBO();
$db->setQuery('SELECT *, text_color FROM #__community_backgrounds WHERE user_id='.$db->quote($cuser->id), 0, 1);
$data = $db->loadAssoc();

// create tables
if ($db->getErrorNum() == 1146 || $db->getErrorNum() == 1054) {
$query = file_get_contents(JPATH_SITE.DS.'plugins'.DS.'community'.DS.'profdesigner'.DS.'sql.sql');
$db->setQuery($query);
$db->queryBatch();
}

// fake data
if (!isset($data['user_id'])) {
$data = array('user_id'=>$cuser->id);
}
// reset session data
$user->JSB_data = $data;
$user->JSB_data['date'] = gmdate('Y-m-d H:i:s', time());
JFactory::getSession()->set('user', $user);
}
return $data;
}

function _upload() {
$user =& JFactory::getUser();
if (!$user->id) die();

$file = JRequest::getVar('Filedata', '', 'files', 'array');
$err = false;

// Set FTP credentials, if given
jimport('joomla.client.helper');
JClientHelper::setCredentialsFromRequest('ftp');

// Make the filename safe
jimport('joomla.filesystem.file');
jimport('joomla.filesystem.folder');
$file['name'] = JFile::makeSafe($file['name']);

if (isset($file['name'])) {
// check file
if (!strlen($file['name'])) {
$err = 'Please select file for upload!';
}
// check file type
else {
$ext = strtolower(JFile::getExt($file['name']));
if (!in_array($ext, array('jpg', 'jpeg', 'gif', 'png'))) {
$err = 'This file type is not supported, please upload .GIF or .JPG or .PNG file!';
}
}

if ($err != false) {?>
<script type="text/javascript">
window.parent.$('brkUpWait').style.display = 'none';
window.parent.$('brkUpFile').style.display = 'block';
alert('<?php echo JString::str_ireplace("'", "\\'", JText::_($err));?>');
</script>
<?php
jexit();
}


// check folder
$folder = JPATH_SITE . $this->params->get('upload_path'). DS . $user->id;

if (!file_exists($folder)) {
if (!JFolder::create($folder, 0777)) {?>
<script type="text/javascript">
window.parent.$('brkUpWait').style.display = 'none';
window.parent.$('brkUpFile').style.display = 'block';
alert('<?php echo JString::str_ireplace("'", "\\'", JText::_('Can\'t create folder, please contact site administrator!'));?>');
</script>
<?php
jexit();
}
file_put_contents($folder.DS.'index.html', '<html><body bgcolor="#FFFFFF"></body></html>');
}

$filepath = JPath::clean($folder . DS . strtolower($file['name']));

if (file_exists($filepath)) {
@unlink($filepath);
}

if (!JFile::upload($file['tmp_name'], $filepath)) {?>
<script type="text/javascript">
window.parent.$('brkUpWait').style.display = 'none';
window.parent.$('brkUpFile').style.display = 'block';
alert('<?php echo JString::str_ireplace("'", "\\'", JText::_('Can\'t upload file, please contact site administrator!'));?>');
</script>
<?php
exit();
} else {
// resize
list($sw, $sh, $type) = getimagesize($filepath);
$max_width = $this->params->get('max_width');

if ($sw > $max_width) {
$com = 'convert -size '.$sw.'x'.$sh.' "'.$filepath.'" -thumbnail '.$max_width.'x'.$max_width.' -quality 95 "'.$filepath.'"';
@exec($com, $output, $status);
}

?>
<script type="text/javascript">
window.parent.$('brkUpWait').style.display = 'none';
window.parent.$('brkUpFile').style.display = 'block';
window.parent.$('backgroundForm').upload.value = '<?php echo strtolower($file['name']);?>';
window.parent.Profdesigner.applyImageType();
</script>
<?php
exit();
}
}
}

function ajaxRedrawImages(&$response) {
$this->_ajax = true;
$response->addAssign('brkimgapp' , 'innerHTML' , $this->onProfileDisplay());
$response->addScriptCall('Lightbox.init();');
return $response;
}
}
}

Спасибо!
*

squid

  • Захожу иногда
  • 85
  • 4 / 0
  • :P
Re: JomSocial Profile Designer + AUP
« Ответ #1 : 17.02.2011, 00:32:07 »
никто не знает?  >:(
*

squid

  • Захожу иногда
  • 85
  • 4 / 0
  • :P
Re: JomSocial Profile Designer + AUP
« Ответ #2 : 20.02.2011, 05:24:42 »
 :D
« Последнее редактирование: 11.03.2011, 23:43:56 от squid »
Чтобы оставить сообщение,
Вам необходимо Войти или Зарегистрироваться
 

миграция с CommunityBuilder на JomSocial

Автор anthophyta

Ответов: 6
Просмотров: 4938
Последний ответ 22.03.2021, 13:27:40
от bizzy3
Интеграция JomSocial с компонентом голосований NorrCompetition

Автор Sulpher

Ответов: 0
Просмотров: 3177
Последний ответ 20.06.2018, 11:33:52
от Sulpher
Интеграция Kunena и JomSocial

Автор se_demon

Ответов: 100
Просмотров: 30401
Последний ответ 05.03.2016, 05:12:15
от Amigos
JAchievements - Система достижений пользователей социальной сети JomSocial

Автор foodgy

Ответов: 87
Просмотров: 21108
Последний ответ 29.01.2016, 10:31:27
от ubo
Модификация видео плагина на JomSocial

Автор artliffe

Ответов: 119
Просмотров: 36772
Последний ответ 16.03.2014, 16:48:39
от DenEremeii