Synchronet v3.19b-Win32 (install) has been released (Jan-2022).

You can donate to the Synchronet project using PayPal.

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
custom:ssjs_template [2021/02/19 11:17] mortifiscustom:ssjs_template [2021/02/19 11:35] (current) – [The SSJS Template Scheme] beautify (haha) and add useful example mortifis
Line 85: Line 85:
  
 <code left_nav> <code left_nav>
-template.leftnav.push({html: '<li><a href="/members/externals.ssjs">External Programs</a></li><li><a href="/bbs/bbses.ssjs">BBS Links</a></li><li><a href="/members/lastcallers.ssjs">Last Callers</a></li><li><a href="/members/info.ssjs">Information</a></li><li><a href="/members/newpw.ssjs">Change Password</a></li><li><a href="/logout.ssjs">Logout</a></li><li><a href="/msgs/msgs.ssjs?msg_sub=mail">E-mail</a></li>' });  +template.leftnav.push({html: '<li><a href="/members/externals.ssjs">External Programs</a></li><li><a href="logout.ssjs">Logout</a></li><li><a href="/members/lastcallers.ssjs">Last Callers</a></li><li><a href="/members/info.ssjs">Information</a></li><li><a href="/members/newpw.ssjs">Change Password</a></li><li><a href="/logout.ssjs">Logout</a></li><li><a href="/msgs/msgs.ssjs?msg_sub=mail">E-mail</a></li>' });  
 </code> </code>
  
-Here we added the link BBS Links to the left side navigation that points to bbses.ssjs. +Here we added the link **Logout** to the left side navigation that points to logout.ssjs. 
-Now create the script called ''../web/root/bbs/bbses.ssjs''+Now create the script called ''../web/root/logout.ssjs''
  
 <code bbs> <code bbs>
-load("../web/lib/template.ssjs");+<!-- ../web/root/logout.ssjs -->
  
-template.titlesystem.name BBS Connect";+template.logout '<br><br>'+user.alias+' Logging out ...<br><br><br>'; 
 +write('<meta http-equiv="refresh" content="2; url=index.ssjs">');
  
-template.whatever "<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Some kind of stuff will go here, eventually!" +user.number 0;
- +
-var sub = ''; /* Do not delete/change this */ +
- +
-/* below values are set in ../web/lib/html_themes.ssjs  */ +
-if(do_header)  +
- write_template("header.inc"); +
-if(do_topnav) +
- load(topnav_html); +
-if(do_leftnav) +
-load(leftnav_html);+
  
 +if(do_header)
 +    write_template("header.inc");
 +if(do_topnav)        
 +    load(topnav_html);
 +if(do_leftnav)        
 +    load(leftnav_html);
 if(do_rightnav) if(do_rightnav)
- write_template("rightnav.inc");+        write_template("rightnav.inc"); 
 +write_template("logout.inc"); 
 +if(do_footer)     
 +    write_template("footer.inc");
  
-write_template("bbses.inc"); 
-  
-if(do_footer) 
- write_template("footer.inc"); 
 </code> </code>
    
-Now you need a corresponding ../web/root/templates/nightshade/bbbes.inc +Now you need a corresponding ../web/root/templates/nightshade/logout.inc 
  
-<code inc+<code logout
-<!-- $Id: bbses.inc,v 0.1 2021/02/18 02:19:55 lamer Exp $ -->+<!-- ../web/templates/nightshade/logout.inc -->
  
-<!-- Begin BBS Connect Content -->+<div id="contentcontainer"> 
 + <div id="content2"> 
 +     @@logout@@ 
 + </div> 
 +</div>  
 +</code>
  
-@@whatever@@  
  
-<!-- End Main Content --> 
-</code> 
 ==== SSJS Theme Support ==== ==== SSJS Theme Support ====