I LIKE BANANA CAEK
-Sam
Under Construction
Modules are a way that PaperPost allows users to easily intergrate their own systems to their website.
Something like forums, mailing lists, commenting, etc
To make modules, it does require a good knowledge in PHP, if you don't know PHP, then making modules is not for you.
A good place to start learning is www.phpvideotutorials.com
PaperPost has a default module called PaperPost.
This is where all the user and account code is stored. You can edit this, but doing so could break your site.
Modules are kept in the /content/panel/ directory.
While site pages are kept in the /content/site/ directory.
Modules are only meant for new features and systems, not showing content. If you want new content, just make a page through the site panel.
Each module has a file in the folder to tell PaperPost where to go, and what to do when finding information about that particular module.
Open up module.php in the PaperPost directory.
Making your own Module
I'm going to show you how to create a module with PaperPost, this module is going to be a mailing list module, that mails users that the admin selected.
- Create a folder called shoutbox for your own module
- Make a page called Module.php inside that folder
- inside module.php, write this:
<?php
$module_information = array(
'author' => 'PaperBack',
'version' => '1.0.0',
'link' => 'http://www.paperpost.pap3rback.com',
'on' => '1'
);
//$module_information currently does not do anything, but in future versions this could very well be used.
//Just load it up with various information to tell the user
$pages = array(
'mail.php',
'form.php',
'module.php'
);
//$pages are all the pages to be included in the module
$pages_dir = array(
'mail.php' => 'PaperMail',
'form.php', => 'PaperMail',
'module.php' => 'PaperMail'
);
//$pages_dir is the directory for the pages in the modules, if there was another subfolder, it would be shoutbox/folder
$pages_nav = array(
'Mail' => 'ShoutBox'
);
//This creates a new nav link on the nav bar.
?>
So create these folders, it should look like this:
/content/PaperMail/mail.php
/content/PaperMail/form.php
/content/PaperMail/module.php
Under Construction