Jump to content

Global widgets enhance


kmk

Recommended Posts

IPS widgets are already implemented, but could you add ability to show by app and by page? 

I try to place a gallery album widget inside of club, but it is visible in all clubs and forums pages. 

I would like have choices of Global, by apps, by pages, or only in specific club page... 

Link to comment
Share on other sites

7 hours ago, kmk said:

IPS widgets are already implemented, but could you add ability to show by app and by page? 

I try to place a gallery album widget inside of club, but it is visible in all clubs and forums pages. 

I would like have choices of Global, by apps, by pages, or only in specific club page... 

I have been asking for this for the past 5 years, so don't hold your breath.

Due to the way that the blocks information are stored in the database, it makes it impossible to create a plugin to do what you or I want.

 

Link to comment
Share on other sites

Just now, TDBF said:

I have been asking for this for the past 5 years, so don't hold your breath.

Due to the way that the blocks information are stored in the database, it makes it impossible to create a plugin to do what you or I want.

 

I do not think that such a slight option is impossible.

If you want a widget to be displayed only in a forum sub category because it only corresponds to this sub category or to a specific club, why display it on all forums?

Link to comment
Share on other sites

2 minutes ago, abdoulghani said:

If you want a widget to be displayed only in a forum sub category because it only corresponds to this sub category or to a specific club, why display it on all forums?

Because currently the widget is tied to the controller so Forum1, Forum200 or Club Forum C and Club Forum Z uses same controller, that’s why it shows same information in all “forums”.

It seemed to start to change in 4.5. There are news regarding clubs: Clubs Widgets on 

 

Link to comment
Share on other sites

8 minutes ago, abdoulghani said:

I do not think that such a slight option is impossible.

If you want a widget to be displayed only in a forum sub category because it only corresponds to this sub category or to a specific club, why display it on all forums?

Without a major refactor to the database block tables, or simply hacking the hell out of the code which will require pulling unnecessary table row information to display one block, then sure. 😉

Link to comment
Share on other sites

3 minutes ago, TDBF said:

Without a major change database table, or simply hacking the hell out of the code which will require pulling unnecessary table row information to display one block, then sure. 😉

I don’t think it’s necessary. It’s enough to add a node field in the widget configuration and check if you’re in the forum controller then check the request ID of the forum and display the widget output if it’s a match. 

Link to comment
Share on other sites

20 minutes ago, Adriano Faria said:

I don’t think it’s necessary. It’s enough to add a node field in the widget configuration and check the request ID of the forum and display the widget output if it’s a match. 

It is, as the block information is stored in two different database tables, cms_page_widget_areas and core_widget_areas, and the block content for each page is stored table field which corresponds to the for app, module and controller.

In the case of pages, all the block information is stored in field area_widget which means it is global for pages database. That means, if you place a block in the database index, it will be shown in the database category and page.

If I want to pull out just one block for the Category page, it means I have to pull out all that information from area_widgets for all blocks for that Database and process them all. It is just not very efficient way and is resource hungry IMO. It also means that you have to take process this information every-time you want to update or save a block.

Link to comment
Share on other sites

55 minutes ago, Adriano Faria said:

If you check the controller and the request ID on the render() and if you’re not in the “right” place, no output is generated so no resource is used. This is already used by IPS in announcements. You are over complicating things. Anyway, it’s already doable. 

Then I don't think we are talking about the same thing.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...