gigantor Posted October 9, 2021 Posted October 9, 2021 (edited) Hi All, I'm not trying to become an IPS developer... I just want to accomplish my goal and be done. I'd appreciate some help. Background I have a custom written app which I want my community members to access from IPS without having to login. For this purpose, my custom app reads variables passed via the URL (it uses $_GET). i.e. https://mycommunity.com/applogin.php?User=username&ID=userID Goal Our community has the IPS Pages app. I want to create a simple custom block that has an image in it. When a user clicks the image, some very simple PhP code should execute, produce the necessary URL and send the user to that URL. Problem When I create a custom block in IPS, I get the editor and no way to include the PhP code. How can I accomplish this? Thanks Edited October 9, 2021 by gigantor
Solution Jim M Posted October 9, 2021 Solution Posted October 9, 2021 You will want to go to the ACP -> Pages -> Blocks -> Create Block -> select custom -> select Manual PHP as the content editor:
gigantor Posted October 10, 2021 Author Posted October 10, 2021 (edited) Is there an example of a custom block using PhP? Can I include html with this type of block or just PhP? Thanks Edited October 10, 2021 by gigantor
gigantor Posted October 10, 2021 Author Posted October 10, 2021 I posted an image to the forum and got the exact url of it by viewing it. Below is the my PhP code which I'm testing. echo '<img src=\"https://mycommunity.com/uploads/monthly_2021_10/BFF-SSR-Login.png.ab0687b360535516ff3c60ab33b92eae.png\">'; echo ' SSR Database Test'; When I add the custom block to a test page, the image is missing. Why?
gigantor Posted October 10, 2021 Author Posted October 10, 2021 Never mind, I was escaping the quotes.
Marc Posted October 10, 2021 Posted October 10, 2021 Glad you have what you need there. Feel free to ask any further questions, but please bear in mind we cannot assist with the customisation itself
Recommended Posts