-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b74d653
commit 1e08138
Showing
21 changed files
with
1,299 additions
and
149 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,12 @@ | ||
/* Only premium users are allowed to update a component */ | ||
|
||
INSERT INTO `#__content_types` (`type_title`, `type_alias`, `table`, `content_history_options`) | ||
SELECT * FROM ( SELECT 'Domain','com_rw_accounts.domain','{"special":{"dbtable":"#__rw_accounts_domains","key":"id","type":"Domain","prefix":"Rw_accountsTable"}}', '{"formFile":"administrator\/components\/com_rw_accounts\/models\/forms\/domain.xml", "hideFields":["checked_out","checked_out_time","params","language"], "ignoreChanges":["modified_by", "modified", "checked_out", "checked_out_time"], "convertToInt":["publish_up", "publish_down"], "displayLookup":[{"sourceColumn":"catid","targetTable":"#__categories","targetColumn":"id","displayColumn":"title"},{"sourceColumn":"group_id","targetTable":"#__usergroups","targetColumn":"id","displayColumn":"title"},{"sourceColumn":"created_by","targetTable":"#__users","targetColumn":"id","displayColumn":"name"},{"sourceColumn":"access","targetTable":"#__viewlevels","targetColumn":"id","displayColumn":"title"},{"sourceColumn":"modified_by","targetTable":"#__users","targetColumn":"id","displayColumn":"name"}]}') AS tmp | ||
WHERE NOT EXISTS ( | ||
SELECT type_alias FROM `#__content_types` WHERE (`type_alias` = 'com_rw_accounts.domain') | ||
) LIMIT 1; | ||
|
||
UPDATE `#__content_types` SET | ||
`type_title` = 'Domain', | ||
`table` = '{"special":{"dbtable":"#__rw_accounts_domains","key":"id","type":"Domain","prefix":"Rw_accountsTable"}}', | ||
`content_history_options` = '{"formFile":"administrator\/components\/com_rw_accounts\/models\/forms\/domain.xml", "hideFields":["checked_out","checked_out_time","params","language"], "ignoreChanges":["modified_by", "modified", "checked_out", "checked_out_time"], "convertToInt":["publish_up", "publish_down"], "displayLookup":[{"sourceColumn":"catid","targetTable":"#__categories","targetColumn":"id","displayColumn":"title"},{"sourceColumn":"group_id","targetTable":"#__usergroups","targetColumn":"id","displayColumn":"title"},{"sourceColumn":"created_by","targetTable":"#__users","targetColumn":"id","displayColumn":"name"},{"sourceColumn":"access","targetTable":"#__viewlevels","targetColumn":"id","displayColumn":"title"},{"sourceColumn":"modified_by","targetTable":"#__users","targetColumn":"id","displayColumn":"name"}]}' | ||
WHERE (`type_alias` = 'com_rw_accounts.domain'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?xml version="1.0"?> | ||
<component> | ||
<table action="add" table_name="#__rw_accounts_domains" storage_engine="" collation="utf8mb4_unicode_ci"> | ||
<field action="change" field_name="id" field_type="INT" field_length="11" is_autoincrement="1" description=""/> | ||
<field field_name="ordering" field_type="INT" field_length="11" index="index" description=""/> | ||
<field field_name="state" field_type="TINYINT" field_length="1" index="index" description=""/> | ||
<field field_name="checked_out" field_type="INT" field_length="11" index="index" description=""/> | ||
<field field_name="checked_out_time" field_type="DATETIME" description=""/> | ||
<field field_name="created_by" field_type="INT" field_length="11" index="index" description=""/> | ||
<field field_name="modified_by" field_type="INT" field_length="11" index="index" description=""/> | ||
<field field_name="code" field_type="VARCHAR" field_length="4" description="Group or Area code"/> | ||
<field action="change" old_name="area" new_name="areaname" field_name="areaname" field_type="VARCHAR" field_length="255" description="Name of the Area"/> | ||
<field action="change" old_name="group" new_name="groupname" field_name="groupname" field_type="VARCHAR" field_length="255" description="Name of the Group"/> | ||
<field field_name="domain" field_type="VARCHAR" field_length="255" description=""/> | ||
<field field_name="status" field_type="VARCHAR" field_length="255" description="Status of the account/domain"/> | ||
<field action="change" old_name="webmaster" new_name="web_master" field_name="web_master" field_type="VARCHAR" field_length="255" description="name of the web master"/> | ||
<field action="change" field_name="user" field_type="INT" field_length="11" description="User account of Web Master"/> | ||
<field action="change" field_name="notes" field_type="TEXT" description="Administrator notes"/> | ||
<field field_name="latitude" field_type="DOUBLE" description="Latitude of group location"/> | ||
<field field_name="longitude" field_type="DOUBLE" description="Longitude of group location"/> | ||
<field field_name="created" field_type="DATETIME" description=""/> | ||
<field field_name="modified" field_type="DATETIME" description=""/> | ||
</table> | ||
</component> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<!DOCTYPE html><title></title> |
4 changes: 4 additions & 0 deletions
4
plugins/search/rw_accounts/languages/en-GB/en-GB.plg_search_rw_accounts.ini
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
PLG_SEARCH_RW_ACCOUNTS="Search - RW Accounts" | ||
PLG_SEARCH_RW_ACCOUNTS_XML_DESCRIPTION="Maintain list of domains hosted by ramblers-webs.org.uk" | ||
PLG_SEARCH_RW_ACCOUNTS_FIELD_SEARCHLIMIT_DESC="Number of search items to return" | ||
PLG_SEARCH_RW_ACCOUNTS_FIELD_SEARCHLIMIT_LABEL="Search Limit" |
4 changes: 4 additions & 0 deletions
4
plugins/search/rw_accounts/languages/en-GB/en-GB.plg_search_rw_accounts.sys.ini
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
PLG_SEARCH_RW_ACCOUNTS="Search - RW Accounts" | ||
PLG_SEARCH_COM_RW_ACCOUNTS_XML_DESCRIPTION="Maintain list of domains hosted by ramblers-webs.org.uk" | ||
PLG_SEARCH_COM_RW_ACCOUNTS_FIELD_SEARCHLIMIT_DESC="Number of search items to return" | ||
PLG_SEARCH_COM_RW_ACCOUNTS_FIELD_SEARCHLIMIT_LABEL="Search Limit" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
<?php | ||
|
||
/** | ||
* @package Joomla.Plugin | ||
* @subpackage Search.content | ||
* | ||
* @copyright Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved. | ||
* @license GNU General Public License version 2 or later; see LICENSE.txt | ||
*/ | ||
defined('_JEXEC') or die; | ||
|
||
require_once JPATH_SITE . '/components/com_rw_accounts/router.php'; | ||
|
||
use \Joomla\CMS\Factory; | ||
|
||
/** | ||
* Content search plugin. | ||
* | ||
* @package Joomla.Plugin | ||
* @subpackage Search.content | ||
* @since 1.6 | ||
*/ | ||
class PlgSearchRw_accounts extends \Joomla\CMS\Plugin\CMSPlugin | ||
{ | ||
/** | ||
* Determine areas searchable by this plugin. | ||
* | ||
* @return array An array of search areas. | ||
* | ||
* @since 1.6 | ||
*/ | ||
public function onContentSearchAreas() | ||
{ | ||
static $areas = array( | ||
'rw_accounts' => 'Rw_accounts' | ||
); | ||
|
||
return $areas; | ||
} | ||
|
||
/** | ||
* Search content (articles). | ||
* The SQL must return the following fields that are used in a common display | ||
* routine: href, title, section, created, text, browsernav. | ||
* | ||
* @param string $text Target search string. | ||
* @param string $phrase Matching option (possible values: exact|any|all). Default is "any". | ||
* @param string $ordering Ordering option (possible values: newest|oldest|popular|alpha|category). Default is "newest". | ||
* @param mixed $areas An array if the search it to be restricted to areas or null to search all areas. | ||
* | ||
* @return array Search results. | ||
* | ||
* @since 1.6 | ||
*/ | ||
public function onContentSearch($text, $phrase = '', $ordering = '', $areas = null) | ||
{ | ||
$db = Factory::getDbo(); | ||
|
||
if (is_array($areas)) | ||
{ | ||
if (!array_intersect($areas, array_keys($this->onContentSearchAreas()))) | ||
{ | ||
return array(); | ||
} | ||
} | ||
|
||
$limit = $this->params->def('search_limit', 50); | ||
|
||
$text = trim($text); | ||
|
||
if ($text == '') | ||
{ | ||
return array(); | ||
} | ||
|
||
$rows = array(); | ||
|
||
|
||
|
||
return $rows; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<extension version="3.1" type="plugin" group="search"> | ||
<name>plg_search_rw_accounts</name> | ||
<author>[email protected]</author> | ||
<creationDate>2020-03-10</creationDate> | ||
<copyright>2020 [email protected]</copyright> | ||
<license>GNU General Public License version 2 or later; see LICENSE.txt</license> | ||
<authorEmail>[email protected]</authorEmail> | ||
<authorUrl>http://ramblers-webs.org.uk</authorUrl> | ||
<version>CVS: 0.0.2</version> | ||
<description>PLG_SEARCH_COM_RW_ACCOUNTS_XML_DESCRIPTION</description> | ||
<files> | ||
<filename plugin="rw_accounts">rw_accounts.php</filename> | ||
<filename>index.html</filename> | ||
</files> | ||
<languages folder="languages"> | ||
|
||
<language tag="en-GB">en-GB/en-GB.plg_search_rw_accounts.ini</language> | ||
<language tag="en-GB">en-GB/en-GB.plg_search_rw_accounts.sys.ini</language> | ||
</languages> | ||
<config> | ||
<fields name="params"> | ||
|
||
<fieldset name="basic"> | ||
<field name="search_limit" type="text" default="50" size="5" | ||
description="PLG_SEARCH_COM_RW_ACCOUNTS_FIELD_SEARCHLIMIT_DESC" | ||
label="PLG_SEARCH_COM_RW_ACCOUNTS_FIELD_SEARCHLIMIT_LABEL" /> | ||
</fieldset> | ||
|
||
</fields> | ||
</config> | ||
</extension> |
Oops, something went wrong.