{"id":16067985,"url":"https://github.com/juzaweb/ads-manager","last_synced_at":"2026-03-13T05:02:14.385Z","repository":{"id":104398689,"uuid":"484712555","full_name":"juzaweb/ads-manager","owner":"juzaweb","description":"Add html ads to your website","archived":false,"fork":false,"pushed_at":"2026-02-08T01:57:05.000Z","size":231,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-02-08T09:51:33.898Z","etag":null,"topics":["ads","banner","cms","laravel"],"latest_commit_sha":null,"homepage":"https://juzaweb.com/product/ads-manager","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/juzaweb.png","metadata":{"files":{"readme":"README.md","changelog":"changelog.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-04-23T10:13:13.000Z","updated_at":"2026-02-08T01:57:07.000Z","dependencies_parsed_at":"2024-01-14T11:26:51.509Z","dependency_job_id":"39f32315-f097-4e63-9a16-c33c2d1e8cb0","html_url":"https://github.com/juzaweb/ads-manager","commit_stats":{"total_commits":51,"total_committers":2,"mean_commits":25.5,"dds":0.1568627450980392,"last_synced_commit":"889de1164307cf018433597f076fdf53241393a2"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/juzaweb/ads-manager","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juzaweb%2Fads-manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juzaweb%2Fads-manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juzaweb%2Fads-manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juzaweb%2Fads-manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/juzaweb","download_url":"https://codeload.github.com/juzaweb/ads-manager/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juzaweb%2Fads-manager/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30459258,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-13T03:55:51.346Z","status":"ssl_error","status_checked_at":"2026-03-13T03:55:33.055Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ads","banner","cms","laravel"],"created_at":"2024-10-09T06:07:36.204Z","updated_at":"2026-03-13T05:02:14.370Z","avatar_url":"https://github.com/juzaweb.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ads Manager Module\n\nThis advertising management module for Juzaweb CMS supports both banner and video ads, with flexible display placement management capabilities.\n\n## Features\n\n- **Banner Ads Management**: Manage banner advertisements with two types:\n  - Image Banner: Display images with clickable links\n  - HTML Banner: Custom HTML code support\n- **Video Ads Management**: Manage video advertisements with VAST support\n- **Position Management**: Manage ad positions by theme\n- **Statistics Tracking**: Track views and clicks\n- **Frontend Integration**: Helper functions for displaying ads on frontend\n\n## Installation\n\nThis module is part of Juzaweb CMS. To install:\n\n```bash\ncomposer require juzaweb/ads-manager\n```\n\n## Usage\n\n### Registering Ad Positions\n\nRegister ad positions in your theme or module:\n\n```php\nuse Juzaweb\\Modules\\AdsManagement\\Facades\\Ads;\n\n// Register banner position\nAds::position('header-banner', function () {\n    return [\n        'name' =\u003e 'Header Banner',\n        'type' =\u003e 'banner',\n    ];\n});\n\n// Register video position\nAds::position('video-preroll', function () {\n    return [\n        'name' =\u003e 'Video Pre-roll',\n        'type' =\u003e 'video',\n    ];\n});\n```\n\n### Displaying Ads in Frontend\n\n#### Using Helper Function\n\n```php\n// In Blade template\n{!! ads_position('header-banner') !!}\n```\n\n#### Using Facade\n\n```php\nuse Juzaweb\\Modules\\AdsManagement\\Facades\\Ads;\n\n$banner = Ads::getBanner('header-banner');\nif ($banner) {\n    echo $banner-\u003egetBody();\n}\n```\n\n### Managing Ads Programmatically\n\n#### Create Banner Ad\n\n```php\nuse Juzaweb\\Modules\\AdsManagement\\Models\\BannerAds;\nuse Juzaweb\\Modules\\AdsManagement\\Enums\\BannerAdsType;\n\n$banner = BannerAds::create([\n    'name' =\u003e 'Homepage Banner',\n    'body' =\u003e 'uploads/banner.jpg', // For image type\n    'url' =\u003e 'https://example.com',\n    'type' =\u003e BannerAdsType::TYPE_BANNER,\n    'active' =\u003e true,\n]);\n\n// Assign to position\n$banner-\u003epositions()-\u003ecreate([\n    'position' =\u003e 'header-banner',\n    'theme' =\u003e 'default',\n]);\n```\n\n#### Create Video Ad\n\n```php\nuse Juzaweb\\Modules\\AdsManagement\\Models\\VideoAds;\n\n$videoAd = VideoAds::create([\n    'name' =\u003e 'Pre-roll Ad',\n    'title' =\u003e 'Watch this ad',\n    'url' =\u003e 'https://example.com',\n    'video' =\u003e 'https://example.com/ad-video.mp4',\n    'position' =\u003e 'pre-roll',\n    'offset' =\u003e 0,\n    'active' =\u003e true,\n]);\n```\n\n### Querying Ads\n\n```php\nuse Juzaweb\\Modules\\AdsManagement\\Models\\BannerAds;\n\n// Get active banners for specific position\n$banners = BannerAds::whereFrontend()\n    -\u003ewherePosition('header-banner')\n    -\u003eget();\n\n// Get all banner positions\n$positions = Ads::bannerPositions();\n\n// Get all video positions\n$positions = Ads::videoPositions();\n```\n\n## Admin Panel\n\nThe module automatically registers menus in the admin panel:\n\n- **Ad Management** (parent menu)\n  - **Banner Ads**: Manage banner advertisements\n  - **Video Ads**: Manage video advertisements\n\n### Permissions\n\n- `banner-ads.index`: View banner ads list\n- `video-ads.index`: View video ads list\n\n## API Endpoints\n\n### Admin Routes\n- `GET /admin-cp/banner-ads` - List banner ads\n- `GET /admin-cp/banner-ads/create` - Create banner ad form\n- `POST /admin-cp/banner-ads` - Store new banner ad\n- `GET /admin-cp/banner-ads/{id}/edit` - Edit banner ad form\n- `PUT /admin-cp/banner-ads/{id}` - Update banner ad\n- `DELETE /admin-cp/banner-ads/{id}` - Delete banner ad\n\nSimilar routes for video ads at `/admin-cp/video-ads`\n\n## VAST Support\n\nThe module supports VAST (Video Ad Serving Template) for serving video ads:\n\n- `Juzaweb\\Modules\\AdsManagement\\Vast\\Document` - VAST document builder\n- `Juzaweb\\Modules\\AdsManagement\\Vast\\Factory` - Factory for creating VAST elements\n- Support for InLine and Wrapper ads\n- Linear and Non-linear creatives\n\n## Configuration\n\nPublish config file:\n\n```bash\nphp artisan vendor:publish --tag=ad-management-config\n```\n\nConfig file location: `config/ad-management.php`\n\n## Translations\n\nThe module supports multiple languages including:\n- English (en)\n- Vietnamese (vi)\n- Spanish (es)\n- French (fr)\n- German (de)\n- Czech (cs)\n- Portuguese (pt)\n- Russian (ru)\n\n## Development\n\n### Running Tests\n\n```bash\ncomposer test\n```\n\n### Code Style\n\nThe module follows PSR-2 coding standards.\n\n## License\n\nMIT License\n\n## Author\n\nThe Anh Dang - [Juzaweb CMS](https://juzaweb.com)\n\n## Support\n\nFor issues and feature requests, please use the [GitHub issue tracker](https://github.com/juzaweb/cms).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuzaweb%2Fads-manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjuzaweb%2Fads-manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuzaweb%2Fads-manager/lists"}