Re: [tw] Styles that only display for file://

2010-10-07 Thread Colm Britton
 How can I create/name a style that displays when viewed on a local drive,
 but that has the attritbute display:none; when viewed as http:// ? In
 particular, I would like to display my administrator / developer menu while
 editing locally, while having it invisible to online viewers.


You could detect the url protocol being used to see whether it is being
served from a file or by http by using this bit of javascript

window.location.protocol;

You could then use a plugin to set the theme given your findings. Something
like this:

(function($){

if(window.location.protocol == file:) {
config.options.txtTheme = OnlineTheme;
}

})(jQuery);

Hope that helps

Colm

-- 
You received this message because you are subscribed to the Google Groups 
TiddlyWiki group.
To post to this group, send email to tiddlyw...@googlegroups.com.
To unsubscribe from this group, send email to 
tiddlywiki+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/tiddlywiki?hl=en.



Re: [tw] Change/import theme in TiddlySpace: basics?

2010-10-06 Thread Colm Britton
Hi Verrehaal,

Lets see if I can answer a few of these questions for you.

  have you tried copy paste the 5 tiddlers listed Tags:RinTheme to a
  tiddlyspace?

 Just tried that: it seems to be working fine. (Was a bit confusing because
I lost a 'new tiddler' option on screen after I copy/pasted the Rin
PageTemplate; but I found 'new tiddler' on the backstage.)

TiddlySpace uses a different set of Edit, View and Page Templates from a
standard TW so this is why things like the new tiddler option will have gone
missing.
In the TiddlySpace PageTemplate there is a line
div id='sidebarOptions' refresh='content' tiddler='SideBarOptions'/div
which results in the commands like 'new tiddler' appearing.
This is done through something we call tiddler transclusion. You can read
more about it here:
http://tiddlywiki.org/wiki/Transclusion


  have a look at:http://themes.tiddlyspace.com/which contains ready
  to use TiddlySpace themes.

 That works, too. The classictheme in particular, as it has better font
sizes. Let me mention that the default TS theme (while otherwise nice)
doesn't look good on a small screen like the 800x480 I'm using (in Firefox
3.6, even fullscreen). With default zoom the titles look way too big:

 http://img299.imageshack.us/img299/4369/tsfaqscreenshot.png

 When zooming out the regular text becomes too small; I'd say the titles
are too big /relatively/:

 http://img820.imageshack.us/img820/1104/tsfaqscreenshot2.png

 Not sure if it's possible to set font sizes so they look good on any
reasonable resolution... but surely there's % and ems and so on (newbie
here)?

Thanks for pointing this out to us. We'll try to rectify that so that there
is a better viewing experience at 800x600


 Two more sets of comments/questions.

 [1] Still regarding layout etc. If I include, say, 'classictheme' (or
copy/paste 'Rin'), the result has no search field, regrettably. How do I go
about adding one?
Similar to above. It needs to be in the PageTemplate. The default TS theme
has it on the 3rd line, like so;
div class='header'
div id='sidebarSearch'
span macro='search search'/span
/div

This time instead of using tiddler transclusion a macro is being used.There
are a set of default macros in TW/TS that perform certain tasks, and other
macros(plugins) can be written to plugin to your TW/TS. There are lots out
there already if you know what you want :)
Again this might help - http://tiddlywiki.org/wiki/Macro


 Is this 'includable', TS-style, and how would I know other than asking
here? Or should I 'import' it from a (which?) more general TW file? What
about adding a 'new journal entry' button, a calendar, and the option to
comment on tiddlers? I see e.g. CalendarPlugin listed as 'currently loaded'
under backstage:plugins, but that doesn't make a calendar show up...?
The majority of things you mention here can be achieved by using plugins
that people have written. The link above should help you understand how to
use them.
For example, you can use comments by including the comments space
http://comments.tiddlyspace.com/

and editing your ViewTemplate to include this line
div class='comments-wrapper' macro='Comments'/div
where you want the comments to be displayed.


 [2] I would love to use TW/TS for a multi-user project blog (with the
above elements). I'm unclear whether this is currently possible. Or is
another type of TW solution more viable right now? Note I don't have my own
server space.

You can do this now by using tiddlyspace. Having a space for your project
and adding the other users as members of the space

 - There'd be three rather than two levels of potential 'privateness' to a
tiddler: public (as current), members-only, and private (which only the
owner and members-with-that-right see). Thus I could lead a space on a
project involving a bunch of people (members), keep some notes and thoughts
purely of and for myself in the same space (handy), and show the larger
public some facade tiddlers.

I think this use case can be achieved by using multiple spaces.
The leader can have there own space where they keep their own notes.
The team can use a different space for their project keeping the work/notes
private (i.e. visible only to members), and making the facade tiddlers
public so that non members can see them
 Just my newbie's thoughts, given my limited comprehension of what this is
all about, plus an idea of what I'd like to do with it (and maybe others
too).

 ~P

Hope that answers at least some of your questions

Colm

-- 
You received this message because you are subscribed to the Google Groups 
TiddlyWiki group.
To post to this group, send email to tiddlyw...@googlegroups.com.
To unsubscribe from this group, send email to 
tiddlywiki+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/tiddlywiki?hl=en.