Thomas Willingham
0130fb077f
Cruft left over from stuff we don't have anymore.
2014-12-26 16:59:52 +00:00
friendica
50244f943d
minor photo flag issue - and some more whitespace edits
2014-11-19 16:29:35 -08:00
friendica
3224848bad
turn the "adult photo flagging" (which prevents a particularly flagged photo from showing up in your top level albums) into a feature so it doesn't clutter the normal photo edit form. This feature was a quick hack and needs more work; but it could be important to somebody.
2014-11-18 19:02:28 -08:00
Habeas Codice
4fa0df2927
another one
2014-11-17 16:01:17 -08:00
Habeas Codice
96427a23a3
Merge branch 'master' of https://github.com/habeascodice/red
2014-11-17 15:15:02 -08:00
Habeas Codice
bcaa32a83a
fix boolean
2014-11-17 15:13:49 -08:00
marijus
8b1e83128a
fix lost $sql_extra in recent sql query changes
2014-11-15 14:39:36 +01:00
Habeas Codice
ac27db22c1
Merge remote-tracking branch 'upstream/master'
...
Conflicts:
boot.php
include/dba/dba_driver.php
include/diaspora.php
include/follow.php
include/session.php
include/zot.php
mod/photos.php
mod/ping.php
2014-11-13 13:06:31 -08:00
Habeas Codice
1a5a5c7edb
PostgreSQL support initial commit
...
There were 11 main types of changes:
- UPDATE's and DELETE's sometimes had LIMIT 1 at the end of them. This is not only non-compliant but
it would certainly not do what whoever wrote it thought it would. It is likely this mistake was just
copied from Friendica. All of these instances, the LIMIT 1 was simply removed.
- Bitwise operations (and even some non-zero int checks) erroneously rely on MySQL implicit
integer-boolean conversion in the WHERE clauses. This is non-compliant (and bad programming practice
to boot). Proper explicit boolean conversions were added. New queries should use proper conventions.
- MySQL has a different operator for bitwise XOR than postgres. Rather than add yet another dba_
func, I converted them to "& ~" ("AND NOT") when turning off, and "|" ("OR") when turning on. There
were no true toggles (XOR). New queries should refrain from using XOR when not necessary.
- There are several fields which the schema has marked as NOT NULL, but the inserts don't specify
them. The reason this works is because mysql totally ignores the constraint and adds an empty text
default automatically. Again, non-compliant, obviously. In these cases a default of empty text was
added.
- Several statements rely on a non-standard MySQL feature
(http://dev.mysql.com/doc/refman/5.5/en/group-by-handling.html ). These queries can all be rewritten
to be standards compliant. Interestingly enough, the newly rewritten standards compliant queries run
a zillion times faster, even on MySQL.
- A couple of function/operator name translations were needed (RAND/RANDOM, GROUP_CONCAT/STRING_AGG,
UTC_NOW, REGEXP/~, ^/#) -- assist functions added in the dba_
- INTERVALs: postgres requires quotes around the value, mysql requires that there are not quotes
around the value -- assist functions added in the dba_
- NULL_DATE's -- Postgres does not allow the invalid date '0000-00-00 00:00:00' (there is no such
thing as year 0 or month 0 or day 0). We use '0001-01-01 00:00:00' for postgres. Conversions are
handled in Zot/item packets automagically by quoting all dates with dbescdate().
- char(##) specifications in the schema creates fields with blank spaces that aren't trimmed in the
code. MySQL apparently treats char(##) as varchar(##), again, non-compliant. Since postgres works
better with text fields anyway, this ball of bugs was simply side-stepped by using 'text' datatype
for all text fields in the postgres schema. varchar was used in a couple of places where it actually
seemed appropriate (size constraint), but without rigorously vetting that all of the PHP code
actually validates data, new bugs might come out from under the rug.
- postgres doesn't store nul bytes and a few other non-printables in text fields, even when quoted.
bytea fields were used when storing binary data (photo.data, attach.data). A new dbescbin() function
was added to handle this transparently.
- postgres does not support LIMIT #,# syntax. All databases support LIMIT # OFFSET # syntax.
Statements were updated to be standard.
These changes require corresponding changes in the coding standards. Please review those before
adding any code going forward.
Still on my TODO list:
- remove quotes from non-reserved identifiers and make reserved identifiers use dba func for quoting
- Rewrite search queries for better results (both MySQL and Postgres)
2014-11-13 12:21:58 -08:00
friendica
b6ae56b069
Merge https://github.com/friendica/red into pending_merge
2014-11-07 05:16:14 -08:00
friendica
1cc1bc8e81
fix broken photo edits when adult flag is changed
2014-11-07 05:15:39 -08:00
marijus
2cfe0f1545
provide lockstate for photo edit
2014-11-07 12:13:38 +01:00
friendica
1fbd1a79c7
Provide a way to mark photos as adult and hide them from the default album view. Still need a button or setting to enable "unsafe viewing". This has no effect anywhere but in the album views. They can still be viewed by flipping through the individual photos with 'prev' and 'next'. We probably need a comprehensive strategy for how to deal with n-s-f-w photos in albums so consider this a band-aid which requires additional work and integration with other facilities which access these photos. It is entirely optional.
2014-11-06 17:27:28 -08:00
marijus
5e7e8d1089
provide a lockstate for photo uploads
2014-11-06 11:57:33 +01:00
marijus
287d5e0f10
if uploading a photo go away to album
2014-11-03 11:19:27 +01:00
marijus
2f85d12a6c
if deleting a photo go away to album
2014-11-03 10:46:57 +01:00
marijus
dc5e05d334
even more photos work
2014-11-01 23:55:36 +01:00
marijus
5d151b9886
do not reload page for photo upload
2014-10-31 20:25:43 +01:00
marijus
2982212797
more work on photo upload
2014-10-31 14:33:41 +01:00
marijus
0ff4d9015b
some work on photo upload
2014-10-30 14:10:55 +01:00
friendica
653305889c
Merge https://github.com/friendica/red into pending_merge
2014-10-28 04:18:35 -07:00
friendica
36110831cb
change photo tag bubble tip
2014-10-28 04:18:08 -07:00
marijus
ec8bab7784
change the way tagrm works to allow tag removal on the fly
2014-10-28 11:56:00 +01:00
marijus
d192bcad65
do not reload page for edit album and some minor cleanup
2014-10-27 21:31:54 +01:00
friendica
95de759766
a couple of photo tag issues
2014-10-26 21:37:59 -07:00
marijus
6497e78956
some work on photos like/dislike
2014-10-25 15:23:20 +02:00
marijus
11e8fe3085
more work on photos
2014-10-20 15:05:33 +02:00
friendica
bae3029c63
merge madness
2014-10-19 16:12:05 -07:00
marijus
997ec0911c
$comments > $commentbox
2014-10-15 22:41:42 +02:00
marijus
04a254d94a
some work on single photo view comments
2014-10-15 22:23:38 +02:00
marijus
dc23030dcb
one more item_id > id
2014-10-15 21:17:07 +02:00
marijus
0c2d9edd83
it seems we do not have an key called item_id here so must be id only
2014-10-15 21:15:20 +02:00
marijus
55b75381ad
it seems this is needed also to not allow editing profile photo album
2014-10-03 19:15:37 +02:00
marijus
df70c2c9b6
more work on photos
2014-10-02 21:04:50 +02:00
marijus
97c6ba77c7
some more work on photos
2014-09-28 23:14:49 +02:00
marijus
b948ab5955
some more work on photos - work in progress
2014-09-26 12:29:07 +02:00
marijus
9feb619bea
update jg to latest preview release and try once more to really justify the whole gallery
2014-09-20 15:40:40 +02:00
marijus
1f16bad9d9
set items/page back to 60
2014-09-11 13:07:08 +02:00
marijus
5e54f47097
content-complete must not be in photo-album-contents
2014-09-11 12:42:16 +02:00
marijus
15ef4fea78
typo
2014-09-11 12:33:47 +02:00
marijus
3caee72aee
another day another concept - hope this works better
2014-09-11 10:41:11 +02:00
friendica
b1254a71bc
wrap photo albums (albums and top level) in a div id=photo-album-contents
2014-09-08 16:28:02 -07:00
friendica
75fc3a8ceb
for webpages, hide the mimetype selector unless in advanced mode. For pages that endless scroll and show blocky-block things, set the default items-per-page to 60. Why? It fits column-widths of 2,3,4,5,6,10,12,15, and 20 without leaving remaindered items dangling at the end. No other setting less than 100 has this much versatility.
2014-09-07 19:16:48 -07:00
friendica
b9f221637b
and more ajax work
2014-09-06 00:48:00 -07:00
friendica
28b75b028d
ajax work
2014-09-06 00:37:15 -07:00
friendica
41aa9e13cf
doc update
2014-08-15 06:05:52 -07:00
friendica
1978500e8f
pkcs1 to pkcs8 key conversion - this is a lot easier than parsing ASN.1 DER formats and rebuilding the darn things like we used to do. Check for illegal hex encoded album names in mod/photo so we don't throw php errors. Don't know where they come from but we get a lot of them.
2014-08-14 23:05:19 -07:00
Klaus Weidenbach
2504d4c2a2
Add HTML5 datalist to edit photo album field.
...
This patch provides a datalist for the edit photo album field.
This makes it easier to move a picture to another existing folder in
the way that it provides a list of all available albums as values for
the album field.
2014-06-22 01:33:13 +02:00
friendica
c16b403cf7
oh this is nice... http://kmkeen.com/jshon - this is what we need to make shred -- well "shred". I also had to change the photos album list API a bit to fix any imagined and/or real parsing issues and also fixed shred so it can find its auxiliary files.
2014-06-18 16:26:27 -07:00
friendica
0f6c321e3f
only show jotnets when posting conversation items
2014-06-14 20:16:40 -07:00
friendica
02af02118d
photos upload - remove phantom duplicated blank album name from selection list
2014-03-23 17:07:21 -07:00
friendica
e12f6f1bd9
small changes to a couple of lookup functions which we need to use a bit more
2014-02-20 17:20:24 -08:00
friendica
95a45a119d
shamelessly steal, and cut/paste from the settings page to get mod_photos edit permissions working - and it looks like we still have some other fancybox instances (yet another lightbox) which haven't yet been converted to colorbox and will need to be fixed. Way too many lightboxes.
2014-02-11 18:45:50 -08:00
friendica
1572403e98
photo tagging somewhat working - but can't remove photo tags until we update tagrm
2014-02-03 20:44:42 -08:00
friendica
3100b5d93e
photo tagging still broken - but at least don't create a new linked item every time a photo is edited.
2014-01-27 18:06:09 -08:00
friendica
d5bf53c54c
bring photo tagging back which hasn't worked since forking from Friendica - this is untested and displaying photo tags will now be broken as we're now storing tags with the item attached to the photo and not in the photo. But the point is we've eliminated the OStatus/SWAP0 forced spam crap and can start fresh.
2014-01-19 23:37:46 -08:00
friendica
db8ebc9f37
some minor cleanup on plinks for some very subtle permissions issues
2014-01-09 15:45:17 -08:00
Thomas Willingham
7930f6d7aa
Pass hash and extension to the photo templates for plugins that require
...
links we can't construct from what's already there.
2014-01-08 22:50:44 +00:00
friendica
b8564134aa
make storage limit service classes apply to accounts, not channels. Also include a css file that was missing from work yesterday.
2014-01-07 14:10:28 -08:00
friendica
323fc1f9a5
fix photos/upload album selector
2014-01-06 02:54:08 -08:00
friendica
c59688553c
remove prettyphoto from core - this will affect the enhanced photo albums feature on the short term which has been disabled until we figure out how to make the setting per-theme instead of a core option. The library is still available in core (library/prettyphoto) currently but needs to be moved to theme js and loaded/accessed from there [for themes which use it]. Then the library will be removed. It appears that other lightboxes commonly use rel= to group photo albums. So we may provide a generic rel= tag in photo album templates so that the choice of lightbox or album viewer is not only a theme option but could also be accomplished with plugins.
2013-12-26 13:08:16 -08:00
friendica
1a42580ad4
remove a couple of mysql reserved words from being used as table or row names. For this round we're getting 'group' and 'desc'. Warning: potentially destabilising as this touches a lot of code.
2013-12-22 18:37:39 -08:00
friendica
eff38538ee
more (somewhat minor) but important cleanup for mod_photos so visitors with the correct permissions to add photos can also remove them
2013-12-22 17:44:14 -08:00
friendica
a9e225b38a
issue deleting photos (attached item remained undeleted and became visible, though the photo was gone)
2013-12-22 17:30:49 -08:00
friendica
564f431551
comanchificate mod_photos
2013-12-19 17:36:31 -08:00
friendica
0215043826
prepare for Comanchification of mod_photos
2013-12-13 13:30:33 -08:00
friendica
1c5f98440d
quite a bit of work on default acl permissions and various acl quirks
2013-11-29 14:09:21 -08:00
friendica
c2274403c7
define js profile_uid in photos module
2013-11-14 15:53:31 -08:00
friendica
592c24e162
e2ee in comments and a bit of cleanup so not every theme has to define how to insert bbcode, only if they're doing something special (e.g. this is how to implement a javascript plugin :-)), and I got rid of the predefined http:// in the bbcode for urls. You're almost always pasting a url which already has that bit and it just creates an extra step.
2013-11-14 15:41:25 -08:00
friendica
5c71ccba98
add shameless plug if they've not got zot, and add photo favicon to photos pages
2013-11-05 18:20:37 -08:00
friendica
3fa6737726
Another stab at cleaning up the photos module. This should make permissions behave a bit better and show the "this is you" photo for commenting and get rid of most of the old "visitor and "contact" cruft.
2013-10-24 16:47:34 -07:00
friendica
3985aa07b4
more icon tweaks - this could be going on for some time; try to get icon code (and all theme stuff) out of main code and into templates, but on the short term provide both so nothing breaks.
2013-10-10 02:15:44 -07:00
friendica
78a8d176ac
post signatures
2013-10-02 21:04:48 -07:00
friendica
9d718ac529
sync photo permissions with the attached item whenever they change.
2013-09-17 17:38:43 -07:00
friendica
4335ef68d6
assuming permissions are correct, unobscure photo comments. Should probably make sure permissions are correct and figure out why some photo comments on public photos are getting stored with privacy. This probably requires that whenever we change photo permissions for linked photos/items we change the item permissions to match. They might be out of sync.
2013-09-16 22:56:36 -07:00
friendica
c6d6c01fb6
use prepare_body in api calls to properly render content, add 'mode' to conversation templates so that themes can use the module context to suppress or show comments as desired
2013-09-16 22:40:53 -07:00
friendica
3e5414cf35
provide detailed error to remote site for the myriad of things that can go wrong inside item_store(), !! this changes the return of item_store !!
2013-09-10 19:06:06 -07:00
friendica
c877d8f9fa
It's a wretched mess, but at least photo comments show up again when viewing the photo. This is just temporary until these conversations are merged into the common conversation viewer, so it's not worth spending a lot of time cleaning up the remnants.
2013-08-28 17:57:45 -07:00
friendica
e8a0005d29
put backticks on mysql reseved words which we unfortunately used for row names a long time ago
2013-08-27 21:30:45 -07:00
friendica
7bb9289921
Preparatory work for photo conversations (third time). Also take away unused "post new activity" preferences until they actually do something.
2013-08-27 21:06:11 -07:00
friendica
390a1ce552
more loose ends
2013-08-27 18:40:33 -07:00
friendica
247d132e17
start using profile_flags in photo queries so we can start creating PHOTO_THING's
2013-07-18 20:55:25 -07:00
friendica
da05b9736e
some work on issue #62 (comments collapsing on liveupdate), but still a work in progress
...
some work on photo consolidated "view/edit", but still a work in progress
2013-07-02 16:37:33 -07:00
friendica
e0c6ee2082
photo album listing widget broken
2013-06-05 23:07:52 -07:00
friendica
08a4ffd663
convert most red photos to zmg
2013-05-28 04:50:16 -07:00
friendica
61a66bfb00
Merge branch 'photothread'
2013-04-29 19:59:27 -07:00
friendica
72e83f69bc
photo driver abstraction
2013-04-25 20:01:24 -07:00
friendica
f72d351224
Merge branch 'master' into photothread
2013-04-16 20:16:44 -07:00
friendica
7e6890832b
turn all Red links into zrls (not the old zrls, the new bbcode zrl which means we can zidify them)
2013-04-15 03:00:08 -07:00
friendica
3e7e0a3c43
some work on updating photo threads for Red
2013-04-08 17:23:26 -07:00
Thomas Willingham
8741bb20e8
Make prettyPhoto a feature, add slideshow for albums.
2013-03-29 20:36:39 +00:00
friendica
ddf5bf8968
rename 'uri' (and parent_uri) to 'mid' (and parent_mid) since these no longer remotely resemble uri's and are actually message_id's. This change is potentially destabilising because it touches a lot of code and structure. But it has to get done and there's no better time than the present.
2013-03-21 18:25:41 -07:00
friendica
f3eb2eb9e7
convert wall_upload to use the photo api
2013-02-05 16:54:09 -08:00
friendica
3eacd7aab3
debugging the photo api
2013-02-02 15:08:11 -08:00
friendica
7645b440e8
more progress on photos api
2013-02-02 01:58:11 -08:00
friendica
3e0040d7c3
photos cont.
2013-01-26 03:42:05 -08:00
friendica
91126d8dd3
more photo backend stuff
2013-01-26 02:24:07 -08:00
friendica
70aa8421b3
further baby steps on the photos API
2013-01-25 23:32:44 -08:00
friendica
93af193218
terminate script tag
2013-01-25 18:14:44 -08:00
friendica
b43b6c3549
start on photos rework
2013-01-25 18:13:15 -08:00