1
0

Initial commit of Twitter module. OAuth access key retrieval and storage is working, posting tweets is not, yet.

This commit is contained in:
Chad Kieffer 2011-02-09 18:40:55 -07:00
parent e9235ba4c4
commit 086e8554e9
2 changed files with 43 additions and 0 deletions

View File

@ -0,0 +1,21 @@
<?php defined("SYSPATH") or die("No direct script access.");
/**
* Gallery - a web based photo album viewer and editor
* Copyright (C) 2000-2011 Bharat Mediratta
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 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
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
*/
class Twitter_user_Model extends ORM {
}

View File

@ -0,0 +1,22 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
<script type="text/javascript">
$("document").ready(function() {
$("#g-tweet").gallery_twitter();
});
</script>
<div id="g-twitter-tweet" class="g-block">
<h1> <?= t("Share this %type on Twitter", array("type" => $type, "title"=> $title)) ?> </h1>
<? if (!$is_registered): ?>
<p><?= t("The Twitter module is not configured yet.") ?></p>
<? elseif (!$user_token_set): ?>
<p><?= t("You must authorize this Gallery to send Tweets to your account.") ?></p>
<p><a href="<?= $twitter_auth_url ?>"><img src="/modules/twitter/lib/images/lighter.png" alt="Sign in with Twitter"/></a></p>
<? else: ?>
<div class="g-block-content">
<?= $form ?>
<div id="g-twitter-character-count">
<?= $character_count ?>
</div>
</div>
<? endif; ?>
</div>