]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/GNUsocialPhotos/GNUsocialPhotosPlugin.php
Individual photo page
[quix0rs-gnu-social.git] / plugins / GNUsocialPhotos / GNUsocialPhotosPlugin.php
index deddd502aa0f3dc2f4ae931b0c2ab920326d5645..48431195571d02c43212579e7843646af907ae69 100644 (file)
@@ -51,6 +51,10 @@ class GNUsocialPhotosPlugin extends Plugin
             include_once $dir . '/lib/photolib.php';
             include_once $dir . '/actions/' . strtolower(mb_substr($cls, 0, -6)) . '.php';
             break;
+               case 'PhotoAction':
+               include_once $dir . '/lib/photolib.php';
+                       include_once $dir . '/actions/' . strtolower(mb_substr($cls, 0, -6)) . '.php';
+                       break;
         default:
             break;
         }
@@ -66,11 +70,14 @@ class GNUsocialPhotosPlugin extends Plugin
                                 array(new ColumnDef('notice_id', 'int(11)', null, false),
                                       new ColumnDef('album_id', 'int(11)', null, false),
                                       new ColumnDef('uri', 'varchar(512)', null, false),
-                                      new ColumnDef('thumb_uri', 'varchar(512)', null, false)));
+                                      new ColumnDef('thumb_uri', 'varchar(512)', null, false),
+                                                                         new ColumnDef('title', 'varchar(512)', null, false),
+                                                                         new ColumnDef('photo_description', 'text', null, false)));
         $schema->ensureTable('GNUsocialPhotoAlbum',
                                 array(new ColumnDef('album_id', 'int(11)', null, false, 'PRI', null, null, true),
                                       new ColumnDef('profile_id', 'int(11)', null, false),
-                                      new ColumnDef('album_name', 'varchar(256)', null, false)));
+                                      new ColumnDef('album_name', 'varchar(256)', null, false),
+                                                                         new ColumnDef('album_description', 'text', null, false)));
                                           
     }
 
@@ -78,6 +85,7 @@ class GNUsocialPhotosPlugin extends Plugin
     {
         $m->connect(':nickname/photos', array('action' => 'photos'));
         $m->connect('main/uploadphoto', array('action' => 'photoupload'));
+               $m->connect(':nickname/photo/:photoid', array('action' => 'photo'));
         return true;
     }