News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

SMF structure and process flow

Started by Arnsoda, May 30, 2015, 07:40:51 AM

Previous topic - Next topic

Arnsoda

Hi guys, i have installed SMF on my laptop and run it through localhost, i set myself as an admin for new forum, after logged in i clicked on Admin - Members - Registration - Settings, and i noticed the URL is localhost/forum/index.php?action=admin;area=regcenter;sa=settings.

i'm very curious where are the codes that forming this page

i know that everything start from index.php,

"action=admin" means i have to look at admin.php - function AdminMain,
"area=regcenter" means i have to look at line 330 inside admin.php file, this line point me to ManageRegistration.php function RegCenter

but after that...i'm really clueless...could anyone explain how is the structure / process flow of this SMF so the page can be formed and viewed, or maybe you guys could share a step-by-step tutorial URL so i can learn and understand this? I will be greatly appreciate it.

The other thing i know Login.english.php and Admin.template.php are having a contribution so the page can be formed.

Thank you in advanced.


Antes

Since you are running SMF on localhost for dev/learning you can enable debug mode so you can find which files included in that page and fix/change more easily.

Add this line to Settings.php "$db_show_debug = true;" then you can see extra information about the page at the bottom of the page you are in.

Arnsoda

Thanks Antes, i did that and that quite helpful, i can see all files included. But i still don't know the flow, at least could you or someone show me how to add a line, let say... below "Age below which to apply registration restrictions" setting?

Thank you very much.

Kindred

It's not quite as simple as you seem to think... various files and functions are called as needed throughout and sometimes sometimes a page is built from from a dozen different functions.

The display layer is handled by the theme/template files...
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Arnsoda

I know it's not simple Kindred, that's why i asked...  ;D anyway thanks for your post

Kindred

well, you asked -- but you seemed to assume that there was some document or chart to show the structure/flow --  there is not, because of the complicatedness
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Arnsoda

Quote from: Kindred on May 30, 2015, 03:20:38 PM
well, you asked -- but you seemed to assume that there was some document or chart to show the structure/flow --  there is not, because of the complicatedness

yeah i assume that there was some document to show the flow because of the complexity, we don't need it if it's only a simple thing, do we?   :)

So i think i just have to figure it out by myself now (yeah like i can??....) ;D

Thanks.

Advertisement: