Requirements:
-
CoSign : You will need to update your cosign .conf file to include the following:
<LocationMatch "/commencement/register"> CosignProtected On CosignAllowPublicAccess Off AuthType Cosign Require valid-user </LocationMatch> <DirectoryMatch "/Cerebro/(?!cron.php|!public-index.php|!ajax|!files|!templates)"> CosignProtected On CosignAllowPublicAccess Off AuthType Cosign Require valid-user </DirectoryMatch>
-
WkHTMLToPDF plugin is required to be installed on your server. Visit http://wkhtmltopdf.org/ and download the binary from the downloads page.
-
public-index.php is for public facing, for Students.
-
Add files and template folder simon's note: need to add base structure to git and make sure they are all setup as sudo chmod 775
-
Mod_rewrite required
-
Session folder must be writable
-
Case Sensitive URL. You can make it case insensitive but I recommend leaving it alone and just make sure to access the website via Capital C.
-
short_open_tag PHP is required.
Instructions for Front Facing page: (Difficulty=easy)
If you need to setup a way for a front-facing page without the url saying "CEREBRO", then this requires you to edit the .htaccess . This should not be hard if you have access to edit the .htaccess file.
You should have within your htaccess file a section that says the following:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /
#other code in between the two tags.
</IfModule>
then you will need to add the following (ONLY IF IT DOES NOT EXIST)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} ^/Cerebro/(.*)
RewriteRule ^(.*)/(.*)/?$ /Cerebro/public-index.php?circuit=$2 [L,QSA]
to make it look somewhat like this:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /
#other code in between the two tags.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} ^/commencement/register/(.*)
RewriteRule ^(.*)/(.*)/?$ /Cerebro/public-index.php?circuit=$2 [L,QSA]
RewriteRule ^/?commencement/register$ /commencement/register/ [R=301,L]
</IfModule>
CEREBRO setup as ROOT DIRECTORY then remove the word CEREBRO/.
What this will do is that the students will be given a URL to https://your-website.com/commencement/ and they will proceed from there. That is it!
CRON
You will need to setup a cron job for cron.php (this file will periodically update the header and footer for an event so that the visuals are up-to-date. This is best suited when a website compress and caches their CSS/JS files).
-
SSH as root (sudo)
-
Enter Commands-line: vi /etc/crontab or if you have crontab editor, sudo crontab -e
-
insert the values
*/30 * * * * /usr/bin/php /var/www/html/Cerebro/cron.php >/dev/null 2>&1
OR
*/30 * * * * curl --silent --compressed https://yourwebsite.edu/Cerebro/cron.php >/dev/null 2>&1
adjust as needed for file location and frequency.
-
Verify Cron job is working with meta tag last modified on the register page.
-
Also verify permissions level on the file. Especially the cosign part. (see Requirements #1)
DEV NOTES
- After an import of an excel file, you can reorder the weights of the DEGREES, UNITS, and MAJORS/MINOR with the script called (reorder-weights.php)