Skip to content

new helloworld_category_component #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file modified .gitignore
100644 → 100755
Empty file.
Empty file modified .gitmodules
100644 → 100755
Empty file.
Empty file modified .travis.ini
100644 → 100755
Empty file.
Empty file modified .travis.xml
100644 → 100755
Empty file.
Empty file modified .travis.yml
100644 → 100755
Empty file.
Empty file modified LICENSE
100644 → 100755
Empty file.
Empty file modified README.md
100644 → 100755
Empty file.
Empty file modified build.properties.dist
100644 → 100755
Empty file.
Empty file modified build.xml
100644 → 100755
Empty file.
21 changes: 21 additions & 0 deletions component/admin/access.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8" ?>
<access component="com_helloworld">
<section name="component">
<action name="core.admin" title="JACTION_ADMIN" description="JACTION_ADMIN_COMPONENT_DESC" />
<action name="core.manage" title="JACTION_MANAGE" description="JACTION_MANAGE_COMPONENT_DESC" />
<action name="core.create" title="JACTION_CREATE" description="JACTION_CREATE_COMPONENT_DESC" />
<action name="core.delete" title="JACTION_DELETE" description="JACTION_DELETE_COMPONENT_DESC" />
<action name="core.edit" title="JACTION_EDIT" description="JACTION_EDIT_COMPONENT_DESC" />
</section>
<section name="category">
<action name="core.create" title="JACTION_CREATE" description="COM_CATEGORIES_ACCESS_CREATE_DESC" />
<action name="core.delete" title="JACTION_DELETE" description="COM_CATEGORIES_ACCESS_DELETE_DESC" />
<action name="core.edit" title="JACTION_EDIT" description="COM_CATEGORIES_ACCESS_EDIT_DESC" />
<action name="core.edit.state" title="JACTION_EDITSTATE" description="COM_CATEGORIES_ACCESS_EDITSTATE_DESC" />
<action name="core.edit.own" title="JACTION_EDITOWN" description="COM_CATEGORIES_ACCESS_EDITOWN_DESC" />
</section>
<section name="message">
<action name="core.delete" title="JACTION_DELETE" description="COM_HELLOWORLD_ACCESS_DELETE_DESC" />
<action name="core.edit" title="JACTION_EDIT" description="COM_HELLOWORLD_ACCESS_EDIT_DESC" />
</section>
</access>
101 changes: 101 additions & 0 deletions component/admin/config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
<?xml version="1.0" encoding="utf-8"?>
<config>
<fieldset
name="greetings"
label="COM_HELLOWORLD_CONFIG_GREETING_SETTINGS_LABEL"
description="COM_HELLOWORLD_CONFIG_GREETING_SETTINGS_DESC"
>
<field
name="contact_layout" type="componentlayout"
label="JGLOBAL_FIELD_LAYOUT_LABEL"
description="JGLOBAL_FIELD_LAYOUT_DESC"
menuitems="true"
extension="com_contact"
view="contact"
/>

<field name="show_contact_category"
type="list"
default="hide"
label="COM_CONTACT_FIELD_CONTACT_SHOW_CATEGORY_LABEL"
description="COM_HELLOWORLD_FIELD_HELLOWORLD_SHOW_CATEGORY_DESC"
>
<option value="hide">JHIDE</option>
<option value="show_no_link">COM_CONTACT_FIELD_VALUE_NO_LINK
</option>
<option value="show_with_link">COM_CONTACT_FIELD_VALUE_WITH_LINK
</option>
</field>

<field name="show_contact_list"
type="radio"
class="btn-group btn-group-yesno"
default="0"
description="COM_CONTACT_FIELD_CONTACT_SHOW_LIST_DESC"
label="COM_CONTACT_FIELD_CONTACT_SHOW_LIST_LABEL"
>
<option value="1">JSHOW</option>
<option value="0">JHIDE</option>
</field>

<field
name="save_history"
type="radio"
class="btn-group btn-group-yesno"
default="0"
label="JGLOBAL_SAVE_HISTORY_OPTIONS_LABEL"
description="JGLOBAL_SAVE_HISTORY_OPTIONS_DESC"
>
<option value="1">JYES</option>
<option value="0">JNO</option>
</field>

<field name="show_name"
type="radio"
class="btn-group btn-group-yesno"
default="1"
label="COM_HELLOWORLD_FIELD_PARAMS_NAME_LABEL"
description="COM_HELLOWORLD_FIELD_PARAMS_NAME_DESC"
>
<option value="1">JSHOW</option>
<option value="0">JHIDE</option>
</field>

<field name="show_position"
type="radio"
class="btn-group btn-group-yesno"
default="1"
label="COM_HELLOWORLD_FIELD_PARAMS_HELLOWORLD_POSITION_LABEL"
description="COM_HELLOWORLD_FIELD_PARAMS_HELLOWORLD_POSITION_DESC"
>
<option value="1">JSHOW</option>
<option value="0">JHIDE</option>
</field>


<field name="show_email"
type="radio"
class="btn-group btn-group-yesno"
default="0"
label="JGLOBAL_EMAIL"
description="COM_CONTACT_FIELD_PARAMS_CONTACT_E_MAIL_DESC"
>
<option value="1">JSHOW</option>
<option value="0">JHIDE</option>
</field>
</fieldset>

<fieldset name="permissions"
label="JCONFIG_PERMISSIONS_LABEL"
description="JCONFIG_PERMISSIONS_DESC"
>

<field name="rules"
type="rules"
label="JCONFIG_PERMISSIONS_LABEL"
validate="rules"
filter="rules"
component="com_helloworld"
section="component" />
</fieldset>
</config>
Empty file modified component/admin/controller.php
100755 → 100644
Empty file.
68 changes: 68 additions & 0 deletions component/admin/controllers/categories.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
<?php
/**
* @package HelloWorld.Administrator
* @subpackage com_helloworld
*
* @copyright Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// No direct access to this file
defined('_JEXEC') or die;

/**
* Categories Controller
*
* @since 0.0.1
*/
class HelloWorldControllerCategories extends JControllerAdmin
{
/**
* Proxy for getModel
*
* @param string $name The model name. Optional.
* @param string $prefix The class prefix. Optional.
* @param string $config The config naem
*
* @return object The model.
*
* @since 1.6
*/
public function getModel($name = 'Category', $prefix = 'helloworldModel', $config = array('ignore_request' => true))
{
$model = parent::getModel($name, $prefix, $config);

return $model;
}

/**
* Rebuild the nested set tree.
*
* @return bool False on failure or error, true on success.
*
* @since 1.6
*/
public function rebuild()
{
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));

$extension = $this->input->get('extension');
$this->setRedirect(JRoute::_('index.php?option=com_helloworld&view=categories&extension=' . $extension, false));

$model = $this->getModel();

if ($model->rebuild())
{
// Rebuild succeeded.
$this->setMessage(JText::_('COM_CATEGORIES_REBUILD_SUCCESS'));

return true;
}
else
{
// Rebuild failed.
$this->setMessage(JText::_('COM_CATEGORIES_REBUILD_FAILURE'));

return false;
}
}
}
16 changes: 16 additions & 0 deletions component/admin/controllers/category.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

// No direct access to this file
defined('_JEXEC') or die;

// Import Joomla controlleradmin library
jimport('joomla.application.component.controlleradmin');

/**
* HelloWorlds Controller
*
* @since 0.0.1
*/
class HelloWorldControllerCategory extends JControllerForm
{
}
Empty file modified component/admin/controllers/helloworld.php
100755 → 100644
Empty file.
Empty file modified component/admin/controllers/helloworlds.php
100755 → 100644
Empty file.
Empty file modified component/admin/controllers/index.html
100755 → 100644
Empty file.
Empty file modified component/admin/helloworld.php
100755 → 100644
Empty file.
75 changes: 75 additions & 0 deletions component/admin/helloworld.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
<?xml version="1.0" encoding="utf-8"?>
<extension type="component" version="3.2.0" method="upgrade">
<name>COM_HELLOWORLD</name>
<!-- The following elements are optional and free of formatting constraints -->
<creationDate>31 January 2014</creationDate>
<author>Gunjan Patel</author>
<authorEmail>[email protected]</authorEmail>
<authorUrl>http://www.example.org</authorUrl>
<copyright>Copyright Info</copyright>
<license>License Info</license>
<!-- The version string is recorded in the components table -->
<version>0.0.9</version>
<!-- The description is optional and defaults to the name -->
<description>COM_HELLOWORLD_DESCRIPTION</description>

<install> <!-- Runs on install -->
<sql>
<file driver="mysql" charset="utf8">sql/install.mysql.utf8.sql</file>
<file driver="mysql" charset="utf8">sql/data.sql</file>
</sql>
</install>
<uninstall> <!-- Runs on uninstall -->
<sql>
<file driver="mysql" charset="utf8">sql/uninstall.mysql.utf8.sql</file>
</sql>
</uninstall>
<update> <!-- Runs on update; New in 2.5 -->
<schemas>
<schemapath type="mysql">sql/updates/mysql</schemapath>
</schemas>
</update>

<!-- Site Main File Copy Section -->
<!-- Note the folder attribute: This attribute describes the folder
to copy FROM in the package to install therefore files copied
in this section are copied from /site/ in the package -->
<files folder="component/site">
<filename>index.html</filename>
<filename>helloworld.php</filename>
<filename>controller.php</filename>
<folder>views</folder>
<folder>models</folder>
<folder>language</folder>
</files>

<administration>
<!-- Administration Menu Section -->
<menu>COM_HELLOWORLD_MENU</menu>
<!-- Administration Main File Copy Section -->
<!-- Note the folder attribute: This attribute describes the folder
to copy FROM in the package to install therefore files copied
in this section are copied from /admin/ in the package -->
<files folder="component/admin">
<!-- Admin Main File Copy Section -->
<filename>index.html</filename>
<filename>helloworld.php</filename>
<filename>controller.php</filename>
<!-- SQL files section -->
<folder>sql</folder>
<!-- Media files section -->
<folder>media</folder>
<!-- tables files section -->
<folder>tables</folder>
<!-- models files section -->
<folder>models</folder>
<!-- views files section -->
<folder>views</folder>
<!-- admin languages files section -->
<folder>language</folder>
<!-- controllers files section -->
<folder>controllers</folder>
</files>
</administration>

</extension>
Empty file modified component/admin/index.html
100755 → 100644
Empty file.
Empty file modified component/admin/language/en-GB/en-GB.com_helloworld.ini
100755 → 100644
Empty file.
Empty file modified component/admin/language/en-GB/en-GB.com_helloworld.sys.ini
100755 → 100644
Empty file.
Empty file modified component/admin/language/en-GB/index.html
100755 → 100644
Empty file.
Empty file modified component/admin/language/index.html
100755 → 100644
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions component/admin/media/com_helloworld/images/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>
1 change: 1 addition & 0 deletions component/admin/media/com_helloworld/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>
1 change: 1 addition & 0 deletions component/admin/media/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>
Loading