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

steelcat

  • Захожу иногда
  • 118
  • 13 / 0
Re: Ошибка в сплывающем окошке.
« Ответ #30 : 21.01.2010, 14:45:13 »
Системные плагины от малоизвестных разработчиков - жуткое зло. У меня похожий плагин, только для SEO, вызвал неработоспособность компонента K2, причем в админке. А он и делал всего лишь: заполнял тайтлы содержимым из контента на странице.
« Последнее редактирование: 21.01.2010, 14:49:38 от steelcat »
*

savosik

  • Осваиваюсь на форуме
  • 42
  • 1 / 0
Re: Ошибка в сплывающем окошке.
« Ответ #31 : 31.01.2010, 17:48:53 »
http://www.jomsocial.com/forum/index.php?id=4764&rb_v=file

Это ссылка на фикс. просто в лоб заменяете соответсвующие файлы. и все работает.... сам намучался, не хотел новую версию менять на старую, гже все отображаеться, залил фикс  - все заработало.
*

DKsN

  • Захожу иногда
  • 258
  • 15 / 0
  • [BODY]
Re: Ошибка в сплывающем окошке.
« Ответ #32 : 06.02.2010, 23:59:24 »
http://www.jomsocial.com/forum/index.php?id=4764&rb_v=file

Это ссылка на фикс. просто в лоб заменяете соответсвующие файлы. и все работает.... сам намучался, не хотел новую версию менять на старую, гже все отображаеться, залил фикс  - все заработало.
Не помогло.
Такая же ситуация. В модуле "новичков" всё нормально, а в "Пользователи" и "кто онлайн" код вылазит.
« Последнее редактирование: 07.02.2010, 00:16:38 от DKsN »
*

kharol

  • Moderator
  • 1721
  • 217 / 0
Re: Ошибка в сплывающем окошке.
« Ответ #33 : 07.02.2010, 07:25:57 »
Не помогло.
Такая же ситуация. В модуле "новичков" всё нормально, а в "Пользователи" и "кто онлайн" код вылазит.
Шаблон стандартный?
Чтобы сказать "спасибо" достаточно нажать на "+"
Чтобы сделать бухгалтерскую проводку "спасибо" реквизиты: R192102130372, ЯД:41001768818003
*

Zombeee

  • Захожу иногда
  • 328
  • 55 / 3
Re: Ошибка в сплывающем окошке.
« Ответ #34 : 07.02.2010, 13:02:59 »
Не помогло.
Такая же ситуация. В модуле "новичков" всё нормально, а в "Пользователи" и "кто онлайн" код вылазит.
Шаблон стандартный?

он должен быть не просто стандартным , но ещё и из версии 1.6, обязательно!
*

DKsN

  • Захожу иногда
  • 258
  • 15 / 0
  • [BODY]
Re: Ошибка в сплывающем окошке.
« Ответ #35 : 07.02.2010, 13:26:55 »
Шаблон стандартный?
Шаблон Блек, но во всех шаблонах такое. Менял все 4 шаблон до заливки, указанных выше файлов, и после. Без изменений.
« Последнее редактирование: 07.02.2010, 13:30:12 от DKsN »
*

Zombeee

  • Захожу иногда
  • 328
  • 55 / 3
Re: Ошибка в сплывающем окошке.
« Ответ #36 : 08.02.2010, 08:18:39 »
у вас сайт в сети или на локалке? если в сети, дайте адрес, посмотрю что и как...
*

DKsN

  • Захожу иногда
  • 258
  • 15 / 0
  • [BODY]
Re: Ошибка в сплывающем окошке.
« Ответ #37 : 08.02.2010, 10:51:19 »
у вас сайт в сети или на локалке? если в сети, дайте адрес, посмотрю что и как...
В сети. Я вот ТУТ дал данные для входа на сайт. Буду признателен за участие  ^-^
*

Zombeee

  • Захожу иногда
  • 328
  • 55 / 3
Re: Ошибка в сплывающем окошке.
« Ответ #38 : 09.02.2010, 08:55:49 »
всё просто и в тоже время не очень... у вас не подключена библиотека:

Код
/components/com_community/assets/jquery.qtip-1.0.0-rc3.min.js

а вот почему она не подключена в хедере сайта, я не знаю... проверьте вообще есть такой файл у вас по указанному пути...
*

DKsN

  • Захожу иногда
  • 258
  • 15 / 0
  • [BODY]
Re: Ошибка в сплывающем окошке.
« Ответ #39 : 10.02.2010, 13:32:41 »
Такой файл есть. Вот содержимое:
Код
/*!
 * jquery.qtip. The jQuery tooltip plugin
 *
 * Copyright (c) 2009 Craig Thompson
 * http://craigsworks.com
 *
 * Licensed under MIT
 * http://www.opensource.org/licenses/mit-license.php
 *
 * Launch  : February 2009
 * Version : 1.0.0-rc3
 * Released: Tuesday 12th May, 2009 - 00:00
 * Debug: jquery.qtip.debug.js
 */

(function(jQuery)
{
jQuery.fn.qtip=function(options,blanket)
{
var i,id,interfaces,opts,obj,command,config,api;
if(typeof options=='string')
{
if(typeof jQuery(this).data('qtip')!=='object')
jQuery.fn.qtip.log.error.call(self,1,jQuery.fn.qtip.constants.NO_TOOLTIP_PRESENT,false);
if(options=='api')
return jQuery(this).data('qtip').interfaces[jQuery(this).data('qtip').current];
else if(options=='interfaces')
return jQuery(this).data('qtip').interfaces;
}
else
{
if(!options) options={};
if(typeof options.content!=='object'||(options.content.jquery&&options.content.length>0)) options.content={text:options.content};
if(typeof options.content.title!=='object') options.content.title={text:options.content.title};
if(typeof options.position!=='object') options.position={corner:options.position};
if(typeof options.position.corner!=='object') options.position.corner={target:options.position.corner,tooltip:options.position.corner};
if(typeof options.show!=='object') options.show={when:options.show};
if(typeof options.show.when!=='object') options.show.when={event:options.show.when};
if(typeof options.show.effect!=='object') options.show.effect={type:options.show.effect};
if(typeof options.hide!=='object') options.hide={when:options.hide};
if(typeof options.hide.when!=='object') options.hide.when={event:options.hide.when};
if(typeof options.hide.effect!=='object') options.hide.effect={type:options.hide.effect};
if(typeof options.style!=='object') options.style={name:options.style};
options.style=sanitizeStyle(options.style);
opts=jQuery.extend(true,{},jQuery.fn.qtip.defaults,options);
opts.style=buildStyle.call({options:opts},opts.style);
opts.user=jQuery.extend(true,{},options);
};
return jQuery(this).each(function()
{
if(typeof options=='string')
{
command=options.toLowerCase();
interfaces=jQuery(this).qtip('interfaces');
if(typeof interfaces=='object')
{
if(blanket===true&&command=='destroy')
while(interfaces.length>0) interfaces[interfaces.length-1].destroy();
else
{
if(blanket!==true) interfaces=[jQuery(this).qtip('api')];
for(i=0;i<interfaces.length;i++)
{
if(command=='destroy') interfaces[i].destroy();
else if(interfaces[i].status.rendered===true)
{
if(command=='show') interfaces[i].show();
else if(command=='hide') interfaces[i].hide();
else if(command=='focus') interfaces[i].focus();
else if(command=='disable') interfaces[i].disable(true);
else if(command=='enable') interfaces[i].disable(false);
};
};
};
};
}
else
{
config=jQuery.extend(true,{},opts);
config.hide.effect.length=opts.hide.effect.length;
config.show.effect.length=opts.show.effect.length;
if(config.position.container===false) config.position.container=jQuery(document.body);
if(config.position.target===false) config.position.target=jQuery(this);
if(config.show.when.target===false) config.show.when.target=jQuery(this);
if(config.hide.when.target===false) config.hide.when.target=jQuery(this);
id=jQuery.fn.qtip.interfaces.length;
for(i=0;i<id;i++)
{
if(typeof jQuery.fn.qtip.interfaces[i]=='undefined'){id=i;break;};
};
obj=new qTip(jQuery(this),config,id);
jQuery.fn.qtip.interfaces[id]=obj;
if(typeof jQuery(this).data('qtip')=='object')
{
if(typeof jQuery(this).attr('qtip')==='undefined')
jQuery(this).data('qtip').current=jQuery(this).data('qtip').interfaces.length;
jQuery(this).data('qtip').interfaces.push(obj);
}
else jQuery(this).data('qtip',{current:0,interfaces:[obj]});
if(config.content.prerender===false&&config.show.when.event!==false&&config.show.ready!==true)
{
config.show.when.target.bind(config.show.when.event+'.qtip-'+id+'-create',{qtip:id},function(event)
{
api=jQuery.fn.qtip.interfaces[event.data.qtip];
api.options.show.when.target.unbind(api.options.show.when.event+'.qtip-'+event.data.qtip+'-create');
api.cache.mouse={x:event.pageX,y:event.pageY};
construct.call(api);
api.options.show.when.target.trigger(api.options.show.when.event);
});
}
else
{
obj.cache.mouse={
x:config.show.when.target.offset().left,
y:config.show.when.target.offset().top
};
construct.call(obj);
}
};
});
};
function qTip(target,options,id)
{
var self=this;
self.id=id;
self.options=options;
self.status={
animated:false,
rendered:false,
disabled:false,
focused:false
};
self.elements={
target:target.addClass(self.options.style.classes.target),
tooltip:null,
wrapper:null,
content:null,
contentWrapper:null,
title:null,
button:null,
tip:null,
bgiframe:null
};
self.cache={
mouse:{},
position:{},
toggle:0
};
self.timers={};
jQuery.extend(self,self.options.api,
{
show:function(event)
{
var returned,solo;
if(!self.status.rendered)
return jQuery.fn.qtip.log.error.call(self,2,jQuery.fn.qtip.constants.TOOLTIP_NOT_RENDERED,'show');
if(self.elements.tooltip.css('display')!=='none') return self;
self.elements.tooltip.stop(true,false);
returned=self.beforeShow.call(self,event);
if(returned===false) return self;
function afterShow()
{
if(self.options.position.type!=='static') self.focus();
self.onShow.call(self,event);
if(jQuery.browser.msie) self.elements.tooltip.get(0).style.removeAttribute('filter');
};
self.cache.toggle=1;
if(self.options.position.type!=='static')
self.updatePosition(event,(self.options.show.effect.length>0));
if(typeof self.options.show.solo=='object') solo=jQuery(self.options.show.solo);
else if(self.options.show.solo===true) solo=jQuery('div.qtip').not(self.elements.tooltip);
if(solo) solo.each(function(){if(jQuery(this).qtip('api').status.rendered===true) jQuery(this).qtip('api').hide();});
if(typeof self.options.show.effect.type=='function')
{
self.options.show.effect.type.call(self.elements.tooltip,self.options.show.effect.length);
self.elements.tooltip.queue(function(){afterShow();jQuery(this).dequeue();});
}
else
{
switch(self.options.show.effect.type.toLowerCase())
{
case'fade':
self.elements.tooltip.fadeIn(self.options.show.effect.length,afterShow);
break;
case'slide':
self.elements.tooltip.slideDown(self.options.show.effect.length,function()
{
afterShow();
if(self.options.position.type!=='static') self.updatePosition(event,true);
});
break;
case'grow':
self.elements.tooltip.show(self.options.show.effect.length,afterShow);
break;
default:
self.elements.tooltip.show(null,afterShow);
break;
};
self.elements.tooltip.addClass(self.options.style.classes.active);
};
return jQuery.fn.qtip.log.error.call(self,1,jQuery.fn.qtip.constants.EVENT_SHOWN,'show');
},
hide:function(event)
{
var returned;
if(!self.status.rendered)
return jQuery.fn.qtip.log.error.call(self,2,jQuery.fn.qtip.constants.TOOLTIP_NOT_RENDERED,'hide');
else if(self.elements.tooltip.css('display')==='none') return self;
clearTimeout(self.timers.show);
self.elements.tooltip.stop(true,false);
returned=self.beforeHide.call(self,event);
if(returned===false) return self;
function afterHide(){self.onHide.call(self,event);};
self.cache.toggle=0;
if(typeof self.options.hide.effect.type=='function')
{
self.options.hide.effect.type.call(self.elements.tooltip,self.options.hide.effect.length);
self.elements.tooltip.queue(function(){afterHide();jQuery(this).dequeue();});
}
else
{
switch(self.options.hide.effect.type.toLowerCase())
{
case'fade':
self.elements.tooltip.fadeOut(self.options.hide.effect.length,afterHide);
break;
case'slide':
self.elements.tooltip.slideUp(self.options.hide.effect.length,afterHide);
break;
case'grow':
self.elements.tooltip.hide(self.options.hide.effect.length,afterHide);
break;
default:
self.elements.tooltip.hide(null,afterHide);
break;
};
self.elements.tooltip.removeClass(self.options.style.classes.active);
};
return jQuery.fn.qtip.log.error.call(self,1,jQuery.fn.qtip.constants.EVENT_HIDDEN,'hide');
},
updatePosition:function(event,animate)
{
var i,target,tooltip,coords,mapName,imagePos,newPosition,ieAdjust,ie6Adjust,borderAdjust,mouseAdjust,offset,curPosition,returned
if(!self.status.rendered)
return jQuery.fn.qtip.log.error.call(self,2,jQuery.fn.qtip.constants.TOOLTIP_NOT_RENDERED,'updatePosition');
else if(self.options.position.type=='static')
return jQuery.fn.qtip.log.error.call(self,1,jQuery.fn.qtip.constants.CANNOT_POSITION_STATIC,'updatePosition');
target={
position:{left:0,top:0},
dimensions:{height:0,width:0},
corner:self.options.position.corner.target
};
tooltip={
position:self.getPosition(),
dimensions:self.getDimensions(),
corner:self.options.position.corner.tooltip
};
if(self.options.position.target!=='mouse')
{
if(self.options.position.target.get(0).nodeName.toLowerCase()=='area')
{
coords=self.options.position.target.attr('coords').split(',');
for(i=0;i<coords.length;i++) coords[i]=parseInt(coords[i]);
mapName=self.options.position.target.parent('map').attr('name');
imagePos=jQuery('img[usemap="#'+mapName+'"]:first').offset();
target.position={
left:Math.floor(imagePos.left+coords[0]),
top:Math.floor(imagePos.top+coords[1])
};
switch(self.options.position.target.attr('shape').toLowerCase())
{
case'rect':
target.dimensions={
width:Math.ceil(Math.abs(coords[2]-coords[0])),
height:Math.ceil(Math.abs(coords[3]-coords[1]))
};
break;
case'circle':
target.dimensions={
width:coords[2]+1,
height:coords[2]+1
};
break;
case'poly':
target.dimensions={
width:coords[0],
height:coords[1]
};
for(i=0;i<coords.length;i++)
{
if(i%2==0)
{
if(coords[i]>target.dimensions.width)
target.dimensions.width=coords[i];
if(coords[i]<coords[0])
target.position.left=Math.floor(imagePos.left+coords[i]);
}
else
{
if(coords[i]>target.dimensions.height)
target.dimensions.height=coords[i];
if(coords[i]<coords[1])
target.position.top=Math.floor(imagePos.top+coords[i]);
};
};
target.dimensions.width=target.dimensions.width-(target.position.left-imagePos.left);
target.dimensions.height=target.dimensions.height-(target.position.top-imagePos.top);
break;
default:
return jQuery.fn.qtip.log.error.call(self,4,jQuery.fn.qtip.constants.INVALID_AREA_SHAPE,'updatePosition');
break;
};
target.dimensions.width-=2;target.dimensions.height-=2;
}
else if(self.options.position.target.add(document.body).length===1)
{
target.position={left:jQuery(document).scrollLeft(),top:jQuery(document).scrollTop()};
target.dimensions={height:jQuery(window).height(),width:jQuery(window).width()};
}
else
{
if(typeof self.options.position.target.attr('qtip')!=='undefined')
target.position=self.options.position.target.qtip('api').cache.position;
else
target.position=self.options.position.target.offset();
target.dimensions={
height:self.options.position.target.outerHeight(),
width:self.options.position.target.outerWidth()
};
};
newPosition=jQuery.extend({},target.position);
if(target.corner.search(/right/i)!==-1)
newPosition.left+=target.dimensions.width;
if(target.corner.search(/bottom/i)!==-1)
newPosition.top+=target.dimensions.height;
if(target.corner.search(/((top|bottom) Middle)|center/)!==-1)
newPosition.left+=(target.dimensions.width/2);
if(target.corner.search(/((left|right) Middle)|center/)!==-1)
newPosition.top+=(target.dimensions.height/2);
}
else
{
target.position=newPosition={left:self.cache.mouse.x,top:self.cache.mouse.y};
target.dimensions={height:1,width:1};
};
if(tooltip.corner.search(/right/i)!==-1)
newPosition.left-=tooltip.dimensions.width;
if(tooltip.corner.search(/bottom/i)!==-1)
newPosition.top-=tooltip.dimensions.height;
if(tooltip.corner.search(/((top|bottom) Middle)|center/)!==-1)
newPosition.left-=(tooltip.dimensions.width/2);
if(tooltip.corner.search(/((left|right) Middle)|center/)!==-1)
newPosition.top-=(tooltip.dimensions.height/2);
ieAdjust=(jQuery.browser.msie)?1:0;
ie6Adjust=(jQuery.browser.msie&&parseInt(jQuery.browser.version.charAt(0))===6)?1:0;
if(self.options.style.border.radius>0)
{
if(tooltip.corner.search(/Left/)!==-1)
newPosition.left-=self.options.style.border.radius;
else if(tooltip.corner.search(/Right/)!==-1)
newPosition.left+=self.options.style.border.radius;
if(tooltip.corner.search(/Top/)!==-1)
newPosition.top-=self.options.style.border.radius;
else if(tooltip.corner.search(/Bottom/)!==-1)
newPosition.top+=self.options.style.border.radius;
};
if(ieAdjust)
{
if(tooltip.corner.search(/top/)!==-1)
newPosition.top-=ieAdjust
else if(tooltip.corner.search(/bottom/)!==-1)
newPosition.top+=ieAdjust
if(tooltip.corner.search(/left/)!==-1)
newPosition.left-=ieAdjust
else if(tooltip.corner.search(/right/)!==-1)
newPosition.left+=ieAdjust
if(tooltip.corner.search(/leftMiddle|rightMiddle/)!==-1)
newPosition.top-=1
};
if(self.options.position.adjust.screen===true)
newPosition=screenAdjust.call(self,newPosition,target,tooltip);
if(self.options.position.target==='mouse'&&self.options.position.adjust.mouse===true)
{
if(self.options.position.adjust.screen===true&&self.elements.tip)
mouseAdjust=self.elements.tip.attr('rel');
else
mouseAdjust=self.options.position.corner.tooltip;
newPosition.left+=(mouseAdjust.search(/right/i)!==-1)?-6:6;
newPosition.top+=(mouseAdjust.search(/bottom/i)!==-1)?-6:6;
}
if(!self.elements.bgiframe&&jQuery.browser.msie&&parseInt(jQuery.browser.version.charAt(0))==6)
{
jQuery('select, object').each(function()
{
offset=jQuery(this).offset();
offset.bottom=offset.top+jQuery(this).height();
offset.right=offset.left+jQuery(this).width();
if(newPosition.top+tooltip.dimensions.height>=offset.top
&&newPosition.left+tooltip.dimensions.width>=offset.left)
bgiframe.call(self);
});
};
newPosition.left+=self.options.position.adjust.x;
newPosition.top+=self.options.position.adjust.y;
curPosition=self.getPosition();
if(newPosition.left!=curPosition.left||newPosition.top!=curPosition.top)
{
returned=self.beforePositionUpdate.call(self,event);
if(returned===false) return self;
self.cache.position=newPosition;
if(animate===true)
{
self.status.animated=true;
self.elements.tooltip.animate(newPosition,200,'swing',function(){self.status.animated=false});
}
else self.elements.tooltip.css(newPosition);
self.onPositionUpdate.call(self,event);
if(typeof event!=='undefined'&&event.type&&event.type!=='mousemove')
jQuery.fn.qtip.log.error.call(self,1,jQuery.fn.qtip.constants.EVENT_POSITION_UPDATED,'updatePosition');
};
return self;
},
updateWidth:function(newWidth)
{
var hidden;
if(!self.status.rendered)
return jQuery.fn.qtip.log.error.call(self,2,jQuery.fn.qtip.constants.TOOLTIP_NOT_RENDERED,'updateWidth');
else if(newWidth&&typeof newWidth!=='number')
return jQuery.fn.qtip.log.error.call(self,2,'newWidth must be of type number','updateWidth');
hidden=self.elements.contentWrapper.siblings().add(self.elements.tip).add(self.elements.button);
if(!newWidth)
{
if(typeof self.options.style.width.value=='number')
newWidth=self.options.style.width.value;
else
{
self.elements.tooltip.css({width:'auto'});
hidden.hide();
if(jQuery.browser.msie)
self.elements.wrapper.add(self.elements.contentWrapper.children()).css({zoom:'normal'});
newWidth=self.getDimensions().width+1;
if(!self.options.style.width.value)
{
if(newWidth>self.options.style.width.max) newWidth=self.options.style.width.max
if(newWidth<self.options.style.width.min) newWidth=self.options.style.width.min
};
};
};
if(newWidth%2!==0) newWidth-=1;
self.elements.tooltip.width(newWidth);
hidden.show();
if(self.options.style.border.radius)
{
self.elements.tooltip.find('.qtip-betweenCorners').each(function(i)
{
jQuery(this).width(newWidth-(self.options.style.border.radius*2));
})
};
if(jQuery.browser.msie)
{
self.elements.wrapper.add(self.elements.contentWrapper.children()).css({zoom:'1'});
self.elements.wrapper.width(newWidth);
if(self.elements.bgiframe) self.elements.bgiframe.width(newWidth).height(self.getDimensions.height);
};
return jQuery.fn.qtip.log.error.call(self,1,jQuery.fn.qtip.constants.EVENT_WIDTH_UPDATED,'updateWidth');
},
updateStyle:function(name)
{
var tip,borders,context,corner,coordinates;
if(!self.status.rendered)
return jQuery.fn.qtip.log.error.call(self,2,jQuery.fn.qtip.constants.TOOLTIP_NOT_RENDERED,'updateStyle');
else if(typeof name!=='string'||!jQuery.fn.qtip.styles[name])
return jQuery.fn.qtip.log.error.call(self,2,jQuery.fn.qtip.constants.STYLE_NOT_DEFINED,'updateStyle');
self.options.style=buildStyle.call(self,jQuery.fn.qtip.styles[name],self.options.user.style);
self.elements.content.css(jQueryStyle(self.options.style));
if(self.options.content.title.text!==false)
self.elements.title.css(jQueryStyle(self.options.style.title,true));
self.elements.contentWrapper.css({borderColor:self.options.style.border.color});
if(self.options.style.tip.corner!==false)
{
if(jQuery('<canvas>').get(0).getContext)
{
tip=self.elements.tooltip.find('.qtip-tip canvas:first');
context=tip.get(0).getContext('2d');
context.clearRect(0,0,300,300);
corner=tip.parent('div[rel]:first').attr('rel');
coordinates=calculateTip(corner,self.options.style.tip.size.width,self.options.style.tip.size.height);
drawTip.call(self,tip,coordinates,self.options.style.tip.color||self.options.style.border.color);
}
else if(jQuery.browser.msie)
{
tip=self.elements.tooltip.find('.qtip-tip [nodeName="shape"]');
tip.attr('fillcolor',self.options.style.tip.color||self.options.style.border.color);
};
};
if(self.options.style.border.radius>0)
{
self.elements.tooltip.find('.qtip-betweenCorners').css({backgroundColor:self.options.style.border.color});
if(jQuery('<canvas>').get(0).getContext)
{
borders=calculateBorders(self.options.style.border.radius)
self.elements.tooltip.find('.qtip-wrapper canvas').each(function()
{
context=jQuery(this).get(0).getContext('2d');
context.clearRect(0,0,300,300);
corner=jQuery(this).parent('div[rel]:first').attr('rel')
drawBorder.call(self,jQuery(this),borders[corner],
self.options.style.border.radius,self.options.style.border.color);
});
}
else if(jQuery.browser.msie)
{
self.elements.tooltip.find('.qtip-wrapper [nodeName="arc"]').each(function()
{
jQuery(this).attr('fillcolor',self.options.style.border.color)
});
};
};
return jQuery.fn.qtip.log.error.call(self,1,jQuery.fn.qtip.constants.EVENT_STYLE_UPDATED,'updateStyle');
},
updateContent:function(content,reposition)
{
var parsedContent,images,loadedImages;
if(!self.status.rendered)
return jQuery.fn.qtip.log.error.call(self,2,jQuery.fn.qtip.constants.TOOLTIP_NOT_RENDERED,'updateContent');
else if(!content)
return jQuery.fn.qtip.log.error.call(self,2,jQuery.fn.qtip.constants.NO_CONTENT_PROVIDED,'updateContent');
parsedContent=self.beforeContentUpdate.call(self,content);
if(typeof parsedContent=='string') content=parsedContent;
else if(parsedContent===false) return;
if(jQuery.browser.msie) self.elements.contentWrapper.children().css({zoom:'normal'});
if(content.jquery&&content.length>0)
content.clone(true).appendTo(self.elements.content).show();
else self.elements.content.html(content);
images=self.elements.content.find('img[complete=false]');
if(images.length>0)
{
loadedImages=0;
images.each(function(i)
{
jQuery('<img src="'+jQuery(this).attr('src')+'" />')
.load(function(){if(++loadedImages==images.length) afterLoad();});
});
}
else afterLoad();
function afterLoad()
{
self.updateWidth();
if(reposition!==false)
{
if(self.options.position.type!=='static')
self.updatePosition(self.elements.tooltip.is(':visible'),true);
if(self.options.style.tip.corner!==false)
positionTip.call(self);
};
};
self.onContentUpdate.call(self);
return jQuery.fn.qtip.log.error.call(self,1,jQuery.fn.qtip.constants.EVENT_CONTENT_UPDATED,'loadContent');
},
loadContent:function(url,data,method)
{
var returned;
if(!self.status.rendered)
return jQuery.fn.qtip.log.error.call(self,2,jQuery.fn.qtip.constants.TOOLTIP_NOT_RENDERED,'loadContent');
returned=self.beforeContentLoad.call(self);
if(returned===false) return self;
if(method=='post')
jQuery.post(url,data,setupContent);
else
jQuery.get(url,data,setupContent);
function setupContent(content)
{
self.onContentLoad.call(self);
jQuery.fn.qtip.log.error.call(self,1,jQuery.fn.qtip.constants.EVENT_CONTENT_LOADED,'loadContent');
self.updateContent(content);
};
return self;
},
updateTitle:function(content)
{
if(!self.status.rendered)
return jQuery.fn.qtip.log.error.call(self,2,jQuery.fn.qtip.constants.TOOLTIP_NOT_RENDERED,'updateTitle');
else if(!content)
return jQuery.fn.qtip.log.error.call(self,2,jQuery.fn.qtip.constants.NO_CONTENT_PROVIDED,'updateTitle');
returned=self.beforeTitleUpdate.call(self);
if(returned===false) return self;
if(self.elements.button) self.elements.button=self.elements.button.clone(true);
self.elements.title.html(content)
if(self.elements.button) self.elements.title.prepend(self.elements.button);
self.onTitleUpdate.call(self);
return jQuery.fn.qtip.log.error.call(self,1,jQuery.fn.qtip.constants.EVENT_TITLE_UPDATED,'updateTitle');
},
focus:function(event)
{
var curIndex,newIndex,elemIndex,returned;
if(!self.status.rendered)
return jQuery.fn.qtip.log.error.call(self,2,jQuery.fn.qtip.constants.TOOLTIP_NOT_RENDERED,'focus');
else if(self.options.position.type=='static')
return jQuery.fn.qtip.log.error.call(self,1,jQuery.fn.qtip.constants.CANNOT_FOCUS_STATIC,'focus');
curIndex=parseInt(self.elements.tooltip.css('z-index'));
newIndex=6000+jQuery('div.qtip[qtip]').length-1;
if(!self.status.focused&&curIndex!==newIndex)
{
returned=self.beforeFocus.call(self,event);
if(returned===false) return self;
jQuery('div.qtip[qtip]').not(self.elements.tooltip).each(function()
{
if(jQuery(this).qtip('api').status.rendered===true)
{
elemIndex=parseInt(jQuery(this).css('z-index'));
if(typeof elemIndex=='number'&&elemIndex>-1)
jQuery(this).css({zIndex:parseInt(jQuery(this).css('z-index'))-1});
jQuery(this).qtip('api').status.focused=false;
}
})
self.elements.tooltip.css({zIndex:newIndex});
self.status.focused=true;
self.onFocus.call(self,event);
jQuery.fn.qtip.log.error.call(self,1,jQuery.fn.qtip.constants.EVENT_FOCUSED,'focus');
};
return self;
},
disable:function(state)
{
if(!self.status.rendered)
return jQuery.fn.qtip.log.error.call(self,2,jQuery.fn.qtip.constants.TOOLTIP_NOT_RENDERED,'disable');
if(state)
{
if(!self.status.disabled)
{
self.status.disabled=true;
jQuery.fn.qtip.log.error.call(self,1,jQuery.fn.qtip.constants.EVENT_DISABLED,'disable');
}
else jQuery.fn.qtip.log.error.call(self,1,jQuery.fn.qtip.constants.TOOLTIP_ALREADY_DISABLED,'disable');
}
else
{
if(self.status.disabled)
{
self.status.disabled=false;
jQuery.fn.qtip.log.error.call(self,1,jQuery.fn.qtip.constants.EVENT_ENABLED,'disable');
}
else jQuery.fn.qtip.log.error.call(self,1,jQuery.fn.qtip.constants.TOOLTIP_ALREADY_ENABLED,'disable');
};
return self;
},
destroy:function()
{
var i,returned,interfaces;
returned=self.beforeDestroy.call(self);
if(returned===false) return self;
if(self.status.rendered)
{
self.options.show.when.target.unbind('mousemove.qtip',self.updatePosition);
self.options.show.when.target.unbind('mouseout.qtip',self.hide);
self.options.show.when.target.unbind(self.options.show.when.event+'.qtip');
self.options.hide.when.target.unbind(self.options.hide.when.event+'.qtip');
self.elements.tooltip.unbind(self.options.hide.when.event+'.qtip');
self.elements.tooltip.unbind('mouseover.qtip',self.focus);
self.elements.tooltip.remove();
}
else self.options.show.when.target.unbind(self.options.show.when.event+'.qtip-create');
if(typeof self.elements.target.data('qtip')=='object')
{
interfaces=self.elements.target.data('qtip').interfaces;
if(typeof interfaces=='object'&&interfaces.length>0)
{
for(i=0;i<interfaces.length-1;i++)
if(interfaces[i].id==self.id) interfaces.splice(i,1)
}
}
delete jQuery.fn.qtip.interfaces[self.id];
if(typeof interfaces=='object'&&interfaces.length>0)
self.elements.target.data('qtip').current=interfaces.length-1;
else
self.elements.target.removeData('qtip');
self.onDestroy.call(self);
jQuery.fn.qtip.log.error.call(self,1,jQuery.fn.qtip.constants.EVENT_DESTROYED,'destroy');
return self.elements.target
},
getPosition:function()
{
var show,offset;
if(!self.status.rendered)
return jQuery.fn.qtip.log.error.call(self,2,jQuery.fn.qtip.constants.TOOLTIP_NOT_RENDERED,'getPosition');
show=(self.elements.tooltip.css('display')!=='none')?false:true;
if(show) self.elements.tooltip.css({visiblity:'hidden'}).show();
offset=self.elements.tooltip.offset();
if(show) self.elements.tooltip.css({visiblity:'visible'}).hide();
return offset;
},
getDimensions:function()
{
var show,dimensions;
if(!self.status.rendered)
return jQuery.fn.qtip.log.error.call(self,2,jQuery.fn.qtip.constants.TOOLTIP_NOT_RENDERED,'getDimensions');
show=(!self.elements.tooltip.is(':visible'))?true:false;
if(show) self.elements.tooltip.css({visiblity:'hidden'}).show();
dimensions={
height:self.elements.tooltip.outerHeight(),
width:self.elements.tooltip.outerWidth()
};
if(show) self.elements.tooltip.css({visiblity:'visible'}).hide();
return dimensions;
}
});
};
function construct()
{
var self,adjust,content,url,data,method,tempLength;
self=this;
self.beforeRender.call(self);
self.status.rendered=true;
self.elements.tooltip='<div qtip="'+self.id+'" '+
'class="qtip '+(self.options.style.classes.tooltip||self.options.style)+'"'+
'style="display:none; -moz-border-radius:0; -webkit-border-radius:0; border-radius:0;'+
'position:'+self.options.position.type+';">'+
'  <div class="qtip-wrapper" style="position:relative; overflow:hidden; text-align:left;">'+
'    <div class="qtip-contentWrapper" style="overflow:hidden;">'+
'       <div class="qtip-content '+self.options.style.classes.content+'"></div>'+
'</div></div></div>';
self.elements.tooltip=jQuery(self.elements.tooltip);
self.elements.tooltip.appendTo(self.options.position.container)
self.elements.tooltip.data('qtip',{current:0,interfaces:[self]});
self.elements.wrapper=self.elements.tooltip.children('div:first');
self.elements.contentWrapper=self.elements.wrapper.children('div:first').css({background:self.options.style.background});
self.elements.content=self.elements.contentWrapper.children('div:first').css(jQueryStyle(self.options.style));
if(jQuery.browser.msie) self.elements.wrapper.add(self.elements.content).css({zoom:1});
if(self.options.hide.when.event=='unfocus') self.elements.tooltip.attr('unfocus',true);
if(typeof self.options.style.width.value=='number') self.updateWidth();
if(jQuery('<canvas>').get(0).getContext||jQuery.browser.msie)
{
if(self.options.style.border.radius>0)
createBorder.call(self);
else
self.elements.contentWrapper.css({border:self.options.style.border.width+'px solid '+self.options.style.border.color});
if(self.options.style.tip.corner!==false)
createTip.call(self);
}
else
{
self.elements.contentWrapper.css({border:self.options.style.border.width+'px solid '+self.options.style.border.color});
self.options.style.border.radius=0;
self.options.style.tip.corner=false;
jQuery.fn.qtip.log.error.call(self,2,jQuery.fn.qtip.constants.CANVAS_VML_NOT_SUPPORTED,'render');
};
if((typeof self.options.content.text=='string'&&self.options.content.text.length>0)
||(self.options.content.text.jquery&&self.options.content.text.length>0))
content=self.options.content.text;
else if(typeof self.elements.target.attr('title')=='string'&&self.elements.target.attr('title').length>0)
{
content=self.elements.target.attr('title').replace("\\n",'<br />');
self.elements.target.attr('title','');
}
else if(typeof self.elements.target.attr('alt')=='string'&&self.elements.target.attr('alt').length>0)
{
content=self.elements.target.attr('alt').replace("\\n",'<br />');
self.elements.target.attr('alt','');
}
else
{
content=' ';
jQuery.fn.qtip.log.error.call(self,1,jQuery.fn.qtip.constants.NO_VALID_CONTENT,'render');
};
if(self.options.content.title.text!==false) createTitle.call(self);
self.updateContent(content);
assignEvents.call(self);
if(self.options.show.ready===true) self.show();
if(self.options.content.url!==false)
{
url=self.options.content.url;
data=self.options.content.data;
method=self.options.content.method||'get';
self.loadContent(url,data,method);
};
self.onRender.call(self);
jQuery.fn.qtip.log.error.call(self,1,jQuery.fn.qtip.constants.EVENT_RENDERED,'render');
};
function createBorder()
{
var self,i,width,radius,color,coordinates,containers,size,betweenWidth,betweenCorners,borderTop,borderBottom,borderCoord,sideWidth,vertWidth;
self=this;
self.elements.wrapper.find('.qtip-borderBottom, .qtip-borderTop').remove();
width=self.options.style.border.width;
radius=self.options.style.border.radius;
color=self.options.style.border.color||self.options.style.tip.color;
coordinates=calculateBorders(radius);
containers={};
for(i in coordinates)
{
containers[i]='<div rel="'+i+'" style="'+((i.search(/Left/)!==-1)?'left':'right')+':0; '+
'position:absolute; height:'+radius+'px; width:'+radius+'px; overflow:hidden; line-height:0.1px; font-size:1px">';
if(jQuery('<canvas>').get(0).getContext)
containers[i]+='<canvas height="'+radius+'" width="'+radius+'" style="vertical-align: top"></canvas>';
else if(jQuery.browser.msie)
{
size=radius*2+3;
containers[i]+='<v:arc stroked="false" fillcolor="'+color+'" startangle="'+coordinates[i][0]+'" endangle="'+coordinates[i][1]+'" '+
'style="width:'+size+'px; height:'+size+'px; margin-top:'+((i.search(/bottom/)!==-1)?-2:-1)+'px; '+
'margin-left:'+((i.search(/Right/)!==-1)?coordinates[i][2]-3.5:-1)+'px; '+
'vertical-align:top; display:inline-block; behavior:url(#default#VML)"></v:arc>';
};
containers[i]+='</div>';
};
betweenWidth=self.getDimensions().width-(Math.max(width,radius)*2);
betweenCorners='<div class="qtip-betweenCorners" style="height:'+radius+'px; width:'+betweenWidth+'px; '+
'overflow:hidden; background-color:'+color+'; line-height:0.1px; font-size:1px;">';
borderTop='<div class="qtip-borderTop" dir="ltr" style="height:'+radius+'px; '+
'margin-left:'+radius+'px; line-height:0.1px; font-size:1px; padding:0;">'+
containers['topLeft']+containers['topRight']+betweenCorners;
self.elements.wrapper.prepend(borderTop);
borderBottom='<div class="qtip-borderBottom" dir="ltr" style="height:'+radius+'px; '+
'margin-left:'+radius+'px; line-height:0.1px; font-size:1px; padding:0;">'+
containers['bottomLeft']+containers['bottomRight']+betweenCorners;
self.elements.wrapper.append(borderBottom);
if(jQuery('<canvas>').get(0).getContext)
{
self.elements.wrapper.find('canvas').each(function()
{
borderCoord=coordinates[jQuery(this).parent('[rel]:first').attr('rel')];
drawBorder.call(self,jQuery(this),borderCoord,radius,color);
})
}
else if(jQuery.browser.msie) self.elements.tooltip.append('<v:image style="behavior:url(#default#VML);"></v:image>');
sideWidth=Math.max(radius,(radius+(width-radius)))
vertWidth=Math.max(width-radius,0);
self.elements.contentWrapper.css({
border:'0px solid '+color,
borderWidth:vertWidth+'px '+sideWidth+'px'
})
};
function drawBorder(canvas,coordinates,radius,color)
{
var context=canvas.get(0).getContext('2d');
context.fillStyle=color;
context.beginPath();
context.arc(coordinates[0],coordinates[1],radius,0,Math.PI*2,false);
context.fill();
};
function createTip(corner)
{
var self,color,coordinates,coordsize,path;
self=this;
if(self.elements.tip!==null) self.elements.tip.remove();
color=self.options.style.tip.color||self.options.style.border.color;
if(self.options.style.tip.corner===false) return;
else if(!corner) corner=self.options.style.tip.corner;
coordinates=calculateTip(corner,self.options.style.tip.size.width,self.options.style.tip.size.height);
self.elements.tip='<div class="'+self.options.style.classes.tip+'" dir="ltr" rel="'+corner+'" style="position:absolute; '+
'height:'+self.options.style.tip.size.height+'px; width:'+self.options.style.tip.size.width+'px; '+
'margin:0 auto; line-height:0.1px; font-size:1px;">';
if(jQuery('<canvas>').get(0).getContext)
self.elements.tip+='<canvas height="'+self.options.style.tip.size.height+'" width="'+self.options.style.tip.size.width+'"></canvas>';
else if(jQuery.browser.msie)
{
coordsize=self.options.style.tip.size.width+','+self.options.style.tip.size.height;
path='m'+coordinates[0][0]+','+coordinates[0][1];
path+=' l'+coordinates[1][0]+','+coordinates[1][1];
path+=' '+coordinates[2][0]+','+coordinates[2][1];
path+=' xe';
self.elements.tip+='<v:shape fillcolor="'+color+'" stroked="false" filled="true" path="'+path+'" coordsize="'+coordsize+'" '+
'style="width:'+self.options.style.tip.size.width+'px; height:'+self.options.style.tip.size.height+'px; '+
'line-height:0.1px; display:inline-block; behavior:url(#default#VML); '+
'vertical-align:'+((corner.search(/top/)!==-1)?'bottom':'top')+'"></v:shape>';
self.elements.tip+='<v:image style="behavior:url(#default#VML);"></v:image>';
self.elements.contentWrapper.css('position','relative');
};
self.elements.tooltip.prepend(self.elements.tip+'</div>');
self.elements.tip=self.elements.tooltip.find('.'+self.options.style.classes.tip).eq(0);
if(jQuery('<canvas>').get(0).getContext)
drawTip.call(self,self.elements.tip.find('canvas:first'),coordinates,color);
if(corner.search(/top/)!==-1&&jQuery.browser.msie&&parseInt(jQuery.browser.version.charAt(0))===6)
self.elements.tip.css({marginTop:-4});
positionTip.call(self,corner);
};
function drawTip(canvas,coordinates,color)
{
var context=canvas.get(0).getContext('2d');
context.fillStyle=color;
context.beginPath();
context.moveTo(coordinates[0][0],coordinates[0][1]);
context.lineTo(coordinates[1][0],coordinates[1][1]);
context.lineTo(coordinates[2][0],coordinates[2][1]);
context.fill();
};
function positionTip(corner)
{
var self,ieAdjust,paddingCorner,paddingSize,newMargin;
self=this;
if(self.options.style.tip.corner===false||!self.elements.tip) return;
if(!corner) corner=self.elements.tip.attr('rel');
ieAdjust=positionAdjust=(jQuery.browser.msie)?1:0;
self.elements.tip.css(corner.match(/left|right|top|bottom/)[0],0);
if(corner.search(/top|bottom/)!==-1)
{
if(jQuery.browser.msie)
{
if(parseInt(jQuery.browser.version.charAt(0))===6)
positionAdjust=(corner.search(/top/)!==-1)?-3:1;
else
positionAdjust=(corner.search(/top/)!==-1)?1:2;
};
if(corner.search(/Middle/)!==-1)
self.elements.tip.css({left:'50%',marginLeft:-(self.options.style.tip.size.width/2)});
else if(corner.search(/Left/)!==-1)
self.elements.tip.css({left:self.options.style.border.radius-ieAdjust});
else if(corner.search(/Right/)!==-1)
self.elements.tip.css({right:self.options.style.border.radius+ieAdjust});
if(corner.search(/top/)!==-1)
self.elements.tip.css({top:-positionAdjust});
else
self.elements.tip.css({bottom:positionAdjust});
}
else if(corner.search(/left|right/)!==-1)
{
if(jQuery.browser.msie)
positionAdjust=(parseInt(jQuery.browser.version.charAt(0))===6)?1:((corner.search(/left/)!==-1)?1:2);
if(corner.search(/Middle/)!==-1)
self.elements.tip.css({top:'50%',marginTop:-(self.options.style.tip.size.height/2)});
else if(corner.search(/Top/)!==-1)
self.elements.tip.css({top:self.options.style.border.radius-ieAdjust});
else if(corner.search(/Bottom/)!==-1)
self.elements.tip.css({bottom:self.options.style.border.radius+ieAdjust});
if(corner.search(/left/)!==-1)
self.elements.tip.css({left:-positionAdjust});
else
self.elements.tip.css({right:positionAdjust});
};
paddingCorner='padding-'+corner.match(/left|right|top|bottom/)[0];
paddingSize=self.options.style.tip.size[(paddingCorner.search(/left|right/)!==-1)?'width':'height'];
self.elements.tooltip.css('padding',0);
self.elements.tooltip.css(paddingCorner,paddingSize);
if(jQuery.browser.msie&&parseInt(jQuery.browser.version.charAt(0))==6)
{
newMargin=parseInt(self.elements.tip.css('margin-top'))||0;
newMargin+=parseInt(self.elements.content.css('margin-top'))||0;
self.elements.tip.css({marginTop:newMargin});
};
};
function createTitle()
{
var self=this;
if(self.elements.title!==null) self.elements.title.remove();
self.elements.title=jQuery('<div class="'+self.options.style.classes.title+'">')
.css(jQueryStyle(self.options.style.title,true))
.css({zoom:(jQuery.browser.msie)?1:0})
.prependTo(self.elements.contentWrapper);
if(self.options.content.title.text) self.updateTitle.call(self,self.options.content.title.text);
if(self.options.content.title.button!==false
&&typeof self.options.content.title.button=='string')
{
self.elements.button=jQuery('<a class="'+self.options.style.classes.button+'" style="float:right; position: relative"></a>')
.css(jQueryStyle(self.options.style.button,true))
.html(self.options.content.title.button)
.prependTo(self.elements.title)
.click(function(event){if(!self.status.disabled) self.hide(event)});
};
};
function assignEvents()
{
var self,showTarget,hideTarget,inactiveEvents;
self=this;
showTarget=self.options.show.when.target;
hideTarget=self.options.hide.when.target;
if(self.options.hide.fixed) hideTarget=hideTarget.add(self.elements.tooltip);
if(self.options.hide.when.event=='inactive')
{
inactiveEvents=['click','dblclick','mousedown','mouseup','mousemove',
'mouseout','mouseenter','mouseleave','mouseover'];
function inactiveMethod(event)
{
if(self.status.disabled===true) return;
clearTimeout(self.timers.inactive);
self.timers.inactive=setTimeout(function()
{
jQuery(inactiveEvents).each(function()
{
hideTarget.unbind(this+'.qtip-inactive');
self.elements.content.unbind(this+'.qtip-inactive');
});
self.hide(event);
}
,self.options.hide.delay);
};
}
else if(self.options.hide.fixed===true)
{
self.elements.tooltip.bind('mouseover.qtip',function()
{
if(self.status.disabled===true) return;
clearTimeout(self.timers.hide);
});
};
function showMethod(event)
{
if(self.status.disabled===true) return;
if(self.options.hide.when.event=='inactive')
{
jQuery(inactiveEvents).each(function()
{
hideTarget.bind(this+'.qtip-inactive',inactiveMethod);
self.elements.content.bind(this+'.qtip-inactive',inactiveMethod);
});
inactiveMethod();
};
clearTimeout(self.timers.show);
clearTimeout(self.timers.hide);
self.timers.show=setTimeout(function(){self.show(event);},self.options.show.delay);
};
function hideMethod(event)
{
if(self.status.disabled===true) return;
if(self.options.hide.fixed===true
&&self.options.hide.when.event.search(/mouse(out|leave)/i)!==-1
&&jQuery(event.relatedTarget).parents('div.qtip[qtip]').length>0)
{
event.stopPropagation();
event.preventDefault();
clearTimeout(self.timers.hide);
return false;
};
clearTimeout(self.timers.show);
clearTimeout(self.timers.hide);
self.elements.tooltip.stop(true,true);
self.timers.hide=setTimeout(function(){self.hide(event);},self.options.hide.delay);
};
if((self.options.show.when.target.add(self.options.hide.when.target).length===1
&&self.options.show.when.event==self.options.hide.when.event
&&self.options.hide.when.event!=='inactive')
||self.options.hide.when.event=='unfocus')
{
self.cache.toggle=0;
showTarget.bind(self.options.show.when.event+'.qtip',function(event)
{
if(self.cache.toggle==0) showMethod(event);
else hideMethod(event);
});
}
else
{
showTarget.bind(self.options.show.when.event+'.qtip',showMethod);
if(self.options.hide.when.event!=='inactive')
hideTarget.bind(self.options.hide.when.event+'.qtip',hideMethod);
};
if(self.options.position.type.search(/(fixed|absolute)/)!==-1)
self.elements.tooltip.bind('mouseover.qtip',self.focus);
if(self.options.position.target==='mouse'&&self.options.position.type!=='static')
{
showTarget.bind('mousemove.qtip',function(event)
{
self.cache.mouse={x:event.pageX,y:event.pageY};
if(self.status.disabled===false
&&self.options.position.adjust.mouse===true
&&self.options.position.type!=='static'
&&self.elements.tooltip.css('display')!=='none')
self.updatePosition(event);
});
};
};
function screenAdjust(position,target,tooltip)
{
var self,adjustedPosition,adjust,newCorner,overflow,corner;
self=this;
if(tooltip.corner=='center') return target.position
adjustedPosition=jQuery.extend({},position);
newCorner={x:false,y:false};
overflow={
left:(adjustedPosition.left<jQuery.fn.qtip.cache.screen.scroll.left),
right:(adjustedPosition.left+tooltip.dimensions.width+2>=jQuery.fn.qtip.cache.screen.width+jQuery.fn.qtip.cache.screen.scroll.left),
top:(adjustedPosition.top<jQuery.fn.qtip.cache.screen.scroll.top),
bottom:(adjustedPosition.top+tooltip.dimensions.height+2>=jQuery.fn.qtip.cache.screen.height+jQuery.fn.qtip.cache.screen.scroll.top)
};
adjust={
left:(overflow.left&&(tooltip.corner.search(/right/i)!=-1||(tooltip.corner.search(/right/i)==-1&&!overflow.right))),
right:(overflow.right&&(tooltip.corner.search(/left/i)!=-1||(tooltip.corner.search(/left/i)==-1&&!overflow.left))),
top:(overflow.top&&tooltip.corner.search(/top/i)==-1),
bottom:(overflow.bottom&&tooltip.corner.search(/bottom/i)==-1)
};
if(adjust.left)
{
if(self.options.position.target!=='mouse')
adjustedPosition.left=target.position.left+target.dimensions.width;
else
adjustedPosition.left=self.cache.mouse.x
newCorner.x='Left';
}
else if(adjust.right)
{
if(self.options.position.target!=='mouse')
adjustedPosition.left=target.position.left-tooltip.dimensions.width;
else
adjustedPosition.left=self.cache.mouse.x-tooltip.dimensions.width;
newCorner.x='Right';
};
if(adjust.top)
{
if(self.options.position.target!=='mouse')
adjustedPosition.top=target.position.top+target.dimensions.height;
else
adjustedPosition.top=self.cache.mouse.y
newCorner.y='top';
}
else if(adjust.bottom)
{
if(self.options.position.target!=='mouse')
adjustedPosition.top=target.position.top-tooltip.dimensions.height;
else
adjustedPosition.top=self.cache.mouse.y-tooltip.dimensions.height;
newCorner.y='bottom';
};
if(adjustedPosition.left<0)
{
adjustedPosition.left=position.left;
newCorner.x=false;
};
if(adjustedPosition.top<0)
{
adjustedPosition.top=position.top;
newCorner.y=false;
};
if(self.options.style.tip.corner!==false)
{
adjustedPosition.corner=new String(tooltip.corner);
if(newCorner.x!==false) adjustedPosition.corner=adjustedPosition.corner.replace(/Left|Right|Middle/,newCorner.x);
if(newCorner.y!==false) adjustedPosition.corner=adjustedPosition.corner.replace(/top|bottom/,newCorner.y);
if(adjustedPosition.corner!==self.elements.tip.attr('rel'))
createTip.call(self,adjustedPosition.corner);
};
return adjustedPosition;
};
function jQueryStyle(style,sub)
{
var styleObj,i;
styleObj=jQuery.extend(true,{},style);
for(i in styleObj)
{
if(sub===true&&i.search(/(tip|classes)/i)!==-1)
delete styleObj[i];
else if(!sub&&i.search(/(width|border|tip|title|classes|user)/i)!==-1)
delete styleObj[i];
};
return styleObj;
};
function sanitizeStyle(style)
{
if(typeof style.tip!=='object') style.tip={corner:style.tip};
if(typeof style.tip.size!=='object') style.tip.size={width:style.tip.size,height:style.tip.size};
if(typeof style.border!=='object') style.border={width:style.border};
if(typeof style.width!=='object') style.width={value:style.width};
if(typeof style.width.max=='string') style.width.max=parseInt(style.width.max.replace(/([0-9]+)/i,"jQuery1"));
if(typeof style.width.min=='string') style.width.min=parseInt(style.width.min.replace(/([0-9]+)/i,"jQuery1"));
if(typeof style.tip.size.x=='number')
{
style.tip.size.width=style.tip.size.x;
delete style.tip.size.x;
};
if(typeof style.tip.size.y=='number')
{
style.tip.size.height=style.tip.size.y;
delete style.tip.size.y;
};
return style;
};
function buildStyle()
{
var self,i,styleArray,styleExtend,finalStyle,ieAdjust;
self=this;
styleArray=[true,{}];
for(i=0;i<arguments.length;i++)
styleArray.push(arguments[i]);
styleExtend=[jQuery.extend.apply(jQuery,styleArray)];
while(typeof styleExtend[0].name=='string')
{
styleExtend.unshift(sanitizeStyle(jQuery.fn.qtip.styles[styleExtend[0].name]));
};
styleExtend.unshift(true,{classes:{tooltip:'qtip-'+(arguments[0].name||'defaults')}},jQuery.fn.qtip.styles.defaults);
finalStyle=jQuery.extend.apply(jQuery,styleExtend);
ieAdjust=(jQuery.browser.msie)?1:0;
finalStyle.tip.size.width+=ieAdjust;
finalStyle.tip.size.height+=ieAdjust;
if(finalStyle.tip.size.width%2>0) finalStyle.tip.size.width+=1;
if(finalStyle.tip.size.height%2>0) finalStyle.tip.size.height+=1;
if(finalStyle.tip.corner===true)
finalStyle.tip.corner=(self.options.position.corner.tooltip==='center')?false:self.options.position.corner.tooltip;
return finalStyle;
};
function calculateTip(corner,width,height)
{
var tips={
bottomRight:[[0,0],[width,height],[width,0]],
bottomLeft:[[0,0],[width,0],[0,height]],
topRight:[[0,height],[width,0],[width,height]],
topLeft:[[0,0],[0,height],[width,height]],
topMiddle:[[0,height],[width/2,0],[width,height]],
bottomMiddle:[[0,0],[width,0],[width/2,height]],
rightMiddle:[[0,0],[width,height/2],[0,height]],
leftMiddle:[[width,0],[width,height],[0,height/2]]
};
tips.leftTop=tips.bottomRight;
tips.rightTop=tips.bottomLeft;
tips.leftBottom=tips.topRight;
tips.rightBottom=tips.topLeft;
return tips[corner];
};
function calculateBorders(radius)
{
var borders;
if(jQuery('<canvas>').get(0).getContext)
{
borders={
topLeft:[radius,radius],topRight:[0,radius],
bottomLeft:[radius,0],bottomRight:[0,0]
};
}
else if(jQuery.browser.msie)
{
borders={
topLeft:[-90,90,0],topRight:[-90,90,-radius],
bottomLeft:[90,270,0],bottomRight:[90,270,-radius]
};
};
return borders;
};
function bgiframe()
{
var self,html,dimensions;
self=this;
dimensions=self.getDimensions();
html='<iframe class="qtip-bgiframe" frameborder="0" tabindex="-1" src="javascript:false" '+
'style="display:block; position:absolute; z-index:-1; filter:alpha(opacity=\'0\'); border: 1px solid red; '+
'height:'+dimensions.height+'px; width:'+dimensions.width+'px" />';
self.elements.bgiframe=self.elements.wrapper.prepend(html).children('.qtip-bgiframe:first');
};
jQuery(document).ready(function()
{
jQuery.fn.qtip.cache={
screen:{
scroll:{left:jQuery(window).scrollLeft(),top:jQuery(window).scrollTop()},
width:jQuery(window).width(),
height:jQuery(window).height()
}
};
var adjustTimer;
jQuery(window).bind('resize scroll',function(event)
{
clearTimeout(adjustTimer);
adjustTimer=setTimeout(function()
{
if(event.type==='scroll')
jQuery.fn.qtip.cache.screen.scroll={left:jQuery(window).scrollLeft(),top:jQuery(window).scrollTop()};
else
{
jQuery.fn.qtip.cache.screen.width=jQuery(window).width();
jQuery.fn.qtip.cache.screen.height=jQuery(window).height();
};
for(i=0;i<jQuery.fn.qtip.interfaces.length;i++)
{
var api=jQuery.fn.qtip.interfaces[i];
if(api.status.rendered===true
&&(api.options.position.type!=='static'
||api.options.position.adjust.scroll&&event.type==='scroll'
||api.options.position.adjust.resize&&event.type==='resize'))
{
api.updatePosition(event,true);
}
};
}
,100);
})
jQuery(document).bind('mousedown.qtip',function(event)
{
if(jQuery(event.target).parents('div.qtip').length===0)
{
jQuery('.qtip[unfocus]').each(function()
{
var api=jQuery(this).qtip("api");
if(jQuery(this).is(':visible')&&!api.status.disabled
&&jQuery(event.target).add(api.elements.target).length>1)
api.hide(event);
})
};
})
});
jQuery.fn.qtip.interfaces=[]
jQuery.fn.qtip.log={error:function(){return this;}};
jQuery.fn.qtip.constants={};
jQuery.fn.qtip.defaults={
content:{
prerender:false,
text:false,
url:false,
data:null,
title:{
text:false,
button:false
}
},
position:{
target:false,
corner:{
target:'bottomRight',
tooltip:'topLeft'
},
adjust:{
x:0,y:0,
mouse:true,
screen:false,
scroll:true,
resize:true
},
type:'absolute',
container:false
},
show:{
when:{
target:false,
event:'mouseover'
},
effect:{
type:'fade',
length:100
},
delay:140,
solo:false,
ready:false
},
hide:{
when:{
target:false,
event:'mouseout'
},
effect:{
type:'fade',
length:100
},
delay:0,
fixed:false
},
api:{
beforeRender:function(){},
onRender:function(){},
beforePositionUpdate:function(){},
onPositionUpdate:function(){},
beforeShow:function(){},
onShow:function(){},
beforeHide:function(){},
onHide:function(){},
beforeContentUpdate:function(){},
onContentUpdate:function(){},
beforeContentLoad:function(){},
onContentLoad:function(){},
beforeTitleUpdate:function(){},
onTitleUpdate:function(){},
beforeDestroy:function(){},
onDestroy:function(){},
beforeFocus:function(){},
onFocus:function(){}
}
};
jQuery.fn.qtip.styles={
defaults:{
background:'white',
color:'#111',
overflow:'hidden',
textAlign:'left',
width:{
min:0,
max:250
},
padding:'5px 9px',
border:{
width:1,
radius:0,
color:'#d3d3d3'
},
tip:{
corner:false,
color:false,
size:{width:13,height:13},
opacity:1
},
title:{
background:'#e1e1e1',
fontWeight:'bold',
padding:'7px 12px'
},
button:{
cursor:'pointer'
},
classes:{
target:'',
tip:'qtip-tip',
title:'qtip-title',
button:'qtip-button',
content:'qtip-content',
active:'qtip-active'
}
},
cream:{
border:{
width:3,
radius:0,
color:'#F9E98E'
},
title:{
background:'#F0DE7D',
color:'#A27D35'
},
background:'#FBF7AA',
color:'#A27D35',
classes:{tooltip:'qtip-cream'}
},
light:{
border:{
width:3,
radius:0,
color:'#E2E2E2'
},
title:{
background:'#f1f1f1',
color:'#454545'
},
background:'white',
color:'#454545',
classes:{tooltip:'qtip-light'}
},
dark:{
border:{
width:3,
radius:0,
color:'#303030'
},
title:{
background:'#404040',
color:'#f3f3f3'
},
background:'#505050',
color:'#f3f3f3',
classes:{tooltip:'qtip-dark'}
},
red:{
border:{
width:3,
radius:0,
color:'#CE6F6F'
},
title:{
background:'#f28279',
color:'#9C2F2F'
},
background:'#F79992',
color:'#9C2F2F',
classes:{tooltip:'qtip-red'}
},
green:{
border:{
width:3,
radius:0,
color:'#A9DB66'
},
title:{
background:'#b9db8c',
color:'#58792E'
},
background:'#CDE6AC',
color:'#58792E',
classes:{tooltip:'qtip-green'}
},
blue:{
border:{
width:3,
radius:0,
color:'#ADD9ED'
},
title:{
background:'#D0E9F5',
color:'#5E99BD'
},
background:'#E5F6FE',
color:'#4D9FBF',
classes:{tooltip:'qtip-blue'}
}
};
})(jQuery);
*

Zombeee

  • Захожу иногда
  • 328
  • 55 / 3
Re: Ошибка в сплывающем окошке.
« Ответ #40 : 10.02.2010, 15:57:04 »
ну вот он должен подключаться в хедере сайта автоматически, у тебя его нет... а вот где копать, пока не подскажу...
*

DKsN

  • Захожу иногда
  • 258
  • 15 / 0
  • [BODY]
Re: Ошибка в сплывающем окошке.
« Ответ #41 : 10.02.2010, 16:21:22 »
ну вот он должен подключаться в хедере сайта автоматически, у тебя его нет... а вот где копать, пока не подскажу...
Скажи какой файл выложить, если надо посмотреть. а то у меня вообще вариантов нет, кроме delete all )
*

Zombeee

  • Захожу иногда
  • 328
  • 55 / 3
Re: Ошибка в сплывающем окошке.
« Ответ #42 : 10.02.2010, 19:47:43 »
посмотри файлик /views/views.php, строка 155, должен быть такой текст:

Код
	$js	= '/assets/jquery.qtip-1.0.0-rc3.min.js';

вот эта строка по идее подключает нужную библиотеку...
*

Zombeee

  • Захожу иногда
  • 328
  • 55 / 3
Re: Ошибка в сплывающем окошке.
« Ответ #43 : 10.02.2010, 19:48:16 »
если нет такой строки, просто возьми из архива версии 1.6 этот файлик и руками перезалей

так, кстати глюк, они 2 раза подряд подключают эту библиотеку :)

хотя, скорее всего это не совсем то, что нужно... дело в том, что я в API самой Joomla не разбирался никогда и в каком месте компоненты могут отправлять ей header'ы не знаю....

покопался ещё, похоже всё-таки это единственное место, где может вызываться этот скрипт, точнее он не вызывается там, а только лишь данные о нем отправляются в файл скрипта controllers/controllers.php и в строке 32 идет добавление в хедер

Цитировать
$document->addCustomTag($js);

как-то так:)
« Последнее редактирование: 10.02.2010, 20:07:31 от Zombeee »
*

DKsN

  • Захожу иногда
  • 258
  • 15 / 0
  • [BODY]
Re: Ошибка в сплывающем окошке.
« Ответ #44 : 10.02.2010, 22:22:20 »
views.php Не нашёл такой строки.

Код
<?php
/**
 * @package JomSocial
 * @subpackage Core
 * @copyright (C) 2008 by Slashes & Dots Sdn Bhd - All rights reserved!
 * @license http://www.jomsocial.com Copyrighted Commercial Software
 */
defined('_JEXEC') or die();
jimport( 'joomla.application.component.view');

class CommunityView extends JView
{
var $_info = array();
var $_warning = array();
var $_error = array();
var $_submenu = array();
var $title = '';
var $_mini = '';
var $params = array();
var $_showMiniHeaderUser = '';

function __construct($config = array())
{
$mainframe =& JFactory::getApplication();
$this->my =& JFactory::getUser();
parent::__construct($config);
}

/**
*
**/
function setTitle($title) {
$this->title = $title;
}

/**
* Append the given message into a global info messages
* @param string the final message
*/
function addInfo($message)
{
$mainframe =& JFactory::getApplication();
$mainframe->enqueueMessage($message);
}

/**
* Adds a pathway item to the breadcrumbs
**/
function addPathway( $text , $link = '' )
{
// Set pathways
$mainframe =& JFactory::getApplication();
$pathway =& $mainframe->getPathway();

$pathwayNames = $pathway->getPathwayNames();

// Test for duplicates before adding the pathway
if( !in_array( $text , $pathwayNames ) )
{
$pathway->addItem( $text , $link );
}
}

/**
* Append the given message into a global warning messages
* @param string the final message
*/
function addWarning($message){
//$this->_warning[] = $message;
$mainframe =& JFactory::getApplication();
$mainframe->enqueueMessage($message, 'notice');
}

function attachMiniHeaderUser( $userId )
{
$this->_showMiniHeaderUser = $userId;
}

/**
*
*/
function addSubmenuItem($link ='', $title = '', $onclick='' , $isAction = false )
{
$obj = new stdClass();
$obj->link = $link;

// If onclick is used, completely ignore the following
if( !empty($onclick) )
{
$obj->onclick = $onclick;
}
else
{
// We need to get the view & task from the link that is provided in $link
// Remove default 'index.php?option=com_community&' from $link
$link = JString::str_ireplace('index.php?option=com_community&' , '' , $link);
$links  = explode('&' , $link );

// Pre-set the task so that links that does not contain task will not
// fail.
$obj->task  = '';
foreach( $links as $row )
{
$active  = explode('=' , $row);

if($active[0] == 'view')
  $obj->view  = $active[1];

if($active[0] == 'task')
   $obj->task  = $active[1];
}
}

$obj->action = $isAction;
$obj->title = $title;
$this->_submenu[] = $obj;
}

function showToolbar($data = null)
{
$mySQLVer = 0;
if(JFile::exists(JPATH_COMPONENT.DS.'libraries'.DS.'advancesearch.php'))
{
require_once (JPATH_COMPONENT.DS.'libraries'.DS.'advancesearch.php');
$mySQLVer = CAdvanceSearch::getMySQLVersion();
}

require_once (JPATH_COMPONENT.DS.'libraries'.DS.'toolbar.php');
require_once (JPATH_COMPONENT.DS.'libraries'.DS.'miniheader.php');
$format = JRequest::getVar('format' , 'html' , 'get');

if($format == 'json')
return;

$mainframe =& JFactory::getApplication();
$document =& JFactory::getDocument();
$my = CFactory::getUser();

$userid = JRequest::getVar( 'userid' , '' );
$user = CFactory::getUser($userid);

// Get the configuration object.
$config =& CFactory::getConfig();

//JHTML::_('behavior.tooltip');

$js = '/assets/window-1.0';
$js .= ( $config->getBool('usepackedjavascript') )? '.pack.js' : '.js';
CAssets::attach($js, 'js');

$js = '/assets/script-1.2';
$js .= ( $config->getBool('usepackedjavascript') )? '.pack.js' : '.js';
CAssets::attach($js, 'js');

$js = '<script type=\'text/javascript\'>';
$js .= '/*<![CDATA[*/';
$js .= 'var js_viewerId  = '. $my->id .'; ';
$js .= 'var js_profileId = '. $user->id .';';
$js .= '/*]]>*/';
$js .= '</script>';
$mainframe->addCustomHeadTag($js);

CFactory::load( 'libraries' , 'template' );
CTemplate::addStyleSheet( 'style' );

// FOr iPhone, we need to add the stylesheet AFTER the main stylesheet has been loaded
if(JRequest::getVar('format') =='iphone')
{
$document->addStylesheet( JURI::root(). 'components/com_community/templates/default/css/style.iphone.css' );
}

// This need to be loaded in main messaging library
CFactory::load( 'libraries' , 'window' );
CWindow::load();

// add alternate CSS file
$overrideExists = JFolder::exists( JPATH_ROOT . DS . 'templates' . DS . $mainframe->getTemplate(). DS . 'html' . DS . 'com_community' );

$styleIE7Path = JPATH_ROOT . DS . 'templates' . DS . $mainframe->getTemplate(). DS . 'html' . DS . 'com_community' . DS . 'css' . DS . 'styleIE7.css';
$tmplIE7Path = JPATH_ROOT . DS . 'components' . DS . 'com_community' . DS . 'templates' . DS . $config->get( 'template' ). DS . 'css' . DS . 'styleIE7.css';

if( JFile::exists( $styleIE7Path ) )
{
$styleIE7File = '/templates/' . $mainframe->getTemplate(). '/html/com_community/css/styleIE7.css';
}
else if( JFile::exists( $tmplIE7Path ) && !$overrideExists )
{
$styleIE7File = '/components/com_community/templates/' . $config->get( 'template' ). '/css/styleIE7.css';
}
else
{
$styleIE7File = '/components/com_community/templates/default/css/styleIE7.css';
}

$styleIE6Path = JPATH_ROOT . DS . 'templates' . DS . $mainframe->getTemplate(). DS . 'html' . DS . 'com_community' . DS . 'css' . DS . 'styleIE6.css';
$tmplIE6Path = JPATH_ROOT . DS . 'components' . DS . 'com_community' . DS . 'templates' . DS . $config->get( 'template' ). DS . 'css' . DS . 'styleIE6.css';

if( JFile::exists( $styleIE6Path ) )
{
$styleIE6File = '/templates/' . $mainframe->getTemplate(). '/html/com_community/css/styleIE6.css';
}
else if( JFile::exists( $tmplIE6Path ) && !$overrideExists )
{
$styleIE6File = '/components/com_community/templates/' . $config->get( 'template' ). '/css/styleIE6.css';
}
else
{
$styleIE6File = '/components/com_community/templates/default/css/styleIE6.css';
}

$css = '
<!-- JomSocial -->
<!--[if IE 7.0]>
<link rel="stylesheet" href="'. rtrim( JURI::root(), '/' ). $styleIE7File . '" type="text/css" />
<![endif]-->
<!--[if lte IE 6]>
<link rel="stylesheet" href="'. rtrim( JURI::root(), '/' ). $styleIE6File . '" type="text/css" />
<![endif]-->';

$mainframe->addCustomHeadTag( $css );

        $css = '/assets/autocomplete.css';
CAssets::attach($css, 'css');

$task = JRequest::getVar( 'task' , '' , 'GET' );
$groupId = JRequest::getVar( 'groupid' , '' , 'GET' );

// Hide the toolbar from unregistered user
// but still show the mini header
if(empty($my->id))
{
if( !empty($groupId) && $task != 'viewgroup' )
{
CFactory::load( 'libraries' , 'miniheader' );
echo CMiniHeader::showGroupMiniHeader( $groupId );
return;
}

echo CMiniHeader::showMiniHeader($this->_showMiniHeaderUser);
return;
}

/**
* Inbox unread count
*/
$inboxUnread = 0;
if(! empty($data['inbox'])) $inboxUnread = $data['inbox'];

/**
* Notification alert
*/
$notiAlert = 0;
$notiAlert = $this->_newNotification();

if ( (!empty($notiAlert)) && ($notiAlert > 0) )
{
CFactory::load( 'libraries' , 'window' );

CWindow::load();
}

$config =& CFactory::getConfig();
$logoutLink = CRoute::_( 'index.php?option=com_community&view=frontpage' , false );
$logoutLink = base64_encode( $logoutLink );

// Script needs to be here if they are
CFactory::load( 'libraries' , 'facebook' );
CFactory::load( 'models' , 'connect' );

// Once they reach here, we assume that they are already logged into facebook.
// Since CFacebook library handles the security we don't need to worry about any intercepts here.
$facebook = new CFacebook( FACEBOOK_LOGIN_NOT_REQUIRED );
$connectTable =& JTable::getInstance( 'Connect' , 'CTable' );
$connectId = $facebook->lib->get_loggedin_user();
$connectTable->load( $connectId );

$isFacebookUser = ( $connectTable->userid == $my->id )? true : false;


$groupMiniHeader= '';
// Show miniheader
if( $task != 'viewgroup' )
{
CFactory::load( 'libraries' , 'miniheader' );
$groupMiniHeader = CMiniHeader::showGroupMiniHeader( $groupId );
}
$tmpl = new CTemplate();
$tmpl->set('my', $my);
$tmpl->set('isMine', isMine($my->id, $user->id));
$tmpl->set('config' , $config);
$tmpl->set('inboxUnread', $inboxUnread);
$tmpl->set('notiAlert', $notiAlert);
$tmpl->set('miniheader', CMiniHeader::showMiniHeader($this->_showMiniHeaderUser));
$tmpl->set('groupMiniHeader', $groupMiniHeader );
$tmpl->set('showAdvanceSearch', ($mySQLVer > 4.1)? 1 : 0);
$tmpl->set( 'logoutLink' , $logoutLink );
$tmpl->set( 'isFacebookUser' , $isFacebookUser );

$toolbar =& CFactory::getToolbar();
$tmpl->set('customToolbar', $toolbar);

echo $tmpl->fetch('toolbar.index');
}

/**
*
*/
function showSubmenu( )
{
if(!empty($this->_submenu)){
$view   = JRequest::getVar('view' , '' , 'GET');
    $task   = JRequest::getVar('task' , '' , 'GET');

$tmpl = new CTemplate();
$tmpl ->set('submenu', $this->_submenu);
$tmpl ->set('view', $view);
$tmpl ->set('task', $task);
echo $tmpl->fetch('toolbar.submenu');
unset($tmpl);
}
}

/**
* Return the page header
* @return string
*/
function showHeader($title, $icon = null, $buttons = null){

$view = JRequest::getVar('view', 'frontpage', 'REQUEST');
$task = JRequest::getVar('task', '', 'REQUEST');

   $style = '';
   if ( $icon != null )
       $style .= ' toolbar-icon-'.$icon;
       
   $showHead = true;
   
   // Do not add header to know page, profile
if(($view == 'profile' && ($task == '' || $task == 'display')) || $view == 'frontpage')
$showHead = false;


if($showHead){
$tmpl = new CTemplate();
$tmpl->set('style', $style);
$tmpl->set('title', $title);

echo $tmpl->fetch('toolbar.header');
}
}

/**
* Return page submenu
*/
function getSubMenu(){
}

/**
* Get the processed content
*
* @param string $tplName method name to call
* @param array $data data for the template
* @param string $cached should we result be cached?
* @return string the final output
*/
function get($tplName, $data=null, $cached=false){

if(!empty($tplName) && is_callable(array($this, $tplName))){

ob_start();
$this->$tplName($data);
$html = ob_get_contents();
ob_end_clean();


$info = '';
if(!empty($this->_info)){
foreach($this->_info as $msg){
$info .= $this->info($msg);
}
}

$warning = '';
if(!empty($this->_warning)){
foreach($this->_warning as $msg){
$warning .= $this->warning($msg);
}
}

$error = '';
$messages = array($error, $warning, $info);

// append all warning, error and info
$html = JString::str_ireplace(array('{error}','{warning}', '{info}'), $messages, $html);
return $html;

} else {
JError::raiseError( 500, JText::sprintf('CC VIEW NOT FOUND' , $tplName) );
}

}

/**
* Check if current user has the correct permission to view the page.
* We will validate access based on the current profile privacy setting and
* the access type give. Should be called by view
*
* @param string type The access type, one of CUser param variables or
* mine (active profile = my id)/registered(any registered user)
* @param bool $showWarning
* @return bool true if access is OK
*/
function accessAllowed($type = '', $showWarning = true)
{
if(empty($type))
return true;

$my = CFactory::getUser();

$userid = JRequest::getVar( 'userid' , '' );
$user = CFactory::getUser($userid);


// @rule: For site administrators / community admin, we should allow access
// no matter what the privacy is.
CFactory::load( 'helpers' , 'owner' );
if( isCommunityAdmin() )
{
return true;
}

if($type == 'registered')
{
if(!$my->id){
$mainframe =& JFactory::getApplication();
$mainframe->enqueueMessage(JText::_('CC RESTRICTED ACCESS'), 'notice');
$tmpl = new CTemplate();
echo $tmpl->fetch('notice.access');
return false;
} else
return true;
}

// you can always view your own profile
if(isMine($my->id, $user->id)){
return true;
}

$param =& $user->getParams();

if($type == 'mine')
$access = PRIVACY_PRIVATE;
else
$access = $param->get($type);

switch($access){
case PRIVACY_PUBLIC:
return true;
break;

case PRIVACY_MEMBERS:
if( $my->id == 0 )
{
$mainframe =& JFactory::getApplication();
$mainframe->enqueueMessage(JText::_('CC RESTRICTED ACCESS'), 'notice');
$tmpl = new CTemplate();

if($type == 'privacyProfileView')
{
$userInfo = $this->_prepUser($user);
if(! empty($userInfo))
{
$tmpl->set('data', $userInfo);
$tmpl->set('sortings', '');
$tmpl->set('featuredList' , '');
$tmpl->set('isCommunityAdmin','');
echo $tmpl->fetch('people.browse');
}
else
//user object not found.
echo $tmpl->fetch('notice.access');

}
else
{
echo $tmpl->fetch('notice.access');
}
return false;
}
return true;
break;

case PRIVACY_FRIENDS:
CFactory::load('helpers', 'friends');

if( !friendIsConnected($my->id, $user->id) )
{
$mainframe =& JFactory::getApplication();
$mainframe->enqueueMessage(JText::_('CC RESTRICTED ACCESS'), 'notice');
$tmpl = new CTemplate();

if($type == 'privacyProfileView')
{
$userInfo = $this->_prepUser($user);
if(! empty($userInfo))
{
$tmpl->set('data', $userInfo);
$tmpl->set('sortings', '');// add this variable to avoid error thrown.
$tmpl->set('featuredList' , '');
$tmpl->set('isCommunityAdmin','');
echo $tmpl->fetch('people.browse');
}
else
//user object not found.
echo $tmpl->fetch('notice.access');

}
else
echo $tmpl->fetch('notice.access');

return false;
}
else
return true;

break;

case PRIVACY_PRIVATE:

if($my->id != $user->id)
{
$mainframe =& JFactory::getApplication();
$mainframe->enqueueMessage(JText::_('CC RESTRICTED ACCESS'), 'error');
$tmpl = new CTemplate();
echo $tmpl->fetch('notice.access');
return false;
} else
return true;

break;
}

return true;
}

/**
* Test if the application is viewable by the current browser.
*
* @param string $privacy The privacy settings for the app.
* @return bool true if access is OK
*/
function appPrivacyAllowed( $privacy = 0 )
{
if( $privacy == 0 )
{
return true;
}

$my = CFactory::getUser();
$userid = JRequest::getVar( 'userid' , '' );
$user = CFactory::getUser($userid);

$mainframe =& JFactory::getApplication();

switch( $privacy )
{
case PRIVACY_APPS_FRIENDS:
if( !friendIsConnected($my->id, $user->id) )
{
return false;
}
break;
case PRIVACY_APPS_SELF:
if( $my->id != $user->id )
{
return false;
}
break;
}
return true;
}

/**
* Show profile miniheader
*/
function _getMiniHeader()
{
CFactory::load( 'helpers' , 'friends' );

   $my = CFactory::getUser();
   
        $config =& CFactory::getConfig();

   if ( !empty( $this->_showMiniHeaderUser ) )
{
$user = CFactory::getUser( $this->_showMiniHeaderUser );

CFactory::load( 'libraries' , 'messaging' );
$sendMsg = CMessaging::getPopup ( $user->id );
         $tmpl = new CTemplate();
         $tmpl->set( 'my' , $my);
         $tmpl->set( 'user' , $user);
         $tmpl->set( 'isMine' , isMine($my->id, $user->id));
         $tmpl->set( 'sendMsg' , $sendMsg );
         $tmpl->set( 'config' , $config );
         $tmpl->set( 'isFriend' , friendIsConnected ( $user->id, $my->id ) && $user->id != $my->id );
         return $tmpl->fetch('profile.miniheader');
        }
}

/**
*
*/
function _newNotification()
{
$my = CFactory::getUser();

$inboxModel =& CFactory::getModel( 'inbox' );
$friendModel =& CFactory::getModel ( 'friends' );

$filter = array();
$filter ['user_id'] = $my->id;
$inboxAlert = $inboxModel->countUnRead( $filter );
$frenAlert = $friendModel->countPending( $my->id );

return ($inboxAlert + $frenAlert);
}


/**
* This function will prep user info so that it can display user mini header in privacy warning template.
* Do not call this function outside this view.php
*/

function _prepUser( $user )
{
if(! empty($user))
{
$obj = new stdClass();
$my = CFactory::getUser();
$user = CFactory::getUser( $user->id );
$obj->friendsCount  = $user->getFriendCount();
$obj->user = $user;
$obj->profileLink = CUrl::build( 'profile' , '' , array( 'userid' => $user->id ) );
$isFriend = friendIsConnected( $user->id, $my->id );

$obj->addFriend = ((! $isFriend) && ($my->id != 0) && $my->id != $user->id)? true : false;
return array( $obj );
}

return false;

}
}

controller.php то же ничего похожего.

Код
<?php
/**
 * @package JomSocial
 * @copyright (C) 2008 by Slashes & Dots Sdn Bhd - All rights reserved!
 * @license Copyrighted Commercial Software
 */
 
// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die();

jimport('joomla.application.component.controller');

/**
 * Content Component Controller
 *
 * @package Joomla
 * @subpackage Content
 * @since 1.5
 */
class CommunityBaseController extends JController
{
var $_modelInstances = array();
var $_libraryInstances = array();
var $_viewInstances = array();
var $_name;
var $_icon = 'generic';
var $my = null;

function getName(){
return $this->_name;
}

function CommunityBaseController($config = array()){

if(!empty($config)){
$this->_name = $config['name'];
}
$this->my =& JFactory::getUser();
}

/**
* Add to notification
*/
function _notify($cmd, $from, $to, $subject, $body, $template='', $data=''){
require_once (JPATH_COMPONENT.DS.'libraries'.DS.'notification.php');

$nt = new CNotificationLibrary();
$nt->add($cmd, $from, $to , $subject, $body, $template, $data);
}

/**
* A guest trying to use registered-only part of the system via ajax. Display
* a link to register  
*/
function ajaxBlockUnregister()
{
$objResponse = new JAXResponse();
$uri = CFactory::getLastURI();
$uri = base64_encode($uri);
$config =& CFactory::getConfig();
$tmpl = new CTemplate();
$tmpl->set( 'uri' , $uri );
$tmpl->set( 'config' , $config );
$html = $tmpl->fetch( 'block.unregistered' );

$objResponse->addAssign('cWindowContent', 'innerHTML', $html);
$objResponse->addScriptCall('cWindowResize', 260);
return $objResponse->sendResponse();
}

/**
* Block user access to the  controller method.
*/
function blockUserAccess()
{
$document =& JFactory::getDocument();
$document->setTitle(JText::_('CC ACCESS FORBIDDEN'));
echo JText::_('CC ACCESS FORBIDDEN');
return true;

}

// Block non-login mebers
function blockUnregister()
{
$my = CFactory::getUser();
$config =& CFactory::getConfig();

if($my->id == 0)
{
$config =& CFactory::getConfig();

$uri = CRoute::getURI();
$uri = base64_encode($uri);
$tmpl = new CTemplate();

$fbHtml = '';

if( $config->get('fbconnectkey') && $config->get('fbconnectsecret') )
{
CFactory::load( 'libraries' , 'facebook' );
$facebook = new CFacebook( FACEBOOK_LOGIN_NOT_REQUIRED );
$fbHtml = $facebook->getButtonHTML();
}
$tmpl->set( 'fbHtml' , $fbHtml );
$tmpl->set( 'return' , $uri );
$tmpl->set( 'config' , $config );
$html = $tmpl->fetch( 'guests.denied' );
echo $html;
return true;
}

return false;
}

/**
* Return the view object, which will output the final html. The view object
* is a singleton
*
* @param string view name
* #param string view class prefix, optional
* @param string document type, html/pdf/etc/
* @return object the view object
*/
function getView($viewName ='frontpage', $prefix = '', $viewType = '')
{
return CFactory::getView($viewName, $prefix, $viewType);
}


function loadHelper($name){
include_once(JPATH_COMPONENT.DS.'helpers'.DS.$name.'.php');
}

function getLibrary( $name = '', $prefix = '', $config = array() ){
if(!isset($this->_libraryInstances[$name]))
{
include_once(JPATH_COMPONENT.DS.'libraries'.DS.$name.'.php');
$classname = 'CommunityLib'.$name;
$this->_libraryInstances[$name] = new $classname;
}
return $this->_libraryInstances[$name];
}

//debug data
function _dump(&$data){

   echo '<pre>';
print_r($data);
echo '</pre>';
exit;

}

/**
* Return the model object, responsible for all db manipulation. Singleton
*
* @param string model name
* @param string any class prefix
* @return object model object
*/
function getModel( $name = '', $prefix = '', $config = array() )
{
return CFactory::getModel($name, $prefix, $config);
}

// Our own display function
function display($cachable = false)
{
$document =& JFactory::getDocument();

$viewType = $document->getType();
  $viewName = JRequest::getCmd( 'view', $this->getName() );
  $viewLayout = JRequest::getCmd( 'layout', 'default' );

$view = & $this->getView( $viewName, '', $viewType);

// Display the view
if ($cachable) {
global $option;
$cache =& JFactory::getCache($option, 'view');
$cache->get($view, 'display');
} else {
$view->profile();
}
}

/**
* Execute a request
*/
function execute($task= ''){
global  $mainframe;
$document =& JFactory::getDocument();
$my =& JFactory::getUser();
$pathway =& $mainframe->getPathway();

$menus =& JSite::getMenu();
$menuitem =& $menus->getActive();

$tmpl = JRequest::getVar('tmpl','' , 'REQUEST');
$format = JRequest::getVar( 'format' , '' , 'REQUEST' );
$nohtml = JRequest::getVar( 'no_html' , '' , 'REQUEST' );
if($tmpl != 'component' && $format != 'feed' && $nohtml != 1 )
{
// This is to fix MSIE that has incorrect user agent because jquery doesn't detect correctly.
$ieFix = "<!--[if IE 6]>
<script type=\"text/javascript\">
var jomsIE6 = true;
</script>
<![endif]-->";

$document->addCustomTag($ieFix);
}

// Add custom CSS for the specific view if needed.
$config = CFactory::getConfig();
$viewName = JString::strtolower( JRequest::getVar('view' , '' , 'REQUEST' ) );
jimport( 'joomla.filesystem.file' );

if( $config->get( 'enablecustomviewcss' ) )
{
$template = $config->get('template');
$path = COMMUNITY_COM_PATH . DS . 'templates' . DS . $template . DS . 'css';

// Attach CSS if needed.
if( JFile::exists( $path . DS . $viewName . '.css' ) )
{
CAssets::attach( JURI::root(). 'components/com_community/templates/' . $template . '/css/' . $viewName . '.css' , 'css');
}
}

$html = '<div id="community-wrap">';

// Build the component menu module
ob_start();
CTemplate::renderModules('js_top');
$moduleHTML = ob_get_contents();
ob_end_clean();
$html .= $moduleHTML;

// Build the content HTML
ob_start();

CFactory::load( 'helpers' , 'azrul' );

$inbox =& $this->getModel('inbox');
$unread = $inbox->countUnRead(array('user_id'=>$my->id));
$param = array('inbox' => $unread);

if( checkFolderExist( COMMUNITY_COM_PATH . DS . 'views' . DS . $viewName ) )
{
if(!empty($task) && method_exists($this, $task))
{
if(($viewName == 'search' && $task == 'advancesearch') && COMMUNITY_FREE_VERSION)
{
ob_start();
$output = ob_get_contents();
ob_end_clean();

$tmpl = new CTemplate();
$output .= $tmpl->fetch( 'freeversion.view' );
}
else
{
$this->$task();
$output = ob_get_contents();
ob_end_clean();
}
}
else
{
$this->display();
$output = ob_get_contents();
ob_end_clean();
}

// Build toolbar HTML
ob_start();
$view =& $this->getView(JRequest::getCmd('view', 'frontpage'));
$view->showToolbar($param);


// Header title will use view->title. If not specified, we will
// use current page title
$headerTitle = !empty($view->title)? $view->title : $document->getTitle();
$view->showHeader($headerTitle, $this->_icon );

$header = ob_get_contents();
ob_end_clean();

$html .= $header;

}
else
{
ob_start();
$view =& $this->getView( 'frontpage' );
$view->showToolbar($param);
$output = ob_get_contents();
ob_end_clean();

$tmpl = new CTemplate();

$output .= $tmpl->fetch( 'freeversion.view' );
}

// Build the component bottom module
ob_start();
CTemplate::renderModules('js_bottom');
$moduleHTML = ob_get_contents();
ob_end_clean();

$html .= $output.$moduleHTML.'</div>';

CFactory::load( 'helpers' , 'string' );
$html = cReplaceThumbnails($html);
$html = JString::str_ireplace(array('{error}','{warning}', '{info}'), '', $html);
echo $html;
}

/**
* Execute AJAX request
*/
function executeAjax($method, $ajaxArg)
{
if(!empty($method) && method_exists($this, $method))
{
$this->$method($ajaxArg);
//call_user_func('$this->'.$method, $ajaxArg);
}
else
{
$this->display();
}
}


}

JomSocial Version: 1.6.283
« Последнее редактирование: 10.02.2010, 22:26:14 от DKsN »
*

b2z

  • Глобальный модератор
  • 7290
  • 778 / 0
  • Разраблю понемногу
Re: Ошибка в сплывающем окошке.
« Ответ #45 : 10.02.2010, 22:24:09 »
Проблема может быть в конфликте в двух одновременно загруженных jQuery. У меня такое было с mod_superfishmenu
*

DKsN

  • Захожу иногда
  • 258
  • 15 / 0
  • [BODY]
Re: Ошибка в сплывающем окошке.
« Ответ #46 : 10.02.2010, 22:28:38 »
Проблема может быть в конфликте в двух одновременно загруженных jQuery. У меня такое было с mod_superfishmenu
Я об этом то же слышал. А какой компонент может ещё jQuery использовать, например ТУТ? :)
Или где можно посмотреть, чем ещё используется?
« Последнее редактирование: 10.02.2010, 22:40:27 от DKsN »
*

b2z

  • Глобальный модератор
  • 7290
  • 778 / 0
  • Разраблю понемногу
Re: Ошибка в сплывающем окошке.
« Ответ #47 : 10.02.2010, 23:07:58 »
Я об этом то же слышал. А какой компонент может ещё jQuery использовать, например ТУТ? :)
Или где можно посмотреть, чем ещё используется?
http://2shino.ru//modules/mod_achat/js/jquery.js

P.S.
Firefox + Firebug + YSlow спасут мир :)
*

Hansik

  • Захожу иногда
  • 95
  • 12 / 0
Re: Ошибка в сплывающем окошке.
« Ответ #48 : 10.02.2010, 23:35:01 »
Я там еще заметил у вас на странице одновременно работающий jQuery и mootools. А ошибка скрипта у вас такая:jQuery.fn.qtip is undefined
*

DKsN

  • Захожу иногда
  • 258
  • 15 / 0
  • [BODY]
Re: Ошибка в сплывающем окошке.
« Ответ #49 : 11.02.2010, 03:27:01 »
Firefox + Firebug + YSlow спасут мир :)
Firefox + Firebug, это имеется, но больше напоминает мартышку и очки)
Теперь ещё и YSlow поставлю, что бы "очки" в оправе были))
mod_achat... чёт расширения от Адептуса расстраивают последние время. Форум его недавно в ведро слил, теперь чат придётся видимо.
Я там еще заметил у вас на странице одновременно работающий jQuery и mootools. А ошибка скрипта у вас такая:jQuery.fn.qtip is undefined
А то что они вместе это плохо? Вроде разные, и по покалениям. У меня поиск mootools пользует.
Днём по отключаю всё и отпишусь - помогло или нет. Кстати, поиск уже, вроде, отключал и не повлияло.
*

Zombeee

  • Захожу иногда
  • 328
  • 55 / 3
Re: Ошибка в сплывающем окошке.
« Ответ #50 : 11.02.2010, 04:47:19 »
о каком конфликте скриптов может идти речь, если тут тупо в хедере библиотека не подключена :) Так что сначала надо её подключить, а потом уже смотреть появятся ли конфликты :)

[вложение удалено Администратором]
« Последнее редактирование: 11.02.2010, 04:54:20 от Zombeee »
*

savosik

  • Осваиваюсь на форуме
  • 42
  • 1 / 0
Re: Ошибка в сплывающем окошке.
« Ответ #51 : 11.02.2010, 05:01:37 »
Вот наблюдаю за веткой)) чем все кончиться...
я просто взял отключил коды которые выводили абракадабру img scr  и прочее...
теперь в подсказке выводит статус имя и друзей без картинок хотя и не в красивом окошке...
*

Zombeee

  • Захожу иногда
  • 328
  • 55 / 3
Re: Ошибка в сплывающем окошке.
« Ответ #52 : 11.02.2010, 05:39:18 »
Вот наблюдаю за веткой)) чем все кончиться...
я просто взял отключил коды которые выводили абракадабру img scr  и прочее...
теперь в подсказке выводит статус имя и друзей без картинок хотя и не в красивом окошке...

А ещё проще вообще интернет отключить, а письма на листочке писать и почтой России отправлять:)
Уход от проблемы не является её решением - это вам любой психолог скажет :)
*

DKsN

  • Захожу иногда
  • 258
  • 15 / 0
  • [BODY]
Re: Ошибка в сплывающем окошке.
« Ответ #53 : 11.02.2010, 13:07:45 »
я просто взял отключил коды которые выводили абракадабру img scr  и прочее...
теперь в подсказке выводит статус имя и друзей без картинок хотя и не в красивом окошке...
на данный момент, у вас на "однокурсниках", если речь о нём, так же выскакивает код
*

Stiffman

  • Новичок
  • 4
  • 1 / 0
Re: Ошибка в сплывающем окошке.
« Ответ #54 : 11.02.2010, 16:48:12 »
Друзья, прочитал я Ваши посты и меня натолкнуло на мысль проверить все загружаемые JQuery. FireFox с плагином дебагера позволяет показывать что грузится. Так вот, проблема действительно возникает когда подгружаются 2 библиотеки JQuery. У меня например конфликт был с модулем mod_amoney. Решение проблемы: отключение модуля для пункта меню социалки )
(можно и в настройках модуля mod_amoney указать чтоб не подгружал jQuery).
*

b2z

  • Глобальный модератор
  • 7290
  • 778 / 0
  • Разраблю понемногу
Re: Ошибка в сплывающем окошке.
« Ответ #55 : 11.02.2010, 22:51:50 »
Друзья, прочитал я Ваши посты и меня натолкнуло на мысль проверить все загружаемые JQuery. FireFox с плагином дебагера позволяет показывать что грузится. Так вот, проблема действительно возникает когда подгружаются 2 библиотеки JQuery. У меня например конфликт был с модулем mod_amoney. Решение проблемы: отключение модуля для пункта меню социалки )
(можно и в настройках модуля mod_amoney указать чтоб не подгружал jQuery).
Что и требовалось доказать ;)
*

DKsN

  • Захожу иногда
  • 258
  • 15 / 0
  • [BODY]
Re: Ошибка в сплывающем окошке.
« Ответ #56 : 12.02.2010, 10:25:53 »
Угу. Отключил чат Адептуса, который юзает JQuery,  и все всплывающие окошки заработали.
Грёбаный экибастуз, и инвайты заработали!
« Последнее редактирование: 12.02.2010, 10:29:31 от DKsN »
*

savosik

  • Осваиваюсь на форуме
  • 42
  • 1 / 0
Re: Ошибка в сплывающем окошке.
« Ответ #57 : 13.02.2010, 00:49:44 »
ну блин про jquery все было понятно...
Цитировать
<script type="text/javascript" src="http://odnokursniki.by/components/com_community/assets/jquery-1.3.2.pack.js"></script>
но у меня без этого не будет валить cometchat, который ой как удобен... консоль которого можно прокачать, что мам не балуй...  поэтому давайте обсудим что в самой библиотеке закомментить нужно, чтоб подсказки были... иначе низя...
*

kharol

  • Moderator
  • 1721
  • 217 / 0
Re: Ошибка в сплывающем окошке.
« Ответ #58 : 13.02.2010, 01:43:30 »
Угу. Отключил чат Адептуса, который юзает JQuery,  и все всплывающие окошки заработали.
Грёбаный экибастуз, и инвайты заработали!
Вот нифига себе... дела
Чтобы сказать "спасибо" достаточно нажать на "+"
Чтобы сделать бухгалтерскую проводку "спасибо" реквизиты: R192102130372, ЯД:41001768818003
*

SLZZZ

  • Захожу иногда
  • 157
  • 4 / 0
Re: Ошибка в сплывающем окошке.
« Ответ #59 : 01.03.2010, 02:09:39 »
Поставил себе 1.6 поверх 1.5 и то же столкнулся с всплывающим кодом, везде кроме разделов фото и видео. Лечится сменой шаблона самой Joomla да и то не всякого, у меня нашелся только один feel_free

Вылечил отключением JQuery  (Модераторам: а зачем было пост об этом удалять)

« Последнее редактирование: 12.03.2010, 16:54:06 от SLZZZ »
Чтобы оставить сообщение,
Вам необходимо Войти или Зарегистрироваться
 

Ошибка при установке шаблона GK Party Freak в JomSocial

Автор milkwebdesign

Ответов: 6
Просмотров: 3397
Последний ответ 13.10.2010, 14:49:40
от yrygvay