GithubHelp home page GithubHelp logo

sunnyesgithub / onlinetask Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 6 KB

A custom module to set a Key for the site as well and display a JSON representation of a node type of only page using the site API key.

json-data basic-page json-representation drupal7-module drupal-7 custom module custom-module

onlinetask's Introduction

MODULE
------
Basic page node to json

CREDITS
--------
Developed by Sunny Singh Sharma <[email protected]>
https://www.drupal.org/u/sunnydrupal

JSON Encode URL
-----------------
URL : http://domain_name/node_json/<node_id>
test url : http://domain_name/node_json/<node_id>

REQUIREMENTS
------------
1) Alter Site information page in admin with field name 'Site API Key' under 'Site Detail' Section.

2) Make 'Site API key' is compulsory field.

3) Button text 'Save configuration' should be changed to 'Update configuration' at the time of updating key.

4) Create page using custom code which uses Site API key as parameter in URL.

5) If API key is present in URL, It would return content of content type 'Basic page' in json format.

6) If API Key is not present in URL, it would return Access denied.

7) If content type is not 'Basic page', it would return Access denied.

Reference links:
-----------------
https://api.drupal.org/api/drupal/modules%21system%21system.api.php/function/hook_menu/7.x
https://api.drupal.org/api/drupal/functions/7.x
https://www.agileana.com/blog/how-to-get-url-parameters-in-drupal-7/
https://api.drupal.org/api/drupal/modules%21system%21system.api.php/function/hook_form_alter/7.x
https://www.drupal.org/forum/support/module-development-and-code-questions/2010-04-06/solved-hooking-into-system_settings
https://api.drupal.org/api/drupal/modules%21system%21system.module/function/system_settings_form/7.x
https://www.drupal.org/docs/7/api/form-api
https://api.drupal.org/api/drupal/includes%21common.inc/function/drupal_json_output/7.x


onlinetask's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.