FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


BB Insert





DanielXP
I have made a news script and for the comment i want the people to click the image and it inserts the : D or what ever into it.


does any one know the code?
n0obie4life
Javascript?

You need to know Javascript to do it..or you can look at phpBB's posting_body.tpl Wink.
DanielXP
right - e - o Confused
wumingsden
What about TinyMCE ? Its extremely easy to install.

Example: http://tinymce.moxiecode.com/example_full.php?example=true

Download: http://tinymce.moxiecode.com/download.php
DanielXP
wumingsden wrote:
What about TinyMCE ? Its extremely easy to install.

Example: http://tinymce.moxiecode.com/example_full.php?example=true

Download: http://tinymce.moxiecode.com/download.php


That a lot of files for what i want it to do
wumingsden
DanielXP wrote:
wumingsden wrote:
What about TinyMCE ? Its extremely easy to install.

Example: http://tinymce.moxiecode.com/example_full.php?example=true

Download: http://tinymce.moxiecode.com/download.php


That a lot of files for what i want it to do




I know Embarassed but to be truthful I don't think theres a quick one-file script for what you want to do.
DanielXP
there no java to just insert Very Happy into a textbox?
BlackSkad
There is. This a simple example-page. The biggest part is done in the javascript function emoticon(text). I think it's pretty well documented, but if you still have questions, don't hesitate to ask them.

Greatz,
BlackSkad

Code:

<html>
<head>
   <title>BB-link</title>
   <script language="Javascript">
   <!--
   function emoticon(text) {
      //put a space in front and behind the text (so ':)' becomes ' :) ')
      text = ' ' + text + ' ';

      //fetch the content from your textfield
      message = document.formname.textboxname.value;

      //add the text to the message in the textfield
      message += text;

      //put the message in the textbox again
      document.formname.textboxname.value = message;
      //give the focus to the textbox
      document.formname.textboxname.focus();
   }
   //-->
   </script>
</head>
<body>
<!-- the function to append the text is called like this: -->
<a href="javascript:emoticon(':)')">Place :) in the textfield below<a>

<!--
Pay attention to the name of the form and the textarea.
They need to match the names in document.formname.textboxname.value
-->
<form name="formname" action="post">
<textarea cols="60" rows="10" name="textboxname">a smiley will be appended</textarea>
</form>
</body>
</html>
DanielXP
Thanks Blackskad!
Related topics
BB Codes
"Domain Insert"
What BB system do you like the most
insert data to mySQL database problem
BB Colours
SQL Insert
BB Codes
Error, insert query failed - My nick is'nt a db friend =/
Want to insert videos on my website...any ideas?
how to insert data into mysql base from a web page
Web Hosting Issue!?!?
Need to know what Phpbb databases to insert when registrati
BB Codes
BB Code :|
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.