MemHT Portal is a Free PHP CMS and Blog that permit the creation
and the management online of websites with few and easy steps.
It's completelly customizable, expandable and suitable for all needs.
     Site demo
Viewed 699 times
Creating a simple Addon

1) Create a folder with the addon name (no spaces or special characters) in root/pages/
    Example: root/pages/pagename

2) The main file into the folder must be named "index.php"

3) Language files should be placed in root/pages/pagename/lang/ and must have
    the name of the language
    Example: root/pages/pagename/lang/english.php

    If the site language (example: italian) is different from the default one (usually english)
    and italian.php doesn't exist, the default language (set in the site configuration)
    will be included

4) root/pages/pagename/index.php should have the following code structure:
   
code
if (!defined("_LOAD_PAGE_")) { die("Error: This file cannot be opened directly!"); }

openTable();

     echo "Page content";

closeTable();

Creating more complicated Addons

Usually addons are not used just to write "Hello World!" and we need an efficient way to manage different operations

MemHT Portal use the following structure:
code
if (!defined("_LOAD_PAGE_")) { die("Error: This file cannot be opened directly!"); }
openTable();

switch($op) {
     case "printStr": myFunction(); break;
     default: salute(); break;
}

closeTable();

function myFunction() {
     if (isSet($_GET['text'])) {
          $text = inCode($_GET['text']);
         echo $text;
     } else {
          echo "No arguments!";
     }
}

function salute() {
          echo "Hi, this function will be executed if no operation is specified";
}

For example, by calling "index.php?page=pagename&op=printStr&text=Hello" the script will execute the function "printStr" with the $_GET variable "text" that contains "Hello" as an argument

Files structure

Administration side
http://www.example.com/admin/pages/addon_name/index.php
http://www.example.com/admin/pages/addon_name/lang/english.php

Client side
http://www.example.com/pages/addon_name/index.php
http://www.example.com/pages/addon_name/lang/english.php
News Archive
Friends
Language
Quotes
"I have tried almost every CMS/portal system there is, and up till i found memht for about two weeks ago, i was never happy with the cms/portal i tried out... MemHT is awesome, its feature rich, easy to setup, has users and groups, its simple, effective, easy to make new templates and customize the output html... Just to mension some of the features... I love it, and as soon as i get some funds, i will donate to this project, cause i realy appriciate the work mem puts into this... Thanks mem"
marazi
Navigator
Tags Cloud
Search
Users Block
Hi Guest
IP: 38.103.63.18

Username
Password
New files
Recent news
Recent files
Recent comments
P rivo: WONT WORK pls edin..
P mem: :)
P Docwyatt2001: I'm currently doing ..
P paulo89: lol ok no tiene prob..
P desa: jejej perdon pero co..
RSS Feeds
Disclaimer and Privacy Policy - NewsletterGoogle