定制 sgalinski/sg-jobs 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

sgalinski/sg-jobs

Composer 安装命令:

composer require sgalinski/sg-jobs

包简介

Manage job postings in TYPO3 and collect applications with file uploads, notifications, and CSV export/storage.

README 文档

README

License: GNU GPL, Version 2

Repository: https://gitlab.sgalinski.de/typo3/sg_jobs

Please report bugs here: https://gitlab.sgalinski.de/typo3/sg_jobs

About

This extension provides job application functionality for a TYPO3 installation.

Features:

  • Creating jobs, including related details like companies and contacts
  • Applying for the created jobs
  • Applications include file uploads
  • Every application is saved conveniently in a CSV format, along with the uploaded files
  • Sends mail notifications when applications are submitted
  • Provides a JobTitleMapper for the TYPO3 9 route enhancers

Integration

Typoscript files need to be included manually.

plugin.tx_sgjobs {
	settings {
		allowedFileExtensions - allowed file extensions for the uploads (default pdf)
		allowedMimeTypes - allowed mime types for the uploads (default application/pdf)
		prioritizedCountries - comma-separated list of ISO country codes to be displayed on top of the country select dropdowns (default DE,AT)
	}
}

Speaking filter URLs

The Joblist filter uses speaking URLs via the SgJobList route enhancer:

  • /unternehmen/filter/all/
  • /unternehmen/filter/country:Deutschland/
  • /unternehmen/filter/country:Deutschland~department:5~experience:7/
  • /unternehmen/filter/country:Deutschland/2/ (pagination page 2)

Each filter URL is normalized server-side and then resolved by the filteredAction before forwarding to indexAction. This keeps URLs shareable and does not rely on JavaScript for URL building.

Note about single numeric filters

TYPO3 core URI parsing has an edge case for path segments like department:5 when they are the only filter token. To keep those URLs valid, the extension appends a trailing separator in that specific case:

  • /unternehmen/filter/department:5~/
  • /unternehmen/filter/experience:7~/

Country selection configuration

In the application form, you can set certain countries to appear at the top of the country selection dropdowns. This is especially useful when your job offer is primarily targeting applicants from specific countries.

Configure this in your TypoScript setup:

plugin.tx_sgjobs.settings.prioritizedCountries = DE,AT,CH

This example will display Germany, Austria, and Switzerland at the top of the country selection dropdown, making them easier to find.

Upload file size

By default, the maximum file size for an upload is 5MB / 5000kB. You can change this limit in the constants.ts configuration file:

settings {
    .....
    # cat=plugin.tx_sgjobs/other; type=string; label=Allowed maximum file size for uploads in kB
    allowedMaxFileSize = 5000
}

Backend Module

The Backend module is found in the WEB section under the name Job Offers.

You can create a new job offer by clicking on the New Job Offer button.

Setting the contact email

When a user applies to a job offer an email will be sent. The adress of this email comes either from the contact person assigned to the job, or if no contact person is set, the mail address is chosen from the selected location.

Simply supply the uid of the contact record and every job without a contact person will use the desired contact.

Setting the record page id for the Joblist plugin

You need to set the id of the page (or sys folder) where you store all your job offers, contacts and locations. To do this you can select the page/folder as Record Storage Page in the plugin settings.

Job form page

When inserting the joblist plugin on a page, make sure to select the page which contains the application form from Plugin -> Plugin Options -> Page containing the application form

Automated Email Messages

The extension uses sg_mail to configure email templates.

.htaccess

The folder which contains the applications folder should be blocked from outside access from the .htaccess file. Example:

RedirectMatch 403 ^/fileadmin/JobApplication/.*$

Implement job title mapping in TYPO3 9

To enable the job title mapping in TYPO3 9, you need to add this routeEnhancer configuration to your config.yaml.

routeEnhancers:
    SgJobApplication:
        type: Extbase
        extension: SgJobs
        plugin: JobApplication
        routes:
            -   routePath: '/job/applyform/{job_title}'
                _controller: 'Joblist::applyForm'
                _arguments:
                    job_title: jobId
            -   routePath: '/job/apply'
                _controller: 'Joblist::apply'
        defaultController: 'Joblist::applyForm'
        aspects:
            job_title:
                type: JobTitleMapper
        SgJobList:
            type: Extbase
            extension: SgJobs
            plugin: Joblist
            routes:
                -   routePath: '/job/{job_title}'
                    _controller: 'Joblist::index'
                    _arguments:
                        job_title: jobId
            defaultController: 'Joblist::index'
            aspects:
                job_title:
                    type: JobTitleMapper

This configuration will use the JobTitleMapper to map the job title to the jobs is. The routePath represents the speaking URL part where {job_title} is the placeholder for the job title. The JobTitleMapper is assigned to the job_title placeholder via aspects and will take care of the encoding and decoding of the job title and the according job id.

Migration from version 1 to version 2

If you update from sg_jobs version 1, you need to execute the Upgrade Wizard that migrates the old area field. To do so, please visit the Install Tool and click on Upgrade Wizards. Check the Job Upgrade Wizard and execute it. This Wizard will migrate your area data into department records.

Also, please be aware of changes to the Fluid template regarding the area -> department migration and change the area occurences of variables in the template to department records accordingly.

This version also introduces correct exclude field configurations for the tables, so check your backend user and backend usergroup permissions and adjust them accordingly.

Migration from version 3.2 to version 3.3

This is a purely optional step!

The new path_segment field was added to ensure that the proper URLs are used. In order to use it, add this code to your routes configuration file.

Furthermore, go to the list module and open your jobs directory in the TYPO3 backend. Select in the fields list the path_segment field after clicking on the jobs table to expand it to the table only view. You will get an edit icon above the path_segment title now. Click on it and generate for all of you jobs a new URL.

    SgJobApplication:
        type: Extbase
        extension: SgJobs
        plugin: JobApplication
        routes:
            -   routePath: '/{localizedSegment}/{jobTitle}'
                _controller: 'Joblist::applyForm'
                _arguments: { 'jobTitle': jobId }
            -   routePath: '/{localizedSegment}'
                _controller: 'Joblist::apply'
        defaultController: 'Joblist::applyForm'
        # The following issue prevents us from using this code. This patch is not good enough to use it yet as
        # slashes are not converted and this causes to regex mismatches in the routing environment.
        # https://review.typo3.org/c/Packages/TYPO3.CMS/+/61044
        # aspects:
        #     jobTitle:
        #         type: PersistedPatternMapper
        #         tableName: tx_sgjobs_domain_model_job
        #         routeFieldPattern: '-(?P<uid>\d+)$'
        #         routeFieldResult: '{title}-{uid}'
        aspects:
            jobTitle:
                type: PersistedAliasMapper
                tableName: tx_sgjobs_domain_model_job
                routeFieldName: path_segment
            localizedSegment:
                type: LocaleModifier
                default: 'apply'
                localeMap:
                    -   locale: 'de_DE.*'
                        value: 'bewerbung'
    SgJobList:
        type: Extbase
        extension: SgJobs
        plugin: Joblist
        routes:
            -   routePath: '/job/{jobTitle}'
                _controller: 'Joblist::index'
                _arguments: { 'jobTitle': jobId }
        defaultController: 'Joblist::index'
        aspects:
            jobTitle:
                type: PersistedAliasMapper
                tableName: tx_sgjobs_domain_model_job
                routeFieldName: path_segment

sgalinski/sg-jobs 适用场景与选型建议

sgalinski/sg-jobs 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 7 次下载、GitHub Stars 达 0, 最近一次更新时间为 2024 年 04 月 18 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 sgalinski/sg-jobs 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 sgalinski/sg-jobs 我们能提供哪些服务?
定制开发 / 二次开发

基于 sgalinski/sg-jobs 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 7
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 18
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-2.0-or-later
  • 更新时间: 2024-04-18