Fix pagebuilder cannot create more than 2 pages

Fix pagebuilder prototype breaks usenet
Add default limit of 4 pages (configurable)
This commit is contained in:
zefie
2023-08-27 02:37:11 -04:00
parent 022f78eb99
commit eb94877ffa
13 changed files with 4517 additions and 3075 deletions

View File

@@ -14,124 +14,150 @@ Content-Type: text/html`
data = `<HTML>
<HEAD>
<DISPLAY fontsize=medium>
<TITLE>Page Builder index</TITLE>
<DISPLAY fontsize=medium>
<TITLE>Page Builder index</TITLE>
</HEAD>
<sidebar width=122 height=420 align=left>
<table cellspacing=0 cellpadding=0 height=385>
<TR>
<td width=3>
<td abswidth=2 bgColor=#8A99B0 rowspan=99>
<td absHEIGHT=4>&nbsp;
<td abswidth=2 bgColor=#8A99B0 rowspan=99>
<td width=4 rowspan=99>
<td backGround="wtv-author:/ROMCache/grad_tile.gif" width=16 rowspan=99>
</TR>
<tr>
<td>
<td align=right height=69 width=93 href="wtv-home:/home">
<img src="${minisrv_config.config.service_logo}" width=87 height=67>
<tr><td absheight=5>&nbsp;
<TR>
<td colspan=5 absheight=2 valign=middle align=center bgcolor=#8A99B0>&nbsp;
<tr>
<td>
<td abswidth=93 absheight=26 >
<table href="wtv-author:/templates"
cellspacing=0 cellpadding=0>
<tr>
<td abswidth=5>
<td abswidth=90 valign=middle align=left><table cellspacing=0 cellpadding=0><tr><td maxlines=1><font sizerange=medium color="C2CCD7">Create</font></table>
</table>
<TR>
<td colspan=5 absheight=2 valign=middle align=center bgcolor=#8A99B0>&nbsp;
<tr>
<td>
<td abswidth=93 absheight=26 >
<table href="wtv-author:/scrapbook"
cellspacing=0 cellpadding=0>
<tr>
<td abswidth=5>
<td abswidth=90 valign=middle align=left><table cellspacing=0 cellpadding=0><tr><td maxlines=1><font sizerange=medium color="C2CCD7">Scrapbook</font></table>
</table>
<TR>
<td colspan=5 absheight=2 valign=middle align=center bgcolor=#8A99B0>&nbsp;
<tr>
<td>
<td abswidth=93 absheight=26 >
<table href="wtv-author:/document-cleanup"
cellspacing=0 cellpadding=0>
<tr>
<td abswidth=5>
<td abswidth=90 valign=middle align=left><table cellspacing=0 cellpadding=0><tr><td maxlines=1><font sizerange=medium color="C2CCD7">Clean up</font></table>
</table>
<TR>
<td colspan=5 absheight=2 valign=middle align=center bgcolor=#8A99B0>&nbsp;
<tr>
<td>
<td abswidth=93 absheight=26 >
<table href="wtv-author:/samples_en-US/index.html"
cellspacing=0 cellpadding=0>
<tr>
<td abswidth=5>
<td abswidth=90 valign=middle align=left><table cellspacing=0 cellpadding=0><tr><td maxlines=1><font sizerange=medium color="C2CCD7">Examples</font></table>
</table>
<TR>
<td colspan=5 absheight=2 valign=middle align=center bgcolor=#8A99B0>&nbsp;
<tr>
<td>
<td abswidth=93 absheight=26 >
<table href=javascript:checkPageStatus()
cellspacing=0 cellpadding=0>
<tr>
<td abswidth=5>
<td abswidth=90 valign=middle align=left><table cellspacing=0 cellpadding=0><tr><td maxlines=1><font sizerange=medium color="C2CCD7">Archive</font></table>
</table>
<TR>
<td colspan=5 absheight=2 valign=middle align=center bgcolor=#8A99B0>&nbsp;
<tr>
<td>
<td abswidth=93 absheight=26 >
<table href="wtv-guide:/help?topic=Publish&subtopic=Index&appName=Page%20Builder"
cellspacing=0 cellpadding=0>
<tr>
<td abswidth=5>
<td abswidth=90 valign=middle align=left><table cellspacing=0 cellpadding=0><tr><td maxlines=1><font sizerange=medium color="C2CCD7">Help</font></table>
</table>
<TR>
<td colspan=5 absheight=2 valign=middle align=center bgcolor=#8A99B0>&nbsp;
<tr>
<td>
<td valign=bottom align=right > <img src="wtv-author:/ROMCache/pagebuilder.gif" height=124 width=78>&nbsp;
</table>
<table cellspacing=0 cellpadding=0 height=385>
<TR>
<td width=3>
<td abswidth=2 bgColor=#8A99B0 rowspan=99>
<td absHEIGHT=4>&nbsp;
<td abswidth=2 bgColor=#8A99B0 rowspan=99>
<td width=4 rowspan=99>
<td backGround="wtv-author:/ROMCache/grad_tile.gif" width=16 rowspan=99>
</TR>
<tr>
<td>
<td align=right height=69 width=93 href="wtv-home:/home">
<img src="${minisrv_config.config.service_logo}" width=87 height=67>
<tr>
<td absheight=5>&nbsp;
<TR>
<td colspan=5 absheight=2 valign=middle align=center bgcolor=#8A99B0>&nbsp;
<tr>
<td>
<td abswidth=93 absheight=26>
<table href="wtv-author:/templates" cellspacing=0 cellpadding=0>
<tr>
<td abswidth=5>
<td abswidth=90 valign=middle align=left>
<table cellspacing=0 cellpadding=0>
<tr>
<td maxlines=1>
<font sizerange=medium color="C2CCD7">Create</font>
</table>
</table>
<TR>
<td colspan=5 absheight=2 valign=middle align=center bgcolor=#8A99B0>&nbsp;
<tr>
<td>
<td abswidth=93 absheight=26>
<table href="client:showalert?message=This%20feature%20is%20not%20available." cellspacing=0 cellpadding=0>
<tr>
<td abswidth=5>
<td abswidth=90 valign=middle align=left>
<table cellspacing=0 cellpadding=0>
<tr>
<td maxlines=1>
<font sizerange=medium color="C2CCD7">Scrapbook</font>
</table>
</table>
<TR>
<td colspan=5 absheight=2 valign=middle align=center bgcolor=#8A99B0>&nbsp;
<tr>
<td>
<td abswidth=93 absheight=26>
<table href="client:showalert?message=Select%20the%20document%20you%20would%20like%20to%20remove%20then%20choose%20discard%20page." cellspacing=0 cellpadding=0>
<tr>
<td abswidth=5>
<td abswidth=90 valign=middle align=left>
<table cellspacing=0 cellpadding=0>
<tr>
<td maxlines=1>
<font sizerange=medium color="C2CCD7">Clean up</font>
</table>
</table>
<TR>
<td colspan=5 absheight=2 valign=middle align=center bgcolor=#8A99B0>&nbsp;
<tr>
<td>
<td abswidth=93 absheight=26>
<table href="wtv-author:/samples_en-US/index.html" cellspacing=0 cellpadding=0>
<tr>
<td abswidth=5>
<td abswidth=90 valign=middle align=left>
<table cellspacing=0 cellpadding=0>
<tr>
<td maxlines=1>
<font sizerange=medium color="C2CCD7">Examples</font>
</table>
</table>
<TR>
<td colspan=5 absheight=2 valign=middle align=center bgcolor=#8A99B0>&nbsp;
<tr>
<td>
<td abswidth=93 absheight=26>
<table href=client:showalert?message=This%20feature%20is%20not%20available. cellspacing=0 cellpadding=0>
<tr>
<td abswidth=5>
<td abswidth=90 valign=middle align=left>
<table cellspacing=0 cellpadding=0>
<tr>
<td maxlines=1>
<font sizerange=medium color="C2CCD7">Archive</font>
</table>
</table>
<TR>
<td colspan=5 absheight=2 valign=middle align=center bgcolor=#8A99B0>&nbsp;
<tr>
<td>
<td abswidth=93 absheight=26>
<table href="wtv-guide:/help?topic=Glossary&subtopic=P&page=pagebuilder" cellspacing=0 cellpadding=0>
<tr>
<td abswidth=5>
<td abswidth=90 valign=middle align=left>
<table cellspacing=0 cellpadding=0>
<tr>
<td maxlines=1>
<font sizerange=medium color="C2CCD7">Help</font>
</table>
</table>
<TR>
<td colspan=5 absheight=2 valign=middle align=center bgcolor=#8A99B0>&nbsp;
<tr>
<td>
<td valign=bottom align=right>
<img src="wtv-author:/ROMCache/pagebuilder.gif" height=124 width=78>&nbsp;
</table>
</sidebar>
<body
bgcolor=#1e4261
background=wtv-author:/ROMCache/blue_tile_128.gif text=AEBFD1 link=B8BDC7
vlink=B8BDC7
hspace=0
vspace=0
onLoad=StorageWarning()
>
<SCRIPT>
function StorageWarning() { }
</SCRIPT>
<form name=onlyOnce><input type=hidden name=didIt value=0></form>
<table cellspacing=0 cellpadding=0 width=100%>
<tr>
<td abswidth=22 rowspan=100><td><td abswidth=22 rowspan=100>
<tr>
<td absheight=12>
<tr>
<td height=25 valign=top>
<font size=+1 color=D1D1D1><blackface> Page Builder index </blackface></font>
<tr>
<td height=24>
<font color=AEBFD1> Choose a document to change or view it </font>
<tr>
<td height=14>
<tr><td>
<table cellspacing=0 cellpadding=0>
<body bgcolor=#1e4261 background=wtv-author:/ROMCache/blue_tile_128.gif text=AEBFD1 link=B8BDC7 vlink=B8BDC7 hspace=0 vspace=0 onLoad=StorageWarning()>
<SCRIPT>
function StorageWarning() {}
</SCRIPT>
<form name=onlyOnce>
<input type=hidden name=didIt value=0>
</form>
<table cellspacing=0 cellpadding=0 width=100%>
<tr>
<td abswidth=22 rowspan=100>
<td>
<td abswidth=22 rowspan=100>
<tr>
<td absheight=12>
<tr>
<td height=25 valign=top>
<font size=+1 color=D1D1D1>
<blackface> Page Builder index </blackface>
</font>
<tr>
<td height=24>
<font color=AEBFD1> Choose a document to change or view it </font>
<tr>
<td height=14>
<tr>
<td>
<table cellspacing=0 cellpadding=0>
`
for (let i = 0; i < numofpages; i++) {
data += `<tr> <td rowspan=2 valign=top>`
@@ -163,14 +189,20 @@ data += `
<tr> <td><img src="/ROMCache/left_mark.gif" width=5 height=9>
<td colspan=4><img src="/ROMCache/horiz_line_bottom.gif" width=347 height=9>
<td><img src="/ROMCache/right_mark.gif" width=5 height=9>`
}
if (minisrv_config.services["wtv-author"].max_pages) {
data += `
</table>
<p>A maximum of <b>${minisrv_config.services["wtv-author"].max_pages}</b> pages can be created, regardless of publish status.
</table>`
}
data += `
</table>
</table>
<SCRIPT language=JavaScript>
function checkPageStatus() {
location = "wtv-author:/scrapbook-serve-confirm-archive?pub=true&unpub=false";
}
</SCRIPT>
</BODY>
</HTML>`;