Any of you expert coders out there ever consider a dictionary mod?
What I'm talking about is a BBCode Mod that would use something like [dic]word[/dic] to put a word definition in a quote like box. Say from www.dictionary.com or some other dictionary site. I think this would be a very useful mod, unfortunately I have no idea on how to begin writing my own mods...speaking of which anyone know of a good resource to getting started with writing my own mods? I know a little bit about html and php but not much.
Thanks guys/gals!
Lainaus käyttäjältä: fireandsalt - marraskuu 24, 2007, 12:20:56 IP
...unfortunately I have no idea on how to begin writing my own mods...speaking of which anyone know of a good resource to getting started with writing my own mods? I know a little bit about html and php but not much.
Thanks guys/gals!
Helps if I read the threads that say READ ME LOL!!! :)
Thanks for posting some beginner's guides found here (http://www.simplemachines.org/community/index.php?topic=56836.msg0#new)!
I was going to make this exact mod as an info-grabber so you type [dictionary]word[/dictionary] and it then shows the meaning of the word.
However dictionary.com/thesaurus.com and other refererence sites content is copyrighted and they do not allow data-mining or c+p other than for personal use.
I see. That is unfortunate. I think it would have been a great Mod! What we need is an open source dictionary site that would allow for such a thing.
BTW, thanks Karl. You're an outstanding coder and I use several of your Mods on my site. *2 Thumbs Up!!!*
Lainaus käyttäjältä: fireandsalt - marraskuu 24, 2007, 02:28:59 IP
I see. That is unfortunate. I think it would have been a great Mod! What we need is an open source dictionary site that would allow for such a thing.
BTW, thanks Karl. You're an outstanding coder and I use several of your Mods on my site. *2 Thumbs Up!!!*
Wiktionary.com?
Hmm, maybe you can just use a script that will open a new window when you double click on a word. That's something I'm currently using (well only on my test forum at the moment)
<SCRIPT Language="JavaScript">
//don\'t forget to add <body ondblclick="dictionary()">
function dictionary() {
if (navigator.appName == "Netscape") {
t = document.getSelection();
opennewdictwin(t);
}
else {
t = document.selection.createRange();
if(document.selection.type == \'Text\' && t.text != \'\') {
document.selection.empty();
opennewdictwin(t.text);
}
}
}
function opennewdictwin(text) {
while (text.substr(text.length-1,1)==\' \')
text=text.substr(0,text.length-1)
while (text.substr(0,1)==\' \')
text=text.substr(1)
if (text > \'\') {
var newwin = window.open(\'http://dictionary.reference.com/search?q=\'+escape(text), \'dictionary\', \'width=760,height=500,resizable=yes,menubar=no,scrollbars=yes,status=no,titlebar=yes,toolbar=no,location=yes,personalbar=yes\');
}
}
status=\'double-click any word - get its instant definition in the dictionary.\'
document.ondblclick=dictionary //works for IE only. For NS add <body ondblclick="dictionary()">
</SCRIPT>
I'm not sure if it's what you're looking for, but it's something that's useful for me given the nature of my forum. I've been meaning to test this for a long time, but only recently got around to it.
What do you think?