Forum Activity for @tig

TiG
@tig
04/13/18 08:32:14AM
184 posts

Overriding a View Function


Jamroom Developers

Brian

I will probably make that cosmetic change to avoid potential confusion.

Thanks,
TiG
TiG
@tig
04/13/18 08:19:24AM
184 posts

Overriding a View Function


Jamroom Developers

Brian

Well nuts. First thing I did in this process was review the listeners to find logical candidates.
I tried parse_url early on and moved on because it did not seem to work.

Turns out that It works fine. The reason it did not seem to work for me is that the address bar still shows the original uri. It looked as though my redirection changes were ignored so I continued my search for 'the proper' event.

This is the value of being able to tap into JR expertise - the confidence to know when you are on the right path.

I un-commented my old parse_url listener and verified that in spite of the address bar showing the original uri, the redirection actually was working.

Thanks very much for your help!
TiG
TiG
@tig
04/12/18 10:29:18PM
184 posts

Overriding a View Function


Jamroom Developers

Michael

I have used your diagram before, very helpful. Per your diagram, it makes sense for me (in this case) to establish a 'module view' listener and use same to grab control of the URL. As I noted, I already tried that and saw no way to influence the routing through the listener. Changing the module, option, etc. has no effect - the $_data changes are ignored by the router code. I was hoping there might be some other trick to use in this listener to influence the routing.

Per your flow, if a url has a view we hit a terminal node. That is, if there is a specific view for a URL the only chance for overriding was the 'module view' listener. After that we fall into the catch-all.

Tomorrow I will investigate the catch-all of view-results. That seems to be the only option left.

Thanks,
TiG
TiG
@tig
04/12/18 08:16:05PM
184 posts

Overriding a View Function


Jamroom Developers

Is there a way to redirect a view url so that another module can handle the view details? Basically overriding the implementation of the view? For example, I would like to redirect something like:

{$jamroom_url}/blog/update/id=147   to  {$jamroom_url}/article/update-blog/id=147

The 'article' module (in this example) would fully implement the update UX and the rest of the system can remain the same. That is, all the client requests (current and future) in the code to blog/update can remain intact.

__________________

( A 'module_view' listener looked very promising but it seems there is no way to effect a change in the url. )
( This is a piece of a broader function, but it is an important piece. )
updated by @tig: 07/13/18 07:53:15AM
TiG
@tig
03/25/18 11:15:15PM
184 posts

Site Builder Menu Not Showing


Jamroom Developers

Michael

Yeah this is strange. Works fine in production but not on the alpha test site. Thanks for weighing in.
TiG
@tig
03/25/18 04:09:22PM
184 posts

Site Builder Menu Not Showing


Jamroom Developers

On our group page (url=group), on the alpha site, I cannot get the SB menu to show up. The SB entry for this url is in jr_jrsitebuilder_page but the jrGroup index.tpl is always used instead.

As an experiment, I changed the url in the table to point to something other than 'group'. At this point, the SB menu does show up and asks if I want to use SB. I press OK (to use SB) and the SB menu disappears (back to where I started). A new entry was created in the jr_jrsitebuilder_page table but the menu does not show up.

Any ideas on what might cause this?


updated by @tig: 06/23/18 11:42:57PM
TiG
@tig
03/09/18 06:50:45AM
184 posts

Site Builder and Mobile Devices


Jamroom Developers

@michael

That gets me in the ballpark. It is valuable to know what is / is not possible (saves considerable searching time). Thanks for again sharing your expertise.

@brian

I understand. It is a delicate balancing act - the more functionality (the more configurable options) the more chance for errors and misunderstanding. ( Although since users can currently insert their own template code (and simple db queries) in SB that opens up a ton of potential errors right there. So you might already be well past the point where device-sensitive configuration options add significantly to the risk. )

As you know, I sort of inherited a site set up for owner-configuration. I have been migrating the site to a strictly file-based system so that PHP Storm can 'see' all the operative code and, if I had started from scratch, I probably would have rolled my own bootstrap structure rather than use SB.

Perrie still directly uses SB so I will work around it to meet site needs. Thanks to you both for the advice.
TiG
@tig
03/08/18 06:36:30PM
184 posts

Site Builder and Mobile Devices


Jamroom Developers

Adjusting the presentation (and content) to accommodate mobile devices is easy to do while using SB. Two things, however, seem to be out of reach when trying to scale down a page (in our case, the home page) for mobile devices.

First, there seems to be no way to conditionally hide a widget. Hiding the contents of a widget is trivial but the widget (its label) still shows up. Ideally there would be a 'Settings' option for Mobile | Tablet | Monitor which would allow us to uncheck Mobile so that the widget would then never render on any device that matches jrCore_is_mobile_device.

I am open for any thoughts you may have that allow me to not render select widgets for mobile devices.

Second, it would be quite powerful to be able to reorder widgets based on device type (even if we limit it to mobile and tablet as defined by the associated JR functions). This would, in effect, be equivalent to allowing us to design a SB page for standard monitor devices, another one (optionally) for tablets and yet another (optionally) for mobiles.

That is ideal and I do not expect it exists. I am just looking for suggestions on how to proceed. I have searched the forum and have not discovered much insight on this particular aspect.

----------------------

So, at the minimum, is there a way to conditionally hide an SB widget based on jrCore_is_mobile_device?

Thanks.
updated by @tig: 06/13/18 09:16:28PM
TiG
@tig
01/26/18 10:17:34PM
184 posts

Custom Banning


Jamroom Developers

@michael

We now have a context-specific censoring module to help the site maintain a 'nice' public face while allowing members to still express themselves (in the appropriate spots). A very good addition to the (substantially) more encompassing admin censoring control functionality we are adding.

It is great to be able to re-purpose JR functionality without having to reinvent the wheel!
TiG
@tig
01/26/18 08:33:16PM
184 posts

Custom Banning


Jamroom Developers

@michael

Yup I found it. Thanks for your help.
  8