hj
Suicide Assessment
Richard Niolon, Ph.D.
12/99
Helpful Links:
PsychPage links on Therapy
Defenses
The DSM IV
Suicide Assessment
This article lays out helpful information on suicidal patients and interviewing them.
First, remember to do three things:
1) consult – this allows for another opinion, better care, and protects you
2) document, document, document! Everything you do, everyone you talk to, every question you ask the client should be documented
3) evaluate the client’s risk
Risk Factors
a)
mental diagnosis, especially depression and substance abuse, or Borderline Personality Disorder which increase risk
h)
hospitalized and discharged with improvement; this may seem counterintuitive, but many suicidal people feel better once they have made the decision to kill themselves, and have the energy to wrap up loose ends, see others and say goodbye…
b)
over 45 years old are higher risk
c)
sex (men try more lethal means, women try more often)
i)
Caucasian – ethnic minorities have a lower suicide risk
d)
marital status (unmarried are lowest risk, never married, divorced, widowed, recently sep are highest risk)
j)
previous attempts – this is one of the best predictors
e)
recent job loss increases risk
k)
gay/lesbian youth – may be at 3 to 5 times the risk for suicide as heterosexual Caucasian youth
f)
chronic illness is higher risk
l)
extensive and detailed plans, or plans using a highly lethal means
g)
recent loss of loved one increases risk, as does the anniversary of the loss and fantasies of reuniting with the deceased
m)
history of suicide in their family
n)
history of impulsive or reckless behavior
Questions to Ask
Do you have thoughts of suicide?
Are they related to current stressors going on in your life, or have you had such thoughts before?
Do you have a plan? Tell me.
Ask if they have access to the components of their plan, like a gun, pills, etc…
Signs of depression
sleep, energy, weight, or appetite changes
decreased interest in sex and other pleasurable activities
feelings of helplessness and hopelessness
social isolation and withdrawal from others
Level of Risk
none – no suicidal ideation
mild – some ideation, no plan
mod – ideation, vague plan, low on lethality, wouldn’t do it
severe – ideation, plan specific and lethal, wouldn’t do it
extreme – ideation, plan specific and lethal, will do it
Highest risk group has suicidal ideation (thoughts of killing self), a plan (any plan so long as it is definite and detailed is high risk), high lethality (guns and walking in front of busses are more serious than overdosing on Tylenol and slashing wrists), few inhibitors (few reasons not to kill self), low self-control (especially drinking or using drugs – can decide not to kill self but fail to act to reverse events and accidentally kill themselves)
4) Empathize with the client
They are experiencing crises and stress, hopelessness, and helplessness. Offer that there is a part of them that wants to live, since they were cooperative with you. Offer too that services and referrals, as well as social support could be helpful to use now too.
Make a No-Suicide Contract
This is best when the client has support, is low risk, and can give clear reasons why they would not kill themselves; the client agrees they won’t hurt themselves, and if they feel they can’t stop themselves, they will call 911, an ER, a crises line, a therapist, or another designated special person, and will return for help on next appointment. Make the patient sign it and get a witness.
Family Intervention
This is best is there is high support and low impulsiveness in the client. The clients agree with you to contact their family. They stay with the family member until the suicidal thoughts have been addressed in treatment, and the family is briefed on who to contact for help in an emergency. The family also takes an active role to remove drugs, guns, or other means of suicide from the home, and promises 24 hour supervision.
Hospitalization
This is best if there is little family support, or mental illness, substance use or impulsiveness. Try voluntary admission, but use involuntary if needed.
COUC 521
Key Terms Associated with Thought Disorders
1. Circumstantiality = tightly linked associations which in the end reach their goal, but the thinking is sidetracked over a long circuitous route linked with irrelevant details.
C: What brought you here?
P: (1) I have this feeling; (2) Let me explain this; (3) I remember when I was eight years old I had a dirty spot in my pants; (4) I may not have wiped myself properly; (5) I always had the feeling that I’m contaminating myself; (6) Wherever I put my stuff it becomes contaminated; (7) I have to avoid it; (8) It does not have to be actual dirt, just the thought that the dirt is there; (9) I would contaminate my clothes; (10) The contaminated clothes can contaminate me; (11) So when I look behind me I want to see if I am clean or if I have contaminated the chair; (12) That is why I look behind me to see if there are any signs of contamination; (13) I know it’s silly; (14) Even when I’m not completely clean it will get through my clothes; (15) I have the feeling that I have to look behind me all the time; or (16) That is what brought me here.
2. Tangentiality = may show tight or loose associations. The answers miss the goal, but land in the close vicinity.
C: What brought you here?
P: (1) I have this feeling; (2) I have it all the time; (3) It’s all the talk that’s around me; (4) Can you imagine how it feels when it spreads? (5) It was first at my job; (6) Then in my neighborhood; or (7) It seems it’s now everywhere.
C: Does this talk bother you?
P: (8) It has to do with what others think; (9) It shows what they think; (10) It is like loud thinking; (11) You hear it everywhere; and (12) you know they think again because they talk.
The terms below deal with what is referred to as “loosening of associations.”
3. Perseveration = repetition of words or phrases. Seen in depression, frontal lobe damage, and schizophrenia
C: What brought you here?
P: (1) I came for my manic problem; (2) You know, it has to do with my situation; (3) At home, my things disappear; (4) That is the situation, you know; (5) I believe my son-in-law has to do with it; (6) In my situation I don’t know what to do; or (7) That is the situation.
4. Verbigeration or Palilalia = repeat words or phrases automatically, especially at the end of a sentence. Seen in catatonic and manic patients.
C: What problems brought you here?
P: My problems brought me here, problems brought me here, me here.
5. Clang Association = not dictated by logic nor meaning, but my similarity of sounds. Seen in chronic brain disease, with phonemic paraphrasia, schizophrenia, and bipolar (mania)
C: What brought you here?
P: All the things said the swings. Whatever brings and tings and clings.
6. Blocking and Derailment = in blocking the stream of thought is suddenly interrupted; after a pause the patient may start with an entirely new thoughts called “derailment.”
C: What brought you here?
P: I had this argument with my neighbors and they started to… (pause). Nobody should support the mayor.
7. Flight of Ideas = non-goal-oriented speech due to distractibility
C: What brought you here?
P: (1) I got here by getting on my feet; (2) But I have hurt my feet while jogging; (3) Do you think jogging is good for me? (4) It may not help against heart infarct, aspirin may be better; (5) But I don’t like to take drugs; or (6) Drugs and crime go together.
6. Non Sequitur = totally unrelated response to a question, on a concrete or abstract level. Seen in coarse brain disease and schizophrenia
C: What brought you here?
P: There is some evidence, but it is not appropriate for my age.
7. Fragmentation = talk in phrases unrelated to each other. They show continuous non sequiturs in subsequent phases
C: What brought you here?
P: I have been over… There is the stress light… Can I go… No one will be… Let them all fly… Bye and hi
8. Rambling = groups of sentences that are closely connected but followed by other groups without connection or goal. Seen in acute organic mental disorder, such as alcohol intoxication.
C: What brought you here?
P: What a stupid question. Can’t you see? But you look cute. Aren’t you cute? Okay? Let me tell you, I don’t want to repeat it, but I tell you here people, why can’t they leave me alone. I have not done anything and now these. There is the cook. Comes and cooks again. Go away. Just leave me alone.
9. Driveling = speak with preserved syntax and subsequent sentences appear linked, yet the speech cannot be understood. Seen in Wernicke’s aphasia and chronic schizophrenia.
C: What brought you here?
P: Okay. There was all of the others rounded by the broom, but nevertheless gathering the lomb. So what is the downward onvent creatibility? If nothing on those things never recreate a ribboned layer of all times.
10. Word Salad = consecutive words are not linked by meaning; speech is incomprehensible. This has been refereed to as “schizophasia.” Seen in schizophrenia, organic brain syndrome, and occasionally in affective disorders.
C: What brought you here?
P: The, my, not, rode, for, new, cold, it ,what, may, so.
Page 1 of 3
Skip to Main Content
Online
Residential
Athletics
Alumni
Parents
Education
Liberty University
Liberty University Online
School of Divinity
School of Law
Osteopathic Medicine
Resident Undergrad Admissions
Liberty Online Academy
Resident Graduate Admissions
Liberty Christian Academy
Willmington School of the Bible
Military Affairs
Athletics
Liberty Flames
Flames Football
Flames Basketball – Men
Flames Basketball – Women
Club Sports
Campus Recreation
Intramural Sports
Events
College For A Weekend
Commencement
Concerts
Homecoming
Online Student Life
Scaremare
Media
Liberty Journal
Liberty News
The Journey FM
90.9 The Light
Liberty Champion
Selah Yearbook
Streaming Media
Campus Maps
LUVotes
Request Info
Apply Now
Visit Us
Create Guest Account
Sign InSign in or Create a Guest Account
Sign Inor
Don’t have a Liberty University account?
Create a Guest Account to gain access to what Liberty has to offer.
Create Guest Account
You need to have JavaScript enabled in order to access this site.
Dashboard
Dashboard
CEFS521_B01_202230
Benchmark Intake Report Part Two: Mental Status Exam (MSE) Assignment
Immersive Reader
Skip To Content
Dashboard
Account
Dashboard
Courses
Calendar
7 unread messages.7
Inbox
History
Resources
Close
Skip to Main Content
Online
Residential
Athletics
Alumni
Parents
Education
Liberty University
Liberty University Online
School of Divinity
School of Law
Osteopathic Medicine
Resident Undergrad Admissions
Liberty Online Academy
Resident Graduate Admissions
Liberty Christian Academy
Willmington School of the Bible
Military Affairs
Athletics
Liberty Flames
Flames Football
Flames Basketball – Men
Flames Basketball – Women
Club Sports
Campus Recreation
Intramural Sports
Events
College For A Weekend
Commencement
Concerts
Homecoming
Online Student Life
Scaremare
Media
Liberty Journal
Liberty News
The Journey FM
90.9 The Light
Liberty Champion
Selah Yearbook
Streaming Media
Campus Maps
LUVotes
Request Info
Apply Now
Visit Us
Create Guest Account
Sign InSign in or Create a Guest Account
Sign Inor
Don’t have a Liberty University account?
Create a Guest Account to gain access to what Liberty has to offer.
Create Guest Account
You need to have JavaScript enabled in order to access this site.
Dashboard
Dashboard
CEFS521_B01_202230
Mental Status Exam-1.docx
Skip To Content
Dashboard
Account
Dashboard
Courses
Calendar
7 unread messages.7
Inbox
History
Resources
Close
More Help on Interviewing
Subtle questions to ask
PsychPage… perspectives on psychology in daily life
PsychPage
PsychAssessment
Contents
Structuring the Assessment
Interviewing
Cool questions
Ending
Topics and data to gather
Abuse
Attention/Concentration
Eating
Medications
Pain
Sex
General
Depression
Suicide
Anxiety
Obsessions and Compulsions
Mania
Paranoia
PTSD
Substance Abuse
Thoughts and Experiences
Dissociation or Seizures
Structuring the Assessment
It is a good idea to give a client some warning in advance of the time required, transportation and parking issues, things they might need like glasses, a list of medications needed, lunch…, as well as fees for the assessment, parking, or what ever.
Some starting questions are:
do you know why you are here
what do you know about the assessment process
here’s what we’ll do and what happens next
here’s what I know
anything I need to know about before we begin
anything you want to make sure that I am aware of before we begin
Consent – explain this in detail and gather the required forms (one for consent to the evaluation, a second for contacting others for information, and a third for taping.
Interviewing
Balance
Be non-confrontive but confrontive “Was that what you expected to happen?”
“I’m struck that some people might say (mimic stern voice and face to distinguish between them and you), ‘Oh you should have known that would happen.’ What would you say to them?”
“Now, I have to ask this of everyone, but were there any concerns raised by anyone about substance abuse in this I should know about?”
Columbo approach (“Now, let me make sure I got all this right…”)
Repeat questions in different ways later on
Be wary of the highly detailed and dramatic account, the recount of a painful event without painful affect
Cool questions
3 strengths/reasons to hire you
3 weaknesses/things you’d change
smartest/dumbest thing you ever did
proverbs
3 wishes/invisible for a day
what would be on your tombstone/obituary
what role do you play in your difficulties
what would you do if you won the lottery
Ending
“Anything else you want me to know?”
“Anything I forgot to ask?”
Topics and data to gather
Below are several areas and questions you can ask to learn more from clients.
Abuse
ever been hit, punched, pushed, shoved, kicked, threatened by a loved one, or done this to a loved one
ever felt controlled, constantly accused, humiliated, frightened by a loved one, or done this to a loved one
ever had a loved one force you into having sex, destroy sentimental things to hurt you, brag about control or power over you, or done this to a loved one
when did it start, how often is it, have you told anyone
had sex as a minor with someone older, or been older and had sex with a minor
Attention/Concentration
difficulty staying focused or on task, abandoned before completion
hyper-focused, or difficulties tolerating abstractions
difficulties being organized, losing things
impulsive responding, shifting and fidgety in seat, responds before directions completed
Eating
how much do you eat, is it healthy
are you happy with your weight, (if no) what would you change
are you happy with your body, (if no) what would you change
do you have control over how much and when you eat
do you ever binge
ever eat and then throw up afterwards
ever tried dieting and been unable to do it, is your life a series of diets
Medications
what do you take and how often
how often would you say you follow this routine
what is it for
does it help
ever taken something else for the same problem
Pain
have chronic pains
interfere with sleep, concentration, daily activities
what do you do, take medications, does this help
what brings it on, what makes it better/worse, what side of the body
how long does it last, how often does it happen
Sex
where did you learn about sex
when did you go through puberty
were you ready for it
how old were you on your first date
how old were you when you had your first sexual experience
was it voluntary, mixed with social pressure, alcohol, or drugs
with the same or opposite sex
have you ever had same-sex experiences
ever felt you were sexually different
ever felt you got into trouble because of your sex interests or life
any sexual problems, when did they start, what have you done, and has it helped, does it impact your relationships
thought about HIV risk (more questions if needed)
how often are you having sex
do you practice safe sex, how often (25%, 50%, 75%, 100%)
(Mood and Emotions)
General
how do you feel today, is that typical
(if bad) how long has it been since you felt good, how long does it take to “snap out of it”
how would I know if you were happy, sad, and mad
Depression
ever had days you couldn’t get out of bed
how does the future look to you
changes in weight, appetite, sex, interest in pleasurable activities, energy level
sleep problems, Difficulty Falling Asleep, Sleep Continuity Disturbance (difficulty staying asleep, going back to sleep after waking up), and Early Morning Awakening
Suicide
thoughts of hurting yourself or others, (if yes) plan to do so, access to means to do so, would you do it, (if no) what would stop you
thoughts that dying would be the only way to escape pain
thoughts that dying would make others realize how bad things were, what would it do to them
have you made a will, given away special things, checked on your life insurance, bought a gun
Anxiety
ever been very afraid of something bad happening
do you avoid any topic, place, or thing because it scares you
Obsessions and Compulsions
do you ever have to do certain things a certain way or it’s just not right
do you ever have thoughts go through your head you just can’t get rid of
do you spend an excessive amount of time on them
Mania
ever had some much energy you didn’t need to sleep for a day or more
ever had so much energy you couldn’t sit still
ever had an urge to do something that was completely irresistible
gambled away a lot of money
ever think about doing something and suddenly realize you just did it
Paranoia
ever felt everyone was watching you
ever felt you were being plotted against
do people talk about you behind your back
PTSD
Trauma or actual harm
Recollection or recent dreams
Avoidance of places and things, or Amnesia
Unwanted memories, flashbacks, mental images
Markedly diminished interests in life, or “emotional deadness”
Autonomic overreactivity… Keep in mind this can apply to many traumatic experiences (war, rape, assault)
Substance Abuse
substances alcohol including beer, wine, and liquor (ask about each since some people won’t add in the other substances unless asked)
marijuana (both alone and mixed with cocaine as a “primo”)
cocaine (both snorting and smoking)
heroin (both smoking and injecting)
opium
amphetamines (speed, Ritalin)
barbiturates (uppers and downers, qualudes)
prescription drugs
hallucinogens (LSD, mushrooms, peyote, general stuff than made you see things)
inhalants (paint cans and thinners for example)
Rave and X
CAGE (ever felt the need to Cut back, ever Annoyed at others’ comments about your use, ever felt Guilty about your use, ever had a “morning Eye opener” to start the day)
basic data substance
first use and means
who introduced you to it
how much did you use at first
first intoxication
first period of regular use
why did it increase
average use in a week
most you would use in a week
current use
last use
is it a problem
mood before, during, after use
do you use after fights or disagreements
do you use with others or alone
any signs of withdrawal when you don’t use
addiction tolerance (mixing substances, using one after the other to improve)
blackouts
craving
withdrawal
lots of time in affording or finding
accidents while using
do you start and find you can’t stop
negative consequences of using fights
relationship or job loss
DUI (what’s the status of that now)
health problems (what’s the status of that now)
history of sexual or physical abuse, victim or perpetrator, while under use
family history (use, treatment, relatives you used with)
treatment planning efforts to cut back on their own, when and why
when, where, what type (detox, brief inpatient, 30 day inpatient), followed by what (brief outpatient, 3 month outpatient, halfway house)
how long lasted
what helped
how long sober
why relapsed (life stressors at the time, mental health issues like depression and bereavement
what do you need
longest time sober
shortest time sober
why
are they/were they romantically involved with a user, what happened with that relationship
12 Step work and what step they’re on what kinds of meetings (AA, NA, Cocaine Anonymous, Cannabis Anonymous, Al-Anon, RR)
how often did they go (did they do “90 in 90”)
what did they get out of meetings
how far have they gone working on the steps- which steps were troublesome and why
who is their sponsor
watch for recovery lingo like discussing “triggers,” “living life on life’s terms” and being wary of “people, places, and things” as well as “admitting powerlessness” as signs that they have really worked the steps (of course, it could be faking)
if they deny any use ask if they have been involved with a substance abuser
Thoughts and Experiences
ever feel your thoughts are not your own
ever felt god or the devil sent you a message
ever see special meanings in things others don’t see
ever knew something was going to happen before it did
ever see/hear things others didn’t see/hear
ever had a dream that was so real it was hard to tell it was a dream
ever felt your mind was playing tricks on you
ever had the sense others could read your thoughts
ever felt you could hear a running conversation on your activities but didn’t know where it was coming from
ever heard voices tell you to do something, (if yes) what was it, did you want to do it, (if no) what did they say, (if yes) what happened then
ever have strange physical sensations, like bugs crawling on your skin
Dissociation or Seizures
ever feel someone else was using your body
been told you spaced out but don’t remember it
suddenly weren’t sure how you got where you were or were something you had come from
PsychPage
Back
Welcome to TiddlyWiki created by Jeremy Ruston, Copyright © 2007 UnaMesa Association
This page requires JavaScript to function properly.
If you are using Microsoft Internet Explorer you may need to click on the yellow bar above and select ‘Allow Blocked Content’. You must then click ‘Yes’ on the following security warning.
savetest
PsychPage
… perspectives on psychology in daily life
Welcome
Close All
Search
Save Changes
close
close others
edit
permalink
new here
tags:
ArticleTag
▾
PsychAssessment
Updated November-17-08
-Tagged as ‘PsychAssessment’:title↑
modified
created
group
excerpts
cols±
Clinical Supervision
Conceptualizing Psychological Strengths
Does mutual combat really happen?
How to Conduct a Mental Status Exam
The Cycle of Violence
Therapy With Difficult Clients: Using the Precursors Model to Awaken Change
Tips for Assessing Activities of Daily Living
Tips for Assessment Substance Abuse
Tips for Integrating Contradictory Test Results
Tips for Integrating Interviews and Test Results
Tips for Interviewing – Basic Questions
Tips for Interviewing – More Advanced Questions
Tips for Record Keeping
Tips for Writing Assessment Reports
Vocational Assessment
What is Antisocial Personality?
What is Psychological Assessment?
Top
See All Tiddlers
Admin
Close All
Search
Background: #fff
Foreground: #000
PrimaryPale: #8cf
PrimaryLight: #18f
PrimaryMid: #04b
PrimaryDark: #014
SecondaryPale: #ffc
SecondaryLight: #fe8
SecondaryMid: #db4
SecondaryDark: #841
TertiaryPale: #eee
TertiaryLight: #ccc
TertiaryMid: #999
TertiaryDark: #666
Error: #f88
/*{{{*/
body {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];}
a {color:[[ColorPalette::PrimaryMid]];}
a:hover {background-color:[[ColorPalette::PrimaryMid]]; color:[[ColorPalette::Background]];}
a img {border:0;}
h1,h2,h3,h4,h5,h6 {color:[[ColorPalette::SecondaryDark]]; background:transparent;}
h1 {border-bottom:2px solid [[ColorPalette::TertiaryLight]];}
h2,h3 {border-bottom:1px solid [[ColorPalette::TertiaryLight]];}
.button {color:[[ColorPalette::PrimaryDark]]; border:1px solid [[ColorPalette::Background]];}
.button:hover {color:[[ColorPalette::PrimaryDark]]; background:[[ColorPalette::SecondaryLight]]; border-color:[[ColorPalette::SecondaryMid]];}
.button:active {color:[[ColorPalette::Background]]; background:[[ColorPalette::SecondaryMid]]; border:1px solid [[ColorPalette::SecondaryDark]];}
.header {background:[[ColorPalette::PrimaryMid]];}
.headerShadow {color:[[ColorPalette::Foreground]];}
.headerShadow a {font-weight:normal; color:[[ColorPalette::Foreground]];}
.headerForeground {color:[[ColorPalette::Background]];}
.headerForeground a {font-weight:normal; color:[[ColorPalette::PrimaryPale]];}
.tabSelected{color:[[ColorPalette::PrimaryDark]];
background:[[ColorPalette::TertiaryPale]];
border-left:1px solid [[ColorPalette::TertiaryLight]];
border-top:1px solid [[ColorPalette::TertiaryLight]];
border-right:1px solid [[ColorPalette::TertiaryLight]];
}
.tabUnselected {color:[[ColorPalette::Background]]; background:[[ColorPalette::TertiaryMid]];}
.tabContents {color:[[ColorPalette::PrimaryDark]]; background:[[ColorPalette::TertiaryPale]]; border:1px solid [[ColorPalette::TertiaryLight]];}
.tabContents .button {border:0;}
#sidebar {}
#sidebarOptions input {border:1px solid [[ColorPalette::PrimaryMid]];}
#sidebarOptions .sliderPanel {background:[[ColorPalette::PrimaryPale]];}
#sidebarOptions .sliderPanel a {border:none;color:[[ColorPalette::PrimaryMid]];}
#sidebarOptions .sliderPanel a:hover {color:[[ColorPalette::Background]]; background:[[ColorPalette::PrimaryMid]];}
#sidebarOptions .sliderPanel a:active {color:[[ColorPalette::PrimaryMid]]; background:[[ColorPalette::Background]];}
.wizard {background:[[ColorPalette::PrimaryPale]]; border:1px solid [[ColorPalette::PrimaryMid]];}
.wizard h1 {color:[[ColorPalette::PrimaryDark]]; border:none;}
.wizard h2 {color:[[ColorPalette::Foreground]]; border:none;}
.wizardStep {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];
border:1px solid [[ColorPalette::PrimaryMid]];}
.wizardStep.wizardStepDone {background:[[ColorPalette::TertiaryLight]];}
.wizardFooter {background:[[ColorPalette::PrimaryPale]];}
.wizardFooter .status {background:[[ColorPalette::PrimaryDark]]; color:[[ColorPalette::Background]];}
.wizard .button {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::SecondaryLight]]; border: 1px solid;
border-color:[[ColorPalette::SecondaryPale]] [[ColorPalette::SecondaryDark]] [[ColorPalette::SecondaryDark]] [[ColorPalette::SecondaryPale]];}
.wizard .button:hover {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::Background]];}
.wizard .button:active {color:[[ColorPalette::Background]]; background:[[ColorPalette::Foreground]]; border: 1px solid;
border-color:[[ColorPalette::PrimaryDark]] [[ColorPalette::PrimaryPale]] [[ColorPalette::PrimaryPale]] [[ColorPalette::PrimaryDark]];}
#messageArea {border:1px solid [[ColorPalette::SecondaryMid]]; background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]];}
#messageArea .button {color:[[ColorPalette::PrimaryMid]]; background:[[ColorPalette::SecondaryPale]]; border:none;}
.popupTiddler {background:[[ColorPalette::TertiaryPale]]; border:2px solid [[ColorPalette::TertiaryMid]];}
.popup {background:[[ColorPalette::TertiaryPale]]; color:[[ColorPalette::TertiaryDark]]; border-left:1px solid [[ColorPalette::TertiaryMid]]; border-top:1px solid [[ColorPalette::TertiaryMid]]; border-right:2px solid [[ColorPalette::TertiaryDark]]; border-bottom:2px solid [[ColorPalette::TertiaryDark]];}
.popup hr {color:[[ColorPalette::PrimaryDark]]; background:[[ColorPalette::PrimaryDark]]; border-bottom:1px;}
.popup li.disabled {color:[[ColorPalette::TertiaryMid]];}
.popup li a, .popup li a:visited {color:[[ColorPalette::Foreground]]; border: none;}
.popup li a:hover {background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]]; border: none;}
.popup li a:active {background:[[ColorPalette::SecondaryPale]]; color:[[ColorPalette::Foreground]]; border: none;}
.popupHighlight {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];}
.listBreak div {border-bottom:1px solid [[ColorPalette::TertiaryDark]];}
.tiddler .defaultCommand {font-weight:bold;}
.shadow .title {color:[[ColorPalette::TertiaryDark]];}
.title {color:[[ColorPalette::SecondaryDark]];}
.subtitle {color:[[ColorPalette::TertiaryDark]];}
.toolbar {color:[[ColorPalette::PrimaryMid]];}
.toolbar a {color:[[ColorPalette::TertiaryLight]];}
.selected .toolbar a {color:[[ColorPalette::TertiaryMid]];}
.selected .toolbar a:hover {color:[[ColorPalette::Foreground]];}
.tagging, .tagged {border:1px solid [[ColorPalette::TertiaryPale]]; background-color:[[ColorPalette::TertiaryPale]];}
.selected .tagging, .selected .tagged {background-color:[[ColorPalette::TertiaryLight]]; border:1px solid [[ColorPalette::TertiaryMid]];}
.tagging .listTitle, .tagged .listTitle {color:[[ColorPalette::PrimaryDark]];}
.tagging .button, .tagged .button {border:none;}
.footer {color:[[ColorPalette::TertiaryLight]];}
.selected .footer {color:[[ColorPalette::TertiaryMid]];}
.sparkline {background:[[ColorPalette::PrimaryPale]]; border:0;}
.sparktick {background:[[ColorPalette::PrimaryDark]];}
.error, .errorButton {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::Error]];}
.warning {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::SecondaryPale]];}
.lowlight {background:[[ColorPalette::TertiaryLight]];}
.zoomer {background:none; color:[[ColorPalette::TertiaryMid]]; border:3px solid [[ColorPalette::TertiaryMid]];}
.imageLink, #displayArea .imageLink {background:transparent;}
.annotation {background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]]; border:2px solid [[ColorPalette::SecondaryMid]];}
.viewer .listTitle {list-style-type:none; margin-left:-2em;}
.viewer .button {border:1px solid [[ColorPalette::SecondaryMid]];}
.viewer blockquote {border-left:3px solid [[ColorPalette::TertiaryDark]];}
.viewer table, table.twtable {border:2px solid [[ColorPalette::TertiaryDark]];}
.viewer th, .viewer thead td, .twtable th, .twtable thead td {background:[[ColorPalette::SecondaryMid]]; border:1px solid [[ColorPalette::TertiaryDark]]; color:[[ColorPalette::Background]];}
.viewer td, .viewer tr, .twtable td, .twtable tr {border:1px solid [[ColorPalette::TertiaryDark]];}
.viewer pre {border:1px solid [[ColorPalette::SecondaryLight]]; background:[[ColorPalette::SecondaryPale]];}
.viewer code {color:[[ColorPalette::SecondaryDark]];}
.viewer hr {border:0; border-top:dashed 1px [[ColorPalette::TertiaryDark]]; color:[[ColorPalette::TertiaryDark]];}
.highlight, .marked {background:[[ColorPalette::SecondaryLight]];}
.editor input {border:1px solid [[ColorPalette::PrimaryMid]];}
.editor textarea {border:1px solid [[ColorPalette::PrimaryMid]]; width:100%;}
.editorFooter {color:[[ColorPalette::TertiaryMid]];}
#backstageArea {background:[[ColorPalette::Foreground]]; color:[[ColorPalette::TertiaryMid]];}
#backstageArea a {background:[[ColorPalette::Foreground]]; color:[[ColorPalette::Background]]; border:none;}
#backstageArea a:hover {background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]]; }
#backstageArea a.backstageSelTab {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];}
#backstageButton a {background:none; color:[[ColorPalette::Background]]; border:none;}
#backstageButton a:hover {background:[[ColorPalette::Foreground]]; color:[[ColorPalette::Background]]; border:none;}
#backstagePanel {background:[[ColorPalette::Background]]; border-color: [[ColorPalette::Background]] [[ColorPalette::TertiaryDark]] [[ColorPalette::TertiaryDark]] [[ColorPalette::TertiaryDark]];}
.backstagePanelFooter .button {border:none; color:[[ColorPalette::Background]];}
.backstagePanelFooter .button:hover {color:[[ColorPalette::Foreground]];}
#backstageCloak {background:[[ColorPalette::Foreground]]; opacity:0.6; filter:’alpha(opacity:60)’;}
/*}}}*/
/*{{{*/
* html .tiddler {height:1%;}
body {font-size:.75em; font-family:arial,helvetica; margin:0; padding:0;}
h1,h2,h3,h4,h5,h6 {font-weight:bold; text-decoration:none;}
h1,h2,h3 {padding-bottom:1px; margin-top:1.2em;margin-bottom:0.3em;}
h4,h5,h6 {margin-top:1em;}
h1 {font-size:1.35em;}
h2 {font-size:1.25em;}
h3 {font-size:1.1em;}
h4 {font-size:1em;}
h5 {font-size:.9em;}
hr {height:1px;}
a {text-decoration:none;}
dt {font-weight:bold;}
ol {list-style-type:decimal;}
ol ol {list-style-type:lower-alpha;}
ol ol ol {list-style-type:lower-roman;}
ol ol ol ol {list-style-type:decimal;}
ol ol ol ol ol {list-style-type:lower-alpha;}
ol ol ol ol ol ol {list-style-type:lower-roman;}
ol ol ol ol ol ol ol {list-style-type:decimal;}
.txtOptionInput {width:11em;}
#contentWrapper .chkOptionInput {border:0;}
.externalLink {text-decoration:underline;}
.indent {margin-left:3em;}
.outdent {margin-left:3em; text-indent:-3em;}
code.escaped {white-space:nowrap;}
.tiddlyLinkExisting {font-weight:bold;}
.tiddlyLinkNonExisting {font-style:italic;}
/* the ‘a’ is required for IE, otherwise it renders the whole tiddler in bold */
a.tiddlyLinkNonExisting.shadow {font-weight:bold;}
#mainMenu .tiddlyLinkExisting,
#mainMenu .tiddlyLinkNonExisting,
#sidebarTabs .tiddlyLinkNonExisting {font-weight:normal; font-style:normal;}
#sidebarTabs .tiddlyLinkExisting {font-weight:bold; font-style:normal;}
.header {position:relative;}
.header a:hover {background:transparent;}
.headerShadow {position:relative; padding:4.5em 0em 1em 1em; left:-1px; top:-1px;}
.headerForeground {position:absolute; padding:4.5em 0em 1em 1em; left:0px; top:0px;}
.siteTitle {font-size:3em;}
.siteSubtitle {font-size:1.2em;}
#mainMenu {position:absolute; left:0; width:10em; text-align:right; line-height:1.6em; padding:1.5em 0.5em 0.5em 0.5em; font-size:1.1em;}
#sidebar {position:absolute; right:3px; width:16em; font-size:.9em;}
#sidebarOptions {padding-top:0.3em;}
#sidebarOptions a {margin:0em 0.2em; padding:0.2em 0.3em; display:block;}
#sidebarOptions input {margin:0.4em 0.5em;}
#sidebarOptions .sliderPanel {margin-left:1em; padding:0.5em; font-size:.85em;}
#sidebarOptions .sliderPanel a {font-weight:bold; display:inline; padding:0;}
#sidebarOptions .sliderPanel input {margin:0 0 .3em 0;}
#sidebarTabs .tabContents {width:15em; overflow:hidden;}
.wizard {padding:0.1em 1em 0em 2em;}
.wizard h1 {font-size:2em; font-weight:bold; background:none; padding:0em 0em 0em 0em; margin:0.4em 0em 0.2em 0em;}
.wizard h2 {font-size:1.2em; font-weight:bold; background:none; padding:0em 0em 0em 0em; margin:0.4em 0em 0.2em 0em;}
.wizardStep {padding:1em 1em 1em 1em;}
.wizard .button {margin:0.5em 0em 0em 0em; font-size:1.2em;}
.wizardFooter {padding:0.8em 0.4em 0.8em 0em;}
.wizardFooter .status {padding:0em 0.4em 0em 0.4em; margin-left:1em;}
.wizard .button {padding:0.1em 0.2em 0.1em 0.2em;}
#messageArea {position:fixed; top:2em; right:0em; margin:0.5em; padding:0.5em; z-index:2000; _position:absolute;}
.messageToolbar {display:block; text-align:right; padding:0.2em 0.2em 0.2em 0.2em;}
#messageArea a {text-decoration:underline;}
.tiddlerPopupButton {padding:0.2em 0.2em 0.2em 0.2em;}
.popupTiddler {position: absolute; z-index:300; padding:1em 1em 1em 1em; margin:0;}
.popup {position:absolute; z-index:300; font-size:.9em; padding:0; list-style:none; margin:0;}
.popup .popupMessage {padding:0.4em;}
.popup hr {display:block; height:1px; width:auto; padding:0; margin:0.2em 0em;}
.popup li.disabled {padding:0.4em;}
.popup li a {display:block; padding:0.4em; font-weight:normal; cursor:pointer;}
.listBreak {font-size:1px; line-height:1px;}
.listBreak div {margin:2px 0;}
.tabset {padding:1em 0em 0em 0.5em;}
.tab {margin:0em 0em 0em 0.25em; padding:2px;}
.tabContents {padding:0.5em;}
.tabContents ul, .tabContents ol {margin:0; padding:0;}
.txtMainTab .tabContents li {list-style:none;}
.tabContents li.listLink { margin-left:.75em;}
#contentWrapper {display:block;}
#splashScreen {display:none;}
#displayArea {margin:1em 17em 0em 14em;}
.toolbar {text-align:right; font-size:.9em;}
.tiddler {padding:1em 1em 0em 1em;}
.missing .viewer,.missing .title {font-style:italic;}
.title {font-size:1.6em; font-weight:bold;}
.missing .subtitle {display:none;}
.subtitle {font-size:1.1em;}
.tiddler .button {padding:0.2em 0.4em;}
.tagging {margin:0.5em 0.5em 0.5em 0; float:left; display:none;}
.isTag .tagging {display:block;}
.tagged {margin:0.5em; float:right;}
.tagging, .tagged {font-size:0.9em; padding:0.25em;}
.tagging ul, .tagged ul {list-style:none; margin:0.25em; padding:0;}
.tagClear {clear:both;}
.footer {font-size:.9em;}
.footer li {display:inline;}
.annotation {padding:0.5em; margin:0.5em;}
* html .viewer pre {width:99%; padding:0 0 1em 0;}
.viewer {line-height:1.4em; padding-top:0.5em;}
.viewer .button {margin:0em 0.25em; padding:0em 0.25em;}
.viewer blockquote {line-height:1.5em; padding-left:0.8em;margin-left:2.5em;}
.viewer ul, .viewer ol {margin-left:0.5em; padding-left:1.5em;}
.viewer table, table.twtable {border-collapse:collapse; margin:0.8em 1.0em;}
.viewer th, .viewer td, .viewer tr,.viewer caption,.twtable th, .twtable td, .twtable tr,.twtable caption {padding:3px;}
table.listView {font-size:0.85em; margin:0.8em 1.0em;}
table.listView th, table.listView td, table.listView tr {padding:0px 3px 0px 3px;}
.viewer pre {padding:0.5em; margin-left:0.5em; font-size:1.2em; line-height:1.4em; overflow:auto;}
.viewer code {font-size:1.2em; line-height:1.4em;}
.editor {font-size:1.1em;}
.editor input, .editor textarea {display:block; width:100%; font:inherit;}
.editorFooter {padding:0.25em 0em; font-size:.9em;}
.editorFooter .button {padding-top:0px; padding-bottom:0px;}
.fieldsetFix {border:0; padding:0; margin:1px 0px 1px 0px;}
.sparkline {line-height:1em;}
.sparktick {outline:0;}
.zoomer {font-size:1.1em; position:absolute; overflow:hidden;}
.zoomer div {padding:1em;}
* html #backstage {width:99%;}
* html #backstageArea {width:99%;}
#backstageArea {display:none; position:relative; overflow: hidden; z-index:150; padding:0.3em 0.5em 0.3em 0.5em;}
#backstageToolbar {position:relative;}
#backstageArea a {font-weight:bold; margin-left:0.5em; padding:0.3em 0.5em 0.3em 0.5em;}
#backstageButton {display:none; position:absolute; z-index:175; top:0em; right:0em;}
#backstageButton a {padding:0.1em 0.4em 0.1em 0.4em; margin:0.1em 0.1em 0.1em 0.1em;}
#backstage {position:relative; width:100%; z-index:50;}
#backstagePanel {display:none; z-index:100; position:absolute; margin:0em 3em 0em 3em; padding:1em 1em 1em 1em;}
.backstagePanelFooter {padding-top:0.2em; float:right;}
.backstagePanelFooter a {padding:0.2em 0.4em 0.2em 0.4em;}
#backstageCloak {display:none; z-index:20; position:absolute; width:100%; height:100px;}
.whenBackstage {display:none;}
.backstageVisible .whenBackstage {display:block;}
/*}}}*/
/***
StyleSheet for use when a translation requires any css style changes.
This StyleSheet can be used directly by languages such as Chinese, Japanese and Korean which need larger font sizes.
***/
/*{{{*/
body {font-size:0.8em;}
#sidebarOptions {font-size:1.05em;}
#sidebarOptions a {font-style:normal;}
#sidebarOptions .sliderPanel {font-size:0.95em;}
.subtitle {font-size:0.8em;}
.viewer table.listView {font-size:0.95em;}
/*}}}*/
/*{{{*/
@media print {
#mainMenu, #sidebar, #messageArea, .toolbar, #backstageButton, #backstageArea {display: none ! important;}
#displayArea {margin: 1em 1em 0em 1em;}
/* Fixes a feature in Firefox 1.5.0.2 where print preview displays the noscript content */
noscript {display:none;}
}
/*}}}*/
To get started with this blank TiddlyWiki, you’ll need to modify the following tiddlers:
* SiteTitle & SiteSubtitle: The title and subtitle of the site, as shown above (after saving, they will also appear in the browser title bar)
* MainMenu: The menu (usually on the left)
* DefaultTiddlers: Contains the names of the tiddlers that you want to appear when the TiddlyWiki is opened
You’ll also need to enter your username for signing your edits: <
Your username for signing your edits. Write it as a WikiWord (eg JoeBloggs)
<
—-
Also see AdvancedOptions
<
Books related to living and coping with ADHD
<
[[All Tiddlers|SideBarTabs]]
[[Alphabetical Tiddlers |AllTiddlers]]
<
[[MainMenu]]
{{cleartable{
|”A”<
}}}
Thomas and Chess studied very young children to determine whether there were differences in children’s response patterns, personalities, and styles very early in life. The idea is that if these traits appear soon after birth, then they could not be “personality” traits but more likely genetic and biological traits.
<
<
Below are links to some of the books I’ve reviewed and like.
Yes – The major theories of family therapy can also be applied to couples therapy. This handout explains how.
<
<
/***
|Name:|CloseOnCancelPlugin|
|Description:|Closes the tiddler if you click new tiddler then cancel. Default behaviour is to leave it open|
|Version:|3.0.1 ($Rev: 3861 $)|
|Date:|$Date: 2008-03-08 10:53:09 +1000 (Sat, 08 Mar 2008) $|
|Source:|http://mptw.tiddlyspot.com/#CloseOnCancelPlugin|
|Author:|Simon Baird <[email protected]>|
|License:|http://mptw.tiddlyspot.com/#TheBSDLicense|
***/
//{{{
merge(config.commands.cancelTiddler,{
handler_mptw_orig_closeUnsaved: config.commands.cancelTiddler.handler,
handler: function(event,src,title) {
this.handler_mptw_orig_closeUnsaved(event,src,title);
if (!store.tiddlerExists(title) && !store.isShadowTiddler(title))
story.closeTiddler(title,true);
return false;
}
});
//}}}
Background: #fff
Foreground: #000
PrimaryPale: #8cf
PrimaryLight: #18f
PrimaryMid: #04b
PrimaryDark: #014
SecondaryPale: #ffc
SecondaryLight: #fe8
SecondaryMid: #db4
SecondaryDark: #841
TertiaryPale: #eee
TertiaryLight: #ccc
TertiaryMid: #999
TertiaryDark: #666
Error: #f88
<
General therapy and counseling articles
{{books{
[>
{{books{
[>
Topics covered include:
* what we know about fathers and divorce
* a range of issues such as parental alienation and allegations of abuse
* child contact
* what we know about “deadbeat dads”
* mediation and litigation
Suggested reading:
{{books{
[>
As we become more of a “global community” this is far more common that it used to be. Consider:
* Some couples are “monocultural” but lives in a “local society” that is different (e.g., Muslim couple in an all-white neighborhood).
* Others are “bicultural” such as a Jewish husband and Hispanic wife who must build their own “local society.” This category includes cross-ethnic, cross-faith, and cross-class marriages. Family norms and acceptance (especially parental acceptance), sex-roles, language barriers, ideas about career and money, views on child development and parenting… are all likely to differ.
* A CDC study showed mixed-ethnic relationships are more likely to end in break-up (31% same-ethnic versus 41% mixed-ethnic – that’s a 33% increase in risk). Finding key common ground may be an important starting point, then work on how they may have forgotten, underestimated, or only superficially explored cultural differences may come next. Alternately, the cultural differences may become “cultural camouflage” that obscures underlying emotional issues that have been ignored for years.
<
This article summarizes a recent study which examined precursors to harsh discipline. the researchers found that low-income parents are more likely to believe in the benefits of spanking, and to fear the consequences of child misbehavior. When predictions about physical punishment are based on socio-economic level, they are //six times// more likely to be accurate than when based on ethnicity.
<
Whether parents’ arguing has a positive or negative impact on children depends largely on how they argue.
<
Gottman offers it’s two weeks between feeling chest pains and seeing a cardiologist, but it’s six years between realizing your marriage has problems and seeking counseling. Given this, it makes sense that many people are seeking couples therapy when it is too late to do much about the relationship problems.
* Jacobsen found that while 55% of couples improved after marital therapy, only 35% of couples were in the non-distressed range (put another way, 45% of couples don’t get better, 20% get a little better, and only 35% are happy after therapy).
* Jacobsen found that often people in marital therapy only look better at the end of the study because the controls got so much worse.
* Jacobsen reviewed relapse studies and determined that 30-50% of improved couples relapse in two years (put another way, about 17% of couples are truly happy two years after couples therapy).
Gottman recommends that couples should seek help for relationship problems early, and see a therapist who uses a therapy method that has solid research supporting that it works.
<
<
<
<
<
Several well-published researchers in this area discuss the research, what it tells us, and what we still don’t know.
<
Dr. Laura attacked the American Psychological Association because of what she read in a journal they publish. Did she understand what she read? Did she tell her listeners and readers the truth?
<
<
<
<
<
<
<
<
<
<
<
<
<
<
/***
|Name:|ExtentTagButtonPlugin|
|Description:|Adds a New tiddler button in the tag drop down|
|Version:|3.2 ($Rev: 3861 $)|
|Date:|$Date: 2008-03-08 10:53:09 +1000 (Sat, 08 Mar 2008) $|
|Source:|http://mptw.tiddlyspot.com/#ExtendTagButtonPlugin|
|Author:|Simon Baird <[email protected]>|
|License|http://mptw.tiddlyspot.com/#TheBSDLicense|
***/
//{{{
window.onClickTag_mptw_orig = window.onClickTag;
window.onClickTag = function(e) {
window.onClickTag_mptw_orig.apply(this,arguments);
var tag = this.getAttribute(“tag”);
var title = this.getAttribute(“tiddler”);
// Thanks Saq, you’re a genius 🙂
var popup = Popup.stack[Popup.stack.length-1].popup;
createTiddlyElement(createTiddlyElement(popup,”li”,null,”listBreak”),”div”);
wikify(“<
return false;
}
//}}}
{{books{
[>
/***
|”Name:”|ForEachTiddlerPlugin|
|”Version:”|1.0.8 (2007-04-12)|
|”Source:”|http://tiddlywiki.abego-software.de/#ForEachTiddlerPlugin|
|”Author:”|UdoBorkowski (ub [at] abego-software [dot] de)|
|”Licence:”|[[BSD open source license (abego Software)|http://www.abego-software.de/legal/apl-v10.html]]|
|”Copyright:”|© 2005-2007 [[abego Software|http://www.abego-software.de]]|
|”TiddlyWiki:”|1.2.38+, 2.0|
|”Browser:”|Firefox 1.0.4+; Firefox 1.5; InternetExplorer 6.0|
!Description
Create customizable lists, tables etc. for your selections of tiddlers. Specify the tiddlers to include and their order through a powerful language.
”Syntax:”
|>|{{{<<}}}''forEachTiddler'' [''in'' //tiddlyWikiPath//] [''where'' //whereCondition//] [''sortBy'' //sortExpression// [''ascending'' //or// ''descending'']] [''script'' //scriptText//] [//action// [//actionParameters//]]{{{>>}}}|
|//tiddlyWikiPath//|The filepath to the TiddlyWiki the macro should work on. When missing the current TiddlyWiki is used.|
|//whereCondition//|(quoted) JavaScript boolean expression. May refer to the build-in variables {{{tiddler}}} and {{{context}}}.|
|//sortExpression//|(quoted) JavaScript expression returning “comparable” objects (using ‘{{{<}}}','{{{>}}}’,'{{{==}}}’. May refer to the build-in variables {{{tiddler}}} and {{{context}}}.|
|//scriptText//|(quoted) JavaScript text. Typically defines JavaScript functions that are called by the various JavaScript expressions (whereClause, sortClause, action arguments,…)|
|//action//|The action that should be performed on every selected tiddler, in the given order. By default the actions [[addToList|AddToListAction]] and [[write|WriteAction]] are supported. When no action is specified [[addToList|AddToListAction]] is used.|
|//actionParameters//|(action specific) parameters the action may refer while processing the tiddlers (see action descriptions for details). <
|>|~~Syntax formatting: Keywords in ”bold”, optional parts in […]. ‘or’ means that exactly one of the two alternatives must exist.~~|
See details see [[ForEachTiddlerMacro]] and [[ForEachTiddlerExamples]].
!Revision history
* v1.0.8 (2007-04-12)
** Adapted to latest TiddlyWiki 2.2 Beta importTiddlyWiki API (introduced with changeset 2004). TiddlyWiki 2.2 Beta builds prior to changeset 2004 are no longer supported (but TiddlyWiki 2.1 and earlier, of cause)
* v1.0.7 (2007-03-28)
** Also support “pre” formatted TiddlyWikis (introduced with TW 2.2) (when using “in” clause to work on external tiddlers)
* v1.0.6 (2006-09-16)
** Context provides “viewerTiddler”, i.e. the tiddler used to view the macro. Most times this is equal to the “inTiddler”, but when using the “tiddler” macro both may be different.
** Support “begin”, “end” and “none” expressions in “write” action
* v1.0.5 (2006-02-05)
** Pass tiddler containing the macro with wikify, context object also holds reference to tiddler containing the macro (“inTiddler”). Thanks to SimonBaird.
** Support Firefox 1.5.0.1
** Internal
*** Make “JSLint” conform
*** “Only install once”
* v1.0.4 (2006-01-06)
** Support TiddlyWiki 2.0
* v1.0.3 (2005-12-22)
** Features:
*** Write output to a file supports multi-byte environments (Thanks to Bram Chen)
*** Provide API to access the forEachTiddler functionality directly through JavaScript (see getTiddlers and performMacro)
** Enhancements:
*** Improved error messages on InternetExplorer.
* v1.0.2 (2005-12-10)
** Features:
*** context object also holds reference to store (TiddlyWiki)
** Fixed Bugs:
*** ForEachTiddler 1.0.1 has broken support on win32 Opera 8.51 (Thanks to BrunoSabin for reporting)
* v1.0.1 (2005-12-08)
** Features:
*** Access tiddlers stored in separated TiddlyWikis through the “in” option. I.e. you are no longer limited to only work on the “current TiddlyWiki”.
*** Write output to an external file using the “toFile” option of the “write” action. With this option you may write your customized tiddler exports.
*** Use the “script” section to define “helper” JavaScript functions etc. to be used in the various JavaScript expressions (whereClause, sortClause, action arguments,…).
*** Access and store context information for the current forEachTiddler invocation (through the build-in “context” object) .
*** Improved script evaluation (for where/sort clause and write scripts).
* v1.0.0 (2005-11-20)
** initial version
!Code
***/
//{{{
//============================================================================
//============================================================================
// ForEachTiddlerPlugin
//============================================================================
//============================================================================
// Only install once
if (!version.extensions.ForEachTiddlerPlugin) {
if (!window.abego) window.abego = {};
version.extensions.ForEachTiddlerPlugin = {
major: 1, minor: 0, revision: 8,
date: new Date(2007,3,12),
source: “http://tiddlywiki.abego-software.de/#ForEachTiddlerPlugin”,
licence: “[[BSD open source license (abego Software)|http://www.abego-software.de/legal/apl-v10.html]]”,
copyright: “Copyright (c) abego Software GmbH, 2005-2007 (www.abego-software.de)”
};
// For backward compatibility with TW 1.2.x
//
if (!TiddlyWiki.prototype.forEachTiddler) {
TiddlyWiki.prototype.forEachTiddler = function(callback) {
for(var t in this.tiddlers) {
callback.call(this,t,this.tiddlers[t]);
}
};
}
//============================================================================
// forEachTiddler Macro
//============================================================================
version.extensions.forEachTiddler = {
major: 1, minor: 0, revision: 8, date: new Date(2007,3,12), provider: “http://tiddlywiki.abego-software.de”};
// —————————————————————————
// Configurations and constants
// —————————————————————————
config.macros.forEachTiddler = {
// Standard Properties
label: “forEachTiddler”,
prompt: “Perform actions on a (sorted) selection of tiddlers”,
// actions
actions: {
addToList: {},
write: {}
}
};
// —————————————————————————
// The forEachTiddler Macro Handler
// —————————————————————————
config.macros.forEachTiddler.getContainingTiddler = function(e) {
while(e && !hasClass(e,”tiddler”))
e = e.parentNode;
var title = e ? e.getAttribute(“tiddler”) : null;
return title ? store.getTiddler(title) : null;
};
config.macros.forEachTiddler.handler = function(place,macroName,params,wikifier,paramString,tiddler) {
// config.macros.forEachTiddler.traceMacroCall(place,macroName,params,wikifier,paramString,tiddler);
if (!tiddler) tiddler = config.macros.forEachTiddler.getContainingTiddler(place);
// — Parsing ——————————————
var i = 0; // index running over the params
// Parse the “in” clause
var tiddlyWikiPath = undefined;
if ((i < params.length) && params[i] == "in") {
i++;
if (i >= params.length) {
this.handleError(place, “TiddlyWiki path expected behind ‘in’.”);
return;
}
tiddlyWikiPath = this.paramEncode((i < params.length) ? params[i] : "");
i++;
}
// Parse the where clause
var whereClause ="true";
if ((i < params.length) && params[i] == "where") {
i++;
whereClause = this.paramEncode((i < params.length) ? params[i] : "");
i++;
}
// Parse the sort stuff
var sortClause = null;
var sortAscending = true;
if ((i < params.length) && params[i] == "sortBy") {
i++;
if (i >= params.length) {
this.handleError(place, “sortClause missing behind ‘sortBy’.”);
return;
}
sortClause = this.paramEncode(params[i]);
i++;
if ((i < params.length) && (params[i] == "ascending" || params[i] == "descending")) {
sortAscending = params[i] == "ascending";
i++;
}
}
// Parse the script
var scriptText = null;
if ((i < params.length) && params[i] == "script") {
i++;
scriptText = this.paramEncode((i < params.length) ? params[i] : "");
i++;
}
// Parse the action.
// When we are already at the end use the default action
var actionName = "addToList";
if (i < params.length) {
if (!config.macros.forEachTiddler.actions[params[i]]) {
this.handleError(place, "Unknown action '"+params[i]+"'.");
return;
} else {
actionName = params[i];
i++;
}
}
// Get the action parameter
// (the parsing is done inside the individual action implementation.)
var actionParameter = params.slice(i);
// --- Processing ------------------------------------------
try {
this.performMacro({
place: place,
inTiddler: tiddler,
whereClause: whereClause,
sortClause: sortClause,
sortAscending: sortAscending,
actionName: actionName,
actionParameter: actionParameter,
scriptText: scriptText,
tiddlyWikiPath: tiddlyWikiPath});
} catch (e) {
this.handleError(place, e);
}
};
// Returns an object with properties "tiddlers" and "context".
// tiddlers holds the (sorted) tiddlers selected by the parameter,
// context the context of the execution of the macro.
//
// The action is not yet performed.
//
// @parameter see performMacro
//
config.macros.forEachTiddler.getTiddlersAndContext = function(parameter) {
var context = config.macros.forEachTiddler.createContext(parameter.place, parameter.whereClause, parameter.sortClause, parameter.sortAscending, parameter.actionName, parameter.actionParameter, parameter.scriptText, parameter.tiddlyWikiPath, parameter.inTiddler);
var tiddlyWiki = parameter.tiddlyWikiPath ? this.loadTiddlyWiki(parameter.tiddlyWikiPath) : store;
context["tiddlyWiki"] = tiddlyWiki;
// Get the tiddlers, as defined by the whereClause
var tiddlers = this.findTiddlers(parameter.whereClause, context, tiddlyWiki);
context["tiddlers"] = tiddlers;
// Sort the tiddlers, when sorting is required.
if (parameter.sortClause) {
this.sortTiddlers(tiddlers, parameter.sortClause, parameter.sortAscending, context);
}
return {tiddlers: tiddlers, context: context};
};
// Returns the (sorted) tiddlers selected by the parameter.
//
// The action is not yet performed.
//
// @parameter see performMacro
//
config.macros.forEachTiddler.getTiddlers = function(parameter) {
return this.getTiddlersAndContext(parameter).tiddlers;
};
// Performs the macros with the given parameter.
//
// @param parameter holds the parameter of the macro as separate properties.
// The following properties are supported:
//
// place
// whereClause
// sortClause
// sortAscending
// actionName
// actionParameter
// scriptText
// tiddlyWikiPath
//
// All properties are optional.
// For most actions the place property must be defined.
//
config.macros.forEachTiddler.performMacro = function(parameter) {
var tiddlersAndContext = this.getTiddlersAndContext(parameter);
// Perform the action
var actionName = parameter.actionName ? parameter.actionName : "addToList";
var action = config.macros.forEachTiddler.actions[actionName];
if (!action) {
this.handleError(parameter.place, "Unknown action '"+actionName+"'.");
return;
}
var actionHandler = action.handler;
actionHandler(parameter.place, tiddlersAndContext.tiddlers, parameter.actionParameter, tiddlersAndContext.context);
};
// ---------------------------------------------------------------------------
// The actions
// ---------------------------------------------------------------------------
// Internal.
//
// --- The addToList Action -----------------------------------------------
//
config.macros.forEachTiddler.actions.addToList.handler = function(place, tiddlers, parameter, context) {
// Parse the parameter
var p = 0;
// Check for extra parameters
if (parameter.length > p) {
config.macros.forEachTiddler.createExtraParameterErrorElement(place, “addToList”, parameter, p);
return;
}
// Perform the action.
var list = document.createElement(“ul”);
place.appendChild(list);
for (var i = 0; i < tiddlers.length; i++) {
var tiddler = tiddlers[i];
var listItem = document.createElement("li");
list.appendChild(listItem);
createTiddlyLink(listItem, tiddler.title, true);
}
};
abego.parseNamedParameter = function(name, parameter, i) {
var beginExpression = null;
if ((i < parameter.length) && parameter[i] == name) {
i++;
if (i >= parameter.length) {
throw “Missing text behind ‘%0′”.format([name]);
}
return config.macros.forEachTiddler.paramEncode(parameter[i]);
}
return null;
}
// Internal.
//
// — The write Action —————————————————
//
config.macros.forEachTiddler.actions.write.handler = function(place, tiddlers, parameter, context) {
// Parse the parameter
var p = 0;
if (p >= parameter.length) {
this.handleError(place, “Missing expression behind ‘write’.”);
return;
}
var textExpression = config.macros.forEachTiddler.paramEncode(parameter[p]);
p++;
// Parse the “begin” option
var beginExpression = abego.parseNamedParameter(“begin”, parameter, p);
if (beginExpression !== null)
p += 2;
var endExpression = abego.parseNamedParameter(“end”, parameter, p);
if (endExpression !== null)
p += 2;
var noneExpression = abego.parseNamedParameter(“none”, parameter, p);
if (noneExpression !== null)
p += 2;
// Parse the “toFile” option
var filename = null;
var lineSeparator = undefined;
if ((p < parameter.length) && parameter[p] == "toFile") {
p++;
if (p >= parameter.length) {
this.handleError(place, “Filename expected behind ‘toFile’ of ‘write’ action.”);
return;
}
filename = config.macros.forEachTiddler.getLocalPath(config.macros.forEachTiddler.paramEncode(parameter[p]));
p++;
if ((p < parameter.length) && parameter[p] == "withLineSeparator") {
p++;
if (p >= parameter.length) {
this.handleError(place, “Line separator text expected behind ‘withLineSeparator’ of ‘write’ action.”);
return;
}
lineSeparator = config.macros.forEachTiddler.paramEncode(parameter[p]);
p++;
}
}
// Check for extra parameters
if (parameter.length > p) {
config.macros.forEachTiddler.createExtraParameterErrorElement(place, “write”, parameter, p);
return;
}
// Perform the action.
var func = config.macros.forEachTiddler.getEvalTiddlerFunction(textExpression, context);
var count = tiddlers.length;
var text = “”;
if (count > 0 && beginExpression)
text += config.macros.forEachTiddler.getEvalTiddlerFunction(beginExpression, context)(undefined, context, count, undefined);
for (var i = 0; i < count; i++) {
var tiddler = tiddlers[i];
text += func(tiddler, context, count, i);
}
if (count > 0 && endExpression)
text += config.macros.forEachTiddler.getEvalTiddlerFunction(endExpression, context)(undefined, context, count, undefined);
if (count == 0 && noneExpression)
text += config.macros.forEachTiddler.getEvalTiddlerFunction(noneExpression, context)(undefined, context, count, undefined);
if (filename) {
if (lineSeparator !== undefined) {
lineSeparator = lineSeparator.replace(/\n/mg, “n”).replace(/\r/mg, “r”);
text = text.replace(/n/mg,lineSeparator);
}
saveFile(filename, convertUnicodeToUTF8(text));
} else {
var wrapper = createTiddlyElement(place, “span”);
wikify(text, wrapper, null/* highlightRegExp */, context.inTiddler);
}
};
// —————————————————————————
// Helpers
// —————————————————————————
// Internal.
//
config.macros.forEachTiddler.createContext = function(placeParam, whereClauseParam, sortClauseParam, sortAscendingParam, actionNameParam, actionParameterParam, scriptText, tiddlyWikiPathParam, inTiddlerParam) {
return {
place : placeParam,
whereClause : whereClauseParam,
sortClause : sortClauseParam,
sortAscending : sortAscendingParam,
script : scriptText,
actionName : actionNameParam,
actionParameter : actionParameterParam,
tiddlyWikiPath : tiddlyWikiPathParam,
inTiddler : inTiddlerParam, // the tiddler containing the <
viewerTiddler : config.macros.forEachTiddler.getContainingTiddler(placeParam) // the tiddler showing the forEachTiddler result
};
};
// Internal.
//
// Returns a TiddlyWiki with the tiddlers loaded from the TiddlyWiki of
// the given path.
//
config.macros.forEachTiddler.loadTiddlyWiki = function(path, idPrefix) {
if (!idPrefix) {
idPrefix = “store”;
}
var lenPrefix = idPrefix.length;
// Read the content of the given file
var content = loadFile(this.getLocalPath(path));
if(content === null) {
throw “TiddlyWiki ‘”+path+”‘ not found.”;
}
var tiddlyWiki = new TiddlyWiki();
// Starting with TW 2.2 there is a helper function to import the tiddlers
if (tiddlyWiki.importTiddlyWiki) {
if (!tiddlyWiki.importTiddlyWiki(content))
throw “File ‘”+path+”‘ is not a TiddlyWiki.”;
tiddlyWiki.dirty = false;
return tiddlyWiki;
}
// The legacy code, for TW < 2.2
// Locate the storeArea div's
var posOpeningDiv = content.indexOf(startSaveArea);
var posClosingDiv = content.lastIndexOf(endSaveArea);
if((posOpeningDiv == -1) || (posClosingDiv == -1)) {
throw "File '"+path+"' is not a TiddlyWiki.";
}
var storageText = content.substr(posOpeningDiv + startSaveArea.length, posClosingDiv);
// Create a "div" element that contains the storage text
var myStorageDiv = document.createElement("div");
myStorageDiv.innerHTML = storageText;
myStorageDiv.normalize();
// Create all tiddlers in a new TiddlyWiki
// (following code is modified copy of TiddlyWiki.prototype.loadFromDiv)
var store = myStorageDiv.childNodes;
for(var t = 0; t < store.length; t++) {
var e = store[t];
var title = null;
if(e.getAttribute)
title = e.getAttribute("tiddler");
if(!title && e.id && e.id.substr(0,lenPrefix) == idPrefix)
title = e.id.substr(lenPrefix);
if(title && title !== "") {
var tiddler = tiddlyWiki.createTiddler(title);
tiddler.loadFromDiv(e,title);
}
}
tiddlyWiki.dirty = false;
return tiddlyWiki;
};
// Internal.
//
// Returns a function that has a function body returning the given javaScriptExpression.
// The function has the parameters:
//
// (tiddler, context, count, index)
//
config.macros.forEachTiddler.getEvalTiddlerFunction = function (javaScriptExpression, context) {
var script = context["script"];
var functionText = "var theFunction = function(tiddler, context, count, index) { return "+javaScriptExpression+"}";
var fullText = (script ? script+";" : "")+functionText+";theFunction;";
return eval(fullText);
};
// Internal.
//
config.macros.forEachTiddler.findTiddlers = function(whereClause, context, tiddlyWiki) {
var result = [];
var func = config.macros.forEachTiddler.getEvalTiddlerFunction(whereClause, context);
tiddlyWiki.forEachTiddler(function(title,tiddler) {
if (func(tiddler, context, undefined, undefined)) {
result.push(tiddler);
}
});
return result;
};
// Internal.
//
config.macros.forEachTiddler.createExtraParameterErrorElement = function(place, actionName, parameter, firstUnusedIndex) {
var message = "Extra parameter behind '"+actionName+"':";
for (var i = firstUnusedIndex; i < parameter.length; i++) {
message += " "+parameter[i];
}
this.handleError(place, message);
};
// Internal.
//
config.macros.forEachTiddler.sortAscending = function(tiddlerA, tiddlerB) {
var result =
(tiddlerA.forEachTiddlerSortValue == tiddlerB.forEachTiddlerSortValue)
? 0
: (tiddlerA.forEachTiddlerSortValue < tiddlerB.forEachTiddlerSortValue)
? -1
: +1;
return result;
};
// Internal.
//
config.macros.forEachTiddler.sortDescending = function(tiddlerA, tiddlerB) {
var result =
(tiddlerA.forEachTiddlerSortValue == tiddlerB.forEachTiddlerSortValue)
? 0
: (tiddlerA.forEachTiddlerSortValue < tiddlerB.forEachTiddlerSortValue)
? +1
: -1;
return result;
};
// Internal.
//
config.macros.forEachTiddler.sortTiddlers = function(tiddlers, sortClause, ascending, context) {
// To avoid evaluating the sortClause whenever two items are compared
// we pre-calculate the sortValue for every item in the array and store it in a
// temporary property ("forEachTiddlerSortValue") of the tiddlers.
var func = config.macros.forEachTiddler.getEvalTiddlerFunction(sortClause, context);
var count = tiddlers.length;
var i;
for (i = 0; i < count; i++) {
var tiddler = tiddlers[i];
tiddler.forEachTiddlerSortValue = func(tiddler,context, undefined, undefined);
}
// Do the sorting
tiddlers.sort(ascending ? this.sortAscending : this.sortDescending);
// Delete the temporary property that holds the sortValue.
for (i = 0; i < tiddlers.length; i++) {
delete tiddlers[i].forEachTiddlerSortValue;
}
};
// Internal.
//
config.macros.forEachTiddler.trace = function(message) {
displayMessage(message);
};
// Internal.
//
config.macros.forEachTiddler.traceMacroCall = function(place,macroName,params) {
var message ="<<"+macroName;
for (var i = 0; i < params.length; i++) {
message += " "+params[i];
}
message += ">>”;
displayMessage(message);
};
// Internal.
//
// Creates an element that holds an error message
//
config.macros.forEachTiddler.createErrorElement = function(place, exception) {
var message = (exception.description) ? exception.description : exception.toString();
return createTiddlyElement(place,”span”,null,”forEachTiddlerError”,”<
};
// Internal.
//
// @param place [may be null]
//
config.macros.forEachTiddler.handleError = function(place, exception) {
if (place) {
this.createErrorElement(place, exception);
} else {
throw exception;
}
};
// Internal.
//
// Encodes the given string.
//
// Replaces
// “$))” to “>>”
// “$)” to “>”
//
config.macros.forEachTiddler.paramEncode = function(s) {
var reGTGT = new RegExp(“\$\)\)”,”mg”);
var reGT = new RegExp(“\$\)”,”mg”);
return s.replace(reGTGT, “>>”).replace(reGT, “>”);
};
// Internal.
//
// Returns the given original path (that is a file path, starting with “file:”)
// as a path to a local file, in the systems native file format.
//
// Location information in the originalPath (i.e. the “#” and stuff following)
// is stripped.
//
config.macros.forEachTiddler.getLocalPath = function(originalPath) {
// Remove any location part of the URL
var hashPos = originalPath.indexOf(“#”);
if(hashPos != -1)
originalPath = originalPath.substr(0,hashPos);
// Convert to a native file format assuming
// “file:///x:/path/path/path…” – pc local file –> “x:pathpathpath…”
// “file://///server/share/path/path/path…” – FireFox pc network file –> “\serversharepathpathpath…”
// “file:///path/path/path…” – mac/unix local file –> “/path/path/path…”
// “file://server/share/path/path/path…” – pc network file –> “\serversharepathpathpath…”
var localPath;
if(originalPath.charAt(9) == “:”) // pc local file
localPath = unescape(originalPath.substr(8)).replace(new RegExp(“/”,”g”),”\”);
else if(originalPath.indexOf(“file://///”) === 0) // FireFox pc network file
localPath = “\\” + unescape(originalPath.substr(10)).replace(new RegExp(“/”,”g”),”\”);
else if(originalPath.indexOf(“file:///”) === 0) // mac/unix local file
localPath = unescape(originalPath.substr(7));
else if(originalPath.indexOf(“file:/”) === 0) // mac/unix local file
localPath = unescape(originalPath.substr(5));
else // pc network file
localPath = “\\” + unescape(originalPath.substr(7)).replace(new RegExp(“/”,”g”),”\”);
return localPath;
};
// —————————————————————————
// Stylesheet Extensions (may be overridden by local StyleSheet)
// —————————————————————————
//
setStylesheet(
“.forEachTiddlerError{color: #ffffff;background-color: #880000;}”,
“forEachTiddler”);
//============================================================================
// End of forEachTiddler Macro
//============================================================================
//============================================================================
// String.startsWith Function
//============================================================================
//
// Returns true if the string starts with the given prefix, false otherwise.
//
version.extensions[“String.startsWith”] = {major: 1, minor: 0, revision: 0, date: new Date(2005,11,20), provider: “http://tiddlywiki.abego-software.de”};
//
String.prototype.startsWith = function(prefix) {
var n = prefix.length;
return (this.length >= n) && (this.slice(0, n) == prefix);
};
//============================================================================
// String.endsWith Function
//============================================================================
//
// Returns true if the string ends with the given suffix, false otherwise.
//
version.extensions[“String.endsWith”] = {major: 1, minor: 0, revision: 0, date: new Date(2005,11,20), provider: “http://tiddlywiki.abego-software.de”};
//
String.prototype.endsWith = function(suffix) {
var n = suffix.length;
return (this.length >= n) && (this.right(n) == suffix);
};
//============================================================================
// String.contains Function
//============================================================================
//
// Returns true when the string contains the given substring, false otherwise.
//
version.extensions[“String.contains”] = {major: 1, minor: 0, revision: 0, date: new Date(2005,11,20), provider: “http://tiddlywiki.abego-software.de”};
//
String.prototype.contains = function(substring) {
return this.indexOf(substring) >= 0;
};
//============================================================================
// Array.indexOf Function
//============================================================================
//
// Returns the index of the first occurance of the given item in the array or
// -1 when no such item exists.
//
// @param item [may be null]
//
version.extensions[“Array.indexOf”] = {major: 1, minor: 0, revision: 0, date: new Date(2005,11,20), provider: “http://tiddlywiki.abego-software.de”};
//
Array.prototype.indexOf = function(item) {
for (var i = 0; i < this.length; i++) {
if (this[i] == item) {
return i;
}
}
return -1;
};
//============================================================================
// Array.contains Function
//============================================================================
//
// Returns true when the array contains the given item, otherwise false.
//
// @param item [may be null]
//
version.extensions["Array.contains"] = {major: 1, minor: 0, revision: 0, date: new Date(2005,11,20), provider: "http://tiddlywiki.abego-software.de"};
//
Array.prototype.contains = function(item) {
return (this.indexOf(item) >= 0);
};
//============================================================================
// Array.containsAny Function
//============================================================================
//
// Returns true when the array contains at least one of the elements
// of the item. Otherwise (or when items contains no elements) false is returned.
//
version.extensions[“Array.containsAny”] = {major: 1, minor: 0, revision: 0, date: new Date(2005,11,20), provider: “http://tiddlywiki.abego-software.de”};
//
Array.prototype.containsAny = function(items) {
for(var i = 0; i < items.length; i++) {
if (this.contains(items[i])) {
return true;
}
}
return false;
};
//============================================================================
// Array.containsAll Function
//============================================================================
//
// Returns true when the array contains all the items, otherwise false.
//
// When items is null false is returned (even if the array contains a null).
//
// @param items [may be null]
//
version.extensions["Array.containsAll"] = {major: 1, minor: 0, revision: 0, date: new Date(2005,11,20), provider: "http://tiddlywiki.abego-software.de"};
//
Array.prototype.containsAll = function(items) {
for(var i = 0; i < items.length; i++) {
if (!this.contains(items[i])) {
return false;
}
}
return true;
};
} // of "install only once"
// Used Globals (for JSLint) ==============
// ... DOM
/*global document */
// ... TiddlyWiki Core
/*global convertUnicodeToUTF8, createTiddlyElement, createTiddlyLink,
displayMessage, endSaveArea, hasClass, loadFile, saveFile,
startSaveArea, store, wikify */
//}}}
/***
!Licence and Copyright
Copyright (c) abego Software ~GmbH, 2005 ([[www.abego-software.de|http://www.abego-software.de]])
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this
list of conditions and the following disclaimer in the documentation and/or other
materials provided with the distribution.
Neither the name of abego Software nor the names of its contributors may be
used to endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.
***/
TiddlyWiki uses Wiki style markup, a way of lightly "tagging" plain text so it can be transformed into HTML. Edit this Tiddler to see samples.
!Header
!!Header
!!!Header
These were created by typing
Headers are created with an exclamation point
!Header 1
!!Header 2
!!!Header 3
----
{{cleartablethree{
|''Unordered Lists'' |These were created by typing|
|* Make bulleted lists with asterisks |* Make bulleted lists with asterisks |
|** To indent, just add more asterisks... |**To indent, just add more asterisks...|
----
|''Links'' ||
|You can include a link to ||
|a [[specific file|file://c:/autoexec.bat]] | [[ specific file ¦ file://c:/autoexec.bat ]] |
|a [[Windows folder|file:///c:/windows/]] | [[ Windows folder¦ file:///c:/windows/ ]] |
|a [[web site|http://google.com]] with brackets | [[ web site ¦ http://google.com ]] |
----
|''Images'' | |
|[img[http://www.thechicagoschool.edu/resources/content/1/4/9/3/images/aba_cover_sm.jpg]] | [ img [http://www.thechicagoschool.edu/resources/content/1/4/9/3/images/aba_cover_sm.jpg ]]|
----
|''Horizontal Rules'' |---- (4 dashes)|
----
| ||
|''Other Formatting'' |These were created by typing|
|''Bold'' |"Bold" (two single quotes next to each other)|
|__Underline__ |__Underline__|
|//Italic// |\\Italic\\|
|@@[email protected]@ |@ @ highlight@ @ |
----
{{justifyright{
This line will be right-aligned.
}}}
| |This was done by typing|
| |{{justifyright{|
| |This line will be right-aligned.|
| |}}}|
----
{{boxone{
Something here
}}}
| |{{boxone{ |
| |Something here |
| |}}} |
{{boxtwo{
Something here
}}}
| |{{boxtwo{ |
| |Something here |
| |}}} |
{{boxthree{
Something here
}}}
| |{{boxthree{ |
| |Something here |
| |}}} |
{{boxfour{
Something here
}}}
| |{{boxfour{ |
| |Something here |
| |}}} |
----
Articles that relate to issues for GLBT folks
<
/***
|Name|HTMLFormattingPlugin|
|Source|http://www.TiddlyTools.com/#HTMLFormattingPlugin|
|Documentation|http://www.TiddlyTools.com/#HTMLFormattingPluginInfo|
|Version|2.1.5|
|Author|Eric Shulman – ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements
and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|plugin|
|Requires||
|Overrides|’HTML’ formatter|
|Description|embed wiki syntax formatting inside of HTML content|
The ~HTMLFormatting plugin allows you to ”mix wiki-style formatting syntax within HTML formatted content” by extending the action of the standard TiddlyWiki formatting handler.
!!!!!Documentation
>see [[HTMLFormattingPluginInfo]]
!!!!!Revisions
<<<
2008.04.26 [*.*.*] plugin size reduction: more documentation moved to HTMLFormattingInfo
2008.01.08 [*.*.*] plugin size reduction: documentation moved to HTMLFormattingInfo
2007.12.04 [*.*.*] update for TW2.3.0: replaced deprecated core functions, regexps, and macros
2007.06.14 [2.1.5] in formatter, removed call to e.normalize(). Creates an INFINITE RECURSION error in Safari!!!!
| see [[HTMLFormattingPluginInfo]] for additional revision details |
2005.06.26 [1.0.0] Initial Release (as code adaptation - pre-dates TiddlyWiki plugin architecture!!)
<<<
!!!!!Code
***/
//{{{
version.extensions.HTMLFormattingPlugin= {major: 2, minor: 1, revision: 5, date: new Date(2007,6,14)};
// find the formatter for HTML and replace the handler
initHTMLFormatter();
function initHTMLFormatter()
{
for (var i=0; i
// remove carriage returns (r) added by IE textarea
html=html.replace(/r/g,”);
// encode newlines (n) and macro brackets (<< and >>)
html=html.replace(/n/g,’\n’).replace(/<>/g,’)%%’);
// create span to hold HTML
var e = createTiddlyElement(w.output,”span”);
// let browser parse HTML
e.innerHTML=html;
// walk node tree and call wikify() on each text node
wikifyTextNodes(e);
// continue wiki parsing
w.nextMatch = this.lookaheadRegExp.lastIndex;
}
}
}
// wikify text nodes remaining after HTML content is processed (pre-order recursion)
function wikifyTextNodes(theNode)
{
// textarea node doesn’t get wikified, just decoded…
if (theNode.nodeName.toLowerCase()==’textarea’)
theNode.value=theNode.value.replace(/%%(/g,’<<').replace(/)%%/g,'>>’).replace(/\n/g,’n’);
else for (var i=0;i
// replace text node with wikified() span
var newNode=createTiddlyElement(null,”span”);
theNode.replaceChild(newNode,theChild);
wikify(txt,newNode);
}
}
}
//}}}
/***
|Name:|HideWhenPlugin|
|Description:|Allows conditional inclusion/exclusion in templates|
|Version:|3.1 ($Rev: 3919 $)|
|Date:|$Date: 2008-03-13 02:03:12 +1000 (Thu, 13 Mar 2008) $|
|Source:|http://mptw.tiddlyspot.com/#HideWhenPlugin|
|Author:|Simon Baird <[email protected]>|
|License:|http://mptw.tiddlyspot.com/#TheBSDLicense|
For use in ViewTemplate and EditTemplate. Example usage:
{{{
}}}
{{{

}}}
***/
//{{{
window.hideWhenLastTest = false;
window.removeElementWhen = function(test,place) {
window.hideWhenLastTest = test;
if (test) {
removeChildren(place);
place.parentNode.removeChild(place);
}
};
merge(config.macros,{
hideWhen: { handler: function(place,macroName,params,wikifier,paramString,tiddler) {
removeElementWhen( eval(paramString), place);
}},
showWhen: { handler: function(place,macroName,params,wikifier,paramString,tiddler) {
removeElementWhen( !eval(paramString), place);
}},
hideWhenTagged: { handler: function (place,macroName,params,wikifier,paramString,tiddler) {
removeElementWhen( tiddler.tags.containsAll(params), place);
}},
showWhenTagged: { handler: function (place,macroName,params,wikifier,paramString,tiddler) {
removeElementWhen( !tiddler.tags.containsAll(params), place);
}},
hideWhenTaggedAny: { handler: function (place,macroName,params,wikifier,paramString,tiddler) {
removeElementWhen( tiddler.tags.containsAny(params), place);
}},
showWhenTaggedAny: { handler: function (place,macroName,params,wikifier,paramString,tiddler) {
removeElementWhen( !tiddler.tags.containsAny(params), place);
}},
hideWhenTaggedAll: { handler: function (place,macroName,params,wikifier,paramString,tiddler) {
removeElementWhen( tiddler.tags.containsAll(params), place);
}},
showWhenTaggedAll: { handler: function (place,macroName,params,wikifier,paramString,tiddler) {
removeElementWhen( !tiddler.tags.containsAll(params), place);
}},
hideWhenExists: { handler: function(place,macroName,params,wikifier,paramString,tiddler) {
removeElementWhen( store.tiddlerExists(params[0]) || store.isShadowTiddler(params[0]), place);
}},
showWhenExists: { handler: function(place,macroName,params,wikifier,paramString,tiddler) {
removeElementWhen( !(store.tiddlerExists(params[0]) || store.isShadowTiddler(params[0])), place);
}},
hideWhenTitleIs: { handler: function(place,macroName,params,wikifier,paramString,tiddler) {
removeElementWhen( tiddler.title == params[0], place);
}},
showWhenTitleIs: { handler: function(place,macroName,params,wikifier,paramString,tiddler) {
removeElementWhen( tiddler.title != params[0], place);
}},
‘else’: { handler: function(place,macroName,params,wikifier,paramString,tiddler) {
removeElementWhen( !window.hideWhenLastTest, place);
}}
});
//}}}
<
[[See All Tiddlers|AllTiddlers]]
[[Admin]]
<
[[Search|SearchPsychPage]]
/***
|Name|HoverMenuPlugin|
|Created by|SaqImtiaz|
|Location|http://tw.lewcid.org/#HoverMenuPlugin|
|Version|1.11|
|Requires|~TW2.x|
!Description:
Provides a hovering menu on the edge of the screen for commonly used commands, that scrolls with the page.
!Demo:
Observe the hovering menu on the right edge of the screen.
!Installation:
Copy the contents of this tiddler to your TW, tag with systemConfig, save and reload your TW.
To customize your HoverMenu, edit the HoverMenu shadow tiddler.
To customize whether the menu sticks to the right or left edge of the screen, and its start position, edit the HoverMenu configuration settings part of the code below. It’s well documented, so don’t be scared!
The menu has an id of hoverMenu, in case you want to style the buttons in it using css.
!Notes:
Since the default HoverMenu contains buttons for toggling the side bar and jumping to the top of the screen and to open tiddlers, the ToggleSideBarMacro, JumpMacro and the JumpToTopMacro are included in this tiddler, so you dont need to install them separately. Having them installed separately as well could lead to complications.
If you dont intend to use these three macros at all, feel free to remove those sections of code in this tiddler.
!To Do:
* rework code to allow multiple hovering menus in different positions, horizontal etc.
* incorporate code for keyboard shortcuts that correspond to the buttons in the hovermenu
!History:
*03-08-06, ver 1.1.2: compatibility fix with SelectThemePlugin
*03-08-06, ver 1.11: fixed error with button tooltips
*27-07-06, ver 1.1 : added JumpMacro to hoverMenu
*23-07-06
!Code
***/
/***
start HoverMenu plugin code
***/
//{{{
config.hoverMenu={};
//}}}
/***
HoverMenu configuration settings
***/
//{{{
config.hoverMenu.settings={
align: ‘right’,
x: 10,
y: 50
};
//}}}
//{{{
//continue HoverMenu plugin code
config.hoverMenu.handler=function()
{
if (!document.getElementById(“hoverMenu”))
{
var theMenu = createTiddlyElement(document.getElementById(“contentWrapper”), “div”,”hoverMenu”);
theMenu.setAttribute(“refresh”,”content”);
theMenu.setAttribute(“tiddler”,”HoverMenu”);
var menuContent = store.getTiddlerText(“HoverMenu”);
wikify(menuContent,theMenu);
}
var Xloc = this.settings.x;
Yloc =this.settings.y;
var ns = (navigator.appName.indexOf(“Netscape”) != -1);
function SetMenu(id)
{
var GetElements=document.getElementById?document.getElementById(id):document.all?document.all[id]:document.layers[id];
if(document.layers)GetElements.style=GetElements;
GetElements.sP=function(x,y){this.style[config.hoverMenu.settings.align]=x +”px”;this.style.top=y +”px”;};
GetElements.x = Xloc;
GetElements.y = findScrollY();
GetElements.y += Yloc;
return GetElements;
}
window.LoCate_XY=function()
{
var pY = findScrollY();
ftlObj.y += (pY + Yloc – ftlObj.y)/15;
ftlObj.sP(ftlObj.x, ftlObj.y);
setTimeout(“LoCate_XY()”, 10);
}
ftlObj = SetMenu(“hoverMenu”);
LoCate_XY();
};
window.old_lewcid_hovermenu_restart = restart;
restart = function()
{
window.old_lewcid_hovermenu_restart();
config.hoverMenu.handler();
};
setStylesheet();
config.macros.renameButton={};
config.macros.renameButton.handler = function(place,macroName,params,wikifier,paramString,tiddler)
{
if (place.lastChild.tagName!=”BR”)
{
place.lastChild.firstChild.data = params[0];
if (params[1]) {place.lastChild.title = params[1];}
}
};
config.shadowTiddlers[“HoverMenu”]=”<
//}}}
//end HoverMenu plugin code
//Start ToggleSideBarMacro code
//{{{
config.macros.toggleSideBar={};
config.macros.toggleSideBar.settings={
styleHide : “#sidebar { display: none;}n”+”#contentWrapper #displayArea { margin-right: 1em;}n”+””,
styleShow : ” “,
arrow1: “«”,
arrow2: “»”
};
config.macros.toggleSideBar.handler=function (place,macroName,params,wikifier,paramString,tiddler)
{
var tooltip= params[1]||’toggle sidebar’;
var mode = (params[2] && params[2]==”hide”)? “hide”:”show”;
var arrow = (mode == “hide”)? this.settings.arrow1:this.settings.arrow2;
var label= (params[0]&¶ms[0]!=’.’)?params[0]+” “+arrow:arrow;
var theBtn = createTiddlyButton(place,label,tooltip,this.onToggleSideBar,”button HideSideBarButton”);
if (mode == “hide”)
{
(document.getElementById(“sidebar”)).setAttribute(“toggle”,”hide”);
setStylesheet(this.settings.styleHide,”ToggleSideBarStyles”);
}
};
config.macros.toggleSideBar.onToggleSideBar = function(){
var sidebar = document.getElementById(“sidebar”);
var settings = config.macros.toggleSideBar.settings;
if (sidebar.getAttribute(“toggle”)==’hide’)
{
setStylesheet(settings.styleShow,”ToggleSideBarStyles”);
sidebar.setAttribute(“toggle”,”show”);
this.firstChild.data= (this.firstChild.data).replace(settings.arrow1,settings.arrow2);
}
else
{
setStylesheet(settings.styleHide,”ToggleSideBarStyles”);
sidebar.setAttribute(“toggle”,”hide”);
this.firstChild.data= (this.firstChild.data).replace(settings.arrow2,settings.arrow1);
}
return false;
}
setStylesheet(“.HideSideBarButton .button {font-weight:bold; padding: 0 5px;}n”,”ToggleSideBarButtonStyles”);
//}}}
//end ToggleSideBarMacro code
//start JumpToTopMacro code
//{{{
config.macros.top={};
config.macros.top.handler=function(place,macroName)
{
createTiddlyButton(place,”Top”,”Jump to Top”,this.onclick);
}
config.macros.top.onclick=function()
{
window.scrollTo(0,0);
};
config.commands.top =
{
text:” Top “,
tooltip:”Jump to the top of the screen”
};
config.commands.top.handler = function(event,src,title)
{
window.scrollTo(0,0);
}
//}}}
//end JumpToStartMacro code
//start JumpMacro code
//{{{
config.macros.jump= {};
config.macros.jump.handler = function (place,macroName,params,wikifier,paramString,tiddler)
{
var label = (params[0] && params[0]!=”.”)? params[0]: ‘jump’;
var tooltip = (params[1] && params[1]!=”.”)? params[1]: ‘Jump to an open tiddler’;
var top = (params[2] && params[2]==’top’) ? true: false;
var btn =createTiddlyButton(place,label,tooltip,this.onclick);
if (top==true)
btn.setAttribute(“top”,”true”)
}
config.macros.jump.onclick = function(e)
{
if (!e) var e = window.event;
var theTarget = resolveTarget(e);
var top = theTarget.getAttribute(“top”);
var popup = Popup.create(this);
if(popup)
{
if(top==”true”)
{createTiddlyButton(createTiddlyElement(popup,”li”),’Top ↑’,’Top of TW’,config.macros.jump.top);
createTiddlyElement(popup,”hr”);}
story.forEachTiddler(function(title,element) {
createTiddlyLink(createTiddlyElement(popup,”li”),title,true);
});
}
Popup.show(popup,false);
e.cancelBubble = true;
if (e.stopPropagation) e.stopPropagation();
return false;
}
config.macros.jump.top = function()
{
window.scrollTo(0,0);
}
//}}}
//end JumpMacro code
//utility functions
//{{{
Popup.show = function(unused,slowly)
{
var curr = Popup.stack[Popup.stack.length-1];
var rootLeft = findPosX(curr.root);
var rootTop = findPosY(curr.root);
var rootHeight = curr.root.offsetHeight;
var popupLeft = rootLeft;
var popupTop = rootTop + rootHeight;
var popupWidth = curr.popup.offsetWidth;
var winWidth = findWindowWidth();
if (isChild(curr.root,’hoverMenu’))
var x = config.hoverMenu.settings.x;
else
var x = 0;
if(popupLeft + popupWidth+x > winWidth)
popupLeft = winWidth – popupWidth -x;
if (isChild(curr.root,’hoverMenu’))
{curr.popup.style.right = x + “px”;}
else
curr.popup.style.left = popupLeft + “px”;
curr.popup.style.top = popupTop + “px”;
curr.popup.style.display = “block”;
addClass(curr.root,”highlight”);
if(config.options.chkAnimate)
anim.startAnimating(new Scroller(curr.popup,slowly));
else
window.scrollTo(0,ensureVisible(curr.popup));
}
window.isChild = function(e,parentId) {
while (e != null) {
var parent = document.getElementById(parentId);
if (parent == e) return true;
e = e.parentNode;
}
return false;
};
//}}}
Some tips from Pallesen and colleagues on managing insomnia.
<
This article gives 10 tips to reduce stress.
<
<
<
There’s an intrusion into the home of technology and career. More people work from home, travel for work, and allow work intrusions (e.g., email, fax, cell phones, web searches, stock/site/news monitoring, online collaboration) into the home. The result is that 65% of American families do not have a set “dinner time ritual”. This makes time for intimacy and family harder to find, especially given that 50% of workers put in more than a 40 hour week, and about 20% work more than 50 hours.
However, at least these scheduling issues are discussed; the long-term plans, “personal chronologies,” and deadlines for dreams often go unsaid. When business travel, long-distance relationships, and caring for elderly family members are added in, time can seem to slow down or speed up in sometime predictable but often unpredictable ways for most families.
~Imber-Black offers three myths couples have:
1) We can have it all
2) We can fit one more thing in if we tweak it
3) We are in control of our time
Altering excessive work routines is one of Wallerstein’s (and many others’) suggested ways to stabilize family, along with paid family leave and better protection for those who are willing to take family leave, and tax breaks for parents who stay home to raise children. Levner offers we need to redefine the typical understanding we have of two-career couples (his work and her work) to a three-career couple (his work, her work, and managing a family).
(from [[Couples on the Fault Line]])
An article about work and family life balance covering
* the nature of the “balance” between them
* whether we face actual increased or the perception of increased work responsibilities
* gender differences in work and family balance
* the intrusion of work into family life, family into work life, and the response to imbalance
* changing family lifestyles
* conclusions and references
<
This article offers:
* six tips for teachers with ADHD children
* fourteen tips for parents with ADHD children
* seven issues to consider when choosing to take medication
* some outcome data for concerned parents
<
What do you do to manage children’s anger? To teach them to deal with it more maturely? To keep from losing your temper with them?
Here’s two tips:
* Comment on your child’s behavior when it is good.
** Something like, “I like the way you handled your brother when he took your stuff.” An observant and involved parent can find dozens of things they like about their child’s behavior… “I like the way you come in for dinner without being reminded”… “I appreciate your hanging up your clothes even though you were in a hurry to get out to play”… “I’m glad you shared your snack with your sister”
** Teachers can do the same, offering, “I know it was difficult for you to wait your turn, and I’m pleased that you could do it”… “You were thoughtful in offering to help Marcus with his spelling”
* Ignore inappropriate behavior that you can tolerate.
**Nagging you while you’re on the phone can be dealt with by praising what you liked (“Thank you for waiting while I was talking on the phone. I’m off the phone now, so what’s up?”) and ignoring what you don’t like (ignoring a child’s requests while you are on the phone).
**You may be thinking, “You don’t know what they do //then//? Then they yell //louder// and you have to answer them just to have some quiet.” When you respond this way, you reinforce them for yelling. Yelling gets your attention, so next time they will yell louder to make sure you respond.
<
This article offers
* some introductory divorce statistics
* assessment of the relationship at the start of therapy
* advice to those who want to divorce
* final thoughts about the impact of divorce on the family
<
This article covers
* Protecting younger children
* Teaching children 10-12
* Web use for children age 12 to 15
* Web use for teens
* Teaching children about the web through reasoning – “Who is Helped? Who is Hurt?”
<
<
Suggested reading:
{{books{
[>
<
This article covers how to conduct a Mental Status Exam (MSE). Psychiatrists and Emergency Room staff often conduct a MSE as part of a screening process, and base it only on an interview. Psychologists often base the MSE findings on a multi-appointment assessment, and address changes in functioning over the period of the assessment process.
<
<
<
/***
|Name:|InstantTimestampPlugin|
|Description:|A handy way to insert timestamps in your tiddler content|
|Version:|1.0.10 ($Rev: 3646 $)|
|Date:|$Date: 2008-02-27 02:34:38 +1000 (Wed, 27 Feb 2008) $|
|Source:|http://mptw.tiddlyspot.com/#InstantTimestampPlugin|
|Author:|Simon Baird <[email protected]>|
|License:|http://mptw.tiddlyspot.com/#TheBSDLicense|
!!Usage
If you enter {ts} in your tiddler content (without the spaces) it will be replaced with a timestamp when you save the tiddler. Full list of formats:
* {ts} or {t} -> timestamp
* {ds} or {d} -> datestamp
* !ts or !t at start of line -> !!timestamp
* !ds or !d at start of line -> !!datestamp
(I added the extra ! since that’s how I like it. Remove it from translations below if required)
!!Notes
* Change the timeFormat and dateFormat below to suit your preference.
* See also http://mptw2.tiddlyspot.com/#AutoCorrectPlugin
* You could invent other translations and add them to the translations array below.
***/
//{{{
config.InstantTimestamp = {
// adjust to suit
timeFormat: ‘DD/0MM/YY 0hh:0mm’,
dateFormat: ‘DD/0MM/YY’,
translations: [
[/^!ts?$/img, “‘!!{{ts{‘+now.formatString(config.InstantTimestamp.timeFormat)+’}}}'”],
[/^!ds?$/img, “‘!!{{ds{‘+now.formatString(config.InstantTimestamp.dateFormat)+’}}}'”],
// thanks Adapted Cat
[/{ts?}(?!}})/ig,”‘{{ts{‘+now.formatString(config.InstantTimestamp.timeFormat)+’}}}'”],
[/{ds?}(?!}})/ig,”‘{{ds{‘+now.formatString(config.InstantTimestamp.dateFormat)+’}}}'”]
],
excludeTags: [
“noAutoCorrect”,
“noTimestamp”,
“html”,
“CSS”,
“css”,
“systemConfig”,
“systemConfigDisabled”,
“zsystemConfig”,
“Plugins”,
“Plugin”,
“plugins”,
“plugin”,
“javascript”,
“code”,
“systemTheme”,
“systemPalette”
],
excludeTiddlers: [
“StyleSheet”,
“StyleSheetLayout”,
“StyleSheetColors”,
“StyleSheetPrint”
// more?
]
};
TiddlyWiki.prototype.saveTiddler_mptw_instanttimestamp = TiddlyWiki.prototype.saveTiddler;
TiddlyWiki.prototype.saveTiddler = function(title,newTitle,newBody,modifier,modified,tags,fields,clearChangeCount,created) {
tags = tags ? tags : []; // just in case tags is null
tags = (typeof(tags) == “string”) ? tags.readBracketedList() : tags;
var conf = config.InstantTimestamp;
if ( !tags.containsAny(conf.excludeTags) && !conf.excludeTiddlers.contains(newTitle) ) {
var now = new Date();
var trans = conf.translations;
for (var i=0;i
{{books{
[>
/***
|Name:|LessBackupsPlugin|
|Description:|Intelligently limit the number of backup files you create|
|Version:|3.0.1 ($Rev: 2320 $)|
|Date:|$Date: 2007-06-18 22:37:46 +1000 (Mon, 18 Jun 2007) $|
|Source:|http://mptw.tiddlyspot.com/#LessBackupsPlugin|
|Author:|Simon Baird|
|Email:|[email protected]|
|License:|http://mptw.tiddlyspot.com/#TheBSDLicense|
!!Description
You end up with just backup one per year, per month, per weekday, per hour, minute, and second. So total number won’t exceed about 200 or so. Can be reduced by commenting out the seconds/minutes/hours line from modes array
!!Notes
Works in IE and Firefox only. Algorithm by Daniel Baird. IE specific code by by Saq Imtiaz.
***/
//{{{
var MINS = 60 * 1000;
var HOURS = 60 * MINS;
var DAYS = 24 * HOURS;
if (!config.lessBackups) {
config.lessBackups = {
// comment out the ones you don’t want or set config.lessBackups.modes in your ‘tweaks’ plugin
modes: [
[“YYYY”, 365*DAYS], // one per year for ever
[“MMM”, 31*DAYS], // one per month
[“ddd”, 7*DAYS], // one per weekday
//[“d0DD”, 1*DAYS], // one per day of month
[“h0hh”, 24*HOURS], // one per hour
[“m0mm”, 1*HOURS], // one per minute
[“s0ss”, 1*MINS], // one per second
[“latest”,0] // always keep last version. (leave this).
]
};
}
window.getSpecialBackupPath = function(backupPath) {
var now = new Date();
var modes = config.lessBackups.modes;
for (var i=0;i
return specialBackupPath;
}
}
// hijack the core function
window.getBackupPath_mptw_orig = window.getBackupPath;
window.getBackupPath = function(localPath) {
return getSpecialBackupPath(getBackupPath_mptw_orig(localPath));
}
//}}}
{{books{
[>
{{whitelinks{[[Welcome]]}}}{{whitelinks{<
/***
|Name:|MptwConfigPlugin|
|Description:|Miscellaneous tweaks used by MPTW|
|Version:|1.0 ($Rev: 3646 $)|
|Date:|$Date: 2008-02-27 02:34:38 +1000 (Wed, 27 Feb 2008) $|
|Source:|http://mptw.tiddlyspot.com/#MptwConfigPlugin|
|Author:|Simon Baird <[email protected]>|
|License:|http://mptw.tiddlyspot.com/#MptwConfigPlugin|
!!Note: instead of editing this you should put overrides in MptwUserConfigPlugin
***/
//{{{
var originalReadOnly = readOnly;
var originalShowBackstage = showBackstage;
config.options.chkHttpReadOnly = true; // means web visitors can not experiment with your site by clicking edit
readOnly = false; // needed because the above doesn’t work any
// more post 2.1 (??)
showBackstage = false; // show backstage for same reason
config.options.chkInsertTabs = true; // tab inserts a tab when editing a tiddler
config.views.wikified.defaultText = “”; // don’t need message when a tiddler doesn’t exist
config.views.editor.defaultText = “”; // don’t need message when creating a new tiddler
config.options.chkSaveBackups = true; // do save backups
config.options.txtBackupFolder = ‘twbackup’; // put backups in a backups folder
config.mptwVersion = “2.4.5”;
config.macros.mptwVersion={handler:function(place){wikify(config.mptwVersion,place);}};
// these are used by ViewTemplate
config.mptwDateFormat = ‘MM/DD/YY’;
config.mptwJournalFormat = ‘Journal MM/DD/YY’;
//}}}
/***
|Description:|A place to put your config tweaks so they aren’t overwritten when you upgrade MPTW|
See http://www.tiddlywiki.org/wiki/Configuration_Options for other options you can set. In some cases where there are clashes with other plugins it might help to rename this to zzMptwUserConfigPlugin so it gets executed last.
***/
//{{{
// example: switch off autosave, switch on backups and set a backup folder
config.options.chkAutoSave = false;
//}}}
If you are a previous visitor at ~PsychPage, you’ll notice some significant differences.
[img[images/example0.gif]] |
|
[img[images/example1.gif]] |
|
[img[images/example2.gif]] |
|
[img[images/example3.gif]] |
|
/***
|Name|NewHereCommand|
|Source|http://simonbaird.com/mptw/#NewHereCommand|
|Version|1.0|
Code originally by ArphenLin. Small tweak by SimonBaird
http://aiddlywiki.sourceforge.net/NewHere_demo.html#NewHereCommand
To use this you must edit your ViewTemplate and add newHere to the toolbar div, eg
{{{
}}}
***/
//{{{
config.commands.newHere = {
text: ‘new here’,
tooltip: ‘Create a new tiddler tagged as this tiddler’,
hideReadOnly: true,
handler: function(e,src,title) {
if (!readOnly) {
clearMessage();
var t=document.getElementById(‘tiddler’+title);
story.displayTiddler(t,config.macros.newTiddler.title,DEFAULT_EDIT_TEMPLATE);
story.setTiddlerTag(config.macros.newTiddler.title, title, 0);
story.focusTiddler(config.macros.newTiddler.title,”title”);
return false;
}
}
};
config.commands.newJournalHere = {
//text: ‘new journal here’, // too long
text: ‘new journal’,
hideReadOnly: true,
dataFormat: ‘YYYY-0MM-0DD 0hh:0mm’, // adjust to your preference
tooltip: ‘Create a new journal tiddler tagged as this tiddler’,
handler: function(e,src,title) {
if (!readOnly) {
clearMessage();
var now = new Date();
var t=document.getElementById(‘tiddler’+title);
var newtitle = now.formatString(this.dataFormat)
story.displayTiddler(t,newtitle,DEFAULT_EDIT_TEMPLATE);
story.setTiddlerTag(newtitle, title, 0);
story.focusTiddler(newtitle,”title”);
return false;
}
}
};
//}}}
/***
|Name:|NewHerePlugin|
|Description:|Creates the new here and new journal macros|
|Version:|3.0 ($Rev: 3861 $)|
|Date:|$Date: 2008-03-08 10:53:09 +1000 (Sat, 08 Mar 2008) $|
|Source:|http://mptw.tiddlyspot.com/#NewHerePlugin|
|Author:|Simon Baird <[email protected]>|
|License|http://mptw.tiddlyspot.com/#TheBSDLicense|
***/
//{{{
merge(config.macros, {
newHere: {
handler: function(place,macroName,params,wikifier,paramString,tiddler) {
wikify(“<
}
},
newJournalHere: {
handler: function(place,macroName,params,wikifier,paramString,tiddler) {
wikify(“<
}
}
});
//}}}
/***
|Name:|NewMeansNewPlugin|
|Description:|If ‘New Tiddler’ already exists then create ‘New Tiddler (1)’ and so on|
|Version:|1.1 ($Rev: 2263 $)|
|Date:|$Date: 2007-06-13 04:22:32 +1000 (Wed, 13 Jun 2007) $|
|Source:|http://mptw.tiddlyspot.com/empty.html#NewMeansNewPlugin|
|Author:|Simon Baird <[email protected]>|
|License|http://mptw.tiddlyspot.com/#TheBSDLicense|
!!Note: I think this should be in the core
***/
//{{{
String.prototype.getNextFreeName = function() {
var numberRegExp = / (([0-9]+))$/;
var match = numberRegExp.exec(this);
if (match) {
var num = parseInt(match[1]) + 1;
return this.replace(numberRegExp,” (“+num+”)”);
}
else {
return this + ” (1)”;
}
}
config.macros.newTiddler.checkForUnsaved = function(newName) {
var r = false;
story.forEachTiddler(function(title,element) {
if (title == newName)
r = true;
});
return r;
}
config.macros.newTiddler.getName = function(newName) {
while (store.getTiddler(newName) || config.macros.newTiddler.checkForUnsaved(newName))
newName = newName.getNextFreeName();
return newName;
}
config.macros.newTiddler.onClickNewTiddler = function()
{
var title = this.getAttribute(“newTitle”);
if(this.getAttribute(“isJournal”) == “true”) {
var now = new Date();
title = now.formatString(title.trim());
}
title = config.macros.newTiddler.getName(title); // <--- only changed bit
var params = this.getAttribute("params");
var tags = params ? params.split("|") : [];
var focus = this.getAttribute("newFocus");
var template = this.getAttribute("newTemplate");
var customFields = this.getAttribute("customFields");
story.displayTiddler(null,title,template,false,null,null);
var tiddlerElem = document.getElementById(story.idPrefix + title);
if(customFields)
story.addCustomFields(tiddlerElem,customFields);
var text = this.getAttribute("newText");
if(typeof text == "string")
story.getTiddlerField(title,"text").value = text.format([title]);
for(var t=0;t
Various book reviews, articles, and research findings related to the job of parenting.
/***
|Name:|PrettyDatesPlugin|
|Description:|Provides a new date format (‘pppp’) that displays times such as ‘2 days ago’|
|Version:|1.0 ($Rev: 3646 $)|
|Date:|$Date: 2008-02-27 02:34:38 +1000 (Wed, 27 Feb 2008) $|
|Source:|http://mptw.tiddlyspot.com/#PrettyDatesPlugin|
|Author:|Simon Baird <[email protected]>|
|License:|http://mptw.tiddlyspot.com/#TheBSDLicense|
!!Notes
* If you want to you can rename this plugin. 🙂 Some suggestions: LastUpdatedPlugin, RelativeDatesPlugin, SmartDatesPlugin, SexyDatesPlugin.
* Inspired by http://ejohn.org/files/pretty.js
***/
//{{{
Date.prototype.prettyDate = function() {
var diff = (((new Date()).getTime() – this.getTime()) / 1000);
var day_diff = Math.floor(diff / 86400);
if (isNaN(day_diff)) return “”;
else if (diff < 0) return "in the future";
else if (diff < 60) return "just now";
else if (diff < 120) return "1 minute ago";
else if (diff < 3600) return Math.floor(diff/60) + " minutes ago";
else if (diff < 7200) return "1 hour ago";
else if (diff < 86400) return Math.floor(diff/3600) + " hours ago";
else if (day_diff == 1) return "Yesterday";
else if (day_diff < 7) return day_diff + " days ago";
else if (day_diff < 14) return "a week ago";
else if (day_diff < 31) return Math.ceil(day_diff/7) + " weeks ago";
else if (day_diff < 62) return "a month ago";
else if (day_diff < 365) return "about " + Math.ceil(day_diff/31) + " months ago";
else if (day_diff < 730) return "a year ago";
else return Math.ceil(day_diff/365) + " years ago";
}
Date.prototype.formatString_orig_mptw = Date.prototype.formatString;
Date.prototype.formatString = function(template) {
return this.formatString_orig_mptw(template).replace(/pppp/,this.prettyDate());
}
// for MPTW. otherwise edit your ViewTemplate as required.
// config.mptwDateFormat = 'pppp (DD/MM/YY)';
config.mptwDateFormat = 'pppp';
//}}}
PsychPage does not collect any information about its users, including but not limited to
*personal demographic information
*areas of interest
*email addresses
While the web server does keep record of
* what site people come from (such as 57.7% from Google and 11.7% from Yahoo)
* what browser they use (such as Internet Explorer is 65.9% and ~FireFox is 27.6% of visitors) and
* which pages are the most popular ones
no personally identifying information is collected.
! Learn About:
* the NewDesign
* the WebMaster
* the [[History of PsychPage]]
* our PrivacyPolicy
/***
| Name:|QuickOpenTagPlugin|
| Purpose:|Makes tag links into a Taggly style open tag plus a normal style drop down menu|
| Creator:|SimonBaird|
| Source:|http://simonbaird.com/mptw/#QuickOpenTagPlugin|
| Requires:|TW 2.x|
| Version|1.1.1 (19-May-06)|
!History
* Version 1.1.1 (19/05/2006)
** Added a little more CSS so the tags look good in standard main menus and normal tiddlers
* Version 1.1 (07/02/2006)
** Fix Firefox 1.5.0.1 crashes
** Updated by ~BidiX[at]~BidiX.info
* Version 1.0 (?/01/2006)
** First release
***/
//{{{
//⊻ ⊽ ⋁ ▼
window.createTagButton_orig_mptw = createTagButton;
window.createTagButton = function(place,tag,excludeTiddler) {
var sp = createTiddlyElement(place,"span",null,"quickopentag");
createTiddlyLink(sp,tag,true,"button");
var theTag = createTiddlyButton(sp,config.macros.miniTag.dropdownchar,config.views.wikified.tag.tooltip.format([tag]),onClickTag);
theTag.setAttribute("tag",tag);
if(excludeTiddler)
theTag.setAttribute("tiddler",excludeTiddler);
return(theTag);
};
config.macros.miniTag = {handler:function(place,macroName,params,wikifier,paramString,tiddler) {
var tagged = store.getTaggedTiddlers(tiddler.title);
if (tagged.length > 0) {
var theTag = createTiddlyButton(place,config.macros.miniTag.dropdownchar,config.views.wikified.tag.tooltip.format([tiddler.title]),onClickTag);
theTag.setAttribute(“tag”,tiddler.title);
theTag.className = “miniTag”;
}
}};
config.macros.miniTag.dropdownchar = (document.all?”▼”:”▾”); // the fat one is the only one that works in IE
config.macros.allTags.handler = function(place,macroName,params)
{
var tags = store.getTags();
var theDateList = createTiddlyElement(place,”ul”,null,null,null);
if(tags.length === 0)
createTiddlyElement(theDateList,”li”,null,”listTitle”,this.noTags);
for (var t=0; t