21
eDwerD
Re: Script errorss
  • 2004/3/20 2:43

  • eDwerD

  • Just popping in

  • Posts: 23

  • Since: 2004/3/17


hmm.. maybe try sendin admingzus a pm

22
Stewdio
Re: Script errorss
  • 2004/3/20 2:49

  • Stewdio

  • Community Support Member

  • Posts: 1560

  • Since: 2003/5/7 1


Nope, won't let me

*edit*

Deleted js post, it ommited important code needed in your file.

*reedit*

Just placing it back here for others, since it worked.

[Original post]

Open xoops.js and delete everything below line 267 and replace with:

function xoopsCodeQuote(id, enterQuotePhrase){
if (enterQuotePhrase == null) {
enterQuotePhrase = "Enter the text that you want to be quoted:";
}
var text = prompt(enterQuotePhrase, "");
var domobj = xoopsGetElementById(id);
if ( text != null && text != "" ) {
var pos = text.indexOf(unescape('%00'));
if(0 < pos){
text = text.substr(0,pos);
}
var result = "Quote:
" + text + "
";
xoopsInsertText(domobj, result);
}
domobj.focus();
}

function xoopsCodeCode(id, enterCodePhrase){
if (enterCodePhrase == null) {
enterCodePhrase = "Enter the codes that you want to add.";
}
var text = prompt(enterCodePhrase, "");
var domobj = xoopsGetElementById(id);
if ( text != null && text != "" ) {
var result = "
" + text + "
";
xoopsInsertText(domobj, result);
}
domobj.focus();
}

function xoopsCodeText(id, hiddentext, enterTextboxPhrase){
var textareaDom = xoopsGetElementById(id);
var textDom = xoopsGetElementById(id + "Addtext");
var fontDom = xoopsGetElementById(id + "Font");
var colorDom = xoopsGetElementById(id + "Color");
var sizeDom = xoopsGetElementById(id + "Size");
var xoopsHiddenTextDomStyle = xoopsGetElementById(hiddentext).style;
var textDomValue = textDom.value;
var fontDomValue = fontDom.options[fontDom.options.selectedIndex].value;
var colorDomValue = colorDom.options[colorDom.options.selectedIndex].value;
var sizeDomValue = sizeDom.options[sizeDom.options.selectedIndex].value;
if ( textDomValue == "" ) {
if (enterTextboxPhrase == null) {
enterTextboxPhrase = "Please input text into the textbox.";
}
alert(enterTextboxPhrase);
textDom.focus();
} else {
if ( fontDomValue != "FONT") {
textDomValue = "[font=" + fontDomValue + "]" + textDomValue + "[/font]";
fontDom.options[0].selected = true;
}
if ( colorDomValue != "COLOR") {
textDomValue = "[color=" + colorDomValue + "]" + textDomValue + "[/color]";
colorDom.options[0].selected = true;
}
if ( sizeDomValue != "SIZE") {
textDomValue = "[size=" + sizeDomValue + "]" + textDomValue + "[/size]";
sizeDom.options[0].selected = true;
}
if (xoopsHiddenTextDomStyle.fontWeight == "bold" || xoopsHiddenTextDomStyle.fontWeight == "700") {
textDomValue = "" + textDomValue + "";
xoopsHiddenTextDomStyle.fontWeight = "normal";
}
if (xoopsHiddenTextDomStyle.fontStyle == "italic") {
textDomValue = "" + textDomValue + "";
xoopsHiddenTextDomStyle.fontStyle = "normal";
}
if (xoopsHiddenTextDomStyle.textDecoration == "underline") {
textDomValue = "" + textDomValue + "";
xoopsHiddenTextDomStyle.textDecoration = "none";
}
if (xoopsHiddenTextDomStyle.textDecoration == "line-through") {
textDomValue = "" + textDomValue + "";
xoopsHiddenTextDomStyle.textDecoration = "none";
}
xoopsInsertText(textareaDom, textDomValue);
textDom.value = "";
xoopsHiddenTextDomStyle.color = "#000000";
xoopsHiddenTextDomStyle.fontFamily = "";
xoopsHiddenTextDomStyle.fontSize = "12px";
xoopsHiddenTextDomStyle.visibility = "hidden";
textareaDom.focus();
}
}

function xoopsValidate(subjectId, textareaId, submitId, plzCompletePhrase, msgTooLongPhrase, allowedCharPhrase, currCharPhrase) {
var maxchars = 65535;
var subjectDom = xoopsGetElementById(subjectId);
var textareaDom = xoopsGetElementById(textareaId);
var submitDom = xoopsGetElementById(submitId);
if (textareaDom.value == "" || subjectDom.value == "") {
if (plzCompletePhrase == null) {
plzCompletePhrase = "Please complete the subject and message fields.";
}
alert(plzCompletePhrase);
return false;
}
if (maxchars != 0) {
if (textareaDom.value.length > maxchars) {
if (msgTooLongPhrase == null) {
msgTooLongPhrase = "Your message is too long.";
}
if (allowedCharPhrase == null) {
allowedCharPhrase = "Allowed max chars length: ";
}
if (currCharPhrase == null) {
currCharPhrase = "Current chars length: ";
}
alert(msgTooLongPhrase + "\n\n" + allowedCharPhrase + maxchars + "\n" + currCharPhrase + textareaDom.value.length + "");
textareaDom.focus();
return false;
} else {
submitDom.disabled = true;
return true;
}
} else {
submitDom.disabled = true;
return true;
}
}

23
eDwerD
Re: Script errorss
  • 2004/3/20 2:49

  • eDwerD

  • Just popping in

  • Posts: 23

  • Since: 2004/3/17


lol thanks anyway tho, im headin to bed.. ima try n get it in the am..

24
Stewdio
Re: Script errorss
  • 2004/3/20 2:51

  • Stewdio

  • Community Support Member

  • Posts: 1560

  • Since: 2003/5/7 1


Bah, can't insert code without it getting all messed p on the forum.

Gnite and good luck!

25
eDwerD
Re: Script errorss
  • 2004/3/20 2:55

  • eDwerD

  • Just popping in

  • Posts: 23

  • Since: 2004/3/17


OOOOOOOOHHHHHHHHHHHHHH MMMMMMMMMMMYYYYYYYYY GGGGGGGGGGGOOOOOOOOOOODDDDDDDDDD!!!!!!! if i had a paypal account, id give u the d*mn access numbers n say take it! lol ive been trin to figure this jksdfhjkfadsjkfhaksdjf********* error out for almost a week and you just fixed it for me.. thank you SOOOOOOOOOOOOOo much!! i'll definatly keep in touch.. i owe you one!!!!

26
Stewdio
Re: Script errorss
  • 2004/3/20 2:59

  • Stewdio

  • Community Support Member

  • Posts: 1560

  • Since: 2003/5/7 1


Glad to be of service!

Happy Xoopsing!

Login

Who's Online

427 user(s) are online (310 user(s) are browsing Support Forums)


Members: 0


Guests: 427


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits