[pLog-svn] r4668 - in plog/branches/lifetype-1.2: class/action class/dao class/dao/userdata class/data class/locale class/summary/dao class/test/tests/dao config js/tinymce/plugins/insertvideo js/tinymce/plugins/insertvideo/css js/tinymce/plugins/insertvideo/images js/ui templates/summary
oscar at devel.lifetype.net
oscar at devel.lifetype.net
Fri Feb 2 05:17:19 EST 2007
Author: oscar
Date: 2007-02-02 05:17:18 -0500 (Fri, 02 Feb 2007)
New Revision: 4668
Added:
plog/branches/lifetype-1.2/class/test/tests/dao/userinfo_test.class.php
plog/branches/lifetype-1.2/js/tinymce/plugins/insertvideo/images/grouper.png
Modified:
plog/branches/lifetype-1.2/class/action/blogaction.class.php
plog/branches/lifetype-1.2/class/action/resourceserveraction.class.php
plog/branches/lifetype-1.2/class/dao/articles.class.php
plog/branches/lifetype-1.2/class/dao/userdata/baseuserdataprovider.class.php
plog/branches/lifetype-1.2/class/dao/userinfo.class.php
plog/branches/lifetype-1.2/class/data/textfilter.class.php
plog/branches/lifetype-1.2/class/locale/locale.class.php
plog/branches/lifetype-1.2/class/summary/dao/summarystats.class.php
plog/branches/lifetype-1.2/config/logging.properties.php
plog/branches/lifetype-1.2/js/tinymce/plugins/insertvideo/css/content.css
plog/branches/lifetype-1.2/js/tinymce/plugins/insertvideo/editor_plugin.js
plog/branches/lifetype-1.2/js/tinymce/plugins/insertvideo/functions.js
plog/branches/lifetype-1.2/js/tinymce/plugins/insertvideo/videoinput.html
plog/branches/lifetype-1.2/js/ui/summary.js
plog/branches/lifetype-1.2/templates/summary/blogprofile.template
Log:
Merge from lifetype-1.1.5 to lifetype-1.2
Modified: plog/branches/lifetype-1.2/class/action/blogaction.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/action/blogaction.class.php 2007-02-02 09:50:04 UTC (rev 4667)
+++ plog/branches/lifetype-1.2/class/action/blogaction.class.php 2007-02-02 10:17:18 UTC (rev 4668)
@@ -229,21 +229,26 @@
}
// fetch the BlogInfo object
+ include_once( PLOG_CLASS_PATH."class/dao/blogs.class.php" );
+ $blogs = new Blogs();
if( $blogId ) {
lt_include( PLOG_CLASS_PATH."class/dao/blogs.class.php" );
$blogs = new Blogs();
$this->_blogInfo = $blogs->getBlogInfo( $blogId );
}
- else if($blogName){
+ else if($blogName) {
lt_include( PLOG_CLASS_PATH."class/dao/blogs.class.php" );
$blogs = new Blogs();
$this->_blogInfo = $blogs->getBlogInfoByName( $blogName );
}
- else{
- lt_include( PLOG_CLASS_PATH."class/dao/blogs.class.php" );
+ else if($blogDomain) {
+ lt_include( PLOG_CLASS_PATH."class/dao/blogs.class.php" );
$blogs = new Blogs();
$this->_blogInfo = $blogs->getBlogInfoByDomain( $blogDomain );
}
+ else {
+ $this->_blogInfo = false;
+ }
$blogExists = true;
Modified: plog/branches/lifetype-1.2/class/action/resourceserveraction.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/action/resourceserveraction.class.php 2007-02-02 09:50:04 UTC (rev 4667)
+++ plog/branches/lifetype-1.2/class/action/resourceserveraction.class.php 2007-02-02 10:17:18 UTC (rev 4668)
@@ -67,20 +67,26 @@
if( $config->getValue( "subdomains_enabled" )) {
$subdomainInfo = Subdomains::getSubdomainInfoFromRequest();
- if( $subdomainInfo["username"] != "" && $this->_request->getValue( 'blogUserName' ) == "" )
- $this->_request->setValue( 'blogUserName', $subdomainInfo["username"] );
- if( $subdomainInfo["blogname"] != "" && $this->_request->getValue( 'blogName' ) == "" )
- $this->_request->setValue( 'blogName', $subdomainInfo["blogname"] );
+ if( !empty($subdomainInfo["blogdomain"]) && $this->_request->getValue( 'blogDomain' ) == "" ) {
+ $this->_request->setValue( 'blogDomain', $subdomainInfo["blogdomain"] );
+ }
+ if( !empty($subdomainInfo["username"]) && $this->_request->getValue( 'blogUserName' ) == "" ) {
+ $this->_request->setValue( 'blogUserName', $subdomainInfo["username"] );
+ }
+ if( !empty($subdomainInfo["blogname"]) && $this->_request->getValue( 'blogName' ) == "" ) {
+ $this->_request->setValue( 'blogName', $subdomainInfo["blogname"] );
+ }
}
$blogId = $this->_request->getValue( 'blogId' );
$blogName = $this->_request->getValue( 'blogName' );
$userId = $this->_request->getValue( 'userId' );
$userName = $this->_request->getValue( 'blogUserName' );
+ $blogDomain = $this->_request->getValue( 'blogDomain' );
// if there is a "blogId" parameter, it takes precedence over the
// "user" parameter.
- if( !$blogId && !$blogName ) {
+ if( !$blogId && !$blogName && !$blogDomain) {
// check if there was a user parameter
if( !empty($userName) ) {
// if so, check to which blogs the user belongs
@@ -114,12 +120,20 @@
}
// fetch the BlogInfo object
- include_once( PLOG_CLASS_PATH."class/dao/blogs.class.php" );
+ include_once( PLOG_CLASS_PATH."class/dao/blogs.class.php" );
$blogs = new Blogs();
- if( $blogId )
+ if( $blogId ) {
$this->_blogInfo = $blogs->getBlogInfo( $blogId );
- else
+ }
+ else if($blogName){
$this->_blogInfo = $blogs->getBlogInfoByName( $blogName );
+ }
+ else if($blogDomain){
+ $this->_blogInfo = $blogs->getBlogInfoByDomain( $blogDomain );
+ }
+ else{
+ $this->_blogInfo = false;
+ }
}
function validate()
Modified: plog/branches/lifetype-1.2/class/dao/articles.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/dao/articles.class.php 2007-02-02 09:50:04 UTC (rev 4667)
+++ plog/branches/lifetype-1.2/class/dao/articles.class.php 2007-02-02 10:17:18 UTC (rev 4668)
@@ -763,7 +763,7 @@
{
$slug = $newArticle->getPostSlug();
$i = 1;
- // check if there already is a blog with the same mangled name
+ // check if there already is an article with the same mangled name
while($this->getBlogArticleByTitle($slug,
$newArticle->getBlog()))
{
@@ -807,9 +807,11 @@
// update the blog counters
if( $newArticle->getStatus() == POST_STATUS_PUBLISHED ) {
+ include_once( PLOG_CLASS_PATH."class/data/timestamp.class.php" );
$blogs = new Blogs();
$blogInfo = $newArticle->getBlogInfo();
$blogInfo->setTotalPosts( $blogInfo->getTotalPosts() + 1 );
+ $blogInfo->setUpdateDate( Timestamp::getNowTimestamp());
$blogs->updateBlog( $blogInfo );
}
@@ -903,14 +905,18 @@
{
$slug = $article->getPostSlug();
$i = 1;
- // check if there already is a blog with the same mangled name
- while($this->getBlogArticleByTitle($slug,
- $article->getBlog()))
+ // check if there already is an article with the same mangled name
+ while($existingArticle = $this->getBlogArticleByTitle($slug,
+ $article->getBlog()))
{
- $i++;
- // and if so, assign a new one
+ // if we found ourselves, it is okay to keep using this name
+ if($existingArticle->getId() == $article->getId())
+ break;
+
+ // found a match, so assign a new one
// if we already tried with slug+"i" we have
// to strip "i" before adding it again!
+ $i++;
$slug = substr($slug, 0,
($i > 2) ? strlen($slug)-strlen($i-1) : strlen($slug)).$i;
}
@@ -947,15 +953,19 @@
}
// update the blog counter
- if( $oldArticle->getStatus() == POST_STATUS_PUBLISHED && $article->getStatus() != POST_STATUS_PUBLISHED ) {
+ if( $oldArticle->getStatus() == POST_STATUS_PUBLISHED && $article->getStatus() != POST_STATUS_PUBLISHED ) {
+ include_once( PLOG_CLASS_PATH."class/data/timestamp.class.php" );
$blogs = new Blogs();
$blogInfo = $article->getBlogInfo();
$blogInfo->setTotalPosts( $blogInfo->getTotalPosts() - 1 );
+ $blogInfo->setUpdateDate( Timestamp::getNowTimestamp());
$blogs->updateBlog( $blogInfo );
} elseif ( $oldArticle->getStatus() != POST_STATUS_PUBLISHED && $article->getStatus() == POST_STATUS_PUBLISHED ) {
+ include_once( PLOG_CLASS_PATH."class/data/timestamp.class.php" );
$blogs = new Blogs();
$blogInfo = $article->getBlogInfo();
$blogInfo->setTotalPosts( $blogInfo->getTotalPosts() + 1 );
+ $blogInfo->setUpdateDate( Timestamp::getNowTimestamp());
$blogs->updateBlog( $blogInfo );
}
Modified: plog/branches/lifetype-1.2/class/dao/userdata/baseuserdataprovider.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/dao/userdata/baseuserdataprovider.class.php 2007-02-02 09:50:04 UTC (rev 4667)
+++ plog/branches/lifetype-1.2/class/dao/userdata/baseuserdataprovider.class.php 2007-02-02 10:17:18 UTC (rev 4668)
@@ -155,7 +155,7 @@
$query_result["id"]);
// set some permissions
- isset( $query_result["site_admin"] ) ? $siteAdmin = $query_result["site_admin"] : $siteAdmin = false;
+ isset( $query_result["site_admin"] ) ? $siteAdmin = $query_result["site_admin"] : $siteAdmin = 0;
$userInfo->setSiteAdmin( $siteAdmin );
$userInfo->setStatus( $query_result["status"] );
Modified: plog/branches/lifetype-1.2/class/dao/userinfo.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/dao/userinfo.class.php 2007-02-02 09:50:04 UTC (rev 4667)
+++ plog/branches/lifetype-1.2/class/dao/userinfo.class.php 2007-02-02 10:17:18 UTC (rev 4668)
@@ -53,7 +53,7 @@
$this->_email = $email;
$this->_blogs = "";
$this->_fullName = $fullName;
- $this->_siteAdmin = false;
+ $this->_siteAdmin = 0;
$this->setPictureId( $resourcePictureId );
$this->setProperties( $properties );
$this->_perms = Array();
@@ -194,7 +194,7 @@
function isSiteAdmin()
{
- if( $this->_siteAdmin == "" ) $this->_siteAdmin = false;
+ if( $this->_siteAdmin == "" ) $this->_siteAdmin = 0;
return $this->_siteAdmin;
}
Modified: plog/branches/lifetype-1.2/class/data/textfilter.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/data/textfilter.class.php 2007-02-02 09:50:04 UTC (rev 4667)
+++ plog/branches/lifetype-1.2/class/data/textfilter.class.php 2007-02-02 10:17:18 UTC (rev 4668)
@@ -233,9 +233,13 @@
*/
function htmlDecode( $htmlString, $quote_style = ENT_QUOTES )
{
- $trans_table = array_flip(get_html_translation_table( HTML_SPECIALCHARS, $quote_style ));
- $trans_table['''] = "'";
- return( strtr( $htmlString, $trans_table ));
+ // replace numeric entities
+ $htmlString = preg_replace('~&#x([0-9a-f]+);~ei', 'chr(hexdec("\\1"))', $htmlString);
+ $htmlString = preg_replace('~&#([0-9]+);~e', 'chr(\\1)', $htmlString);
+ // replace literal entities
+ $trans_tbl = get_html_translation_table(HTML_ENTITIES);
+ $trans_tbl = array_flip($trans_tbl);
+ return strtr($htmlString, $trans_tbl);
}
/**
Modified: plog/branches/lifetype-1.2/class/locale/locale.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/locale/locale.class.php 2007-02-02 09:50:04 UTC (rev 4667)
+++ plog/branches/lifetype-1.2/class/locale/locale.class.php 2007-02-02 10:17:18 UTC (rev 4668)
@@ -283,20 +283,22 @@
/**
* calls printf on the translated string.
*
- * Crappy Crappy! Since it only accepts two arguments... ;) Well, if we
- * ever need more than two, I'll change it!
+ * Crappy Crappy! Since it only accepts three arguments... ;) Well, if we
+ * ever need more than three, I'll change it!
* @private
*/
- function pr( $id, $arg1 = null, $arg2 = null )
+ function pr( $id, $arg1 = null, $arg2 = null, $arg3 = null )
{
// first of all, we translate the string
$str = $this->tr( $id );
if( $arg1 == null )
$result = $str;
- if( $arg2 == null )
+ else if( $arg2 == null )
$result = sprintf( $str, $arg1 );
+ else if( $arg3 == null )
+ $result = sprintf( $str, $arg1, $arg2 );
else
- $result = sprintf( $str, $arg1, $arg2 );
+ $result = sprintf( $str, $arg1, $arg2, $arg3 );
return $result;
}
Modified: plog/branches/lifetype-1.2/class/summary/dao/summarystats.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/summary/dao/summarystats.class.php 2007-02-02 09:50:04 UTC (rev 4667)
+++ plog/branches/lifetype-1.2/class/summary/dao/summarystats.class.php 2007-02-02 10:17:18 UTC (rev 4668)
@@ -179,15 +179,18 @@
lt_include( PLOG_CLASS_PATH."class/dao/blogs.class.php" );
$prefix = $this->getPrefix();
- $query = "SELECT COUNT(a.id) as t, SUM((num_reads / (TO_DAYS(NOW()) - TO_DAYS(a.date) + 1)) ) as rank, b.id AS blog_id
- FROM {$prefix}articles AS a
- INNER JOIN {$prefix}blogs AS b
- ON b.id = a.blog_id AND b.status = ".BLOG_STATUS_ACTIVE."
- WHERE a.date >= ".$this->_startTime." AND a.date <= ".$this->_now."
- AND in_summary_page = '1'
- AND b.show_in_summary = '1'
- GROUP BY a.id
- ORDER BY rank DESC";
+
+ $query = "SELECT SUM(((a.num_reads + a.num_comments/5) / (TO_DAYS(NOW()) - TO_DAYS(a.date) + 1)) )/COUNT(a.id) as rank,
+ b.id AS blog_id
+ FROM {$prefix}articles AS a
+ INNER JOIN {$prefix}blogs AS b
+ ON b.id = a.blog_id AND b.status = ".BLOG_STATUS_ACTIVE."
+ WHERE a.date >= ".$this->_startTime."
+ AND a.date <= ".$this->_now."
+ AND a.in_summary_page = '1'
+ AND b.show_in_summary = '1'
+ GROUP BY b.id
+ ORDER BY rank DESC";
if( $maxBlogs > 0 )
$query .= " LIMIT 0,".$maxBlogs;
Copied: plog/branches/lifetype-1.2/class/test/tests/dao/userinfo_test.class.php (from rev 4667, plog/branches/lifetype-1.1.5/class/test/tests/dao/userinfo_test.class.php)
===================================================================
--- plog/branches/lifetype-1.2/class/test/tests/dao/userinfo_test.class.php (rev 0)
+++ plog/branches/lifetype-1.2/class/test/tests/dao/userinfo_test.class.php 2007-02-02 10:17:18 UTC (rev 4668)
@@ -0,0 +1,37 @@
+<?php
+
+ include_once( PLOG_CLASS_PATH."class/test/helpers/lifetypetestcase.class.php" );
+ include_once( PLOG_CLASS_PATH."class/test/helpers/testtools.class.php" );
+ include_once( PLOG_CLASS_PATH."class/dao/userinfo.class.php" );
+ include_once( PLOG_CLASS_PATH."class/dao/users.class.php" );
+
+ class UserInfo_Test extends LifeTypeTestCase
+ {
+ /**
+ * Test case for Mantis issue 1139 (http://bugs.lifetype.net/view.php?id=1139):
+ * "confirmation code is invalid"
+ *
+ * This test case will make sure that empty values of UserInfo::_siteAdmin() will always be loaded
+ * and mapped to '0' when saving to the database. It should also check that when 'false' is used
+ * in addition to '0' for this attribute, the class behaves in exactly the same way
+ */
+ function testConfirmationCodeIsInvalid()
+ {
+ // user1, let's not set the isSiteAdmin flag and check that we return a zero and a false
+ $user1 = new UserInfo( md5(rand()), "user1pwd", "user1 at test.com", "", "User One" );
+ $this->assertEquals( 0, $user1->isSiteAdmin(), "UserInfo::isSiteAdmin() did not return zero!" );
+ $this->assertFalse( $user1->isSiteAdmin(), "UserInfo::isSiteAdmin() did not return false!" );
+
+ // save this user to the database and make sure that the flag was saved as expected
+ $users = new Users();
+ $users->addUser( $user1 );
+ // load the user
+ $newUser1 = $users->getUserInfoFromId( $user1->getId());
+ $this->assertEquals( 0, $newUser1->isSiteAdmin(), "UserInfo::isSiteAdmin() did not return zero after saving the user!" );
+ $this->assertFalse( $newUser1->isSiteAdmin(), "UserInfo::isSiteAdmin() did not return false after saving the user!" );
+
+ // delete the test data
+ TestTools::deleteDaoTestData( Array( $user1 ));
+ }
+ }
+?>
\ No newline at end of file
Modified: plog/branches/lifetype-1.2/config/logging.properties.php
===================================================================
--- plog/branches/lifetype-1.2/config/logging.properties.php 2007-02-02 09:50:04 UTC (rev 4667)
+++ plog/branches/lifetype-1.2/config/logging.properties.php 2007-02-02 10:17:18 UTC (rev 4668)
@@ -4,10 +4,11 @@
# too much logs for your tatest, set "appender" to "null". This will
# be disabled once the final version is out anyway...
#
+
$config["default"] = Array(
"layout" => "%d %N - [%f:%l (%c:%F)] %m%n",
"appender" => "file",
- "file" => "tmp/lifetype.log",
+ "file" => PLOG_CLASS_PATH."tmp/lifetype.log",
"prio" => "debug"
);
@@ -16,7 +17,7 @@
$config["debug"] = Array(
"layout" => "%t%n%d %N - [%f:%l (%c:%F)] %m%n",
"appender" => "null",
- "file" => "tmp/debug.log",
+ "file" => PLOG_CLASS_PATH."tmp/debug.log",
"prio" => "info"
);
#
@@ -27,7 +28,7 @@
$config["sqlerr"] = Array(
"layout" => "%S%n %d %N - %m%n",
"appender" => "file",
- "file" => "tmp/sql_error.log",
+ "file" => PLOG_CLASS_PATH."tmp/sql_error.log",
"prio" => "error"
);
@@ -38,7 +39,7 @@
$config["trackback"] = Array(
"layout" => "%d %N - [%f:%l (%c:%F)] %m%n",
"appender" => "null",
- "file" => "tmp/trackback.log",
+ "file" => PLOG_CLASS_PATH."tmp/trackback.log",
"prio" => "debug"
);
@@ -60,7 +61,7 @@
$config["metricslog"] = Array(
"layout" => "%m%n",
"appender" => "null",
- "file" => "tmp/metrics.log",
+ "file" => PLOG_CLASS_PATH."tmp/metrics.log",
"prio" => "debug"
);
Modified: plog/branches/lifetype-1.2/js/tinymce/plugins/insertvideo/css/content.css
===================================================================
--- plog/branches/lifetype-1.2/js/tinymce/plugins/insertvideo/css/content.css 2007-02-02 09:50:04 UTC (rev 4667)
+++ plog/branches/lifetype-1.2/js/tinymce/plugins/insertvideo/css/content.css 2007-02-02 10:17:18 UTC (rev 4668)
@@ -32,4 +32,11 @@
background-position: center;
background-repeat: no-repeat;
background-color: #ffffcc;
+ }
+.ltVideoGrouper {
+ border: 1px dotted #cc0000;
+ background-image: url('../images/grouper.png');
+ background-position: center;
+ background-repeat: no-repeat;
+ background-color: #ffffcc;
}
\ No newline at end of file
Modified: plog/branches/lifetype-1.2/js/tinymce/plugins/insertvideo/editor_plugin.js
===================================================================
--- plog/branches/lifetype-1.2/js/tinymce/plugins/insertvideo/editor_plugin.js 2007-02-02 09:50:04 UTC (rev 4667)
+++ plog/branches/lifetype-1.2/js/tinymce/plugins/insertvideo/editor_plugin.js 2007-02-02 10:17:18 UTC (rev 4668)
@@ -1,298 +1,303 @@
-/* Import plugin specific language pack */
-tinyMCE.importPluginLanguagePack('insertvideo', 'en,tr,he,nb,ru,ru_KOI8-R,ru_UTF-8,nn,fi,cy,es,is,pl'); // <- Add a comma separated list of all supported languages
-
-// Singleton class
-var TinyMCE_insertvideoPlugin = {
- getInfo : function() {
- return {
- longname : 'insertvideo plugin',
- author : 'The LifeType Project',
- authorurl : 'http://www.lifetype.net',
- infourl : 'http://www.lifetype.net',
- version : "1.0"
- };
- },
-
- initInstance : function(inst) {
- tinyMCE.importCSS(inst.getDoc(), tinyMCE.baseURL + "/plugins/insertvideo/css/content.css");
- },
-
- getControlHTML : function(cn) {
- switch (cn) {
- case "insertvideo":
- return tinyMCE.getButtonHTML(cn, 'lang_insertvideo_desc', '{$pluginurl}/images/youtube.png', 'mceinsertvideo', true);
- }
-
- return "";
- },
-
- /**
- * Executes a specific command, this function handles plugin commands.
- *
- * @param {string} editor_id TinyMCE editor instance id that issued the command.
- * @param {HTMLElement} element Body or root element for the editor instance.
- * @param {string} command Command name to be executed.
- * @param {string} user_interface True/false if a user interface should be presented.
- * @param {mixed} value Custom value argument, can be anything.
- * @return true/false if the command was executed by this plugin or not.
- * @type
- */
- execCommand : function(editor_id, element, command, user_interface, value) {
- // Handle commands
- switch (command) {
- // Remember to have the "mce" prefix for commands so they don't intersect with built in ones in the browser.
- case "mceinsertvideo":
- // Show UI/Popup
- if (user_interface) {
- // Open a popup window and send in some custom data in a window argument
- var insertvideo = new Array();
-
- insertvideo['file'] = '../../plugins/insertvideo/videoinput.html'; // Relative to theme
- insertvideo['width'] = 500;
- insertvideo['height'] = 260;
-
- tinyMCE.openWindow(insertvideo, {editor_id : editor_id, resizable : "no", scrollbars : "no", inline : "yes"});
- }
- return true;
- }
-
- // Pass to next handler in chain
- return false;
- },
-
- cleanup : function(type, content) {
- switch (type) {
- case "insert_to_editor_dom":
- // Force relative/absolute
- if (tinyMCE.getParam('convert_urls')) {
- var imgs = content.getElementsByTagName("img");
- for (var i=0; i<imgs.length; i++) {
- //if (tinyMCE.getAttrib(imgs[i], "class")== "ltVideoYouTube") {
- if (tinyMCE.getAttrib(imgs[i], "class").substr(0,6) == "ltVideo") {
- var src = tinyMCE.getAttrib(imgs[i], "alt");
-
- if (tinyMCE.getParam('convert_urls'))
- src = eval(tinyMCE.settings['urlconverter_callback'] + "(src, null, true);");
-
- imgs[i].setAttribute('alt', src);
- imgs[i].setAttribute('title', src);
- }
- }
- }
- break;
-
- case "get_from_editor_dom":
- var imgs = content.getElementsByTagName("img");
- for (var i=0; i<imgs.length; i++) {
- if (tinyMCE.getAttrib(imgs[i], "class").substr(0,6) == "ltVideo") {
- var src = tinyMCE.getAttrib(imgs[i], "alt");
-
- if (tinyMCE.getParam('convert_urls'))
- src = eval(tinyMCE.settings['urlconverter_callback'] + "(src, null, true);");
-
- imgs[i].setAttribute('alt', src);
- imgs[i].setAttribute('title', src);
- }
- }
- break;
-
- case "insert_to_editor":
- var startPos = 0;
- var embedList = new Array();
-
- // Fix the embed and object elements
- content = content.replace(new RegExp('<[ ]*object','gi'),'<object');
- content = content.replace(new RegExp('<[ ]*/object[ ]*>','gi'),'</object>');
-
- // Parse all object tags and replace them with images from the embed data
- var index = 0;
- while ((startPos = content.indexOf('<object', startPos)) != -1) {
-
- // Find end of object
- endPos = content.indexOf('</object>', startPos);
- endPos += 9;
-
- objectTag = content.substring(startPos,endPos);
- attribs = TinyMCE_insertvideoPlugin._parseAttributes( objectTag );
-
- var cssClass = "";
- if( attribs["data"] == undefined ) {
- startPos++;
- continue;
- }
- else {
- var videoType = getVideoType( attribs["data"] );
- if( videoType == 1 ) {
- cssClass = "ltVideoGoogleVideo";
- }
- else if( videoType == 2 ) {
- cssClass = "ltVideoYouTube";
- }
- else if( videoType == 3 ) {
- cssClass = "ltVideoMetacafe";
- }
- else if( videoType == 4 ) {
- cssClass = "ltVideoIfilm";
- }
- else if( videoType == 5 ) {
- cssClass = "ltVideoGoear";
- }
- else {
- // ignore it, it's not a youtube or googlevideo video
- startPos++;
- continue;
- }
- }
-
-
- // Insert image
- var contentAfter = content.substring(endPos);
- content = content.substring(0, startPos);
- content += '<img width="' + attribs["width"] + '" height="' + attribs["height"] + '"';
- content += ' src="' + (tinyMCE.getParam("theme_href") + '/images/spacer.gif') + '" title="' + attribs["data"] + '"';
- content += ' alt="' + attribs["data"] + '" class="'+cssClass+'" />' + content.substring(endPos);
- content += contentAfter;
- index++;
-
- startPos++;
- }
-
- break;
-
- case "get_from_editor":
- // Parse all img tags and replace them with object+embed
- var startPos = -1;
-
- while ((startPos = content.indexOf('<img', startPos+1)) != -1) {
- var endPos = content.indexOf('/>', startPos);
- var attribs = TinyMCE_insertvideoPlugin._parseAttributes(content.substring(startPos + 4, endPos));
-
- // Is not flash, skip it
- if (attribs['class'] != "ltVideoYouTube" && attribs['class'] != "ltVideoGoogleVideo" && attribs['class'] != "ltVideoMetacafe" && attribs['class'] != "ltVideoIfilm" && attribs['class'] != "ltVideoGoear" )
- continue;
-
- type = attribs['class'];
-
- endPos += 2;
-
- var embedHTML = '';
- var wmode = tinyMCE.getParam("flash_wmode", "transparent");
- var quality = tinyMCE.getParam("flash_quality", "high");
- var menu = tinyMCE.getParam("flash_menu", "false");
-
- embedHTML = getVideoFlashHTML( attribs["title"], attribs["width"], attribs["height"] , type );
-
- // Insert embed/object chunk
- chunkBefore = content.substring(0, startPos);
- chunkAfter = content.substring(endPos);
- content = chunkBefore + embedHTML + chunkAfter;
- }
- break;
- }
-
- // Pass through to next handler in chain
- return content;
- },
-
- handleNodeChange : function(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) {
- if (node == null)
- return;
-
- do {
- if (node.nodeName == "IMG" && tinyMCE.getAttrib(node, 'class').indexOf('ltVideo') == 0) {
- tinyMCE.switchClass(editor_id + '_flash', 'mceButtonSelected');
- return true;
- }
- } while ((node = node.parentNode));
-
- tinyMCE.switchClass(editor_id + '_flash', 'mceButtonNormal');
-
- return true;
- },
-
- // Private plugin internal functions
-
- _parseAttributes : function(attribute_string) {
- var attributeName = "";
- var attributeValue = "";
- var withInName;
- var withInValue;
- var attributes = new Array();
- var whiteSpaceRegExp = new RegExp('^[ \n\r\t]+', 'g');
-
- if (attribute_string == null || attribute_string.length < 2)
- return null;
-
- withInName = withInValue = false;
-
- for (var i=0; i<attribute_string.length; i++) {
- var chr = attribute_string.charAt(i);
-
- if ((chr == '"' || chr == "'") && !withInValue)
- withInValue = true;
- else if ((chr == '"' || chr == "'") && withInValue) {
- withInValue = false;
-
- var pos = attributeName.lastIndexOf(' ');
- if (pos != -1)
- attributeName = attributeName.substring(pos+1);
-
- attributes[attributeName.toLowerCase()] = attributeValue.substring(1);
-
- attributeName = "";
- attributeValue = "";
- } else if (!whiteSpaceRegExp.test(chr) && !withInName && !withInValue)
- withInName = true;
-
- if (chr == '=' && withInName)
- withInName = false;
-
- if (withInName)
- attributeName += chr;
-
- if (withInValue)
- attributeValue += chr;
- }
-
- return attributes;
- }
-};
-
-function getVideoFlashHTML( url, width, height , type )
-{
- html = "<object type=\"application/x-shockwave-flash\" width=\""+width+"\" height=\""+height+"\" data=\""+url+"\" id=\""+type+"\">"+
- "<param name=\"movie\" value=\""+url+"\" />"+
- "<param name=\"wmode\" value=\"transparent\" />"+
- "<param name=\"allowScriptAcess\" value=\"sameDomain\" />"+
- "<param name=\"quality\" value=\"best\" />"+
- "<param name=\"bgcolor\" value=\"#FFFFFF\" />";
-// "<param name=\"scale\" value=\"noScale\" />";
- if (type=='ltVideoGoear') {
- html= html + "<param name=\"FlashVars\" value=\""+url.substring( 43, url.length ) + "\" />";
- } else {
- html = html + "<param name=\"FlashVars\" value=\"playerMode=embedded\" />";
- }
-
- html = html + "</object>";
-
- return( html );
-}
-
-
-function getVideoType( url )
-{
- if( url.substring( 0, 24 ) == "http://video.google.com/" )
- return 1;
- else if( url.substring( 0, 23 ) == "http://www.youtube.com/" )
- return 2;
- else if( url.substring( 0, 24 ) == "http://www.metacafe.com/" )
- return 3;
- else if( url.substring( 0, 21 ) == "http://www.ifilm.com/" )
- return 4;
- else if( url.substring( 0, 21 ) == "http://www.goear.com/" )
- return 5;
- else
- return 0;
-}
-
+/* Import plugin specific language pack */
+tinyMCE.importPluginLanguagePack('insertvideo', 'en,tr,he,nb,ru,ru_KOI8-R,ru_UTF-8,nn,fi,cy,es,is,pl'); // <- Add a comma separated list of all supported languages
+
+// Singleton class
+var TinyMCE_insertvideoPlugin = {
+ getInfo : function() {
+ return {
+ longname : 'insertvideo plugin',
+ author : 'The LifeType Project',
+ authorurl : 'http://www.lifetype.net',
+ infourl : 'http://www.lifetype.net',
+ version : "1.0"
+ };
+ },
+
+ initInstance : function(inst) {
+ tinyMCE.importCSS(inst.getDoc(), tinyMCE.baseURL + "/plugins/insertvideo/css/content.css");
+ },
+
+ getControlHTML : function(cn) {
+ switch (cn) {
+ case "insertvideo":
+ return tinyMCE.getButtonHTML(cn, 'lang_insertvideo_desc', '{$pluginurl}/images/youtube.png', 'mceinsertvideo', true);
+ }
+
+ return "";
+ },
+
+ /**
+ * Executes a specific command, this function handles plugin commands.
+ *
+ * @param {string} editor_id TinyMCE editor instance id that issued the command.
+ * @param {HTMLElement} element Body or root element for the editor instance.
+ * @param {string} command Command name to be executed.
+ * @param {string} user_interface True/false if a user interface should be presented.
+ * @param {mixed} value Custom value argument, can be anything.
+ * @return true/false if the command was executed by this plugin or not.
+ * @type
+ */
+ execCommand : function(editor_id, element, command, user_interface, value) {
+ // Handle commands
+ switch (command) {
+ // Remember to have the "mce" prefix for commands so they don't intersect with built in ones in the browser.
+ case "mceinsertvideo":
+ // Show UI/Popup
+ if (user_interface) {
+ // Open a popup window and send in some custom data in a window argument
+ var insertvideo = new Array();
+
+ insertvideo['file'] = '../../plugins/insertvideo/videoinput.html'; // Relative to theme
+ insertvideo['width'] = 500;
+ insertvideo['height'] = 260;
+
+ tinyMCE.openWindow(insertvideo, {editor_id : editor_id, resizable : "no", scrollbars : "no", inline : "yes"});
+ }
+ return true;
+ }
+
+ // Pass to next handler in chain
+ return false;
+ },
+
+ cleanup : function(type, content) {
+ switch (type) {
+ case "insert_to_editor_dom":
+ // Force relative/absolute
+ if (tinyMCE.getParam('convert_urls')) {
+ var imgs = content.getElementsByTagName("img");
+ for (var i=0; i<imgs.length; i++) {
+ //if (tinyMCE.getAttrib(imgs[i], "class")== "ltVideoYouTube") {
+ if (tinyMCE.getAttrib(imgs[i], "class").substr(0,6) == "ltVideo") {
+ var src = tinyMCE.getAttrib(imgs[i], "alt");
+
+ if (tinyMCE.getParam('convert_urls'))
+ src = eval(tinyMCE.settings['urlconverter_callback'] + "(src, null, true);");
+
+ imgs[i].setAttribute('alt', src);
+ imgs[i].setAttribute('title', src);
+ }
+ }
+ }
+ break;
+
+ case "get_from_editor_dom":
+ var imgs = content.getElementsByTagName("img");
+ for (var i=0; i<imgs.length; i++) {
+ if (tinyMCE.getAttrib(imgs[i], "class").substr(0,6) == "ltVideo") {
+ var src = tinyMCE.getAttrib(imgs[i], "alt");
+
+ if (tinyMCE.getParam('convert_urls'))
+ src = eval(tinyMCE.settings['urlconverter_callback'] + "(src, null, true);");
+
+ imgs[i].setAttribute('alt', src);
+ imgs[i].setAttribute('title', src);
+ }
+ }
+ break;
+
+ case "insert_to_editor":
+ var startPos = 0;
+ var embedList = new Array();
+
+ // Fix the embed and object elements
+ content = content.replace(new RegExp('<[ ]*object','gi'),'<object');
+ content = content.replace(new RegExp('<[ ]*/object[ ]*>','gi'),'</object>');
+
+ // Parse all object tags and replace them with images from the embed data
+ var index = 0;
+ while ((startPos = content.indexOf('<object', startPos)) != -1) {
+
+ // Find end of object
+ endPos = content.indexOf('</object>', startPos);
+ endPos += 9;
+
+ objectTag = content.substring(startPos,endPos);
+ attribs = TinyMCE_insertvideoPlugin._parseAttributes( objectTag );
+
+ var cssClass = "";
+ if( attribs["data"] == undefined ) {
+ startPos++;
+ continue;
+ }
+ else {
+ var videoType = getVideoType( attribs["data"] );
+ if( videoType == 1 ) {
+ cssClass = "ltVideoGoogleVideo";
+ }
+ else if( videoType == 2 ) {
+ cssClass = "ltVideoYouTube";
+ }
+ else if( videoType == 3 ) {
+ cssClass = "ltVideoMetacafe";
+ }
+ else if( videoType == 4 ) {
+ cssClass = "ltVideoIfilm";
+ }
+ else if( videoType == 5 ) {
+ cssClass = "ltVideoGoear";
+ }
+ else if( videoType == 6 ) {
+ cssClass = "ltVideoGrouper";
+ }
+ else {
+ // ignore it, it's not a youtube or googlevideo video
+ startPos++;
+ continue;
+ }
+ }
+
+
+ // Insert image
+ var contentAfter = content.substring(endPos);
+ content = content.substring(0, startPos);
+ content += '<img width="' + attribs["width"] + '" height="' + attribs["height"] + '"';
+ content += ' src="' + (tinyMCE.getParam("theme_href") + '/images/spacer.gif') + '" title="' + attribs["data"] + '"';
+ content += ' alt="' + attribs["data"] + '" class="'+cssClass+'" />' + content.substring(endPos);
+ content += contentAfter;
+ index++;
+
+ startPos++;
+ }
+
+ break;
+
+ case "get_from_editor":
+ // Parse all img tags and replace them with object+embed
+ var startPos = -1;
+
+ while ((startPos = content.indexOf('<img', startPos+1)) != -1) {
+ var endPos = content.indexOf('/>', startPos);
+ var attribs = TinyMCE_insertvideoPlugin._parseAttributes(content.substring(startPos + 4, endPos));
+
+ // Is not flash, skip it
+ if (attribs['class'] != "ltVideoYouTube" && attribs['class'] != "ltVideoGoogleVideo" && attribs['class'] != "ltVideoMetacafe" && attribs['class'] != "ltVideoIfilm" && attribs['class'] != "ltVideoGoear" && attribs['class'] != "ltVideoGrouper")
+ continue;
+
+ type = attribs['class'];
+
+ endPos += 2;
+
+ var embedHTML = '';
+ var wmode = tinyMCE.getParam("flash_wmode", "transparent");
+ var quality = tinyMCE.getParam("flash_quality", "high");
+ var menu = tinyMCE.getParam("flash_menu", "false");
+
+ embedHTML = getVideoFlashHTML( attribs["title"], attribs["width"], attribs["height"] , type );
+
+ // Insert embed/object chunk
+ chunkBefore = content.substring(0, startPos);
+ chunkAfter = content.substring(endPos);
+ content = chunkBefore + embedHTML + chunkAfter;
+ }
+ break;
+ }
+
+ // Pass through to next handler in chain
+ return content;
+ },
+
+ handleNodeChange : function(editor_id, node, undo_index, undo_levels, visual_aid, any_selection) {
+ if (node == null)
+ return;
+
+ do {
+ if (node.nodeName == "IMG" && tinyMCE.getAttrib(node, 'class').indexOf('ltVideo') == 0) {
+ tinyMCE.switchClass(editor_id + '_flash', 'mceButtonSelected');
+ return true;
+ }
+ } while ((node = node.parentNode));
+
+ tinyMCE.switchClass(editor_id + '_flash', 'mceButtonNormal');
+
+ return true;
+ },
+
+ // Private plugin internal functions
+
+ _parseAttributes : function(attribute_string) {
+ var attributeName = "";
+ var attributeValue = "";
+ var withInName;
+ var withInValue;
+ var attributes = new Array();
+ var whiteSpaceRegExp = new RegExp('^[ \n\r\t]+', 'g');
+
+ if (attribute_string == null || attribute_string.length < 2)
+ return null;
+
+ withInName = withInValue = false;
+
+ for (var i=0; i<attribute_string.length; i++) {
+ var chr = attribute_string.charAt(i);
+
+ if ((chr == '"' || chr == "'") && !withInValue)
+ withInValue = true;
+ else if ((chr == '"' || chr == "'") && withInValue) {
+ withInValue = false;
+
+ var pos = attributeName.lastIndexOf(' ');
+ if (pos != -1)
+ attributeName = attributeName.substring(pos+1);
+
+ attributes[attributeName.toLowerCase()] = attributeValue.substring(1);
+
+ attributeName = "";
+ attributeValue = "";
+ } else if (!whiteSpaceRegExp.test(chr) && !withInName && !withInValue)
+ withInName = true;
+
+ if (chr == '=' && withInName)
+ withInName = false;
+
+ if (withInName)
+ attributeName += chr;
+
+ if (withInValue)
+ attributeValue += chr;
+ }
+
+ return attributes;
+ }
+};
+
+function getVideoFlashHTML( url, width, height , type )
+{
+ html = "<object type=\"application/x-shockwave-flash\" width=\""+width+"\" height=\""+height+"\" data=\""+url+"\" id=\""+type+"\">"+
+ "<param name=\"movie\" value=\""+url+"\" />"+
+ "<param name=\"wmode\" value=\"transparent\" />"+
+ "<param name=\"allowScriptAcess\" value=\"sameDomain\" />"+
+ "<param name=\"quality\" value=\"best\" />"+
+ "<param name=\"bgcolor\" value=\"#FFFFFF\" />";
+// "<param name=\"scale\" value=\"noScale\" />";
+ if (type=='ltVideoGoear') {
+ html= html + "<param name=\"FlashVars\" value=\""+url.substring( 43, url.length ) + "\" />";
+ } else {
+ html = html + "<param name=\"FlashVars\" value=\"playerMode=embedded\" />";
+ }
+
+ html = html + "</object>";
+
+ return( html );
+}
+
+
+function getVideoType( url )
+{
+ if( url.substring( 0, 24 ) == "http://video.google.com/" )
+ return 1;
+ else if( url.substring( 0, 23 ) == "http://www.youtube.com/" )
+ return 2;
+ else if( url.substring( 0, 24 ) == "http://www.metacafe.com/" )
+ return 3;
+ else if( url.substring( 0, 21 ) == "http://www.ifilm.com/" )
+ return 4;
+ else if( url.substring( 0, 21 ) == "http://www.goear.com/" )
+ return 5;
+ else if( url.substring( 0, 21 ) == "http://www.grouper.com/" )
+ return 6;
+ else
+ return 0;
+}
+
tinyMCE.addPlugin("insertvideo", TinyMCE_insertvideoPlugin );
\ No newline at end of file
Modified: plog/branches/lifetype-1.2/js/tinymce/plugins/insertvideo/functions.js
===================================================================
--- plog/branches/lifetype-1.2/js/tinymce/plugins/insertvideo/functions.js 2007-02-02 09:50:04 UTC (rev 4667)
+++ plog/branches/lifetype-1.2/js/tinymce/plugins/insertvideo/functions.js 2007-02-02 10:17:18 UTC (rev 4668)
@@ -107,6 +107,26 @@
return( url );
}
+function getGrouperVideoLink( url )
+{
+ // check if it's a link to a video page or a link to the video player
+ if( url.substring( 0, 46 ) == "http://grouper.com/video/MediaDetails.aspx?id=" ) {
+ // if it's a link to a video page, generate the right one
+ var regexp = /http:\/\/www.grouper.com\/video\/MediaDetails.aspx.*?id=([\-0-9a-zA-z_]*).*/i;
+ result = regexp.exec( url );
+ if( result ) {
+ videoId = result[1];
+ }
+ else {
+ videoId = url.substring( 46, url.length );
+ }
+
+ url = "http://grouper.com/mtg/mtgPlayer.swf?gvars=vurl~http%3a%2f%2fgrouper.com%2frss%2fflv.ashx%3fid%3d" + videoId + "_rf%7e-9_vfver~8_ap~1_extid~-1";
+ }
+
+ return( url );
+}
+
function insertVideoCode()
{
// get and check the URL
@@ -123,11 +143,13 @@
// dalealplay = document.getElementById("dalealplay");
metacafe = document.getElementById("metacafe");
ifilm = document.getElementById("ifilm");
- goear = document.getElementById("goear");
+ goear = document.getElementById("goear");
+ grouper = document.getElementById("grouper");
+
// bolt = document.getElementById("bolt");
- if( youtube.checked==false && gvideo.checked==false && metacafe.checked==false && ifilm.checked==false && goear.checked==false ) {
- window.alert( "Debes seleccionar el tipo de video." );
+ if( youtube.checked==false && gvideo.checked==false && metacafe.checked==false && ifilm.checked==false && goear.checked==false && grouper.checked==false ) {
+ window.alert( "You must select the right video site." );
return( false );
}
@@ -161,7 +183,12 @@
width=366;
height=75;
}
-
+ if( grouper.checked == true ) {
+ link = getGrouperVideoLink( url );
+ css="ltVideoGrouper";
+ width=496;
+ height=398;
+ }
insertFlash( link, css, width, height );
}
Copied: plog/branches/lifetype-1.2/js/tinymce/plugins/insertvideo/images/grouper.png (from rev 4667, plog/branches/lifetype-1.1.5/js/tinymce/plugins/insertvideo/images/grouper.png)
===================================================================
(Binary files differ)
Modified: plog/branches/lifetype-1.2/js/tinymce/plugins/insertvideo/videoinput.html
===================================================================
--- plog/branches/lifetype-1.2/js/tinymce/plugins/insertvideo/videoinput.html 2007-02-02 09:50:04 UTC (rev 4667)
+++ plog/branches/lifetype-1.2/js/tinymce/plugins/insertvideo/videoinput.html 2007-02-02 10:17:18 UTC (rev 4668)
@@ -1,48 +1,50 @@
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
- <title>Insert Video</title>
- <script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
- <script language="javascript" type="text/javascript" src="functions.js"></script>
- <base target="_self" />
-</head>
-<body style="display: none">
- <form name="video" id="video" method="post" action="#">
- <div class="tabs">
- <ul>
- <li id="general_tab" class="current"><span>Insert Video</span></li>
- </ul>
- </div>
- <div class="panel_wrapper">
- <div id="general_panel" class="panel_current">
- <legend>Please provide a link to a video file or a link to a video page.</legend>
- <table border="0" cellpadding="4" cellspacing="0">
- <tr>
- <td nowrap="nowrap">Video URL:</td>
- <td><input type="text" id="url" name="url" value="" style="width:350px" /></td>
- </tr>
- <tr>
- <td nowrap="nowrap">Source:</td>
- <td>
- <input type="radio" id="youtube" style="border:0px" name="type" value="1"><img src="images/youtube.png" alt="YouTube" /> YouTube<br />
- <input type="radio" id="gvideo" style="border:0px"name="type" value="2"><img src="images/gvideo.png" alt="Google Video" /> Google Video<br />
- <input type="radio" id="metacafe" style="border:0px"name="type" value="3"><img src="images/metacafe.png" alt="Metacafe" /> Metacafe<br />
- <input type="radio" id="ifilm" style="border:0px"name="type" value="4"><img src="images/ifilm.png" alt="iFilm" /> iFilm<br />
- <input type="radio" id="goear" style="border:0px"name="type" value="5"><img src="images/goear.png" alt="Goear" /> Goear<br />
- </td>
- </tr>
- </table>
- </div>
- </div>
- <div class="mceActionPanel">
- <div style="float:left">
- <input type="button" name="insert" value="Insert Code" onClick="insertVideoCode()" id="insert" />
- </div>
- <div style="float:right">
- <input type="button" name="cancel" value="Close" onclick="tinyMCEPopup.close();" id="cancel" />
- </div>
- </div>
- </div>
- </div>
- </form>
-</body>
-</html>
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title>Insert Video</title>
+ <script language="javascript" type="text/javascript" src="../../tiny_mce_popup.js"></script>
+ <script language="javascript" type="text/javascript" src="functions.js"></script>
+ <base target="_self" />
+</head>
+<body style="display: none">
+ <form name="video" id="video" method="post" action="#">
+ <div class="tabs">
+ <ul>
+ <li id="general_tab" class="current"><span>Insert Video</span></li>
+ </ul>
+ </div>
+ <div class="panel_wrapper">
+ <div id="general_panel" class="panel_current">
+ <legend>Please provide a link to a video file.</legend>
+ <table border="0" cellpadding="4" cellspacing="0">
+ <tr>
+ <td nowrap="nowrap">Video URL:</td>
+ <td><input type="text" id="url" name="url" value="" style="width:350px" /></td>
+ </tr>
+ <tr>
+ <td nowrap="nowrap">Select Source:</td>
+ <td>
+ <input type="radio" id="youtube" style="border:0px" name="type" value="1"><img src="images/youtube.png" alt="YouTube" /> YouTube<br />
+ <input type="radio" id="gvideo" style="border:0px"name="type" value="2"><img src="images/gvideo.png" alt="Google Video" /> Google Video<br />
+ <input type="radio" id="metacafe" style="border:0px"name="type" value="3"><img src="images/metacafe.png" alt="Metacafe" /> Metacafe<br />
+ <input type="radio" id="ifilm" style="border:0px"name="type" value="4"><img src="images/ifilm.png" alt="iFilm" /> iFilm<br />
+ <input type="radio" id="goear" style="border:0px"name="type" value="5"><img src="images/goear.png" alt="Goear" /> Goear<br />
+ <input type="radio" id="grouper" style="border:0px"name="type" value="6"><img src="images/grouper.png" alt="Grouper" /> Grouper<br />
+
+ </td>
+ </tr>
+ </table>
+ </div>
+ </div>
+ <div class="mceActionPanel">
+ <div style="float:left">
+ <input type="button" name="insert" value="Insert Code" onClick="insertVideoCode()" id="insert" />
+ </div>
+ <div style="float:right">
+ <input type="button" name="cancel" value="Close" onclick="tinyMCEPopup.close();" id="cancel" />
+ </div>
+ </div>
+ </div>
+ </div>
+ </form>
+</body>
+</html>
Modified: plog/branches/lifetype-1.2/js/ui/summary.js
===================================================================
--- plog/branches/lifetype-1.2/js/ui/summary.js 2007-02-02 09:50:04 UTC (rev 4667)
+++ plog/branches/lifetype-1.2/js/ui/summary.js 2007-02-02 10:17:18 UTC (rev 4668)
@@ -1,7 +1,7 @@
function checkUserNameAjax()
{
var userName = $F('userName');
- userName = userName.toLowerCase();
+ //userName = userName.toLowerCase();
if (userName != '')
{
var url = plogSummaryBaseUrl;
Modified: plog/branches/lifetype-1.2/templates/summary/blogprofile.template
===================================================================
--- plog/branches/lifetype-1.2/templates/summary/blogprofile.template 2007-02-02 09:50:04 UTC (rev 4667)
+++ plog/branches/lifetype-1.2/templates/summary/blogprofile.template 2007-02-02 10:17:18 UTC (rev 4668)
@@ -12,7 +12,9 @@
<p>
{$locale->tr("users")}
{assign var=blogUsers value=$blog->getUsersInfo()}
- <a href="?op=UserProfile&userId={$owner->getId()}">{$owner->getUsername()|strip_tags}</a>{foreach from=$blogUsers item=blogUser name=blogUsersLoop}{if $owner->getId() != $blogUser->getId()}, <a href="?op=UserProfile&userId={$blogUser->getId()}">{$blogUser->getUsername()|strip_tags}</a>{/if}{/foreach}
+ <a href="?op=UserProfile&userId={$owner->getId()}">{$owner->getUsername()|strip_tags}</a>{foreach from=$blogUsers item=blogUser name=blogUsersLoop}{if $owner->getId() != $blogUser->getId()}, <a href="?op=UserProfile&userId={$blogUser->getId()}">{$blogUser->getUsername()|strip_tags}</a>{/if}{/foreach}<br/>
+ {assign var=lastUpdate value=$blog->getUpdateDateObject()}
+ {$locale->tr("updated")}: {$locale->formatDate($lastUpdate)}
</p>
<h4>» {$locale->tr("latest_posts")}</h4>
<p>
More information about the pLog-svn
mailing list