[11/06/2024] Les premières modifs + installation de quelques modules indispensables
This commit is contained in:
25
domokits/local/modules/ShortCode/Config/TheliaMain.sql
Normal file
25
domokits/local/modules/ShortCode/Config/TheliaMain.sql
Normal file
@@ -0,0 +1,25 @@
|
||||
|
||||
# This is a fix for InnoDB in MySQL >= 4.1.x
|
||||
# It "suspends judgement" for fkey relationships until are tables are set.
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- short_code
|
||||
-- ---------------------------------------------------------------------
|
||||
|
||||
DROP TABLE IF EXISTS `short_code`;
|
||||
|
||||
CREATE TABLE `short_code`
|
||||
(
|
||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||
`tag` VARCHAR(55) NOT NULL,
|
||||
`event` VARCHAR(255) NOT NULL,
|
||||
`active` TINYINT,
|
||||
`created_at` DATETIME,
|
||||
`updated_at` DATETIME,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE INDEX `short_code_U_1` (`tag`)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
# This restores the fkey checks, after having unset them earlier
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
52
domokits/local/modules/ShortCode/Config/config.xml
Normal file
52
domokits/local/modules/ShortCode/Config/config.xml
Normal file
@@ -0,0 +1,52 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<config xmlns="http://thelia.net/schema/dic/config"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://thelia.net/schema/dic/config http://thelia.net/schema/dic/config/thelia-1.0.xsd">
|
||||
|
||||
<loops>
|
||||
<!-- sample definition
|
||||
<loop name="MySuperLoop" class="ShortCode\Loop\MySuperLoop" />
|
||||
-->
|
||||
</loops>
|
||||
|
||||
<forms>
|
||||
<!--
|
||||
<form name="MyFormName" class="ShortCode\Form\MySuperForm" />
|
||||
-->
|
||||
</forms>
|
||||
|
||||
<commands>
|
||||
<!--
|
||||
<command class="ShortCode\Command\MySuperCommand" />
|
||||
-->
|
||||
</commands>
|
||||
|
||||
<services>
|
||||
<service id="shortcode.response.listener" class="ShortCode\EventListener\ResponseListener">
|
||||
<tag name="kernel.event_subscriber"/>
|
||||
<argument type="service" id="event_dispatcher"/>
|
||||
</service>
|
||||
</services>
|
||||
|
||||
|
||||
<!--
|
||||
<hooks>
|
||||
<hook id="shortcode.hook" class="ShortCode\Hook\MySuperHook">
|
||||
<tag name="hook.event_listener" event="main.body.bottom" type="front|back|pdf|email" method="onMainBodyBottom" />
|
||||
</hook>
|
||||
</hooks>
|
||||
-->
|
||||
|
||||
<!--
|
||||
<exports>
|
||||
|
||||
</exports>
|
||||
-->
|
||||
|
||||
<!--
|
||||
<imports>
|
||||
|
||||
</imports>
|
||||
-->
|
||||
</config>
|
||||
43
domokits/local/modules/ShortCode/Config/module.xml
Normal file
43
domokits/local/modules/ShortCode/Config/module.xml
Normal file
@@ -0,0 +1,43 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module xmlns="http://thelia.net/schema/dic/module"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://thelia.net/schema/dic/module http://thelia.net/schema/dic/module/module-2_2.xsd">
|
||||
<fullnamespace>ShortCode\ShortCode</fullnamespace>
|
||||
<descriptive locale="en_US">
|
||||
<title>Add short codes Wordpress'ShortCode syntax</title>
|
||||
<!--
|
||||
<subtitle></subtitle>
|
||||
<description></description>
|
||||
<postscriptum></postscriptum>
|
||||
-->
|
||||
</descriptive>
|
||||
<descriptive locale="fr_FR">
|
||||
<title>Ajoute les short codes avec la syntax wordpress</title>
|
||||
</descriptive>
|
||||
<!-- <logo></logo> -->
|
||||
<!--<images-folder>images</images-folder>-->
|
||||
<languages>
|
||||
<language>en_US</language>
|
||||
<language>fr_FR</language>
|
||||
</languages>
|
||||
<version>2.0.0</version>
|
||||
<authors>
|
||||
<author>
|
||||
<name>Vincent Lopes-Vicente</name>
|
||||
<email>vlopes@openstudio.fr</email>
|
||||
</author>
|
||||
</authors>
|
||||
<type>classic</type>
|
||||
<!--
|
||||
module dependencies
|
||||
<required>
|
||||
<module version=">=0.1">Front</module>
|
||||
<module version="~1.0">HookCart</module>
|
||||
<module version=">0.2">HookSearch</module>
|
||||
</required>
|
||||
-->
|
||||
<thelia>2.5.0</thelia>
|
||||
<stability>other</stability>
|
||||
<mandatory>0</mandatory>
|
||||
<hidden>0</hidden>
|
||||
</module>
|
||||
31
domokits/local/modules/ShortCode/Config/routing.xml
Normal file
31
domokits/local/modules/ShortCode/Config/routing.xml
Normal file
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<routes xmlns="http://symfony.com/schema/routing"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://symfony.com/schema/routing http://symfony.com/schema/routing/routing-1.0.xsd">
|
||||
|
||||
<!--
|
||||
|
||||
if a /admin/module/shortcode/ route is provided, a "Configuration" button will be displayed
|
||||
for the module in the module list. Clicking this button will invoke this route.
|
||||
|
||||
<route id="my_route_id" path="/admin/module/shortcode">
|
||||
<default key="_controller">ShortCode\Full\Class\Name\Of\YourConfigurationController::methodName</default>
|
||||
</route>
|
||||
|
||||
<route id="my_route_id" path="/admin/module/shortcode/route-name">
|
||||
<default key="_controller">ShortCode\Full\Class\Name\Of\YourAdminController::methodName</default>
|
||||
</route>
|
||||
|
||||
<route id="my_route_id" path="/my/route/name">
|
||||
<default key="_controller">ShortCode\Full\Class\Name\Of\YourOtherController::methodName</default>
|
||||
</route>
|
||||
|
||||
...add as many routes as required.
|
||||
|
||||
<route>
|
||||
...
|
||||
</route>
|
||||
-->
|
||||
|
||||
</routes>
|
||||
17
domokits/local/modules/ShortCode/Config/schema.xml
Normal file
17
domokits/local/modules/ShortCode/Config/schema.xml
Normal file
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<database defaultIdMethod="native" name="TheliaMain"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="../../../../vendor/thelia/propel/resources/xsd/database.xsd" >
|
||||
|
||||
<table name="short_code" namespace="ShortCode\Model">
|
||||
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
|
||||
<column name="tag" size="55" required="true"/>
|
||||
<column name="event" size="255" required="true"/>
|
||||
<column name="active" type="TINYINT" />
|
||||
<behavior name="timestampable" />
|
||||
<unique>
|
||||
<unique-column name="tag" />
|
||||
</unique>
|
||||
</table>
|
||||
<external-schema filename="local/config/schema.xml" />
|
||||
</database>
|
||||
2
domokits/local/modules/ShortCode/Config/sqldb.map
Normal file
2
domokits/local/modules/ShortCode/Config/sqldb.map
Normal file
@@ -0,0 +1,2 @@
|
||||
# Sqlfile -> Database map
|
||||
thelia.sql=thelia
|
||||
Reference in New Issue
Block a user