[Xenbros] Auto thread Thumbnail

xF2 Add-on [Xenbros] Auto thread Thumbnail 2.3.5

No permission to download

valid

+Lifetime VIP+
+Lifetime VIP+
V.I.P Member
Registered
Joined
Apr 3, 2020
Messages
191
Points
53

Reputation:

It is corrected, sorry for that.
BattleKing
1621669873927.png


Thanks!
 

ridvanco1

Well-known member
Registered
Joined
Apr 26, 2021
Messages
68
Points
28

Reputation:

BattleKing

Spirit of darkness
Staff member
Administrator
Moderator
+Lifetime VIP+
S.V.I.P Member
Collaborate
Registered
Joined
May 24, 2020
Messages
3,519
Points
523

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
ridvanco1std feature of xenforo and resource manager.
1637488156900.jpg
 

Anna

Well-known member
Registered
Joined
May 18, 2020
Messages
140
Points
38

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.
 

valid

+Lifetime VIP+
+Lifetime VIP+
V.I.P Member
Registered
Joined
Apr 3, 2020
Messages
191
Points
53

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.
AnnaI'm using it now not seeing any problems. What problems do you have?
 

BattleKing

Spirit of darkness
Staff member
Administrator
Moderator
+Lifetime VIP+
S.V.I.P Member
Collaborate
Registered
Joined
May 24, 2020
Messages
3,519
Points
523

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.
AnnaWhat do you mean there is another one from LALAVLAH?
So far as I know this was the latest update of this addon.
 

Anna

Well-known member
Registered
Joined
May 18, 2020
Messages
140
Points
38

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.
 

MEGAHERZ

Collaborate
Collaborate
Registered
Joined
Mar 16, 2019
Messages
50
Points
38

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
 

BattleKing

Spirit of darkness
Staff member
Administrator
Moderator
+Lifetime VIP+
S.V.I.P Member
Collaborate
Registered
Joined
May 24, 2020
Messages
3,519
Points
523

Reputation:

View previous replies…

MEGAHERZ

Collaborate
Collaborate
Registered
Joined
Mar 16, 2019
Messages
50
Points
38

Reputation:

It is in \src\addons\xenbros\Threadthumbnail\Entity\Thread.php
BattleKingthink i may be a little slow as I'm not finding it in it

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 ;
        }
    }
}
edit- oh you said baerUrl think u meant baseurl lol

edite- edits
didn't work, still causing the error after the addon rebuild.
 
Last edited:

valid

+Lifetime VIP+
+Lifetime VIP+
V.I.P Member
Registered
Joined
Apr 3, 2020
Messages
191
Points
53

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
BattleKingCould you please do the hash control file and re-upload it here? I hate to see that error.
 

BattleKing

Spirit of darkness
Staff member
Administrator
Moderator
+Lifetime VIP+
S.V.I.P Member
Collaborate
Registered
Joined
May 24, 2020
Messages
3,519
Points
523

Reputation:

Attachments

  • addon_and_hashes.json.zip
    2.2 KB · Views: 57
Top