Welcome, Guest. Please Login
Tinderbox
  News:
IMPORTANT MESSAGE! This forum has now been replaced by a new forum at http://forum.eastgate.com and no further posting or member registration is allowed. The forum is still accessible via read-only access for reference purposes. If you wish to discuss content here, please use the new forum. N.B. - posting in the new forum requires a fresh registration in the new forum (sorry - member data can't be ported).
  HomeHelpSearchLogin  
 
Pages: 1
Send Topic Print
One-stop Web/Local export toggle for aTbRef (Read 3126 times)
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
One-stop Web/Local export toggle for aTbRef
Feb 28th, 2013, 9:56am
 
Thinking through how other people might make sense of my TBX for aTBRef, I've introduced some improvements under the hood (already uploaded).

The changes don't affect the live web-site but rather how export works in a context where the user wants a local HTML copy that won't cal out to the web when loading pages (note: some content pages may contain links out of aTbRef but which only load if clicked by the viewer).

The end section of the root outline changes slightly:



All the notes whose export is altered by this new mechanism now lie after the last separator.  opening the 'EXPORT SET UP' note and toggling a boolean key attribute, gives this:



Now, none of these web-only notes are exported, $AutoFetch is disabled in the Checkers, the feed agents are turned off and some web-related includes in the main HTML export template are turned off (e.g. google Analytics code). To make it clear notes being turned of are struck through.

Toggle the boolean back and everything turns back on. not of this stops you tinkering as you desire for learning techniques or simply copying code for your own projects. However, I do think it makes it easier for a new user to 'just' run out a local copy of the HTML on their Mac without their LAN administrator complaining they're trying to call out to the web (some folk work in locked-down places - not all of use have free access).

Starting out with some gnarly code, this resolved to a code note for the (big) conditional rule for the 'EXPORT SET UP' note and adding a new prototype for all the notes it calls. The latter make it easy to set $HTMLDontExport for many notes with just one line of code as we set the prototype and the rest happens by inheritance. The $Text of 'EXPORT SET UP' explains more - you must read it in the TBX as it doesn't export.

In addition I've added non-exporting $Text to the other non-exporting notes in the part of the TBX, to give you more of an idea of what is happening.

Some of these non-content special notes need (location) strings specific to my system in order to work. However, these string are stored in key attributes hopefully making it easy for you to copy and re-use the techniques in your own files. If you find any such strings hidden away in code, do please let me know!

Get the TBX.
Back to top
 
 

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: One-stop Web/Local export toggle for aTbRef
Reply #1 - Mar 1st, 2013, 1:58am
 
An HTML walkthrough for the above process is now at: http://shoantel.clarify-it.com/d/fdwqaf
Back to top
 
 

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
Pages: 1
Send Topic Print