reposting it now. It seems the uploads are not working here.....
READ IT HERE ----------
CLICK ON ICONS
---------------------------------------
(Line numbers for ubbt v5.5 are in brackets.)
This is a rewritten hack from an old WWWThreads Perl version that I needed to add to this version. The original
was Eileen's and I don't claim that my code is perfect since I am sitll new to all of this.
Note, it only works in IE browsers.
In includes/header.php
----------------------
1. Add these lines to the very top.
<script language="Javascript">
<!--
function addImage(imgCode) {
var txtBoxVal = kgp.Body.value
txtBoxVal += imgCode
kgp.Body.value = txtBoxVal
}
// -->
</script>
The above lines allow for the header to take care of the Javascript values for your other PHP files.
In newpost.php
-------------
1. Find (166):
echo "<form method=POST enctype='multipart/form-data' action="{$config['phpurl']}/addpost.php">";
and replace with:
echo "<form method=POST enctype='multipart/form-data' action="{$config['phpurl']}/addpost.php" name="kgp">";
2. Find (169):
echo "<form method=POST action ="{$config['phpurl']}/addpost.php">";
and replace with:
echo "<form method=POST action ="{$config['phpurl']}/addpost.php" name="kgp">";
3. *** Find (262):
echo "
{$ubbt_lang['POST_TEXT']}<br>
<textarea cols="$TextCols" rows="$TextRows" class="formboxes" wrap="soft" name="Body"></textarea>
<p>
";
and replace with:
echo "
{$ubbt_lang['POST_TEXT']}<br>
<textarea cols="$TextCols" rows="$TextRows" class="formboxes" wrap="soft" name="Body"></textarea>
<p>
Insert an image:<br>
<a href="javascript:addImage('[]/forum/images/icons/blush.gif[/] ');"><img alt="{$ubbt_lang['ICON_BLUSH']}" width="15" height="15" border="0" src="{$config['images']}/icons/blush.gif"></a>
<a href="javascript:addImage('[]/forum/images/icons/cool.gif[/] ');"><img alt="{$ubbt_lang['ICON_COOL']}" width="15" height="15" border="0" src="{$config['images']}/icons/cool.gif"></a>
<a href="javascript:addImage('[]/forum/images/icons/crazy.gif[/] ');"><img alt="{$ubbt_lang['ICON_CRAZY']}" width="15" height="15" border="0" src="{$config['images']}/icons/crazy.gif"></a>
<a href="javascript:addImage('[]/forum/images/icons/frown.gif[/] ');"><img alt="{$ubbt_lang['ICON_FROWN']}" width="15" height="15" border="0" src="{$config['images']}/icons/frown.gif"></a>
<a href="javascript:addImage('[]/forum/images/icons/laugh.gif[/] ');"><img alt="{$ubbt_lang['ICON_LAUGH']}" width="15" height="15" border="0" src="{$config['images']}/icons/laugh.gif"></a>
<a href="javascript:addImage('[]/forum/images/icons/mad.gif[/] ');"><img alt="{$ubbt_lang['ICON_MAD']}" width="15" height="15" border="0" src="{$config['images']}/icons/mad.gif"></a>
<a href="javascript:addImage('[]/forum/images/icons/shocked.gif[/] ');"><img alt="{$ubbt_lang['ICON_SHOCKED']}" width="15" border="0" height="15" src="{$config['images']}/icons/shocked.gif"></a>
<a href="javascript:addImage('[]/forum/images/icons/smile.gif[/] ');"><img alt="{$ubbt_lang['ICON_SMILE']}" width="15" height="15" border="0" src="{$config['images']}/icons/smile.gif"></a>
<a href="javascript:addImage('[]/forum/images/icons/tongue.gif[/] ');"><img alt="{$ubbt_lang['ICON_TONGUE']}" width="15" height="15" border="0" src="{$config['images']}/icons/tongue.gif"></a>
<a href="javascript:addImage('[]/forum/images/icons/wink.gif[/] ');"><img alt="{$ubbt_lang['ICON_WINK']}" width="15" height="15" border="0" src="{$config['images']}/icons/wink.gif"></a>
<p>
";
In newreply.php
---------------
1. Find (200):
echo "<form method=POST enctype='multipart/form-data' action="{$config['phpurl']}/addpost.php">";
and replace with:
echo "<form method=POST enctype='multipart/form-data' action="{$config['phpurl']}/addpost.php" name="kgp">";
2. Find (203):
echo "<form method=POST action ="{$config['phpurl']}/addpost.php">";
and replace with:
echo "<form method=POST action ="{$config['phpurl']}/addpost.php" name="kgp">";
3. *#* Find (302):
echo "
{$ubbt_lang['POST_TEXT']}<br>
<textarea cols="$TextCols" rows="$TextRows" class="formboxes" wrap="soft" name="Body"></textarea>
<p>
";
and replace with:
echo "
{$ubbt_lang['POST_TEXT']}<br>
<textarea cols="$TextCols" rows="$TextRows" class="formboxes" wrap="soft" name="Body"></textarea>
<p>
Insert an image:<br>
<a href="javascript:addImage('[]/forum/images/icons/blush.gif[/] ');"><img alt="{$ubbt_lang['ICON_BLUSH']}" width="15" height="15" border="0" src="{$config['images']}/icons/blush.gif"></a>
<a href="javascript:addImage('[]/forum/images/icons/cool.gif[/] ');"><img alt="{$ubbt_lang['ICON_COOL']}" width="15" height="15" border="0" src="{$config['images']}/icons/cool.gif"></a>
<a href="javascript:addImage('[]/forum/images/icons/crazy.gif[/] ');"><img alt="{$ubbt_lang['ICON_CRAZY']}" width="15" height="15" border="0" src="{$config['images']}/icons/crazy.gif"></a>
<a href="javascript:addImage('[]/forum/images/icons/frown.gif[/] ');"><img alt="{$ubbt_lang['ICON_FROWN']}" width="15" height="15" border="0" src="{$config['images']}/icons/frown.gif"></a>
<a href="javascript:addImage('[]/forum/images/icons/laugh.gif[/] ');"><img alt="{$ubbt_lang['ICON_LAUGH']}" width="15" height="15" border="0" src="{$config['images']}/icons/laugh.gif"></a>
<a href="javascript:addImage('[]/forum/images/icons/mad.gif[/] ');"><img alt="{$ubbt_lang['ICON_MAD']}" width="15" height="15" border="0" src="{$config['images']}/icons/mad.gif"></a>
<a href="javascript:addImage('[]/forum/images/icons/shocked.gif[/] ');"><img alt="{$ubbt_lang['ICON_SHOCKED']}" width="15" border="0" height="15" src="{$config['images']}/icons/shocked.gif"></a>
<a href="javascript:addImage('[]/forum/images/icons/smile.gif[/] ');"><img alt="{$ubbt_lang['ICON_SMILE']}" width="15" height="15" border="0" src="{$config['images']}/icons/smile.gif"></a>
<a href="javascript:addImage('[]/forum/images/icons/tongue.gif[/] ');"><img alt="{$ubbt_lang['ICON_TONGUE']}" width="15" height="15" border="0" src="{$config['images']}/icons/tongue.gif"></a>
<a href="javascript:addImage('[]/forum/images/icons/wink.gif[/] ');"><img alt="{$ubbt_lang['ICON_WINK']}" width="15" height="15" border="0" src="{$config['images']}/icons/wink.gif"></a>
<p>
";
In addpost.php (this is here for now till I fix it so it works)
---------------------------------------------------------------
1. Find (313):
echo "<form method=POST enctype='multipart/form-data' action="{$config['phpurl']}/addpost.php">";
and replace with:
echo "<form method=POST enctype='multipart/form-data' action="{$config['phpurl']}/addpost.php" name="kgp">";
2. Find (316):
echo "<form method=POST action ="{$config['phpurl']}/addpost.php">";
and replace with:
echo "<form method=POST action ="{$config['phpurl']}/addpost.php" name="kgp">";
3. #*# Find (474):
echo "
<p>
{$ubbt_lang['POST_TEXT']}<br>
<textarea cols="$TextCols" rows="$TextRows" class="formboxes" wrap="soft" name="Body">$Body</textarea>
<p>
and replace with:
echo "
<p>
{$ubbt_lang['POST_TEXT']}<br>
<textarea cols="$TextCols" rows="$TextRows" class="formboxes" wrap="soft" name="Body">$Body</textarea>
<p>
Insert an image:<br>
<a href="javascript:addImage('[]/forum/images/icons/blush.gif[/] ');"><img alt="{$ubbt_lang['ICON_BLUSH']}" width="15" height="15" border="0" src="{$config['images']}/icons/blush.gif"></a>
<a href="javascript:addImage('[]/forum/images/icons/cool.gif[/] ');"><img alt="{$ubbt_lang['ICON_COOL']}" width="15" height="15" border="0" src="{$config['images']}/icons/cool.gif"></a>
<a href="javascript:addImage('[]/forum/images/icons/crazy.gif[/] ');"><img alt="{$ubbt_lang['ICON_CRAZY']}" width="15" height="15" border="0" src="{$config['images']}/icons/crazy.gif"></a>
<a href="javascript:addImage('[]/forum/images/icons/frown.gif[/] ');"><img alt="{$ubbt_lang['ICON_FROWN']}" width="15" height="15" border="0" src="{$config['images']}/icons/frown.gif"></a>
<a href="javascript:addImage('[]/forum/images/icons/laugh.gif[/] ');"><img alt="{$ubbt_lang['ICON_LAUGH']}" width="15" height="15" border="0" src="{$config['images']}/icons/laugh.gif"></a>
<a href="javascript:addImage('[]/forum/images/icons/mad.gif[/] ');"><img alt="{$ubbt_lang['ICON_MAD']}" width="15" height="15" border="0" src="{$config['images']}/icons/mad.gif"></a>
<a href="javascript:addImage('[]/forum/images/icons/shocked.gif[/] ');"><img alt="{$ubbt_lang['ICON_SHOCKED']}" width="15" border="0" height="15" src="{$config['images']}/icons/shocked.gif"></a>
<a href="javascript:addImage('[]/forum/images/icons/smile.gif[/] ');"><img alt="{$ubbt_lang['ICON_SMILE']}" width="15" height="15" border="0" src="{$config['images']}/icons/smile.gif"></a>
<a href="javascript:addImage('[]/forum/images/icons/tongue.gif[/] ');"><img alt="{$ubbt_lang['ICON_TONGUE']}" width="15" height="15" border="0" src="{$config['images']}/icons/tongue.gif"></a>
<a href="javascript:addImage('[]/forum/images/icons/wink.gif[/] ');"><img alt="{$ubbt_lang['ICON_WINK']}" width="15" height="15" border="0" src="{$config['images']}/icons/wink.gif"></a>
<p>
ADD MORE SMILEYS
----------------
edit showicons.php and Find (56):
add your own image code after this line
languages\english\generic.php starting at (60) add your new ones there. (keep in alphabetical order)
Add more lines to:
newpost.php (see *** line above in instructions)
newreply.php (see *#* line above in instructions)
addpost.php (see #*# line above in instructions)
All those are instructions 3 under each filename.
Kevin G. Podszebka
-Excelsior
-DDZ
[][email protected][/]
or download it here...
http://www.theddz.com/files/Clickable_Icons_In_Body_v2.txt