[3.2][BETA] SEO Metadata

A place for Extension Authors to post and receive feedback on Extensions still in development. No Extensions within this forum should be used within a live environment!
Scam Warning
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: Extensions Development rules

IMPORTANT FOR NEEDED EVENTS!!!
If you need an event for your extension please read this for the steps to follow to request the event(s)
dingus33
Registered User
Posts: 82
Joined: Fri Sep 29, 2017 11:11 am

Re: [3.2][RC] SEO Metadata

Post by dingus33 » Wed Jun 26, 2019 3:59 pm

AbaddonOrmuz wrote:
Wed Jun 26, 2019 3:53 pm
Wuppi wrote:
Wed Jun 26, 2019 9:00 am
1) there 2 ways to use attachments in phpbb3(.2.7) ... "At the end of the post" (i don't know the correct name for this mode; you the your Picture with "Attachment" over the box) or IN the post (with [attachment-Tag]; on upload-Dialog: View in Post).
og:image works with "at the end of the post" ... but not with "IN the post". If you used both: don't work, too. ONYL "at the end of the post"
That's no a bug, it will only work with normal attachments (at the end of the post), not with inline attachments (in the post).

Inline attachments doesn't contain useful information to extract only those, adding support for them would require significant changes and it would probably increase resources usage.
that's a real shame imho. on my forum, people put attachments inline the majority of the time. it would be nice to grab an inline attachment if there are no 'normal' ones.

User avatar
Wuppi
Registered User
Posts: 16
Joined: Mon Jun 17, 2019 9:22 am
Contact:

Re: 3 Bugs around OGP (Facebook)

Post by Wuppi » Wed Jun 26, 2019 5:00 pm

AbaddonOrmuz wrote:
Wed Jun 26, 2019 3:53 pm
Hi
[...]
That's no a bug, it will only work with normal attachments (at the end of the post), not with inline attachments (in the post).
Oh ok
Wuppi wrote:
Wed Jun 26, 2019 9:00 am
2) (has to do with the first one)
If you use the Attachment-Tag, the OGP:DESCRIPTION says

Code: Select all

[attachment=1:x9720k1t]P2170317.JPG[/attachment:x9720k1t]Moin ....
<- the tag should be remove
Which version (of this extension) are you using? It deletes the attachments and removes all BBCodes.
1.1.0
(Board 3.2.7, PHP 7.2.x)
Wuppi wrote:
Wed Jun 26, 2019 9:00 am
Did you modify the extension?
No
The ogp:description tag doesn't exist
Sorry mistake - i mean og:description and description

Wuppi wrote:
Wed Jun 26, 2019 9:09 am
og:url ... your extension set t, f and of course start... the canonical from phpbb3.2 uses only t (and start) .. f isn't need (?)
It adds the URL of the current visited page without the session ID (sid), the extension doesn't construct that URL, it only uses what is already there.
Ohh ok i see ... have tested a lot, but this ... ;)

Thanks ;)

User avatar
AbaddonOrmuz
Registered User
Posts: 640
Joined: Wed Dec 25, 2013 9:06 pm
Location: /dev/null
Name: Alfredo Ramos
Contact:

Re: [3.2][RC] SEO Metadata

Post by AbaddonOrmuz » Sat Jun 29, 2019 2:29 am

Version 1.2.0-beta released, see changelog for more information.
dingus33 wrote:
Wed Jun 26, 2019 3:59 pm
that's a real shame imho. on my forum, people put attachments inline the majority of the time. it would be nice to grab an inline attachment if there are no 'normal' ones.
Have you even try it?

They do work, but Wuppi was referring to the order they are included inline.

Attachments are picked in the order they were uploaded, so they work.
Wuppi wrote:
Wed Jun 26, 2019 9:00 am

Code: Select all

[attachment=1:x9720k1t]P2170317.JPG[/attachment:x9720k1t]Moin ....
Why are you using the BBCode like that?

I'm aware of the usages of the iud, but why are you using it? If I add a uid the BBCode isn't parsed at all so I can't reproduce your issue and therefore I can't fix it either.

As I previously said, the description generator removes all BBCodes and I have functional tests for it, so if it doesn't work for you, you will need to identify the extension that generates that attachment BBCodes or conflicts with this one.
Some of my phpBB extensions: [ Imgur | SEO Metadata | Markdown ]
Check out all my extensions
Arch Linux user

dingus33
Registered User
Posts: 82
Joined: Fri Sep 29, 2017 11:11 am

Re: [3.2][RC] SEO Metadata

Post by dingus33 » Sat Jun 29, 2019 10:38 am

AbaddonOrmuz wrote:
Sat Jun 29, 2019 2:29 am
Version 1.2.0-beta released, see changelog for more information.
dingus33 wrote:
Wed Jun 26, 2019 3:59 pm
that's a real shame imho. on my forum, people put attachments inline the majority of the time. it would be nice to grab an inline attachment if there are no 'normal' ones.
Have you even try it?

They do work, but Wuppi was referring to the order they are included inline.

Attachments are picked in the order they were uploaded, so they work.
my apologies, i have not tried it, but i look forward to using it in the near future.
the recent exchange just led me to believe that using inline attachments wasn't implemented. thank you for clarifying and for all of your efforts.
Last edited by dingus33 on Sat Jun 29, 2019 10:45 am, edited 3 times in total.

dingus33
Registered User
Posts: 82
Joined: Fri Sep 29, 2017 11:11 am

Re: [3.2][RC] SEO Metadata

Post by dingus33 » Sat Jun 29, 2019 10:39 am

edit: disregard

User avatar
Wuppi
Registered User
Posts: 16
Joined: Mon Jun 17, 2019 9:22 am
Contact:

Re: [3.2][RC] SEO Metadata

Post by Wuppi » Sun Jun 30, 2019 4:19 pm

AbaddonOrmuz wrote:
Sat Jun 29, 2019 2:29 am
Wuppi wrote:
Wed Jun 26, 2019 9:00 am

Code: Select all

[attachment=1:x9720k1t]P2170317.JPG[/attachment:x9720k1t]Moin ....
Why are you using the BBCode like that?

I'm aware of the usages of the iud, but why are you using it? If I add a uid the BBCode isn't parsed at all so I can't reproduce your issue and therefore I can't fix it either.
It's from phpbb3.0! Standard. I have an phpbb3.0 upgraded to 3.2.7. phpbb3.0 writes bbcode with bbcode_uid into DATABASE.

When you look into bbcode.html (from 3.2.7 of course) you see that BBCODES exists in 2 Variants ... normal and with :BBCODE_UID ... So - its normal, an Feature ;=). The Problem is even bigger for me! Not only attachments are affected ... EVERY BBCODE at the "DESCRIPTION"-Zone ...

When i look in the database(!) - search this post (attachment) ... I see in phpbb_posts -> post_text

Code: Select all

[attachment=1:x9720k1t]P2170317.JPG[/attachment:x9720k1t]
... in bbcode_uid x9720k1t. Now: An 3.2.7-Post in Database - same Table

Code: Select all

<r><ATTACHMENT filename="100.jpg" index="0"><s>[attachment=0]</s>100.jpg<e>[/attachment]</e></ATTACHMENT>test</r>
Next Description from an old 3.0.x-Post:

Code: Select all

[size=150:276ecpym]--- &quot;Der Schaukasten&quot; ---[/size:276ecpym] 
Testpost in 3.2.7 with bold-Text at beginning. DATABASE

Code: Select all

<r><B><s>[b]</s>asdfasdfasdfa<e>[/b]</e></B>asdf asdfasdfa</r>
=> You see ... not only Attachment affected - ALL BBCODES are affected :(

=> 3.0.7 writes BBCODE in POST-Table ... 3.2.7 writes BBCODE in an other Syntax into the table. Your Extension works only with this new Syntax (since 3.1?). Bad Problem for user with very old and big Forums (my Forum is 17years old; 55500 Threads)

==> You extension isn't compatible with Boards with 3.0.x-History (upgraded to 3.1 or 3.2)
Last edited by Wuppi on Sun Jun 30, 2019 4:34 pm, edited 1 time in total.

User avatar
Wuppi
Registered User
Posts: 16
Joined: Mon Jun 17, 2019 9:22 am
Contact:

Re: [3.2][RC] SEO Metadata

Post by Wuppi » Sun Jun 30, 2019 4:31 pm

AbaddonOrmuz wrote:
Sat Jun 29, 2019 2:29 am
Version 1.2.0-beta released, see changelog for more information.

Works with Posts with Attachment

Code: Select all

<meta property="og:image:type" content="image/jpeg">
<meta property="og:image:width" content="530">
<meta property="og:image:height" content="439">
Thanks ;)

Don't work with with the Default-Image:
I set Default-Image: http..... <- works
I set Default image dimensions: 88 31 for example.
Type: set
SAVE
Default Image dimension are reset. 0x0. Type is reset.
In OG-Tag NO type, width, height exists

Code: Select all

<meta property="og:locale" content="de">
no change. Better to set this manually in ACP?

User avatar
AbaddonOrmuz
Registered User
Posts: 640
Joined: Wed Dec 25, 2013 9:06 pm
Location: /dev/null
Name: Alfredo Ramos
Contact:

Re: [3.2][RC] SEO Metadata

Post by AbaddonOrmuz » Sun Jun 30, 2019 6:02 pm

Wuppi wrote:
Sun Jun 30, 2019 4:19 pm
It's from phpbb3.0! Standard. I have an phpbb3.0 upgraded to 3.2.7. phpbb3.0 writes bbcode with bbcode_uid into DATABASE.
Mmm... that explains it all.

I can only suggest you to run the reparser.

phpBB comes with a cron job that reparses that for you, so if you don't want to wait for it to finish, you can do it though SSH following this guide:

https://www.phpbb.com/support/docs/en/3 ... -reparser/

Or if you don't have SSH access, you could do it in localhost, then upload the database changed, of you could use the following extension to run the reparser on each post manually, without the need to edit each post.

https://github.com/s9e/phpbb-ext-reparser

I haven't used myself that extension, read the warning.
Wuppi wrote:
Sun Jun 30, 2019 4:31 pm
Don't work with with the Default-Image:
I set Default-Image: http..... <- works
I set Default image dimensions: 88 31 for example.
Type: set
SAVE
Default Image dimension are reset. 0x0. Type is reset.
In OG-Tag NO type, width, height exists
Images should be greater than 200 x 200 px, I should mention that in the field description.

If the default image has a greater dimensions than that, you could set to 0 both width and height and leave the type blank, it will try to guess that information.

If the image dimensions are smaller, they will be silently ignored. Any empty data will be simply excluded from the template.
Wuppi wrote:
Sun Jun 30, 2019 4:31 pm

Code: Select all

<meta property="og:locale" content="de">
no change. Better to set this manually in ACP?
Can you share the URL of your board? with the languages I've tried it worked. I will do some testing on my own, but I need real data to work with.

I will give it another try, if it fails I will think on another approach.
Some of my phpBB extensions: [ Imgur | SEO Metadata | Markdown ]
Check out all my extensions
Arch Linux user

User avatar
AbaddonOrmuz
Registered User
Posts: 640
Joined: Wed Dec 25, 2013 9:06 pm
Location: /dev/null
Name: Alfredo Ramos
Contact:

Re: [3.2][RC] SEO Metadata

Post by AbaddonOrmuz » Sun Jun 30, 2019 9:27 pm

Wuppi wrote:
Sun Jun 30, 2019 4:31 pm
Don't work with with the Default-Image:
I set Default-Image: http..... <- works
I set Default image dimensions: 88 31 for example.
Type: set
SAVE
Default Image dimension are reset. 0x0. Type is reset.
In OG-Tag NO type, width, height exists

Code: Select all

<meta property="og:locale" content="de">
no change. Better to set this manually in ACP?
All this should be fixed in the new version I just released (1.2.0-beta2), please try it and let me know any issues you find.
Some of my phpBB extensions: [ Imgur | SEO Metadata | Markdown ]
Check out all my extensions
Arch Linux user

User avatar
</Solidjeuh>
Registered User
Posts: 1689
Joined: Tue Mar 29, 2016 3:45 am
Location: Aalst (Belgium)
Name: Andy Dm
Contact:

Re: [3.2][BETA] SEO Metadata

Post by </Solidjeuh> » Sun Jun 30, 2019 11:19 pm


User avatar
Wuppi
Registered User
Posts: 16
Joined: Mon Jun 17, 2019 9:22 am
Contact:

Re: [3.2][RC] SEO Metadata

Post by Wuppi » Mon Jul 01, 2019 3:22 pm

AbaddonOrmuz wrote:
Sun Jun 30, 2019 6:02 pm
Wuppi wrote:
Sun Jun 30, 2019 4:19 pm
It's from phpbb3.0! Standard. I have an phpbb3.0 upgraded to 3.2.7. phpbb3.0 writes bbcode with bbcode_uid into DATABASE.
I can only suggest you to run the reparser.

phpBB comes with a cron job that reparses that for you, so if you don't want to wait for it to finish, you can do it though SSH following this guide:

https://www.phpbb.com/support/docs/en/3 ... -reparser/
:) :)

Code: Select all

php bin/phpbbcli.php reparser:reparse --ansi
Now:

Code: Select all

<meta name="description" content="--- &quot;Der Schaukasten&quot; --- Der &quot;Schaukasten&quot;
On Inline-Attachment => No BBCode anymore :)

For other users upgrading from 3.0->3.1->3.2 you might put a note in the readme here ;)
Wuppi wrote:
Sun Jun 30, 2019 4:31 pm

Code: Select all

<meta property="og:locale" content="de">
1.2.0-beta2:

Code: Select all

<meta property="og:locale" content="de_DE">
=> Works ;)

User avatar
AbaddonOrmuz
Registered User
Posts: 640
Joined: Wed Dec 25, 2013 9:06 pm
Location: /dev/null
Name: Alfredo Ramos
Contact:

Re: [3.2][BETA] SEO Metadata

Post by AbaddonOrmuz » Mon Jul 01, 2019 3:34 pm

</Solidjeuh> wrote:
Sun Jun 30, 2019 11:19 pm
NL Update: https://github.com/Solidjeuh/seometadata
Thanks! :cool:
Wuppi wrote:
Mon Jul 01, 2019 3:22 pm
Now:

Code: Select all

<meta name="description" content="--- &quot;Der Schaukasten&quot; --- Der &quot;Schaukasten&quot;
On Inline-Attachment => No BBCode anymore
So it's fixed?
Wuppi wrote:
Mon Jul 01, 2019 3:22 pm
For other users upgrading from 3.0->3.1->3.2 you might put a note in the readme here
I don't think that's a issue of this extension. My board was also upgraded from 3.0 and I couldn't reproduce your issue, because almost all posts were reparsed.

I will be doing more testing before releasing the final version. In case you find any issue, please let me know.
Some of my phpBB extensions: [ Imgur | SEO Metadata | Markdown ]
Check out all my extensions
Arch Linux user

User avatar
Wuppi
Registered User
Posts: 16
Joined: Mon Jun 17, 2019 9:22 am
Contact:

Re: [3.2][BETA] SEO Metadata

Post by Wuppi » Mon Jul 01, 2019 4:18 pm

AbaddonOrmuz wrote:
Mon Jul 01, 2019 3:34 pm

So it's fixed?
yes!
AbaddonOrmuz wrote:
Mon Jul 01, 2019 3:34 pm
I will be doing more testing before releasing the final version. In case you find any issue, please let me know.
I'll do! But so far it's looking very good. I don't see any real problems any more (I'm working a bit more intensively with OGP on 3 pages ... maybe I'll get some ideas about OGP/Facebook/Twitter etc.)

But I have to ask again - now that I am rid of this BBCode problem:

1) Post with inline-attachment => this attachment is set as og:image - great!
2) Post with normal image => ... super!
3) Post with inline AND normal attachment => og:image uses my default-image.
=> The behavior is currently correct? I'm irritated that you can get the inline attachment, but with this combination it doesn't go any further. Is it phpbb and their implementation of the inline attachments? I hope you get it solved without it getting too complex :)

BTW: this is my FIRST phpbb-SEO-Extension which i use! For 3.0 (and 2.0!) I did the whole thing myself - a little bit more. But for 3.2 I just don't have enough time for this.Therefore, it is great that you have created here a small, clear extension - which is not overloaded with 10000 features;) ... I'm looking for an ext like this for wordpress and piwigo (i write my own for piwigo at the moment: | .... time haha :( ... for wordpress an small-one gefunden ... with only 100 features :| ............))

Thanks!

User avatar
AbaddonOrmuz
Registered User
Posts: 640
Joined: Wed Dec 25, 2013 9:06 pm
Location: /dev/null
Name: Alfredo Ramos
Contact:

Re: [3.2][BETA] SEO Metadata

Post by AbaddonOrmuz » Mon Jul 01, 2019 8:04 pm

Wuppi wrote:
Mon Jul 01, 2019 4:18 pm
But I have to ask again - now that I am rid of this BBCode problem:

1) Post with inline-attachment => this attachment is set as og:image - great!
2) Post with normal image => ... super!
3) Post with inline AND normal attachment => og:image uses my default-image.
=> The behavior is currently correct? I'm irritated that you can get the inline attachment, but with this combination it doesn't go any further. Is it phpbb and their implementation of the inline attachments? I hope you get it solved without it getting too complex :)
Mmm... the extension does the following basic checks.

- If the image type is supported (JPG, JPEG, PNG and GIF)
- If the image is readable
- If the library I'm using can extract image information (FastImageSize, bundled with phpBB)
- If the image dimensions are equal or larger than 200 x 200 px

If any of the above fails, it will get the default image, so make sure the attachment images from that post (both inline and normal ones) meet that conditions, especially the image dimensions.

In the specific case of the attachments, they're extracted directly from database so it should work regardless of how they're used on posts, assuming they meet the minimum requirements.
Some of my phpBB extensions: [ Imgur | SEO Metadata | Markdown ]
Check out all my extensions
Arch Linux user

jsvh
Registered User
Posts: 3
Joined: Mon Jul 01, 2019 8:46 pm

Re: [3.2][BETA] SEO Metadata

Post by jsvh » Mon Jul 01, 2019 8:54 pm

Hi All,

I am having a similar issue with the image not showing. Everything seems to work and the Default Image, if set, does show in the Twitter Card Validator. I read through the thread and want to confirm if I have a JPG image in a thread with [IMG] tags hosted on a site like Imgur is should capture that, correct?

If so, any idea why my image is not showing? Here is an example topic on my site: https://atlantaforum.info/viewtopic.php?f=2&t=31

Post Reply

Return to “Extensions in Development”