How to create custom json-ld schema markup for each category ?

Need some custom code changes to the phpBB core simple enough that you feel doesn't require an extension? Then post your request here so that community members can provide some assistance.

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
Post Reply
dlugasny
Registered User
Posts: 10
Joined: Wed Jan 16, 2019 1:22 pm

How to create custom json-ld schema markup for each category ?

Post by dlugasny »

Hi,

maybe some one will be able to help me here.
I would like to create JSON-LD schema markups (static, not dynamic generated) for:

1) JSON-LD for Home page (general JSON-LD which will describe forum)

2) JSON-LD for Category (script which will describe content of forum category)

3) JSON-LD for post - maybe there is some script which can generate some JSON-LD script for all posts or inherit JSON-LD from category ?


I will appreciate any support.



Cheers
Dlugasny
User avatar
AmigoJack
Registered User
Posts: 6108
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン
Contact:

Re: How to create custom json-ld schema markup for each category ?

Post by AmigoJack »

dlugasny wrote: Wed Jan 16, 2019 1:35 pmstatic, not dynamic generated
This is impossible, since all phpBB pages are rendered dynamically. You can only edit the template files to have your JSON-LD in there, which is then parsed and populated by phpBB when rendering a page.
  • "The problem is probably not my English but you do not want to understand correctly. ... We will not come anybody anyway, nevertheless, it's best to shit this." Affin, 2018-11-20
  • "But this shit is not here for you. You can follow with your. Maybe the question, instead, was for you, who know, so you shoved us how you are." axe70, 2020-10-10
  • "My reaction is not to everyone, especially to you." Raptiye, 2021-02-28
dlugasny
Registered User
Posts: 10
Joined: Wed Jan 16, 2019 1:22 pm

Re: How to create custom json-ld schema markup for each category ?

Post by dlugasny »

Sorry for late answer...

This is really painfull.... Today microdata markup is really popular and necessary if You would like to have Your forum visible in the internet. A specially when we are creating new ones. With current (or let say missing features) phpbb seo features it will be extremly hard to make posts visible in the search engine indexes. Google doesnt want to index PHPBBs because in most cases it doesnt know about what is website etc.etc. Without proper microdata markup big part of website will not be indexed. I have tested everything what was possible till now: sitemaps, good content, meta tags (I know, I know...), CSS markups and even I paid for Google Adwords. If engine will not understand about what is Your forum - You will not have a good position with PHPBB - to make it possible website should be properly described using one of the microdata standards.


I have prepared few informations about microdata markup for dynamic generated websites:

Here You can read, what exactly google needs from Q&A websites:
https://developers.google.com/search/do ... pes/qapage

And here You have short tutorial (time consuming) how to do microdata markup for dynamic generated websites:
https://medium.com/@benjburkholder/usin ... 71597cfde9

I hope this will help some experienced users.
User avatar
AmigoJack
Registered User
Posts: 6108
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン
Contact:

Re: How to create custom json-ld schema markup for each category ?

Post by AmigoJack »

dlugasny wrote: Wed Jul 03, 2019 9:07 amToday microdata markup is really popular and necessary
Can you back up that claim? And why I succeed in getting search query matches to boards that don't use that, yet I still find what I was searching for? Hint: it's also about how you search and thru which search provider.

dlugasny wrote: Wed Jul 03, 2019 9:07 amit will be extremly hard to make posts visible in the search engine indexes
I experienced the opposite in the past - can you tell why this will change?

dlugasny wrote: Wed Jul 03, 2019 9:07 amGoogle doesnt want to index PHPBBs because in most cases it doesnt know about what is website etc.etc.
Do you have examples? There are countless boards out there not having real content, only chatting, or worse: copypasta. Also there are administrators who are not aware of the access permissions to the forums of the board, resulting in crawlers/guests to never see the content. And keep in mind that Google is by far not the only crawler.

dlugasny wrote: Wed Jul 03, 2019 9:07 amI have tested everything what was possible till now: ... good content
Wait: "good" content was only an experiment for you? Do you care linking to websites/boards that you struggle with getting indexed, so others can give you feedback?

dlugasny wrote: Wed Jul 03, 2019 9:07 amto make it possible website should be properly described
Why not ending the sentence right there? You're able to properly describe anything with a post already.

dlugasny wrote: Wed Jul 03, 2019 9:07 amHere You can read, what exactly google needs from Q&A websites:
As the article indicates: this only fits topics of a forum of a board which are a question - and even then I feel answers should also be accepted from guests, which again is rarely seen in the wild.
  • "The problem is probably not my English but you do not want to understand correctly. ... We will not come anybody anyway, nevertheless, it's best to shit this." Affin, 2018-11-20
  • "But this shit is not here for you. You can follow with your. Maybe the question, instead, was for you, who know, so you shoved us how you are." axe70, 2020-10-10
  • "My reaction is not to everyone, especially to you." Raptiye, 2021-02-28
dlugasny
Registered User
Posts: 10
Joined: Wed Jan 16, 2019 1:22 pm

Re: How to create custom json-ld schema markup for each category ?

Post by dlugasny »

First. Do not get me wrong. I really like PHPBB.

Second thing SEO...
In most of the posts here I read that I have to wait (be patient) till google will index my posts. I do not understand that philosophy, why I have to wait till Goolge or some other engine will do something for me if they clearly said, that content should be marked (to be more visible) using microdata (json-ld etc.etc.) ? I read Google blog about SEO several times and I have realised why newly created PHPBB forum needs so many months for indexing. I have created allmost everything what was possible.. uniq content, sitemaps, all possible meta tags, sever was properly protected etc.etc. That costs me a lot of time but even with all that features I havent seen any progress in indexing. Usually using other scripts where microdata is implemented I`m waiting 2-3 days for first results (google widgets, post ratings 'stars" etc.etc.) because in microdata You can clearly describe which value in Your content represent for example: rating and which for example comments or author. I know that google is smart and could generate without admin intervention widgets in search results, but it takes ages... When You are building new community this is important part. I just would like to be able to speed up indexing process using microdata and exactly explain google : hey google - here is my microcode where is briefly described about what my website is.
Time is changing, google is changing but phpbb staying in place and not reacting for new improvements in search engines. I have observed that popularity/traffic increasing when number of external links also increasing. Then also indexing starting to work... but after many months (of hard work). What I have observed, external links from other websites where microdata was implemented speedup indexing of my target posts drasticly. If link with follow attribute was on the website without microdata markup there was no progress - so we can suspect that google is not sure about what is SOURCE and TARGET website where linking was used.

I do not understand why microdata is ignored in PHPBB if its really work and bring so many profits. Just think about it. Microdata is seo juice.
It make sense to start implementing it in the code.
dlugasny
Registered User
Posts: 10
Joined: Wed Jan 16, 2019 1:22 pm

Re: How to create custom json-ld schema markup for each category ?

Post by dlugasny »

Bottom You will some example code which is describing typical phpbb post.
Maybe some one will be able to help here and tell me how to insert for example post URL and title to lines:

Code: Select all

    "id": "how to insert here post url",
    "headline": "how to insert here thread Subject ?",
Complete code:

Code: Select all

<script type="application/ld+json">
{
    "@context": "https://schema.org",
    "@type": "DiscussionForumPosting",
    "id": "https://www.example-forum.org/link_to_post",
    "headline": "Post subject....",
    "image": "https://www.example-forum.org/attached_images",
    "author": {
        "@type": "Person",
        "name": "Some_user"
    },
    "interactionStatistic": {
        "@type": "InteractionCounter",
        "interactionType": "InteractionCounter",
        "userInteractionCount": 29
    }
}
	</script>

How to extract this kind of informations and put them to proper places in JSON-LD format ? In my understanding, if site is dynamic generated, it could be also possible to generate dynamic JSON-LD script code for google. The question is how to extract necessary informations ? Is there any list of placeholders for phpbb ?

Thanks in advance for any support.
User avatar
AmigoJack
Registered User
Posts: 6108
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン
Contact:

Re: How to create custom json-ld schema markup for each category ?

Post by AmigoJack »

dlugasny wrote: Thu Jul 04, 2019 8:04 amIs there any list of placeholders for phpbb ?
No, but as I already wrote:
AmigoJack wrote: Thu Jan 17, 2019 8:51 amYou can only edit the template files to have your JSON-LD in there, which is then parsed and populated by phpBB when rendering a page.
So have a look at i.e. /styles/*/template/viewtopic_body.html which uses i.e. {TOPIC_TITLE}. However, since JSON is different from HTML the proper encoding has to apply, of course.
  • "The problem is probably not my English but you do not want to understand correctly. ... We will not come anybody anyway, nevertheless, it's best to shit this." Affin, 2018-11-20
  • "But this shit is not here for you. You can follow with your. Maybe the question, instead, was for you, who know, so you shoved us how you are." axe70, 2020-10-10
  • "My reaction is not to everyone, especially to you." Raptiye, 2021-02-28
dlugasny
Registered User
Posts: 10
Joined: Wed Jan 16, 2019 1:22 pm

Re: How to create custom json-ld schema markup for each category ?

Post by dlugasny »

Thanks for Your great support. Do You know where may I find list of all placeholders (I mean "{TOPIC_TITLE}" ?
User avatar
AmigoJack
Registered User
Posts: 6108
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン
Contact:

Re: How to create custom json-ld schema markup for each category ?

Post by AmigoJack »

Such a thing does not exist. For my example open /viewtopic.php and find these two lines (excerpt):

Code: Select all

$template->assign_vars(array(
...
	'TOPIC_TITLE' 	=> $topic_data['topic_title'],
Since you don't seem to have used phpBB on a technical level yet have a read on how the template system works in general:
  • "The problem is probably not my English but you do not want to understand correctly. ... We will not come anybody anyway, nevertheless, it's best to shit this." Affin, 2018-11-20
  • "But this shit is not here for you. You can follow with your. Maybe the question, instead, was for you, who know, so you shoved us how you are." axe70, 2020-10-10
  • "My reaction is not to everyone, especially to you." Raptiye, 2021-02-28
Post Reply

Return to “phpBB Custom Coding”