Re: webv4 add menu items
By: Mortifis to echicken on Fri Apr 03 2020 19:44:48
https://github.com/echicken/synchronet-web-v4/wiki/Customization#pages
Just create a subdirectory of webv4/pages/ and put more stuff in there. Those subdirectories can have their own subdirectories, etc. (I think).
---
echicken
Hmmm ... 1st I created a script 001-own.xjs page in webv4/pages and when I load webv4 it throws an error
!JavaScript /sbbs/webv4/lib/pages.js line 62: TypeError: f.readln() is null
also tied putting it in more/004-owm.xjs throws the same error ... apparently I
do not know how to add pages or sidebars :'
Re: webv4 add menu items
By: Mortifis to echicken on Sat Apr 04 2020 17:02:20
Is 001-own.xjs empty? If not, can you put its contents somewhere (pastebin, etc.) where I can see them?
---
echicken
It's not empty but I changed the externsion to .ssjs and it is working now ...
thanks echicken, I'll slowly figure it out ... then I will try to figure out
Re: webv4 add menu items
By: Mortifis to echicken on Sat Apr 04 2020 17:39:59
That's confusing. At a glance I can't see why that alone would resolve the error you got. Did you make any other changes while you were at it?
Also, XJS and SSJS files are subtly different, and XJS is almost always preferable for front-end / user-facing stuff. I'm sure you get the general idea of <?xjs ... ?> from your PHP experience. Did you change the extension as an experiment, or is this actually an SSJS file?
---
echicken
it was orinally an .xjs file, I stripped the <?xjs ?> tags and changed the extension to ssjs. I was getting the same error with the sbbslist.xjs so I did
the same to that both work ... no worries, thanks for the help, I'll keep
writeln('<a href="?pages/More/telegram.ssjs&to='+sys.host+'@'+sys.users[j].name
+'"'>+sys.users[j].name+'</a>');
!JavaScript SyntaxError: invalid XML attribute value
is that because of the &=to portion?
+'"'>+sys.users[j].name+'</a>');
Sysop: | Coz |
---|---|
Location: | Anoka, MN |
Users: | 2 |
Nodes: | 4 (0 / 4) |
Uptime: | 113:26:23 |
Calls: | 162 |
Files: | 5,327 |
Messages: | 222,477 |