-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.xml
82 lines (78 loc) · 4.18 KB
/
install.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<?xml-stylesheet type="text/xsl" href="modx.prosilver.en.xsl"?>
<!--NOTICE: Please open this file in your web browser. If presented with a security warning, you may safely tell it to allow the blocked content.-->
<!--For security purposes, please check: http://www.phpbb.com/mods/ for the latest version of this MOD.\nAlthough MODs are checked before being allowed in the MODs Database there is no guarantee that there are no security problems within the MOD.\nNo support will be given for MODs not found within the MODs Database which can be found at http://www.phpbb.com/mods/-->
<mod xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.phpbb.com/mods/xml/modx-1.2.5.xsd">
<header>
<meta name="generator" content="MODX file generated with PP MODX Creator by tumba25 (online version)"/>
<license><![CDATA[http://opensource.org/licenses/gpl-license.php GNU General Public License v2]]></license>
<title lang="en"><![CDATA[Delegate Voting Mod]]></title>
<title lang="es"><![CDATA[Votacion Delegada Mod]]></title>
<description lang="en">![CDATA[Mod to add delegate voting]]</description>
<description lang="es"><![CDATA[Modificación para permitir la votación delegada en el sistema de votación de phpbb. La elección del delegado se hace desde el UCP, añadiendo el módulo correspondiente.
De momento se ha implementado la delegación básica de voto.]]></description>
<author-group>
<author>
<realname><![CDATA[Ruben Cancho]]></realname>
<username><![CDATA[Canx]]></username>
<homepage><![CDATA[http://github.com/Canx/Delegate-Voting-Mod]]></homepage>
<email><![CDATA[[email protected]]]></email>
</author>
</author-group>
<installation>
<level>easy</level>
<time>1200</time>
<target-version>3.0.7-PL1</target-version>
</installation>
</header>
<action-group>
<!-- @todo 1 Añadir fila con delegado "0" -->
<sql><![CDATA[CREATE TABLE phpbb_poll_delegate(user_id mediumint( 8 ) , is_delegate tinyint( 1 ) , delegated_user mediumint( 8 ), delegated_votes mediumint( 8 ))]]></sql>;
<sql><![CDATA[ALTER TABLE phpbb_poll_delegate ADD PRIMARY KEY ( user_id )]]></sql>
<sql><![CDATA[ALTER TABLE phpbb_poll_delegate ADD FOREIGN KEY ( delegated_user ) REFERENCES phpbb_users( user_id )]]></sql>
<sql><![CDATA[ALTER TABLE phpbb_poll_delegate ADD FOREIGN KEY ( user_id ) REFERENCES phpbb_users( user_id )]]></sql>
<copy>
<file from="root/*.*" to="*.*" />
</copy>
<open src="viewtopic.php">
<edit>
<find><![CDATA[include($phpbb_root_path . 'includes/bbcode.' . $phpEx);]]></find>
<action type="after-add"><![CDATA[include($phpbb_root_path . 'includes/functions_voting.' . $phpEx); // Delegate-Mod]]></action>
</edit>
<edit>
<find><![CDATA[ $message = $user->lang[$message] . '<br /><br />' . sprintf($user->lang['RETURN_TOPIC'], '<a href="' . $redirect_url . '">', '</a>');
trigger_error($message);
}]]></find>
<action type="after-add"><![CDATA[ $db->sql_transaction('begin'); // Delegate-Mod]]></action>
</edit>
<edit>
<find><![CDATA[ SET poll_option_total = poll_option_total + 1]]></find>
<inline-edit>
<inline-find><![CDATA[ SET poll_option_total = poll_option_total + 1]]></inline-find>
<inline-action type="after-add"><![CDATA[ + ' . $delegated_votes . ' ]]></inline-action>
</inline-edit>
</edit>
<edit>
<find><![CDATA[ SET poll_option_total = poll_option_total - 1]]></find>
<inline-edit>
<inline-find><![CDATA[ SET poll_option_total = poll_option_total - 1]]></inline-find>
<inline-action type="after-add"><![CDATA[ - ' . $delegated_votes .']]></inline-action>
</inline-edit>
</edit>
<edit>
<find><![CDATA[ }
}
}]]></find>
<action type="after-add"><![CDATA[
$db->sql_transaction('commit'); // Delegate-Mod]]></action>
</edit>
</open>
<open src="includes/constants.php">
<edit>
<find><![CDATA[// Additional tables]]></find>
<action type="after-add"><![CDATA[define('POLL_DELEGATE_TABLE', $table_prefix . 'poll_delegate');]]></action>
</edit>
</open>
<!-- @todo 1 Añadir styles/prosilver/template/viewtopic_body.html como modificación -->
</action-group>
</mod>