Welcome to TiddlyWiki created by Jeremy Ruston, Copyright © 2007 UnaMesa Association
LEAD: Students who led five days of demonstrations in Burma last week called today for more protests, and there was a growing sense that the calm in the capital was a temporary one.
Students who led five days of demonstrations in Burma last week called today for more protests, and there was a growing sense that the calm in the capital was a temporary one.
The students say that just their first demand has been met by the resignation of the Burmese leader on Friday, according to reports reaching here.
''The thing is not over yet,'' said a Burmese here who maintains contact with Rangoon. ''There is a lot of anger at the military and the Government, and the people are not going to stop now.''
''We have achieved our first goal,'' a diplomat said one wall poster in Rangoon read, referring to the removal of the Burmese leader, U Sein Lwin. ''If we do not achieve our next goals after Aug. 19 we will demonstrate again.''
The Government and the Central Committee of the powerful ruling party will meet on that date, apparently to name a successor and possibly to address some of the substantive grievances of the majority of Burmese citizens who supported the protests. Hundreds Reported Killed
Diplomats reached by telephone in Rangoon and Burmese here who have contact with the capital said wall posters calling for renewed protests had appeared at Rangoon General Hospital, where soldiers reportedly shot dead two doctors, three nurses and two Buddhist monks at the height of the demonstrations on Wednesday. Hundreds were reportedly shot dead by soldiers during five days of demonstrations ending Friday.
The Japanese news agency Kyodo, one of the only agencies with a representative in Burma, reported that anti-Government groups rallied in major cities today and called for renewed demonstrations on Monday. This report could not be confirmed.
The diplomats and the Burmese said the capital remained quiet today and people stocked up on food and gasoline.
The Government-owned radio station reported that the central Burmese city of Mandalay was also returning to normal, with shops open and bus service restored.
The general demand is for change, though many protesters do not appear to have a clear idea of what change they are seeking. 'Not Going to Be Enough'
''Listening to people, you get the distinct impression that it is not going to be enough for the Government simply to replace Sein Lwin,'' a diplomat said. ''They will have to do far more than that.''
''The demand for democracy is everywhere, even among people born after U Ne Win came to power who have no concept what democracy means,'' he said.
Mr. Ne Win took power in 1962 in a coup and instituted a system of autocratic government that centralized the economy and left the people with virtually no voice in their own affairs.
The hospital where the student posters appeared has become something of a shrine, the diplomats and the Burmese said, with large crowds gathering, and flowers and tiny memorials marking the places where people were killed.
Among the memorials, two paper parasols of the type carried by Buddhists are evidence that two monks were shot dead together with the doctors and nurses, the diplomat said.
Other posters at the hospital say the killings came when the military mistook a line of blood donors in the hospital courtyard for demonstrators and the doctors and nurses appealed to the soldiers not to shoot.
They were themselves killed in heavy gunfire that splintered iron railings outside the ornate red-brick building, the posters say. Who Will Follow Sein Lwin? In the crowds at the hospital and elsewhere around Rangoon, the talk reportedly is also about what the Government may do next and who may replace Mr. Sein Lwin.
The names most often mentioned, diplomats said, are Kyaw Htin, the former Defense Minister who now holds the No. 3 position in the Government and is regarded as relatively liberal on economic matters, and Attorney General Maung Maung, one of only two civilians in the 22-member Cabinet.
''Either of them might be more acceptable to people, without the antagonistic effects of Sein Lwin,'' a diplomat said.
Diplomats said they put some credence in two reports that involve Mr. Ne Win and Mr. Sein Lwin.
On Thursday, according to one of the stories, Mr. Ne Win's daughter, a doctor, asked him what he would do about the shootings at the hospital, to which he is said to have replied: ''I am not going to do anything. The administration is no longer in my hands. If they come to me and ask for my help, I will help.''
Some diplomats believe Mr. Ne Win was indeed instrumental in persuading Mr. Sein Lwin to resign.
According to the second story, Mr. Sein Lwin, a deeply superstitious man, was asked by an astrologer, the day before his resignation, what he planned to do about the protests.
He is said to have replied: ''I have enough strength to put them down. They will run out of food soon and then they will come crawling back to me.''
[[NY Times|http://query.nytimes.com/gst/fullpage.html?res=940DE6DB1039F936A2575BC0A96E948260&sec=&spon=&pagewanted=2]]
Students for Burma is a not a organization, it is a student-led campaign. We are students uniting to support the peaceful protesters in Burma who are demanding freedom and democracy.
!Mission
# Raise awareness around campus about what is going on in Burma,
# Give the brave protesters inside Burma inspiration to continue the protests. The Burmese protesters get news of our "red days" through satellite radio and TV, which is broadcast back into the country
# To show the international community, especially China, that the world is watching. China is blocking effective international action. We are demanding China to use their leverage over Burma to stop the massacre.
!Members
We must recognize that the students taking action are from different organizations including the US Campaign for Burma, STAND: A Student Anti-genocide Coalition, Amnesty International, universities, and high schools from all over the world.
[[US Campaign for Burma|http://uscampaignforburma.org]]
The United States Campaign for Burma is a U.S.-based membership organization dedicated to empowering grassroots activists around the world to bring about an end to the military dictatorship in Burma. Through public education, leadership development initiatives, conferences, and advocacy campaigns at local, national and international levels, USCB works to empower Americans and Burmese dissidents-in-exile to promote freedom, democracy, and human rights in Burma and raise awareness about the egregious human rights violations committed by Burma’s military regime.
[[STAND: A Student Anti-Genocide Coalition|http://standnow.org]]
STAND formerly known as Students Taking Action Now: Darfur, serves as umbrella organization for student groups active in promoting awareness advocating for an end to the current genocide in Darfur, Sudan and working to create a permanent anti-genocide student movement. It serves as a guide for student groups in high schools and colleges, helping them to develop their grassroots efforts for Darfur and anti-genocide activism, to unify their message and to coordinate efforts. STAND has become a student movement that encompasses over 600 college, university, and high school chapters across the United States and around the world. Each new STAND chapter is formed independently by students at their respective institution.
[[Amnesty International|http://www.amnesty.org/]]
Amnesty International (AI) is a worldwide movement of people who campaign for internationally recognized human rights. AI’s vision is of a world in which every person enjoys all of the human rights enshrined in the Universal Declaration of Human Rights and other international human rights standards. In pursuit of this vision, AI’s mission is to undertake research and action focused on preventing and ending grave abuses of the rights to physical and mental integrity, freedom of conscience and expression, and freedom from discrimination, within the context of its work to promote all human rights.
!Students for Burma
We are a group of student members from several organizations including the US Campaign for Burma, STAND the Student Anti-Genocide Coalition, and Amnesty International.
!United States Campaign for Burma
The United States Campaign for Burma is a U.S.-based membership organization dedicated to empowering grassroots activists around the world to bring about an end to the military dictatorship in Burma. Through public education, leadership development initiatives, conferences, and advocacy campaigns at local, national and international levels, USCB works to empower Americans and Burmese dissidents-in-exile to promote freedom, democracy, and human rights in Burma and raise awareness about the egregious human rights violations committed by Burma’s military regime.
![[Who is Aung San Suu Kyi?|Aung San Suu Kyi]]
<<search>>
<<permaview>>
<<newTiddler>>
<<newJournal "DD MMM YYYY">>
<<newReminder>>
----
<<option chkSaveBackups>> SaveBackups
<<option chkAutoSave>> AutoSave
<<option chkAnimate>> EnableAnimations
<<option chkHttpReadOnly>> HttpReadOnly
<<option chkSinglePageMode>> SinglePageMode
----
MarkupPreHead
OptionsBar
CreateEvent
[[Newsletter]]
[[Join]]
[[showEvents]]
[[Calendar]]
[[showEvents]]
[[Forum]]
[[Quotes]]
[[Banners]]
[[StyleSheet]]
[[SiteTitle]]
[[SiteSubtitle]]
[[ViewTemplate]]
[[PageTemplate]]
[[EditTemplate]]
[[showEvents]]
[[MainMenu]]
SideBarOptions
AdvancedOptions
OptionsPanel
GettingStarted
SideBarTabs
[[footerDisplay]]
This page is for Executive Board Members and Committee Members. ''Please'' use it.
|!Announcements <<newTiddler label:"Add" focus:title title:"Announcement" text:"Enter Announcements Here." tag:announcement prompt:"Add announcement to the Agenda page.">>|!|!News <<newTiddler label:"Add" accessKey:n focus:title title:"Copy Headline Here." text:"Copy Article Here. [img[COPY IMAGE URL HERE]] [[Full Article|COPY LINK URL HERE]]" tag:news prompt:"Add an article to the News page.">>|
|<<tiddlerList tags:announcement order:"-created" itemTemplate:"%link: %text\n">>|!|<<tiddlerList tags:news order:"-created" top:2 itemTemplate:"%link\n">>|
|!Documents<<newTiddler label:"Add" focus:title title:"Document Title" text:"Enter Information Here." tag:document prompt:"Add document to the Agenda page.">>|!|!Minutes <<newTiddler label:"Add" focus:title title:"Enter Meeting Name and Date Here." text:"Enter Minutes Here." tag:minutes prompt:"Add meeting minutes to the Agenda page.">>|
|<<tiddlerList tags:document order:"-created" itemTemplate:"%link, ">>|!|<<tiddlerList tags:minutes order:"-created" itemTemplate:"%link, ">>|
|!Events<<newTiddler label:"Add" accessKey:n focus:title title:"Event Name" tag:event prompt:"Add an event to the Events Agenda.">>|!|!Updates <<newTiddler label:"Add" accessKey:n focus:title title:"Update Title" tag:update prompt:"Add an update to the Agenda page.">>|
|<<tiddlerList tags:"event" order:"-modified" itemTemplate:"%link\n">>|!|<<tiddlerList tags:"update" order:"-modified" itemTemplate:"%link: %abstract\n----\n">>|
|!Calendar|!|~|
|<<showReminders tags:event leadtime:60 format:"TIDDLER DIFF, DATE at TITLE" >>|!|~|
On September 25, 2007, Amnesty International's Secretary General Irene Khan has written to the members of the UN Security Council. In the letter, Amnesty International "requests the Security Council to send a mission to Myanmar to inform itself of the situation on the ground and to engage urgently with the authorities in efforts to avert any risk of a violent crackdown. The Security Council should also consider the possibility of imposing an arms embargo on Myanmar." The letter also states that Amnesty International "stands ready to brief the Council on concrete steps that should be taken to address the dire human rights situation in Myanmar."
Peaceful demonstrations sparked by sharp increase in fuel prices have grown in size and number. Peaceful protests led by Buddhist monks have called for a reduction in commodity prices, the release of political prisoners, and national reconciliation. Sporadic reports indicate mounting tension in the country as authorities allegedly issue public warnings of legal action against protesters. Military postings are said to be increasingly present in Yangon, while troops from the elite division in the capital Naypyitaw have been sent to Yangoon.
Amnesty International has long-standing concerns at the deprivation of basic rights in detention in Myanmar. Laws criminalize peaceful expression of political dissent. People are frequently arrested without warrant and held incommunicado. Torture and other forms of cruel, Inhuman and degrading treatment are common during interrogation and pre-trial detention. Proceedings against political detainees have failed to meet internationals standards of fairness. Defendants are often denied the right to legal counsel or to legal counsel of their own choice. Prosecutors have relied on confessions extracted through torture.
On 14 August, the Myanmar authorities raised petrol prices by two-thirds, doubled diesel prices and raised the cost of compressed natural gas five-fold. The sudden price increases left many unable to afford bus fares to get to work and to purchase essential commodities such as rice. A string of peaceful protest rallies against the price increases ensued in different parts of the country. Some of the protestors have also called for the release of detained political activists and an end to the protracted political deadlock in the country.
Myanmar authorities have accused the 88 Generation Students Group of committing "terrorist and subversive acts" and of violating Law 5/96. Amnesty International is concerned that the vague and sweeping provisions of Law 5/96 criminalize the peaceful expression of political beliefs, and has previously called for its appeal.
Tens of thousands of monks and supporters had earlier marched from Shwedagon pagoda into the commercial centre of Rangoon, where they gathered around Sule pagoda and nearby city hall. Protesters addressed the crowd outside city hall. "National reconciliation is very important for us... The monks are standing up for the people," proclaimed poet Aung Way.
[[Amnesty International|http://takeaction.amnestyusa.org/site/c.jhKPIXPCIoE/b.3449257/k.F969/Background_Information_on_Myanmar_Burma.htm]]
[>img[http://uscampaignforburma.org/images/whitneystewartbook.jpg]]Daw Aung San Suu Kyi (pronounced Daw Aung Sawn Sue Chee) is one of the world's most renown freedom fighters and advocates of nonviolence, having served as the figurehead for Burma's struggle for democracy since 1988. Born on June 19th, 1945 to Burma's independence hero, Aung San, Aung San Suu Kyi was educated in Burma, India, and the United Kingdom. Her father was assassinated when she was only two years old.
In 1988, while living in London, she returned to Burma to nurse her dying mother, and was plunged into the country's nationwide uprising that had just begun. Joining the newly-forming National League for Democracy political party, Suu Kyi gave numerous speeches calling for freedom and democracy. The military regime responded to the uprising with brute force, shooting and otherwise killing up to 10,000 demonstrators — student, women, children, and others — in a mater of months. Unable to maintain its grip on power, the regime was forced to call for a general election in 1990.
As Suu Kyi began to campaign for the NLD, she and many others were detained by the regime. Despite being held under house arrest, the NLD went on to win a staggering 82% of the seats in parliament. The regime never recognized the results.
Suu Kyi has been in and out of arrest ever since. She was held from 1989-1995, and again from 2000-2002. She was again arrested and placed behind bars in May 2003 after the Depayin massacre, during which up to 100 of her supporters were beaten to death by the regime's cronies. She has moved from prison back into house arrest in late 2003 and has been held there ever since.
She has won numerous international awards, including the Nobel Peace Prize, Sakharov Prize from the European Parliament, United States Presidential Medal of Freedom, and Jawaharlal Nehru Award from India. She has called on people around the world to join the struggle for freedom in Burma, saying "Please use your liberty to promote ours."
[img[http://uscampaignforburma.org/images/USCB_TopPhotos.jpg]]
[>img[http://uscampaignforburma.org/images/BurmaMap.jpg]]The people of the Southeast Asian country of Burma are locked in one of the world's great freedom struggles. The country's military rulers, the State Peace and Development Council, have run the country with an iron fist for the past 15 years, after they assumed power from a 26-year socialist dictatorship. In 1988, students, professionals, and others launched a nationwide uprising aimed at bringing an end to authoritarian rule during which millions of people courageously marched on the streets, calling for freedom and democracy.
The military responded by gunning down thousands of demonstrators and imprisoning thousands more in one of Southeast Asia's most bloody episodes in recent history. The leader of the demonstrations, Min Ko Naing (pronounced Min Ko Nine), has been held behind bars ever since, where approximately 1,400 political prisoners remain. The most recognizable face of Burma, 1991 Nobel Peace Prize recipient Daw [[Aung San Suu Kyi]] (pronounced Daw Aung Sawn Sue Chee), has been in and out of house arrest and prison since 1988. Presently, she is held under house arrest.
Worried that they could not hold on to power in 1988, the ruling generals announced they would hold a democratic election. Aung San Suu Kyi and many allies formed a political party, which they named the National League for Democracy (NLD). The party went on to win the election in a landslide victory in 1990, garnering an astounding 82% of the seats in parliament, even though many pro-democracy leaders were already imprisoned. Tragically, instead of permitting the electoral winners to assume office, the regime has maintained its grip on power ever since.
In 1996, students again organized major protests on the streets of Rangoon, with thousands conducting sit-down demonstrations at key traffic intersections. The regime responded again by force, brutally beating them with batons and water canons, and arresting hundreds. This time, a videographer managed to capture some of the events on camera, which were then shown on CNN and other news stations.
In May 2003, Burma again made international headlines when Aung San Suu Kyi, just released from house arrest a year earlier, was traveling on a speaking tour near Mandalay, Burma's second largest city. During her tour, approximately 600 members of her caravan were brutally attacked by the political arm of the regime, the Union Solidarity and Development Association. Up to 100 supporters were brutally beaten to death with blunt clubs, bamboo sticks, and spears, while Aung San Suu Kyi narrowly escaped assassination. She was held in prison and is now under total house arrest.
At the same time, many of Burma's ethnic groups, including the Karen, Shan, and others, have been waging armed freedom struggles against the regime, some for up to 50 years. The regime, intent on dominating the entire country, has responded with brutal force — raping, slaughtering, or forcibly displacing millions of ethnic peoples. Reports of some of the world's most horrific human rights abuses have been documented by governments and credible organizations in Burma's ethnic regions, yet these peoples never give up the struggle to protect their homelands and way of life.
The NLD, the true elected leaders of Burma, have called on citizens and governments around the world to put international pressure on Burma's regime. Our mission is to respond to this call — please contact us today or become a member to get involved. We are grassroots citizens just like you — and we need your help.
[>img[The government has not released details about detainees it is holding|http://newsimg.bbc.co.uk/media/images/44152000/jpg/_44152310_burma1_203bi.jpg]]The world is still trying to gauge the mood in Burma following the clampdown on pro-democracy demonstrations by the military regime.
Foreign media, including the BBC, are not allowed to report from Burma, but we have received this report from a correspondent in the main city of Rangoon.
To a casual observer, the Burmese city of Rangoon looks the same as it did before the pro-democracy marches of the past few weeks.
Although security levels are still high - military trucks often rumble past, and soldiers and riot police are still milling around at key locations - local people are trying to get on with their everyday lives as best they can.
Most of the shops and temples are now open, the street hawkers and beggars are back in place and people are once more spending their time travelling on overcrowded buses and sitting in tea shops to avoid the monsoon rain.
It is almost as if the events of the past week - the mounting anti-government protests by thousands of the city's Buddhist monks, followed by a bloody three-day crackdown - are just a distant memory.
But if you go down one of the city's back streets, or try to engage in a conversation with anyone, it immediately becomes apparent that the mood has changed.
In fact, you could cut the tension with a knife.
!Frightened stares
When I walked down some of the little streets in the downtown area, a series of eyes followed my every movement, quickly averting their gaze the second I looked in their direction.
''Despite the fear that pervades every part of this city, there remains an equal amount of defiance ... this is definitely not the end of the protests''
The people of Rangoon - and no doubt throughout the country - are frightened.
"I'm really scared," said one woman when she was sure no-one else could hear.
"I don't want to be the next one to get a knock on the door from the soldiers in the middle of the night," another man said.
They have good reason to be concerned. Thousands of monks and others who led the marches of the past few weeks have now been arrested - and these arrests are still continuing.
Most are picked up under cover of nightfall and corralled into large, heavily-guarded buildings on the outskirts of the city, such as the Government Technical Centre and the National Library.
The government has yet to confirm any details about the names or numbers of detainees, and families are left unsure whether their loved ones are imprisoned, dead or in hiding.
!Tightened grip
In case these arrests are not enough to stop Rangoon's citizens from re-starting the protests, the government is doing all it can to persuade - indeed compel - any dissenters to think twice.
[>img[Monasteries are still refusing to accept alms from the military|http://newsimg.bbc.co.uk/media/images/44152000/jpg/_44152311_burma2_203b.jpg]]The media is awash with accusations about lies in the foreign media - the BBC is particularly targeted - and soldiers are strictly enforcing a government-imposed curfew.
They are also preventing even small groups of men from gathering together.
One man said he was chatting to a group of about 20 friends on a street corner on Friday when troops suddenly began to shoot, and they all had to run for safety.
There are also persistent rumours, which the military has not denied, that a notoriously violent group of pro-government thugs was part of the force sent to quash the monks' protests last week.
This group is rumoured to be still around, helping to pick up those on the military's wanted list.
!Fighting back
To many people in Burma, this situation seems all too familiar.
There are stark parallels with the last large-scale protests in 1988, when government troops and their henchmen brutally crushed pro-democracy protesters, imprisoning thousands.
[>img[Gen Than Shwe heads the ruling junta and controls the army|http://newsimg.bbc.co.uk/media/images/44150000/jpg/_44150500_thanshweap203b.jpg]]
On that occasion, an estimated 3,000 people were killed. The number of dead this time is much lower - eyewitnesses estimate about 40, although it is extremely hard to get accurate figures.
However many people here fear that the worst is yet to come.
And that is because, despite the fear that pervades every part of this city, there remains an equal amount of defiance.
Those with the courage to speak out say the Burmese are not just afraid but intensely angry, and that this is definitely not the end of the protests.
"It's unbelievable what the military has done," one woman said. "In 1998 they attacked civilians, and now they have attacked monks. It's the worst thing they could do."
"We cannot stop our fight now. We just have to think of other ways to go on protesting," she added.
!Lying low
Behind closed doors, anti-government campaigners are almost certainly planning their next move.
One man said he thought that while the majority of protesters were currently lying low, because their leaders had been detained, they would soon be back.
And it appears that the monks have not given up either. Monasteries around the country are still refusing to accept alms from the military - a hugely symbolic act in such a devoutly Buddhist nation.
Sources have also told us that the detained monks are refusing to change out of their traditional robes, and many are on hunger strike.
In several pockets of Rangoon, people are even reportedly guarding monasteries against night-time government raids.
One man described how locals took it in turn to wait outside the monastery gates, to flash warning lights on to any military trucks coming near. Some are even said to be armed with handmade weapons, such as slingshots and arrows made from the spokes of bicycles.
Even now, there continue to be reports of small-scale demonstrations around the country.
It is obvious that despite their best efforts to stifle any opposition, the question Burma's ruling generals need to ask themselves is not if the anti-government protests will return, but when.
[[BBC News|http://news.bbc.co.uk/go/pr/fr/-/2/hi/asia-pacific/7024825.stm]]
Please find attached, a segment of telephone conversation from Burma, taped just now. It is in Burmese and translation is below.
[>img[http://theburmacampaign.files.wordpress.com/2007/09/cropped-monkssitting1.jpg]] “(They) shoot. (They) shoot here. (People) die. Today is not brutal like yesterday, I think. But, I will know more accurately tomorrow. Next one, what I am shivering is, please send it BBC and others. At Yay Way (Yay Way Cemetery at the outskirt of Rangoon), injured people are being burnt alive……(Inaudible)……People, who run the burning machine for cremation, spoke with tears to a people who came for a funeral. Send that information to BBC, CNN, etc. Thank you, bye.”
Even you don’t understand Burmese, you can sense that this woman was not able to speak clearly at later part, as she was crying for this horrible act.
If you ask me whether I believe it or not, yes, I believe it. This is a way for the Burmese military junta to destroy all evidences.
If you ask me to prove more, sorry, I can’t. But, the fact that so many people, may be tens of thousands of people from Burma, disappeared from their homes and their families, in the 19 years is not ”without reason”.
September 30th, 2007
[[Saffron Revolution Updates|http://theburmacampaign.wordpress.com]]
![[List View|Events]]
<<calendar thismonth>>
<<calendar nextmonth>>
/***
|Name|CalendarPlugin|
|Source|http://www.TiddlyTools.com/#CalendarPlugin|
|Version|0.0.0|
|Author|SteveRumsby|
|License|unknown|
|~CoreVersion|2.1|
|Type|plugin|
|Requires||
|Overrides||
|Description|monthly and yearly calendars|
// // updated by Jeremy Sheeley to add cacheing for reminders
// // see http://www.geocities.com/allredfaq/reminderMacros.html
// // ''Changes by ELS 2006.08.23:''
// // added handling for weeknumbers (code supplied by Martin Budden. see "wn**" comment marks)
// // ''Changes by ELS 2005.10.30:''
// // config.macros.calendar.handler()
// // ^^use "tbody" element for IE compatibility^^
// // ^^IE returns 2005 for current year, FF returns 105... fix year adjustment accordingly^^
// // createCalendarDays()
// // ^^use showDate() function (if defined) to render autostyled date with linked popup^^
// // calendar stylesheet definition
// // ^^use .calendar class-specific selectors, add text centering and margin settings^^
!!!!!Configuration:
<<option chkDisplayWeekNumbers>> Display week numbers //(note: Monday will be used as the start of the week)//
|''First day of week:''|<<option txtCalFirstDay>>|(Monday = 0, Sunday = 6)|
|''First day of weekend:''|<<option txtCalStartOfWeekend>>|(Monday = 0, Sunday = 6)|
!!!!!Syntax:
|{{{<<calendar>>}}}|Produce a full-year calendar for the current year|
|{{{<<calendar year>>}}}|Produce a full-year calendar for the given year|
|{{{<<calendar year month>>}}}|Produce a one-month calendar for the given month and year|
|{{{<<calendar thismonth>>}}}|Produce a one-month calendar for the current month|
|{{{<<calendar lastmonth>>}}}|Produce a one-month calendar for last month|
|{{{<<calendar nextmonth>>}}}|Produce a one-month calendar for next month|
***/
// //Modify this section to change the text displayed for the month and day names, to a different language for example. You can also change the format of the tiddler names linked to from each date, and the colours used.
//{{{
config.macros.calendar = {};
config.macros.calendar.monthnames = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
config.macros.calendar.daynames = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"];
config.macros.calendar.weekendbg = "#c0c0c0";
config.macros.calendar.monthbg = "#e0e0e0";
config.macros.calendar.holidaybg = "#ffc0c0";
//}}}
// //''Code section:''
// (you should not need to alter anything below here)//
//{{{
if(config.options.txtCalFirstDay == undefined)
config.options.txtCalFirstDay = 0;
if(config.options.txtCalStartOfWeekend == undefined)
config.options.txtCalStartOfWeekend = 5;
if(config.options.chkDisplayWeekNumbers == undefined)//wn**
config.options.chkDisplayWeekNumbers = false;
if(config.options.chkDisplayWeekNumbers)
config.options.txtCalFirstDay = 0;
config.macros.calendar.tiddlerformat = "0DD/0MM/YYYY"; // This used to be changeable - for now, it isn't// <<smiley :-(>>
version.extensions.calendar = { major: 0, minor: 6, revision: 0, date: new Date(2006, 1, 22)};
config.macros.calendar.monthdays = [ 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
config.macros.calendar.holidays = [ ]; // Not sure this is required anymore - use reminders instead
//}}}
// //Is the given date a holiday?
//{{{
function calendarIsHoliday(date)
{
var longHoliday = date.formatString("0DD/0MM/YYYY");
var shortHoliday = date.formatString("0DD/0MM");
for(var i = 0; i < config.macros.calendar.holidays.length; i++) {
if(config.macros.calendar.holidays[i] == longHoliday || config.macros.calendar.holidays[i] == shortHoliday) {
return true;
}
}
return false;
}
//}}}
// //The main entry point - the macro handler.
// //Decide what sort of calendar we are creating (month or year, and which month or year)
// // Create the main calendar container and pass that to sub-ordinate functions to create the structure.
// ELS 2005.10.30: added creation and use of "tbody" for IE compatibility and fixup for year >1900//
// ELS 2005.10.30: fix year calculation for IE's getYear() function (which returns '2005' instead of '105')//
// ELS 2006.05.29: add journalDateFmt handling//
//{{{
config.macros.calendar.handler = function(place,macroName,params)
{
var calendar = createTiddlyElement(place, "table", null, "calendar", null);
var tbody = createTiddlyElement(calendar, "tbody", null, null, null);
var today = new Date();
var year = today.getYear();
if (year<1900) year+=1900;
// get format for journal link by reading from SideBarOptions (ELS 5/29/06 - based on suggestion by Martin Budden)
var text = store.getTiddlerText("SideBarOptions");
this.journalDateFmt = "DD-MMM-YYYY";
var re = new RegExp("<<(?:newJournal)([^>]*)>>","mg"); var fm = re.exec(text);
if (fm && fm[1]!=null) { var pa=fm[1].readMacroParams(); if (pa[0]) this.journalDateFmt = pa[0]; }
if (params[0] == "thismonth")
{
cacheReminders(new Date(year, today.getMonth(), 1, 0, 0), 31);
createCalendarOneMonth(tbody, year, today.getMonth());
}
else if (params[0] == "lastmonth") {
var month = today.getMonth()-1; if (month==-1) { month=11; year--; }
cacheReminders(new Date(year, month, 1, 0, 0), 31);
createCalendarOneMonth(tbody, year, month);
}
else if (params[0] == "nextmonth") {
var month = today.getMonth()+1; if (month>11) { month=0; year++; }
cacheReminders(new Date(year, month, 1, 0, 0), 31);
createCalendarOneMonth(tbody, year, month);
}
else {
if (params[0]) year = params[0];
if(params[1])
{
cacheReminders(new Date(year, params[1]-1, 1, 0, 0), 31);
createCalendarOneMonth(tbody, year, params[1]-1);
}
else
{
cacheReminders(new Date(year, 0, 1, 0, 0), 366);
createCalendarYear(tbody, year);
}
}
window.reminderCacheForCalendar = null;
}
//}}}
//{{{
//This global variable is used to store reminders that have been cached
//while the calendar is being rendered. It will be renulled after the calendar is fully rendered.
window.reminderCacheForCalendar = null;
//}}}
//{{{
function cacheReminders(date, leadtime)
{
if (window.findTiddlersWithReminders == null)
return;
window.reminderCacheForCalendar = {};
var leadtimeHash = [];
leadtimeHash [0] = 0;
leadtimeHash [1] = leadtime;
var t = findTiddlersWithReminders(date, leadtimeHash, null, 1);
for(var i = 0; i < t.length; i++) {
//just tag it in the cache, so that when we're drawing days, we can bold this one.
window.reminderCacheForCalendar[t[i]["matchedDate"]] = "reminder:" + t[i]["params"]["title"];
}
}
//}}}
//{{{
function createCalendarOneMonth(calendar, year, mon)
{
var row = createTiddlyElement(calendar, "tr", null, null, null);
createCalendarMonthHeader(calendar, row, config.macros.calendar.monthnames[mon] + " " + year, true, year, mon);
row = createTiddlyElement(calendar, "tr", null, null, null);
createCalendarDayHeader(row, 1);
createCalendarDayRowsSingle(calendar, year, mon);
}
//}}}
//{{{
function createCalendarMonth(calendar, year, mon)
{
var row = createTiddlyElement(calendar, "tr", null, null, null);
createCalendarMonthHeader(calendar, row, config.macros.calendar.monthnames[mon] + " " + year, false, year, mon);
row = createTiddlyElement(calendar, "tr", null, null, null);
createCalendarDayHeader(row, 1);
createCalendarDayRowsSingle(calendar, year, mon);
}
//}}}
//{{{
function createCalendarYear(calendar, year)
{
var row;
row = createTiddlyElement(calendar, "tr", null, null, null);
var back = createTiddlyElement(row, "td", null, null, null);
var backHandler = function() {
removeChildren(calendar);
createCalendarYear(calendar, year-1);
};
createTiddlyButton(back, "<", "Previous year", backHandler);
back.align = "center";
var yearHeader = createTiddlyElement(row, "td", null, "calendarYear", year);
yearHeader.align = "center";
//yearHeader.setAttribute("colSpan", 19);
yearHeader.setAttribute("colSpan",config.options.chkDisplayWeekNumbers?22:19);//wn**
var fwd = createTiddlyElement(row, "td", null, null, null);
var fwdHandler = function() {
removeChildren(calendar);
createCalendarYear(calendar, year+1);
};
createTiddlyButton(fwd, ">", "Next year", fwdHandler);
fwd.align = "center";
createCalendarMonthRow(calendar, year, 0);
createCalendarMonthRow(calendar, year, 3);
createCalendarMonthRow(calendar, year, 6);
createCalendarMonthRow(calendar, year, 9);
}
//}}}
//{{{
function createCalendarMonthRow(cal, year, mon)
{
var row = createTiddlyElement(cal, "tr", null, null, null);
createCalendarMonthHeader(cal, row, config.macros.calendar.monthnames[mon], false, year, mon);
createCalendarMonthHeader(cal, row, config.macros.calendar.monthnames[mon+1], false, year, mon);
createCalendarMonthHeader(cal, row, config.macros.calendar.monthnames[mon+2], false, year, mon);
row = createTiddlyElement(cal, "tr", null, null, null);
createCalendarDayHeader(row, 3);
createCalendarDayRows(cal, year, mon);
}
//}}}
//{{{
function createCalendarMonthHeader(cal, row, name, nav, year, mon)
{
var month;
if(nav) {
var back = createTiddlyElement(row, "td", null, null, null);
back.align = "center";
back.style.background = config.macros.calendar.monthbg;
/*
back.setAttribute("colSpan", 2);
var backYearHandler = function() {
var newyear = year-1;
removeChildren(cal);
cacheReminders(new Date(newyear, mon , 1, 0, 0), 31);
createCalendarOneMonth(cal, newyear, mon);
};
createTiddlyButton(back, "<<", "Previous year", backYearHandler);
*/
var backMonHandler = function() {
var newyear = year;
var newmon = mon-1;
if(newmon == -1) { newmon = 11; newyear = newyear-1;}
removeChildren(cal);
cacheReminders(new Date(newyear, newmon , 1, 0, 0), 31);
createCalendarOneMonth(cal, newyear, newmon);
};
createTiddlyButton(back, "<", "Previous month", backMonHandler);
month = createTiddlyElement(row, "td", null, "calendarMonthname", name)
// month.setAttribute("colSpan", 3);
// month.setAttribute("colSpan", 5);
month.setAttribute("colSpan", config.options.chkDisplayWeekNumbers?6:5);//wn**
var fwd = createTiddlyElement(row, "td", null, null, null);
fwd.align = "center";
fwd.style.background = config.macros.calendar.monthbg;
// fwd.setAttribute("colSpan", 2);
var fwdMonHandler = function() {
var newyear = year;
var newmon = mon+1;
if(newmon == 12) { newmon = 0; newyear = newyear+1;}
removeChildren(cal);
cacheReminders(new Date(newyear, newmon , 1, 0, 0), 31);
createCalendarOneMonth(cal, newyear, newmon);
};
createTiddlyButton(fwd, ">", "Next month", fwdMonHandler);
/*
var fwdYear = createTiddlyElement(row, "td", null, null, null);
var fwdYearHandler = function() {
var newyear = year+1;
removeChildren(cal);
cacheReminders(new Date(newyear, mon , 1, 0, 0), 31);
createCalendarOneMonth(cal, newyear, mon);
};
createTiddlyButton(fwd, ">>", "Next year", fwdYearHandler);
*/
} else {
month = createTiddlyElement(row, "td", null, "calendarMonthname", name)
//month.setAttribute("colSpan", 7);
month.setAttribute("colSpan",config.options.chkDisplayWeekNumbers?8:7);//wn**
}
month.align = "center";
month.style.background = config.macros.calendar.monthbg;
}
//}}}
//{{{
function createCalendarDayHeader(row, num)
{
var cell;
for(var i = 0; i < num; i++) {
if (config.options.chkDisplayWeekNumbers) createTiddlyElement(row, "td");//wn**
for(var j = 0; j < 7; j++) {
var d = j + (config.options.txtCalFirstDay - 0);
if(d > 6) d = d - 7;
cell = createTiddlyElement(row, "td", null, null, config.macros.calendar.daynames[d]);
if(d == (config.options.txtCalStartOfWeekend-0) || d == (config.options.txtCalStartOfWeekend-0+1))
cell.style.background = config.macros.calendar.weekendbg;
}
}
}
//}}}
//{{{
function createCalendarDays(row, col, first, max, year, mon)
{
var i;
if (config.options.chkDisplayWeekNumbers){
if (first<=max) {
var ww = new Date(year,mon,first);
createTiddlyElement(row, "td", null, null, "w"+ww.getWeek());//wn**
}
else createTiddlyElement(row, "td", null, null, null);//wn**
}
for(i = 0; i < col; i++) {
createTiddlyElement(row, "td", null, null, null);
}
var day = first;
for(i = col; i < 7; i++) {
var d = i + (config.options.txtCalFirstDay - 0);
if(d > 6) d = d - 7;
var daycell = createTiddlyElement(row, "td", null, null, null);
var isaWeekend = ((d == (config.options.txtCalStartOfWeekend-0) || d == (config.options.txtCalStartOfWeekend-0+1))? true:false);
if(day > 0 && day <= max) {
var celldate = new Date(year, mon, day);
// ELS 2005.10.30: use <<date>> macro's showDate() function to create popup
if (window.showDate) {
showDate(daycell,celldate,"popup","DD",config.macros.calendar.journalDateFmt,true, isaWeekend); // ELS 5/29/06 - use journalDateFmt
} else {
if(isaWeekend) daycell.style.background = config.macros.calendar.weekendbg;
var title = celldate.formatString(config.macros.calendar.tiddlerformat);
if(calendarIsHoliday(celldate)) {
daycell.style.background = config.macros.calendar.holidaybg;
}
if(window.findTiddlersWithReminders == null) {
var link = createTiddlyLink(daycell, title, false);
link.appendChild(document.createTextNode(day));
} else {
var button = createTiddlyButton(daycell, day, title, onClickCalendarDate);
}
}
}
day++;
}
}
//}}}
// //We've clicked on a day in a calendar - create a suitable pop-up of options.
// //The pop-up should contain:
// // * a link to create a new entry for that date
// // * a link to create a new reminder for that date
// // * an <hr>
// // * the list of reminders for that date
//{{{
function onClickCalendarDate(e)
{
var button = this;
var date = button.getAttribute("title");
var dat = new Date(date.substr(6,4), date.substr(3,2)-1, date.substr(0, 2));
date = dat.formatString(config.macros.calendar.tiddlerformat);
var popup = createTiddlerPopup(this);
popup.appendChild(document.createTextNode(date));
var newReminder = function() {
var t = store.getTiddlers(date);
displayTiddler(null, date, 2, null, null, false, false);
if(t) {
document.getElementById("editorBody" + date).value += "\n<<reminder day:" + dat.getDate() +
" month:" + (dat.getMonth()+1) +
" year:" + (dat.getYear()+1900) + " title: >>";
} else {
document.getElementById("editorBody" + date).value = "<<reminder day:" + dat.getDate() +
" month:" + (dat.getMonth()+1) +
" year:" + (dat.getYear()+1900) + " title: >>";
}
};
var link = createTiddlyButton(popup, "New reminder", null, newReminder);
popup.appendChild(document.createElement("hr"));
var t = findTiddlersWithReminders(dat, [0,14], null, 1);
for(var i = 0; i < t.length; i++) {
link = createTiddlyLink(popup, t[i].tiddler, false);
link.appendChild(document.createTextNode(t[i].tiddler));
}
}
//}}}
//{{{
function calendarMaxDays(year, mon)
{
var max = config.macros.calendar.monthdays[mon];
if(mon == 1 && (year % 4) == 0 && ((year % 100) != 0 || (year % 400) == 0)) {
max++;
}
return max;
}
//}}}
//{{{
function createCalendarDayRows(cal, year, mon)
{
var row = createTiddlyElement(cal, "tr", null, null, null);
var first1 = (new Date(year, mon, 1)).getDay() -1 - (config.options.txtCalFirstDay-0);
if(first1 < 0) first1 = first1 + 7;
var day1 = -first1 + 1;
var first2 = (new Date(year, mon+1, 1)).getDay() -1 - (config.options.txtCalFirstDay-0);
if(first2 < 0) first2 = first2 + 7;
var day2 = -first2 + 1;
var first3 = (new Date(year, mon+2, 1)).getDay() -1 - (config.options.txtCalFirstDay-0);
if(first3 < 0) first3 = first3 + 7;
var day3 = -first3 + 1;
var max1 = calendarMaxDays(year, mon);
var max2 = calendarMaxDays(year, mon+1);
var max3 = calendarMaxDays(year, mon+2);
while(day1 <= max1 || day2 <= max2 || day3 <= max3) {
row = createTiddlyElement(cal, "tr", null, null, null);
createCalendarDays(row, 0, day1, max1, year, mon); day1 += 7;
createCalendarDays(row, 0, day2, max2, year, mon+1); day2 += 7;
createCalendarDays(row, 0, day3, max3, year, mon+2); day3 += 7;
}
}
//}}}
//{{{
function createCalendarDayRowsSingle(cal, year, mon)
{
var row = createTiddlyElement(cal, "tr", null, null, null);
var first1 = (new Date(year, mon, 1)).getDay() -1 - (config.options.txtCalFirstDay-0);
if(first1 < 0) first1 = first1+ 7;
var day1 = -first1 + 1;
var max1 = calendarMaxDays(year, mon);
while(day1 <= max1) {
row = createTiddlyElement(cal, "tr", null, null, null);
createCalendarDays(row, 0, day1, max1, year, mon); day1 += 7;
}
}
//}}}
// //ELS 2005.10.30: added styles
//{{{
setStylesheet(".calendar, .calendar table, .calendar th, .calendar tr, .calendar td { text-align:center; } .calendar, .calendar a { margin:0px !important; padding:0px !important; }", "calendarStyles");
//}}}
// // override cookie settings for CalendarPlugin:
//{{{
config.options.txtCalFirstDay=6;
config.options.txtCalStartOfWeekend=5;
//}}}
Background: #fff
Foreground: #000
PrimaryPale: #fff
PrimaryLight: #000
PrimaryMid: #000
PrimaryDark: #000
Error: #f88
TertiaryPale: #fff
TertiaryLight: #fff
TertiaryMid: #ccc
TertiaryDark: #000
SecondaryPale: #fff
SecondaryLight: #fff
SecondaryMid: #f00
SecondaryDark: #000
!For more information please email [[info@studentsforburma.org|mailto:info@studentsforburma.org]]
/***
|Name|DatePlugin|
|Source|http://www.TiddlyTools.com/#DatePlugin|
|Version|2.3.1|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <<br>>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|plugin|
|Requires||
|Overrides||
|Description|formatted dates plus popup menu with 'journal' link, changes and (optional) reminders|
There are quite a few calendar generators, reminders, to-do lists, 'dated tiddlers' journals, blog-makers and GTD-like schedule managers that have been built around TW. While they all have different purposes, and vary in format, interaction, and style, in one way or another each of these plugins displays and/or uses date-based information to make finding, accessing and managing relevant tiddlers easier. This plugin provides a general approach to embedding dates and date-based links/menus within tiddler content.
This plugin display formatted dates, for the specified year, month, day using number values or mathematical expressions such as (Y+1) or (D+30). Optionally, you can create a link from the formatted output to a 'dated tiddler' for quick blogging or create a popup menu that includes the dated tiddler link plus links to changes made on that date as well as links to any pending reminders for the coming 31 days (if the RemindersPlugin is installed). This plugin also provides a public API for easily incorporating formatted date output (with or without the links/popups) into other plugins, such as calendar generators, etc.
!!!!!Usage
<<<
When installed, this plugin defines a macro: {{{<<date [mode] [date] [format] [linkformat]>>}}}. All of the macro parameters are optional and, in it's simplest form, {{{<<date>>}}}, it is equivalent to the ~TiddlyWiki core macro, {{{<<today>>}}}.
However, where {{{<<today>>}}} simply inserts the current date/time in a predefined format (or custom format, using {{{<<today [format]>>}}}), the {{{<<date>>}}} macro's parameters take it much further than that:
* [mode] is either ''display'', ''link'' or ''popup''. If omitted, it defaults to ''display''. This param let's you select between simply displaying a formatted date, or creating a link to a specific 'date titled' tiddler or a popup menu containing a dated tiddler link, plus links to changes and reminders.
* [date] lets you enter ANY date (not just today) as ''year, month, and day values or simple mathematical expressions'' using pre-defined variables, Y, M, and D for the current year, month and day, repectively. You can display the modification date of the current tiddler by using the keyword: ''tiddler'' in place of the year, month and day parameters. Use ''tiddler://name-of-tiddler//'' to display the modification date of a specific tiddler. You can also use keywords ''today'' or ''filedate'' to refer to these //dynamically changing// date/time values.
* [format] and [linkformat] uses standard ~TiddlyWiki date formatting syntax. The default is "YYYY.0MM.0DD"
>^^''DDD'' - day of week in full (eg, "Monday"), ''DD'' - day of month, ''0DD'' - adds leading zero^^
>^^''MMM'' - month in full (eg, "July"), ''MM'' - month number, ''0MM'' - adds leading zero^^
>^^''YYYY'' - full year, ''YY'' - two digit year, ''hh'' - hours, ''mm'' - minutes, ''ss'' - seconds^^
>^^//note: use of hh, mm or ss format codes is only supported with ''tiddler'', ''today'' or ''filedate'' values//^^
* [linkformat] - specify an alternative date format so that the title of a 'dated tiddler' link can have a format that differs from the date's displayed format
In addition to the macro syntax, DatePlugin also provides a public javascript API so that other plugins that work with dates (such as calendar generators, etc.) can quickly incorporate date formatted links or popups into their output:
''{{{showDate(place, date, mode, format, linkformat, autostyle, weekend)}}}''
Note that in addition to the parameters provided by the macro interface, the javascript API also supports two optional true/false parameters:
* [autostyle] - when true, the font/background styles of formatted dates are automatically adjusted to show the date's status: 'today' is boxed, 'changes' are bold, 'reminders' are underlined, while weekends and holidays (as well as changes and reminders) can each have a different background color to make them more visibly distinct from each other.
* [weekend] - true indicates a weekend, false indicates a weekday. When this parameter is omitted, the plugin uses internal defaults to automatically determine when a given date falls on a weekend.
<<<
!!!!!Examples
<<<
The current date: <<date>>
The current time: <<date today "0hh:0mm:0ss">>
Today's blog: <<date link today "DDD, MMM DDth, YYYY">>
Recent blogs/changes/reminders: <<date popup Y M D-1 "yesterday">> <<date popup today "today">> <<date popup Y M D+1 "tomorrow">>
The first day of next month will be a <<date Y M+1 1 "DDD">>
This tiddler (DatePlugin) was last updated on: <<date tiddler "DDD, MMM DDth, YYYY">>
The SiteUrl was last updated on: <<date tiddler:SiteUrl "DDD, MMM DDth, YYYY">>
This document was last saved on <<date filedate "DDD, MMM DDth, YYYY at 0hh:0mm:0ss">>
<<date 2006 07 24 "MMM DDth, YYYY">> will be a <<date 2006 07 24 "DDD">>
<<<
!!!!!Installation
<<<
import (or copy/paste) the following tiddlers into your document:
''DatePlugin'' (tagged with <<tag systemConfig>>)
<<<
!!!!!Revision History
<<<
''2007.06.20 [2.3.1]'' in onClickDatePopup(), use Popup.show() instead of deprecated ScrollToTiddlerPopup(). Fixes fatal error that prevents popups from being properly displayed
''2007.05.31 [2.3.0]'' list "created" tiddlers in date popup. Also, force re-cache of created/modified indices when displaying current date and store.isDirty(), so that popup is kept in sync with tiddler changes.
''2006.05.09 [2.2.1]'' added "todaybg" handling to set background color of current date. Also, honor excludeLists tag when getting lists of tiddlers. Based on suggestions by Mark Hulme.
''2006.05.05 [2.2.0]'' added "linkedbg" handling to set background color when a 'dated tiddler' exists. Based on a suggestion by Mark Hulme.
''2006.03.08 [2.1.2]'' add 'override leadtime' flag param in call to findTiddlersWithReminders(), and add "Enter a title" default text to new reminder handler. Thanks to Jeremy Sheeley for these additional tweaks.
''2006.03.06 [2.1.0]'' hasReminders() nows uses window.reminderCacheForCalendar[] when present. If calendar cache is not present, indexReminders() now uses findTiddlersWithReminders() with a 90-day look ahead to check for reminders. Also, switched default background colors for autostyled dates: reminders are now greenish ("c0ffee") and holidays are now reddish ("ffaace").
''2006.02.14 [2.0.5]'' when readOnly is set (by TW core), omit "new reminders..." popup menu item and, if a "dated tiddler" does not already exist, display the date as simple text instead of a link.
''2006.02.05 [2.0.4]'' added var to variables that were unintentionally global. Avoids FireFox 1.5.0.1 crash bug when referencing global variables
''2006.01.18 [2.0.3]'' In 1.2.x the tiddler editor's text area control was given an element ID=("tiddlerBody"+title), so that it was easy to locate this field and programmatically modify its content. With the addition of configuration templates in 2.x, the textarea no longer has an ID assigned. To find this control we now look through all the child nodes of the tiddler editor to locate a "textarea" control where attribute("edit") equals "text", and then append the new reminder to the contents of that control.
''2006.01.11 [2.0.2]'' correct 'weekend' override detection logic in showDate()
''2006.01.10 [2.0.1]'' allow custom-defined weekend days (default defined in config.macros.date.weekend[] array)
added flag param to showDate() API to override internal weekend[] array
''2005.12.27 [2.0.0]'' Update for TW2.0
Added parameter handling for 'linkformat'
''2005.12.21 [1.2.2]'' FF's date.getYear() function returns 105 (for the current year, 2005). When calculating a date value from Y M and D expressions, the plugin adds 1900 to the returned year value get the current year number. But IE's date.getYear() already returns 2005. As a result, plugin calculated date values on IE were incorrect (e.g., 3905 instead of 2005). Adding +1900 is now conditional so the values will be correct on both browsers.
''2005.11.07 [1.2.1]'' added support for "tiddler" dynamic date parameter
''2005.11.06 [1.2.0]'' added support for "tiddler:title" dynamic date parameter
''2005.11.03 [1.1.2]'' when a reminder doesn't have a specified title parameter, use the title of the tiddler that contains the reminder as "fallback" text in the popup menu. Based on a suggestion from BenjaminKudria.
''2005.11.03 [1.1.1]'' Temporarily bypass hasReminders() logic to avoid excessive overhead from generating the indexReminders() cache. While reminders can still appear in the popup menu, they just won't be indicated by auto-styling the date number that is displayed. This single change saves approx. 60% overhead (5 second delay reduced to under 2 seconds).
''2005.11.01 [1.1.0]'' corrected logic in hasModifieds() and hasReminders() so caching of indexed modifieds and reminders is done just once, as intended. This should hopefully speed up calendar generators and other plugins that render multiple dates...
''2005.10.31 [1.0.1]'' documentation and code cleanup
''2005.10.31 [1.0.0]'' initial public release
''2005.10.30 [0.9.0]'' pre-release
<<<
!!!!!Credits
<<<
This feature was developed by EricShulman from [[ELS Design Studios|http:/www.elsdesign.com]].
<<<
!!!!!Code
***/
//{{{
version.extensions.date = {major: 2, minor: 3, revision: 1, date: new Date(2007,6,20)};
//}}}
//{{{
config.macros.date = {
format: "YYYY.0MM.0DD", // default date display format
linkformat: "YYYY.0MM.0DD", // 'dated tiddler' link format
linkedbg: "#babb1e", // "babble"
todaybg: "#ffab1e", // "fable"
weekendbg: "#c0c0c0", // "cocoa"
holidaybg: "#ffaace", // "face"
createdbg: "#bbeeff", // "beef"
modifiedsbg: "#bbeeff", // "beef"
remindersbg: "#c0ffee", // "coffee"
holidays: [ "01/01", "07/04", "07/24", "11/24" ], // NewYearsDay, IndependenceDay(US), Eric's Birthday (hooray!), Thanksgiving(US)
weekend: [ 1,0,0,0,0,0,1 ] // [ day index values: sun=0, mon=1, tue=2, wed=3, thu=4, fri=5, sat=6 ]
};
//}}}
//{{{
config.macros.date.handler = function(place,macroName,params)
{
// do we want to see a link, a popup, or just a formatted date?
var mode="display";
if (params[0]=="display") { mode=params[0]; params.shift(); }
if (params[0]=="popup") { mode=params[0]; params.shift(); }
if (params[0]=="link") { mode=params[0]; params.shift(); }
// get the date
var now = new Date();
var date = now;
if (!params[0] || params[0]=="today")
{ params.shift(); }
else if (params[0]=="filedate")
{ date=new Date(document.lastModified); params.shift(); }
else if (params[0]=="tiddler")
{ date=store.getTiddler(story.findContainingTiddler(place).id.substr(7)).modified; params.shift(); }
else if (params[0].substr(0,8)=="tiddler:")
{ var t; if ((t=store.getTiddler(params[0].substr(8)))) date=t.modified; params.shift(); }
else {
var y = eval(params.shift().replace(/Y/ig,(now.getYear()<1900)?now.getYear()+1900:now.getYear()));
var m = eval(params.shift().replace(/M/ig,now.getMonth()+1));
var d = eval(params.shift().replace(/D/ig,now.getDate()+0));
date = new Date(y,m-1,d);
}
// date format with optional custom override
var format=this.format; if (params[0]) format=params.shift();
var linkformat=this.linkformat; if (params[0]) linkformat=params.shift();
showDate(place,date,mode,format,linkformat);
}
//}}}
//{{{
window.showDate=showDate;
function showDate(place,date,mode,format,linkformat,autostyle,weekend)
{
if (!mode) mode="display";
if (!format) format=config.macros.date.format;
if (!linkformat) linkformat=config.macros.date.linkformat;
if (!autostyle) autostyle=false;
// format the date output
var title = date.formatString(format);
var linkto = date.formatString(linkformat);
// just show the formatted output
if (mode=="display") { place.appendChild(document.createTextNode(title)); return; }
// link to a 'dated tiddler'
var link = createTiddlyLink(place, linkto, false);
link.appendChild(document.createTextNode(title));
link.title = linkto;
link.date = date;
link.format = format;
link.linkformat = linkformat;
// if using a popup menu, replace click handler for dated tiddler link
// with handler for popup and make link text non-italic (i.e., an 'existing link' look)
if (mode=="popup") {
link.onclick = onClickDatePopup;
link.style.fontStyle="normal";
}
// format the popup link to show what kind of info it contains (for use with calendar generators)
if (!autostyle) return;
if (hasModifieds(date)||hasCreateds(date))
{ link.style.fontStyle="normal"; link.style.fontWeight="bold"; }
if (hasReminders(date))
{ link.style.textDecoration="underline"; }
if(isToday(date))
{ link.style.border="1px solid black"; }
if( (weekend!=undefined?weekend:isWeekend(date)) && (config.macros.date.weekendbg!="") )
{ place.style.background = config.macros.date.weekendbg; }
if(isHoliday(date)&&(config.macros.date.holidaybg!=""))
{ place.style.background = config.macros.date.holidaybg; }
if (hasCreateds(date)&&(config.macros.date.createdbg!=""))
{ place.style.background = config.macros.date.createdbg; }
if (hasModifieds(date)&&(config.macros.date.modifiedsbg!=""))
{ place.style.background = config.macros.date.modifiedsbg; }
if (store.tiddlerExists(linkto)&&(config.macros.date.linkedbg!=""))
{ place.style.background = config.macros.date.linkedbg; }
if (hasReminders(date)&&(config.macros.date.remindersbg!=""))
{ place.style.background = config.macros.date.remindersbg; }
if(isToday(date)&&(config.macros.date.todaybg!=""))
{ place.style.background = config.macros.date.todaybg; }
}
//}}}
//{{{
function isToday(date) // returns true if date is today
{ var now=new Date(); return ((now-date>=0) && (now-date<86400000)); }
function isWeekend(date) // returns true if date is a weekend
{ return (config.macros.date.weekend[date.getDay()]); }
function isHoliday(date) // returns true if date is a holiday
{
var longHoliday = date.formatString("0MM/0DD/YYYY");
var shortHoliday = date.formatString("0MM/0DD");
for(var i = 0; i < config.macros.date.holidays.length; i++) {
var holiday=config.macros.date.holidays[i];
if (holiday==longHoliday||holiday==shortHoliday) return true;
}
return false;
}
//}}}
//{{{
// Event handler for clicking on a day popup
function onClickDatePopup(e)
{
if (!e) var e = window.event;
var theTarget = resolveTarget(e);
var popup = Popup.create(this);
if(popup) {
// always show dated tiddler link (or just date, if readOnly) at the top...
// if (!readOnly || store.tiddlerExists(this.date.formatString(this.linkformat)))
// createTiddlyLink(popup,this.date.formatString(this.linkformat),true);
//else
createTiddlyText(popup,this.date.formatString(this.linkformat));
//addCreatedsToPopup(popup,this.date,this.format);
//addModifiedsToPopup(popup,this.date,this.format);
addRemindersToPopup(popup,this.date,this.linkformat);
}
Popup.show(popup,false);
e.cancelBubble = true;
if (e.stopPropagation) e.stopPropagation();
return(false);
}
//}}}
//{{{
function indexCreateds() // build list of tiddlers, hash indexed by creation date
{
var createds= { };
var tiddlers = store.getTiddlers("title","excludeLists");
for (var t = 0; t < tiddlers.length; t++) {
var date = tiddlers[t].created.formatString("YYYY0MM0DD")
if (!createds[date])
createds[date]=new Array();
createds[date].push(tiddlers[t].title);
}
return createds;
}
function hasCreateds(date) // returns true if date has created tiddlers
{
if (!config.macros.date.createds) config.macros.date.createds=indexCreateds();
return (config.macros.date.createds[date.formatString("YYYY0MM0DD")]!=undefined);
}
function addCreatedsToPopup(popup,when,format)
{
var force=(store.isDirty() && when.formatString("YYYY0MM0DD")==new Date().formatString("YYYY0MM0DD"));
if (force || !config.macros.date.createds) config.macros.date.createds=indexCreateds();
var indent=String.fromCharCode(160)+String.fromCharCode(160);
var createds = config.macros.date.createds[when.formatString("YYYY0MM0DD")];
if (createds) {
createds.sort();
var e=createTiddlyElement(popup,"div",null,null,"created:");
for(var t=0; t<createds.length; t++) {
var link=createTiddlyLink(popup,createds[t],false);
link.appendChild(document.createTextNode(indent+createds[t]));
createTiddlyElement(popup,"br",null,null,null);
}
}
}
//}}}
//{{{
function indexModifieds() // build list of tiddlers, hash indexed by modification date
{
var modifieds= { };
var tiddlers = store.getTiddlers("title","excludeLists");
for (var t = 0; t < tiddlers.length; t++) {
var date = tiddlers[t].modified.formatString("YYYY0MM0DD")
if (!modifieds[date])
modifieds[date]=new Array();
modifieds[date].push(tiddlers[t].title);
}
return modifieds;
}
function hasModifieds(date) // returns true if date has modified tiddlers
{
if (!config.macros.date.modifieds) config.macros.date.modifieds = indexModifieds();
return (config.macros.date.modifieds[date.formatString("YYYY0MM0DD")]!=undefined);
}
function addModifiedsToPopup(popup,when,format)
{
var force=(store.isDirty() && when.formatString("YYYY0MM0DD")==new Date().formatString("YYYY0MM0DD"));
if (force || !config.macros.date.modifieds) config.macros.date.modifieds=indexModifieds();
var indent=String.fromCharCode(160)+String.fromCharCode(160);
var mods = config.macros.date.modifieds[when.formatString("YYYY0MM0DD")];
if (mods) {
mods.sort();
var e=createTiddlyElement(popup,"div",null,null,"changed:");
for(var t=0; t<mods.length; t++) {
var link=createTiddlyLink(popup,mods[t],false);
link.appendChild(document.createTextNode(indent+mods[t]));
createTiddlyElement(popup,"br",null,null,null);
}
}
}
//}}}
//{{{
function indexReminders(date,leadtime) // build list of tiddlers with reminders, hash indexed by reminder date
{
var reminders = { };
if(window.findTiddlersWithReminders!=undefined) { // reminder plugin is installed
// DEBUG var starttime=new Date();
var t = findTiddlersWithReminders(date, [0,leadtime], null, null, 1);
for(var i=0; i<t.length; i++) reminders[t[i].matchedDate]=true;
// DEBUG var out="Found "+t.length+" reminders in "+((new Date())-starttime+1)+"ms\n";
// DEBUG out+="startdate: "+date.toLocaleDateString()+"\n"+"leadtime: "+leadtime+" days\n\n";
// DEBUG for(var i=0; i<t.length; i++) { out+=t[i].matchedDate.toLocaleDateString()+" "+t[i].params.title+"\n"; }
// DEBUG alert(out);
}
return reminders;
}
function hasReminders(date) // returns true if date has reminders
{
if (window.reminderCacheForCalendar)
return window.reminderCacheForCalendar[date]; // use calendar cache
if (!config.macros.date.reminders)
config.macros.date.reminders = indexReminders(date,90); // create a 90-day leadtime reminder cache
return (config.macros.date.reminders[date]);
}
function addRemindersToPopup(popup,when,format)
{
if(window.findTiddlersWithReminders==undefined) return; // reminder plugin not installed
var indent = String.fromCharCode(160)+String.fromCharCode(160);
var reminders=findTiddlersWithReminders(when, [0,0],null,null,1);
var e=createTiddlyElement(popup,"div",null,null,(!reminders.length?" none":""));
for(var t=0; t<reminders.length; t++) {
link = createTiddlyLink(popup,reminders[t].tiddler,false);
var diff=reminders[t].diff;
diff=(diff<1)?"Today":((diff==1)?"Tomorrow":null);
var txt=(reminders[t].params["title"])?reminders[t].params["title"]:reminders[t].tiddler;
link.appendChild(document.createTextNode(indent+reminders[t].tiddler+" - "+txt));//Removed diff
createTiddlyElement(popup,"br",null,null,null);
}
return; // omit "new reminder..." link
var link = createTiddlyLink(popup,indent+"new reminder...",true); createTiddlyElement(popup,"br");
var title = when.formatString(format);
link.title="add a reminder to '"+title+"'";
link.onclick = function() {
// show tiddler editor
story.displayTiddler(null, title, 2, null, null, false, false);
// find body 'textarea'
var c =document.getElementById("tiddler" + title).getElementsByTagName("*");
for (var i=0; i<c.length; i++) if ((c[i].tagName.toLowerCase()=="textarea") && (c[i].getAttribute("edit")=="text")) break;
// append reminder macro to tiddler content
if (i<c.length) {
if (store.tiddlerExists(title)) c[i].value+="\n"; else c[i].value="";
c[i].value += "<<reminder";
c[i].value += " day:"+when.getDate();
c[i].value += " month:"+(when.getMonth()+1);
c[i].value += " year:"+when.getFullYear();
c[i].value += ' title:"Enter a title" >>';
}
};
}
//}}}
// // date plugin calendar colors
//{{{
config.macros.date.holidays=[ "01/01", "07/04", "07/24", "11/24" ]; // NewYearsDay, IndependenceDay(US), Eric's Birthday (hooray!), Thanksgiving(US)
config.macros.date.weekend=[ 1,0,0,0,0,0,1 ]; // day index values: sun=0, mon=1, tue=2, wed=3, thu=4, fri=5, sat=6
config.macros.date.format="YYYY.0MM.0DD"; // default date display format
config.macros.date.linkformat="YYYY.0MM.0DD"; // 'dated tiddler' link format
config.macros.date.weekendbg="#c0c0c0";
config.macros.date.holidaybg="#ffaace";
config.macros.date.createdbg="#bbeeff";
config.macros.date.modifiedsbg="#bbeeff";
config.macros.date.linkedbg="#babb1e";
config.macros.date.remindersbg="#c0ffee";
//}}}
!!![[Example Email Alert|http://whiterosesociety.googlegroups.com/web/ExampleEmail.rtf]]
!!![[Petition|http://uscampaignforburma.org/action/ChinaPetition%5B1%5D.pdf]]
!!![[Quick Facts About Burma|http://whiterosesociety.googlegroups.com/web/Quick+facts+about+BURMA%282%29.doc]]
!!![[Flyer|http://whiterosesociety.googlegroups.com/web/burma+flyer+w-out+STAND%283%29.pdf]]
!!![[Leaflets|http://whiterosesociety.googlegroups.com/web/handbillsw-outstand%282%29.pdf]]
For STAND Chapters Only:
!!![[STAND Flyer|http://let-your-voice-be-heard.googlegroups.com/web/handbills.pdf?gda=6LFHRT4AAACGOnk6ybcErOveCa6m90Qx1zib69TIYA43Ljef5yKQw2G1qiJ7UbTIup-M2XPURDSx8XsGjjtNJ3r_AKProAyz]]
!!![[STAND Leaflets|http://let-your-voice-be-heard.googlegroups.com/web/burma%20flyer.pdf?gda=5Zf_jEAAAACGOnk6ybcErOveCa6m90Qx1zib69TIYA43Ljef5yKQw2G1qiJ7UbTIup-M2XPURDTwSTkUo19fnKfGJliUEi01]]
<!--{{{-->
<div class='toolbar' macro='toolbar +saveTiddler -cancelTiddler deleteTiddler > fields syncing permalink references jump'></div>
<div class='title' macro='view title'></div>
<div class='subtitle'><span macro='view modifier link'></span>, <span macro='view modified date'></span>(<span macro='message views.wikified.createdPrompt'></span> <span macro='view created date'></span>)</div>
<div class='editor' macro='edit title'></div>
<div macro='annotations'></div>
<div class='editor' macro='edit text'></div>
<div class='editor' macro='edit tags'></div><div class='editorFooter'><span macro='message views.editor.tagPrompt'></span><span macro='tagChooser'></span></div>
<!--}}}-->
![[Calendar View|Calendar]]
<<showReminders tags:event leadtime:60 format:"|!|DATE|!|TIDDLER|!|TITLE|!|">>
Colin Lowenberg Copyright 2007.
!Topics <<newTiddler label:"Add" accessKey:n focus:title title:"Topic" tag:topic prompt:"Add a topic to the Forum page." text:"[[Forum]]
!Messages
Add your message here.">>
<<tiddlerList tags:"topic" order:"-modified" itemTemplate:"*%link\n">>
!Three easy things you can do to help.
Click each to get more details.
!!!<<option chk4>> [[Wear Red|Wear Red on Friday for Burma!]]
Have everyone on your campus wear red as a sign of solidarity with monks peacefully protesting in Burma. Organize a rally, speaker, silent march, candle light vigil, or hold a film screening on the Red Day. If there is a STAND chapter on your campus ask them if they want to make it a program.
!!!<<option chk2>> [[Sign the Petition|Petition]]
Collect as many signatures as you can on the petition to Chinese President Hu Jintao demanding China stop paralyzing UN Security Council action and use their leverage with Burma's military regime to stop the massacre inside Burma.
!!!<<option chk3>> [[Sign Up for the US Campaign for Burma Mailing List|Join]]
This Saturday, Oct 6, people all over the world are uniting to support the Burmese people struggling for freedom and democracy. There will be protests in over 35 countries. The protests will take place in front of Burmese and Chinese embassies. In America, there will be a protest at the Burmese embassy in DC, the Chinese embassy in DC, the UN building in NYC, and all 5 Chinese consulates throughout the country(Houston, Chicago, LA, SF, and NY). We need to tell the Chinese to stop preventing effective international action. If you have any questions please email us at info@studentsforburma.org.
<<reminder year:2007 month:10 day:6 title:"12:00 PM Noon, Everywhere" >>
!Ten Steps to become a Web "Master"
#Open the website using Mozilla Firefox! It should work in IE too, but it's not as good.
#Click ''options'' then ''edit'' in the bottom right corner. It will look a little different, don't freak.
#Type your name below. See where I added mine?
#Click ''done'' in the top right corner.
#Under ''Options >>'' enter your ''First name:''
#Enter the secret ''Password:''
#Click ''download'' and save it for a backup. Don't mess with it.
#Click ''save to web'' just above.
#Watch while the yellow thing does its thing.
#Smile when it says ''Main TiddlyWiki file uploaded''
!Congratulations you are a badass! Now click [[Agenda]].
You can view the Agenda, Add News, Add Events, Add Movies, Add Speakers. Just click.
!Help on Formatting
[>img[http://profile.ak.facebook.com/object2/381/19/n5581857658_535.jpg]] Make an image appear using {{{[>img[http://website.com/image.jpg]] }}}
[[Link|www.thewhiterosesociety.org]] Add a link with {{{[[[Link|www.thewhiterosesociety.org]] }}}
[[Another Page]] Add or link to another page with {{{[[Another Page]]}}}
*Asterisks do this.
>Greater than signs > do this.
#Pound signs # do this.
!Exclamation marks ! do this.
!!Two Exclamations !!
!!!Three... !!! weeee
''Almost forgot do this {{{''words''}}} for bold''
I AM a Web "Master":
*Colin
Welcome to the new White Rose Society website.
![[Subscribe to our Society newsletter.|http://lists.thewhiterosesociety.org/listinfo.cgi/list-thewhiterosesociety.org]]
Signing up for our list serve automatically makes you a member of the White Rose Society. We will email you a newsletter once a week and remind you about events, updates on Darfur, and how you can help.
![[Sign our Petition to Divest from Sudan.|http://www.gopetition.com/petitions/stop-the-genocide-in-darfur-2.html]]
Our tuition is being invested in companies that benefit financially from genocide in Darfur by supporting the Government of Sudan. Add your name to the growing list of students who want the University of Texas Investment Company to follow the action of the State Legislature.
/***
|Name|ImportTiddlersPlugin|
|Source|http://www.TiddlyTools.com/#ImportTiddlersPlugin|
|Version|3.5.5|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <<br>>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|plugin|
|Requires||
|Overrides|config.macros.importTiddlers.handler|
|Description|interactive controls for import/export with filtering.|
When many people share and edit copies of the same TiddlyWiki document, the ability to quickly collect all these changes back into a single, updated document that can then be redistributed to the entire group is very important. It can also be very extremely helpful when moving your own tiddlers from document to document (e.g., when upgrading to the latest version of TiddlyWiki, or 'pre-loading' your favorite stylesheets into a new 'empty' TiddlyWiki document.)
This plugin lets you selectively combine tiddlers from any two TiddlyWiki documents. An interactive control panel lets you pick a document to import from, and then select which tiddlers to import, with prompting for skip, rename, merge or replace actions when importing tiddlers that match existing titles. Automatically add tags to imported tiddlers so they are easy to find later on. Generates a detailed report of import 'history' in ImportedTiddlers.
!!!!!Usage
<<<
{{{<<importTiddlers>>}}} or {{{<<importTiddlers core>>}}}
invokes the built-in importTiddlers macro (TW2.1.x+). If installed in documents using TW2.0.x or earlier, fallback is to use 'link' display (see below)
{{{<<importTiddlers link label tooltip>>}}}
The ''link'' keyword creates an "import tiddlers" link that when clicked to show/hide import control panel. ''label'' and ''tooltip'' are optional text parameters (enclosed in quotes or {{{[[...]]}}}, and allow you to override the default display text for the link and the mouseover help text, respectively.
{{{<<importTiddlers inline>>}}}
creates import control panel directly in tiddler content
<<importTiddlers inline>>
Press ''[browse]'' to select a TiddlyWiki document file to import, and then press ''[open]''. Alternatively, you can type in the path/filename or a remote document URL (starting with http://). When you have entered the desired source location, press ''[load]'' to retrieve the tiddlers from the remote source. //Note: There may be some delay to permit the browser time to access and load the document before updating the listbox with the titles of all tiddlers that are available to be imported.//
Select one or more titles from the listbox (hold CTRL or SHIFT while clicking to add/remove the highlight from individual list items). You can press ''[select all]'' to quickly highlight all tiddler titles in the list. Use the ''[-]'', ''[+]'', or ''[=]'' links to adjust the listbox size so you can view more (or less) tiddler titles at one time. When you have chosen the tiddlers you want to import and entered any extra tags, press ''[import]'' to begin copying them to the current TiddlyWiki document.
''select: all, new, changes, or differences''
You can click on ''all'', ''new'', ''changes'', or ''differences'' to automatically select a subset of tiddlers from the list. This makes it very quick and easy to find and import just the updated tiddlers you are interested in:
>''"all"'' selects ALL tiddlers from the import source document, even if they have not been changed.
>''"new"'' selects only tiddlers that are found in the import source document, but do not yet exist in the destination document
>''"changes"'' selects only tiddlers that exist in both documents but that are newer in the source document
>''"differences"'' selects all new and existing tiddlers that are different from the destination document (even if destination tiddler is newer)
''Import Tagging:''
Tiddlers that have been imported can be automatically tagged, so they will be easier to find later on, after they have been added to your document. New tags are entered into the "add tags" input field, and then //added// to the existing tags for each tiddler as it is imported.
''Skip, Rename, Merge, or Replace:''
When importing a tiddler whose title is identical to one that already exists, the import process pauses and the tiddler title is displayed in an input field, along with four push buttons: ''[skip]'', ''[rename]'', ''[merge]'' and ''[replace]''.
To bypass importing this tiddler, press ''[skip]''. To import the tiddler with a different name (so that both the tiddlers will exist when the import is done), enter a new title in the input field and then press ''[rename]''. Press ''[merge]'' to combine the content from both tiddlers into a single tiddler. Press ''[replace]'' to overwrite the existing tiddler with the imported one, discarding the previous tiddler content.
//Note: if both the title ''and'' modification date/////time match, the imported tiddler is assumed to be identical to the existing one, and will be automatically skipped (i.e., not imported) without asking.//
''Import Report History''
When tiddlers are imported, a report is generated into ImportedTiddlers, indicating when the latest import was performed, the number of tiddlers successfully imported, from what location, and by whom. It also includes a list with the title, date and author of each tiddler that was imported.
When the import process is completed, the ImportedTiddlers report is automatically displayed for your review. If more tiddlers are subsequently imported, a new report is //added// to ImportedTiddlers, above the previous report (i.e., at the top of the tiddler), so that a reverse-chronological history of imports is maintained.
If a cumulative record is not desired, the ImportedTiddlers report may be deleted at any time. A new ImportedTiddlers report will be created the next time tiddlers are imported.
Note: You can prevent the ImportedTiddlers report from being generated for any given import activity by clearing the "create a report" checkbox before beginning the import processing.
<<<
!!!!!Installation
<<<
copy/paste the following tiddlers into your document:
''ImportTiddlersPlugin''
''ImportTiddlersPluginPatch2.1.x'' (only for installation in TW2.1.x or earlier)
(both tagged with <<tag systemConfig>>)
>Important Notes:
>* As of 6/27/2007, "patch" functions that provide backward-compatibility with TW2.1.x and earlier have been split into a separate [[ImportTiddlersPluginPatch2.1.x]] tiddler to reduce installation overhead for //this// plugin. You only need to install this additional plugin tiddler when using ImportTiddlersPlugin in documents using TW2.1.x or earlier.
>* As of 3/21/2007, the interactive {{{<<importTiddlers>>}}} and non-interactive {{{<<loadTiddlers>>}}} macro definitions and related code have been split into separate [[ImportTiddlersPlugin]] and [[LoadTiddlersPlugin]] to permit selective installation of either the interactive and/or non-interactive macro functions
''Quick Installation Tip #1:''
If you are using an unmodified version of TiddlyWiki (core release version <<version>>), you can get a new, empty TiddlyWiki with the Import Tiddlers plugin pre-installed (''[[download from here|TW+ImportExport.html]]''), and then simply import all your content from your old document into this new, empty document.
<<<
!!!!!Revision History
<<<
''2007.06.27 [3.5.5]'' added missing 'fields' params to saveTiddler() calls. Fixes problem where importing tiddlers would lose the custom fields. Also, moved functions for backward-compatibility with TW2.1.x to separate [[ImportTiddlersPluginPatch2.1.x]] tiddler, reducing the size of //this// plugin tiddler by a significant amount.
''2007.06.25 [3.5.4]'' added calls to store.suspendNotifications() and store.resumeNotifications(). Eliminates redisplay processing overhead DURING import activities
|please see [[ImportTiddlersPluginHistory]] for additional revision details|
''2005.07.20 [1.0.0]'' Initial Release
<<<
!!!!!Credits
<<<
This feature was developed by EricShulman from [[ELS Design Studios|http:/www.elsdesign.com]]
<<<
!!!!!Code
***/
// // ''MACRO DEFINITION''
//{{{
// Version
version.extensions.importTiddlers = {major: 3, minor: 5, revision: 5, date: new Date(2007,6,27)};
// IE needs explicit global scoping for functions/vars called from browser events
window.onClickImportButton=onClickImportButton;
window.refreshImportList=refreshImportList;
// default cookie/option values
if (!config.options.chkImportReport) config.options.chkImportReport=true;
merge(config.macros.importTiddlers,{
label: "import tiddlers",
prompt: "Copy tiddlers from another document",
openMsg: "Opening %0",
openErrMsg: "Could not open %0 - error=%1",
readMsg: "Read %0 bytes from %1",
foundMsg: "Found %0 tiddlers in %1",
countMsg: "%0 tiddlers selected for import",
importedMsg: "Imported %0 of %1 tiddlers from %2",
loadText: "please load a document...",
closeText: "close", // text for close button when remote file is loaded
doneText: "done", // text for close button when remote file is not loaded
src: "", // path/filename or URL of document to import (retrieved from SiteUrl tiddler)
proxy: "", // URL for remote proxy script (retrieved from SiteProxy tiddler)
useProxy: false, // use specific proxy script in front of remote URL
inbound: null, // hash-indexed array of tiddlers from other document
newTags: "", // text of tags added to imported tiddlers
addTags: true, // add new tags to imported tiddlers
listsize: 8, // # of lines to show in imported tiddler list
importTags: true, // include tags from remote source document when importing a tiddler
keepTags: true, // retain existing tags when replacing a tiddler
index: 0, // current processing index in import list
sort: "" // sort order for imported tiddler listbox
});
if (config.macros.importTiddlers.coreHandler==undefined)
config.macros.importTiddlers.coreHandler=config.macros.importTiddlers.handler; // save built-in handler
config.macros.importTiddlers.handler = function(place,macroName,params,wikifier,paramString,tiddler) {
if (!params[0] || params[0].toLowerCase()=='core') { // default to built in
if (config.macros.importTiddlers.coreHandler)
config.macros.importTiddlers.coreHandler.apply(this,arguments);
else
createTiddlyButton(place,this.label,this.prompt,onClickImportMenu);
}
else if (params[0]=='link') { // show link to floating panel
var label=params[1]?params[1]:this.label;
var prompt=params[2]?params[2]:this.prompt;
createTiddlyButton(place,label,prompt,onClickImportMenu);
}
else if (params[0]=='inline') {// show panel as INLINE tiddler content
createImportPanel(place);
document.getElementById("importPanel").style.position="static";
document.getElementById("importPanel").style.display="block";
}
else if (config.macros.loadTiddlers)
config.macros.loadTiddlers.handler(place,macroName,params); // any other params: loadtiddlers
}
//}}}
// // ''INTERFACE DEFINITION''
// // Handle link click to create/show/hide control panel
//{{{
function onClickImportMenu(e)
{
if (!e) var e = window.event;
var parent=resolveTarget(e).parentNode;
var panel = document.getElementById("importPanel");
if (panel==undefined || panel.parentNode!=parent)
panel=createImportPanel(parent);
var isOpen = panel.style.display=="block";
if(config.options.chkAnimate)
anim.startAnimating(new Slider(panel,!isOpen,e.shiftKey || e.altKey,"none"));
else
panel.style.display = isOpen ? "none" : "block" ;
e.cancelBubble = true;
if (e.stopPropagation) e.stopPropagation();
return(false);
}
//}}}
// // Create control panel: HTML, CSS
//{{{
function createImportPanel(place) {
var panel=document.getElementById("importPanel");
if (panel) { panel.parentNode.removeChild(panel); }
setStylesheet(config.macros.importTiddlers.css,"importTiddlers");
panel=createTiddlyElement(place,"span","importPanel",null,null)
panel.innerHTML=config.macros.importTiddlers.html;
refreshImportList();
var siteURL=store.getTiddlerText("SiteUrl"); if (!siteURL) siteURL="";
document.getElementById("importSourceURL").value=siteURL;
config.macros.importTiddlers.src=siteURL;
var siteProxy=store.getTiddlerText("SiteProxy"); if (!siteProxy) siteProxy="SiteProxy";
document.getElementById("importSiteProxy").value=siteProxy;
config.macros.importTiddlers.proxy=siteProxy;
return panel;
}
//}}}
// // CSS
//{{{
config.macros.importTiddlers.css = '\
#importPanel {\
display: none; position:absolute; z-index:11; width:35em; right:105%; top:3em;\
background-color: #eee; color:#000; font-size: 8pt; line-height:110%;\
border:1px solid black; border-bottom-width: 3px; border-right-width: 3px;\
padding: 0.5em; margin:0em; -moz-border-radius:1em;\
}\
#importPanel a, #importPanel td a { color:#009; display:inline; margin:0px; padding:1px; }\
#importPanel table { width:100%; border:0px; padding:0px; margin:0px; font-size:8pt; line-height:110%; background:transparent; }\
#importPanel tr { border:0px;padding:0px;margin:0px; background:transparent; }\
#importPanel td { color:#000; border:0px;padding:0px;margin:0px; background:transparent; }\
#importPanel select { width:98%;margin:0px;font-size:8pt;line-height:110%;}\
#importPanel input { width:98%;padding:0px;margin:0px;font-size:8pt;line-height:110%}\
#importPanel .box { border:1px solid black; padding:3px; margin-bottom:5px; background:#f8f8f8; -moz-border-radius:5px;}\
#importPanel .topline { border-top:2px solid black; padding-top:3px; margin-bottom:5px; }\
#importPanel .rad { width:auto; }\
#importPanel .chk { width:auto; margin:1px;border:0; }\
#importPanel .btn { width:auto; }\
#importPanel .btn1 { width:98%; }\
#importPanel .btn2 { width:48%; }\
#importPanel .btn3 { width:32%; }\
#importPanel .btn4 { width:24%; }\
#importPanel .btn5 { width:19%; }\
#importPanel .importButton { padding: 0em; margin: 0px; font-size:8pt; }\
#importPanel .importListButton { padding:0em 0.25em 0em 0.25em; color: #000000; display:inline }\
#importCollisionPanel { display:none; margin:0.5em 0em 0em 0em; }\
';
//}}}
// // HTML
//{{{
config.macros.importTiddlers.html = '\
<!-- source and report -->\
<table><tr><td align=left>\
import from\
<input type="radio" class="rad" name="importFrom" id="importFromFile" value="file" CHECKED\
onClick="document.getElementById(\'importLocalPanel\').style.display=this.checked?\'block\':\'none\';\
document.getElementById(\'importHTTPPanel\').style.display=!this.checked?\'block\':\'none\'"> local file\
<input type="radio" class="rad" name="importFrom" id="importFromWeb" value="http"\
onClick="document.getElementById(\'importLocalPanel\').style.display=!this.checked?\'block\':\'none\';\
document.getElementById(\'importHTTPPanel\').style.display=this.checked?\'block\':\'none\'"> web server\
</td><td align=right>\
<input type=checkbox class="chk" id="chkImportReport" checked\
onClick="config.options[\'chkImportReport\']=this.checked;"> create a report\
</td></tr></table>\
<!-- import from local file -->\
<div id="importLocalPanel" style="display:block;margin-bottom:5px;margin-top:5px;padding-top:3px;border-top:1px solid #999">\
local document path/filename:<br>\
<input type="file" id="fileImportSource" size=57 style="width:100%"\
onKeyUp="config.macros.importTiddlers.src=this.value"\
onChange="config.macros.importTiddlers.src=this.value;">\
</div><!--panel-->\
\
<!-- import from http server -->\
<div id="importHTTPPanel" style="display:none;margin-bottom:5px;margin-top:5px;padding-top:3px;border-top:1px solid #999">\
<table><tr><td align=left>\
remote document URL:<br>\
</td><td align=right>\
<input type="checkbox" class="chk" id="importUseProxy"\
onClick="config.macros.importTiddlers.useProxy=this.checked;\
document.getElementById(\'importSiteProxy\').style.display=this.checked?\'block\':\'none\'"> use a proxy script\
</td></tr></table>\
<input type="text" id="importSiteProxy" style="display:none;margin-bottom:1px" onfocus="this.select()" value="SiteProxy"\
onKeyUp="config.macros.importTiddlers.proxy=this.value"\
onChange="config.macros.importTiddlers.proxy=this.value;">\
<input type="text" id="importSourceURL" onfocus="this.select()" value="SiteUrl"\
onKeyUp="config.macros.importTiddlers.src=this.value"\
onChange="config.macros.importTiddlers.src=this.value;">\
</div><!--panel-->\
\
<table><tr><td align=left>\
select:\
<a href="JavaScript:;" id="importSelectAll"\
onclick="onClickImportButton(this)" title="select all tiddlers">\
all </a>\
<a href="JavaScript:;" id="importSelectNew"\
onclick="onClickImportButton(this)" title="select tiddlers not already in destination document">\
added </a> \
<a href="JavaScript:;" id="importSelectChanges"\
onclick="onClickImportButton(this)" title="select tiddlers that have been updated in source document">\
changes </a> \
<a href="JavaScript:;" id="importSelectDifferences"\
onclick="onClickImportButton(this)" title="select tiddlers that have been added or are different from existing tiddlers">\
differences </a> \
<a href="JavaScript:;" id="importToggleFilter"\
onclick="onClickImportButton(this)" title="show/hide selection filter">\
filter </a> \
</td><td align=right>\
<a href="JavaScript:;" id="importListSmaller"\
onclick="onClickImportButton(this)" title="reduce list size">\
– </a>\
<a href="JavaScript:;" id="importListLarger"\
onclick="onClickImportButton(this)" title="increase list size">\
+ </a>\
<a href="JavaScript:;" id="importListMaximize"\
onclick="onClickImportButton(this)" title="maximize/restore list size">\
= </a>\
</td></tr></table>\
<select id="importList" size=8 multiple\
onchange="setTimeout(\'refreshImportList(\'+this.selectedIndex+\')\',1)">\
<!-- NOTE: delay refresh so list is updated AFTER onchange event is handled -->\
</select>\
<input type=checkbox class="chk" id="chkAddTags" checked\
onClick="config.macros.importTiddlers.addTags=this.checked;">add new tags \
<input type=checkbox class="chk" id="chkImportTags" checked\
onClick="config.macros.importTiddlers.importTags=this.checked;">import source tags \
<input type=checkbox class="chk" id="chkKeepTags" checked\
onClick="config.macros.importTiddlers.keepTags=this.checked;">keep existing tags<br>\
<input type=text id="txtNewTags" size=15 onKeyUp="config.macros.importTiddlers.newTags=this.value" autocomplete=off>\
<div align=center>\
<input type=button id="importLoad" class="importButton" style="width:32%" value="load"\
title="load listbox with tiddlers from source document"\
onclick="onClickImportButton(this)">\
<input type=button id="importStart" class="importButton" style="width:32%" value="import"\
title="add selected source tiddlers to the current document"\
onclick="onClickImportButton(this)">\
<input type=button id="importClose" class="importButton" style="width:32%" value="close"\
title="clear listbox or hide control panel"\
onclick="onClickImportButton(this)">\
</div>\
<div id="importCollisionPanel">\
tiddler already exists:\
<input type=text id="importNewTitle" size=15 autocomplete=off">\
<div align=center>\
<input type=button id="importSkip" class="importButton" style="width:23%" value="skip"\
title="do not import this tiddler"\
onclick="onClickImportButton(this)">\
<input type=button id="importRename" class="importButton" style="width:23%" value="rename"\
title="rename the incoming tiddler"\
onclick="onClickImportButton(this)">\
<input type=button id="importMerge" class="importButton" style="width:23%" value="merge"\
title="append the incoming tiddler to the existing tiddler"\
onclick="onClickImportButton(this)">\
<input type=button id="importReplace" class="importButton" style="width:23%" value="replace"\
title="discard the existing tiddler"\
onclick="onClickImportButton(this)">\
</div>\
</div>\
';
//}}}
// // Control interactions
//{{{
function onClickImportButton(which)
{
// DEBUG alert(which.id);
var theList = document.getElementById('importList');
if (!theList) return;
var thePanel = document.getElementById('importPanel');
var theCollisionPanel = document.getElementById('importCollisionPanel');
var theNewTitle = document.getElementById('importNewTitle');
var count=0;
switch (which.id)
{
case 'fileImportSource':
case 'importLoad': // load import source into hidden frame
importReport(); // if an import was in progress, generate a report
config.macros.importTiddlers.inbound=null; // clear the imported tiddler buffer
refreshImportList(); // reset/resize the listbox
if (config.macros.importTiddlers.src=="") break;
// Load document, read it's DOM and fill the list
config.macros.importTiddlers.loadRemoteFile(config.macros.importTiddlers.src,
function(success,params,txt,src,xhr) {
var src=src.replace(/%20/g," ");
if (!success) { displayMessage(config.macros.importTiddlers.openErrMsg.format([src,xhr.status])); return; }
var tiddlers = config.macros.importTiddlers.readTiddlersFromHTML(txt);
var count=tiddlers?tiddlers.length:0;
var querypos=src.lastIndexOf("?"); if (querypos!=-1) src=src.substr(0,querypos);
displayMessage(config.macros.importTiddlers.foundMsg.format([count,src]));
config.macros.importTiddlers.inbound=tiddlers;
window.refreshImportList(0);
});
break;
case 'importSelectAll': // select all tiddler list items (i.e., not headings)
importReport(); // if an import was in progress, generate a report
for (var t=0,count=0; t < theList.options.length; t++) {
if (theList.options[t].value=="") continue;
theList.options[t].selected=true;
count++;
}
clearMessage(); displayMessage(config.macros.importTiddlers.countMsg.format([count]));
break;
case 'importSelectNew': // select tiddlers not in current document
importReport(); // if an import was in progress, generate a report
for (var t=0,count=0; t < theList.options.length; t++) {
theList.options[t].selected=false;
if (theList.options[t].value=="") continue;
theList.options[t].selected=!store.tiddlerExists(theList.options[t].value);
count+=theList.options[t].selected?1:0;
}
clearMessage(); displayMessage(config.macros.importTiddlers.countMsg.format([count]));
break;
case 'importSelectChanges': // select tiddlers that are updated from existing tiddlers
importReport(); // if an import was in progress, generate a report
for (var t=0,count=0; t < theList.options.length; t++) {
theList.options[t].selected=false;
if (theList.options[t].value==""||!store.tiddlerExists(theList.options[t].value)) continue;
for (var i=0; i<config.macros.importTiddlers.inbound.length; i++) // find matching inbound tiddler
{ var inbound=config.macros.importTiddlers.inbound[i]; if (inbound.title==theList.options[t].value) break; }
theList.options[t].selected=(inbound.modified-store.getTiddler(theList.options[t].value).modified>0); // updated tiddler
count+=theList.options[t].selected?1:0;
}
clearMessage(); displayMessage(config.macros.importTiddlers.countMsg.format([count]));
break;
case 'importSelectDifferences': // select tiddlers that are new or different from existing tiddlers
importReport(); // if an import was in progress, generate a report
for (var t=0,count=0; t < theList.options.length; t++) {
theList.options[t].selected=false;
if (theList.options[t].value=="") continue;
if (!store.tiddlerExists(theList.options[t].value)) { theList.options[t].selected=true; count++; continue; }
for (var i=0; i<config.macros.importTiddlers.inbound.length; i++) // find matching inbound tiddler
{ var inbound=config.macros.importTiddlers.inbound[i]; if (inbound.title==theList.options[t].value) break; }
theList.options[t].selected=(inbound.modified-store.getTiddler(theList.options[t].value).modified!=0); // changed tiddler
count+=theList.options[t].selected?1:0;
}
clearMessage(); displayMessage(config.macros.importTiddlers.countMsg.format([count]));
break;
case 'importToggleFilter': // show/hide filter
case 'importFilter': // apply filter
alert("coming soon!");
break;
case 'importStart': // initiate the import processing
importReport(); // if an import was in progress, generate a report
config.macros.importTiddlers.index=0;
config.macros.importTiddlers.index=importTiddlers(0);
importStopped();
break;
case 'importClose': // unload imported tiddlers or hide the import control panel
// if imported tiddlers not loaded, close the import control panel
if (!config.macros.importTiddlers.inbound) { thePanel.style.display='none'; break; }
importReport(); // if an import was in progress, generate a report
config.macros.importTiddlers.inbound=null; // clear the imported tiddler buffer
refreshImportList(); // reset/resize the listbox
break;
case 'importSkip': // don't import the tiddler
var theItem = theList.options[config.macros.importTiddlers.index];
for (var j=0;j<config.macros.importTiddlers.inbound.length;j++)
if (config.macros.importTiddlers.inbound[j].title==theItem.value) break;
var theImported = config.macros.importTiddlers.inbound[j];
theImported.status='skipped after asking'; // mark item as skipped
theCollisionPanel.style.display='none';
config.macros.importTiddlers.index=importTiddlers(config.macros.importTiddlers.index+1); // resume with NEXT item
importStopped();
break;
case 'importRename': // change name of imported tiddler
var theItem = theList.options[config.macros.importTiddlers.index];
for (var j=0;j<config.macros.importTiddlers.inbound.length;j++)
if (config.macros.importTiddlers.inbound[j].title==theItem.value) break;
var theImported = config.macros.importTiddlers.inbound[j];
theImported.status = 'renamed from '+theImported.title; // mark item as renamed
theImported.set(theNewTitle.value,null,null,null,null); // change the tiddler title
theItem.value = theNewTitle.value; // change the listbox item text
theItem.text = theNewTitle.value; // change the listbox item text
theCollisionPanel.style.display='none';
config.macros.importTiddlers.index=importTiddlers(config.macros.importTiddlers.index); // resume with THIS item
importStopped();
break;
case 'importMerge': // join existing and imported tiddler content
var theItem = theList.options[config.macros.importTiddlers.index];
for (var j=0;j<config.macros.importTiddlers.inbound.length;j++)
if (config.macros.importTiddlers.inbound[j].title==theItem.value) break;
var theImported = config.macros.importTiddlers.inbound[j];
var theExisting = store.getTiddler(theItem.value);
var theText = theExisting.text+'\n----\n^^merged from: ';
theText +='[['+config.macros.importTiddlers.src+'#'+theItem.value+'|'+config.macros.importTiddlers.src+'#'+theItem.value+']]^^\n';
theText +='^^'+theImported.modified.toLocaleString()+' by '+theImported.modifier+'^^\n'+theImported.text;
var theDate = new Date();
var theTags = theExisting.getTags()+' '+theImported.getTags();
theImported.set(null,theText,null,theDate,theTags);
theImported.status = 'merged with '+theExisting.title; // mark item as merged
theImported.status += ' - '+theExisting.modified.formatString("MM/DD/YYYY 0hh:0mm:0ss");
theImported.status += ' by '+theExisting.modifier;
theCollisionPanel.style.display='none';
config.macros.importTiddlers.index=importTiddlers(config.macros.importTiddlers.index); // resume with this item
importStopped();
break;
case 'importReplace': // substitute imported tiddler for existing tiddler
var theItem = theList.options[config.macros.importTiddlers.index];
for (var j=0;j<config.macros.importTiddlers.inbound.length;j++)
if (config.macros.importTiddlers.inbound[j].title==theItem.value) break;
var theImported = config.macros.importTiddlers.inbound[j];
var theExisting = store.getTiddler(theItem.value);
theImported.status = 'replaces '+theExisting.title; // mark item for replace
theImported.status += ' - '+theExisting.modified.formatString("MM/DD/YYYY 0hh:0mm:0ss");
theImported.status += ' by '+theExisting.modifier;
theCollisionPanel.style.display='none';
config.macros.importTiddlers.index=importTiddlers(config.macros.importTiddlers.index); // resume with THIS item
importStopped();
break;
case 'importListSmaller': // decrease current listbox size, minimum=5
if (theList.options.length==1) break;
theList.size-=(theList.size>5)?1:0;
config.macros.importTiddlers.listsize=theList.size;
break;
case 'importListLarger': // increase current listbox size, maximum=number of items in list
if (theList.options.length==1) break;
theList.size+=(theList.size<theList.options.length)?1:0;
config.macros.importTiddlers.listsize=theList.size;
break;
case 'importListMaximize': // toggle listbox size between current and maximum
if (theList.options.length==1) break;
theList.size=(theList.size==theList.options.length)?config.macros.importTiddlers.listsize:theList.options.length;
break;
}
}
//}}}
// // refresh listbox
//{{{
function refreshImportList(selectedIndex)
{
var theList = document.getElementById("importList");
if (!theList) return;
// if nothing to show, reset list content and size
if (!config.macros.importTiddlers.inbound)
{
while (theList.length > 0) { theList.options[0] = null; }
theList.options[0]=new Option(config.macros.importTiddlers.loadText,"",false,false);
theList.size=config.macros.importTiddlers.listsize;
document.getElementById('importLoad').disabled=false;
document.getElementById('fileImportSource').disabled=false;
document.getElementById('importFromFile').disabled=false;
document.getElementById('importFromWeb').disabled=false;
document.getElementById('importClose').value=config.macros.importTiddlers.closeText;
return;
}
// get the sort order
if (!selectedIndex) selectedIndex=0;
if (selectedIndex==0) config.macros.importTiddlers.sort='title'; // heading
if (selectedIndex==1) config.macros.importTiddlers.sort='title';
if (selectedIndex==2) config.macros.importTiddlers.sort='modified';
if (selectedIndex==3) config.macros.importTiddlers.sort='tags';
if (selectedIndex>3) {
// display selected tiddler count
for (var t=0,count=0; t < theList.options.length; t++) {
if (!theList.options[t].selected) continue;
if (theList.options[t].value!="")
count+=1;
else { // if heading is selected, deselect it, and then select and count all in section
theList.options[t].selected=false;
for ( t++; t<theList.options.length && theList.options[t].value!=""; t++) {
theList.options[t].selected=true;
count++;
}
}
}
clearMessage(); displayMessage(config.macros.importTiddlers.countMsg.format([count]));
return; // no refresh needed
}
// there are inbound tiddlers loaded... disable inapplicable controls...
document.getElementById('importLoad').disabled=true;
document.getElementById('fileImportSource').disabled=true;
document.getElementById('importFromFile').disabled=true;
document.getElementById('importFromWeb').disabled=true;
document.getElementById('importClose').value=config.macros.importTiddlers.doneText;
// get the alphasorted list of tiddlers (optionally, filter out unchanged tiddlers)
var tiddlers=config.macros.importTiddlers.inbound;
tiddlers.sort(function (a,b) {if(a['title'] == b['title']) return(0); else return (a['title'] < b['title']) ? -1 : +1; });
// clear current list contents
while (theList.length > 0) { theList.options[0] = null; }
// add heading and control items to list
var i=0;
var indent=String.fromCharCode(160)+String.fromCharCode(160);
theList.options[i++]=new Option(tiddlers.length+' tiddler'+((tiddlers.length!=1)?'s are':' is')+' in the document',"",false,false);
theList.options[i++]=new Option(((config.macros.importTiddlers.sort=="title" )?">":indent)+' [by title]',"",false,false);
theList.options[i++]=new Option(((config.macros.importTiddlers.sort=="modified")?">":indent)+' [by date]',"",false,false);
theList.options[i++]=new Option(((config.macros.importTiddlers.sort=="tags")?">":indent)+' [by tags]',"",false,false);
// output the tiddler list
switch(config.macros.importTiddlers.sort)
{
case "title":
for(var t = 0; t < tiddlers.length; t++)
theList.options[i++] = new Option(tiddlers[t].title,tiddlers[t].title,false,false);
break;
case "modified":
// sort descending for newest date first
tiddlers.sort(function (a,b) {if(a['modified'] == b['modified']) return(0); else return (a['modified'] > b['modified']) ? -1 : +1; });
var lastSection = "";
for(var t = 0; t < tiddlers.length; t++) {
var tiddler = tiddlers[t];
var theSection = tiddler.modified.toLocaleDateString();
if (theSection != lastSection) {
theList.options[i++] = new Option(theSection,"",false,false);
lastSection = theSection;
}
theList.options[i++] = new Option(indent+indent+tiddler.title,tiddler.title,false,false);
}
break;
case "tags":
var theTitles = {}; // all tiddler titles, hash indexed by tag value
var theTags = new Array();
for(var t=0; t<tiddlers.length; t++) {
var title=tiddlers[t].title;
var tags=tiddlers[t].tags;
if (!tags || !tags.length) {
if (theTitles["untagged"]==undefined) { theTags.push("untagged"); theTitles["untagged"]=new Array(); }
theTitles["untagged"].push(title);
}
else for(var s=0; s<tags.length; s++) {
if (theTitles[tags[s]]==undefined) { theTags.push(tags[s]); theTitles[tags[s]]=new Array(); }
theTitles[tags[s]].push(title);
}
}
theTags.sort();
for(var tagindex=0; tagindex<theTags.length; tagindex++) {
var theTag=theTags[tagindex];
theList.options[i++]=new Option(theTag,"",false,false);
for(var t=0; t<theTitles[theTag].length; t++)
theList.options[i++]=new Option(indent+indent+theTitles[theTag][t],theTitles[theTag][t],false,false);
}
break;
}
theList.selectedIndex=selectedIndex; // select current control item
if (theList.size<config.macros.importTiddlers.listsize) theList.size=config.macros.importTiddlers.listsize;
if (theList.size>theList.options.length) theList.size=theList.options.length;
}
//}}}
// // re-entrant processing for handling import with interactive collision prompting
//{{{
function importTiddlers(startIndex)
{
if (!config.macros.importTiddlers.inbound) return -1;
var theList = document.getElementById('importList');
if (!theList) return;
var t;
// if starting new import, reset import status flags
if (startIndex==0)
for (var t=0;t<config.macros.importTiddlers.inbound.length;t++)
config.macros.importTiddlers.inbound[t].status="";
for (var i=startIndex; i<theList.options.length; i++)
{
// if list item is not selected or is a heading (i.e., has no value), skip it
if ((!theList.options[i].selected) || ((t=theList.options[i].value)==""))
continue;
for (var j=0;j<config.macros.importTiddlers.inbound.length;j++)
if (config.macros.importTiddlers.inbound[j].title==t) break;
var inbound = config.macros.importTiddlers.inbound[j];
var theExisting = store.getTiddler(inbound.title);
// avoid redundant import for tiddlers that are listed multiple times (when 'by tags')
if (inbound.status=="added")
continue;
// don't import the "ImportedTiddlers" history from the other document...
if (inbound.title=='ImportedTiddlers')
continue;
// if tiddler exists and import not marked for replace or merge, stop importing
if (theExisting && (inbound.status.substr(0,7)!="replace") && (inbound.status.substr(0,5)!="merge"))
return i;
// assemble tags (remote + existing + added)
var newTags = "";
if (config.macros.importTiddlers.importTags)
newTags+=inbound.getTags() // import remote tags
if (config.macros.importTiddlers.keepTags && theExisting)
newTags+=" "+theExisting.getTags(); // keep existing tags
if (config.macros.importTiddlers.addTags && config.macros.importTiddlers.newTags.trim().length)
newTags+=" "+config.macros.importTiddlers.newTags; // add new tags
inbound.set(null,null,null,null,newTags.trim());
// set the status to 'added' (if not already set by the 'ask the user' UI)
inbound.status=(inbound.status=="")?'added':inbound.status;
// do the import!
store.suspendNotifications();
store.saveTiddler(inbound.title, inbound.title, inbound.text, inbound.modifier, inbound.modified, inbound.tags, inbound.fields, true, inbound.created);
store.fetchTiddler(inbound.title).created = inbound.created; // force creation date to imported value (needed for TW2.1.x and earlier)
store.resumeNotifications();
}
return(-1); // signals that we really finished the entire list
}
//}}}
//{{{
function importStopped()
{
var theList = document.getElementById('importList');
var theNewTitle = document.getElementById('importNewTitle');
if (!theList) return;
if (config.macros.importTiddlers.index==-1)
importReport(); // import finished... generate the report
else
{
// import collision... show the collision panel and set the title edit field
document.getElementById('importCollisionPanel').style.display='block';
theNewTitle.value=theList.options[config.macros.importTiddlers.index].value;
}
}
//}}}
// // ''REPORT GENERATOR''
//{{{
function importReport(quiet)
{
if (!config.macros.importTiddlers.inbound) return;
// DEBUG alert('importReport: start');
// if import was not completed, the collision panel will still be open... close it now.
var panel=document.getElementById('importCollisionPanel'); if (panel) panel.style.display='none';
// get the alphasorted list of tiddlers
var tiddlers = config.macros.importTiddlers.inbound;
// gather the statistics
var count=0;
for (var t=0; t<tiddlers.length; t++)
if (tiddlers[t].status && tiddlers[t].status.trim().length && tiddlers[t].status.substr(0,7)!="skipped") count++;
// generate a report
if (count && config.options.chkImportReport) {
// get/create the report tiddler
var theReport = store.getTiddler('ImportedTiddlers');
if (!theReport) { theReport= new Tiddler(); theReport.title = 'ImportedTiddlers'; theReport.text = ""; }
// format the report content
var now = new Date();
var newText = "On "+now.toLocaleString()+", "+config.options.txtUserName
newText +=" imported "+count+" tiddler"+(count==1?"":"s")+" from\n[["+config.macros.importTiddlers.src+"|"+config.macros.importTiddlers.src+"]]:\n";
if (config.macros.importTiddlers.addTags && config.macros.importTiddlers.newTags.trim().length)
newText += "imported tiddlers were tagged with: \""+config.macros.importTiddlers.newTags+"\"\n";
newText += "<<<\n";
for (var t=0; t<tiddlers.length; t++) if (tiddlers[t].status) newText += "#[["+tiddlers[t].title+"]] - "+tiddlers[t].status+"\n";
newText += "<<<\n";
// update the ImportedTiddlers content and show the tiddler
theReport.text = newText+((theReport.text!="")?'\n----\n':"")+theReport.text;
theReport.modifier = config.options.txtUserName;
theReport.modified = new Date();
store.saveTiddler(theReport.title, theReport.title, theReport.text, theReport.modifier, theReport.modified, theReport.tags, theReport.fields);
if (!quiet) { story.displayTiddler(null,theReport.title,1,null,null,false); story.refreshTiddler(theReport.title,1,true); }
}
// reset status flags
for (var t=0; t<config.macros.importTiddlers.inbound.length; t++) config.macros.importTiddlers.inbound[t].status="";
// mark document as dirty and let display update as needed
if (count) { store.setDirty(true); store.notifyAll(); }
// always show final message when tiddlers were actually loaded
if (count) displayMessage(config.macros.importTiddlers.importedMsg.format([count,tiddlers.length,config.macros.importTiddlers.src.replace(/%20/g," ")]));
}
//}}}
// // File and XMLHttpRequest I/O
//{{{
config.macros.importTiddlers.fileExists=function(theFile) {
var found=false;
// DEBUG: alert('testing fileExists('+theFile+')...');
if(window.Components) {
try { netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); }
catch(e) { return false; } // security access denied
var file = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
try { file.initWithPath(theFile); }
catch(e) { return false; } // invalid directory
found = file.exists();
}
else { // use ActiveX FSO object for MSIE
var fso = new ActiveXObject("Scripting.FileSystemObject");
found = fso.FileExists(theFile)
}
// DEBUG: alert(theFile+" "+(found?"exists":"not found"));
return found;
}
config.macros.importTiddlers.loadRemoteFile = function(src,callback,quiet) {
if (src==undefined || !src.length) return null; // filename is required
if (!quiet) clearMessage();
if (!quiet) displayMessage(this.openMsg.format([src.replace(/%20/g," ")]));
if (src.substr(0,5)!="http:" && src.substr(0,5)!="file:") { // if src is relative (i.e., not a URL)
if (!this.fileExists(src)) { // if file cannot be found, might be relative path.. try fixup
var pathPrefix=document.location.href; // get current document path and trim off filename
var slashpos=pathPrefix.lastIndexOf("/"); if (slashpos==-1) slashpos=pathPrefix.lastIndexOf("\\");
if (slashpos!=-1 && slashpos!=pathPrefix.length-1) pathPrefix=pathPrefix.substr(0,slashpos+1);
src=pathPrefix+src;
if (pathPrefix.substr(0,5)!="http:") src=getLocalPath(src);
}
}
if (src.substr(0,5)!="http:" && src.substr(0,5)!="file:") { // if not a URL, read from local filesystem
var txt=loadFile(src);
if ((txt==null)||(txt==false)) // file didn't load
{ if (!quiet) displayMessage(config.macros.importTiddlers.openErrMsg.format([src.replace(/%20/g," "),"(filesystem error)"])); }
else {
if (!quiet) displayMessage(config.macros.importTiddlers.readMsg.format([txt.length,src.replace(/%20/g," ")]));
if (callback) callback(true,quiet,convertUTF8ToUnicode(txt),src,null);
}
}
else {
var xhr=loadRemoteFile(src,callback,quiet);
if (!quiet && !xhr) displayMessage(config.macros.importTiddlers.openErrMsg.format([src,"(XMLHTTPRequest error)"]));
}
}
config.macros.importTiddlers.readTiddlersFromHTML=function(html)
{
var remoteStore=new TiddlyWiki();
remoteStore.importTiddlyWiki(html);
return remoteStore.getTiddlers("title");
}
//}}}
Join the facebook event and force all your friends to join too.
![[Wear Red for Burma! facebook Event|http://www.facebook.com/event.php?eid=19653206160]]
Sign up for updates from the US Campaign for Burma.<<tiddler Newsletter>>
First name:
<<option txtUserName>>
<<tiddler TspotOptions>>
![[Get Involved]]
![[Home|Welcome]]
![[News]]
![[About]]
![[Events]]
![[Downloads]]
![[Pictures]]
![[Contacts]]
<!--{{{-->
<link rel='alternate' type='application/rss+xml' title='RSS' href='index.xml'/>
<!--}}}-->
<style type="text/css">#contentWrapper {display:none;}</style><div id="SplashScreen" style="border: 3px solid #ccc; display: block; text-align: center; width: 320px; margin: 100px auto; padding: 50px; color:#a00; font-size: 28px; font-family:Tahoma; background-color:#fff;"><blink>loading</blink><br><b>Students for Burma</b><br>WEAR RED THIS FRIDAY.<span style="font-size: 14px; color:red;"><br>Requires Javascript.</span></div>
!UN envoy given runaround
!Monastery massacre reported
!Monks ‘facing starvation’
Burma's top generals continued today to keep UN special envoy Ibrahim Gambari waiting for a meeting to discuss the country's crisis, sending him instead on a sightseeing tour of a remote area near the Chinese border, writes Edward Loxton from Chiang Mai, Thailand.
Gambari arrived in Burma two days ago, but has since met only lesser-ranking military officials, adding fuel to reports of a top-level split over the brutal suppression of week-long peaceful demonstrations by monks and other protesters.
[>img[http://www.thefirstpost.co.uk/features/2005/07/images/071001monks_2.jpg]] But the capricious way in which Gambari is being treated by junta supremo Than Shwe (pictured) and his second-in-command, Maung Aye, is being increasingly regarded as a way of embarrassing Gambari and his employers in New York.
Gambari even allowed himself to be given a seat at a pro-government rally in the remote town of Lashio, attended by rent-a-crowd local residents, one of whom confirmed being paid the equivalent of US$2 to attend.
While Gambari tours eastern areas of Burma where government forces hold sway, troops and police in Rangoon and Mandalay continue to tighten their grip on the intimidated population.
Insistent reports emerged today that on the very day Gambari was scheduled to meet military leaders, a massacre occurred at one of Rangoon's finest monasteries, Ngwe Kyar Yan.
Troops supported by paramilitary thugs launched a pre-dawn raid on the monastery on Sunday, dragging 200 monks from their beds, most of them young novices, lining them up against a wall and smashing their skulls. Reports of the outrage reached London, where a reliable blog site, Ko Htike, run by Burmese students in the British capital, gave a graphic description of the horror.
The blog said the raiders "systematically ordered all the monks to line up and banged and crushed each one's head against a brick
The raiders ordered all the monks to line up and crushed each one’s head against a brick wall of the monastery wall of the monastery. One by one, the peaceful, non-resisting monks fell to the ground."
The monastery's elderly abbot was tied up, tortured and hit with clubs. He later died from his injuries. Bodies were thrown into army trucks and driven to an unknown destination, eyewitnesses said.
[>img[http://www.thefirstpost.co.uk/features/2005/07/images/071001monks.jpg]]The blog also carried photographs of the horribly bruised body of a monk lying face down in a river near the monastery.
The television station Al-Jazeera carried an interview today with a young monk who said he and others would resist government oppression "to the end".
There are no monks to be seen anymore in the streets of Rangoon and Mandalay, where monasteries have been sealed off by troops and police.
The detained monks are reportedly refusing to accept food from the authorities, who have banned local people from feeding them in the customary way. "They literally face starvation," said one Rangoon resident.
[[The First Post|http://www.thefirstpost.co.uk/index.php?storyID=8920]]
News on genocide from around the world.
<<tiddlerList tags:"news" order:"-created" itemTemplate:"!!!%link\n">>
<html><form name="subscribeForm" action="http://en.groundspring.org/EmailNow/pub.php?module=WebSignup&cmd=subscribe" method="post">
<div align="center">
<input value="tqyqpysedwsyyeey" name="listIds" type="hidden">
<input value="http://www.uscampaignforburma.org" name="gotoUrl" type="hidden">
<input value="Return to U.S. Campaign for Burma" name="gotoText" type="hidden">
<input name="email" size="20" type="text">
<input name="listSelect_3040" value="1" id="qf_5aae23" checked="checked" type="hidden"><input name="submit" value="Submit" type="submit">
</div>
</form>
</html>
We have this cool agenda we can add stuff to now.
<html>
<div class='viewer' macro='newReminder'>
<div macro='toolbar editTiddler'></div></div>
</html>
[[Agenda]]
[[Forum]]
[[Help]]
<<tiddler Login>><<tiddler TspotSidebar>>
<<saveChanges>>
[[admin|Admin]]
<div id='header'>
<div id='titleLine'>
<span id='siteTitle' refresh='content' tiddler='SiteTitle'></span>
<span id='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>
</div>
</div>
<div id='sidebar'>
<div id='mainMenu' refresh='content' tiddler='MainMenu'></div>
<div id='sidebarOptions' refresh='content' tiddler='SideBarOptions'></div>
</div>
<div id="licensePanel">
</div></div>
<div id='displayArea'>
<div id='messageArea'></div>
<div id='tiddlerDisplay'></div>
<div class='footer' refresh='content' tiddler='FooterDisplay'></div>
</div>
Be a part of our 88,000 signatures campaign. US Campaign for Burma is asking people to collectively gather 88,000 signatures from around the world, calling on Chinese President Hu Jintao to stop preventing international action and take a stand against the massacre in Burma. Sign the petition here online:
![[Sign the Petition|http://www.democracyinaction.org/dia/organizations/uscampaignforburma/petition.jsp?petition_KEY=730&t=HomePage.dwt]]
![[Downloads]]
Once you have your petition filled out with your thousands of names, please send it back to the USCB office and we will deliver all the signatures to the Chinese Embassy: Here is our address: 1444 N St NW, Suite A2, Washington DC 20005
Be a part of our 88,000 signatures campaign. We are asking people to collectively gather 88,000 signatures from around the world, calling on Chinese President Hu Jintao to compel Burma towards valid national reconciliation. Sign the petition here online:
![[Sign the Petition|Petition]]
[img[http://photos-a.ak.facebook.com/photos-ak-sf2p/v134/66/0/1006362/n1006362_32015812_2481.jpg]]
----
[img[http://photos-b.ak.facebook.com/photos-ak-sf2p/v134/66/0/1006362/n1006362_32015821_4818.jpg]]
----
[img[http://photos-d.ak.facebook.com/photos-ak-sf2p/v134/66/0/1006362/n1006362_32015823_5348.jpg]]
----
[img[http://photos-b.ak.facebook.com/photos-ak-sf2p/v134/66/0/1006362/n1006362_32015825_5882.jpg]]
----
[img[http://photos-d.ak.facebook.com/photos-ak-sf2p/v134/187/104/1227810212/n1227810212_30105499_9285.jpg]]
----
[img[http://photos-d.ak.facebook.com/photos-ak-sf2p/v134/187/104/1227810212/n1227810212_30105515_3173.jpg]]
----
[img[http://photos-a.ak.facebook.com/photos-ak-sf2p/v134/187/104/1227810212/n1227810212_30105516_3414.jpg]]
|!Click for the next photo.|
| <<QOTD Photos inline norandom 5000>> |
[[Photos]]
/***
|Name|QuoteOfTheDayPlugin|
|Source|http://www.TiddlyTools.com/#QuoteOfTheDayPlugin|
|Version|1.3.0|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <<br>>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|plugin|
|Requires||
|Overrides||
|Description|Display a randomly selected "quote of the day" from a list defined in a separate tiddler|
!!!!!Usage
<<<
{{{<<QOTD tiddlername norandom noclick inline cookie:cookiename delay>>}}}
* ''tiddlername'' is the name of a tiddler containing your list of quotes, each separated by a horizontal line (use {{{----}}} on a line by itself).
* Each time the macro is rendered it will display a different quotation, selected at random from the specified tiddler. To display quotes in the sequence in which they occur in the tiddler, you can use the ''norandom'' keyword.
* When using ''norandom'', you can also specify an optional ''cookie:cookiename'' parameter which will be used to track the //index// of the next quote to be displayed, so that each subsequent rendering of the macro can continue the sequence of quotes as entered in the source tiddler, even in between browser sessions.
* By default, clicking on the rendered quote will select and display another random quote. Use the optional ''noclick'' keyword parameter to disable this "onClick" handling.
* By default, a clickable or timed quote will be displayed insider a 'slider' panel, so that standard TW animation effects will be used. However, slider panels are always rendered as "block-level" content, forcing a newline both before and after the slider panel. Use the ''inline'' keyword parameter to bypass this side-effect and display a clickable/timed quote without automatically adding surrounding linebreaks.
* The quote can also be refreshed automatically, by specifying a numeric ''delay'' parameter (in milliseconds) which enables a countdown timer. When the mouse is over the quote, the timer is automatically stopped. Moving the mouse away from the quote content restarts the timer.
<<<
!!!!!Example
<<<
{{{<<QOTD Quotations 10000>>}}}
<<QOTD Quotations 10000>>
{{{<<QOTD SiteNews norandom 10000>>}}}
<<QOTD SiteNews norandom 10000>>
<<<
!!!!!Installation
<<<
import (or copy/paste) the following tiddlers into your document:
''QuoteOfTheDayPlugin'' (tagged with <<tag systemConfig>>)
^^documentation and javascript for QuoteOfTheDay handling^^
<<<
!!!!!Revision History
<<<
''2007.08.06 [1.3.0]'' added support for "cookie:cookiename" param
''2007.05.03 [1.2.1]'' corrected logic for handling "inline" display (i.e., bypass slider and use of 'block' for quote elements)
''2007.05.03 [1.2.0]'' added sliderPanel wrapper around quote to take advantage of core-supported slider animation. Use "noslider"/"inline" keyword param to suppress use of slider. Also added tooltips for click, delay, and click+delay modes.
''2007.04.16 [1.1.2]'' code cleanup
''2007.04.16 [1.1.1]'' onClick handling now supports sequential as well as random order
''2007.04.14 [1.1.0]'' added onClick handling for selecting and display a new random quote
''2005.10.21 [1.0.0]'' Initial Release
<<<
!!!!!Credits
<<<
This feature was developed by EricShulman from [[ELS Design Studios|http:/www.elsdesign.com]].
Based on a suggestion by M.Russula
<<<
!!!!!Code
***/
//{{{
version.extensions.QOTD = {major: 1, minor: 3, revision: 0, date: new Date(2007,8,6)};
config.macros.QOTD = {
clickTooltip: "click to view another item",
timerTooltip: "auto-timer stopped... 'mouseout' to restart timer",
timerClickTooltip: "auto-timer stopped... click to view another item, or 'mouseout' to restart timer",
handler:
function(place,macroName,params) {
var tid=params.shift(); // source tiddler containing HR-separated quotes
var p=params.shift();
var click=true; // allow click for next item
var inline=false; // wrap in slider for animation effect
var random=true; // pick an item at random (default for "quote of the day" usage)
var cookie=""; // default to no cookie
while (p) {
if (p.toLowerCase()=="noclick") var click=false;
if (p.toLowerCase()=="inline") var inline=true;
if (p.toLowerCase()=="norandom") var random=false;
if (p.toLowerCase().substr(0,7)=="cookie:") var cookie=p.substr(8);
if (!isNaN(p)) var delay=p;
p=params.shift();
}
if ((click||delay) && !inline) {
var panel = createTiddlyElement(null,"div",null,"sliderPanel");
panel.style.display="none";
place.appendChild(panel);
var here=createTiddlyElement(panel,click?"a":"span",null,"QOTD");
}
else
var here=createTiddlyElement(place,click?"a":"span",null,"QOTD");
here.id=(new Date()).convertToYYYYMMDDHHMMSSMMM()+Math.random().toString(); // unique ID
here.setAttribute("tid",tid);
if (delay) here.setAttribute("delay",delay);
here.setAttribute("random",random);
here.setAttribute("cookie",cookie);
if (click) {
here.title=this.clickTooltip
if (!inline) here.style.display="block";
here.setAttribute("href","javascript:;");
here.onclick=function(event)
{ config.macros.QOTD.showNextItem(this,this.getAttribute("tid")); }
}
here.setAttribute("nextItem",config.options["txtQOTD_"+cookie]?parseInt(config.options["txtQOTD_"+cookie])-1:0);
config.macros.QOTD.showNextItem(here,tid);
if (delay) {
here.title=click?this.timerClickTooltip:this.timerTooltip
here.onmouseover=function(event)
{ clearTimeout(this.ticker); };
here.onmouseout=function(event)
{ this.ticker=setTimeout("config.macros.QOTD.tick('"+this.id+"')",this.getAttribute("delay")); };
here.ticker=setTimeout("config.macros.QOTD.tick('"+here.id+"')",delay);
}
},
tick: function(id) {
var here=document.getElementById(id); if (!here) return;
config.macros.QOTD.showNextItem(here,here.getAttribute("tid"));
here.ticker=setTimeout("config.macros.QOTD.tick('"+id+"')",here.getAttribute("delay"));
},
showNextItem:
function (here,tid) {
// hide containing slider panel (if any)
var p=here.parentNode;
if (p.className=="sliderPanel") p.style.display = "none"
// get a new quote, re-render quote display element, and advance index counter
var txt=store.getTiddlerText(tid); if (!txt) return;
var items=txt.split("\n----\n");
var index=here.getAttribute("nextItem"); if (index<0 || index>=items.length) index=0;
if (here.getAttribute("random")=="true") index=Math.floor(Math.random()*items.length);
removeChildren(here);
wikify(items[index],here);
index++;
here.setAttribute("nextItem",index);
var cookie=here.getAttribute("cookie")
if (cookie.length) {
config.options["txtQOTD_"+cookie]=index.toString();
saveOptionCookie("txtQOTD_"+cookie);
}
// redisplay slider panel (if any), with possible animation
if (p.className=="sliderPanel") {
if(anim && config.options.chkAnimate)
anim.startAnimating(new Slider(p,true,false,"none"));
else
p.style.display="block";
}
}
}
//}}}
{{{"The only real prison is fear, and the only real freedom is freedom from fear." - Aung San Suu Kyi }}}
----
{{{"Sometimes, 24 hours can bring a total revolutionary change." - Aung San Suu Kyi }}}
----
{{{"Never doubt that a small group of thoughtful, committed people can change the world. Indeed it is the only thing that has." - Margaret Mead}}}
----
{{{"When the sun comes out and the ice melts, you find that there was a lot of life underneath all along." - Aung San Suu Kyi }}}
----
{{{"I say fear must be followed by hope. Hope you do something about it. It's a call to action." - Elie Wiesel}}}
----
{{{"Please use your liberty to promote ours." - Aung San Suu Kyi}}}
----
{{{"Genocide is not war! It is more dangerous than war." - Raphael Lemkin}}}
----
{{{"Gandhi said the victory is in the struggle itself. The struggle itself is the most important thing." - Aung San Suu Kyi }}}
----
{{{"It is not incumbent upon you to complete the task, but you are not free to desist from it." - Pirkei Avot}}}
----
{{{"We will prevail because our cause is right, because our cause is just. ...History is on our side. Time is on our side." - Aung San Suu Kyi }}}
----
{{{"We will not be silent!" - The White Rose}}}
/***
|''Name:''|ReminderPlugin|
|''Version:''|2.3.10 (Jun 28, 2007)|
|''Source:''|http://remindermacros.tiddlyspot.com|
|''Author:''|Jeremy Sheeley(pop1280 [at] excite [dot] com)<<br>>Maintainer: simon.baird@gmail.com|
|''Licence:''|[[BSD open source license]]|
|''Macros:''|reminder, showreminders, displayTiddlersWithReminders, newReminder|
|''TiddlyWiki:''|2.0+|
|''Browser:''|Firefox 1.0.4+; InternetExplorer 6.0|
!Description
This plugin provides macros for tagging a date with a reminder. Use the {{{reminder}}} macro to do this. The {{{showReminders}}} and {{{displayTiddlersWithReminder}}} macros automatically search through all available tiddlers looking for upcoming reminders.
!Installation
* Create a new tiddler in your tiddlywiki titled ReminderPlugin and give it the {{{systemConfig}}} tag. The tag is important because it tells TW that this is executable code.
* Double click this tiddler, and copy all the text from the tiddler's body.
* Paste the text into the body of the new tiddler in your TW.
* Save and reload your TW.
* You can copy some examples into your TW as well. See [[Simple examples]], [[Holidays]], [[showReminders]] and [[Personal Reminders]]
!Syntax:
|>|See [[ReminderSyntax]] and [[showRemindersSyntax]]|
!Revision history
* v2.3.10 (Jun 28, 2007)
** Removed window.story = window backwards compatibility hacks since they were breaking TW 2.2
* v2.3.9 (Apr 26, 2007)
** allow bracketed list format in tags param lets you use tags with spaces
* v2.3.8 (Mar 9, 2006)
**Bug fix: A global variable had snuck in, which was killing FF 1.5.0.1
**Feature: You can now use TIDDLER and TIDDLERNAME in a regular reminder format
* v2.3.6 (Mar 1, 2006)
**Bug fix: Reminders for today weren't being matched sometimes.
**Feature: Solidified integration with DatePlugin and CalendarPlugin
**Feature: Recurring reminders will now return multiple hits in showReminders and the calendar.
**Feature: Added TIDDLERNAME to the replacements for showReminders format, for plugins that need the title without brackets.
* v2.3.5 (Feb 8, 2006)
**Bug fix: Sped up reminders lots. Added a caching mechanism for reminders that have already been matched.
* v2.3.4 (Feb 7, 2006)
**Bug fix: Cleaned up code to hopefully prevent the Firefox 1.5.0.1 crash that was causing lots of plugins
to crash Firefox. Thanks to http://www.jslint.com
* v2.3.3 (Feb 2, 2006)
**Feature: newReminder now has drop down lists instead of text boxes.
**Bug fix: A trailing space in a title would trigger an infinite loop.
**Bug fix: using tag:"birthday !reminder" would filter differently than tag:"!reminder birthday"
* v2.3.2 (Jan 21, 2006)
**Feature: newReminder macro, which will let you easily add a reminder to a tiddler. Thanks to Eric Shulman (http://www.elsdesign.com) for the code to do this.
** Bug fix: offsetday was not working sometimes
** Bug fix: when upgrading to 2.0, I included a bit to exclude tiddlers tagged with excludeSearch. I've reverted back to searching through all tiddlers
* v2.3.1 (Jan 7, 2006)
**Feature: 2.0 compatibility
**Feature AlanH sent some code to make sure that showReminders prints a message if no reminders are found.
* v2.3.0 (Jan 3, 2006)
** Bug Fix: Using "Last Sunday (-0)" as a offsetdayofweek wasn't working.
** Bug Fix: Daylight Savings time broke offset based reminders (for example year:2005 month:8 day:23 recurdays:7 would match Monday instead of Tuesday during DST.
!Code
***/
//{{{
//============================================================================
//============================================================================
// ReminderPlugin
//============================================================================
//============================================================================
version.extensions.ReminderPlugin = {major: 2, minor: 3, revision: 8, date: new Date(2006,3,9), source: "http://remindermacros.tiddlyspot.com/"};
//============================================================================
// Configuration
// Modify this section to change the defaults for
// leadtime and display strings
//============================================================================
config.macros.reminders = {};
config.macros["reminder"] = {};
config.macros["newReminder"] = {};
config.macros["showReminders"] = {};
config.macros["displayTiddlersWithReminders"] = {};
config.macros.reminders["defaultLeadTime"] = [0,6000];
config.macros.reminders["defaultReminderMessage"] = "DIFF: TITLE on DATE ANNIVERSARY";
config.macros.reminders["defaultShowReminderMessage"] = "DIFF: TITLE on DATE ANNIVERSARY -- TIDDLER";
config.macros.reminders["defaultAnniversaryMessage"] = "(DIFF)";
config.macros.reminders["untitledReminder"] = "Untitled Reminder";
config.macros.reminders["noReminderFound"] = ""//Couldn't find TITLE.
config.macros.reminders["todayString"] = "Today";
config.macros.reminders["tomorrowString"] = "Tomorrow";
config.macros.reminders["ndaysString"] = "DIFF days";
config.macros.reminders["emtpyShowRemindersString"] = "There are no upcoming events";
//============================================================================
// Code
// You should not need to edit anything
// below this. Make sure to edit this tiddler and copy
// the code from the text box, to make sure that
// tiddler rendering doesn't interfere with the copy
// and paste.
//============================================================================
//this object will hold the cache of reminders, so that we don't
//recompute the same reminder over again.
var reminderCache = {};
config.macros.showReminders.handler = function showReminders(place,macroName,params)
{
var now = new Date().getMidnight();
var paramHash = {};
var leadtime = [0,14];
paramHash = getParamsForReminder(params);
var bProvidedDate = (paramHash["year"] != null) ||
(paramHash["month"] != null) ||
(paramHash["day"] != null) ||
(paramHash["dayofweek"] != null);
if (paramHash["leadtime"] != null)
{
leadtime = paramHash["leadtime"];
if (bProvidedDate)
{
//If they've entered a day, we need to make
//sure to find it. We'll reset the
//leadtime a few lines down.
paramHash["leadtime"] = [-10000, 10000];
}
}
var matchedDate = now;
if (bProvidedDate)
{
var leadTimeLowerBound = new Date().getMidnight().addDays(paramHash["leadtime"][0]);
var leadTimeUpperBound = new Date().getMidnight().addDays(paramHash["leadtime"][1]);
matchedDate = findDateForReminder(paramHash, new Date().getMidnight(), leadTimeLowerBound, leadTimeUpperBound);
}
var arr = findTiddlersWithReminders(matchedDate, leadtime, paramHash["tag"], paramHash["limit"]);
var elem = createTiddlyElement(place,"span",null,null, null);
var mess = "";
if (arr.length == 0)
{
mess += config.macros.reminders.emtpyShowRemindersString;
}
for (var j = 0; j < arr.length; j++)
{
if (paramHash["format"] != null)
{
arr[j]["params"]["format"] = paramHash["format"];
}
else
{
arr[j]["params"]["format"] = config.macros.reminders["defaultShowReminderMessage"];
}
mess += getReminderMessageForDisplay(arr[j]["diff"], arr[j]["params"], arr[j]["matchedDate"], arr[j]["tiddler"]);
mess += "\n";
}
wikify(mess, elem, null, null);
};
config.macros.displayTiddlersWithReminders.handler = function displayTiddlersWithReminders(place,macroName,params)
{
var now = new Date().getMidnight();
var paramHash = {};
var leadtime = [0,14];
paramHash = getParamsForReminder(params);
var bProvidedDate = (paramHash["year"] != null) ||
(paramHash["month"] != null) ||
(paramHash["day"] != null) ||
(paramHash["dayofweek"] != null);
if (paramHash["leadtime"] != null)
{
leadtime = paramHash["leadtime"];
if (bProvidedDate)
{
//If they've entered a day, we need to make
//sure to find it. We'll reset the leadtime
//a few lines down.
paramHash["leadtime"] = [-10000,10000];
}
}
var matchedDate = now;
if (bProvidedDate)
{
var leadTimeLowerBound = new Date().getMidnight().addDays(paramHash["leadtime"][0]);
var leadTimeUpperBound = new Date().getMidnight().addDays(paramHash["leadtime"][1]);
matchedDate = findDateForReminder(paramHash, new Date().getMidnight(), leadTimeLowerBound, leadTimeUpperBound);
}
var arr = findTiddlersWithReminders(matchedDate, leadtime, paramHash["tag"], paramHash["limit"]);
for (var j = 0; j < arr.length; j++)
{
displayTiddler(null, arr[j]["tiddler"], 0, null, false, false, false);
}
};
config.macros.reminder.handler = function reminder(place,macroName,params)
{
var dateHash = getParamsForReminder(params);
if (dateHash["hidden"] != null)
{
return;
}
var leadTime = dateHash["leadtime"];
if (leadTime == null)
{
leadTime = config.macros.reminders["defaultLeadTime"];
}
var leadTimeLowerBound = new Date().getMidnight().addDays(leadTime[0]);
var leadTimeUpperBound = new Date().getMidnight().addDays(leadTime[1]);
var matchedDate = findDateForReminder(dateHash, new Date().getMidnight(), leadTimeLowerBound, leadTimeUpperBound);
if (!store.getTiddler)
{
store.getTiddler=function(title) {return this.tiddlers[title];};
}
var title = window.story.findContainingTiddler(place).id.substr(7);
if (matchedDate != null)
{
var diff = matchedDate.getDifferenceInDays(new Date().getMidnight());
var elem = createTiddlyElement(place,"span",null,null, null);
var mess = getReminderMessageForDisplay(diff, dateHash, matchedDate, title);
wikify(mess, elem, null, null);
}
else
{
createTiddlyElement(place,"span",null,null, config.macros.reminders["noReminderFound"].replace("TITLE", dateHash["title"]).replace("LEADTIMEUPPER", leadTime[1]).replace("LEADTIMELOWER", leadTime[0]).replace("TIDDLERNAME", title).replace("TIDDLER", "[[" + title + "]]") );
}
};
config.macros.newReminder.handler = function newReminder(place,macroName,params)
{
var today=new Date().getMidnight();
var formstring = '<html><form>Year: <select name="year"><option value="">Every year</option>';
for (var i = 0; i < 5; i++)
{
formstring += '<option' + ((i == 0) ? ' selected' : '') + ' value="' + (today.getFullYear() +i) + '">' + (today.getFullYear() + i) + '</option>';
}
formstring += '</select> Month:<select name="month"><option value="">Every month</option>';
for (i = 0; i < 12; i++)
{
formstring += '<option' + ((i == today.getMonth()) ? ' selected' : '') + ' value="' + (i+1) + '">' + config.messages.dates.months[i] + '</option>';
}
formstring += '</select> Day:<select name="day"><option value="">Every day</option>';
for (i = 1; i < 32; i++)
{
formstring += '<option' + ((i == (today.getDate() )) ? ' selected' : '') + ' value="' + i + '">' + i + '</option>';
}
formstring += '</select> Reminder:<input type="text" size="40" name="title" value="Please enter a time and location." onfocus="this.select();"><input type="button" value="ok" onclick="addReminderToTiddler(this.form)"></form></html>';
var panel = config.macros.slider.createSlider(place,null,"add to calendar","Add this to the Calendar");
wikify(formstring ,panel,null,store.getTiddler(params[1]));
};
// onclick: process input and insert reminder at 'marker'
window.addReminderToTiddler = function(form) {
if (!store.getTiddler)
{
store.getTiddler=function(title) {return this.tiddlers[title];};
}
var title = window.story.findContainingTiddler(form).id.substr(7);
var tiddler=store.getTiddler(title);
var txt='\n<<reminder ';
if (form.year.value != "")
txt += 'year:'+form.year.value + ' ';
if (form.month.value != "")
txt += 'month:'+form.month.value + ' ';
if (form.day.value != "")
txt += 'day:'+form.day.value + ' ';
txt += 'title:"'+form.title.value+'" ';
txt +='>>';
tiddler.set(null,tiddler.text + txt);
window.story.refreshTiddler(title,1,true);
store.setDirty(true);
};
function hasTag(tiddlerTags, tagFilters)
{
//Make sure we respond well to empty tiddlerTaglists or tagFilterlists
if (tagFilters.length==0 || tiddlerTags.length==0)
{
return true;
}
var bHasTag = false;
/*bNoPos says: "'till now there has been no check using a positive filter"
Imagine a filterlist consisting of 1 negative filter:
If the filter isn't matched, we want hasTag to be true.
Yet bHasTag is still false ('cause only positive filters cause bHasTag to change)
If no positive filters are present bNoPos is true, and no negative filters are matched so we have not returned false
Thus: hasTag returns true.
If at any time a positive filter is encountered, we want at least one of the tags to match it, so we turn bNoPos to false, which
means bHasTag must be true for hasTag to return true*/
var bNoPos=true;
for (var t3 = 0; t3 < tagFilters.length; t3++)
{
for(var t2=0; t2<tiddlerTags.length; t2++)
{
if (tagFilters[t3].length > 1 && tagFilters[t3].charAt(0) == '!')
{
if (tiddlerTags[t2] == tagFilters[t3].substring(1))
{
//If at any time a negative filter is matched, we return false
return false;
}
}
else
{
if (bNoPos)
{
//We encountered the first positive filter
bNoPos=false;
}
if (tiddlerTags[t2] == tagFilters[t3])
{
//A positive filter is matched. As long as no negative filter is matched, hasTag will return true
bHasTag=true;
}
}
}
}
return (bNoPos || bHasTag);
};
//This function searches all tiddlers for the reminder //macro. It is intended that other plugins (like //calendar) will use this function to query for
//upcoming reminders.
//The arguments to this function filter out reminders //based on when they will fire.
//
//ARGUMENTS:
//baseDate is the date that is used as "now".
//leadtime is a two element int array, with leadtime[0]
// as the lower bound and leadtime[1] as the
// upper bound. A reasonable default is [0,14]
//tags is a space-separated list of tags to use to filter
// tiddlers. If a tag name begins with an !, then
// only tiddlers which do not have that tag will
// be considered. For example "examples holidays"
// will search for reminders in any tiddlers that
// are tagged with examples or holidays and
// "!examples !holidays" will search for reminders
// in any tiddlers that are not tagged with
// examples or holidays. Pass in null to search
// all tiddlers.
//limit. If limit is null, individual reminders can
// override the leadtime specified earlier.
// Pass in 1 in order to override that behavior.
window.findTiddlersWithReminders = function findTiddlersWithReminders(baseDate, leadtime, tags, limit)
{
//function(searchRegExp,sortField,excludeTag)
// var macroPattern = "<<([^>\\]+)(?:\\*)([^>]*)>>";
var macroPattern = "<<(reminder)(.*)>>";
var macroRegExp = new RegExp(macroPattern,"mg");
var matches = store.search(macroRegExp,"title","");
var arr = [];
var tagsArray = null;
if (tags != null)
{
// tagsArray = tags.split(" ");
tagsArray = tags.readBracketedList(); // allows tags with spaces. thanks Robin Summerhill, 4-Oct-06.
}
for(var t=matches.length-1; t>=0; t--)
{
if (tagsArray != null)
{
//If they specified tags to filter on, and this tiddler doesn't
//match, skip it entirely.
if ( ! hasTag(matches[t].tags, tagsArray))
{
continue;
}
}
var targetText = matches[t].text;
do {
// Get the next formatting match
var formatMatch = macroRegExp.exec(targetText);
if(formatMatch && formatMatch[1] != null && formatMatch[1].toLowerCase() == "reminder")
{
//Find the matching date.
var params = formatMatch[2] != null ? formatMatch[2].readMacroParams() : {};
var dateHash = getParamsForReminder(params);
if (limit != null || dateHash["leadtime"] == null)
{
if (leadtime == null)
dateHash["leadtime"] = leadtime;
else
{
dateHash["leadtime"] = [];
dateHash["leadtime"][0] = leadtime[0];
dateHash["leadtime"][1] = leadtime[1];
}
}
if (dateHash["leadtime"] == null)
dateHash["leadtime"] = config.macros.reminders["defaultLeadTime"];
var leadTimeLowerBound = baseDate.addDays(dateHash["leadtime"][0]);
var leadTimeUpperBound = baseDate.addDays(dateHash["leadtime"][1]);
var matchedDate = findDateForReminder(dateHash, baseDate, leadTimeLowerBound, leadTimeUpperBound);
while (matchedDate != null)
{
var hash = {};
hash["diff"] = matchedDate.getDifferenceInDays(baseDate);
hash["matchedDate"] = new Date(matchedDate.getFullYear(), matchedDate.getMonth(), matchedDate.getDate(), 0, 0);
hash["params"] = cloneParams(dateHash);
hash["tiddler"] = matches[t].title;
hash["tags"] = matches[t].tags;
arr.pushUnique(hash);
if (dateHash["recurdays"] != null || (dateHash["year"] == null))
{
leadTimeLowerBound = leadTimeLowerBound.addDays(matchedDate.getDifferenceInDays(leadTimeLowerBound)+ 1);
matchedDate = findDateForReminder(dateHash, baseDate, leadTimeLowerBound, leadTimeUpperBound);
}
else matchedDate = null;
}
}
}while(formatMatch);
}
if(arr.length > 1) //Sort the array by number of days remaining.
{
arr.sort(function (a,b) {if(a["diff"] == b["diff"]) {return(0);} else {return (a["diff"] < b["diff"]) ? -1 : +1; } });
}
return arr;
};
//This function takes the reminder macro parameters and
//generates the string that is used for display.
//This function is not intended to be called by
//other plugins.
window.getReminderMessageForDisplay= function getReminderMessageForDisplay(diff, params, matchedDate, tiddlerTitle)
{
var anniversaryString = "";
var reminderTitle = params["title"];
if (reminderTitle == null)
{
reminderTitle = config.macros.reminders["untitledReminder"];
}
if (params["firstyear"] != null)
{
anniversaryString = config.macros.reminders["defaultAnniversaryMessage"].replace("DIFF", (matchedDate.getFullYear() - params["firstyear"]));
}
var mess = "";
var diffString = "";
if (diff == 0)
{
diffString = config.macros.reminders["todayString"];
}
else if (diff == 1)
{
diffString = config.macros.reminders["tomorrowString"];
}
else
{
diffString = config.macros.reminders["ndaysString"].replace("DIFF", diff);
}
var format = config.macros.reminders["defaultReminderMessage"];
if (params["format"] != null)
{
format = params["format"];
}
mess = format;
//HACK! -- Avoid replacing DD in TIDDLER with the date
mess = mess.replace(/TIDDLER/g, "TIDELER");
mess = matchedDate.formatStringDateOnly(mess);
mess = mess.replace(/TIDELER/g, "TIDDLER");
if (tiddlerTitle != null)
{
mess = mess.replace(/TIDDLERNAME/g, tiddlerTitle);
mess = mess.replace(/TIDDLER/g, "[[" + tiddlerTitle + "]]");
}
mess = mess.replace("DIFF", diffString).replace("TITLE", reminderTitle).replace("DATE", matchedDate.formatString("DDD MMM DD, YYYY")).replace("ANNIVERSARY", anniversaryString);
return mess;
};
// Parse out the macro parameters into a hashtable. This
// handles the arguments for reminder, showReminders and
// displayTiddlersWithReminders.
window.getParamsForReminder = function getParamsForReminder(params)
{
var dateHash = {};
var type = "";
var num = 0;
var title = "";
for(var t=0; t<params.length; t++)
{
var split = params[t].split(":");
type = split[0].toLowerCase();
var value = split[1];
for (var i=2; i < split.length; i++)
{
value += ":" + split[i];
}
if (type == "nolinks" || type == "limit" || type == "hidden")
{
num = 1;
}
else if (type == "leadtime")
{
var leads = value.split("...");
if (leads.length == 1)
{
leads[1]= leads[0];
leads[0] = 0;
}
leads[0] = parseInt(leads[0], 10);
leads[1] = parseInt(leads[1], 10);
num = leads;
}
else if (type == "offsetdayofweek")
{
if (value.substr(0,1) == "-")
{
dateHash["negativeOffsetDayOfWeek"] = 1;
value = value.substr(1);
}
num = parseInt(value, 10);
}
else if (type != "title" && type != "tag" && type != "format")
{
num = parseInt(value, 10);
}
else
{
title = value;
t++;
while (title.substr(0,1) == '"' && title.substr(title.length - 1,1) != '"' && params[t] != undefined)
{
title += " " + params[t++];
}
//Trim off the leading and trailing quotes
if (title.substr(0,1) == "\"" && title.substr(title.length - 1,1)== "\"")
{
title = title.substr(1, title.length - 2);
t--;
}
num = title;
}
dateHash[type] = num;
}
//date is synonymous with day
if (dateHash["day"] == null)
{
dateHash["day"] = dateHash["date"];
}
return dateHash;
};
//This function finds the date specified in the reminder
//parameters. It will return null if no match can be
//found. This function is not intended to be used by
//other plugins.
window.findDateForReminder= function findDateForReminder( dateHash, baseDate, leadTimeLowerBound, leadTimeUpperBound)
{
if (baseDate == null)
{
baseDate = new Date().getMidnight();
}
var hashKey = baseDate.convertToYYYYMMDDHHMM();
for (var k in dateHash)
{
hashKey += "," + k + "|" + dateHash[k];
}
hashKey += "," + leadTimeLowerBound.convertToYYYYMMDDHHMM();
hashKey += "," + leadTimeUpperBound.convertToYYYYMMDDHHMM();
if (reminderCache[hashKey] == null)
{
//If we don't find a match in this run, then we will
//cache that the reminder can't be matched.
reminderCache[hashKey] = false;
}
else if (reminderCache[hashKey] == false)
{
//We've already tried this date and failed
return null;
}
else
{
return reminderCache[hashKey];
}
var bOffsetSpecified = dateHash["offsetyear"] != null ||
dateHash["offsetmonth"] != null ||
dateHash["offsetday"] != null ||
dateHash["offsetdayofweek"] != null ||
dateHash["recurdays"] != null;
// If we are matching the base date for a dayofweek offset, look for the base date a
//little further back.
var tmp1leadTimeLowerBound = leadTimeLowerBound;
if ( dateHash["offsetdayofweek"] != null)
{
tmp1leadTimeLowerBound = leadTimeLowerBound.addDays(-6);
}
var matchedDate = baseDate.findMatch(dateHash, tmp1leadTimeLowerBound, leadTimeUpperBound);
if (matchedDate != null)
{
var newMatchedDate = matchedDate;
if (dateHash["recurdays"] != null)
{
while (newMatchedDate.getTime() < leadTimeLowerBound.getTime())
{
newMatchedDate = newMatchedDate.addDays(dateHash["recurdays"]);
}
}
else if (dateHash["offsetyear"] != null ||
dateHash["offsetmonth"] != null ||
dateHash["offsetday"] != null ||
dateHash["offsetdayofweek"] != null)
{
var tmpdateHash = cloneParams(dateHash);
tmpdateHash["year"] = dateHash["offsetyear"];
tmpdateHash["month"] = dateHash["offsetmonth"];
tmpdateHash["day"] = dateHash["offsetday"];
tmpdateHash["dayofweek"] = dateHash["offsetdayofweek"];
var tmpleadTimeLowerBound = leadTimeLowerBound;
var tmpleadTimeUpperBound = leadTimeUpperBound;
if (tmpdateHash["offsetdayofweek"] != null)
{
if (tmpdateHash["negativeOffsetDayOfWeek"] == 1)
{
tmpleadTimeLowerBound = matchedDate.addDays(-6);
tmpleadTimeUpperBound = matchedDate;
}
else
{
tmpleadTimeLowerBound = matchedDate;
tmpleadTimeUpperBound = matchedDate.addDays(6);
}
}
newMatchedDate = matchedDate.findMatch(tmpdateHash, tmpleadTimeLowerBound, tmpleadTimeUpperBound);
//The offset couldn't be matched. return null.
if (newMatchedDate == null)
{
return null;
}
}
if (newMatchedDate.isBetween(leadTimeLowerBound, leadTimeUpperBound))
{
reminderCache[hashKey] = newMatchedDate;
return newMatchedDate;
}
}
return null;
};
//This does much the same job as findDateForReminder, but
//this one doesn't deal with offsets or recurring
//reminders.
Date.prototype.findMatch = function findMatch(dateHash, leadTimeLowerBound, leadTimeUpperBound)
{
var bSpecifiedYear = (dateHash["year"] != null);
var bSpecifiedMonth = (dateHash["month"] != null);
var bSpecifiedDay = (dateHash["day"] != null);
var bSpecifiedDayOfWeek = (dateHash["dayofweek"] != null);
if (bSpecifiedYear && bSpecifiedMonth && bSpecifiedDay)
{
return new Date(dateHash["year"], dateHash["month"]-1, dateHash["day"], 0, 0);
}
var bMatchedYear = !bSpecifiedYear;
var bMatchedMonth = !bSpecifiedMonth;
var bMatchedDay = !bSpecifiedDay;
var bMatchedDayOfWeek = !bSpecifiedDayOfWeek;
if (bSpecifiedDay && bSpecifiedMonth && !bSpecifiedYear && !bSpecifiedDayOfWeek)
{
//Shortcut -- First try this year. If it's too small, try next year.
var tmpMidnight = this.getMidnight();
var tmpDate = new Date(this.getFullYear(), dateHash["month"]-1, dateHash["day"], 0,0);
if (tmpDate.getTime() < leadTimeLowerBound.getTime())
{
tmpDate = new Date((this.getFullYear() + 1), dateHash["month"]-1, dateHash["day"], 0,0);
}
if ( tmpDate.isBetween(leadTimeLowerBound, leadTimeUpperBound))
{
return tmpDate;
}
else
{
return null;
}
}
var newDate = leadTimeLowerBound;
while (newDate.isBetween(leadTimeLowerBound, leadTimeUpperBound))
{
var tmp = testDate(newDate, dateHash, bSpecifiedYear, bSpecifiedMonth, bSpecifiedDay, bSpecifiedDayOfWeek);
if (tmp != null)
return tmp;
newDate = newDate.addDays(1);
}
};
function testDate(testMe, dateHash, bSpecifiedYear, bSpecifiedMonth, bSpecifiedDay, bSpecifiedDayOfWeek)
{
var bMatchedYear = !bSpecifiedYear;
var bMatchedMonth = !bSpecifiedMonth;
var bMatchedDay = !bSpecifiedDay;
var bMatchedDayOfWeek = !bSpecifiedDayOfWeek;
if (bSpecifiedYear)
{
bMatchedYear = (dateHash["year"] == testMe.getFullYear());
}
if (bSpecifiedMonth)
{
bMatchedMonth = ((dateHash["month"] - 1) == testMe.getMonth() );
}
if (bSpecifiedDay)
{
bMatchedDay = (dateHash["day"] == testMe.getDate());
}
if (bSpecifiedDayOfWeek)
{
bMatchedDayOfWeek = (dateHash["dayofweek"] == testMe.getDay());
}
if (bMatchedYear && bMatchedMonth && bMatchedDay && bMatchedDayOfWeek)
{
return testMe;
}
};
//Returns true if the date is in between two given dates
Date.prototype.isBetween = function isBetween(lowerBound, upperBound)
{
return (this.getTime() >= lowerBound.getTime() && this.getTime() <= upperBound.getTime());
}
//Return a new date, with the time set to midnight (0000)
Date.prototype.getMidnight = function getMidnight()
{
return new Date(this.getFullYear(), this.getMonth(), this.getDate(), 0, 0);
};
// Add the specified number of days to a date.
Date.prototype.addDays = function addDays(numberOfDays)
{
return new Date(this.getFullYear(), this.getMonth(), this.getDate() + numberOfDays, 0, 0);
};
//Return the number of days between two dates.
Date.prototype.getDifferenceInDays = function getDifferenceInDays(otherDate)
{
//I have to do it this way, because this way ignores daylight savings
var tmpDate = this.addDays(0);
if (this.getTime() > otherDate.getTime())
{
var i = 0;
for (i = 0; tmpDate.getTime() > otherDate.getTime(); i++)
{
tmpDate = tmpDate.addDays(-1);
}
return i;
}
else
{
var i = 0;
for (i = 0; tmpDate.getTime() < otherDate.getTime(); i++)
{
tmpDate = tmpDate.addDays(1);
}
return i * -1;
}
return 0;
};
function cloneParams(what) {
var tmp = {};
for (var i in what) {
tmp[i] = what[i];
}
return tmp;
}
// Substitute date components into a string
Date.prototype.formatStringDateOnly = function formatStringDateOnly(template)
{
template = template.replace("YYYY",this.getFullYear());
template = template.replace("YY",String.zeroPad(this.getFullYear()-2000,2));
template = template.replace("MMM",config.messages.dates.months[this.getMonth()]);
template = template.replace("0MM",String.zeroPad(this.getMonth()+1,2));
template = template.replace("MM",this.getMonth()+1);
template = template.replace("DDD",config.messages.dates.days[this.getDay()]);
template = template.replace("0DD",String.zeroPad(this.getDate(),2));
template = template.replace("DD",this.getDate());
return template;
};
//}}}
Rangoon– On the day Mr. Gambari arrived in Burma, and after the junta has declared peace and stability restored on Rangoon’s streets, 70,000 demonstrators including some monks demonstrated in downtown Rangoon. The demonstrations were mainly led by high school students. Troops fired warning shots but no direct firing was made. However, demonstrators were cordoned off, beaten and arrested. Many escaped and staged demonstrations in other parts of downtown. About 30 MPs and Ma Su Su Nway participated in the demonstrations. Yesterday night, when security troops entered a monastery in Hlaing Township Ward 8, ward residents shouted and chased them off. When a monastery was raided last night in Tharkayta Township, guard monk set off an alarm bamboo clap prompting the ward residents to attack the troops. The troops fired back wounding one monk, it is learnt. However, junta forces retreated. Also in North Okklapa, raiding troops were driven back from a monastery near Mae Lamu Pagoda by ward residents who attacked them with catapults and sling-shot-fired darts.
Mandalay Division — Mandalay, 5000 people demonstrated. Mogok, monks and townspeople demonstrated. Kyaukbadaung, 1000 monks and 30,000 people demonstrated. NLD members U Kyaw Sein Hlaing, U Than Lwin, U Paw Aye, U Myint Shwe, Ko Ye Tun, Ko Myint Soe were arrested last night.
Magwe Division– In Pakkoku, 2000 monks and 30,000 townspeople demonstrated. Yenangyaung, 200 monks and 30,000 people demonstrated.
Kachin State– Myitkyina, the junta held a pro-junta mass rally at the football ground this morning. Over 20,000 people from Myitkyina, Wainmaw, Bhamo and Mogaung cities were forcibly conscripted to attend the rally. However, when a Maj. Gen. Thein Zaw moved to denounce the current demonstrations by monks and people all over Burma, the attendees shouted, “Our cause! Our cause!” instead of “Aye! Aye!” Such shouting made Thein Zaw lose his composure and exit the rally in haste. The rallying ground was sealed off during the meeting but before the event was over attendees forced the gates open and got out en masse. Two members each per every household were forced to attend the rally. Bhamo, over 30 detained monks are staging a hunger strike in prison.
Arakan State– Akyab, about 6000 monks and 20,000 people demonstrated. Taungup, 200 monks and 1000 people demonstrated.
Shan State – About 400 people demonstrated in Taunggyi and smashed junta’s ten slogan signboards. Meanwhile, Than Shwe protege Tayza’s Htoo Company offices were closed off amid rumors of a rift between Senior Gen. Than Shwe and his deputy Gen. Maung Aye.
The true story behind 27.9.07 raid of Ngwe-kyar-yan Monastery is that the 200 monks there were not beaten and arrested as reported widely but beaten to death right in the monastery and their bodies carried away on trucks.
September 29th, 2007 [[Saffron Revolution Updates|http://theburmacampaign.wordpress.com/]]
<<tiddler Subscribe>><<slider SliderOptionsPanel OptionsPanel "Options »" "Officers Only">>
/***
|Name|SinglePageModePlugin|
|Source|http://www.TiddlyTools.com/#SinglePageModePlugin|
|Version|2.5.0|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <<br>>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|plugin|
|Requires||
|Overrides|Story.prototype.displayTiddler(), Story.prototype.displayTiddlers()|
|Description|Display tiddlers one at a time with automatic update of URL (permalink). Also, options to always open tiddlers at top/bottom of page|
Normally, as you click on the links in TiddlyWiki, more and more tiddlers are displayed on the page. The order of this tiddler display depends upon when and where you have clicked. Some people like this non-linear method of reading the document, while others have reported that when many tiddlers have been opened, it can get somewhat confusing.
!!!!!Usage
<<<
SinglePageMode allows you to configure TiddlyWiki to navigate more like a traditional multipage web site with only one item displayed at a time. When SinglePageMode is enabled, the title of the current tiddler is automatically displayed in the browser window's titlebar. In addition, the browser's location URL is updated with a 'permalink' for the current tiddler so that it is easier to create a browser 'bookmark' for the current tiddler. You can disable the URL update action
Even when SinglePageMode is disabled (i.e., displaying multiple tiddlers is permitted), you can reduce the potential for confusion by enable TopOfPageMode (or BottomOfPageMode), which forces tiddlers to always open at the top (or bottom) of the page instead of being displayed following the tiddler containing the link that was clicked.
note: when used on the Safari browser, adding the permalink to the URL seems to create a problem whereby tiddlers cannot be properly displayed. In the short-term, to avoid this problem, this feature is disabled when using Safari. This does not affect usage under other browsers, and other plugin options will still be applied as configured below...
<<<
!!!!!Configuration
<<<
When installed, this plugin automatically adds checkboxes in the AdvancedOptions tiddler so you can enable/disable the plugin behavior. For convenience, these checkboxes are also included here:
<<option chkSinglePageMode>> Display one tiddler at a time
<<option chkSinglePagePermalink>> Automatically permalink current tiddler
<<option chkTopOfPageMode>> Always open tiddlers at the top of the page
<<option chkBottomOfPageMode>> Always open tiddlers at the bottom of the page
//(note: if both 'top' and 'bottom' settings are selected, "top of page" is used)//
<<<
!!!!!Installation
<<<
import (or copy/paste) the following tiddlers into your document:
''SinglePageModePlugin'' (tagged with <<tag systemConfig>>)
When installed, this plugin automatically adds checkboxes in the ''shadow'' AdvancedOptions tiddler so you can enable/disable this behavior. However, if you have customized your AdvancedOptions, you may need to ''manually add these checkboxes to your customized tiddler.''
<<<
!!!!!Revision History
<<<
2007.09.13 [2.5.0] for TPM/BPM modes, don't force tiddler to redisplay if already shown. Allows transition between view/edit or collapsed/view templates, without repositioning displayed tiddler.
2007.09.12 [2.4.0] added option to disable automatic permalink feature. Also, Safari is now excluded from permalinking action to avoid bug where tiddlers don't display after hash is updated.
2007.03.03 [2.3.1] fix typo when adding BPM option to AdvancedOptions (prevented checkbox from appearing)
2007.03.03 [2.3.0] added support for BottomOfPageMode (BPM) based on request from DaveGarbutt
2007.02.06 [2.2.3] in Story.prototype.displayTiddler(), use convertUnicodeToUTF8() for correct I18N string handling when creating URL hash string from tiddler title (based on bug report from BidiX)
2007.01.08 [2.2.2] use apply() to invoke hijacked core functions
2006.07.04 [2.2.1] in hijack for displayTiddlers(), suspend TPM as well as SPM so that DefaultTiddlers displays in the correct order.
2006.06.01 [2.2.0] added chkTopOfPageMode (TPM) handling
2006.02.04 [2.1.1] moved global variable declarations to config.* to avoid FireFox 1.5.0.1 crash bug when assigning to globals
2005.12.27 [2.1.0] hijack displayTiddlers() so that SPM can be suspended during startup while displaying the DefaultTiddlers (or #hash list). Also, corrected initialization for undefined SPM flag to "false", so default behavior is to display multiple tiddlers
2005.12.27 [2.0.0] Update for TW2.0
2005.11.24 [1.1.2] When the back and forward buttons are used, the page now changes to match the URL. Based on code added by Clint Checketts
2005.10.14 [1.1.1] permalink creation now calls encodeTiddlyLink() to handle tiddler titles with spaces in them
2005.10.14 [1.1.0] added automatic setting of window title and location bar ('auto-permalink'). feature suggestion by David Dickens.
2005.10.09 [1.0.1] combined documentation and code in a single tiddler
2005.08.15 [1.0.0] Initial Release
<<<
!!!!!Credits
<<<
This feature was developed by EricShulman from [[ELS Design Studios|http:/www.elsdesign.com]].
Support for BACK/FORWARD buttons adapted from code developed by Clint Checketts
<<<
!!!!!Code
***/
//{{{
version.extensions.SinglePageMode= {major: 2, minor: 5, revision: 0, date: new Date(2007,9,13)};
if (config.options.chkSinglePageMode==undefined) config.options.chkSinglePageMode=true;
if (config.options.chkSinglePagePermalink==undefined) config.options.chkSinglePagePermalink=true;
if (config.options.chkTopOfPageMode==undefined) config.options.chkTopOfPageMode=true;
if (config.options.chkBottomOfPageMode==undefined) config.options.chkBottomOfPageMode=false;
if (config.optionsDesc) {
config.optionsDesc.chkSinglePageMode="Display one tiddler at a time";
config.optionsDesc.chkSinglePagePermalink="Automatically permalink current tiddler";
config.optionsDesc.chkTopOfPageMode="Always open tiddlers at the top of the page";
config.optionsDesc.chkBottomOfPageMode="Always open tiddlers at the bottom of the page";
} else {
config.shadowTiddlers.AdvancedOptions += "\
\n<<option chkSinglePageMode>> Display one tiddler at a time \
\n<<option chkSinglePagePermalink>> Automatically permalink current tiddler \
\n<<option chkTopOfPageMode>> Always open tiddlers at the top of the page \
\n<<option chkBottomOfPageMode>> Always open tiddlers at the bottom of the page";
}
config.SPMTimer = 0;
config.lastURL = window.location.hash;
function checkLastURL()
{
if (!config.options.chkSinglePageMode)
{ window.clearInterval(config.SPMTimer); config.SPMTimer=0; return; }
if (config.lastURL == window.location.hash)
return;
var tiddlerName = convertUTF8ToUnicode(decodeURI(window.location.hash.substr(1)));
tiddlerName=tiddlerName.replace(/\[\[/,"").replace(/\]\]/,""); // strip any [[ ]] bracketing
if (tiddlerName.length) story.displayTiddler(null,tiddlerName,1,null,null);
}
if (Story.prototype.SPM_coreDisplayTiddler==undefined) Story.prototype.SPM_coreDisplayTiddler=Story.prototype.displayTiddler;
Story.prototype.displayTiddler = function(srcElement,title,template,animate,slowly)
{
if (config.options.chkSinglePageMode)
story.closeAllTiddlers();
else if (config.options.chkTopOfPageMode)
arguments[0]=null;
else if (config.options.chkBottomOfPageMode)
arguments[0]="bottom";
if (config.options.chkSinglePageMode && config.options.chkSinglePagePermalink && !config.browser.isSafari) {
window.location.hash = encodeURIComponent(convertUnicodeToUTF8(String.encodeTiddlyLink(title)));
config.lastURL = window.location.hash;
document.title = "Students for Burma" + " - " + title;
if (!config.SPMTimer) config.SPMTimer=window.setInterval(function() {checkLastURL();},1000);
}
this.SPM_coreDisplayTiddler.apply(this,arguments); // let CORE render tiddler
var tiddlerElem=document.getElementById(story.idPrefix+title);
if (tiddlerElem) window.scrollTo(0,ensureVisible(tiddlerElem)); // make sure tiddler is scrolled into view
}
if (Story.prototype.SPM_coreDisplayTiddlers==undefined) Story.prototype.SPM_coreDisplayTiddlers=Story.prototype.displayTiddlers;
Story.prototype.displayTiddlers = function(srcElement,titles,template,unused1,unused2,animate,slowly)
{
// suspend single-page mode (and/or top/bottom display options) when showing multiple tiddlers
var saveSPM=config.options.chkSinglePageMode; config.options.chkSinglePageMode=false;
var saveTPM=config.options.chkTopOfPageMode; config.options.chkTopOfPageMode=false;
var saveBPM=config.options.chkBottomOfPageMode; config.options.chkBottomOfPageMode=false;
this.SPM_coreDisplayTiddlers.apply(this,arguments);
config.options.chkBottomOfPageMode=saveBPM;
config.options.chkTopOfPageMode=saveTPM;
config.options.chkSinglePageMode=saveSPM;
}
//}}}
<<QOTD Quotes inline norandom 10000>>
[img[http://photos-694.ll.facebook.com/photos-ll-sctm/v125/227/78/7903694/n7903694_40720263_2677.jpg]]
http://www.thewhiterosesociety.org/
/***
''Inspired by [[TiddlyPom|http://www.warwick.ac.uk/~tuspam/tiddlypom.html]]''
|Name|SplashScreenPlugin|
|Created by|SaqImtiaz|
|Location|http://tw.lewcid.org/#SplashScreenPlugin|
|Version|0.21 |
|Requires|~TW2.08+|
!Description:
Provides a simple splash screen that is visible while the TW is loading.
!Installation
Copy the source text of this tiddler to your TW in a new tiddler, tag it with systemConfig and save and reload. The SplashScreen will now be installed and will be visible the next time you reload your TW.
!Customizing
Once the SplashScreen has been installed and you have reloaded your TW, the splash screen html will be present in the MarkupPreHead tiddler. You can edit it and customize to your needs.
!History
* 20-07-06 : version 0.21, modified to hide contentWrapper while SplashScreen is displayed.
* 26-06-06 : version 0.2, first release
!Code
***/
//{{{
window.old_lewcid_splash_restart=window.restart;
window.restart = function()
{ if (document.getElementById("SplashScreen"))
document.getElementById("SplashScreen").style.display = "none";
if (document.getElementById("contentWrapper"))
document.getElementById("contentWrapper").style.display = "block";
window.old_lewcid_splash_restart();
if (splashScreenInstall)
{if(config.options.chkAutoSave)
{saveChanges();}
displayMessage("TW SplashScreen has been installed, please save and refresh your TW.");
}
}
var oldText = store.getTiddlerText("MarkupPreHead");
if (oldText.indexOf("SplashScreen")==-1)
{var siteTitle = store.getTiddlerText("SiteTitle");
var splasher='\n\n<style type="text/css">#contentWrapper {display:none;}</style><div id="SplashScreen" style="border: 3px solid #ccc; display: block; text-align: center; width: 320px; margin: 100px auto; padding: 50px; color:#000; font-size: 28px; font-family:Tahoma; background-color:#eee;"><b>'+siteTitle +'</b> is loading<blink> ...</blink><br><br><span style="font-size: 14px; color:red;">Requires Javascript.</span></div>';
if (! store.tiddlerExists("MarkupPreHead"))
{var myTiddler = store.createTiddler("MarkupPreHead");}
else
{var myTiddler = store.getTiddler("MarkupPreHead");}
myTiddler.set(myTiddler.title,oldText+splasher,config.options.txtUserName,null,null);
store.setDirty(true);
var splashScreenInstall = true;
}
//}}}
/***
!GTD Style
http://tiddlystyles.com/#theme:GTD
!Generic rules /%==================================================================== %/
***/
/*{{{*/
body {
background: #000000;
color: #000;
font: .82em/1.25em "Bitstream Vera Sans", Verdana, Helvetica, Arial, sans-serif;
/*"Lucida Sans Unicode", "Lucida Grande","Trebuchet MS", */
}
/*}}}*/
/***
!Header rules /%====================================================================== %/
***/
/*{{{*/
#contentWrapper
{
margin: 0 auto;
width: 82em;
position: relative
}
#header
{
color: #f00;
padding: 1.5em 1em .6em 0;
}
#siteTitle {
font-size: 2.3em;
margin: 0;
}
#siteSubtitle {
font-size: 1em;
padding-left: 8.5em;
}
#titleLine{
background: transparent;
padding: 0;
}
#titleLine a {
color: #fff;
}
#titleLine a:hover {
background: transparent;
}
/*}}}*/
/***
!Sidebar rules /%====================================================================== %/
***/
/*{{{*/
#sidebar{
left: 0;
width: 15em;
margin: .9em .9em 0 0;
color: #000;
background: transparent;
}
/*}}}*/
/***
!Main menu rules /%=================================================================== %/
***/
/*{{{*/
#mainMenu{
position: static;
width: auto;
background: #600;
border-right: 3px solid #500;
padding: 0;
text-align: left;
font-size: 1em;
}
#mainMenu h1{
padding: 5px;
margin: 0;
text-align: center;
font-size: 1.2em;
font-weight: bold;
background: transparent;
color: #fff;
}
#mainMenu ul{
padding: 0;
margin: 0;
list-style: none;
}
#mainMenu h1 a,
#mainMenu li a,
#mainMenu li a.button{
display: block;
padding: 0 5px 0 10px;
border: 0;
border-bottom: 1px solid #500;
border-top: 1px solid #900;
margin: 0;
}
#mainMenu a,
#mainMenu a.button{
height: 22px;
height: 1.83em;
line-height: 22px;
color: #fff;
background: #700;
margin-left: 1em;
}
#mainMenu a:hover,
#mainMenu a.button:hover {
background: #b00;
color: #fff;
}
/*}}}*/
/***
!Sidebar options rules /%============================================================ %/
***/
/*{{{*/
#sidebarOptions {
background: #000;
//border-right: 3px solid #bb8;
color: #fff;
padding: .5em 0;
}
#sidebarOptions h1{
padding: 5px;
margin: 0;
text-align: left;
font-size: 1.2em;
font-weight: bold;
background: transparent;
color: #fff;
display: block;
}
#sidebarOptions a {
color: #fff;
margin: .2em .8em;
padding: 0;
border: 0;
}
#sidebarOptions a:hover, #sidebarOptions a:active {
color: #fff;
background: #000;
border: 0;
}
#sidebarOptions input{
margin: 2px 10px;
border: 1px inset #333;
padding: 0;
}
#sidebarOptions .sliderPanel {
background: #fff;
color: #000;
padding: 5px 10px;
font-size: .9em;
}
#sidebarOptions .sliderPanel a{
font-weight: normal;
margin: 0;
}
#sidebarOptions .sliderPanel a:link,#sidebarOptions .sliderPanel a:visited {
color: #000;
}
#sidebarOptions .sliderPanel a:hover,#sidebarOptions .sliderPanel a:active {
color: #fff;
background: #000;
}
/*}}}*/
/***
!Sidebar tabs rules /%===================================================================== %/
***/
/*{{{*/
#sidebarTabs {
background: transparent;
border-right: 3px solid #740;
border-bottom: 3px solid #520;
border: 0;
padding: 0;
}
#contentWrapper #sidebarTabs a,
#contentWrapper #displayArea .tabContents a{
color: #000;
}
#contentWrapper #sidebarTabs a:hover,
#contentWrapper #displayArea .tabContents a:hover {
background: #000;
color: #fff;
}
#contentWrapper #sidebarTabs a:active,
#contentWrapper #displayArea .tabContents a:active{
color: #000;
}
#contentWrapper .tabSelected {
background: #000;
}
#contentWrapper .tabUnselected{
background: #000;
}
#contentWrapper #sidebar .tabset{
background: #fff;
border-right: 3px solid #bb8;
padding: 0 0 0 .75em;
}
#contentWrapper .tabContents{
font-size: .95em;
background: #fff;
border:0;
border-right: 3px solid #740;
border-bottom: 3px solid #520;
padding: .75em;
}
#contentWrapper .tabContents{
width: auto;
}
#contentWrapper #sidebarTabs .tabContents .tabset,
#contentWrapper .tabContents .tabset{
border: 0;
padding: 0;
background: transparent;
}
#contentWrapper .tabContents .tabSelected,
#contentWrapper .tabContents .tabContents {
background: #fff;
border: 0;
}
#contentWrapper .tabContents .tabUnselected {
background: #fff;
}
#contentWrapper .tabset a {
color: #fff;
padding: .2em .7em;
margin: 0 .17em 0 0;
height: 2em;
position: static;
}
#contentWrapper .tabset a:hover {
background: #000;
color: #fff;
}
#contentWrapper .tabset a:active {
color: #000;
}
#contentWrapper .tabContents ul{
margin: 0;
padding: 0;
list-style: none;
}
#contentWrapper .tabContents .tabContents ul{
color: #eeb;
}
.tabContents ul a,
.tabContents ul .button{
color: #fff;
display: block;
padding: .1em 0 .1em .7em;
background: transparent;
border: 0;
}
.tabContents ul a:hover {
color: #fff;
background: #000;
}
/*}}}*/
/***
!License panel rules /%==================================================================== %/
***/
/*{{{*/
#licensePanel {
padding: 0px 1em;
font-size: .9em;
}
#licensePanel a {
color: #960;
display: block;
margin-top: .9em;
}
#licensePanel a:hover {
color: #fff;
background: transparent;
}
/*}}}*/
/***
!Popup rules /%================================================================= %/
***/
/*{{{*/
.popup {
font-size: .8em;
padding: 0em;
background: #eee;
border: 1px solid #000;
}
.popup hr {
margin: 1px 0 0 0;
visibility: hidden;
}
.popup li.disabled {
color: #666;
}
.popup li a,
.popup li a:visited{
color: #000;
border: .1em outset #cf6;
background: #cf6;
}
.popup li a:hover {
border: .1em outset #cf6;
background: #ef9;
color: #000;
}
/*}}}*/
/***
!Message area rules /%================================================================= %/
***/
/*{{{*/
#messageArea{
font-size: .9em;
padding: .4em;
background: #FFE72F;
border-right: .25em solid #da1;
border-bottom: .25em solid #a80;
position: fixed;
top: 10px;
right: 10px;
color: #000;
}
#contentWrapper #messageArea a{
color: #000;
text-decoration: none;
}
#contentWrapper #messageArea a:hover{
color: #000;
text-decoration: underline;
background: transparent;
}
#contentWrapper #messageArea .messageToolbar a.button{
/*border: 1px solid #da1; */
color: #000;
}
#contentWrapper #messageArea .messageToolbar a.button:hover{
color: #000;
text-decoration: none;
border: 1px solid #000;
background: #fff;
}
/*}}}*/
/***
!Tiddler display rules /%================================================================== %/
***/
/*{{{*/
#displayArea {
width: 60em;
margin: 0 0 0 14em;
}
.tiddler {
margin: 0 0 .9em 0;
padding: 0 1em;
border-right: .25em solid #aaa;
border-bottom: .25em solid #555;
background: #fff;
}
.title {
font-size: 1.5em;
font-weight: bold;
color: #900;
}
.toolbar {
color: #000;
font-size: .8em;
padding: .5em 0;
}
.toolbar .button{
padding: .1em .3em;
color: #fff;
/*border: .1em outset #cf6;*/
background: #fff;
margin: .1em;
}
.toolbar .button:hover {
/*background: #900;*/
color: #000;
}
.toolbar .button:active {
background: #ff0;
}
}
/*}}}*/
/***
!Viewer rules /% ------------------------------------------------------------------------------------------ %/
***/
/*{{{*/
.viewer {
line-height: 1.4em;
font-size: 1em;
}
.viewer a:link, .viewer a:visited {
color: #15b;
}
.viewer a:hover {
color: #fff;
background: #000;
}
.viewer .button{
color: #fff;
background: transparent;
border-top: 1px solid #FF6600;
border-left: 1px solid #FF6600;
border-bottom: 1px solid #FF6600;
border-right: 1px solid #FF6600;
}
.viewer .button:hover{
background: #FF6600;
color: #fff;
}
.viewer .button:active{
background: #ccc;
border-bottom: 1px solid #eee;
border-right: 1px solid #eee;
border-top: 1px solid #111;
border-left: 1px solid #111;
}
.viewer blockquote {
border-left: 3px solid #777;
margin: .3em;
padding: .3em;
}
.viewer pre{
background: #fefefe;
border: 1px solid #f1f1f1;
}
.viewer pre, .viewer code{
color: #000;
}
.viewer ul {
padding-left: 30px;
}
.viewer ol {
padding-left: 30px;
}
ul{
list-style-type: asquare;
}
ol{
list-style-type: decimal;
}
ol ol{
list-style-type: lower-alpha;
}
ol ol ol{
list-style-type: lower-roman;
}
.viewer ul, .viewer ol, .viewer p {
margin: .0;
}
.viewer li {
margin: .2em 0;
}
h1,h2,h3,h4,h5,h6 {
color: #000;
font-weight: bold;
background: #eee;
padding: 2px 10px;
margin: 5px 0;
}
.viewer h1 {font-size: 1.3em;}
.viewer h2 {font-size: 1.2em;}
.viewer h3 {font-size: 1.1em;}
.viewer h4 {font-size: 1em;}
.viewer h5 { font-size: .9em;}
.viewer h6 { font-size: .8em;}
.viewer table {
border: 2px solid #303030;
//border: none;
font-size: 11px;
margin: 10px 0;
}
.viewer th, .viewer thead td{
color: #000;
background: #eee;
border: 1px solid #aaa;
// border: none;
padding: 0 3px;
}
.viewer td {
border: 1px solid #aaa;
//border: none;
padding: 0 3px;
}
.viewer caption {
padding: 3px;
}
.viewer hr {
border: none;
border-top: dotted 1px #777;
height: 1px;
color: #777;
margin: 7px 0;
}
.viewer
{
margin: .5em 0 0 0;
padding: .5em 0;
border-top: 1px solid #ccc;
}
.highlight {
color: #000;
background: #ffe72f;
}
/*}}}*/
/***
!Editor rules /% ----------------------------------------------------------------------------------------- %/
***/
/*{{{*/
.editor {
font-size: .8em;
color: #402C74;
padding: .3em 0;
}
.editor input, .editor textarea {
font: 1.1em/130% "Andale Mono", "Monaco", "Lucida Console", "Courier New", monospace;
margin: 0;
border: 1px inset #333;
padding: 2px 0;
}
.editor textarea {
height: 42em;
width: 100%;
}
input:focus, textarea:focus
{
background: #ffe;
border: 1px solid #000;
}
.footer
{
padding: .5em 0;
margin: .5em 0;
border-top: 1px solid #ddd;
color: #555;
text-align: center;
}
/*}}}*/
/***
!IE Display hacks /% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~%/
***/
/*{{{*/
body{
_text-align: center;
}
#contentWrapper
{
/* _width: 770px; CSS UNDERSCORE HACK FOR PROPER WIN/IE DISPLAY */
_text-align: left; /* CSS UNDERSCORE HACK FOR PROPER WIN/IE DISPLAY */
}
#messageArea{
_position: absolute;
}
/*}}}*/
/***
!Calendar rules /%=================================================================== %/
***/
/*{{{*/
.calendar {
width: auto;
padding: 5x;
}
.viewer table {
border: 2px solid #303030;
//border: none;
font-size: 11px;
margin: 10px 0;
}
/*}}}*/
LEAD: ''WE have no leader, we have no arms,'' said a Burmese student, lifting the bandanna that masked his face as he marched through Rangoon on a recent day of anti-Government protests. ''But one day we will remove this Government,'' he went on. ''They are shooting at us and we will die. But we will not die in vain.''
''WE have no leader, we have no arms,'' said a Burmese student, lifting the bandanna that masked his face as he marched through Rangoon on a recent day of anti-Government protests. ''But one day we will remove this Government,'' he went on. ''They are shooting at us and we will die. But we will not die in vain.''
The students have been in the vanguard of a national uprising that drew support from workers, civil servants, the influential Buddhist clergy and, last week, in formal statements from the nation's lawyers and doctors. Unlike student movements in many parts of the world, students in Burma have always been close to farmers and workers, accepted as their forward ranks.
This month it is the students who, for the most part, have given their lives for political change. Hospital sources have estimated to diplomats in Rangoon that more than 1,000 people died in five days of demonstrations two weeks ago.
Most scholars and diplomats who watch Burmese events from neighboring Thailand believe that the movement the students have unleashed will not stop until broad political and economic changes are achieved.
Loosely organized in cells that mimic the structure of the nation's closed Government, the students succeeded in bringing down Burma's new leader, U Sein Lwin, on Aug. 12. On Friday, U Maung Maung, one of only two civilians in the Cabinet, was named to replace him in what was seen as an attempt to mollify the protesters. But the students called immediately for more demonstrations.
The student movement has roots that go back to the early decades of the century. A student strike in the early 1920's set in motion an independence movement that reached a peak in 1938, the ''year of revolution'' that marked the beginning of the end of British colonial rule. In that year, oil field workers marched on Rangoon to support the students, much as the population has rallied behind them this month.
The students have commonly shared the poverty of the rest of the people, living in hostels and rented rooms in marketplaces and sheltered by their neighbors when the authorities clamp down on them. Together with the bulk of the population, Burma's university students have remained separated from the country's small elite, whose children travel abroad to study. For the most part, graduates of Rangoon's colleges of arts, engineering and medicine face joblessness or work as taxi drivers, tourist guides or fortunetellers.
With this potentially rich nation's shrinking wealth reserved for the elite class, the students have become desperate and angry. The current protest clearly caught the Government by surprise. Since the 1970's, when student uprisings were crushed by force, the Government has succeeded in keeping order with rifles and bayonets. It plainly expected to succeed again. The first of the current round of student riots, last September, fizzled when the frightened population ignored the students' call to join them. It was at that time, say those who watch Burmese events from Bangkok, that the students began to organize the loose groupings that have proved successful in organizing recent rallies.
The groups fall under an umbrella called the All Burma Democratic Students Association, whose leaders are not known. Another group, the Rangoon Students Union, is a secret revival of an organization crushed in the 1960's.
According to Westerners and Burmese here who are in touch with Rangoon, the students have organized separate groups to prepare leaflets, to collect money and food, to give first aid and to maintain security. But the cells have remained distinct from one another and apparently difficult for authorities to penetrate.
After an outbreak of protest in March, some students were sent into the countryside to organize support. Buddhist monasteries became clandestine shelters where placards and flags were made and plans were laid for coordinated protest.
The flashpoint came in July when U Ne Win, Burma's leader since 1962, resigned and was replaced by Mr. Sein Lwin, a former general who had carried out brutal suppressions of student uprisings. The anger was palpable among the students when the protests came to a head on Aug. 8.
As soldiers stood by, the order to fire not yet given, students carrying red flags, symbolizing courage, marched in the city center, ripping off their bandannas to scream their protests. Wherever they went, crowds applauded, tossing bunches of bananas and handfuls of cheroots in what had become a ritual of support for the students. The killings, far from ending the uprising, appeared only to have stoked the anger of the students, and that of the Burmese people now once again following their lead.
[[NY Times|http://query.nytimes.com/gst/fullpage.html?res=940DE1DA123EF932A1575BC0A96E948260&sec=health&spon=&pagewanted=1]]
BY NOW China's Communist rulers must have realized that one unintended consequence of hosting the 2008 Olympics is unprecedented global scrutiny of Beijing's retrograde foreign policy. For decades, one pillar of that policy has been the cynical political and economic exploitation of rogue states that most of the rest of the world shuns -- notably North Korea, Zimbabwe, Sudan and Burma. Under growing international pressure, and with the looming threat of a besmirched Olympics, Chinese policy is slowly changing. But not fast enough, as this week's events in Burma demonstrate.
In the past three days, Burma's ruling junta has carried out a bloody and criminal crackdown on a peaceful protest movement led by thousands of Buddhist monks. The regime admits that 10 people have died in the volleys of gunfire and the baton charges its soldiers have directed at demonstrators. More likely is that the death toll is in the scores. Hundreds of monks and democratic opposition activists have been rounded up at night and trucked away to unknown fates; troops have occupied and ransacked monasteries.
Sadly, the degree of international outrage over these events has been inversely proportional to the influence those speaking out have over the Burmese regime. The Bush administration and European Union have been admirably outspoken, but the generals have a long record of dismissing the West. Burma's neighbors, who made the controversial decision to admit the regime to the Association of Southeast Asian Nations a decade ago, expressed "revulsion" at the use of violence against the protests but did not call for an end to military rule. India, which has struck military and economic deals with Burma, was even milder, saying it "is concerned at and is closely monitoring the situation."
But the weakest response of all was left to China, which did $2 billion worth of business with Burma last year alone and is its principal supplier of weapons. China's ambassador at the United Nations blocked a Security Council resolution condemning the crackdown. The strongest word Beijing has been able to cough up is "restraint." U.S. officials counted it as an achievement that China supported the dispatch of a U.N. envoy to Burma. Western diplomats speculate that Chinese officials are pressuring the Burmese generals behind the scenes; they note that earlier this month a senior Chinese official made a cryptic statement to visiting Burmese leaders about "a democracy process that is appropriate for the country."
This is arguably more than would have been done a decade ago by a Chinese government that massacred its own democracy movement in 1989. It's in keeping with Beijing's incrementally more constructive policies toward North Korea -- which it has nudged toward giving up nuclear weapons -- and Sudan, which it has pressured to accept international peacekeepers in Darfur.
China's behavior is nevertheless a pathetically puny response to savage brutality by one of the world's most corrupt and illegitimate governments. Burma's generals might not take orders from Beijing. But the failure of President Hu Jintao's leadership to forthrightly condemn the repression has had the effect of giving the junta a green light. Burma's saffron-robed monks will join Darfur's refugees in haunting the Beijing Olympics -- which are on their way to becoming a monument to an emerging superpower's immorality.
[[Washington Post|http://www.washingtonpost.com/wp-dyn/content/article/2007/09/28/AR2007092801737.html]]
/***
|''Name:''|TiddlerListMacro|
|''Version:''|2.0.10 (01-May-2006)|
|''Source''|http://jackparke.googlepages.com/jtw.html#TiddlerListMacro ([[del.icio.us|http://del.icio.us/post?url=http://jackparke.googlepages.com/jtw.html%23TiddlerListMacro]])|
|''Author:''|[[Jack]]|
|''Type:''|Macro|
|''Documentation:''|[[TiddlerListMacroDocumentation]]|
!Usage
{{{<<tiddlerList parameter1:"value1" parameter2:"value2" ...>>}}}
See TiddlerListMacroDocumentation and TiddlerListMacroExamples
http://jackparke.googlepages.com/jtw.html#TiddlerListMacroDocumentation
!Code
***/
//{{{
version.extensions.tiddlerList = {major: 2, minor: 0, revision: 10, date: new Date("May 2, 2006")};
// template = [header, item, separator, group, footer]
config.macros.tiddlerList={
formats : {list:true, nlist:true, span:true, stack:true, csv:true, table:true},
templates : {
list : [ "%0\n", "* %0\n", "", "%group\n", "%0\n"],
nlist : [ "%0", "# %0\n", "", "%group\n", "%0\n"],
span : [ "%0", "%0", " ", "%group", "%0"],
stack : [ "%0", "%0", "\n", "%group", "%0"],
csv : [ "%0", "%0", ", ", "%0", "%0\n"],
table : ["|!%0|\n", "|%0|\n", "", "|%group|\n", "|%0|\n"]
},
dateFormat : "DD MMM YYYY"
}
if (typeof gCurrentTiddler == 'undefined')
var gCurrentTiddler;
config.macros.tiddlerList.handler = function(place,macroName,params,wikifier,paramString,tiddler)
{
// Some globals
var count=0, groupCount=0, theGroup="", lastGroup="";
var currentTiddler = tiddler;
gCurrentTiddler = tiddler;
var listWikiText="";
var formats = this.formats;
// SQL-Like parameters
var parameters = paramString.parseParams("name",null,true);
var pTags = parameters[0]["tags"]?parameters[0]["tags"][0].split(","):[];
var pOrder = parameters[0]["order"]?parameters[0]["order"][0]:"title";
var pTop = parameters[0]["top"]?parameters[0]["top"][0]:-1;
var pText = parameters[0]["text"]?parameters[0]["text"][0]:"";
var pTitle = parameters[0]["title"]?parameters[0]["title"][0]:"";
var pSearch = parameters[0]["search"]?parameters[0]["search"][0]:"";
var pFilter = parameters[0]["filter"]?parameters[0]["filter"][0]:"";
var pHeader = parameters[0]["header"]?paramFormat(parameters[0]["header"][0]):"";
var pFooter = parameters[0]["footer"]?paramFormat(parameters[0]["footer"][0]):"";
var pGroup = parameters[0]["group"]?parameters[0]["group"][0]:"";
var pDateFormat = parameters[0]["dateFormat"]?parameters[0]["dateFormat"][0]:this.dateFormat;
var pCustomParameter = parameters[0]["customParameter"]?parameters[0]["customParameter"][0]:"";
var pFormat = parameters[0]["format"]?parameters[0]["format"][0]:"list";
pFormat = formats[pFormat]?pFormat:"list"
// Separator
var pSeparator = parameters[0]["separator"]?paramFormat(parameters[0]["separator"][0]):(parameters[0]["seperator"]?paramFormat(parameters[0]["seperator"][0]):this.templates[pFormat][2])
// Template for group
var pGroupTemplate = this.templates[pFormat][3];
if (parameters[0]["groupTemplate"])
pGroupTemplate = paramFormat(parameters[0]["groupTemplate"][0])
pGroupTemplate = pGroupTemplate.replace("$))", ">>")
// Template for group footer
var pGroupFooterTemplate = "";
if (parameters[0]["groupFooterTemplate"])
pGroupFooterTemplate = paramFormat(parameters[0]["groupFooterTemplate"][0])
pGroupFooterTemplate = pGroupFooterTemplate.replace("$))", ">>")
// Template for item
var pItemTemplate = this.templates[pFormat][1];
if (parameters[0]["itemTemplate"])
pItemTemplate = paramFormat(parameters[0]["itemTemplate"][0])
pItemTemplate = pItemTemplate.replace("$))", ">>").replace("%link", "%0").replace("%item", "%1").replace("%abstract", "%2").replace("%text", "%3").replace("%created", "%4").replace("%modified", "%5").replace("%modifier", "%6").replace("%group", "%7").replace("%title", "%8").replace("%tags", "%9").replace("%nolink", "%10").replace("%custom", "%11")
// Template for footer
var pFooterTemplate = this.templates[pFormat][4].replace("%count", "%1")
// Get all tiddlers
var tiddlers = store.reverseLookup("tags","excludeLists",false);
// Sorting
if(!pOrder)
pOrder = "title";
if (pOrder.match(/^\-/i)) {
pOrder = pOrder.substr(1)
var sortDesc = true;
}
if (sortDesc)
tiddlers.sort(function (a,b) {if(a[pOrder] == b[pOrder]) return(0); else return (a[pOrder] > b[pOrder]) ? -1 : +1; });
else
tiddlers.sort(function (a,b) {if(a[pOrder] == b[pOrder]) return(0); else return (a[pOrder] < b[pOrder]) ? -1 : +1; });
// Header
if (pHeader)
listWikiText += formatItem(this.templates[pFormat][0], [pHeader], pFormat)
for(var t=0; t<tiddlers.length; t++) {
tiddler = tiddlers[t];
if (pText!="" && tiddler.text=="") tiddler.text=store.getValue(tiddler, 'text')
if (pTop==-1 || count<pTop) {
if (pText=="" || tiddler.text.match(pText)) {
if (pTitle=="" || tiddler.title.match(pTitle)) {
if (pSearch=="" || (tiddler.title.match(pSearch) || tiddler.text.match(pSearch))) {
if (pFilter=="" || eval(pFilter)) {
if (pTags.length==0 || compareArrays(tiddler.tags, pTags, "all")) {
count++;
if (tiddler.text=="") tiddler.text=store.getValue(tiddler, 'text')
// Grouping
if (pGroup) {
theGroup = eval(pGroup);
if(theGroup != lastGroup) {
groupCount++;
if (pGroupFooterTemplate && groupCount>1)
listWikiText += pGroupFooterTemplate.replace("%group", theGroup)
listWikiText += pGroupTemplate.replace("%group", theGroup)
lastGroup = theGroup;
}
}
// Separators
if (count>1) listWikiText += pSeparator;
//Plaintext title
var noLink = tiddler.title.match(config.textPrimitives.wikiLink)?"~" + tiddler.title:tiddler.title;
// Custom parameter
if (pCustomParameter)
var custom="";
try {
custom = eval(pCustomParameter)
} catch (e) {}
// List individual tiddler
listWikiText += formatItem(pItemTemplate,["[[" + tiddler.title + "]]",count,tiddler.text.substr(0,100),tiddler.text,tiddler.created.formatString(pDateFormat),tiddler.modified.formatString(pDateFormat),tiddler.modifier,theGroup,tiddler.title,tiddler.tags.join(" "),noLink,custom], pFormat)
}
}
}
}
}
}
}
// Last group footer
if (pGroup && pGroupFooterTemplate && count>0)
listWikiText += pGroupFooterTemplate.replace("%group", theGroup)
// Footer
if (pFooter) {
pFooter = pFooter.replace("%count", count)
listWikiText += formatItem(pFooterTemplate, [pFooter], pFormat)
}
// Render result
if (!parameters[0]["debug"])
wikify(listWikiText,place, null, currentTiddler)
else
place.innerHTML = "<textarea style=\"width:100%;\" rows=30>" + listWikiText + "</textarea>"
// Local functions
function paramFormat(param) {
// Allow "\n" in non evalled parameters
return param.replace(/\\n/g, "\n");
}
function formatItem(template, values, format) {
// Fill template with values (depending on list format)
if (format.match(/table/) && values[0].match(/\|/))
return ("%0\n").format(values)
else
return template.format(values)
}
function compareArrays(array, values, logic) {
// Compare items in array with AND("all") or OR("any") logic
var matches=0;
for(var v=0; v<values.length; v++)
if(values[v].replace(/^\s+|\s+$/g,"").match(/^\-/) && !array.contains(values[v].replace(/^\s+|\s+$/g,"").substr(1)))
matches++;
else if (array.contains(values[v]))
matches++;
return ((logic=="all" && matches==values.length) || (logic!="all" && matches>0))
}
}
String.prototype.prettyTrim = function(len,prefix,postfix) {
var result = this.trim().replace(/\r\n/g,' ').replace(/\n/g,' ');
if (!prefix) prefix = '';
if (!postfix) postfix = '';
if (result.length > len - 3)
return prefix + result.substr(0,len) + '...' + postfix;
else if (result.length > 0)
return prefix + result + postfix;
else
return result;
}
//}}}
/***
Contains the stuff you need to use Tiddlyspot
Note you must also have UploadPlugin installed
***/
//{{{
// edit this if you are migrating sites or retrofitting an existing TW
config.tiddlyspotSiteId = 'studentsforburma';
// make it so you can by default see edit controls via http
config.options.chkHttpReadOnly = false;
window.readOnly = false; // make sure of it (for tw 2.2)
// disable autosave in d3
if (window.location.protocol != "file:")
config.options.chkGTDLazyAutoSave = false;
// tweak shadow tiddlers to add upload button, password entry box etc
with (config.shadowTiddlers) {
SiteUrl = 'http://'+config.tiddlyspotSiteId+'.tiddlyspot.com';
SideBarOptions = SideBarOptions.replace(/(<<saveChanges>>)/,"$1<<tiddler TspotSidebar>>");
OptionsPanel = OptionsPanel.replace(/^/,"<<tiddler TspotOptions>>");
DefaultTiddlers = DefaultTiddlers.replace(/^/,"[[Welcome to Tiddlyspot]] ");
MainMenu = MainMenu.replace(/^/,"[[Welcome to Tiddlyspot]] ");
}
// create some shadow tiddler content
merge(config.shadowTiddlers,{
'Welcome to Tiddlyspot':[
"This document is a ~TiddlyWiki from tiddlyspot.com. A ~TiddlyWiki is an electronic notebook that is great for managing todo lists, personal information, and all sorts of things.",
"",
"@@font-weight:bold;font-size:1.3em;color:#444; //What now?// @@ Before you can save any changes, you need to enter your password in the form below. Then configure privacy and other site settings at your [[control panel|http://" + config.tiddlyspotSiteId + ".tiddlyspot.com/controlpanel]] (your control panel username is //" + config.tiddlyspotSiteId + "//).",
"<<tiddler TspotControls>>",
"See also GettingStarted.",
"",
"@@font-weight:bold;font-size:1.3em;color:#444; //Working online// @@ You can edit this ~TiddlyWiki right now, and save your changes using the \"save to web\" button in the column on the right.",
"",
"@@font-weight:bold;font-size:1.3em;color:#444; //Working offline// @@ A fully functioning copy of this ~TiddlyWiki can be saved onto your hard drive or USB stick. You can make changes and save them locally without being connected to the Internet. When you're ready to sync up again, just click \"upload\" and your ~TiddlyWiki will be saved back to tiddlyspot.com.",
"",
"@@font-weight:bold;font-size:1.3em;color:#444; //Help!// @@ Find out more about ~TiddlyWiki at [[TiddlyWiki.com|http://tiddlywiki.com]]. Also visit [[TiddlyWiki Guides|http://tiddlywikiguides.org]] for documentation on learning and using ~TiddlyWiki. New users are especially welcome on the [[TiddlyWiki mailing list|http://groups.google.com/group/TiddlyWiki]], which is an excellent place to ask questions and get help. If you have a tiddlyspot related problem email [[tiddlyspot support|mailto:support@tiddlyspot.com]].",
"",
"@@font-weight:bold;font-size:1.3em;color:#444; //Enjoy :)// @@ We hope you like using your tiddlyspot.com site. Please email [[feedback@tiddlyspot.com|mailto:feedback@tiddlyspot.com]] with any comments or suggestions."
].join("\n"),
'TspotControls':[
"| tiddlyspot password:|<<option pasUploadPassword>>|",
"| site management:|<<upload http://" + config.tiddlyspotSiteId + ".tiddlyspot.com/store.cgi index.html . . " + config.tiddlyspotSiteId + ">>//(requires tiddlyspot password)//<<br>>[[control panel|http://" + config.tiddlyspotSiteId + ".tiddlyspot.com/controlpanel]], [[download (go offline)|http://" + config.tiddlyspotSiteId + ".tiddlyspot.com/download]]|",
"| links:|[[tiddlyspot.com|http://tiddlyspot.com/]], [[FAQs|http://faq.tiddlyspot.com/]], [[announcements|http://announce.tiddlyspot.com/]], [[blog|http://tiddlyspot.com/blog/]], email [[support|mailto:support@tiddlyspot.com]] & [[feedback|mailto:feedback@tiddlyspot.com]], [[donate|http://tiddlyspot.com/?page=donate]]|"
].join("\n"),
'TspotSidebar':[
"<<upload http://" + config.tiddlyspotSiteId + ".tiddlyspot.com/store.cgi index.html . . " + config.tiddlyspotSiteId + ">><html><a href='http://" + config.tiddlyspotSiteId + ".tiddlyspot.com/download' class='button'>download</a></html>"
].join("\n"),
'TspotOptions':[
"tiddlyspot password:",
"<<option pasUploadPassword>>",
""
].join("\n")
});
//}}}
<<upload http://studentsforburma.tiddlyspot.com/store.cgi index.html . . studentsforburma>>
<html><a href='http://studentsforburma.tiddlyspot.com/download' class='button'>download</a></html>
Senior Bush administration officials have pressed Chinese officials in private conversations this week to use their leverage with Burmese authorities to limit the violence and help manage a transition to a new government in Burma, which is experiencing its most serious and violent demonstrations in two decades, U.S. officials said yesterday.
The Chinese have deflected the entreaties by describing Burma's turmoil as an internal matter. But one senior U.S. official said the Chinese have been "shocked" by the world's reaction to the confrontation between the government and protesters. He added that he believes they are "reconsidering the amount of support" China provides to the Burmese government.
China, which has extensive commercial interests in Burma, has received a blunt message from the United States: "You wanted to become a big power -- part of being a big power is you will be held responsible for your client states," said this official, who spoke on the condition of anonymity because he was discussing private meetings. U.S. officials have also urged China to consider some form of refuge for Burmese leaders, to help speed a transition to a new government, this official said.
The White House is focusing its diplomacy on China largely because it has little independent influence over the military-led government in Burma, which has engaged this week in a crackdown on protesters led by Buddhist monks.
The administration is calculating that Beijing, a major protector of Burma, will not want to risk world opprobrium if widespread bloodshed is caused by its long-time ally. Officials said China is nervous about prospects that the 2008 Olympics in Beijing could be tarnished if the situation in Burma is not stabilized peacefully.
The anti-government protests, which started in August, have become a cause c¿l¿bre in Washington in the wake of this week's crackdown. House and Senate leaders drafted resolutions yesterday condemning the military government, with little of the normal partisan bickering that often accompanies foreign policy debates on Capitol Hill.
The administration, meanwhile, announced sanctions this week aimed at squeezing the government's military leaders and their associates. On Thursday, the Treasury Department imposed new financial sanctions on 14 senior Burmese officials linked to egregious human rights abuses.
Yesterday, the State Department announced that three dozen Burmese military and government officials and their families will be barred from visiting the United States. The U.S. government is also doubling the amount of Burmese-language broadcasts beamed into a country where the authorities have been trying to cut off Internet and other forms of communication with the outside world, an official said.
President Bush has stepped up his rhetoric, calling on other countries to press Burma, which is also known as Myanmar. He has been joined by first lady Laura Bush, who has adopted the pro-democracy cause in Burma in a rare foray into foreign policy and has issued repeated public statements criticizing the government. Both Bushes have been heavily influenced by private meetings with Burmese dissidents and other activists, current and former administration officials say.
"President Bush calls on all nations, especially those nations closest to Burma that have the most influence with the regime, to support the aspirations of the Burmese people, and to join in condemning the junta's use of violence . . .," the first lady said in a statement last night. "The United States stands with the people of Burma. . . . We cannot -- and will not -- turn our attention from courageous people who stand up for democracy and justice."
Bush met with Chinese Foreign Minister Yang Jiechi in the Oval Office on Thursday for an unscheduled meeting on Burma after the diplomat came to the White House to see national security adviser Stephen J. Hadley. Secretary of State Condoleezza Rice raised the subject of Burma in her own meeting with the foreign minister earlier in the week, and the United States' top diplomat on Asia, Christopher R. Hill, has also discussed the issue in Beijing, where he is attending talks on North Korea's nuclear weapons program, a senior official said.
U.S. officials have limited knowledge about events inside Burma -- including the death toll, so far -- and depend, in large measure, on news reports and information from refugees, exiles and others in neighboring countries. The United States does have a mission in Burma, but the ability of diplomats there to report has been limited in recent days, officials said.
Still, one senior official said the accounts he is seeing suggest "a regime under severe stress." He said the U.S. government is receiving unconfirmed reports that division-level military commanders in Burma are refusing orders to participate in the crackdown. Another official said that it is impossible to predict what will happen but that there is "overwhelming dislike" of the government among civilians.
U.S. officials were cautious in their assessment of the diplomatic road ahead. One acknowledged that there have been only "pretty tepid" statements from China and India, but officials were encouraged by a condemnation this week from neighboring members of the Association of Southeast Asian Nations. State Department officials quietly raised the possibility of introducing another U.N. Security Council resolution on Burma if they do not see stronger action from China and India.
Rep. Tom Lantos (D-Calif.), the chairman of the House Foreign Affairs Committee, said he agrees with the administration that China is key to resolving the situation. "There is no doubt in my mind that if the Chinese authorities decided to put pressure on Burma, things will change instantaneously," he said.
[[Washington Post|http://www.washingtonpost.com/wp-dyn/content/article/2007/09/28/AR2007092802029.html?hpid=topnews]]
| !date | !user | !location | !storeUrl | !uploadDir | !toFilename | !backupdir | !origin |
| 03/10/2007 00:08:11 | patrick | [[/|http://studentsforburma.tiddlyspot.com/#%5B%5BGlobal%20Day%20of%20Action%20for%20Burma%5D%5D]] | [[store.cgi|http://studentsforburma.tiddlyspot.com/store.cgi]] | . | [[index.html | http://studentsforburma.tiddlyspot.com/index.html]] | . |
| 02/10/2007 23:27:44 | Colin | [[/|http://studentsforburma.tiddlyspot.com/#%5B%5BWear%20Red%20on%20Friday%20for%20Burma!%5D%5D]] | [[store.cgi|http://studentsforburma.tiddlyspot.com/store.cgi]] | . | [[index.html | http://studentsforburma.tiddlyspot.com/index.html]] | . | ok |
| 02/10/2007 23:28:57 | Colin | [[/|http://studentsforburma.tiddlyspot.com/#Welcome]] | [[store.cgi|http://studentsforburma.tiddlyspot.com/store.cgi]] | . | [[index.html | http://studentsforburma.tiddlyspot.com/index.html]] | . | ok |
| 02/10/2007 23:33:41 | Colin | [[/|http://studentsforburma.tiddlyspot.com/#About]] | [[store.cgi|http://studentsforburma.tiddlyspot.com/store.cgi]] | . | [[index.html | http://studentsforburma.tiddlyspot.com/index.html]] | . |
| 03/10/2007 00:12:45 | Colin | [[/|http://studentsforburma.tiddlyspot.com/#%5B%5BBurmese%20play%20tense%20waiting%20game%5D%5D]] | [[store.cgi|http://studentsforburma.tiddlyspot.com/store.cgi]] | . | [[index.html | http://studentsforburma.tiddlyspot.com/index.html]] | . | ok |
| 03/10/2007 00:18:59 | Colin | [[/|http://studentsforburma.tiddlyspot.com/#%5B%5BTHE%20WORLD%3B%20The%20Students%20Behind%20Burma's%20Revolt%5D%5D]] | [[store.cgi|http://studentsforburma.tiddlyspot.com/store.cgi]] | . | [[index.html | http://studentsforburma.tiddlyspot.com/index.html]] | . |
| 03/10/2007 12:17:39 | Colin | [[/|http://studentsforburma.tiddlyspot.com/#About]] | [[store.cgi|http://studentsforburma.tiddlyspot.com/store.cgi]] | . | [[index.html | http://studentsforburma.tiddlyspot.com/index.html]] | . | ok |
| 03/10/2007 12:21:36 | Colin | [[/|http://studentsforburma.tiddlyspot.com/#About]] | [[store.cgi|http://studentsforburma.tiddlyspot.com/store.cgi]] | . | [[index.html | http://studentsforburma.tiddlyspot.com/index.html]] | . |
| 03/10/2007 21:26:09 | Colin | [[/|http://studentsforburma.tiddlyspot.com/#Downloads]] | [[store.cgi|http://studentsforburma.tiddlyspot.com/store.cgi]] | . | [[index.html | http://studentsforburma.tiddlyspot.com/index.html]] | . |
| 04/10/2007 22:06:52 | Colin | [[/|http://studentsforburma.tiddlyspot.com/#Photos]] | [[store.cgi|http://studentsforburma.tiddlyspot.com/store.cgi]] | . | [[index.html | http://studentsforburma.tiddlyspot.com/index.html]] | . |
/***
|''Name:''|PasswordOptionPlugin|
|''Description:''|Extends TiddlyWiki options with non encrypted password option.|
|''Version:''|1.0.2|
|''Date:''|Apr 19, 2007|
|''Source:''|http://tiddlywiki.bidix.info/#PasswordOptionPlugin|
|''Author:''|BidiX (BidiX (at) bidix (dot) info)|
|''License:''|[[BSD open source license|http://tiddlywiki.bidix.info/#%5B%5BBSD%20open%20source%20license%5D%5D ]]|
|''~CoreVersion:''|2.2.0 (Beta 5)|
***/
//{{{
version.extensions.PasswordOptionPlugin = {
major: 1, minor: 0, revision: 2,
date: new Date("Apr 19, 2007"),
source: 'http://tiddlywiki.bidix.info/#PasswordOptionPlugin',
author: 'BidiX (BidiX (at) bidix (dot) info',
license: '[[BSD open source license|http://tiddlywiki.bidix.info/#%5B%5BBSD%20open%20source%20license%5D%5D]]',
coreVersion: '2.2.0 (Beta 5)'
};
config.macros.option.passwordCheckboxLabel = "Save this password on this computer";
config.macros.option.passwordInputType = "password"; // password | text
setStylesheet(".pasOptionInput {width: 11em;}\n","passwordInputTypeStyle");
merge(config.macros.option.types, {
'pas': {
elementType: "input",
valueField: "value",
eventName: "onkeyup",
className: "pasOptionInput",
typeValue: config.macros.option.passwordInputType,
create: function(place,type,opt,className,desc) {
// password field
config.macros.option.genericCreate(place,'pas',opt,className,desc);
// checkbox linked with this password "save this password on this computer"
config.macros.option.genericCreate(place,'chk','chk'+opt,className,desc);
// text savePasswordCheckboxLabel
place.appendChild(document.createTextNode(config.macros.option.passwordCheckboxLabel));
},
onChange: config.macros.option.genericOnChange
}
});
merge(config.optionHandlers['chk'], {
get: function(name) {
// is there an option linked with this chk ?
var opt = name.substr(3);
if (config.options[opt])
saveOptionCookie(opt);
return config.options[name] ? "true" : "false";
}
});
merge(config.optionHandlers, {
'pas': {
get: function(name) {
if (config.options["chk"+name]) {
return encodeCookie(config.options[name].toString());
} else {
return "";
}
},
set: function(name,value) {config.options[name] = decodeCookie(value);}
}
});
// need to reload options to load passwordOptions
loadOptionsCookie();
/*
if (!config.options['pasPassword'])
config.options['pasPassword'] = '';
merge(config.optionsDesc,{
pasPassword: "Test password"
});
*/
//}}}
/***
|''Name:''|UploadPlugin|
|''Description:''|Save to web a TiddlyWiki|
|''Version:''|4.1.0|
|''Date:''|May 5, 2007|
|''Source:''|http://tiddlywiki.bidix.info/#UploadPlugin|
|''Documentation:''|http://tiddlywiki.bidix.info/#UploadPluginDoc|
|''Author:''|BidiX (BidiX (at) bidix (dot) info)|
|''License:''|[[BSD open source license|http://tiddlywiki.bidix.info/#%5B%5BBSD%20open%20source%20license%5D%5D ]]|
|''~CoreVersion:''|2.2.0 (#3125)|
|''Requires:''|PasswordOptionPlugin|
***/
//{{{
version.extensions.UploadPlugin = {
major: 4, minor: 1, revision: 0,
date: new Date("May 5, 2007"),
source: 'http://tiddlywiki.bidix.info/#UploadPlugin',
author: 'BidiX (BidiX (at) bidix (dot) info',
coreVersion: '2.2.0 (#3125)'
};
//
// Environment
//
if (!window.bidix) window.bidix = {}; // bidix namespace
bidix.debugMode = false; // true to activate both in Plugin and UploadService
//
// Upload Macro
//
config.macros.upload = {
// default values
defaultBackupDir: '', //no backup
defaultStoreScript: "store.php",
defaultToFilename: "index.html",
defaultUploadDir: ".",
authenticateUser: true // UploadService Authenticate User
};
config.macros.upload.label = {
promptOption: "Save and Upload this TiddlyWiki with UploadOptions",
promptParamMacro: "Save and Upload this TiddlyWiki in %0",
saveLabel: "save to web",
saveToDisk: "save to disk",
uploadLabel: "upload"
};
config.macros.upload.messages = {
noStoreUrl: "No store URL in parmeters or options",
usernameOrPasswordMissing: "Username or password missing"
};
config.macros.upload.handler = function(place,macroName,params) {
if (readOnly)
return;
var label;
if (document.location.toString().substr(0,4) == "http")
label = this.label.saveLabel;
else
label = this.label.uploadLabel;
var prompt;
if (params[0]) {
prompt = this.label.promptParamMacro.toString().format([this.destFile(params[0],
(params[1] ? params[1]:bidix.basename(window.location.toString())), params[3])]);
} else {
prompt = this.label.promptOption;
}
createTiddlyButton(place, label, prompt, function() {config.macros.upload.action(params);}, null, null, this.accessKey);
};
config.macros.upload.action = function(params)
{
// for missing macro parameter set value from options
var storeUrl = params[0] ? params[0] : config.options.txtUploadStoreUrl;
var toFilename = params[1] ? params[1] : config.options.txtUploadFilename;
var backupDir = params[2] ? params[2] : config.options.txtUploadBackupDir;
var uploadDir = params[3] ? params[3] : config.options.txtUploadDir;
var username = params[4] ? params[4] : config.options.txtUploadUserName;
var password = config.options.pasUploadPassword; // for security reason no password as macro parameter
// for still missing parameter set default value
if ((!storeUrl) && (document.location.toString().substr(0,4) == "http"))
storeUrl = bidix.dirname(document.location.toString())+'/'+config.macros.upload.defaultStoreScript;
if (storeUrl.substr(0,4) != "http")
storeUrl = bidix.dirname(document.location.toString()) +'/'+ storeUrl;
if (!toFilename)
toFilename = bidix.basename(window.location.toString());
if (!toFilename)
toFilename = config.macros.upload.defaultToFilename;
if (!uploadDir)
uploadDir = config.macros.upload.defaultUploadDir;
if (!backupDir)
backupDir = config.macros.upload.defaultBackupDir;
// report error if still missing
if (!storeUrl) {
alert(config.macros.upload.messages.noStoreUrl);
clearMessage();
return false;
}
if (config.macros.upload.authenticateUser && (!username || !password)) {
alert(config.macros.upload.messages.usernameOrPasswordMissing);
clearMessage();
return false;
}
bidix.upload.uploadChanges(false,null,storeUrl, toFilename, uploadDir, backupDir, username, password);
return false;
};
config.macros.upload.destFile = function(storeUrl, toFilename, uploadDir)
{
if (!storeUrl)
return null;
var dest = bidix.dirname(storeUrl);
if (uploadDir && uploadDir != '.')
dest = dest + '/' + uploadDir;
dest = dest + '/' + toFilename;
return dest;
};
//
// uploadOptions Macro
//
config.macros.uploadOptions = {
handler: function(place,macroName,params) {
var wizard = new Wizard();
wizard.createWizard(place,this.wizardTitle);
wizard.addStep(this.step1Title,this.step1Html);
var markList = wizard.getElement("markList");
var listWrapper = document.createElement("div");
markList.parentNode.insertBefore(listWrapper,markList);
wizard.setValue("listWrapper",listWrapper);
this.refreshOptions(listWrapper,false);
var uploadCaption;
if (document.location.toString().substr(0,4) == "http")
uploadCaption = config.macros.upload.label.saveLabel;
else
uploadCaption = config.macros.upload.label.uploadLabel;
wizard.setButtons([
{caption: uploadCaption, tooltip: config.macros.upload.label.promptOption,
onClick: config.macros.upload.action},
{caption: this.cancelButton, tooltip: this.cancelButtonPrompt, onClick: this.onCancel}
]);
},
refreshOptions: function(listWrapper) {
var uploadOpts = [
"txtUploadUserName",
"pasUploadPassword",
"txtUploadStoreUrl",
"txtUploadDir",
"txtUploadFilename",
"txtUploadBackupDir",
"chkUploadLog",
"txtUploadLogMaxLine",
]
var opts = [];
for(i=0; i<uploadOpts.length; i++) {
var opt = {};
opts.push()
opt.option = "";
n = uploadOpts[i];
opt.name = n;
opt.lowlight = !config.optionsDesc[n];
opt.description = opt.lowlight ? this.unknownDescription : config.optionsDesc[n];
opts.push(opt);
}
var listview = ListView.create(listWrapper,opts,this.listViewTemplate);
for(n=0; n<opts.length; n++) {
var type = opts[n].name.substr(0,3);
var h = config.macros.option.types[type];
if (h && h.create) {
h.create(opts[n].colElements['option'],type,opts[n].name,opts[n].name,"no");
}
}
},
onCancel: function(e)
{
backstage.switchTab(null);
return false;
},
wizardTitle: "Upload with options",
step1Title: "These options are saved in cookies in your browser",
step1Html: "<input type='hidden' name='markList'></input><br>",
cancelButton: "Cancel",
cancelButtonPrompt: "Cancel prompt",
listViewTemplate: {
columns: [
{name: 'Description', field: 'description', title: "Description", type: 'WikiText'},
{name: 'Option', field: 'option', title: "Option", type: 'String'},
{name: 'Name', field: 'name', title: "Name", type: 'String'}
],
rowClasses: [
{className: 'lowlight', field: 'lowlight'}
]}
}
//
// upload functions
//
if (!bidix.upload) bidix.upload = {};
if (!bidix.upload.messages) bidix.upload.messages = {
//from saving
invalidFileError: "The original file '%0' does not appear to be a valid TiddlyWiki",
backupSaved: "Backup saved",
backupFailed: "Failed to upload backup file",
rssSaved: "RSS feed uploaded",
rssFailed: "Failed to upload RSS feed file",
emptySaved: "Empty template uploaded",
emptyFailed: "Failed to upload empty template file",
mainSaved: "Main TiddlyWiki file uploaded",
mainFailed: "Failed to upload main TiddlyWiki file. Your changes have not been saved",
//specific upload
loadOriginalHttpPostError: "Can't get original file",
aboutToSaveOnHttpPost: 'About to upload on %0 ...',
storePhpNotFound: "The store script '%0' was not found."
};
bidix.upload.uploadChanges = function(onlyIfDirty,tiddlers,storeUrl,toFilename,uploadDir,backupDir,username,password)
{
var callback = function(status,uploadParams,original,url,xhr) {
if (!status) {
displayMessage(bidix.upload.messages.loadOriginalHttpPostError);
return;
}
if (bidix.debugMode)
alert(original.substr(0,500)+"\n...");
// Locate the storeArea div's
var posDiv = locateStoreArea(original);
if((posDiv[0] == -1) || (posDiv[1] == -1)) {
alert(config.messages.invalidFileError.format([localPath]));
return;
}
bidix.upload.uploadRss(uploadParams,original,posDiv);
};
if(onlyIfDirty && !store.isDirty())
return;
clearMessage();
// save on localdisk ?
if (document.location.toString().substr(0,4) == "file") {
var path = document.location.toString();
var localPath = getLocalPath(path);
saveChanges();
}
// get original
var uploadParams = Array(storeUrl,toFilename,uploadDir,backupDir,username,password);
var originalPath = document.location.toString();
// If url is a directory : add index.html
if (originalPath.charAt(originalPath.length-1) == "/")
originalPath = originalPath + "index.html";
var dest = config.macros.upload.destFile(storeUrl,toFilename,uploadDir);
var log = new bidix.UploadLog();
log.startUpload(storeUrl, dest, uploadDir, backupDir);
displayMessage(bidix.upload.messages.aboutToSaveOnHttpPost.format([dest]));
if (bidix.debugMode)
alert("about to execute Http - GET on "+originalPath);
var r = doHttp("GET",originalPath,null,null,null,null,callback,uploadParams,null);
if (typeof r == "string")
displayMessage(r);
return r;
};
bidix.upload.uploadRss = function(uploadParams,original,posDiv)
{
var callback = function(status,params,responseText,url,xhr) {
if(status) {
var destfile = responseText.substring(responseText.indexOf("destfile:")+9,responseText.indexOf("\n", responseText.indexOf("destfile:")));
displayMessage(bidix.upload.messages.rssSaved,bidix.dirname(url)+'/'+destfile);
bidix.upload.uploadMain(params[0],params[1],params[2]);
} else {
displayMessage(bidix.upload.messages.rssFailed);
}
};
// do uploadRss
if(config.options.chkGenerateAnRssFeed) {
var rssPath = uploadParams[1].substr(0,uploadParams[1].lastIndexOf(".")) + ".xml";
var rssUploadParams = Array(uploadParams[0],rssPath,uploadParams[2],'',uploadParams[4],uploadParams[5]);
bidix.upload.httpUpload(rssUploadParams,convertUnicodeToUTF8(generateRss()),callback,Array(uploadParams,original,posDiv));
} else {
bidix.upload.uploadMain(uploadParams,original,posDiv);
}
};
bidix.upload.uploadMain = function(uploadParams,original,posDiv)
{
var callback = function(status,params,responseText,url,xhr) {
var log = new bidix.UploadLog();
if(status) {
// if backupDir specified
if ((params[3]) && (responseText.indexOf("backupfile:") > -1)) {
var backupfile = responseText.substring(responseText.indexOf("backupfile:")+11,responseText.indexOf("\n", responseText.indexOf("backupfile:")));
displayMessage(bidix.upload.messages.backupSaved,bidix.dirname(url)+'/'+backupfile);
}
var destfile = responseText.substring(responseText.indexOf("destfile:")+9,responseText.indexOf("\n", responseText.indexOf("destfile:")));
displayMessage(bidix.upload.messages.mainSaved,bidix.dirname(url)+'/'+destfile);
store.setDirty(false);
log.endUpload("ok");
} else {
alert(bidix.upload.messages.mainFailed);
displayMessage(bidix.upload.messages.mainFailed);
log.endUpload("failed");
}
};
// do uploadMain
var revised = bidix.upload.updateOriginal(original,posDiv);
bidix.upload.httpUpload(uploadParams,revised,callback,uploadParams);
};
bidix.upload.httpUpload = function(uploadParams,data,callback,params)
{
var localCallback = function(status,params,responseText,url,xhr) {
url = (url.indexOf("nocache=") < 0 ? url : url.substring(0,url.indexOf("nocache=")-1));
if (xhr.status == httpStatus.NotFound)
alert(bidix.upload.messages.storePhpNotFound.format([url]));
if ((bidix.debugMode) || (responseText.indexOf("Debug mode") >= 0 )) {
alert(responseText);
if (responseText.indexOf("Debug mode") >= 0 )
responseText = responseText.substring(responseText.indexOf("\n\n")+2);
} else if (responseText.charAt(0) != '0')
alert(responseText);
if (responseText.charAt(0) != '0')
status = null;
callback(status,params,responseText,url,xhr);
};
// do httpUpload
var boundary = "---------------------------"+"AaB03x";
var uploadFormName = "UploadPlugin";
// compose headers data
var sheader = "";
sheader += "--" + boundary + "\r\nContent-disposition: form-data; name=\"";
sheader += uploadFormName +"\"\r\n\r\n";
sheader += "backupDir="+uploadParams[3] +
";user=" + uploadParams[4] +
";password=" + uploadParams[5] +
";uploaddir=" + uploadParams[2];
if (bidix.debugMode)
sheader += ";debug=1";
sheader += ";;\r\n";
sheader += "\r\n" + "--" + boundary + "\r\n";
sheader += "Content-disposition: form-data; name=\"userfile\"; filename=\""+uploadParams[1]+"\"\r\n";
sheader += "Content-Type: text/html;charset=UTF-8" + "\r\n";
sheader += "Content-Length: " + data.length + "\r\n\r\n";
// compose trailer data
var strailer = new String();
strailer = "\r\n--" + boundary + "--\r\n";
data = sheader + data + strailer;
if (bidix.debugMode) alert("about to execute Http - POST on "+uploadParams[0]+"\n with \n"+data.substr(0,500)+ " ... ");
var r = doHttp("POST",uploadParams[0],data,"multipart/form-data; boundary="+boundary,uploadParams[4],uploadParams[5],localCallback,params,null);
if (typeof r == "string")
displayMessage(r);
return r;
};
// same as Saving's updateOriginal but without convertUnicodeToUTF8 calls
bidix.upload.updateOriginal = function(original, posDiv)
{
if (!posDiv)
posDiv = locateStoreArea(original);
if((posDiv[0] == -1) || (posDiv[1] == -1)) {
alert(config.messages.invalidFileError.format([localPath]));
return;
}
var revised = original.substr(0,posDiv[0] + startSaveArea.length) + "\n" +
store.allTiddlersAsHtml() + "\n" +
original.substr(posDiv[1]);
var newSiteTitle = getPageTitle().htmlEncode();
revised = revised.replaceChunk("<title"+">","</title"+">"," " + newSiteTitle + " ");
revised = updateMarkupBlock(revised,"PRE-HEAD","MarkupPreHead");
revised = updateMarkupBlock(revised,"POST-HEAD","MarkupPostHead");
revised = updateMarkupBlock(revised,"PRE-BODY","MarkupPreBody");
revised = updateMarkupBlock(revised,"POST-SCRIPT","MarkupPostBody");
return revised;
};
//
// UploadLog
//
// config.options.chkUploadLog :
// false : no logging
// true : logging
// config.options.txtUploadLogMaxLine :
// -1 : no limit
// 0 : no Log lines but UploadLog is still in place
// n : the last n lines are only kept
// NaN : no limit (-1)
bidix.UploadLog = function() {
if (!config.options.chkUploadLog)
return; // this.tiddler = null
this.tiddler = store.getTiddler("UploadLog");
if (!this.tiddler) {
this.tiddler = new Tiddler();
this.tiddler.title = "UploadLog";
this.tiddler.text = "| !date | !user | !location | !storeUrl | !uploadDir | !toFilename | !backupdir | !origin |";
this.tiddler.created = new Date();
this.tiddler.modifier = config.options.txtUserName;
this.tiddler.modified = new Date();
store.addTiddler(this.tiddler);
}
return this;
};
bidix.UploadLog.prototype.addText = function(text) {
if (!this.tiddler)
return;
// retrieve maxLine when we need it
var maxLine = parseInt(config.options.txtUploadLogMaxLine,10);
if (isNaN(maxLine))
maxLine = -1;
// add text
if (maxLine != 0)
this.tiddler.text = this.tiddler.text + text;
// Trunck to maxLine
if (maxLine >= 0) {
var textArray = this.tiddler.text.split('\n');
if (textArray.length > maxLine + 1)
textArray.splice(1,textArray.length-1-maxLine);
this.tiddler.text = textArray.join('\n');
}
// update tiddler fields
this.tiddler.modifier = config.options.txtUserName;
this.tiddler.modified = new Date();
store.addTiddler(this.tiddler);
// refresh and notifiy for immediate update
story.refreshTiddler(this.tiddler.title);
store.notify(this.tiddler.title, true);
};
bidix.UploadLog.prototype.startUpload = function(storeUrl, toFilename, uploadDir, backupDir) {
if (!this.tiddler)
return;
var now = new Date();
var text = "\n| ";
var filename = bidix.basename(document.location.toString());
if (!filename) filename = '/';
text += now.formatString("0DD/0MM/YYYY 0hh:0mm:0ss") +" | ";
text += config.options.txtUserName + " | ";
text += "[["+filename+"|"+location + "]] |";
text += " [[" + bidix.basename(storeUrl) + "|" + storeUrl + "]] | ";
text += uploadDir + " | ";
text += "[[" + bidix.basename(toFilename) + " | " +toFilename + "]] | ";
text += backupDir + " |";
this.addText(text);
};
bidix.UploadLog.prototype.endUpload = function(status) {
if (!this.tiddler)
return;
this.addText(" "+status+" |");
};
//
// Utilities
//
bidix.checkPlugin = function(plugin, major, minor, revision) {
var ext = version.extensions[plugin];
if (!
(ext &&
((ext.major > major) ||
((ext.major == major) && (ext.minor > minor)) ||
((ext.major == major) && (ext.minor == minor) && (ext.revision >= revision))))) {
// write error in PluginManager
if (pluginInfo)
pluginInfo.log.push("Requires " + plugin + " " + major + "." + minor + "." + revision);
eval(plugin); // generate an error : "Error: ReferenceError: xxxx is not defined"
}
};
bidix.dirname = function(filePath) {
if (!filePath)
return;
var lastpos;
if ((lastpos = filePath.lastIndexOf("/")) != -1) {
return filePath.substring(0, lastpos);
} else {
return filePath.substring(0, filePath.lastIndexOf("\\"));
}
};
bidix.basename = function(filePath) {
if (!filePath)
return;
var lastpos;
if ((lastpos = filePath.lastIndexOf("#")) != -1)
filePath = filePath.substring(0, lastpos);
if ((lastpos = filePath.lastIndexOf("/")) != -1) {
return filePath.substring(lastpos + 1);
} else
return filePath.substring(filePath.lastIndexOf("\\")+1);
};
bidix.initOption = function(name,value) {
if (!config.options[name])
config.options[name] = value;
};
//
// Initializations
//
// require PasswordOptionPlugin 1.0.1 or better
bidix.checkPlugin("PasswordOptionPlugin", 1, 0, 1);
// styleSheet
setStylesheet('.txtUploadStoreUrl, .txtUploadBackupDir, .txtUploadDir {width: 22em;}',"uploadPluginStyles");
//optionsDesc
merge(config.optionsDesc,{
txtUploadStoreUrl: "Url of the UploadService script (default: store.php)",
txtUploadFilename: "Filename of the uploaded file (default: in index.html)",
txtUploadDir: "Relative Directory where to store the file (default: . (downloadService directory))",
txtUploadBackupDir: "Relative Directory where to backup the file. If empty no backup. (default: ''(empty))",
txtUploadUserName: "Upload Username",
pasUploadPassword: "Upload Password",
chkUploadLog: "do Logging in UploadLog (default: true)",
txtUploadLogMaxLine: "Maximum of lines in UploadLog (default: 10)"
});
// Options Initializations
bidix.initOption('txtUploadStoreUrl','');
bidix.initOption('txtUploadFilename','');
bidix.initOption('txtUploadDir','');
bidix.initOption('txtUploadBackupDir','');
bidix.initOption('txtUploadUserName','');
bidix.initOption('pasUploadPassword','');
bidix.initOption('chkUploadLog',true);
bidix.initOption('txtUploadLogMaxLine','10');
/* don't want this for tiddlyspot sites
// Backstage
merge(config.tasks,{
uploadOptions: {text: "upload", tooltip: "Change UploadOptions and Upload", content: '<<uploadOptions>>'}
});
config.backstageTasks.push("uploadOptions");
*/
//}}}
<!--{{{-->
<div class='toolbar'></div>
<div class='title' macro='view title'></div>
<div class='viewer' macro='view text wikified'></div>
<div class='toolbar' macro='slider chkOptionsBar OptionsBar options'></div>
<!--}}}-->
Schools across the country are organizing “red days” on Friday, October 5th to show support for the peaceful demonstrators in Burma. Invite everyone you can to the facebook event.
![[Wear Red for Burma! facebook Event|http://www.facebook.com/event.php?eid=19653206160]]
![[Click Here to Create an Event|http://www.democracyinaction.org/dia/organizations/uscampaignforburma/event/distributedEventSignup.jsp?distributed_event_KEY=324&t=HomePage.dwt]].
![[Downloads]]
!How to get students on your campus involved
1) Start a Facebook event at your school. Invite everyone.
2) Send out emails to all listserves available and ask your friends to do the same
2) Put up banners, posters, dormslips, and tableslips all around campus (download below)
3) Set up tables on main quads and outside dining halls to collect signatures for the petition and hand out Burma “Quick fact sheets” (download below)
4) Pass out red duct tape and red ribbons at tables to start raising awareness during the week, along with fact sheets
5) Work with other groups on campus to get the word out (Amnesty, STAND, other social justice networks)
6) Make sure to contact the local and regional press. This is crucial. Contact school newspaper, alumni publications, town/city newspaper, AP, Reuters, local TV, radio. Everything.
7) Make sure the students know why they are wearing red by having speakers who explain the situation in Burma
8) Put up a photo exhibit with photos from the protests and their aftermath. Some schools are filling the walkways with red-stained sandals as a visual exhibit.
9) Students should definitely take photos and video of the event. Post the pictures on Facebook. Make a youtube video. And send one or two of the best photos to the us at patrick@studentsforburma.org.
It is not too much work. Brown University in Providence, RI organized the event in 48 hours. On Brown's "red day" over 2,500 students wore red and over 400 participated in a silent march followed by speakers. You can do the same. Start by downloading the materials, including posters, handbills, and a Burma quick fact sheet. Please make sure to register the event. Feel free to email us at info@studentsforburma.org if you have any questions.
<<reminder year:2007 month:10 day:5 title:"Across America" >>
We are students all over the world uniting to support the monks and students leading the protests in Burma. Over 500,000 people have peacefully taken to the streets in Burma to demand freedom and democracy. The protests are led by monks and students who are risking their lives to take to the streets. We are showing our solidarity with the monks and students by wearing red this Friday. [[Burma in Brief]]
|!EVENTS|!NEWS|
|<<tiddler showEvents>>|<<tiddlerList top:3 tags:"news" order:"-created" itemTemplate:"!%link\n">>|
|!PETITION|!JOIN|
|<<tiddler PetitionFront>>|<<tiddler Join>>|
|!VIDEOS|>|
| Jimmy Carey's message to Ban Ki Moon<<tiddler YouTube1>> | Journalist Shot by Soldiers<<tiddler YouTube2>> |
<html><object type="application/x-shockwave-flash" style="width:375px; height:290px;" data="http://www.youtube.com/v/FwgwkMc__Es"><param name="movie" value="http://www.youtube.com/v/FwgwkMc__Es"/></object></html>
<html><object type="application/x-shockwave-flash" style="width:375px; height:290px;" data="http://www.youtube.com/v/ir1FQh6rShI"><param name="movie" value="http://www.youtube.com/v/ir1FQh6rShI" /></object></html>
<<showReminders tags:event leadtime:14 format:"!TIDDLER - DIFF, DATE - TITLE">>