Jump to content

TXT & PHP Widget

Featured Replies

Posted

This mod will let you add Text, HTML and PHP widget IPS4's blocks. also you can disable PHP widget from Admin CP

Features

Allows HTML or PHP in widgets.

Compatibility

IPS 4.0, 4.1

 

  • Replies 217
  • Views 28.8k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • I have finial updated to 4.4.1 sorry delay been working overtime get this finished.

  • Not yet I have many items that I am updating before this but update will be coming.

  • For anyone who is interested in the future, this is how I did it. // Initialize IPS4 Framework require_once('./init.php'); // Indicate that we should consider this a front-end session so we can o

Posted Images

several tests

After adding an empty widget (custom txt or PHP Code) message pop-up window:

"Couldn't save block positions"

After confirming widget in page and can be edited.

In the system logs

OutOfRangeException:  (0)
#0 /home/xxxxxxxxx/public_html/consults/applications/cms/sources/Pages/Page.php(1894): IPS\Patterns\_ActiveRecord::load(9)
#1 /home/xxxxxxxxx/public_html/consults/applications/cms/sources/Pages/Page.php(1854): IPS\cms\Pages\_Page->mapToDatabase(9)
#2 /home/xxxxxxxxx/public_html/consults/applications/cms/modules/front/pages/builder.php(350): IPS\cms\Pages\_Page->postWidgetOrderSave()
#3 [internal function]: IPS\cms\modules\front\pages\_builder->saveOrder()
#4 /home/xxxxxxxxx/public_html/consults/system/Dispatcher/Controller.php(85): call_user_func(Array)
#5 /home/xxxxxxxxx/public_html/consults/applications/core/modules/front/system/widgets.php(39): IPS\Dispatcher\_Controller->execute()
#6 /home/xxxxxxxxx/public_html/consults/system/Dispatcher/Dispatcher.php(129): IPS\core\modules\front\system\_widgets->execute()
#7 /home/xxxxxxxxx/public_html/consults/index.php(13): IPS\_Dispatcher->run()
#8 {main}

Created widgets after off / on correctly. Also after removing cash  and disable/enable customizations.

 

 

Edited by Adlago

It might be worth, moving the other posts from

And placing them in here or a support topic on this forum.

  • Author
1 hour ago, Adlago said:

several tests

After adding an empty widget (custom txt or PHP Code) message pop-up window:

"Couldn't save block positions"

After confirming widget in page and can be edited.

In the system logs


OutOfRangeException:  (0)
#0 /home/xxxxxxxxx/public_html/consults/applications/cms/sources/Pages/Page.php(1894): IPS\Patterns\_ActiveRecord::load(9)
#1 /home/xxxxxxxxx/public_html/consults/applications/cms/sources/Pages/Page.php(1854): IPS\cms\Pages\_Page->mapToDatabase(9)
#2 /home/xxxxxxxxx/public_html/consults/applications/cms/modules/front/pages/builder.php(350): IPS\cms\Pages\_Page->postWidgetOrderSave()
#3 [internal function]: IPS\cms\modules\front\pages\_builder->saveOrder()
#4 /home/xxxxxxxxx/public_html/consults/system/Dispatcher/Controller.php(85): call_user_func(Array)
#5 /home/xxxxxxxxx/public_html/consults/applications/core/modules/front/system/widgets.php(39): IPS\Dispatcher\_Controller->execute()
#6 /home/xxxxxxxxx/public_html/consults/system/Dispatcher/Dispatcher.php(129): IPS\core\modules\front\system\_widgets->execute()
#7 /home/xxxxxxxxx/public_html/consults/index.php(13): IPS\_Dispatcher->run()
#8 {main}

Created widgets after off / on correctly. Also after removing cash  and disable/enable customizations.

 

 

Screenshot_15.png

as see empty nothing in there go out no error so how can i get same results ? where did you add the widget ? 

/home/xxxxxxxxx/public_html/consults/applications/cms/sources/Pages/Page.php(1894): IPS\Patterns\_ActiveRecord::load(9)

this would be pages issue look at error near the end my widget don't use Active Record pages does when using a database

1 hour ago, CP_User said:

It might be worth, moving the other posts from

And placing them in here or a support topic on this forum.

this can only done by IPS staff not by myself but would agree be nice keep topic one area.

Edited by Theme Tent UK

Actually, you're right - I have widget on my old test. After removing everything is OK  :)

  • 1 month later...

Thanks for this plugin. For some reason if I put the similar contents block above or below this one under topics the similar contents block will not load. Any ideas?

  • Author
3 minutes ago, AlexWebsites said:

Thanks for this plugin. For some reason if I put the similar contents block above or below this one under topics the similar contents block will not load. Any ideas?

I have no idea why that will be, but i am unable to confirm the bug as don't have any simlar content to use the block mainly due to development forum has very little content so may you allow me accress so take look.

Seems to be working now, maybe it was a cache issue.

  • 3 weeks later...

Hello @Theme Tent UK Is it possible autoresize image in the block?

When I put a image, this image don´t adapt to the differents screens

Thanks!

  • Author
7 minutes ago, pequeno said:

Hello @Theme Tent UK Is it possible autoresize image in the block?

When I put a image, this image don´t adapt to the differents screens

Thanks!

nope sorry don't resize images as the image will remain the default size.

One idea. Is it possible resize images with PHP code in block?

  • 3 weeks later...

I'm getting this message when try to add a custom text block

58da3deaa9835_Capturadepantalla2017-03-28ala(s)11_53_13.png.b636077eea97bc29f638f471b079b5a0.png

  • Author
6 hours ago, Pedro Ibáñez said:

I'm getting this message when try to add a custom text block

58da3deaa9835_Capturadepantalla2017-03-28ala(s)11_53_13.png.b636077eea97bc29f638f471b079b5a0.png

that looks more server issue to me like.htaccess as my widget just calls items that already there 

Ok much thanks!

has anyone managed to get amazon affiliate widgets code to work in this?

I add them but after saving I just get a blank space?

thanks in advance

  • Author
7 hours ago, Unlucky said:

has anyone managed to get amazon affiliate widgets code to work in this?

I add them but after saving I just get a blank space?

thanks in advance

Screenshot_78.png.819e11fc3a5884a255236015354fefea.png

just tested no issue with the wiget,

OK gonna send you one of the widget scripts on pm - can you test with this please

  • 3 weeks later...

hey, can someone help me out to show in this widget how many members are in one of my usergroups ?

 

Edited by Willie88

  • Author
On 22/04/2017 at 4:55 PM, Willie88 said:

hey, can someone help me out to show in this widget how many members are in one of my usergroups ?

 

sorry little confuded what your asking ?

Hello @Theme Tent UK

is there a way to backup all php widgets when you have many of them? Because if I put in another php widget, and I messed up the code and gave me error, the whole page site is gone and only gave me an error. As far as I know there is no way to fix it unless I uninstall the plugin and reinstall it again - in doing so I would lose all my php widgets with all the codes. Can you help?

  • Author
5 hours ago, vpatrickd said:

Hello @Theme Tent UK

is there a way to backup all php widgets when you have many of them? Because if I put in another php widget, and I messed up the code and gave me error, the whole page site is gone and only gave me an error. As far as I know there is no way to fix it unless I uninstall the plugin and reinstall it again - in doing so I would lose all my php widgets with all the codes. Can you help?

nope at moment no way backup the widget as all as one but if could would send the data to your database to store what you have not really check if that correct but would thought i would.

Not sure, but iFrame's aren't working properly. I'm trying to hook Discord into this sidebar, but it's not working.

 

Thoughts?

  • Author
34 minutes ago, Toxic_Wars said:

Not sure, but iFrame's aren't working properly. I'm trying to hook Discord into this sidebar, but it's not working.

 

Thoughts?

when say not working properly what working and what is not working ?

I'm adding Discord iframe

The widget doesn't show when I add the following:

<iframe src="https://discordapp.com/widget?id=308893001499934721&theme=dark" width="350" height="500" allowtransparency="true" frameborder="0"></iframe>


66d07ce029eb9ee351dcaab0a8e58e93.png

The widget is actually removing itself when I save it. I go back, and it's blank.

You can register an account @ https://development.cool and I'll let you test it if you want.

 

Edited by Toxic_Wars

Recently Browsing 0

  • No registered users viewing this page.