This is the first code modification that I've attempted...this is the URL prompt code that Agent Moose wrote, which I modified slightly to include image prompts and e-mail prompts. (For lack of a better name, I called it "Agent Moose's Coffee Time Supercode".) This is working well on my forum, so I thought I'd share, if it's OK with Moosie...
<!--Agent Moose's Coffee Time Supercode-->
<script>
$("img[alt='Insert Hyperlink']").parent("a").attr("href","java"+"script:Hyper();");
$("img[alt='Insert Hyperlink']").parent("a").attr("onclick","");
function Hyper(){
//Created by Agent Moose with slight modifications by Coffeenole (smcodes.smfforfree3.com)
var hyperlink = prompt("Enter URL for Link:","http://");
if(!hyperlink){
alert("You must enter a URL for your Link!"); return;
};
var hypername = prompt("Enter Link Name:","");
if(!hypername){
alert("You must enter a Name for your URL!"); return;
};
document.postmodify.message.value += "\[url="+hyperlink+"\]"+hypername+"\[/url\]";}
$("img[alt='Insert Image']").parent("a").attr("href","java"+"script:image();");
$("img[alt='Insert Image']").parent("a").attr("onclick","");
function image(){
var image = prompt("Enter URL for Image:","http://");
if(!image){
alert("You must enter a URL for your Image!"); return;
};
document.postmodify.message.value += "\[img\]"+image+"\[/img\]";}
$("img[alt='Insert Email']").parent("a").attr("href","java"+"script:email();");
$("img[alt='Insert Email']").parent("a").attr("onclick","");
function email(){
var email = prompt("Enter the E-Mail address:","");
if(!email){
alert("You must enter a vaild E-mail address!"); return;
};
document.postmodify.message.value += "\[email\]"+email+"\[/email\]";}
</script>
Moose, if there is any way to make this better, it won't hurt my feelings...I'm not very well-versed in coding, but this does provide a couple of decent functions.
Did you know that my first ever attempt at coding was trying to add the Chronicles stylesheet to Agent's Skin Chooser code. It never worked, though. I just switched to the All Skin Chooser then.