| |
| | |

CodersClub

 Forgot password?
 Register
Search
View: 4382|Reply: 1
Collapse the left

how to create own static page on DiscuzX 2?

[Copy link]

 Turkmenistan

Post time: 2012-02-20 14:10
| Show all posts |Read mode
Отредактировано: visual, 2012-2-20 15:12

how to create own static page on DiscuzX 2?
Собственно это и есть суть вопроса.
Как создавать свои собственные страница на ДиисказХ2?
На СЕ3 например нужно было всего лишь создать дубликат нужного ТПЛ файла и соответствующего ему пхп (чуть чуть подправив код)

 Korea, Republic of

Post time: 2012-02-20 15:24
| Show all posts
Edited by ionobgy at 2012-2-21 09:38

1. make filename1.php in root folder as like below code.

  1. <?php
  2. require './source/class/class_core.php';
  3. $discuz = & discuz_core::instance();
  4. $discuz->cachelist = $cachelist;
  5. $discuz->init();

  6. include template('diy:custom/filename2');                //Call template file
  7. ?>
Copy the Code

2. make filename2.htm in /template/default/custom folder as like below code.
(first, create custom folder under /template/default folder or  replace custom  with forum in above code if you want to use existing /template/default/forum folder)
  1. {template common/header}

  2. <div> your code here
  3. </div>

  4. {template common/footer}
Copy the Code

3. http://yourdomain/filename1.php in browser

Bold letter can be changed by yourself but other letter is fixed.

You have to log in before you can reply Login | Register

Points Rules

Archive|Mobile|Dark room|CodersClub

Top.Mail.Ru
Top.Mail.Ru

2024-11-22 15:53 GMT+3 , Processed in 0.030646 sec., 8 queries .

Powered by Discuz! X3.4 Release 20230520

© 2001-2024 Discuz! Team.

MultiLingual version, Rev. 4301, © codersclub.org

Quick Reply To Top Return to the list