Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#16 2004-11-11 22:03:40
- Niloc
- Member

- Registered: 2004-05-15
- Posts: 38
Re: Hack: Notepad
Looks like a cool hack. I plan on installing it soon, looks like it could be very helpful at times.
Great work.
Offline
#17 2004-11-11 22:13:39
- Andrew
- Plugin Author

- Registered: 2004-02-23
- Posts: 730
Re: Hack: Notepad
Ok I’ve fixed the character-escaping issue. Please re-download the <em>txp_notepublic.php </em> & <em>txp_noteprivate.php </em> OR make this simple edit yourselves. (it really is a piece of cake — you gotta love Dean’s Library Of Every Function You’d Ever Need):
For both files, change: <br><br> <code>$note = gps(‘note’);</code><br><br>to<br><br><code>$note = doSlash(gps(‘note’));</code>
Last edited by compooter (2004-11-11 22:16:45)
Offline
#18 2004-11-11 22:53:16
- Andrew
- Plugin Author

- Registered: 2004-02-23
- Posts: 730
Re: Hack: Notepad
ok i just had to post this so that i could break 600 ;-)
Offline
Re: Hack: Notepad
:) congratultions
textpattern.org :: find and share Textpattern resources
docs.textpattern.io :: Textpattern user documentation
Offline
#20 2004-11-17 05:42:46
- Andrew
- Plugin Author

- Registered: 2004-02-23
- Posts: 730
Re: Hack: Notepad
just thought of another reason why this rocks (although it’s more of a side-effect of the weird functionality of links): the notepad also provides a place to keep track of interesting links for those who (like daragh) opt to forego TXP’s “links” and post links grouped together in individual articles.
Offline
Re: Hack: Notepad
Aha! Those pesky apostrophe’s… ;)
Again, thanks muchly. I’ve been dreaming of this since I discovered Textpattern.
Lumilux – A Photoblog
Offline
#22 2004-11-20 19:58:36
- apo
- Member
- From: Germany
- Registered: 2004-10-27
- Posts: 53
Re: Hack: Notepad
uhm… i cannot download your files. whenever i open or download the txtified php files, i get an empty file :-(
Offline
#23 2004-11-20 20:01:23
- Andrew
- Plugin Author

- Registered: 2004-02-23
- Posts: 730
Re: Hack: Notepad
looking into it…
Offline
#24 2004-11-20 20:23:17
- Andrew
- Plugin Author

- Registered: 2004-02-23
- Posts: 730
Re: Hack: Notepad
Shit. I Figured it out and I apologize. It has to do with a AddHandler change I made for mod_security. All fixed now.
Offline
#25 2004-11-20 20:32:15
- apo
- Member
- From: Germany
- Registered: 2004-10-27
- Posts: 53
Re: Hack: Notepad
hehe, no problem. just wanted to install it. at first i thought it was my browser, hehe. thx for fixing that quickly
Offline
Re: Hack: Notepad
Best,
Adam Andrzej Jaworski
See the Future
http://wellness.yourplanet.name
Offline
#27 2004-11-27 02:46:06
- Andrew
- Plugin Author

- Registered: 2004-02-23
- Posts: 730
Re: Hack: Notepad
I just thought of a potential weakness, and I’m not sure how to get around it without a significant change or two. What prompted this consideration was alicson’s wonderful resources site and the fact that at any moment there could potentially be any number of people editing the public notepad. So then we’ve got the checkout/checkin dilemma to solve so that your edits aren’t inadvertently overwritten by someone else, who is also concurrently composing an edit to the existing note.
Any ideas off the top of your collective head?
EDIT
hmm… perhaps i solved it right ^^ there by typing “checkout/checkin”. perhaps the ‘save’ button should be replaced with a ‘checkout’ button? no matter how i slice it though, it seems as though it’d require a db modification.
for most users this wouldn’t be an issue however, likely only using the notepad for personal notes or notes between only a small number of developers/writers. hmm…
Last edited by compooter (2004-11-27 02:51:07)
Offline
Re: Hack: Notepad
is there a way to know how many people are on the site at the same time? how many people are logged in at once? could it have one or two layers, so that … say there are three layers… layer a, b, c…. layer <strong>a</strong> is what everyone sees… layer <strong>b</strong> was the last version right before the edits that made it layer <strong>a</strong>. and layer <strong>c</strong> is what the file was before someone changed it to make it layer <strong>b</strong>. there is that note below to say “last modified by Person: 21:23, 26 Nov 2004”. if you want to make that really useful, have it recognize that someone just updated it within the last 5/10/20/30/45 minutes (one of those… user chosen? *shrug* either way..) and have it say in red: ‘Person modified this within the last 30 minutes.’ and that would alert you to the other layers. :)
i dunno. those are my thoughts off the head top.
*edit: Textile doesn’t always love me
Last edited by alicson (2004-11-27 02:53:51)
textpattern.org :: find and share Textpattern resources
docs.textpattern.io :: Textpattern user documentation
Offline
Re: Hack: Notepad
> compooter wrote:
for most users this wouldn’t be an issue however, likely only using the notepad for personal notes or notes between only a small number of developers/writers. hmm…
this is true ;) with the advent of Manfre’s Self-registration mod, however, i think we may start to see a few more community-oriented sites, that just weren’t really possible before. i plan to be working on at least two more (one’s a personal-type site, one’s for a friend) within the next three months… but that’s me.. i don’t really know how many others would use Textpattern with multiple users..
i’m grateful as it is for the existing notepad hack. any additiional features to it would simply be further bonus. :)
textpattern.org :: find and share Textpattern resources
docs.textpattern.io :: Textpattern user documentation
Offline
#30 2004-12-13 06:01:28
- Andrew
- Plugin Author

- Registered: 2004-02-23
- Posts: 730
Re: Hack: Notepad
I’ve updated both notepad files to v0.3
Changes include:- minor code cleanup
- conflict check for public notepad
The conflict check basically checks before saving to the public notepad if someone else has saved a note in the time it took you to perform your edits. If so, it warns you before saving, tells you who last performed an edit, and gives you the option to “Force Save” over the last user’s edits.
That’s about as good as it’ll get for overwriting prevention, and I think it’s likely as much will ever be needed.
Offline