Jamroom Logo Jamroom 5 Core
is now Open Source!
User Support Forum Archive (Read Only)
Jamroom Developers:
JR5's router system
Michael
Jamroom Team


Joined: 22 Apr 2008
Posts: 3423
Location: Tokyo

Posted: 08/12/13 00:32 
JR5 funnels all requests into a router. The router then figures out who wants the incoming url.

modules can put their hand up and take responsibility for the full url, or the skins can over-ride an existing module url to do it themselves.

sometimes a module will take responsibility for providing a piece of functionality for all modules. This is called a MagicView. eg, its the jrImage module that provides a magic view for images so that the jrProfile module doesn't have to make its own image functions.

modules can also listen for an event that happens and inject some code into the output at that point if they want to. They do this by putting their hand up during the modules initialization phase that happens on each page request.

all this can be a little confusing at first, so here is a visual guide to what is happening in router.php.

PDF: URL Routing Flowchart for JR5

It will be in the docs once they get put up.

--edit--
This image is released under the Mozilla Public License (MPL).
Its also available online here:
https://en.wikipedia.org/wiki/File:A_diagram_of_the_routing_system_used_in_Jamroom_5.png


_________________
Michael Ussher
Jamroom Network Team Member: http://www.jamroom.net
Priority Support: http://www.jamroom.net/Support_Center

Last edited by Michael on 11/07/13 20:17; edited 1 time in total
Back to top
SteveX
Ultrabubble


Joined: 30 Aug 2005
Posts: 8792
Location: Ultrabubble

Posted: 08/12/13 15:28 
Cool, that's very useful Michael! It clarifies many things.

.htaccess could get a mention in that flow as well, so that people know how things arrive at router.php. Could be a point of confusion for people who are looking for an index.php as their starting point.


_________________
Kulshi Mezian!

"Stranger from another planet, welcome to our hole. Just strap on your guitar and we'll play some rock and roll"

Ultrabubble create things.
Back to top
Michael
Jamroom Team


Joined: 22 Apr 2008
Posts: 3423
Location: Tokyo

Posted: 08/12/13 17:13 
nice point, ill put that in the surrounding page. Cheers steve. Smile


_________________
Michael Ussher
Jamroom Network Team Member: http://www.jamroom.net
Priority Support: http://www.jamroom.net/Support_Center
Back to top
b360



Joined: 02 Feb 2011
Posts: 264

Posted: 08/13/13 03:12 
Thanks for this!

Back to top
Display posts from previous:   
User Support Forum Archive (Read Only)
Jamroom Developers

 
Solutions
• Social Media Platform
• Social Networking Software
• Musician Website Manager
• Community Builder
Products
• Jamroom Core
• Jamroom Addons
• Jamroom Modules
• Jamroom Marketplace
Support
• Support Forum
• Documentation
• Support Center
• Contact Support
Community
• Community Forum
• Member Sites
• Developers
Company
• About Us
• Contact Us
• Privacy Policy
©2003 - 2010 Talldude Networks, LLC.