831 |
florian |
1 |
<?php
|
|
|
2 |
if(!defined("PHORUM")) return;
|
|
|
3 |
$PHORUM = $GLOBALS["PHORUM"];
|
|
|
4 |
$prefix = $PHORUM["mod_smileys"]["prefix"];
|
|
|
5 |
|
|
|
6 |
include("./mods/editor_tools/smileys_js.php");
|
|
|
7 |
|
|
|
8 |
?>
|
|
|
9 |
|
|
|
10 |
<style type="text/css">
|
|
|
11 |
#phorum_mod_editor_tools_panel { display: none; }
|
|
|
12 |
#phorum_mod_editor_tools_smileys_dots { display: inline; }
|
|
|
13 |
#phorum_mod_editor_tools_smileys_loading { display: none; }
|
|
|
14 |
#phorum_mod_editor_tools_smileys { display: none; padding: 0px 5px 5px 5px; }
|
|
|
15 |
#phorum_mod_editor_tools_smileys img {
|
|
|
16 |
margin: 0px 7px 0px 0px;
|
|
|
17 |
vertical-align: bottom;
|
|
|
18 |
cursor: pointer;
|
|
|
19 |
cursor: hand;
|
|
|
20 |
}
|
|
|
21 |
</style>
|
|
|
22 |
|
|
|
23 |
<div id="phorum_mod_editor_tools_panel"
|
|
|
24 |
class="PhorumStdBlockHeader PhorumNarrowBlock">
|
|
|
25 |
|
|
|
26 |
<a href="javascript:toggle_smileys()">
|
|
|
27 |
<b><?php print $PHORUM["DATA"]["LANG"]["AddSmiley"]?></b>
|
|
|
28 |
</a>
|
|
|
29 |
<div id="phorum_mod_editor_tools_smileys_dots"><b>...</b></div>
|
|
|
30 |
<div id="phorum_mod_editor_tools_smileys_loading">
|
|
|
31 |
(<?php print $PHORUM["DATA"]["LANG"]["LoadingSmileys"]; ?>)
|
|
|
32 |
</div>
|
|
|
33 |
|
|
|
34 |
<div id="phorum_mod_editor_tools_smileys"> <?php
|
|
|
35 |
// Create a list of stub smiley images. The real images are only
|
|
|
36 |
// loaded when the user opens the smiley panel.
|
|
|
37 |
foreach($PHORUM["mod_smileys"]["smileys"] as $id => $smiley) {
|
|
|
38 |
if (! $smiley["active"] || $smiley["is_alias"] || $smiley["uses"] == 1) continue;
|
|
|
39 |
print "<img id=\"smiley-button-$id\" onclick=\"phorum_mod_smileys_insert_smiley('" . urlencode($smiley["search"]) . "')\" onload=\"phorum_mod_smileys_load_smiley(this)\" src=\"\"/>";
|
|
|
40 |
} ?>
|
|
|
41 |
</div>
|
|
|
42 |
|
|
|
43 |
</div>
|
|
|
44 |
|
|
|
45 |
<script type="text/javascript">
|
|
|
46 |
// Display the smileys panel. This way browsers that do not
|
|
|
47 |
// support javascript (but which do support CSS) will not
|
|
|
48 |
// show the smileys panel (since the default display style for the
|
|
|
49 |
// smileys panel is 'none').
|
|
|
50 |
document.getElementById("phorum_mod_editor_tools_panel").style.display = 'block';
|
|
|
51 |
</script>
|