Jump to content

Featured Replies

Posted

We're on IPB cloud. Today we applied the latest patch and were greeted with a message about V5:

Pages: You are using custom PHP blocks. These will no longer function in v5.

If PHP block support is disabled, this would break many parts of our site. How do we handle this in V5? We need the ability to customise things, run server-side API pulls, etc.

You would need to create an application to add PHP level blocks in version 5 of the software

1 hour ago, Marc said:

You would need to create an application to add PHP level blocks in version 5 of the software

So, are you saying items like this are no longer available in v5 and I need to hire a developer? Yikes.

image.png

5 minutes ago, Square Wheels said:

So, are you saying items like this are no longer available in v5 and I need to hire a developer? Yikes.

image.png

I am not seeing any PHP there so you can use a Raw HTML block.

That doesn't look like our PHP block screen, that appears to be custom... in which case it would need to be replaced either way.

2 minutes ago, Jim M said:

I am not seeing any PHP there so you can use a Raw HTML block.

Phew, thanks!

Just now, Esther E. said:

That doesn't look like our PHP block screen, that appears to be custom... in which case it would need to be replaced either way.

Hmm, upon further investigation, it looks like it's from an add-on which I don't think has been supported for a while.

PHP & TXT Widget

Can I do the same with a custom block in Pages? If so, I should start migrating things now.

4 minutes ago, Square Wheels said:

Can I do the same with a custom block in Pages? If so, I should start migrating things now.

Yes, you definitely can. When you create a new block in Pages, there's an option to choose "PHP" (not supported in v5), "Editor", or "Raw HTML". You want to choose the last option.

I thought of making a modification for custom PHP blocks to keep my current pages working, but IPS also removed support for pages without wrappers (the page editor wouldn't work). Given that, I'll have to make my own custom application anyway to output the content I need.

If there are enough requests I can consider making it, though. 🤔

EDIT

So, I had the tab open for a while and never saw the other replies above mine. Anyway, it looks like you don't need PHP blocks, so that's good. 😅

I'll report about about the replies not loading because this is the 3rd time now, so I'm not imagining it.

Edited by teraßyte

2 hours ago, teraßyte said:

IPS also removed support for pages without wrappers

Does this means that using pages for things like ads.txt no longer works?

2 hours ago, Dll said:

Does this means that using pages for things like ads.txt no longer works?

Unfortunately, that's correct. Using an empty custom wrapper is not an option because the code checks specifically that the template contains at least the $html and $title variables. Without them, the wrapper is not even listed as a choice. 🤷‍♂️

I've been using pages without a wrapper for other custom things (like update checks for my apps), but the ads.txt page is something that IPS actively suggests to clients on the Cloud. I wonder what's their solution for that. Let me tag @Matt and @Esther E. to see what solution they have for it. 👀

Official guide for ads.txt:

  • Author
9 hours ago, Marc said:

You would need to create an application to add PHP level blocks in version 5 of the software

What does this mean? How do I "create an application" in the IPB world?

1 minute ago, Simon.AU said:

What does this mean? How do I "create an application" in the IPB world?

This is a guide on how to create a simple application for v4: https://invisioncommunity.com/developers/docs/development/applications/creating-a-simple-hello-world-application-r184/

Applications for v5 are slightly different compared to v4 (no more underscores for class names and hooks were removed), but what you can read there is 95% of what you need to know.

  • Author
1 minute ago, teraßyte said:

This is a guide on how to create a simple application for v4: https://invisioncommunity.com/developers/docs/development/applications/creating-a-simple-hello-world-application-r184/

Applications for v5 are slightly different compared to v4 (no more underscores for class names and hooks were removed), but what you can read there is 95% of what you need to know.

Thanks, this is pretty wild just to integrate some php. To save me reading the whole thing, do you know if forums can be integrated in an application? If so I might consider it, but I think it's going to be too much work.

20 minutes ago, Simon.AU said:

do you know if forums can be integrated in an application?

Could you clarify? Integrated how/where?

If I know what you're trying to do, I can offer suggestions, but I'm confused about what you're trying to accomplish exactly.

If it's not a problem, maybe you can post the PHP code of one of your blocks.

Edited by teraßyte

5 hours ago, teraßyte said:

I thought of making a modification for custom PHP blocks to keep my current pages working, but IPS also removed support for pages without wrappers (the page editor wouldn't work). Given that, I'll have to make my own custom application anyway to output the content I need.

That's still an open bug on my end. It's not forgotten. It will be fixed.

Just now, Esther E. said:

That's still an open bug on my end. It's not forgotten. It will be fixed.

Oh, okay. I thought the fix was that we had to select a custom wrapper, and you'd pre-select one for pages without one when upgrading from v4.

I misunderstood then. Waiting for happy news. 🤞

3 minutes ago, teraßyte said:

Oh, okay. I thought the fix was that we had to select a custom wrapper, and you'd pre-select one for pages without one when upgrading from v4.

I misunderstood then. Waiting for happy news. 🤞

We try our best. ☺️

  • Author
15 minutes ago, teraßyte said:

Could you clarify? Integrated how/where?

If I know what you're trying to do, I can offer suggestions, but I'm confused about what you're trying to accomplish exactly.

If it's not a problem, maybe you can post the PHP code of one of your blocks.

Sorry I don't really know how to explain it. We use IPB cloud for hosting forums, and for the user management. There are also "pages", and "databases", which make use of.

IPB builds its pages by allowing the creation/insertion of various "blocks", and we make use of user-defined html and php blocks quite a bit throughout our "site".

Forums was the main original feature from which this all began, if I have my history right. Invision Power Board. So I thought that forums would be a central theme. But the product gets more confusing to me all the time.

Recently Browsing 0

  • No registered users viewing this page.