mirror of
https://github.com/openclassify/openclassify.git
synced 2026-02-10 15:26:10 -06:00
#431 add favicon for General Settings
This commit is contained in:
parent
9dbca4efb9
commit
1f8888b56b
@ -15,6 +15,13 @@ return [
|
|||||||
'disabled' => true,
|
'disabled' => true,
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
"favicon" => [
|
||||||
|
"type" => "anomaly.field_type.file",
|
||||||
|
"config" => [
|
||||||
|
"folders" => ['favicon'],
|
||||||
|
"mode" => "upload",
|
||||||
|
]
|
||||||
|
],
|
||||||
'auto_approve' => [
|
'auto_approve' => [
|
||||||
'type' => 'anomaly.field_type.boolean',
|
'type' => 'anomaly.field_type.boolean',
|
||||||
'bind' => 'adv.auto_approve',
|
'bind' => 'adv.auto_approve',
|
||||||
@ -285,7 +292,7 @@ return [
|
|||||||
'options' => function () {
|
'options' => function () {
|
||||||
$json = file_get_contents("https://openexchangerates.org/api/currencies.json");
|
$json = file_get_contents("https://openexchangerates.org/api/currencies.json");
|
||||||
$cur = array();
|
$cur = array();
|
||||||
foreach(json_decode($json, true) as $key => $value){
|
foreach (json_decode($json, true) as $key => $value) {
|
||||||
$cur[$key] = $value;
|
$cur[$key] = $value;
|
||||||
}
|
}
|
||||||
return $cur;
|
return $cur;
|
||||||
|
|||||||
@ -16,6 +16,9 @@ return [
|
|||||||
'phone' => [
|
'phone' => [
|
||||||
'name' => 'Contact Phone',
|
'name' => 'Contact Phone',
|
||||||
],
|
],
|
||||||
|
'favicon' => [
|
||||||
|
'name' => 'Favicon',
|
||||||
|
],
|
||||||
'contact_mail' => [
|
'contact_mail' => [
|
||||||
'name' => 'Contact Mail',
|
'name' => 'Contact Mail',
|
||||||
'warning' => 'Auto added sitename <strong>info</strong>@sitename ',
|
'warning' => 'Auto added sitename <strong>info</strong>@sitename ',
|
||||||
|
|||||||
@ -1,5 +1,7 @@
|
|||||||
<?php namespace Visiosoft\AdvsModule;
|
<?php namespace Visiosoft\AdvsModule;
|
||||||
|
|
||||||
|
use Anomaly\FilesModule\Disk\Contract\DiskRepositoryInterface;
|
||||||
|
use Anomaly\FilesModule\Folder\Contract\FolderRepositoryInterface;
|
||||||
use Anomaly\Streams\Platform\Database\Seeder\Seeder;
|
use Anomaly\Streams\Platform\Database\Seeder\Seeder;
|
||||||
use Anomaly\Streams\Platform\Model\Options\OptionsAdvertisementEntryModel;
|
use Anomaly\Streams\Platform\Model\Options\OptionsAdvertisementEntryModel;
|
||||||
use Chumper\Zipper\Zipper;
|
use Chumper\Zipper\Zipper;
|
||||||
@ -9,11 +11,53 @@ use Visiosoft\AdvsModule\Seed\BlockSeeder;
|
|||||||
|
|
||||||
class AdvsModuleSeeder extends Seeder
|
class AdvsModuleSeeder extends Seeder
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* The disk repository.
|
||||||
|
*
|
||||||
|
* @var DiskRepositoryInterface
|
||||||
|
*/
|
||||||
|
protected $disks;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The folder repository.
|
||||||
|
*
|
||||||
|
* @var FolderRepositoryInterface
|
||||||
|
*/
|
||||||
|
protected $folders;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new FolderSeeder instance.
|
||||||
|
*
|
||||||
|
* @param DiskRepositoryInterface $disks
|
||||||
|
* @param FolderRepositoryInterface $folders
|
||||||
|
*/
|
||||||
|
public function __construct(DiskRepositoryInterface $disks, FolderRepositoryInterface $folders)
|
||||||
|
{
|
||||||
|
$this->disks = $disks;
|
||||||
|
$this->folders = $folders;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Run the seeder.
|
* Run the seeder.
|
||||||
*/
|
*/
|
||||||
public function run()
|
public function run()
|
||||||
{
|
{
|
||||||
|
$disk = $this->disks->findBySlug('local');
|
||||||
|
|
||||||
|
$this->folders->create(
|
||||||
|
[
|
||||||
|
'en' => [
|
||||||
|
'name' => 'Favicon',
|
||||||
|
'description' => 'A folder for Favicon.',
|
||||||
|
],
|
||||||
|
'slug' => 'favicon',
|
||||||
|
'disk' => $disk,
|
||||||
|
'allowed_types' => [
|
||||||
|
'ico'
|
||||||
|
],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
//Download demo SQL
|
//Download demo SQL
|
||||||
$repository = "https://raw.githubusercontent.com/openclassify/Openclassify-Demo-Data/master/";
|
$repository = "https://raw.githubusercontent.com/openclassify/Openclassify-Demo-Data/master/";
|
||||||
|
|||||||
@ -39,7 +39,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<!-- Favicon -->
|
<!-- Favicon -->
|
||||||
{#{{ favicons("theme::img/favicon.png") }}#}
|
{{ favicons(url('files/' ~ file(setting_value('visiosoft.module.advs::favicon')).path)) }}
|
||||||
|
|
||||||
{# Base Theme Components #}
|
{# Base Theme Components #}
|
||||||
{{ asset_add("theme.css", "theme::scss/bootstrap/bootstrap.scss") }}
|
{{ asset_add("theme.css", "theme::scss/bootstrap/bootstrap.scss") }}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user