Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jul 28 2019 13:35

    UserApplePie on master

    Update README.md (compare)

  • Jul 28 2019 13:28

    UserApplePie on master

    Update README.md (compare)

  • Jul 24 2019 20:18

    davarravad on v4.3.0

    (compare)

  • Jul 24 2019 20:16

    davarravad on master

    Update Header.php Lost the the… Merge pull request #155 from Us… (compare)

  • Jul 24 2019 20:16
    davarravad closed #155
  • Jul 24 2019 20:16
    davarravad opened #155
  • Jul 24 2019 20:11

    davarravad on staging

    Update Header.php Lost the the… (compare)

  • Jul 23 2019 23:51

    UserApplePie on 4.3.0

    (compare)

  • Jul 23 2019 02:55
    davarravad closed #138
  • Jul 23 2019 02:54

    davarravad on master

    Additions and Updates Added Te… Merge pull request #154 from Us… (compare)

  • Jul 23 2019 02:54
    davarravad closed #154
  • Jul 23 2019 02:54
    davarravad opened #154
  • Jul 23 2019 02:54

    davarravad on staging

    Additions and Updates Added Te… (compare)

  • Jul 21 2019 02:08
    davarravad closed #102
  • Jul 21 2019 02:08
    davarravad closed #136
  • Jul 21 2019 02:08

    davarravad on master

    Updates Added Auto Friend feat… Merge pull request #153 from Us… (compare)

  • Jul 21 2019 02:08
    davarravad closed #153
  • Jul 21 2019 02:07
    davarravad opened #153
  • Jul 21 2019 02:07

    davarravad on staging

    Updates Added Auto Friend feat… (compare)

  • Jul 19 2019 16:19

    davarravad on master

    Site Routes URL fix Setup Site… Merge pull request #152 from Us… (compare)

DaVaR
@davarravad
according to Apache yes
Tiago Lauletta Modesto
@TiagoLaMo
ok. but when I right any html code considering that this is my root folder and try to load a resource from app folder, I should say ../app/Templates/Default/Assets/css for example.
however if I try to do that, it fails to reach the file.
DaVaR
@davarravad
oh ok
I see
Tiago Lauletta Modesto
@TiagoLaMo
but if I consider app folder as my root folder, everything magically works...
;)
I just don't know why!
how my root folder changes to app?
so if I want to load something in the html code I just tell /Template/Default/Assets/css and it do reach the file.
DaVaR
@davarravad
are you using the Url::templatePath() to load files from the assets folder?
Tiago Lauletta Modesto
@TiagoLaMo
yes
and it also detects if I use the http://uap/Template/Default/Assets/css
DaVaR
@davarravad
so if you want to load from css folder you use.... Url::templatePath().'css/style.css',
Tiago Lauletta Modesto
@TiagoLaMo
what doesn't make any sense to me.
yes
DaVaR
@davarravad
What detects?
Tiago Lauletta Modesto
@TiagoLaMo
None, that is my problem. lol...
I am unable to understand how the html code has any acknowledge of my app folder.
DaVaR
@davarravad
oh ok
Tiago Lauletta Modesto
@TiagoLaMo
since the app folder is above the public one
DaVaR
@davarravad
You are just trying to understand how this
Tiago Lauletta Modesto
@TiagoLaMo
yes...
DaVaR
@davarravad
Url::tmplatePath().'css/style.css',
Tiago Lauletta Modesto
@TiagoLaMo
I search a lot on the web, but couldn't find any answers.
DaVaR
@davarravad
turns into this
In the index file, it loads the paths...
Tiago Lauletta Modesto
@TiagoLaMo
yes, but how it reaches my templates folder once it is inside the app one, who tell that to html
hum...
let me take a look.
DaVaR
@davarravad
/** Define the absolute paths for configured directories */
define('APPDIR', realpath(__DIR__.'/../app/').'/');
define('SYSTEMDIR', realpath(__DIR__.'/../system/').'/');
define('PUBLICDIR', realpath(__DIR__).'/');
define('ROOTDIR', realpath(__DIR__.'/../').'/');
So that setting sets up the framework to use the app and system folders and anything in them
Then it includes these files that have more commands that tell it what all to load
    /** initiate Alias */
    new Core\Alias();
    /** initiate config */
    new \App\Config();
    /** load routes */
    require APPDIR.'Routes.php';
Tiago Lauletta Modesto
@TiagoLaMo
yes.
is it the fact that we require a file from APPDIR that makes APPDIR our new root folder for html code?
DaVaR
@davarravad
Composer does most of the work.
Tiago Lauletta Modesto
@TiagoLaMo
this work <link rel="stylesheet" href="/Template/Default/Assets/css/style.css" type="text/css" />
DaVaR
@davarravad
require ROOTDIR.'vendor/autoload.php';
Tiago Lauletta Modesto
@TiagoLaMo
this work <link rel="stylesheet" href="/../app/Template/Default/Assets/css/style.css" type="text/css" />
sorry don't work
@TiagoLaMo
this don't work <link rel="stylesheet" href="/../app/Template/Default/Assets/css/style.css" type="text/css" />
ok, I will take a look
DaVaR
@davarravad
The the router is setup so that people can not access all files in app folder directly....
reduces chance of hacker editing important files.
Tiago Lauletta Modesto
@TiagoLaMo
yes, this scheme I think is great.
DaVaR
@davarravad
It take a little getting use to that is for sure. But I love it
Tiago Lauletta Modesto
@TiagoLaMo
I tried to look this on the web, but it seams everybody put everything in the root folder
that is why I am having a bat time trying to figure it out how html code know that my root folder is app folder and not public folder.