Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gnu-social
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
194
Issues
194
List
Boards
Labels
Milestones
Merge Requests
12
Merge Requests
12
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gnu.io
gnu-social
Commits
0b96ca3d
Commit
0b96ca3d
authored
May 25, 2009
by
Robin Millette
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Oups, forget the attachment_thumbnail.php action file
parent
01ce677a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
127 additions
and
0 deletions
+127
-0
actions/attachment_thumbnail.php
actions/attachment_thumbnail.php
+127
-0
No files found.
actions/attachment_thumbnail.php
0 → 100644
View file @
0b96ca3d
<?php
/**
* Laconica, the distributed open-source microblogging tool
*
* Show notice attachments
*
* PHP version 5
*
* LICENCE: This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* @category Personal
* @package Laconica
* @author Evan Prodromou <evan@controlyourself.ca>
* @copyright 2008-2009 Control Yourself, Inc.
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://laconi.ca/
*/
if
(
!
defined
(
'LACONICA'
))
{
exit
(
1
);
}
require_once
INSTALLDIR
.
'/actions/attachment.php'
;
/**
* Show notice attachments
*
* @category Personal
* @package Laconica
* @author Evan Prodromou <evan@controlyourself.ca>
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://laconi.ca/
*/
class
Attachment_thumbnailAction
extends
AttachmentAction
{
/**
* Show page, a template method.
*
* @return nothing
*/
function
showPage
()
{
if
(
Event
::
handle
(
'StartShowBody'
,
array
(
$this
)))
{
$this
->
showCore
();
Event
::
handle
(
'EndShowBody'
,
array
(
$this
));
}
}
/**
* Show core.
*
* Shows local navigation, content block and aside.
*
* @return nothing
*/
function
showCore
()
{
$file_thumbnail
=
File_thumbnail
::
staticGet
(
'file_id'
,
$this
->
attachment
->
id
);
if
(
empty
(
$file_thumbnail
->
url
))
{
return
;
}
$url
=
$file_thumbnail
->
url
;
$attr
=
array
(
'id'
=>
'thumbnail'
,
'src'
=>
$url
,
'alt'
=>
'Thumbnail'
);
$this
->
element
(
'img'
,
$attr
);
}
/**
* Last-modified date for page
*
* When was the content of this page last modified? Based on notice,
* profile, avatar.
*
* @return int last-modified date as unix timestamp
*/
/*
function lastModified()
{
return max(strtotime($this->notice->created),
strtotime($this->profile->modified),
($this->avatar) ? strtotime($this->avatar->modified) : 0);
}
*/
/**
* An entity tag for this page
*
* Shows the ETag for the page, based on the notice ID and timestamps
* for the notice, profile, and avatar. It's weak, since we change
* the date text "one hour ago", etc.
*
* @return string etag
*/
/*
function etag()
{
$avtime = ($this->avatar) ?
strtotime($this->avatar->modified) : 0;
return 'W/"' . implode(':', array($this->arg('action'),
common_language(),
$this->notice->id,
strtotime($this->notice->created),
strtotime($this->profile->modified),
$avtime)) . '"';
}
*/
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment