Skip to content
YounesBessaPublic

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

 
 

Latest commit

 

History

250 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Sably – online CV library (WordPress theme)

CV-thèque en ligne : les candidats créent leur CV, les recruteurs le consultent et le téléchargent en PDF.

School project built by a team of students in two weeks (8–19 February 2021). Sably is a custom WordPress theme for a CV library: candidates sign up, fill in their CV section by section and export it as a PDF; recruiters browse all published CVs and download them.

This repository is a fork of the team repository. Only wp-content/ is versioned: WordPress itself and wp-config.php are not included.

Team and my contributions

The theme was written by Lucas Bellier (ImJustLucas: login system, CV builder, PDF export, tab system), Safia Medjahed (responsive layout, modals, contact and about pages), Kais Amirouche (KA3SS: early CSS, home page video), a committer recorded as unknown (sign-up, e-mail validation, forgotten password) and me.

Me (YounesBessa), about 30 of 248 commits, front-end:

  • header markup and style, with the yellow/blue Sably logos and hover states, and the home button in the nav bar;
  • footer, legal notice page (template-legal.php);
  • 404 and 403 pages (design and illustrations);
  • recruiter area styling: CV table (template-recruiter.php) and single CV page (template-recruitersingle.php), recruiter header;
  • styling of the CV section of the profile page, the delete confirmation popup and the login page buttons; CSS reorganisation;
  • YouTube video link on the home page.

Features

  • Candidates (client role)
    • Sign-up with e-mail validation link (template-signin.php, template-valid-mail.php).
    • Login (template-login.php), forgotten password by e-mail (template-forgot.php, template-newpass.php).
    • Profile (template-profile.php): edit personal info (name, e-mail, age, address, phone, password), create/delete a CV, add or remove experiences, education, skills, hobbies and awards, preview or download the CV as a PDF (FPDF).
  • Recruiters (recruiter role, created in inc/roles.php)
    • List of all active CVs (template-recruiter.php) and detail page with PDF preview and download (template-recruitersingle.php).
  • Public pages: home with typing animation and tabs (home / about), contact form saved to the database and listed in a "Contact" menu in the WordPress admin, legal notice, custom 403/404 pages.

Tech stack

  • WordPress (custom theme based on the _s / Underscores starter)
  • PHP, $wpdb for the custom tables
  • FPDF (bundled in inc/fpdf.php) for the PDF export
  • PHPMailer (the copy bundled with WordPress) for e-mails
  • jQuery 3.5, Micromodal, Magnific Popup, Font Awesome kit

Project structure

database.sql                       custom tables (CV sections, contact messages)
wp-content/
  plugins/                         empty (third-party plugins removed from the repo)
  themes/sably/
    functions.php                  loads inc/*
    inc/main.php                   theme setup, scripts, admin "Contact" page
    inc/roles.php                  "recruiter" and "client" roles
    inc/func.php                   validation helpers, createCv() (PDF)
    inc/function_mail.php          sendMailer() (SMTP settings from wp-config.php)
    inc/fpdf.php, inc/font/        FPDF library
    ajax/ajax-deleteDataCv.php     AJAX handler to delete a CV entry
    template-*.php                 one page template per screen
    header.php, footer.php         layout and confirmation modals
    assets/                        CSS, JS, images

Running locally

Requirements: a local WordPress stack (XAMPP, MAMP, Local, etc.) with PHP 7.4+ and MySQL/MariaDB. WordPress 5.5 or later is needed (the theme uses its bundled PHPMailer).

  1. Install WordPress. In wp-config.php, set the table prefix the code expects:
    $table_prefix = 'wp_sbl_';
  2. Copy this repository's wp-content/themes/sably into your wp-content/themes/ and activate the sably theme.
  3. Import database.sql into the WordPress database (custom tables).
  4. Create one WordPress page per template, with these slugs (the code redirects to them): home, login, signin, validmail, forgot, newpass, profile, recruiter, recruitersingle, contact, legal, 403, 404. Set home as the static front page and use "Post name" permalinks.
  5. For e-mails (account validation, password reset, CV notification), add your SMTP account to wp-config.php:
    define('SABLY_SMTP_HOST', 'smtp.example.com');
    define('SABLY_SMTP_PORT', 465);
    define('SABLY_SMTP_SECURE', 'ssl');
    define('SABLY_SMTP_USER', 'no-reply@example.com');
    define('SABLY_SMTP_PASS', 'change-me');
  6. Candidates sign up through the site. Recruiter accounts are created in the WordPress admin with the Recruteur role.

Limitations

  • Pages and their slugs must be created by hand; there is no setup script.
  • Custom CV tables are not prefixed and are not created on theme activation.
  • Account validation is stored in user meta, but login does not refuse accounts whose e-mail is not validated.
  • The e-mail and password reset tokens are generated with rand() and the advertised expiry (3 minutes) is not enforced.
  • Several queries still build SQL by string concatenation with integer IDs, and most output is not escaped. Student project: not production-ready.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages