Commit Graph

189 Commits

Author SHA1 Message Date
Robin Millette
af700ea277 Let's you upload a file with a notice and have it shown with other attachments. 2009-05-26 21:20:04 -04:00
Robin Millette
3b7ee5a5f9 rewrote short url stuff to handle new file/url classes (redirections, oembed, mimetypes, etc.) 2009-05-13 14:27:32 -04:00
Robin Millette
d010d811ba db stuff for URLs: redirections, oembed, etc. 2009-05-11 13:45:00 -04:00
CiaranG
35677336de Catch bad replyto IDs before saving a new notice to avoid a constraint violation. This happens, for example, when posting for the first time on a fresh install 2009-03-03 21:33:52 +00:00
Adrian Lang
210647a56c Fix replyto parameter in newnotice 2009-02-27 15:41:47 -08:00
Evan Prodromou
4ad5d55ecf Add events for filtering and logging new notices 2009-02-13 10:52:26 -05:00
Zach Copley
df41b1307f Removed erroneous comments referring to old common_notice_form() func 2009-02-04 11:55:22 -08:00
Evan Prodromou
2d063650ef Make WebChannel and AjaxWebChannel work
These command-output channels were using the old common_element_*
functions. They now take an $out constructor parameter, and use that
for output.

The WebChannel has pretty remedial output; it would be nice if it
output a real formatted page.
2009-02-04 07:59:30 -05:00
Sarven Capadisli
32b1bb381a Fixed ajaxErrorMsg(). Using startHTML() instead of common_start_html() 2009-02-03 21:46:09 +00:00
Robin Millette
3f0eb90128 removed extraneous argument in startHTML calls 2009-02-02 20:47:57 +00:00
Evan Prodromou
321d52a15c Make newnotice work 2009-01-18 17:06:38 +00:00
sarven
877327a18e Update to XHR post notice 2009-01-16 17:02:46 +00:00
Evan Prodromou
4b0cf99e56 Convert use of common_server_error and common_user_error to methods on Action 2009-01-15 23:03:38 +00:00
Evan Prodromou
eaa81d25fa Convert all actions to use new UI functions
I did a massive search-and-replace to get all the action subclasses to
use the new output function (common_element() -> $this->element(), etc.)

There's still a lot to do, but it's a first step
2009-01-15 22:57:15 +00:00
Evan Prodromou
b264c03d32 move opening brace of class declaration to next line
Another gigantor PEAR coding standards patch. Here, I've moved the
opening curly bracket on a class statement to the following line.

darcs-hash:20081223194923-84dde-77a93de314caadbcb5b70bf346a4648be77a864e.gz
2008-12-23 14:49:23 -05:00
Evan Prodromou
04ef1ba8ee change function headers to K&R style
Another huge change, for PEAR code standards compliance. Function
headers have to be in K&R style (opening brace on its own line),
instead of having the opening brace on the same line as the function
and parameters. So, a little perl magic found all the function
definitions and move the opening brace to the next line (properly
indented... usually).

darcs-hash:20081223193323-84dde-a28e36ecc66672c783c2842d12fc11043c13ab28.gz
2008-12-23 14:33:23 -05:00
Evan Prodromou
eb2f9c98ac replace NULL with null
Another global search-and-replace update. Here, I've replaced the PHP
keyword 'NULL' with its lowercase version. This is another PEAR code
standards change.

darcs-hash:20081223192129-84dde-4a0182e0ec16a01ad88745ad3e08f7cb501aee0b.gz
2008-12-23 14:21:29 -05:00
Evan Prodromou
edbc0c665c replace all tabs with four spaces
The PEAR coding standards decree: no tabs, but indent by four spaces.
I've done a global search-and-replace on all tabs, replacing them by
four spaces. This is a huge change, but it will go a long way to
getting us towards phpcs-compliance. And that means better code
readability, and that means more participation.

darcs-hash:20081223191907-84dde-21e8efe210e6d5d54e935a22d0cee5c7bbfc007d.gz
2008-12-23 14:19:07 -05:00
Sarven Capadisli
946eee4256 Direct message XHR response fix for IE and minor tweaks
darcs-hash:20081216071818-efd22-d2e59bb60a236538452be356f38d0974f35f0107.gz
2008-12-16 02:18:18 -05:00
Sarven Capadisli
867d723548 Indenting the XML response
darcs-hash:20081212030820-efd22-3ee6f5ab50c821e3da5dd6785abb765af168058a.gz
2008-12-11 22:08:20 -05:00
Evan Prodromou
7ed9530273 misspelled INSTALLDIR in newnotice.php
darcs-hash:20081211233515-84dde-184e46fdee817baa3df8e066ca49d759f3b1a899.gz
2008-12-11 18:35:15 -05:00
Evan Prodromou
724a11c250 take out c&p code from newnotice, use noticelist classes instead
darcs-hash:20081211232000-5ed1f-5ed2008f6c8273b7fa653396bff090afb10b030e.gz
2008-12-11 18:20:00 -05:00
Sarven Capadisli
8dd513a8e4 Standardising XHR responses to utf-8 and indenting
darcs-hash:20081211211814-efd22-a41a2b123fcd08945370e868431dc1b2feda4dfe.gz
2008-12-11 16:18:14 -05:00
Zach Copley
407ce3bd8f New AjaxWebChannel for returning ajaxy responses to notice input box commands
darcs-hash:20081209210654-7b5ce-2ef432aa8cb7bf5cc1a973a71eb70e6b2aae4ab6.gz
2008-12-09 16:06:54 -05:00
millette
ce08833303 shorten urls for posts > 140 chars only, from anywhere. Only show long urls in title attributes for links we shortened ourselves.
darcs-hash:20081128210114-099f7-4e4cde0a983c2ac6d41efb59b46cb7dbf45dc7a6.gz
2008-11-28 16:01:14 -05:00
Zach Copley
6d464ec91b Remove a bunch of extraneous logging statements
darcs-hash:20081211024233-7b5ce-e4911c049adf067f24821f868a27bdf67c324caf.gz
2008-12-10 21:42:33 -05:00
Zach Copley
8d8bc706d8 Allow the toggling of XMLWriter's indenting on and off
IE needs and unindented XML response in for ajax calls.

darcs-hash:20081123211348-7b5ce-426c07ee1d1884c691b659e8a9b359bb95afc61e.gz
2008-11-23 16:13:48 -05:00
Zach Copley
63a1b9151a Send raw UTF-8 chars instead of escaped entities in newnotice.php's ajax response
darcs-hash:20081123193727-7b5ce-0771232a9771e1325f937ccc87e6ba319dd97590.gz
2008-11-23 14:37:27 -05:00
Zach Copley
7cb0609e72 Set encoding for xml response in newnotice.php to UTF-8
darcs-hash:20081123183613-7b5ce-9c6bd2b2efb679bce9f710f5f5ad9c48bf652e29.gz
2008-11-23 13:36:13 -05:00
Zach Copley
fbfbe7fbc7 Don't display avatars when posting to personal streams via ajax
darcs-hash:20081123022902-7b5ce-fbdd4e9a3df3e206caec0ca37c10a2e0a58cef85.gz
2008-11-22 21:29:02 -05:00
csarven
04a4e883f0 PostNotice AJAX working in all browsers except IE
darcs-hash:20081123015559-eefa4-5ce05e6e79236c6d5ebc87f0aa3ec4de51bae130.gz
2008-11-22 20:55:59 -05:00
Evan Prodromou
cc10e1505f merge save and ajax save
darcs-hash:20081123014003-84dde-ea8f5d167a544617efb22bb0c553f18d718a65c6.gz
2008-11-22 20:40:03 -05:00
Zach Copley
b2285dcb56 EXPERIMENTAL PATCH #3 - ajax response for newnotice.php
darcs-hash:20081122043145-7b5ce-0fc4b2ed06e29437c54e3c2f1a64b6d0fbeb9058.gz
2008-11-21 23:31:45 -05:00
zach
158d6ba1f4 Conflict resolution patch for newnotice.php (zach vs. millette)
darcs-hash:20081113195237-462f3-35c44753490c57e30d0adf661ae4c8a08af7e39c.gz
2008-11-13 14:52:37 -05:00
millette
5fc9f11677 trac31 shorten all URLs even if notice is already <
darcs-hash:20081113153216-099f7-81c4aba01babca97edeaf55b230dee300dbeb57a.gz
2008-11-13 10:32:16 -05:00
millette
15c1d4f5e4 trac31 url_auto_shortening by sgmurphy
darcs-hash:20081106205926-099f7-6bcfd7969a159a12b1ba6a9ee254e44a07b94761.gz
2008-11-06 15:59:26 -05:00
zach
1e8d26baec CSRF Protection for login and new notice. Ticket #503
darcs-hash:20081111022330-462f3-810b2a86e6e209330ade628fc0e97df96151d496.gz
2008-11-10 21:23:30 -05:00
Evan Prodromou
44a90a7fa7 accidentally setting replies to 'false'
darcs-hash:20081020174956-5ed1f-f0a632482ab9d2f2d15baa3a524bc312d7be5755.gz
2008-10-20 13:49:56 -04:00
Evan Prodromou
278f5cf842 correct number of args to saveNew in newnotice
darcs-hash:20081020173108-5ed1f-06b346f0f341bf8401d29dcf725db69c5d26cc14.gz
2008-10-20 13:31:08 -04:00
Evan Prodromou
613b75e7b7 add a little debugging for replyto
darcs-hash:20081020171033-5ed1f-00bdf131a25c86ae1d400a238eee070cb19ebec9.gz
2008-10-20 13:10:33 -04:00
Evan Prodromou
f2e3021b59 try to make replies point to the clicked-on notice
darcs-hash:20081020170245-5ed1f-b84f63d9d9b589bd18f97924db547e348beb6647.gz
2008-10-20 13:02:45 -04:00
Evan Prodromou
bdeba50c34 text -> content in newnotice
darcs-hash:20081004170136-5ed1f-4eca2ee2c7ebb7f2d3c6b49ecd634a8ceee28054.gz
2008-10-04 13:01:36 -04:00
Evan Prodromou
f072147e4e add channels and use command interpreter in different channels
darcs-hash:20081004163213-5ed1f-684ecb464e843b1bbe456c348e56b40a39a83ecd.gz
2008-10-04 12:32:13 -04:00
Evan Prodromou
bee7caaafc debug for content too long
darcs-hash:20080817152419-84dde-5df1554695bd8560e5affa0ff74f7d0ab7c7c3ff.gz
2008-08-17 11:24:19 -04:00
Evan Prodromou
164a15d253 accept 140-character UTF-8 strings to content
darcs-hash:20080817151751-84dde-b3fc3ee57872f53a465fd9b45f4255e5e3be3450.gz
2008-08-17 11:17:51 -04:00
Evan Prodromou
0bba990e2f fix problem with new notices
darcs-hash:20080811181158-84dde-338f926bd4c161ea55ef8600fac254f216413ad4.gz
2008-08-11 14:11:58 -04:00
Evan Prodromou
d79dc8344b refactor notice-adding code to one static method on Notice
darcs-hash:20080730022856-84dde-f19e4ff5d5ae2603b63b8aebd8f878ec90b3ce22.gz
2008-07-29 22:28:56 -04:00
Mike Cochrane
5d84485001 First cut at hastags support.
darcs-hash:20080720055702-533db-193ed842b0d0a952bef71a3c5287213ada0ef15c.gz
2008-07-20 01:57:02 -04:00
zach
7e6870db91 base class is_readonly() now returns false by default
darcs-hash:20080722212056-ca946-e4bd9eef8e3d8991414932e9fc7b8c9a31f818c0.gz
2008-07-22 17:20:56 -04:00
zach
038f762bce Added is_readonly() method to all Actions
darcs-hash:20080722171501-ca946-160bad6c4f80be2b3b105ea9b913f1c0f9edb0ef.gz
2008-07-22 13:15:01 -04:00
Evan Prodromou
b1282b1b9f mark incoming notices as local or not
darcs-hash:20080722141828-84dde-160fe4582c1949af1f6b049b3336cad493e30510.gz
2008-07-22 10:18:28 -04:00
Mike Cochrane
834c21b2aa Merge some gettext strings to one line so translation tools are happier
darcs-hash:20080713044608-533db-ee16aecee9b6d82b22ce6a25f6a9573c23eee9f8.gz
2008-07-13 00:46:08 -04:00
Mike Cochrane
4b656f47df Merge conflicts and kill a whole lot of trailing whitespace on lines.
darcs-hash:20080709224630-533db-b5399baef280133858dac9b89c2cd6a2aba9f861.gz
2008-07-09 18:46:30 -04:00
Mike Cochrane
0f502b8d86 Remove tralling whitespace on lines and a gettext replacement that I missed.
darcs-hash:20080708095113-533db-ad63bbde67b6275fb7ae944cc9882adf6f3be517.gz
2008-07-08 05:51:13 -04:00
Mike Cochrane
87b494f1eb Convert _t() to _() for gettext.
darcs-hash:20080708094531-533db-83399a46e6ec4c0fcc6249b0235961f969d1ae73.gz
2008-07-08 05:45:31 -04:00
Evan Prodromou
63f1fb4259 store rendered content on save; display pre-rendered content
darcs-hash:20080709195238-84dde-a5df98439faaf7058571b5e345f165adece9c7b8.gz
2008-07-09 15:52:38 -04:00
Evan Prodromou
8c575041dc remove current notice code which doesn't seem to do anything
darcs-hash:20080709073305-84dde-9e7f0d367ab9f3f762031501eb4c83f6410c6da7.gz
2008-07-09 03:33:05 -04:00
Evan Prodromou
fcf376e90f format replyto name correctly
darcs-hash:20080709072953-84dde-5ebea95c28e535c8bdd5255354910a6f92903b92.gz
2008-07-09 03:29:53 -04:00
Evan Prodromou
a7db6216fa fallback to newnotice on reply button, new button with mouseover
darcs-hash:20080709071439-84dde-f85f0e97f7c14bb77b7174f281e3e9f75c23cac1.gz
2008-07-09 03:14:39 -04:00
Evan Prodromou
8d3ec9c920 twiddle a few bits to make replies work correctly
darcs-hash:20080707054358-84dde-916977a2af4f792e0dc9e02a9f5344ec60911319.gz
2008-07-07 01:43:58 -04:00
Evan Prodromou
ab3e1556ba fixup conflicts
darcs-hash:20080706221758-84dde-5e222a282f9a1bd242d2653700c444e93e21cc7f.gz
2008-07-06 18:17:58 -04:00
matthew.gregg
0b21ac3dd7 First pass at replies support http://laconi.ca/PITS/00080
Doesn't handle a reply to a user that has never updated.

darcs-hash:20080623030837-982e4-532ccd8899fd8be00575f8840da0defb44cd56f8.gz
2008-06-22 23:08:37 -04:00
Evan Prodromou
d34fc127a5 better handling of too-long messages
darcs-hash:20080626214654-34904-68a52888deaaca54fe39bcd77ae51997aa3a3959.gz
2008-06-26 17:46:54 -04:00
Evan Prodromou
15a09c5d69 change from using tag uris to http urls for identifiers
Weirdly, I got in an argument with Tim Berners-Lee in #swig about the
tag URIs I was using in FOAF documents. Eventually, I was convinced
that it's a better thing to use HTTP URLs instead. So, now we have
HTTP URLs.

The tricky thing was for users. Since they can change their names, we
can't use their profile URL, since it includes the name. Instead, I
made up a new action, which simply redirects from a user ID to their
current profile URL. This should be sufficiently long-term.

darcs-hash:20080620071700-84dde-c6145243dc45dd2dff621aff421375d05796057e.gz
2008-06-20 03:17:00 -04:00
Evan Prodromou
50c7e4c722 posting from a form takes you back to the same page
darcs-hash:20080619161814-5ed1f-5add55346470e71a53a676d39617062acc0f19bf.gz
2008-06-19 12:18:14 -04:00
Evan Prodromou
dd0b341b64 first steps towards new skin
darcs-hash:20080610185238-84dde-c073065f5f802be39b97a23105613fac1eeb0bea.gz
2008-06-10 14:52:38 -04:00
Evan Prodromou
a39bb63ebd add tags on creation of notices and users
darcs-hash:20080522185500-84dde-39a66d36d2c80ff57e2ab2d0274548770c4d06f7.gz
2008-05-22 14:55:00 -04:00
Evan Prodromou
55fdd0b981 move error display to save_new_notice
darcs-hash:20080521123106-84dde-2ad51d79df069cdba4102a4545640260bf5aa8b1.gz
2008-05-21 08:31:06 -04:00
Evan Prodromou
659feb5f43 correct error-handling in newnotice
darcs-hash:20080521122604-84dde-bfcfe7b2a254f19ce56054f6e4c80317ed8aaf86.gz
2008-05-21 08:26:04 -04:00
Evan Prodromou
764a391d19 validation in form handlers
Moved validation code from classes to form handlers. Probably better
in the classes, but I can't quite grok the validate() method in
DB_DataObject, so for now I'm going to do it the old-fashioned way.

darcs-hash:20080521112707-84dde-38e27199b977ae81171b8391fbdb93ebb54494f9.gz
2008-05-21 07:27:07 -04:00
Evan Prodromou
82c05d389a fixup textarea again
darcs-hash:20080520212319-84dde-27601a4e11dd6a34834f4689c316dae594d8d7e8.gz
2008-05-20 17:23:19 -04:00
Evan Prodromou
63758c59e1 reformat showstream
darcs-hash:20080520201120-84dde-4b455d4e4854454cc78be8c636a3e0c7f730b93a.gz
2008-05-20 16:11:20 -04:00
Evan Prodromou
52600ce0b0 trim whitespace
darcs-hash:20080520191412-84dde-a607dbe848279639630edd1ab4616d05cc2318d1.gz
2008-05-20 15:14:12 -04:00
Evan Prodromou
3f5ededc01 call validate before saving objects
darcs-hash:20080520191032-84dde-64197121c93cd4cf3cbc614badff0bd44547f9f9.gz
2008-05-20 15:10:32 -04:00
Evan Prodromou
6f6aed8213 better forms for new theme
darcs-hash:20080520174759-84dde-7206aeef3246b2304d463b121a6b17c7f3f2f6d5.gz
2008-05-20 13:47:59 -04:00
Evan Prodromou
e70b7d3a6c add a space to textarea
darcs-hash:20080520133825-84dde-10a3623b12380f12386a8bbbe06cb130902bff8e.gz
2008-05-20 09:38:25 -04:00
Evan Prodromou
9c16a5a9ef fix calling for textarea elements
darcs-hash:20080520133220-84dde-86eed983511b6e529b49212d10338d45d3e7691e.gz
2008-05-20 09:32:20 -04:00
Evan Prodromou
2e07d5cf01 change textarea to start and end
darcs-hash:20080520133008-84dde-efc5b05e3576a56dd692f404eb028d867a7981bf.gz
2008-05-20 09:30:08 -04:00
Evan Prodromou
749178f343 better headers
Added H1 headers to all pages. Added H2 headers to sections of pages,
where appropriate.

Moved a lot of TODOs around.

Made the public stream the default if no action is specified.

darcs-hash:20080519141219-84dde-f9917a8351596060faa7ff5d231417773764a8fd.gz
2008-05-19 10:12:19 -04:00
Evan Prodromou
564694c2f1 use cast object for datetimes
darcs-hash:20080517201411-84dde-7a6195517a5bded7b84266f61c035e2adbc49edd.gz
2008-05-17 16:14:11 -04:00
Evan Prodromou
a88e18e5af fix typo in newnotice
there was a typo, and I removed it.

darcs-hash:20080517195724-84dde-9a5bbde2f8be89dbeaf255e6ae8c5f392af63c64.gz
2008-05-17 15:57:24 -04:00
Evan Prodromou
466f0489c3 fix created, messages
darcs-hash:20080517195201-84dde-8f8269284e5fc00e9f2a6d8187059d0f59eae007.gz
2008-05-17 15:52:01 -04:00
Evan Prodromou
8c98caef57 fix button on newnotice
darcs-hash:20080517194003-84dde-fb9334c5cfa7654d09b770132d284d5fa8d7b4ca.gz
2008-05-17 15:40:03 -04:00
Evan Prodromou
a654d63eb0 fix check for POST
darcs-hash:20080517171501-84dde-b8d6a1cc106372c9127d73442b4740f2de7e7b22.gz
2008-05-17 13:15:01 -04:00
Evan Prodromou
1a15570339 common_start_element -> common_element_start
darcs-hash:20080517170430-84dde-74f42b52695699f646b65b939f78fbbe95a05c7e.gz
2008-05-17 13:04:30 -04:00
Evan Prodromou
3b14b7901c fixes to make it all lint
Ran everything through php -l, found out that it didn't compile.

So: fixed the am-I-running-in-Laconica check at the top of each file.
Some syntax fixes in shownotice, showstream, common.

darcs-hash:20080517154701-84dde-8d38da89c5b9cb3b40704adb04a4de880c204181.gz
2008-05-17 11:47:01 -04:00
Evan Prodromou
2d58199266 more twiddling
Placeholder for broadcasting notice updates.

Fixup the local url function to include server and path.

Add server and path to configuration array.

Make new notice 303 redirect to shownotice.

Make redirects work.

Add link in streams to notices.

darcs-hash:20080517144642-84dde-c267a6e3bb0717ad5a3a819a7cf65fdd5817ea8e.gz
2008-05-17 10:46:42 -04:00
Evan Prodromou
b6cfd2dffe license block for source code
Added GNU Affero GPL license block to source code.

Added name "LACONICA". I think it should work fine.

darcs-hash:20080514192648-84dde-a430dc438a4e3741c62ccf30ee7f85ecc968b159.gz
2008-05-14 15:26:48 -04:00
Evan Prodromou
67a347bafb considerable coding
darcs-hash:20080514145436-84dde-d0994cb35d3fe8545d3f08abeec3cdfe7559c67d.gz
2008-05-14 10:54:36 -04:00