Jump to content

Topic Thumbnail for IPS4.x


onlyME

Recommended Posts

@onlyME found one more BIG problem: I am rebuild all thumbnails and all of this thumbnails are stored in monthly_2017_01 dir. Many thousands of files!!

There were problems with backup, directory listing rests against a files limit etc.

While rebuilding thumbnail image must be stored in original image directory!

Please, fix this important thing!

 

And you copy original images with thumbnails - why? The place on the hard drive not unlimited!

 

And thumbs has very long filenames like:

monthly_2017_01/68.thumb.JPG.815c0e0da323cbd30fcdc94fae7cf6ea.thumb.JPG.f7b6d3c80b918c2e5a8e231bff0b0433.JPG

highlighted in bold - superfluous.

Edited by Slimer
Link to comment
Share on other sites

8 hours ago, Slimer said:

found one more BIG problem: I am rebuild all thumbnails and all of this thumbnails are stored in monthly_2017_01 dir. Many thousands of files!!

There were problems with backup, directory listing rests against a files limit etc.

While rebuilding thumbnail image must be stored in original image directory!

Please, fix this important thing!

 

And you copy original images with thumbnails - why? The place on the hard drive not unlimited!

 

And thumbs has very long filenames like:

monthly_2017_01/68.thumb.JPG.815c0e0da323cbd30fcdc94fae7cf6ea.thumb.JPG.f7b6d3c80b918c2e5a8e231bff0b0433.JPG

highlighted in bold - superfluous.

I will find a solution to create thumbnail to the original image.

Copying the thumbnail of attatchment (not original) to prevent losting attatchment in topic when delete topic thumbnail. Or deleting attatchment, moving/editting file storage will not lost topic thumbnail.

The md5 hash for filename, it's not a problem,  I will remove it.

Edited by onlyME
Link to comment
Share on other sites

6 hours ago, onlyME said:

I will find a solution to create thumbnail to the original image.

\IPS\File::Create

public static function create( $storageExtension, $filename, $data=NULL, $container=NULL, $isSafe=FALSE, $filePath=NULL, $obscure=TRUE )

If $container is NULL file created in current month folder.

I do it like this:

$file = \IPS\File::create( $st, $fn, $ri, array_shift(explode("/", $image['attach_location'])) );

 

Link to comment
Share on other sites

5 hours ago, Slimer said:

\IPS\File::Create

public static function create( $storageExtension, $filename, $data=NULL, $container=NULL, $isSafe=FALSE, $filePath=NULL, $obscure=TRUE )

If $container is NULL file created in current month folder.

I do it like this:

$file = \IPS\File::create( $st, $fn, $ri, array_shift(explode("/", $image['attach_location'])) );

 

It will be updated in the next version, and I will make a new tool to delete all current thumbnails for clean rebuilding :) 

Link to comment
Share on other sites

11 minutes ago, onlyME said:

Maybe it's the old url without so the plugin doesn't know it's an emoticon.

yes, it has old format

<img alt=":ok:" data-emoticon="" src="http://url/forum/uploads/emoticons/icon.gif" title=":ok:">

Maybe add this format too?

For some reason rebuilding posts does not rebuild emoticons in new format.

Link to comment
Share on other sites

1 minute ago, Slimer said:

yes, it has old format


<img alt=":ok:" data-emoticon="" src="http://url/forum/uploads/emoticons/icon.gif" title=":ok:">

Maybe add this format too?

For some reason rebuilding posts does not rebuild emoticons in new format.

I will add an option to ignore the urls like featured content.

Link to comment
Share on other sites

Hi OnlyME,

I have some issues with this plugin. I don't want to give you a headache, but I use a kind of template with pictures and the plugin seems to delete a few of the pictures when it tries to add it as a thumbnail.  It's hard to reproduce and not worth wasting our time checking where the issues come from.  The point is it comes a moment when all the pictures disappear because they have been pasted inside the post and the original post loses the image. It produces a cascade effect. 

I honestly think the best solution would be to create an option that could prevent the system from acquiring pictures inside the post ( linked or attached )
If if you add a thumbnail manually, then perfect. If no thumbnail is added, then the system should display the default "no image available".

Would it be possible to add this option in the future ?

Link to comment
Share on other sites

13 minutes ago, gabs007 said:

Hi OnlyME,

I have some issues with this plugin. I don't want to give you a headache, but I use a kind of template with pictures and the plugin seems to delete a few of the pictures when it tries to add it as a thumbnail.  It's hard to reproduce and not worth wasting our time checking where the issues come from.  The point is it comes a moment when all the pictures disappear because they have been pasted inside the post and the original post loses the image. It produces a cascade effect. 

I honestly think the best solution would be to create an option that could prevent the system from acquiring pictures inside the post ( linked or attached )
If if you add a thumbnail manually, then perfect. If no thumbnail is added, then the system should display the default "no image available".

Would it be possible to add this option in the future ?

Which version are you using? This is a known bug and it was fixed in 1.2.4.  

Link to comment
Share on other sites

  • 2 weeks later...

Hi !

Thank for awesome plugin but... i got problem with gallery mode

error info:

Error: Call to a member function url() on null (0)
#0 [internal function]: IPS\Theme\class_core_global_plugins->bim_tthumb_showGallery(Object(IPS\Helpers\Table\Content), Array, Array)
#1 /home/www/domains/fgzootopia-forum.pl/public_html/system/Theme/SandboxedTemplate.php(57): call_user_func_array(Array, Array)
#2 /home/www/domains/fgzootopia-forum.pl/public_html/system/Theme/Theme.php(757) : eval()'d code(1252): IPS\Theme\_SandboxedTemplate->__call('bim_tthumb_show...', Array)
#3 [internal function]: IPS\Theme\class_forums_front_forums->forumTable(Object(IPS\Helpers\Table\Content), Array, Array, NULL, true)
#4 /home/www/domains/fgzootopia-forum.pl/public_html/system/Theme/SandboxedTemplate.php(57): call_user_func_array(Array, Array)
#5 [internal function]: IPS\Theme\_SandboxedTemplate->__call('forumTable', Array)
#6 /home/www/domains/fgzootopia-forum.pl/public_html/system/Helpers/Table/Table.php(520): call_user_func(Array, Object(IPS\Helpers\Table\Content), Array, Array, NULL, true)
#7 /home/www/domains/fgzootopia-forum.pl/public_html/init.php(447) : eval()'d code(405): IPS\Helpers\Table\_Table->__toString()
#8 /home/www/domains/fgzootopia-forum.pl/public_html/init.php(447) : eval()'d code(21): IPS\forums\modules\front\forums\hook103->_forumWithThumb(Object(IPS\forums\Forum))
#9 /home/www/domains/fgzootopia-forum.pl/public_html/applications/forums/modules/front/forums/forums.php(39): IPS\forums\modules\front\forums\hook103->_forum(Object(IPS\forums\Forum))
#10 /home/www/domains/fgzootopia-forum.pl/public_html/system/Dispatcher/Controller.php(96): IPS\forums\modules\front\forums\_forums->manage()
#11 /home/www/domains/fgzootopia-forum.pl/public_html/system/Dispatcher/Dispatcher.php(129): IPS\Dispatcher\_Controller->execute()
#12 /home/www/domains/fgzootopia-forum.pl/public_html/index.php(13): IPS\_Dispatcher->run()
#13 {main}

Any idea to fix this ?

Link to comment
Share on other sites

6 minutes ago, gandalfini said:

Hi !

Thank for awesome plugin but... i got problem with gallery mode

error info:


Error: Call to a member function url() on null (0)
#0 [internal function]: IPS\Theme\class_core_global_plugins->bim_tthumb_showGallery(Object(IPS\Helpers\Table\Content), Array, Array)
#1 /home/www/domains/fgzootopia-forum.pl/public_html/system/Theme/SandboxedTemplate.php(57): call_user_func_array(Array, Array)
#2 /home/www/domains/fgzootopia-forum.pl/public_html/system/Theme/Theme.php(757) : eval()'d code(1252): IPS\Theme\_SandboxedTemplate->__call('bim_tthumb_show...', Array)
#3 [internal function]: IPS\Theme\class_forums_front_forums->forumTable(Object(IPS\Helpers\Table\Content), Array, Array, NULL, true)
#4 /home/www/domains/fgzootopia-forum.pl/public_html/system/Theme/SandboxedTemplate.php(57): call_user_func_array(Array, Array)
#5 [internal function]: IPS\Theme\_SandboxedTemplate->__call('forumTable', Array)
#6 /home/www/domains/fgzootopia-forum.pl/public_html/system/Helpers/Table/Table.php(520): call_user_func(Array, Object(IPS\Helpers\Table\Content), Array, Array, NULL, true)
#7 /home/www/domains/fgzootopia-forum.pl/public_html/init.php(447) : eval()'d code(405): IPS\Helpers\Table\_Table->__toString()
#8 /home/www/domains/fgzootopia-forum.pl/public_html/init.php(447) : eval()'d code(21): IPS\forums\modules\front\forums\hook103->_forumWithThumb(Object(IPS\forums\Forum))
#9 /home/www/domains/fgzootopia-forum.pl/public_html/applications/forums/modules/front/forums/forums.php(39): IPS\forums\modules\front\forums\hook103->_forum(Object(IPS\forums\Forum))
#10 /home/www/domains/fgzootopia-forum.pl/public_html/system/Dispatcher/Controller.php(96): IPS\forums\modules\front\forums\_forums->manage()
#11 /home/www/domains/fgzootopia-forum.pl/public_html/system/Dispatcher/Dispatcher.php(129): IPS\Dispatcher\_Controller->execute()
#12 /home/www/domains/fgzootopia-forum.pl/public_html/index.php(13): IPS\_Dispatcher->run()
#13 {main}

Any idea to fix this ?

I confirm this bug. Try to go ACP > Customization > Themes > click </> to edit your theme > core > global > plugins > bim_tthumb_showGallery

Find

{$topic->url('changeTopicThumbnail')}

Replace by

{$row->url('changeTopicThumbnail')}

Save

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...