Pointing to Our Servers
If the Domain Name Server is to be ours, whereby the website is hosted on our server, then you will need to login to your Domain Admin and set the nameservers as
- ns10565.dizinc.com
- ns10566.dizinc.com
This is our hostdime.com where we have been customers of their shared hosting plan since May 2005.
Setup Subdomain preview.[yourwebsite.com]
(if our's is not your DNS server)
- go to your domain host
- create an A record for the subdomain
- give the IP as 198.136.61.225
Setting up Environment
If this is too technical / your not a developer, feel free to reach out to Imran for support / install over remote control.
Create folder D:\Magique. If there is no C Drive, you may have to go to Disk Management and Shrink Volume to create a D:\ drive if it doesnt exist, or any drive other than C (which data will get lost in the event of a OS / hardware failure).
Install git and tortoisegit so code can be managed.
Git requires to check-in and check-out line endings as is, so make sure to select this correctly in the Wizard. If you miss this, in git bash, you can run git config -global core.autocrlf "false".
TortoiseGit First Run Wizard requires a email - give team@yieldmore.org and your name.
Download the bitbucket/amadeusweb/amadeus/ into Magique (standalone php) -- or -- htdocs (xampp). Do the theme extraction and see that the localhost/amadeus/ site is running.
YieldMore World is a good example of a complex site. See code.amadeusweb.com for all projects.
We recommend using the YM code Flavour to jump start your development.
Create a bitbucket repository for your website / ask Imran to set it up for you - using his shared account so you dont need to create your own. If you are approaching us through a locality, group or institution, we recomment setting up a single shared account for yourselves.
Note that the bitbucket app key can be had from Imran for account amadeuswebdev.
Install php with administrator command prompt using the chocolatey instructions below on windows or on mac.
NOTA BENE: If you think you will require mysql / dont want to run chocolatey (which is a little complicated for beginners), you can download and install xampp. Then, git cloning will be needed to it's htdocs folder and step 5 will not be needed.
Skip this if choosing xampp in step 4.
Make a batch file called run-web.bat in the web folder with "php -S localhost:80".
Always make sure this is running while doing development, else localhost will not open.
Make sure Skype or anything else is not using port 80 - or if unable to change that, you can do the replace_vars in local url, running it from a different port.
Extract the theme assets (see below) that your site is using - for Amadeus, this is biz-land (see cms.php).
Run the server (bat file) and open localhost/amadeus/ and localhost/yieldmore/ in the browser and it should show the folder contents.
Before uploading to a server, you will need an FTP Client like FTPSync or Beyond Compare.
Install a Code Editor like VSCode on any platform or PSPad on Windows.
Command Lines for PHP Setup
Chocolatey, dubbed "The Package Manager for Windows" is a system for installing (with dependancies) packages like PHP which have different prerequisites depending on the version, service pack and hotfixes installed in windows. The PowerShell and choco install commands below to be run in CMD Prompt with Administrator privileges. REM indicates a batch file remark and is the source where said command is from.
rem https://docs.chocolatey.org/en-us/choco/setup
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "[System.Net.ServicePointManager]::SecurityProtocol = 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
rem https://community.chocolatey.org/packages/php
choco install php --package-parameters='"/ThreadSafe"'
Theme Extraction
This assumes a theme has been created and zipped as per this page.
If this step is not done properly for the theme the current website is using / trying to use you will get a lot of 404 not found errors and the website will appear broken / plain white.
- Save the zip from the theme downloads page into the theme folder if not done already. For Amadeus you will need biz-land.
- Extract "here" and get all the assets - css, js and default images.
- Load / refresh the website and see that there are no missing assets.
- If your git client (usually tortoisegit) shows theme assets as being different, this would be because optimizations/validation fixes have been done on that theme and these files need to be reverted since the zip file would have overwritten the changed files that are checked in. It is a good idea to see what has changed. This is the case for biz-land, so say skip replace all files when it says should it overwrite.
Additionally, if planning to use Slides, the revealjs will need to be downloaded and extracted to the assets folder.
Setting Up on Mobile
The following Apps need to be installed:
- Git Client - PocketGit on Android
- Server in Mobile - AWebServer - Android - screenshot
- Code Editor - APhPEditor - Android
In a folder called Magique in the Mobile (configured as the server's wwwroot), the Amadeus repository needs to be cloned.
Server should run on port 8080 (or any) - see port substitution code in cms.php
'url' => $local ? replace_vars('http://localhost%port%/amadeus/', 'port') : 'https://amadeusweb.com/',
NOTE:
- Php is detected when Magique is the containing folder.
- Url rewriting is only configued when running in apache (not the standalone php server we use in env setup). Hence, inner pages will have an index.php/ just after the url.
- A new method has been made available and can be seen in action as:
<a href="<?php echo am_page_url('creatively-yours/');?>">a course</a>
- The menu and recursive menu already use this.
- In renderFile (md/txt) its %page-url%