Admin Panel - Eli-Par/comp3340-project GitHub Wiki

The admin panel is where admins can access various admin features in a single place. This page will discuss both this panel and extra privileges admins get on other pages too!

Note: All admin features can only be accessed if signed in as an admin user!

Opening the Admin Panel

To open the panel go to the welcome message in the top right. On desktop hover over it and on mobile press it. There will be a dropdown menu that opens. Select the Admin Panel option.

Changing Site Theme

In the main page of the admin panel there is a box labeled Select Theme. There are 3 options to choose between: Regular, Sharp, and Halloween. Press one of these options to change the theme to that option. Regular is the normal styling for the site. Sharp is a more minimal UI style that removes rounded edges, makes certain elements higher contrast and reduces contract between containers. Halloween changes the sites entire color scheme for the season. After you make a change to the theme the site will reload and the next time anyone accesses a page they will now see the new theme.

Discussion Post Graph

At the bottom of the main page for the admin panel is a graph of discussion posts by day over time. This will let you see when spikes discussion posts being made were and what the trend of activity is.

Admin Page Navigation

There is a box on the main admin page labeled Admin Pages. This will contain 3 buttons to other admin pages. They are Manage Users for enabling and disabling user accounts. Add Advice for adding a new advice article. Contact Messages for reading all the messages received from the contact form. Simply click one of these buttons to go to the page and use the admin panel button in the dropdown in the top right to go back to the main admin page.

Manage Users

In the manage users page you will see a list of all users represented by their username and a column for that users status. New user accounts will start as active, as represented by the checkbox being ticked. You can untick the checkbox to update the user to be deactivated to tick it again to activate the account again. If a user account is deactivated they won't be able to sign in any more and will receive a message that their account was deactivated.

Uploading Images and Videos (for advice or gallery)

To add new files for inclusion in an advice article and the gallery go into the project folder on myweb and enter the public_html folder. Then open the gallery folder. Simply place the image or video into this folder and it will automatically appear in the gallery section. To include it in an advice article take note of the name and follow the guide in the next section of this page.

Add Advice

In the add advice page you can create a new advice article. Specify the title, content and summary which will show up in their sections of the advice page once made. The about the author section will use your account bio which can be edited following the user profile guide. The key thing is the link field. To include an image on the advice page you will need to write the path to the file. All photos should be placed in the gallery folder following the guide in the previous section. You will put into the image link field "gallery/file.extension" while not actually putting in in quotes. You will write the exact file name that the file you put into the gallery folder had and make sure to also include the file extension. That is the part after the dot. If you don't get this working first try you can always edit the advice to fix the image link so don't worry!

Contact Messages

On the contact messages page you will see a grid of message boxes. At the top of each box will be the subject of the message. Under that it will say From [name] which is what they put in as their name. It will then say | followed by their email if they included one, otherwise this will be absent. Finally, at the bottom will be the message they typed. These entries cannot be expanded.

Editing Advice

To edit an advice article go to any of the places where there is a grid of advice. Press the advice card to open it. There will be a pencil icon to open the article for editing. You will be presented with all the same fields as adding a new advice entry. Simply make your changes and save!

Deleting Advice

To edit an advice article go to any of the places where there is a grid of advice. Press the advice card to open it. There will be a trash can icon. Press it and confirm that you want to delete the advice entry. It will delete the advice for you.

Editing and Deleting Discussions

Admins can edit and delete discussion posts even if they aren't the author. This means the edit and delete options will always be present for admins. For details on how to edit and delete discussions look at the discussion board page.