Images from posts

Looking for an Extension? Have an Extension request? Post your request here for help. (Note: This forum is community supported; while there is an Extensions Development Team, said team does not dedicate itself to handling requests in this forum)
Suggested Hosts
bttan
Registered User
Posts: 83
Joined: Mon Feb 16, 2015 4:37 pm

Re: Images from posts

Post by bttan »

Quote
fwiw, we'd like to have the thumbnails "clickable" to take you to the topic.

in ext\bb3mobi\imgposts\styles\prosilver\template\event\topiclist_row_prepend.html,

replacing line 3

Code: Select all

<!-- IF topicrow.FILSE_EXIST --><img src="{topicrow.ATTACH_IMG}" width="{FIRST_IMAGES_TOPIC}" height="{FIRST_IMAGES_TOPIC}" alt="" />

with

Code: Select all

<!-- IF topicrow.FILSE_EXIST --><a href="{topicrow.U_VIEW_TOPIC}"><img src="{topicrow.ATTACH_IMG}" width="{FIRST_IMAGES_TOPIC}" height="{FIRST_IMAGES_TOPIC}" alt="" /></a>

does just that. @Anvar, if you're still here... it would be very nice to see this "built-in"! ;)

cheers, Frank
Top
unquote

Source viewtopic.php?f=501&t=2274841&start=120

no-photo.png is still not clickable
bttan
Registered User
Posts: 83
Joined: Mon Feb 16, 2015 4:37 pm

Re: Images from posts

Post by bttan »

bttan wrote: Sat Feb 13, 2021 12:28 pm
bttan wrote: Thu Feb 04, 2021 11:44 am mystery solved - why block scrolling images are not moving?

Maximum number of images in block was set to 9 by default and h/phone has 2 images in the block when phone is held vertically and 4 images horizontally and the block images are scrolling.

On computer, the screen is wide and i have 8 images in the block on the screen and the block is not scrolling.

so i set Maximum number of images in block to 10 and it is scrolling both on my handphoe and computer.
programmatically speaking, this is not a right way to fix a code so I googled again and found this tutorial https://www.html.am/html-codes/marquees ... -image.cfm

while comparing the code, i found a typo error in the css file and i changed to:-

#scroll-jq {
max-width: 1200px;
margin-top: -12px; /* Top -12 ??? */
position: relative;
padding: 0;
left: 0;
margin: 0 auto;
}
this is wrong.

source https://learn.jquery.com/using-jquery-c ... ent-ready/

overall_footer_after.html

change

$(function()

to

$( window ).on( "load", function()
bttan
Registered User
Posts: 83
Joined: Mon Feb 16, 2015 4:37 pm

Re: Images from posts

Post by bttan »

For info

1. No photo png is and should be clickable.

2. Updated caroufredsel 5.2.2 to latest 6.2.1. and fixed li should be center but was left.

List of improvements https://github.com/Codeinwp/carouFredSe ... ngelog.txt

But can’t see any. Updated for the sake of updating.


Lastly install at yr own risk.
User avatar
erelash_mf
Registered User
Posts: 96
Joined: Sun Jan 19, 2020 1:02 pm
Location: Mongolia
Name: ERA
Contact:

Re: Images from posts

Post by erelash_mf »

Hello guys!

Are there any great programmers to do this extension? This extension will have a great effect on the phpbb forum. People are more likely to enter if they have a picture than only text on subject.

Below is an example image:

Image

Image

Image
bttan
Registered User
Posts: 83
Joined: Mon Feb 16, 2015 4:37 pm

Re: Images from posts

Post by bttan »

to get Image image,

change sql like [img: to like [img]

change regex to /<img[^>]*?\s+src\s*=\s*"([^"]+)"[^>]*?>/i
(source, ideone / stackoverflow, can't remember the link)

all seems ok but get this warning

[phpBB Debug] PHP Warning: in file [ROOT]/ext/bb3mobi/imgposts/core/helper.php on line 306: count(): Parameter must be an array or an object that implements Countable

anyone can help?
User avatar
irdem
Registered User
Posts: 177
Joined: Sat Oct 13, 2007 10:31 pm
Contact:

Re: Images from posts

Post by irdem »

bttan wrote: Tue Nov 09, 2021 5:29 pm
all seems ok but get this warning

[phpBB Debug] PHP Warning: in file [ROOT]/ext/bb3mobi/imgposts/core/helper.php on line 306: count(): Parameter must be an array or an object that implements Countable

anyone can help?
this may solve the problem:
find:

Code: Select all

		if (!count($size) || !isset($size[0]) || !isset($size[1]))
replace with:

Code: Select all

		if (!count(Array($size)) || !isset($size[0]) || !isset($size[1]))
bttan
Registered User
Posts: 83
Joined: Mon Feb 16, 2015 4:37 pm

Re: Images from posts

Post by bttan »

thank you.

share other suggestion https://wordpress.org/support/topic/cou ... untable-6/

this
if (!count(Array($size)) || !isset($size[0]) || !isset($size[1]))

or this
if (is_countable($size) && !count($size) || !isset($size[0]) || !isset($size[1]))

is better?

found the issue of the warning message which was only on certain pages,
and that was when the hosted servers deleted the linked images.
bttan
Registered User
Posts: 83
Joined: Mon Feb 16, 2015 4:37 pm

Re: Images from posts

Post by bttan »

webp problem

yahoo webp url
https://s.yimg.com/ny/api/res/1.2/1wN3d ... ac999d145e

warning message (gone, after page was refreshed)

[phpBB Debug] PHP Warning: in file [ROOT]/ext/bb3mobi/imgposts/core/helper.php on line 329: imagecreatefromwebp(): gd-webp cannot get webp info
[phpBB Debug] PHP Warning: in file [ROOT]/ext/bb3mobi/imgposts/core/helper.php on line 329: imagecreatefromwebp(): 'https://s.yimg.com/ny/api/res/1.2/1wN3d ... ac999d145e' is not a valid WEBP file
[phpBB Debug] PHP Warning: in file [ROOT]/ext/bb3mobi/imgposts/core/helper.php on line 335: imagesx() expects parameter 1 to be resource, bool given
[phpBB Debug] PHP Warning: in file [ROOT]/ext/bb3mobi/imgposts/core/helper.php on line 336: imagesy() expects parameter 1 to be resource, bool given
[phpBB Debug] PHP Warning: in file [ROOT]/ext/bb3mobi/imgposts/core/helper.php on line 340: Division by zero
[phpBB Debug] PHP Warning: in file [ROOT]/ext/bb3mobi/imgposts/core/helper.php on line 354: imagecreatetruecolor() expects parameter 2 to be int, float given
[phpBB Debug] PHP Warning: in file [ROOT]/ext/bb3mobi/imgposts/core/helper.php on line 355: imagecopyresampled() expects parameter 1 to be resource, null given
[phpBB Debug] PHP Warning: in file [ROOT]/ext/bb3mobi/imgposts/core/helper.php on line 360: imagecopy() expects parameter 2 to be resource, null given
[phpBB Debug] PHP Warning: in file [ROOT]/ext/bb3mobi/imgposts/core/helper.php on line 361: imagedestroy() expects parameter 1 to be resource, null given

test (correct way to test?)
$file = 'https://s.yimg.com/ny/api/res/1.2/1wN3d ... ac999d145e';

$info = getimagesize($file);
print_r($info);

$info1 = exif_imagetype($file);
print_r($info1);

sometimes it was both jpeg and webp
Array
(
[0] => 960
[1] => 713
[2] => 2
[3] => width="960" height="713"
[bits] => 8
[channels] => 3
[mime] => image/jpeg
)
18

sometimes, webp
Array
(
[0] => 960
[1] => 713
[2] => 18
[3] => width="960" height="713"
[bits] => 8
[mime] => image/webp
)
18

sometimes webp and jpeg
Array
(
[0] => 960
[1] => 713
[2] => 18
[3] => width="960" height="713"
[bits] => 8
[mime] => image/webp
)
2

sometimes, jpeg
Array
(
[0] => 960
[1] => 713
[2] => 2
[3] => width="960" height="713"
[bits] => 8
[channels] => 3
[mime] => image/jpeg
)
2

how to solve?
Paul
Infrastructure Team Leader
Infrastructure Team Leader
Posts: 28651
Joined: Sat Dec 04, 2004 3:44 pm
Location: The netherlands.
Name: Paul Sohier
Contact:

Re: Images from posts

Post by Paul »

To receive extension support please visit our Extensions Database and post in the specific extension's designated support area. The link to the support area for each released extension is also available in the first post of each released extension listed in the [3.3.x] Extension Database Releases forum. For extensions still in development (not recommended for a live board) support is in that extensions's topic in the Extensions in Development forum.
Post Reply

Return to “Extension Requests”