Get Source Code
hngts.com :: Funcdown :: Get Source Code
- Download Instructions
- Extension files
- Highlighters
-
- Copy, Paste and Save
by Hand
-
Undoubtfuly, You will need a directory with particular name on Your hard drive, that should be accessible via preffered http server. PHP built-in server will do the job perfectly (if You don't have Apache or similar installed) ... anyway, for the sake of the following steps below, we will use
$docroot
variable as installation location, where$docroot
may represent real$_SERVER['DOCUMENT_ROOT']
.
-
Create new sub-directory with name source under Your chosen
$docroot
location.
eg:mkdir $docroot/source
Note that it doesn't need to be `source`, it can be `fncd` or `fncd_depfiles`. If You decide to change basename into some other instead of default `source`, that action requires changing the first argument in Test/caller file as well (read the comment there). Nonetheless, variable
$funcDir
will point to `source` in this example. -
Create one more sub-directory with name .conf.d - inside previously created
$funcDir
sub-directory.
eg:mkdir $docroot/$funcDir/.conf.d
-
Click on
Extension Files
tab in the top-middle portion of this box, and there You will see 4 tabs where each ones content is a raw source code (file) content. The below table tells which tab content (source code) goes into which file. That is how You are going to create and name all four of them, as it is proposed with bold text underTarget File
. Note thatTest/caller
doesn't need to beindex.php
, name itfuncdown-test.php
if You wish, or if You already have an index.php in chosen directory tree.Tab Content Target File Test/caller $docroot/
index.phpObjectInstance $docroot/$funcDir/
ext.phpLibrary $docroot/$funcDir/
lib.phpConfig File $docroot/$funcDir/.conf.d/
.funcdown.conf.ini.php -
Once when You have all four files (
UTF-8
) ready,
repeat the following for eachTab Content
:- Click/focus onto source code
- Press
CTRL + a
(select all), then pressCTRL + c
(copy selection) - Open corresponding, previously created file (make sure it is - blank)
- Press
CTRL + v
(paste source) into and save file.
-
Once when You are finished with all 4 Tabs, You can test what You have done via browser url.
-
If You have apache or ngnix configured and running,
than just load:http://localhost/test_caller_file.php
from the browser url bar. -
In case You have only php-cli installed, than something like this from Your terminal.
Assuming that You are using GNU/Linux or Macphp -S localhost:8080 -t /directory/where/test_caller_file_is
and than load:
http://localhost:8080/test_caller_file.php
-
Outcome
If all goes well, this is what You should see on screen:
Test output on the images above is older than the current rolling funcdown version output (some properties have changed, etc.), therefore it will differ a bit from what You see on Your own screen, but in general, those images still reflect successfull outcome.
Syntax Highlighters
If You find Funcdown amusing or handy, You may want to have code coloring for it, while writing funcdown code. Syntax highlighting in other words. If You do, there are only two editors supported for now. Sublime Text Editor and Ace Editor.
- Click on
Highlighters
tab (top-right portion of this page). That would reveal two more additional tabs. One for Ace and the other for Sublime-text editor. -
Ace Editor highlighter
- Copy the entire contents of the tab code. (
ctrl + a
thenctrl + c
) - Create new file called
mode-funcdown.js
under the Ace root directory (you'll see a lot of othermode-*.js
files there), paste the clipboard contents (the previous step), save the file - and that's it!
From this point, Ace should know that there is mode-funcdown available and will highlight Your Funcdown code automatically, by giving configuration parameter, something like
editor.session.setMode("ace/mode/funcdown")
. Ace provides more options and functionallity for each and every mime/file type extension. You may want to refer to Ace online docs on how to add funcdown extension to the main drop-down menu, automatic extension detection, etc. - Copy the entire contents of the tab code. (
-
Sublime-Text Editor
Copy tab contents *(just like with Ace Editor) and save under the correct location with proper name *(eg:
funcdown.sublime-syntax
), and that should do. In general, Sublime-Text Editor is STATE OF THE ART *(in every way) code editor, and modifying or extending its functionality is a - breeze.If You have any kind of issues with custom syntax implementation, take a look at THIRD line, on the Sublime Text Editor tab.
Make Your self a cup of coffee and read what it says on their Custom Syntax Documentation Page.
-
- Copy, Paste and Save
-
- Test/caller
- ObjectInstance
- Library
- Config File
- index.php >> (session expired, please reload this page)
Last modified @ 2024-12-09 19:32:55+01:00
- ext.php >> (session expired, please reload this page)
Last modified @ 2024-06-21 22:01:44+02:00
- lib.php >> (session expired, please reload this page)
Last modified @ 2024-12-09 19:33:05+01:00
- .funcdown.conf.ini.php >> (session expired, please reload this page)
Last modified @ 2024-06-21 22:02:51+02:00
-
- Ace Editor
- Sublime Text Editor
- mode-funcdown.js
Last modified @ 2024-12-09 19:23:18+01:00
- funcdown.sublime-syntax
Last modified @ 2024-12-09 19:23:23+01:00