Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Details »»

Version: , by (Guest)
Developer Last Online: Jan 1970 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 10-08-2000 Last Update: Never Installs: 0
 
No support by the author.

Hello,

Wondring how to add the "instant smilies" and "instant vb code" in my forums when the user is posting a new topic?
Like in "OpenTopic" from infopop.com

Any help is appreciated

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 10-08-2000, 09:12 PM
Guest
 
Posts: n/a
Default

You don't need a "hack" for this. You can do this in your templates. Simply edit the templates for the different forms and add javascript to add the different codes and smilies into the message when clicked on.
Reply With Quote
  #3  
Old 10-08-2000, 09:16 PM
Guest
 
Posts: n/a
Default

Thanks wluke

would you mind tel me what javascript code should I use?
I am not that good in javascripts !

Thanks again
Reply With Quote
  #4  
Old 10-09-2000, 02:41 AM
Guest
 
Posts: n/a
Default

Ok,I got the javascript for that

If I wanna add the script to the template "newthread" under the options.I need to add buttons and php code of course !
How can I do this without missing up my forums?

Any help is greatfull
Reply With Quote
  #5  
Old 10-09-2000, 12:29 PM
Guest
 
Posts: n/a
Default

Just stick it right in there and see what happens really. Backup the template to be safe and it something goes wrong, restore the backed up template right away.
Reply With Quote
  #6  
Old 10-09-2000, 03:06 PM
Guest
 
Posts: n/a
Default

Care to post the Javascript for the rest of us ?

Have you had any luck getting it working yet ?
Reply With Quote
  #7  
Old 10-09-2000, 04:26 PM
Guest
 
Posts: n/a
Default

Ok,here is what I did:

First,I created a small table where I want my buttons and smili faces to be in the template "newthread",then,I added this javascript in the table:

Code:
<a href="javascript: x()" onClick="DoSmilie(' :!) ');"><img width="15" height="15" src="YourSmilieURLHere" border="0" alt="smile"></a>
  ?
  <a href="javascript: x()" onClick="DoSmilie(' :!( ');"><img width="15" height="15" src="YourSmilieURLHere" border="0" alt="frown"></a>
  ?
  <a href="javascript: x()" onClick="DoSmilie(' :!o ');"><img width="15" height="15" src="YourSmilieURLHere" border="0" alt="redface"></a>
  ?
  <a href="javascript: x()" onClick="DoSmilie(' :!D ');"><img width="15" height="15" src="YourSmilieURLHere" border="0" alt="biggrin"></a>
  ?
  <a href="javascript: x()" onClick="DoSmilie(' ;!) ');"><img width="15" height="15" src="YourSmilieURLHere" border="0" alt="wink"></a>
<br>
<a href="javascript: x()" onClick="DoSmilie(' :!p ');"><img width="15" height="15" src="YourSmilieURLHere" border="0" alt="tongue"></a>
  ?
  <a href="javascript: x()" onClick="DoSmilie(' :!cool: ');"><img width="15" height="15" src="YourSmilieURLHere" border="0" alt="cool"></a>
  ?
  <a href="javascript: x()" onClick="DoSmilie(' :!rolleyes: ');"><img width="15" height="15" src="YourSmilieURLHere" border="0" alt="rollyeyes"></a>
  ?
  <a href="javascript: x()" onClick="DoSmilie(' :!mad: ');"><img width="15" height="15" src="YourSmilieURLHere" border="0" alt="mad"></a>
  ?
  <a href="javascript: x()" onClick="DoSmilie(' :!eek: ');"><img width="15" height="15" src="YourSmilieURLHere" border="0" alt="eek"></a>
<br>
<a href="javascript: x()" onClick="DoSmilie(' :!confused: ');"><img width="15" height="22" src="YourSmilieURLHere" border="0" alt="confused"></a>
  ?
</TD><TD valign="top" align="right"><a href="javascript: x()" onClick="DoPrompt('url');"><img src="YourButtonURLHere" width="75" height="20" border="0" alt="Add URL"></a>
 ?
 <a href="javascript: x()" onClick="DoPrompt('email');"><img src="YourButtonURLHere" width="75" height="20" border="0" alt="Add e-mail address"></a>
<br>
<a href="javascript: x()" onClick="DoPrompt('bold');"><img src="YourButtonURLHere" width="75" height="20" border="0" alt="Bold"></a>
  ?
  <a href="javascript: x()" onClick="DoPrompt('italics');"><img src="YourButtonURLHere" width="75" height="20" border="0" alt="Italic"></a>
<br>
<a href="javascript: x()" onClick="DoPrompt('quote');"><img src="YourButtonURLHere" width="75" height="20" border="0" alt="Quote"></a>
  ?
  <a href="javascript: x()" onClick="DoPrompt('code');"><img src="YourButtonURLHere" width="75" height="20" border="0" alt="Code"></a>
<br>
<a href="javascript: x()" onClick="DoPrompt('liststart');"><img src="YourButtonURLHere" width="75" height="20" border="0" alt="list_start"></a>
 ?
  <a href="javascript: x()" onClick="DoPrompt('listitem');"><img src="YourButtonURLHere" width="75" height="20" border="0" alt="list_items"></a>
<br>
<a href="javascript: x()" onClick="DoPrompt('listend');"><img src="YourButtonURLHere" width="75" height="20" border="0" alt="list_end"></a>
 ?
<a href="javascript: x()" onClick="DoPrompt('image');"><img src="YourButtonURLHere" width="75" height="20" border="0" alt="Add image"></a>
--------
NOTE: please take the exclamation marks off from the tags above
---------
Reply With Quote
  #8  
Old 10-09-2000, 04:27 PM
Guest
 
Posts: n/a
Default

Then added this javascript at the top of the template right after the </title> tag :

Code:
<script language="JavaScript"><!--
		
		function x () {
		return;
		}
		
		function DoSmilie(addSmilie) {

	var addSmilie;
	var revisedMessage;
	var currentMessage = document.REPLIER.MESSAGE_BODY.value;
	revisedMessage = currentMessage+addSmilie;
	document.REPLIER.MESSAGE_BODY.value=revisedMessage;
	document.REPLIER.MESSAGE_BODY.focus();
	return;
	}
	
	function DoPrompt(action) {
	var revisedMessage;
	var currentMessage = document.REPLIER.MESSAGE_BODY.value;

	
	if (action == "url") {
	var thisURL = prompt("Type Full URL", "http://");
	var thisTitle = prompt("Type a word to present the URL", "web page");
var urlvBCode = ""+thisTitle+"";
	revisedMessage = currentMessage+urlvBCode;
	document.REPLIER.MESSAGE_BODY.value=revisedMessage;
	document.REPLIER.MESSAGE_BODY.focus();
	return;
	}
	
	if (action == "email") {
	var thisEmail = prompt("Type Full e-maill address", "");
	var emailvBCode = ""+thisEmail+"";
	revisedMessage = currentMessage+emailvBCode;
	document.REPLIER.MESSAGE_BODY.value=revisedMessage;
	document.REPLIER.MESSAGE_BODY.focus();
	return;
	}
	
	if (action == "bold") {
	var thisBold = prompt("Type the text you want it Bold", "");
	var boldvBCode = ""+thisBold+"";
	revisedMessage = currentMessage+boldvBCode;
	document.REPLIER.MESSAGE_BODY.value=revisedMessage;
	document.REPLIER.MESSAGE_BODY.focus();
	return;
	}
	
	if (action == "italics") {
	var thisItal = prompt("Type the text you want it Italic", "");
	var italvBCode = ""+thisItal+"";
	revisedMessage = currentMessage+italvBCode;
	document.REPLIER.MESSAGE_BODY.value=revisedMessage;
	document.REPLIER.MESSAGE_BODY.focus();
	return;
	}
	
	if (action == "image") {
	var thisImage = prompt("Type the Full URL for your image", "http://");
	var imagevBCode = "[IMG!]"+thisImage+"[/IMG!]";
	revisedMessage = currentMessage+imagevBCode;
	document.REPLIER.MESSAGE_BODY.value=revisedMessage;
	document.REPLIER.MESSAGE_BODY.focus();
	return;
	}
	
	if (action == "quote") {
	var quotevBCode = "[QUOTE!]  [/QUOTE!]";
	revisedMessage = currentMessage+quotevBCode;
	document.REPLIER.MESSAGE_BODY.value=revisedMessage;
	document.REPLIER.MESSAGE_BODY.focus();
	return;
	}
	
	if (action == "code") {
	var codevBCode = "[CODE!]  [/CODE!]";
	revisedMessage = currentMessage+codevBCode;
	document.REPLIER.MESSAGE_BODY.value=revisedMessage;
	document.REPLIER.MESSAGE_BODY.focus();
	return;
	}

	if (action == "liststart") {
	var liststartvBCode = "[LIST!]";
	revisedMessage = currentMessage+liststartvBCode;
	document.REPLIER.MESSAGE_BODY.value=revisedMessage;
	document.REPLIER.MESSAGE_BODY.focus();
	return;
	}
	
	if (action == "listend") {
	var listendvBCode = "[/LIST!]";
	revisedMessage = currentMessage+listendvBCode;
	document.REPLIER.MESSAGE_BODY.value=revisedMessage;
	document.REPLIER.MESSAGE_BODY.focus();
	return;
	}
		if (action == "listitem") {
	var thisItem = prompt("Type the "list_items" here and make sure you close the code with"list_end"", "");
	var itemvBCode = "[*]"+thisItem;
	revisedMessage = currentMessage+itemvBCode;
	document.REPLIER.MESSAGE_BODY.value=revisedMessage;
	document.REPLIER.MESSAGE_BODY.focus();
	return;
	}
	
	}
	  //--></script>
-------------
NOTE: please take off the exclamation marks from the tags above !
-------------

Everything went fine so far.However,when I clicked on the smili face or any of the buttons it give me this script error :
----------------
Internet Explorer Script Error
-------------------------
An error has occurred in the script on this page.

Error: 'document.REPLIER.MESSAGE_BODY'is not an object
-----------------
How can I get rid of this now??
Reply With Quote
  #9  
Old 10-09-2000, 04:28 PM
Guest
 
Posts: n/a
Default

Does some one have a url where I can see this.

Thanks,
Brian
Reply With Quote
  #10  
Old 10-12-2000, 04:38 PM
Guest
 
Posts: n/a
Default

Has anyone got this up and running yet ?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:52 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04146 seconds
  • Memory Usage 2,286KB
  • Queries Executed 23 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete