From ca9ca396b27be04807ab7daa44849bc6f6e423b1 Mon Sep 17 00:00:00 2001 From: Miriam Ruiz Date: Thu, 9 Sep 2010 00:10:23 +0200 Subject: [PATCH] Made quite a few changes so that the code works in the server --- conf/language.php | 1 - extensions/BlogThis/translations/Castellano.php | 18 +++++------ extensions/CategoryIcons/style.css | 4 +-- extensions/JQE/settings.php | 5 ++- extensions/PageMng/CustomPages.php | 1 + extensions/TagThis/translations/Castellano.php | 2 +- feed.php | 10 +++--- library/Framework/Framework.Class.Select.php | 17 ++++++++-- library/Vanilla/Vanilla.Control.CategoryForm.php | 9 ++++-- permissions.php | 40 ++++++++++++++++++++++++ themes/miry/styles/default/vanilla.css | 4 +-- 11 files changed, 87 insertions(+), 24 deletions(-) mode change 100755 => 100644 conf/language.php mode change 100755 => 100644 extensions/PageMng/CustomPages.php create mode 100644 permissions.php diff --git a/conf/language.php b/conf/language.php old mode 100755 new mode 100644 index 4c6cb35..02faa14 --- a/conf/language.php +++ b/conf/language.php @@ -1,6 +1,5 @@ Dictionary[ "RSS2Feed" ] diff --git a/extensions/BlogThis/translations/Castellano.php b/extensions/BlogThis/translations/Castellano.php index 08396ba..3d94be1 100644 --- a/extensions/BlogThis/translations/Castellano.php +++ b/extensions/BlogThis/translations/Castellano.php @@ -5,9 +5,9 @@ $Context->SetDefinition('BlogThis', 'publicar en blog'); $Context->SetDefinition('UnBlogThis', 'despublicar de blog'); $Context->SetDefinition('BlogTitle', 'What is the blog page title?'); $Context->SetDefinition('BlogTabName', 'What is the text that should be displayed in the tab?'); -$Context->SetDefinition('BlogExtra', 'Extra Options'); +$Context->SetDefinition('BlogExtra', 'Opciones adicionales'); $Context->SetDefinition('BlogAdsense', 'Add Adsense section targetting to blog posts and titles?'); -$Context->SetDefinition('BlogSettings', 'Exportación a Blogs'); +$Context->SetDefinition('BlogSettings', 'Exportación al blog'); $Context->SetDefinition('BlogNotes', 'These settings are specific to the BlogThis extension. Make sure that your user has permission to Blog/UnBlog posts. Be aware that there is a global character limit that will also affect BlogThis. '); $Context->SetDefinition('BlogPostPerPage', 'How many blog posts should be displayed per page?'); $Context->SetDefinition('BlogSocialBookmarks', 'Which social bookmarking links should be added?'); @@ -15,13 +15,13 @@ $Context->SetDefinition('BlogSocialBookmarksDigg', 'Digg it'); $Context->SetDefinition('BlogSocialBookmarksDelicious', 'Del.icio.us'); $Context->SetDefinition('BlogSocialBookmarksStumble', 'Stumble Upon'); $Context->SetDefinition('BlogSocialBookmarksTechnorati', 'Technorati'); -$Context->SetDefinition('AddComments', 'Add Comment'); +$Context->SetDefinition('AddComments', 'Añadir comentarios'); $Context->SetDefinition('BlogDate', 'Blog post date format?'); -$Context->SetDefinition('More', 'Click to read more...'); -$Context->SetDefinition('Examples', 'Click to see examples'); +$Context->SetDefinition('More', 'Pulsa para leer más...'); +$Context->SetDefinition('Examples', 'Pulsa para ver ejemplos'); $Context->SetDefinition('MoreExamples', 'Má ejemplos'); $Context->SetDefinition('WordLimit', 'Set the maximum number of words per blog post to show. Set to "0" to show the entire post.'); -$Context->SetDefinition('ProfileText', 'Profile Text'); +$Context->SetDefinition('ProfileText', 'Texto del perfil'); $Context->SetDefinition('ProfileTextDesc', 'Tell us a little about yourself, and feel free to use HTML links.'); $Context->SetDefinition('NoProfileText', 'hasn\'t written a profile yet.'); $Context->SetDefinition('ViewBlogPosts', 'View blog posts...'); @@ -32,7 +32,7 @@ $Context->SetDefinition('BlogFullName', 'Display full name?'); $Context->SetDefinition('StartBlogPost', 'Nueva entrada en blog'); $Context->SetDefinition('BlogPostCheck', 'Blog this post?'); -$Context->SetDefinition('PERMISSION_CANBLOGALL', 'Puede publicar y despublicar cualquier comentario en un blog.'); -$Context->SetDefinition('PERMISSION_CANBLOGTHIS', 'Puede publicar y despublicar sus propios comentarios en un blog.'); -$Context->SetDefinition('PERMISSION_BLOGPROFILEHTML', 'Se le permite usar HTML en su perfil en los blogs.'); +$Context->SetDefinition('PERMISSION_CANBLOGALL', 'Puede publicar y despublicar cualquier comentario en el blog.'); +$Context->SetDefinition('PERMISSION_CANBLOGTHIS', 'Puede publicar y despublicar sus propios comentarios en el blog.'); +$Context->SetDefinition('PERMISSION_BLOGPROFILEHTML', 'Se le permite usar HTML en su perfil del blog.'); ?> \ No newline at end of file diff --git a/extensions/CategoryIcons/style.css b/extensions/CategoryIcons/style.css index 2dbe553..6b4350d 100644 --- a/extensions/CategoryIcons/style.css +++ b/extensions/CategoryIcons/style.css @@ -24,7 +24,7 @@ select option.CatAvisos:before { select option.CatAdministracion:before { content: url(img/sheriff.15.png) !important; } -select option.CatReservado:before { +select option.CatPrivado:before { content: url(img/vip.15.png) !important; } select option.CatNoticias:before { @@ -54,7 +54,7 @@ background: transparent url(img/important.60.png) 2px 50% no-repeat !important; #Categories .CatAdministracion { background: transparent url(img/sheriff.60.png) 2px 50% no-repeat !important; } -#Categories .CatReservado { +#Categories .CatPrivado { background: transparent url(img/vip.60.png) 2px 50% no-repeat !important; } #Categories .CatNoticias { diff --git a/extensions/JQE/settings.php b/extensions/JQE/settings.php index 4b469a4..4de2912 100644 --- a/extensions/JQE/settings.php +++ b/extensions/JQE/settings.php @@ -45,7 +45,10 @@ $JQE_allowed_tags = array( 'a' => array('accesskey' => 1, 'class' => 1, 'href' = 'strike' => array('class' => 1, 'title' => 1), 'strong' => array('class' => 1, 'title' => 1), 'sub' => array('class' => 1, 'title' => 1), - 'sup' => array('class' => 1, 'title' => 1), + 'sup' => array('class' => 1, 'title' => 1), + 'table' => array('class' => 1, 'width' => 1), + 'tr' => array('class' => 1, 'width' => 1), + 'td' => array('class' => 1, 'width' => 1), 'u' => array('class' => 1, 'title' => 1), 'ul' => array('class' => 1, 'compact' => array('valueless' => 'y'), 'title' => 1, 'type' => 1), 'var' => array('class' => 1, 'title' => 1) diff --git a/extensions/PageMng/CustomPages.php b/extensions/PageMng/CustomPages.php old mode 100755 new mode 100644 index e69de29..861fc8f --- a/extensions/PageMng/CustomPages.php +++ b/extensions/PageMng/CustomPages.php @@ -0,0 +1 @@ + array('tab' => 'Destacados', 'page' => 'Blog', 'url' => 'http://www.miriamruiz.es/threads/extension.php?PostBackAction=Blog', 'html' => 0, 'custom' => 0, 'attribs' => '', 'roles' => array(0 => 0, 1 => 2, 2 => 3, 3 => 4), 'hidden' => 0), 1 => array('tab' => 'Conversaciones', 'page' => 'discussions', 'url' => 'http://www.miriamruiz.es/threads/', 'html' => 0, 'custom' => 0, 'attribs' => '', 'roles' => array(0 => 0, 1 => 2, 2 => 3, 3 => 4), 'hidden' => 0), 2 => array('tab' => 'Categorías', 'page' => 'categories', 'url' => 'http://www.miriamruiz.es/threads/categories.php', 'html' => 0, 'custom' => 0, 'attribs' => '', 'roles' => array(0 => 0, 1 => 2, 2 => 3, 3 => 4), 'hidden' => 0), 3 => array('tab' => 'Buscar', 'page' => 'search', 'url' => 'http://www.miriamruiz.es/threads/search.php', 'html' => 0, 'custom' => 0, 'attribs' => '', 'roles' => array(0 => 0, 1 => 2, 2 => 3, 3 => 4), 'hidden' => 0), 4 => array('tab' => 'Configuración', 'page' => 'settings', 'url' => 'http://www.miriamruiz.es/threads/settings.php', 'html' => 0, 'custom' => 0, 'attribs' => '', 'roles' => array(0 => 0, 1 => 2, 2 => 3, 3 => 4), 'hidden' => 0), 5 => array('tab' => 'Mi Perfil', 'page' => 'account', 'url' => 'http://www.miriamruiz.es/threads/account.php', 'html' => 0, 'custom' => 0, 'attribs' => '', 'roles' => array(0 => 0, 1 => 2, 2 => 3, 3 => 4), 'hidden' => 0)); ?> \ No newline at end of file diff --git a/extensions/TagThis/translations/Castellano.php b/extensions/TagThis/translations/Castellano.php index 1034f4f..4c2deca 100644 --- a/extensions/TagThis/translations/Castellano.php +++ b/extensions/TagThis/translations/Castellano.php @@ -3,7 +3,7 @@ $Context->SetDefinition('TagThis Management', 'Etiquetas'); $Context->SetDefinition('DiscussionTags', 'Etiquetas (Separadas por comas)'); $Context->SetDefinition('DiscussionTags', 'Etiquetas (Separadas por comas)'); $Context->SetDefinition('TagCloud', 'Nube de etiquetas'); -$Context->SetDefinition('SiteTagCloud', 'Nube de etiquetas del portal'); +$Context->SetDefinition('SiteTagCloud', 'Nube de etiquetas global'); $Context->SetDefinition('UserTagCloud', 'Nube de etiquetas personal'); $Context->SetDefinition('DiscussionTagCloud', 'Nube de etiquetas de la conversación'); $Context->SetDefinition('TTSettings', 'Etiquetas'); diff --git a/feed.php b/feed.php index f7103fd..a2b8f00 100644 --- a/feed.php +++ b/feed.php @@ -93,13 +93,15 @@ class SimpleHttp { define('CACHE_PATH', $Configuration['APPLICATION_PATH'] . '/cache/'); class SimpleCache { + var $sCacheSubDir; var $sFile; var $sFileLock; - var $iCacheTime; + var $iCacheTime; // In seconds var $oCacheObject; - function SimpleCache($sKey, $iCacheTime = 300) { - $this->sFile = CACHE_PATH.md5($sKey).".cache"; + function SimpleCache($sType,$sKey, $iCacheTime = 300) { + $this->sCacheSubDir = '/'.$sType.'/'; + $this->sFile = CACHE_PATH.$this->sCacheSubDir.md5($sKey).".cache"; $this->sFileLock = "$this->sFile.lock"; $iCacheTime >= 10 ? $this->iCacheTime = $iCacheTime : $this->iCacheTime = 10; } @@ -187,7 +189,7 @@ if (isset($_GET['Blog']) || isset($_GET['BlogSearch'])) { // Messages in the blo $url = $Configuration['BASE_URL'].'/search.php?'.$params.'&FeedTitle='.urlencode($FeedTitle); -$cache = new SimpleCache($params); +$cache = new SimpleCache('feed', $params, 600); if ($cache->Check()) { echo($cache->Get()); } else { diff --git a/library/Framework/Framework.Class.Select.php b/library/Framework/Framework.Class.Select.php index a88e449..659842d 100644 --- a/library/Framework/Framework.Class.Select.php +++ b/library/Framework/Framework.Class.Select.php @@ -44,8 +44,21 @@ class Select { while ($rows = $Database->GetRow($DataSet)) { if ($AttrsInfo === false) $this->AddOption($rows[$IdField], $rows[$DisplayField]); - else if (is_callable($AttrsInfo)) - $this->AddOption($rows[$IdField], $rows[$DisplayField], $AttrsInfo($rows)); + else if (is_callable($AttrsInfo)) { + if (is_array($AttrsInfo) && count($AttrsInfo) == 2) { + $this->AddOption( + $rows[$IdField], + $rows[$DisplayField], + call_user_func($AttrsInfo, $rows) + ); + } else { + $this->AddOption( + $rows[$IdField], + $rows[$DisplayField], + $AttrsInfo($rows) + ); + } + } else $this->AddOption($rows[$IdField], $rows[$DisplayField], $rows[$AttrsInfo]); } diff --git a/library/Vanilla/Vanilla.Control.CategoryForm.php b/library/Vanilla/Vanilla.Control.CategoryForm.php index 82fc23b..5778bf1 100644 --- a/library/Vanilla/Vanilla.Control.CategoryForm.php +++ b/library/Vanilla/Vanilla.Control.CategoryForm.php @@ -17,7 +17,6 @@ * @version 1.1.10 */ - /** * The CategoryForm control is used to create and manipulate categories in Vanilla. * @package Vanilla @@ -92,7 +91,13 @@ class CategoryForm extends PostBackControl { $this->CategorySelect = $this->Context->ObjectFactory->NewObject($this->Context, 'Select'); $this->CategorySelect->Name = 'CategoryID'; $this->CategorySelect->CssClass = 'SmallInput'; - $this->CategorySelect->AddOptionsFromDataSet($this->Context->Database, $this->CategoryData, 'CategoryID', 'Name', this->CleanCategoryName ); + $this->CategorySelect->AddOptionsFromDataSet( + $this->Context->Database, + $this->CategoryData, + 'CategoryID', + 'Name', + array($this, 'CleanCategoryName') + ); } if (in_array($this->PostBackAction, array('Category', 'ProcessCategory'))) { $this->CategoryRoles = $this->Context->ObjectFactory->NewObject($this->Context, 'Checkbox'); diff --git a/permissions.php b/permissions.php new file mode 100644 index 0000000..9b46df5 --- /dev/null +++ b/permissions.php @@ -0,0 +1,40 @@ +\n"; + chmod($path, $filePerm); + // If this is a directory... + } elseif(is_dir($path)) { + // Then get an array of the contents + $foldersAndFiles = scandir($path); + // Remove "." and ".." from the list + $entries = array_slice($foldersAndFiles, 2); + // Parse every result... + foreach($entries as $entry) { + // And call this function again recursively, with the same permissions + recursive_chmod($path."/".$entry, $filePerm, $dirPerm); + } + // When we are done with the contents of the directory, we chmod the directory itself + echo "chmod $path ".sprintf("%o",$dirPerm)." [DIR]
\n"; + chmod($path, $dirPerm); + } + // Everything seemed to work out well, return TRUE + return(TRUE); +} + +$BASEDIR='/var/www/miriamruiz.es/threads'; +chmod($BASEDIR.'/conf/database.php', 0666); +chmod($BASEDIR.'/conf/extensions.php', 0666); +chmod($BASEDIR.'/conf/settings.php', 0666); +recursive_chmod($BASEDIR.'/conf/language_cache', 0666, 0777); +recursive_chmod($BASEDIR.'/cache', 0666, 0777); +?> \ No newline at end of file diff --git a/themes/miry/styles/default/vanilla.css b/themes/miry/styles/default/vanilla.css index 482b113..1cbdd08 100644 --- a/themes/miry/styles/default/vanilla.css +++ b/themes/miry/styles/default/vanilla.css @@ -126,8 +126,8 @@ a:hover { text-align:center; text-shadow: 4px 4px 4px #aaa; color:#000; - font-size:48px; - margin:10px 0; + font-size:28px; + margin:14px 0; } #Header h1 strong { color:#ffa500; -- 2.11.4.GIT