[pLog-svn] r4504 - in plugins/trunk: . mobile mobile/class
mobile/class/class mobile/config mobile/config/config
mobile/templates mobile/templates/templates
oscar at devel.lifetype.net
oscar at devel.lifetype.net
Thu Jan 4 23:11:04 GMT 2007
Author: oscar
Date: 2007-01-04 23:11:03 +0000 (Thu, 04 Jan 2007)
New Revision: 4504
Added:
plugins/trunk/mobile/
plugins/trunk/mobile/class/class/
plugins/trunk/mobile/config/config/
plugins/trunk/mobile/pluginmobile.class.php
plugins/trunk/mobile/templates/templates/
Removed:
plugins/trunk/mobile/class/class/action/
plugins/trunk/mobile/class/class/controller/
plugins/trunk/mobile/class/class/net/
plugins/trunk/mobile/class/class/view/
plugins/trunk/mobile/config/config/terminal.properties.php
plugins/trunk/mobile/pluginmobile.class.php
plugins/trunk/mobile/templates/templates/html-light/
Log:
another working plugin
Copied: plugins/trunk/mobile (from rev 4492, plugins/trunk/unported/mobile)
Copied: plugins/trunk/mobile/class/class (from rev 4492, plugins/trunk/unported/mobile/class)
Copied: plugins/trunk/mobile/config/config (from rev 4492, plugins/trunk/unported/mobile/config)
Deleted: plugins/trunk/mobile/config/config/terminal.properties.php
===================================================================
--- plugins/trunk/unported/mobile/config/terminal.properties.php 2007-01-04 19:48:01 UTC (rev 4492)
+++ plugins/trunk/mobile/config/config/terminal.properties.php 2007-01-04 23:11:03 UTC (rev 4504)
@@ -1,43 +0,0 @@
-<?php
-
-/**
- * known headers so far
- *
- * Opera 6.20 / Nokia7610
- * Mozilla/4.1 (compatible; MSIE 5.0; Symbian OS; Nokia 7610;451) Opera 6.20 [en]
- *
- *
- * How to add new terminal definitions: create an array with the following values:
- *
- * - regexp: The regular expression that will be applied agains the User-Agent
- * string of the device. Make sure that it does not collide with any of the
- * other regexps already defined.
- * - content: The name of the template folder where terminal-specific templates can be found.
- * The folder must exist and be readable in the plugins/mobile/templates/ folder.
- * - content-type: The "Content-Type" header that will be sent to the device when sending a
- * response
- * - id: The unique identifier assigned to this definition.
- * - itemsPerPage: The number of items per page that will be displayed (number of posts, number
- * of comments, etc) This can be configured on a per-platform basis so that
- * we can reduce the amount of items for WAP platforms, which usually have less
- * memory available for pages.
- * - desc: A generic string describing this platform.
- */
-
-$config["terminals"] = Array (
-
- Array( "regexp" => "/.*Nokia.*/",
- "content" => "html-light",
- "content-type" => "text/html",
- "id" => "nokia",
- "itemsPerPage" => 5,
- "desc" => "Nokia Series60 Browser/Opera" ),
-
- Array( "regexp" => "/.*/", // please keep this rule always as the last one
- "content" => "html-light",
- "content-type" => "text/html",
- "id" => "default",
- "itemsPerPage" => 5,
- "desc" => "Any other browser" )
-);
-?>
\ No newline at end of file
Deleted: plugins/trunk/mobile/pluginmobile.class.php
===================================================================
--- plugins/trunk/unported/mobile/pluginmobile.class.php 2007-01-04 19:48:01 UTC (rev 4492)
+++ plugins/trunk/mobile/pluginmobile.class.php 2007-01-04 23:11:03 UTC (rev 4504)
@@ -1,46 +0,0 @@
-<?php
-
- lt_include( PLOG_CLASS_PATH."class/plugin/pluginbase.class.php" );
-
- if( !defined( "MOBILE_PLOG_CLASS_PATH" )) {
- define( "MOBILE_PLOG_CLASS_PATH", PLOG_CLASS_PATH."plugins/mobile/" );
- }
-
- class PluginMobile extends PluginBase
- {
-
- function PluginMobile()
- {
- $this->PluginBase();
-
- $this->id = "mobile";
- $this->desc = "Allows pLog blogs to be accessed via mobile terminals";
- $this->author = "The LifeType Project";
- }
-
- /**
- * Returns a link to the mobile view of the current blog
- *
- * @return A valid URL
- */
- function blogLink()
- {
- lt_include( MOBILE_PLOG_CLASS_PATH."class/net/mobilerequestgenerator.class.php" );
- $murl = new MobileRequestGenerator( $this->blogInfo );
- return( $murl->getMobileUrl()."?blogId=".$this->blogInfo->getId());
- }
-
- /**
- * Returns a link to the mobile view of a post
- *
- * @param blog A valid BlogInfo object
- * @return A valid URL
- */
- function articleLink( $article )
- {
- lt_include( MOBILE_PLOG_CLASS_PATH."class/net/mobilerequestgenerator.class.php" );
- $murl = new MobileRequestGenerator( $this->blogInfo );
- return( $murl->getMobileUrl()."?op=ViewArticle&blogId=".$this->blogInfo->getId()."&articleId=".$article->getId());
- }
- }
-?>
\ No newline at end of file
Copied: plugins/trunk/mobile/pluginmobile.class.php (from rev 4503, plugins/trunk/unported/mobile/pluginmobile.class.php)
Copied: plugins/trunk/mobile/templates/templates (from rev 4492, plugins/trunk/unported/mobile/templates)
More information about the pLog-svn
mailing list