Pager: New Module
Posted: Thu Sep 24, 2015 10:51 pm
Doing final code review on one of my stash of modules in line with my "don't have to program to do things" ideals (tabbing didn't cut and paste well here):
Description:
------------
System: New Worlds Engine 1.x
Module: Pager
Text: Creates Public, Private and Admin adhoc HTML Pages using a templating system for custom content.
Features:
---------
- Create Public pages and menu items on the public menu system for unauthenticated users.
- Create Private pages and menu items on the private menu system for authenticated users.
- Create Admin pages and menu items on the Admin Panel for admin users.
- Create templates that are wrappers around your custom pages.
Fast Start:
-----------
- Install and enable Pager.
- On the Admin Panel, under Admin Quick Links, content is entered into Pager_Page and Pager_Template.
- In Pager_Template, add a new row. This contains the HTML code that wraps around your custom page. The template must contain at the very
least {{CONTENT}} which will be replaced by the Pager_Page content in the next step. This template is reusable. Note: You must have at
least one template.
Example: ID - 1
Name - Template1 - Name of template
Template - <hr/>{{CONTENT}}<hr/> - HTML that will display in the content area around the page content
- In Pager_Page, add a new row. This contains the custom page content and menu item information. Menu variables help place the page onto a
second of the menu.
Example:
ID - 1
Name - Gold Users - Name of page
Pager_Template_ID - Template1 - Template that is used to contain the page content
Content - John Jones<br/> - HTML that will display in the content area of the template
Menu_Label - Gold Users - Label that will show on the menu
Menu_Group - Admin Notes - Title of the group the menu item is in
Menu_Description - List of Gold Users - Description of menu choice
Menu_Position - 200 - Numerical value for menu placement
is_public - no - Shows only when a user is not logged in
is_private - no - Shows only when a user is logged in
is_admin - yes - Shows only when a user is a moderator
- The example page/template above will be on the Admin Panel in its' own section called 'Admin Notes' with a link 'Gold Users' which will
send '<hr/>John Jones<br/><hr/>' to the content area on the screen.
More Advanced:
--------------
Templates: Templates allow you to globally customize a group of pages. This will allow any HTML to be used for every page. It might be helpful
to have a PublicTemplate, PrivateTemplate or AdminTemplate as you need. Any HTML is valid.
Pages: Pages can be any html you need added to the site which you want placed into the various menu structures. This is instead of adding more
complicated module type single pages like Home for each HTML page you need. Examples include web pages for Help, Information, Notes, etc. Pages can
be public, private and/or admin but the menu settings might not make that feasible since they work from different settings. If you want to align to
other modules then use their settings for your page such as near the Home page on the public menu ('Home', null, null, 0) would be
(Menu_Label: 'Page Near Home', Menu_Group: <blank>, Menu_Description: <blank>, Menu_Position: 0). Any HTML is valid.
Global Replacements: Admin and Private pages/templates have global replacement variables available.
Global Replacement List (More to come):
{{USERNAME}} to include the users login name.
Very flexible without programming.
More to come!
Description:
------------
System: New Worlds Engine 1.x
Module: Pager
Text: Creates Public, Private and Admin adhoc HTML Pages using a templating system for custom content.
Features:
---------
- Create Public pages and menu items on the public menu system for unauthenticated users.
- Create Private pages and menu items on the private menu system for authenticated users.
- Create Admin pages and menu items on the Admin Panel for admin users.
- Create templates that are wrappers around your custom pages.
Fast Start:
-----------
- Install and enable Pager.
- On the Admin Panel, under Admin Quick Links, content is entered into Pager_Page and Pager_Template.
- In Pager_Template, add a new row. This contains the HTML code that wraps around your custom page. The template must contain at the very
least {{CONTENT}} which will be replaced by the Pager_Page content in the next step. This template is reusable. Note: You must have at
least one template.
Example: ID - 1
Name - Template1 - Name of template
Template - <hr/>{{CONTENT}}<hr/> - HTML that will display in the content area around the page content
- In Pager_Page, add a new row. This contains the custom page content and menu item information. Menu variables help place the page onto a
second of the menu.
Example:
ID - 1
Name - Gold Users - Name of page
Pager_Template_ID - Template1 - Template that is used to contain the page content
Content - John Jones<br/> - HTML that will display in the content area of the template
Menu_Label - Gold Users - Label that will show on the menu
Menu_Group - Admin Notes - Title of the group the menu item is in
Menu_Description - List of Gold Users - Description of menu choice
Menu_Position - 200 - Numerical value for menu placement
is_public - no - Shows only when a user is not logged in
is_private - no - Shows only when a user is logged in
is_admin - yes - Shows only when a user is a moderator
- The example page/template above will be on the Admin Panel in its' own section called 'Admin Notes' with a link 'Gold Users' which will
send '<hr/>John Jones<br/><hr/>' to the content area on the screen.
More Advanced:
--------------
Templates: Templates allow you to globally customize a group of pages. This will allow any HTML to be used for every page. It might be helpful
to have a PublicTemplate, PrivateTemplate or AdminTemplate as you need. Any HTML is valid.
Pages: Pages can be any html you need added to the site which you want placed into the various menu structures. This is instead of adding more
complicated module type single pages like Home for each HTML page you need. Examples include web pages for Help, Information, Notes, etc. Pages can
be public, private and/or admin but the menu settings might not make that feasible since they work from different settings. If you want to align to
other modules then use their settings for your page such as near the Home page on the public menu ('Home', null, null, 0) would be
(Menu_Label: 'Page Near Home', Menu_Group: <blank>, Menu_Description: <blank>, Menu_Position: 0). Any HTML is valid.
Global Replacements: Admin and Private pages/templates have global replacement variables available.
Global Replacement List (More to come):
{{USERNAME}} to include the users login name.
Very flexible without programming.
More to come!