Fix echomail zone to prefix in ini file. Call atcode parser before rendering frames
This commit is contained in:
@@ -98,12 +98,15 @@ function FrameAnsi() {
|
||||
|
||||
contentgraphic = new Graphic(this.settings.FRAME_WIDTH);
|
||||
contentgraphic.auto_extend = true;
|
||||
contentgraphic.atcodes = false;
|
||||
contentgraphic.ANSI = this.parse(base64_decode(this.content));
|
||||
|
||||
var contentframe = new Frame(1,2,this.settings.FRAME_WIDTH,this.settings.FRAME_LENGTH,LIGHTGRAY,frame);
|
||||
contentframe.open();
|
||||
contentframe.lf_strict = false;
|
||||
contentframe.atcodes = true;
|
||||
contentframe.atcodes = false;
|
||||
contentframe.word_wrap = false
|
||||
|
||||
contentframe.putmsg(contentgraphic.MSG)
|
||||
contentframe.scrollTo(0,0);
|
||||
|
||||
|
@@ -528,5 +528,12 @@ PageFrame.prototype.parse = function(text) {
|
||||
*/
|
||||
}
|
||||
|
||||
// Convert any atcodes
|
||||
output = output.replace(/@(.*)@/g,
|
||||
function (str, code, offset, s) {
|
||||
return bbs.atcode(code);
|
||||
}
|
||||
);
|
||||
|
||||
return output;
|
||||
};
|
||||
|
@@ -1,8 +1,6 @@
|
||||
// Array of page owners
|
||||
pageowners = [];
|
||||
|
||||
load('graphic.js');
|
||||
|
||||
// String repeat.
|
||||
if (!String.prototype.repeat) {
|
||||
String.prototype.repeat = function(count) {
|
||||
@@ -45,7 +43,8 @@ if (!String.prototype.repeat) {
|
||||
return rpt;
|
||||
};
|
||||
}
|
||||
|
||||
/*
|
||||
// Cant enable this - problem with frame.js, line 451. c.open not a function
|
||||
// Group By
|
||||
if (!Array.prototype.groupby) {
|
||||
Array.prototype.groupby = function(prop) {
|
||||
@@ -58,6 +57,29 @@ if (!Array.prototype.groupby) {
|
||||
};
|
||||
}
|
||||
|
||||
if (!Array.prototype.min) {
|
||||
Array.prototype.min = function() {
|
||||
return this[0];
|
||||
}
|
||||
}
|
||||
if (!Array.prototype.max) {
|
||||
Array.prototype.max = function() {
|
||||
return this.reverse()[0];
|
||||
}
|
||||
}
|
||||
|
||||
if (!Array.prototype.pluck) {
|
||||
Array.prototype.pluck = function(item) {
|
||||
var pluck = [];
|
||||
for(var x in this) {
|
||||
if (this[x][item])
|
||||
pluck.push(this[x][item]);
|
||||
}
|
||||
return pluck;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
/**
|
||||
* Convert ANSI into BIN for loading into a Frame
|
||||
*
|
||||
|
@@ -133,7 +133,7 @@ function MsgArea() {
|
||||
exit(2);
|
||||
}
|
||||
|
||||
var page = f.iniGetValue('zone:'+this.page_prefix,PAGE_LAST_KEY)
|
||||
var page = f.iniGetValue('prefix:'+this.page_prefix,PAGE_LAST_KEY)
|
||||
f.close();
|
||||
|
||||
return page ? page : '0'.repeat(PAGE_LENGTH);
|
||||
@@ -146,7 +146,7 @@ function MsgArea() {
|
||||
exit(2);
|
||||
}
|
||||
|
||||
f.iniSetValue('zone:'+this.page_prefix,PAGE_LAST_KEY,(''+page).padStart(4,'0'));
|
||||
f.iniSetValue('prefix:'+this.page_prefix,PAGE_LAST_KEY,(''+page).padStart(4,'0'));
|
||||
f.close();
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user