- Joined
- Apr 3, 2020
- Messages
- 204
- Points
- 53
Reputation:
Reputation:
Reputation:
LQD submitted a new resource:
Auto thread Thumbnail by Xenbros - This addon will add thread thumbnail from the first attachment of the Thread
Read more about this resource...
Reputation:
hi admin
how can i make in my forum when i upload in resources one file, automatically create thread discussion from the file with resources uploaded or created?
thanks
Reputation:
Reputation:
Reputation:
It seems, that this addon needs an update, but where can we fetch or buy it?
There is another one from lalavlah, but they still suck in some points though they have a high version with many updates.
Reputation:
I have forgotten the name of this other addon.
There is a problem with that addon, while a var is not defined. The addon will work though this error.
Reputation:
Reputation:
Do either of you have a solution for this? "Template error: [E_WARNING] Undefined variable $baseUrl" if not this addon shouldn't be released for 2.2
@BattleKing @ENXF NET
Reputation:
when did you get this error message
Reputation:
when i installed it yesterday just constant errors
Reputation:
Did you installed it from here? I just did the same, and I do not see any of these errors.
Reputation:
Weird, and yes I did install it from here.
Reputation:
it is not important, if you want, you can remove the $baerUrl . from the code
Reputation:
it is not important, if you want, you can remove the $baerUrl . from the code
Reputation:
Not finding any baerUrl code in what file should I look in.
Reputation:
It is in \src\addons\xenbros\Threadthumbnail\Entity\Thread.php
<?php
namespace xenbros\Threadthumbnail\Entity;
use XF\Mvc\Entity\Structure;
class Thread extends XFCP_Thread
{
public function getfirstPostImgUrl()
{
//\XF::dump($this->Forum->Node);
$ctustom_image_feild = $this->getCustomFields()[$this->Forum->Node->node_custom_image_feild];
if($ctustom_image_feild)
{
return $ctustom_image_feild;
}
$enable_first_image_url = \XF::options()->enable_first_image_url ;
if($this->discussion_type != 'redirect'){
if ($enable_first_image_url) {
$message = $this->FirstPost->message;
preg_match('/\[IMG(.*?)\](.+?)\[\/IMG\]/i',$message,$matches);
if($matches)
{
$url = $matches[2];
$linkInfo = \XF::app()->stringFormatter()->getLinkClassTarget($url);
if ($linkInfo['local'])
{ return $url; }
if(\XF::app()->options()->imageLinkProxy['images'])
{
$proxyUrl = \XF::app()->stringFormatter()->getProxiedUrlIfActive('image', $url);
return $proxyUrl;
}
return $url;
}
}
$attachments = $this->FirstPost->Attachments;
foreach ($attachments as &$attachment)
{
//\XF::dump($this->Forum->Node->node_attachment_thumb);
if ( $attachment->has_thumbnail == 'TRUE' )
{
//\XF::dump($attachment->thumbnail_url);
if ($this->Forum->Node->node_attachment_thumb == 'full') {
$attachmentUrl = $baseUrl . \XF::app()->router()->buildLink('attachments', $attachment);
}
else{
$attachmentUrl = $attachment->thumbnail_url;
}
return $attachmentUrl;
}
}
}
if ($this->Forum->Node->node_default_thread_thumbnail_image) {
return $this->Forum->Node->node_default_thread_thumbnail_image ;
}
else{
return \XF::options()->xb_th_default_image ;
}
}
}
Reputation:
You need to recreated the hash control file, but this is the normal behavior if you change one of them. It will be recognized by the system, which is good
Reputation:
Could you please do the hash control file and re-upload it here? I hate to see that error.