XOOPS  2.6.0
install.php
Go to the documentation of this file.
1 <?php
2 /*
3  You may not change or alter any portion of this comment or credits
4  of supporting developers from this source code or any supporting source code
5  which is considered copyrighted (c) material of the original comment or credit authors.
6 
7  This program is distributed in the hope that it will be useful,
8  but WITHOUT ANY WARRANTY; without even the implied warranty of
9  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10 */
11 
30 {
31  $data = array(
32  array(':-D', 'smilies/smil3dbd4d4e4c4f2.gif', 'Very Happy', 1),
33  array(':-)', 'smilies/smil3dbd4d6422f04.gif', 'Smile', 1),
34  array(':-(', 'smilies/smil3dbd4d75edb5e.gif', 'Sad', 1),
35  array(':-o', 'smilies/smil3dbd4d8676346.gif', 'Surprised', 1),
36  array(':-?', 'smilies/smil3dbd4d99c6eaa.gif', 'Confused', 1),
37  array('8-)', 'smilies/smil3dbd4daabd491.gif', 'Cool', 1),
38  array(':lol:', 'smilies/smil3dbd4dbc14f3f.gif', 'Laughing', 1),
39  array(':-x', 'smilies/smil3dbd4dcd7b9f4.gif', 'Mad', 1),
40  array(':-P', 'smilies/smil3dbd4ddd6835f.gif', 'Razz', 1),
41  array(':oops:', 'smilies/smil3dbd4df1944ee.gif', 'Embaressed', 0),
42  array(':cry:', 'smilies/smil3dbd4e02c5440.gif', 'Crying (very sad)', 0),
43  array(':evil:', 'smilies/smil3dbd4e1748cc9.gif', 'Evil or Very Mad', 0),
44  array(':roll:', 'smilies/smil3dbd4e29bbcc7.gif', 'Rolling Eyes', 0),
45  array(';-)', 'smilies/smil3dbd4e398ff7b.gif', 'Wink', 0),
46  array(':pint:', 'smilies/smil3dbd4e4c2e742.gif', 'Another pint of beer', 0),
47  array(':hammer:', 'smilies/smil3dbd4e5e7563a.gif', 'ToolTimes at work', 0),
48  array(':idea:', 'smilies/smil3dbd4e7853679.gif', 'I have an idea', 0),
49  );
50  $types = array(\PDO::PARAM_STR, \PDO::PARAM_STR, \PDO::PARAM_STR, \PDO::PARAM_INT);
51  $db = \Xoops::getInstance()->db();
52  foreach ($data as $sm) {
53  list($smiley_code, $smiley_url, $smiley_emotion, $smiley_display) = $sm;
54  $smiley = array(
55  'smiley_code' => $smiley_code,
56  'smiley_url' => $smiley_url,
57  'smiley_emotion' => $smiley_emotion,
58  'smiley_display' => $smiley_display,
59  );
60  $db->insertPrefix('smilies', $smiley, $types);
61  }
62  return true;
63 }
static getInstance()
Definition: Xoops.php:160
xoops_module_install_smilies(&$module)
Definition: install.php:29
$module
Definition: main.php:52
$sm
Definition: main.php:85