Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Aug 1999
Posts: 184
Member
Member
Offline
Joined: Aug 1999
Posts: 184
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
Attachments
45105-Clickable_Icons_In_Body_v2.txt (0 Bytes, 69 downloads)

Last edited by ExcelsiorDDZ; 03/11/2002 8:02 PM.

Silly ricer.. Wings are for airplanes!
Sponsored Links
Entire Thread
Subject Posted By Posted
Clickable Icons in body HACK v2 ExcelsiorDDZ 02/25/2002 6:58 PM
Re: Clickable Icons in body HACK v2 SwedeB 03/11/2002 7:01 AM
Re: Clickable Icons in body HACK v2 ExcelsiorDDZ 03/12/2002 2:50 AM
Re: Clickable Icons in body HACK v2 omegatron 03/12/2002 11:19 PM
Re: Clickable Icons in body HACK v2 ExcelsiorDDZ 03/13/2002 12:15 PM
Re: Clickable Icons in body HACK v2 AllenAyres 03/13/2002 5:14 PM
Re: Clickable Icons in body HACK v2 JoshPet 05/08/2002 4:02 AM
Re: Clickable Icons in body HACK v2 JustDave 05/08/2002 4:09 AM
Re: Clickable Icons in body HACK v2 ExcelsiorDDZ 05/08/2002 4:32 AM
Re: Clickable Icons in body HACK v2 JoshPet 05/08/2002 5:05 AM
Re: Clickable Icons in body HACK v2 JoshPet 05/08/2002 6:10 AM

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
• Shock Hosting
• Stable Host
• bluehost
• InterServer
Visit us on Facebook
Member Spotlight
Bill B
Bill B
Issaquah, WA
Posts: 87
Joined: December 2001
Forum Statistics
Forums63
Topics37,583
Posts293,955
Members13,825
Most Online151,614
Nov 14th, 2025
Today's Statistics
Currently Online 6968
Topics Created 0
Posts Made 0
Users Online 0
Birthdays 7
Top Posters
AllenAyres 21,080
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,834
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2026 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.1.0
(Snapshot build 20260108)