Skip to content

Instantly share code, notes, and snippets.

View chetanmadaan's full-sized avatar

Chetan Madaan chetanmadaan

View GitHub Profile
@chetanmadaan
chetanmadaan / listarticlesresponse.php
Created November 11, 2019 03:34
Listing articles via Joomla 4 API - Response
{
"links": {
"self": "http://localhost/j4a12/api/index.php/v1/content/article",
"first": "http://localhost/j4a12/api/index.php/v1/content/article?page[offset]=0&page[limit]=20",
"next": "http://localhost/j4a12/api/index.php/v1/content/article?page[offset]=20&page[limit]=20",
"previous": "http://localhost/j4a12/api/index.php/v1/content/article?page[offset]=0&page[limit]=20",
"last": "http://localhost/j4a12/api/index.php/v1/content/article?page[offset]=0&page[limit]=20"
},
"data": [
{
@chetanmadaan
chetanmadaan / listarticles.php
Created November 11, 2019 03:18
Joomla 4 API to list all articles
<?php
// Enter the path of your Joomla site.
$baseurl = 'http://localhost/j4a12';
// Joomla Super Admin Credentials
$user = 'admin';
$pass = 'admin';
// No Edits below this line needed.
$curl = curl_init();
@chetanmadaan
chetanmadaan / blog.php
Created October 10, 2019 23:20
blog.php fix.
<?php
/**
* @package Astroid Framework
* @author JoomDev https://www.joomdev.com
* @copyright Copyright (C) 2009 - 2019 JoomDev.
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later
*/
defined('_JEXEC') or die;
?>
<div class="blog<?php echo $this->pageclass_sfx; ?>" itemscope itemtype="https://schema.org/Blog">
@chetanmadaan
chetanmadaan / menu.php
Created September 4, 2019 17:33
continue 2 for helix menu.php on PHP 7.3
<?php
/**
* @package Helix3 Framework
* @author JoomShaper http://www.joomshaper.com
* @copyright Copyright (c) 2010 - 2018 JoomShaper
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later
*/
//no direct accees
defined ('_JEXEC') or die ('resticted aceess');
@chetanmadaan
chetanmadaan / mobilemenu.php
Created May 5, 2019 09:43
mobilemenu.php for Astroid Framework to have menu based on ItemId
<?php
/**
* @package Astroid Framework
* @author JoomDev https://www.joomdev.com
* @copyright Copyright (C) 2009 - 2019 JoomDev.
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later
* DO NOT MODIFY THIS FILE DIRECTLY AS IT WILL BE OVERWRITTEN IN THE NEXT UPDATE
* You can easily override all files under /frontend/ folder.
* Just copy the file to ROOT/templates/YOURTEMPLATE/html/frontend/ folder to create and override
*/
@chetanmadaan
chetanmadaan / horizontal.php
Created April 29, 2019 15:58
Astroid header hack for display Mega Menu based on item id's.
<?php
/**
* @package Astroid Framework
* @author JoomDev https://www.joomdev.com
* @copyright Copyright (C) 2009 - 2019 JoomDev.
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later
* DO NOT MODIFY THIS FILE DIRECTLY AS IT WILL BE OVERWRITTEN IN THE NEXT UPDATE
* You can easily override all files under /frontend/ folder.
* Just copy the file to ROOT/templates/YOURTEMPLATE/html/frontend/header/ folder to create and override
*/
@chetanmadaan
chetanmadaan / template.php
Created April 8, 2019 17:24
adding com_quix
<?php
/**
* @package Astroid Framework
* @author JoomDev https://www.joomdev.com
* @copyright Copyright (C) 2009 - 2019 JoomDev.
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later
*/
defined('_JEXEC') or die;
jimport('astroid.framework.helper');
@chetanmadaan
chetanmadaan / banner.php
Last active March 7, 2019 17:14
banner.php with JURI:root() for banner BG image for Astroid
<?php
defined('_JEXEC') or die;
$app = JFactory::getApplication();
$jinput = $app->input;
$menuId = $jinput->get('Itemid', 0, 'INT');
$menu = $app->getMenu();
$item = $menu->getItem($menuId);
@chetanmadaan
chetanmadaan / horizontal.php
Created October 18, 2018 19:50
horizontal.php layout override for astroid framework 2.0 to hide mobile menu icon.
<?php
/**
* @package Astroid Framework
* @author JoomDev https://www.joomdev.com
* @copyright Copyright (C) 2009 - 2018 JoomDev.
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or Later
*/
// No direct access.
defined('_JEXEC') or die;
@chetanmadaan
chetanmadaan / index.php
Created March 28, 2018 18:52
JD NewJersey index.php font awesome update.
<?php
/**
* @package Helix3 Framework
* Template Name - Shaper Helix3
* @author JoomShaper http://www.joomshaper.com
* @copyright Copyright (c) 2010 - 2017 JoomShaper
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later
*/
//no direct accees
defined('_JEXEC') or die('restricted access');