This repository has been archived by the owner on Jan 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added public RSS feeds for user journals
- Loading branch information
1 parent
d9a388b
commit 797f0c4
Showing
8 changed files
with
682 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -197,5 +197,8 @@ private function _PrepMessage ( ) { | |
|
||
return ( true ); | ||
} | ||
|
||
public function RSS ( ) { | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
<?php | ||
/** | ||
* @version $Id$ | ||
* @package Appleseed.Components | ||
* @subpackage Journal | ||
* @copyright Copyright (C) 2004 - 2010 Michael Chisari. All rights reserved. | ||
* @link http://opensource.appleseedproject.org | ||
* @license GNU General Public License version 2.0 (See LICENSE.txt) | ||
*/ | ||
|
||
// Restrict direct access | ||
defined( 'APPLESEED' ) or die( 'Direct Access Denied' ); | ||
|
||
/** Journal Component Controller | ||
* | ||
* Journal Component RSS Controller Class | ||
* | ||
* @package Appleseed.Components | ||
* @subpackage Journal | ||
*/ | ||
class cJournalRSSController extends cController { | ||
|
||
/** | ||
* Constructor | ||
* | ||
* @access public | ||
*/ | ||
public function __construct ( ) { | ||
parent::__construct( ); | ||
} | ||
|
||
public function Display ( $pView = null, $pData = array ( ) ) { | ||
|
||
$this->_Current = $this->Talk ( 'User', 'Current' ); | ||
$this->_Focus = $this->Talk ( 'User', 'Focus' ); | ||
|
||
$this->View = $this->GetView ( "entries" ); | ||
|
||
$this->Model = $this->GetModel(); | ||
|
||
if ( !$this->Model->Everybody ( $this->_Focus->Id, array ( 'start' => 0, 'step' => 20 ) ) ) { | ||
return ( false ); | ||
} | ||
|
||
$RSS = $this->GetSys ( 'RSS' ); | ||
|
||
$RSSTitle = __ ( 'RSS Feed Title', array ( 'fullname' => $this->_Focus->Fullname, 'domain' => ASD_DOMAIN ) ); | ||
|
||
$RSSDescription = $this->_Focus->Description; | ||
$RSSUrl = 'http://' . ASD_DOMAIN . '/profile/' . $this->_Focus->Username . '/journal/'; | ||
$RSS->Create ( $RSSTitle, $RSSDescription, $RSSUrl ); | ||
|
||
while ( $this->Model->Fetch() ) { | ||
$Item = $this->Model->Get ( 'Title' ); | ||
$Description = $this->GetSys ( 'Render' )->Format ( $this->Model->Get ( 'Body' ) ); | ||
$Created = $this->Model->Get ( 'Created' ); | ||
|
||
$Author = $this->_Focus->Fullname; | ||
|
||
$Url = 'http://' . ASD_DOMAIN . '/profile/' . $this->_Focus->Username . '/journal/' . strtolower ( str_replace ( ' ', '-', $this->Model->Get ( 'Title' ) ) ); | ||
$Guid = 'http://' . ASD_DOMAIN . '/profile/' . $this->_Focus->Username . '/journal/' . $this->Model->Get ( 'Identifier' ); | ||
|
||
$RSS->Open ( $Item, $Description, $Url ); | ||
$RSS->Element ( 'guid', $Guid ); | ||
$RSS->Element ( 'author', $Author ); | ||
$RSS->Element ( 'pubDate', date("D, d M Y H:i:s e", strtotime ( $Created ) ) ); | ||
$RSS->Close ( ); | ||
} | ||
|
||
echo $RSS->Output() ; | ||
|
||
return ( true ); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<section id="profile-journal"> | ||
<p class="entries-message"></p> | ||
<a class="add">Add New</a> | ||
<a class="rss">RSS Feed</a> | ||
<nav class="pagination"> | ||
</nav> | ||
<ul class="journal-entries"> | ||
<li class="summary"> | ||
<article> | ||
<h2> <span class="title"><a class="title-link"></a></span> <abbr class="created"></abbr> </h2> | ||
<div class="body"></div> | ||
<nav class="actions"> | ||
<a class="comments">0 Comments</a> | ||
<a class="readmore">Read More</a> | ||
</nav> | ||
</article> | ||
</li> | ||
</ul> | ||
<nav class="pagination"> | ||
</nav> | ||
</section> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<?php $zApp->Components->Go ( "journal", "rss", "rss" ); ?> |
Oops, something went wrong.