Skip to content

Commit

Permalink
com_html is now com_pages
Browse files Browse the repository at this point in the history
  • Loading branch information
rmdstudio committed Feb 14, 2016
1 parent 1203255 commit 09b4f0e
Show file tree
Hide file tree
Showing 25 changed files with 94 additions and 179 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
To view the detailed commits log go to https://github.com/anahitasocial/anahita/commits/master

Anahita 4.1.9 Birth Release
Anahita 4.2.* Embryo Release
=============================
* Location graph implemented. We can now tag actors and media with locations and search nearby actors and media nodes.
* Implemented integration with google maps and location api to render maps, geolocate, etc.
* com_pages is now com_articles therefore we call it the Articles app.
* com_html is now com_pages

Anahita 4.1.8 Birth Release
=============================
Expand Down
1 change: 1 addition & 0 deletions anahita
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ class ComArticlesSchemaMigration1 extends ComMigratorMigrationVersion
*/
public function up()
{
dbexec('UPDATE `#__components` SET name=\'Articles\', link=\'option=com_articles\', `option`=\'com_articles\' WHERE `option` = \'com_pages\' ');

// node types
dbexec('UPDATE `#__nodes` SET type=\'ComMediumDomainEntityMedium,ComArticlesDomainEntityArticle,com:articles.domain.entity.article\' WHERE type=\'ComMediumDomainEntityMedium,ComPagesDomainEntityPage,com:pages.domain.entity.page\'');

Expand All @@ -30,9 +28,6 @@ public function up()
// story_object_type
dbexec('UPDATE `#__nodes` SET story_object_type=\'com:articles.domain.entity.article\' WHERE story_object_type=\'com:pages.domain.entity.page\' ');

// Update nodes: component
dbexec('UPDATE `#__nodes` SET component=\'com_articles\' WHERE component=\'com_pages\'');

// Update edges
dbexec('UPDATE `#__edges` SET `node_b_type` = \'com:articles.domain.entity.article\' WHERE `node_b_type` = \'com:pages.domain.entity.page\' ');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@
<?php

$tos_layout = get_config_value('subscriptions.tos_content_layout');
$tos_replace = '<a href="'.@route('option=com_html&view=content&layout='.$tos_layout).'" target="_blank">'.@text('COM-SUBSCRIPTIONS-TERMS-SERVICE').'</a>';
$tos_replace = '<a href="'.@route('option=com_pages&view=content&layout='.$tos_layout).'" target="_blank">'.@text('COM-SUBSCRIPTIONS-TERMS-SERVICE').'</a>';

$privacy_layout = get_config_value('subscriptions.privacy_content_layout');
$privacy_replace = '<a href="'.@route('option=com_html&view=content&layout='.$privacy_layout).'" target="_blank">'.@text('COM-SUBSCRIPTIONS-PRIVACY-POLICY').'</a>';
$privacy_replace = '<a href="'.@route('option=com_pages&view=content&layout='.$privacy_layout).'" target="_blank">'.@text('COM-SUBSCRIPTIONS-PRIVACY-POLICY').'</a>';

$body = sprintf(@text('COM-SUBSCRIPTIONS-TERMS-DESCRIPTION'), $tos_replace, $privacy_replace);

Expand Down
34 changes: 34 additions & 0 deletions src/administrator/components/com_anahita/schemas/migrations/16.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?php

/**
* LICENSE: ##LICENSE##
*
* @package Com_Anahita
* @subpackage Schema_Migration
*/

/**
* Schema Migration
*
* @package Com_Anahita
* @subpackage Schema_Migration
*/
class ComAnahitaSchemaMigration16 extends ComMigratorMigrationVersion
{
/**
* Called when migrating up
*/
public function up()
{
dbexec('DELETE FROM `#__components` WHERE `option` = \'com_pages\' ');
dbexec('UPDATE `#__components` SET `name` = \'Pages\', `link` = \'option=com_pages\', `admin_menu_link` = \'option=com_pages\', `admin_menu_alt` = \'Pages\', `option` = \'com_pages\', `ordering` = 0 WHERE `option` = \'com_html\' ');
}

/**
* Called when rolling back a migration
*/
public function down()
{
//add your migration here
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public function up()
{
dbexec('delete from jos_components where `option` IN ("com_installer","com_bazaar","com_tagmeta")');
dbexec('delete from jos_components where `option` IS NULL OR `option` = ""');
dbexec('update jos_components set admin_menu_link ="" where `option` IN ("com_search","com_todos","com_pages","com_html","com_invites")');
dbexec('update jos_components set admin_menu_link ="" where `option` IN ("com_search","com_todos","com_articles","com_pages","com_invites")');
///remove privacy_read_mode. some installation may still have it
try {
dbexec('alter table jos_anahita_nodes drop column `privacy_read_mode`');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ class ComAnahitaSchemaMigration3 extends ComMigratorMigrationVersion
public function up()
{
//add html component if not already in
if (!dbexists('SELECT id FROM #__components WHERE `option` = "com_html"')) {
$this[] = "INSERT INTO `#__components` VALUES(NULL, 'Html', 'option=com_html', 0, 0, 'option=com_html', 'Html', 'com_html', 0, 'js/ThemeOffice/component.png', 1, '', 1)";
if (!dbexists('SELECT id FROM #__components WHERE `option` = "com_pages"')) {
$this[] = "INSERT INTO `#__components` VALUES(NULL, 'Html', 'option=com_pages', 0, 0, 'option=com_pages', 'Html', 'com_pages', 0, 'js/ThemeOffice/component.png', 1, '', 1)";
}
$this[] = "UPDATE #__components SET admin_menu_link='option=com_html', admin_menu_alt='Html', admin_menu_img='js/ThemeOffice/component.png' WHERE `option` = 'com_html'";
$this[] = "UPDATE #__components SET admin_menu_link='option=com_pages', admin_menu_alt='Html', admin_menu_img='js/ThemeOffice/component.png' WHERE `option` = 'com_pages'";
$this[] = "DELETE FROM #__plugins WHERE folder IN ('content','editors','editors-xtd') OR element = 'mtupgrade'";
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,13 @@ public function up()
}

dboutput("\nMedia's Hashtags\n");
//extracting hashtag terms from mediums: notes, topics, pages, and todos
//extracting hashtag terms from mediums: notes, topics, articles, and todos
$query = 'SELECT id FROM #__nodes WHERE '.$query_regexp.' AND ( '.
'type LIKE \'%com:notes.domain.entity.note\' '.
'OR type LIKE \'%com:topics.domain.entity.topic\' '.
'OR type LIKE \'%com:photos.domain.entity.photo\' '.
'OR type LIKE \'%com:photos.domain.entity.set\' '.
'OR type LIKE \'%com:pages.domain.entity.page\' '.
'OR type LIKE \'%com:articles.domain.entity.article\' '.
'OR type LIKE \'%com:todos.domain.entity.todo\' '.
' ) ';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<install type="component" version="##BUILD_PLATFORM_VERSION##" social_app="1" method="upgrade">
<name>Html</name>
<install type="component" social_app="1" method="upgrade">
<name>Pages</name>
<author>Anahita Social Networking Platform and Framework</author>
<copyright>(C) 2013 rmd Studio, Peerglobe Technology</copyright>
<copyright>(C) 2016 rmd Studio, Peerglobe Technology</copyright>
<license>GPL3 - http://www.gnu.org/licenses/gpl-3.0.html</license>
<authoremail>info@anahitapolis.com</authoremail>
<authorurl>http://www.Anahitapolis.com</authorurl>
<description>Static HTML content</description>
<administration>
<menu>Static HTML Content</menu>
<description>Renders custom php/html pages</description>
<administration>
<menu>Pages</menu>
</administration>
<menu>true</menu>
</install>
47 changes: 0 additions & 47 deletions src/plugins/contentfilter/location.php

This file was deleted.

16 changes: 0 additions & 16 deletions src/plugins/contentfilter/location.xml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,36 +1,22 @@
<?php

/**
* LICENSE: ##LICENSE##.
*
* @category Anahita
*
* @author Arash Sanieyan <ash@anahitapolis.com>
* @author Rastin Mehr <rastin@anahitapolis.com>
* @copyright 2008 - 2010 rmdStudio Inc./Peerglobe Technology Inc
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl-3.0.html>
*
* @version SVN: $Id: resource.php 11985 2012-01-12 10:53:20Z asanieyan $
*
* @link http://www.GetAnahita.com
*/

/**
* Content Controller.
*
* @category Anahita
*
* @author Arash Sanieyan <ash@anahitapolis.com>
* @author Rastin Mehr <rastin@anahitapolis.com>
* @copyright 2008 - 2016 rmdStudio Inc./Peerglobe Technology Inc
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl-3.0.html>
*
* @link http://www.GetAnahita.com
*/
class ComHtmlControllerContent extends ComBaseControllerResource
class ComPagesControllerPage extends ComBaseControllerResource
{
/**
* Content base path.
*
*
* @var string
*/
protected $_base_path;
Expand Down Expand Up @@ -70,7 +56,7 @@ public function __construct(KConfig $config)
protected function _initialize(KConfig $config)
{
$config->append(array(
'base_path' => get_config_value('com_html.content_path'),
'base_path' => get_config_value('com_pages.content_path'),
'request' => array('layout' => 'default'),
));

Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
<?php

/**
* LICENSE: ##LICENSE##.
*
/**
*
* @category Anahita
*
* @author Arash Sanieyan <ash@anahitapolis.com>
* @author Rastin Mehr <rastin@anahitapolis.com>
* @copyright 2008 - 2010 rmdStudio Inc./Peerglobe Technology Inc
* @copyright 2008 - 2016 rmdStudio Inc./Peerglobe Technology Inc
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl-3.0.html>
*
* @version SVN: $Id: resource.php 11985 2012-01-12 10:53:20Z asanieyan $
*
* @link http://www.GetAnahita.com
*/
class ComHtmlRouter extends ComBaseRouterAbstract
class ComPagesRouter extends ComBaseRouterAbstract
{
/**
* (non-PHPdoc).
Expand Down Expand Up @@ -43,7 +42,7 @@ public function build(&$query)
*/
public function parse(&$segments)
{
$query = array('view' => 'content');
$query = array('view' => 'page');

if (count($segments)) {
$query['layout'] = str_replace('-', '_', implode('/', $segments));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,43 +1,19 @@
<?php

/**
* LICENSE: ##LICENSE##.
*
* @category Anahita
*
* @author Arash Sanieyan <ash@anahitapolis.com>
* @author Rastin Mehr <rastin@anahitapolis.com>
* @copyright 2008 - 2010 rmdStudio Inc./Peerglobe Technology Inc
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl-3.0.html>
*
* @version SVN: $Id$
*
* @link http://www.GetAnahita.com
*/

/**
* Html View.
*
*
* @category Anahita
*
* @author Arash Sanieyan <ash@anahitapolis.com>
* @author Rastin Mehr <rastin@anahitapolis.com>
* @copyright 2008 - 2010 rmdStudio Inc./Peerglobe Technology Inc
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl-3.0.html>
*
* @link http://www.GetAnahita.com
*/
class ComHtmlViewContentHtml extends ComBaseViewHtml
class ComPagesViewPageHtml extends ComBaseViewHtml
{
/**
* Constructor.
*
* @param KConfig $config An optional KConfig object with configuration options.
*/
public function __construct(KConfig $config)
{
parent::__construct($config);
}

/**
* (non-PHPdoc).
*
Expand All @@ -57,7 +33,7 @@ public function getRoute($route = '', $fqr = true)
}

/**
* If the current layout points to a folder then set the layout to folder/default.php.
* If the current layout points to a folder then set the layout to folder/default.php.
*/
public function display()
{
Expand All @@ -67,20 +43,4 @@ public function display()

return parent::display();
}

/**
* Initializes the configuration for the object.
*
* Called from {@link __construct()} as a first step of object instantiation.
*
* @param array Configuration settings
*/
protected function _initialize(KConfig $config)
{
$config->append(array(

));

parent::_initialize($config);
}
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
@CHARSET "UTF-8";

.an-page-main,
.an-article-main,
.an-revision-main
{
h1,h2,h3,h4
{
margin: 20px 0;
}
}
}
}
Loading

0 comments on commit 09b4f0e

Please sign in to comment.