Dedecms Plugin development tutorial, Dedecms plugin Tutorial
This is a very simple plug-in instance, through this plugin, you can know how to develop a plug-in, it is how the structure is set, database, backstage and so on.
File structure:
enroll.php file under the plus file
enroll.htm files under the Templets/plus folder
adenroll.php files under the Dede folder
adenroll.html Files under Dede/templet folder
SQL file:
CREATE TABLE IF not EXISTS ' dede_enroll ' (' id ' int (4) is not NULL auto_increment, ' name ' varchar () ' is not null ', ' Mail ' varchar (3 0) Not NULL, ' tag ' tinyint (1) is not null default ' 0 ', PRIMARY KEY (' id ')) engine=innodb default Charset=utf8 auto_increment=1 INSERT into ' dede_plus ' (' aid ', ' plusname ', ' menustring ', ' Mainurl ', ' writer ', ' isshow ', ' filelist ') VALUES (30, ' online registration ', ' ', ', '
g1000 ', 1, ');
Here are the instructions for easy I set up two fields name and mailbox Tag field is indicated whether admission 1 for admission
The first INSERT statement is added to the background management
The second INSERT statement is added to the foreground navigation bar
enroll.php
ExecuteNoneQuery2 ($sql);//Executes a statement that returns an impact value if ($affected) {showmsg (' Registration successful ',-1);}} else{$PV->settemplet (dedetemplate. ' /plus/enroll.htm ');//Set Template $PV->display ();//Display page}?>
Enroll.htm
<title>{dede:global.cfg_webname/}-Online Registration</title>
{Dede:include filename= ". /default/head.htm "/}
executenonequery ("Update cms_enroll set ' tag ' =1 where id= ' $_get[id] '); ShowMsg (' Admission success ', ' adenroll.php '); } if ($_get[' action ']== ' NoPass ') {$db->executenonequery ("Update cms_enroll set ' tag ' =0 where id= ' $_get[id] '); ShowMsg (' Cancel admission ', ' adenroll.php '); } if ($_get[' action ']== ' delete ') {$db->executenonequery ("Delete from Cms_enroll where id= ' $_get[id] '); ShowMsg (' Delete succeeded ', ' adenroll.php '); }}else{$dl = new Datalistcp (); $dl->pagesize = 10;//shows 10 $dl->settemplate ('./templets/adenroll.htm ') per page;//Load Template $ Sql= "SELECT * from Cms_enroll"; $dl->setsource ($sql);//Execute SQL cannot be reversed with $dl->settemplate $dl->display ();//Display page}?>
adenroll.html
Online Registration Management
name |
e-Mail |
Status |
Operation |
{Dede:datalist}
{dede:field.name/} |
{dede:field.mail/} |
|
|
{/dede:datalist}
{dede:pagelist listitem= "Info,index,end,pre,next,pageno" listsize= "5"/}
A lightweight forum plugin for weaving dreams? I've been searching the internet for a long time and I haven't found myself. Now I can't develop a credit.
No, the forum you use DZ Bar, integrated together. The problem of weaving dream can go to Baidu to search the home of the Dream manager, there are many weaving dream aspects of the tutorial.
DEDECMS plug-in how to develop? How to develop a process?
There are some of the Dede help pages. Bbs.dedecms.com/136294.html This page contains detailed instructions, you can download a product manual to see, the manual below is two times developed. But this still depends on how you want to develop.
http://www.bkjia.com/PHPjc/893874.html www.bkjia.com true http://www.bkjia.com/PHPjc/893874.html techarticle dedecms Plugin Development tutorial, Dedecms plugin Tutorial This is a very simple plug-in instance, through this plugin, you can know how to develop a plug-in, it is how the structure is set, data ...