php forum
php mysql forum
php mysql smarty
 
Topic Options
#214098 - 02/25/02 10:58 AM Clickable Icons in body HACK v2
ExcelsiorDDZ Offline
Member

Registered: 08/09/99
Posts: 234
Loc: New York
Its all re-written, and even works with the new Calendar 2.2 in place! []http://www.threadsdev.com/threads/php/images/icons/smile.gif[/]<br /><br />IE only!<br /><br />And I have not added the $uubtlang part as suggested yet. See the other thread for that.


Attachments
44920-Clickable_Icons_In_Body_v2.txt (95 downloads)

_________________________
Silly ricer.. Wings are for airplanes!

Top
#214099 - 03/10/02 11:01 PM Re: Clickable Icons in body HACK v2 [Re: Franky]
SwedeB Offline
Lurker

Registered: 03/10/02
Posts: 2
Unfortunately the link to the attachment doesn't work .... Anywhere else I can get this hack?<br /><br />/Björn

Top
#214100 - 03/11/02 06:50 PM Re: Clickable Icons in body HACK v2 [Re: Jay_Eff]
ExcelsiorDDZ Offline
Member

Registered: 08/09/99
Posts: 234
Loc: New York
reposting it now. It seems the uploads are not working here.....<br /><br /><br />READ IT HERE ----------<br /><pre><br />CLICK ON ICONS<br />---------------------------------------<br />(Line numbers for ubbt v5.5 are in brackets.)<br /><br />This is a rewritten hack from an old WWWThreads Perl version that I needed to add to this version. The original<br />was Eileen's and I don't claim that my code is perfect since I am sitll new to all of this.<br /><br />Note, it only works in IE browsers.<br /><br /><br /><br />In includes/header.php<br />----------------------<br />1. Add these lines to the very top.<br /> <script language="Javascript"><br /> <!--<br /> function addImage(imgCode) {<br /> var txtBoxVal = kgp.Body.value<br /> txtBoxVal += imgCode<br /> kgp.Body.value = txtBoxVal<br /> }<br /> // --><br /> </script><br /><br />The above lines allow for the header to take care of the Javascript values for your other PHP files.<br /><br /><br /><br />In newpost.php<br />-------------<br />1. Find (166):<br /> echo "<form method=POST enctype='multipart/form-data' action=\"{$config['phpurl']}/addpost.php\">";<br /><br /> and replace with:<br /> echo "<form method=POST enctype='multipart/form-data' action=\"{$config['phpurl']}/addpost.php\" name=\"kgp\">";<br /><br />2. Find (169):<br /> echo "<form method=POST action =\"{$config['phpurl']}/addpost.php\">";<br /><br /> and replace with:<br /> echo "<form method=POST action =\"{$config['phpurl']}/addpost.php\" name=\"kgp\">";<br /><br /><br />3. *** Find (262):<br /> echo "<br /> {$ubbt_lang['POST_TEXT']}<br><br /> <textarea cols=\"$TextCols\" rows=\"$TextRows\" class=\"formboxes\" wrap=\"soft\" name=\"Body\"></textarea><br /> <p><br /> ";<br /><br /> and replace with:<br /> echo "<br /> {$ubbt_lang['POST_TEXT']}<br><br /> <textarea cols=\"$TextCols\" rows=\"$TextRows\" class=\"formboxes\" wrap=\"soft\" name=\"Body\"></textarea><br /> <p><br /> Insert an image:<br>&nbsp;&nbsp;<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><br /> <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><br /> <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><br /> <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><br /> <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><br /> <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><br /> <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><br /> <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><br /> <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><br /> <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><br /> <p><br /> ";<br /><br />In newreply.php<br />---------------<br />1. Find (200):<br /> echo "<form method=POST enctype='multipart/form-data' action=\"{$config['phpurl']}/addpost.php\">";<br /><br /> and replace with:<br /> echo "<form method=POST enctype='multipart/form-data' action=\"{$config['phpurl']}/addpost.php\" name=\"kgp\">";<br /><br />2. Find (203):<br /> echo "<form method=POST action =\"{$config['phpurl']}/addpost.php\">";<br /><br /> and replace with:<br /> echo "<form method=POST action =\"{$config['phpurl']}/addpost.php\" name=\"kgp\">";<br /><br />3. *#* Find (302):<br /> echo "<br /> {$ubbt_lang['POST_TEXT']}<br><br /> <textarea cols=\"$TextCols\" rows=\"$TextRows\" class=\"formboxes\" wrap=\"soft\" name=\"Body\"></textarea><br /> <p><br /> ";<br /><br /> and replace with:<br /> echo "<br /> {$ubbt_lang['POST_TEXT']}<br><br /> <textarea cols=\"$TextCols\" rows=\"$TextRows\" class=\"formboxes\" wrap=\"soft\" name=\"Body\"></textarea><br /> <p><br /> Insert an image:<br>&nbsp;&nbsp;<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><br /> <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><br /> <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><br /> <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><br /> <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><br /> <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><br /> <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><br /> <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><br /> <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><br /> <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><br /> <p><br /> ";<br /><br /><br />In addpost.php (this is here for now till I fix it so it works)<br />---------------------------------------------------------------<br />1. Find (313):<br /> echo "<form method=POST enctype='multipart/form-data' action=\"{$config['phpurl']}/addpost.php\">";<br /><br /> and replace with:<br /> echo "<form method=POST enctype='multipart/form-data' action=\"{$config['phpurl']}/addpost.php\" name=\"kgp\">";<br /><br /><br />2. Find (316):<br /> echo "<form method=POST action =\"{$config['phpurl']}/addpost.php\">";<br /><br /> and replace with:<br /> echo "<form method=POST action =\"{$config['phpurl']}/addpost.php\" name=\"kgp\">";<br /><br />3. #*# Find (474):<br /> echo "<br /> <p><br /> {$ubbt_lang['POST_TEXT']}<br><br /> <textarea cols=\"$TextCols\" rows=\"$TextRows\" class=\"formboxes\" wrap=\"soft\" name=\"Body\">$Body</textarea><br /> <p><br /><br /> and replace with:<br /> echo "<br /> <p><br /> {$ubbt_lang['POST_TEXT']}<br><br /> <textarea cols=\"$TextCols\" rows=\"$TextRows\" class=\"formboxes\" wrap=\"soft\" name=\"Body\">$Body</textarea><br /> <p><br /> Insert an image:<br>&nbsp;&nbsp;<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><br /> <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><br /> <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><br /> <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><br /> <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><br /> <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><br /> <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><br /> <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><br /> <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><br /> <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><br /> <p><br /><br /><br /><br /><br /><br /><br /><br />ADD MORE SMILEYS<br />----------------<br />edit showicons.php and Find (56):<br />add your own image code after this line<br /><br />languages\english\generic.php starting at (60) add your new ones there. (keep in alphabetical order)<br /><br />Add more lines to:<br />newpost.php (see *** line above in instructions)<br />newreply.php (see *#* line above in instructions)<br />addpost.php (see #*# line above in instructions)<br /><br />All those are instructions 3 under each filename.<br /><br /><br />Kevin G. Podszebka<br /> -Excelsior<br /> -DDZ<br /><br />[]excelsior@theddz.com[/]<br /><br /></pre><br /><br />or download it here... http://www.theddz.com/files/Clickable_Icons_In_Body_v2.txt<br />


Attachments
45105-Clickable_Icons_In_Body_v2.txt (37 downloads)



Edited by ExcelsiorDDZ (03/11/02 07:02 PM)
_________________________
Silly ricer.. Wings are for airplanes!

Top
#214101 - 03/12/02 03:19 PM Re: Clickable Icons in body HACK v2 [Re: Franky]
omegatron Offline
Member

Registered: 04/05/01
Posts: 3440
Loc: abingdon,md
Okay I uncovered a bug between this hack and autoquote. I posted it over in that thread.<br /><br />Great Hack however you left one step out for adding more images.<br /><br />I coded more into mine you just need to make sure you also put the coding in UBBT.inc.php otherwise it will not display them []/forum/images/icons/smile.gif[/]
_________________________
Chuck S

DIVE IN AND VISIT ME:

Omegatron\'s Reefs

Administrator at ReefTalk

Top
#214102 - 03/13/02 04:15 AM Re: Clickable Icons in body HACK v2 [Re: sf49rminer]
ExcelsiorDDZ Offline
Member

Registered: 08/09/99
Posts: 234
Loc: New York
Ahh, thank you. What I really need to do is auto-feed them into an array from a directory, then display the array. []/forum/images/icons/frown.gif[/] Time is not my strong point right now.
_________________________
Silly ricer.. Wings are for airplanes!

Top
#214103 - 03/13/02 09:14 AM Re: Clickable Icons in body HACK v2 [Re: Franky]
AllenAyres Administrator Offline
I type Like navaho

Registered: 03/10/00
Posts: 25448
Loc: Texas
that would be perfect []/forum/images/icons/smile.gif[/]
_________________________
- Allen wavey
- What Drives You?

Top
#214104 - 05/07/02 09:02 PM Re: Clickable Icons in body HACK v2 [Re: Franky]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
I Love this hack and have been using it for quite a while.<br /><br />I just tried to make it work for Private Messages as well... but couldn't quite figure it out.<br /><br />I know I need to modify the sendprivate.php and mess_handler.php<br /><br />And I can make the smiley's appear in the HTML.. but can't quite figure out what else to modify to get them to go into the message box when clicked.<br /><br />Any ideas? I'm sure it's very simple.<br />Help is appreciated.
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#214105 - 05/07/02 09:09 PM Re: Clickable Icons in body HACK v2 [Re: Daine]
JustDave Offline
That 70's Guy

Registered: 06/24/01
Posts: 4097
I think I understand what your saying so I'll just offer this in hopes it is correct:<br /><br />The form tag around the message box needs to be named replier (I think)<br /><br />It is the same name of the form around the post message area.<br /><br /><form name=\"replier\" <br /><br /><br />Hope that was the right answer <img src="/forum/images/icons/smile.gif" alt="" />
_________________________
~Dave
ChattersOnline.com

Top
#214106 - 05/07/02 09:32 PM Re: Clickable Icons in body HACK v2 [Re: Daine]
ExcelsiorDDZ Offline
Member

Registered: 08/09/99
Posts: 234
Loc: New York
v6 will have this included (in sorts). What version are you running now?? I have not looked at this code and will not be able to assist that well if you are still on 5
_________________________
Silly ricer.. Wings are for airplanes!

Top
#214107 - 05/07/02 10:05 PM Re: Clickable Icons in body HACK v2 [Re: Franky]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
I'm on 5.5.1 now. Probably will eventually end up on 6. I've been playing.<br />Didn't know if this would be really easy or not.
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#214108 - 05/07/02 11:10 PM Re: Clickable Icons in body HACK v2 [Re: sjsaunders]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
Didn't seem to work Dave. It's odd that it works in the post screen.. just can't seem to see much of a difference between the 2 in the structure of the form. <br /><br />V6 Doesn't have the clickable stuff in the Private Message screen. Maybe it'll be easy to add with templates and all. I haven't played too much with 6 yet.
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top


Who's Online
0 registered (), 25 Guests and 15 Spiders online.
Key: Admin, Global Mod, Mod
Shout Box

Latest Posts
Forum 'Trader Ratings'.
by blaaskaak
11/20/08 08:27 AM
Problems reading a lot of old posts here
by Ruben Rocha
11/18/08 04:33 PM
PhotoPost BB Code Popup
by Iann128
11/15/08 01:24 PM
Customization needed
by Gizmo
11/12/08 12:28 PM
Team UBBDev Rides Again!
by AllenAyres
11/11/08 02:16 PM
Active Topics.
by AllenAyres
11/11/08 02:13 PM
Looking for a simple upload script
by AllenAyres
11/11/08 02:12 PM
New Mods
Forum 'Trader Ratings'.
by McLemore
11/19/08 02:14 PM
[7.4] Keep log of custom title changes
by blaaskaak
10/27/08 07:51 AM
User Authentication Class
by
01/19/07 02:59 PM
Multiple Identity Detector
by
12/30/06 06:39 PM
PhotoPost BB Code Popup
by
11/06/06 05:43 PM
Newest Members
nick1, Begbie, cenk, MATTO, DougMMcts
13362 Registered Users
Top Posters
AllenAyres 25448
JoshPet 11330
Rick 8372
LK 7396
Lord Dexter 6503
Greg Hard 5533
Charles Capps 5438

 

 

 
fusionbb message board php hacks