Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

PHPFusion 9 Theme Template Tutorial

Asked Modified Viewed 10,771 times
C
Chan
C
Chan 0
Lead Developer of PHP-Fusion
  • Super Admin, joined since
  • Contributed 3,841 posts on the community forums.
  • Started 232 threads in the forums
  • Started this discussions
  • Answered 6 questions
asked
Super Admin

I've received PM asking me question which I think public in general would want to know for an answer. I will try my best to share the how-to:

Quote


Hi!
Teach a typeset templates please.
How to transfer to html php-fusion 9?
How to create your theme templates?
Where to find tutorials on this cms?


Say you want to modify news.

Go to this folder - https://github.com/PHPFusion/PHPFusion/tree/9.00/infusions/news/templates , copy everything.

Say your new theme is called "NewThemeV9". (just example).

Your theme looks like this:
/themes/ ---
- /NewThemeV9/
-- index.php
-- theme.php
-- news.php (Copy and Paste everything from https://github.com/PHPFusion/PHPFusion/tree/9.00/infusions/news/templates)
-- articles.php (Copy and Paste whole file from https://github.com/PHPFusion/PHPFusion/blob/9.00/infusions/articles/templates/articles.php
--- Repeat for Forum, Downloads, Blog, etc

Now in your theme.php file,


<?php
// File: NewThemev9/theme.php

include "news.php"; // your news design
include "articles.php"; // your articles design
include "forums.php"; // your forum design
include "blog.php"; // your blog design
include "gallery.php"; // your galery design
include "downloads.php"; // your download design
include "weblinks.php"; // your weblink design

function render_page($license = false) {
.... your theme design
}
?>


Go to each of your copied files, and edit them, but make sure you do not change the function name and it's parameter. What is inside, you can modify to your hearts content.

When PHPFusion 9 loads. The FIRST thing it register is your theme, and any function that is included in your theme. Only after that maincore is loaded, panels, users, etc. If your theme has these custom templates function already loaded in your theme, the default template that is attached together inside the infusion will not be used.

But if your theme do not have any of these function required v9 will automatically use the one that comes with the infusion for your theme. it has a function exist detector.
Edited by N/A on 20-03-2016 10:50,
0 replies

7 posts

F
Falk
F
Falk 131
Need help?, Having trouble?
• View our Documentation for Guides, Standards and Functions
• Name and Organize your Topics and Content correctly in the corresponding Forums for best support results
• Attaching Log Files and Screenshots when reporting issues will help
• Provide with an URL to live example if one exists
• Please read the How to Report an Error post
• Please read and comply with the Code of Conduct

(¯·._.·(¯°·._.·°º*[ Project Manager ]*º°·._.·°¯)·._.·¯)
  • Super Admin, joined since
  • Contributed 6,201 posts on the community forums.
  • Started 639 threads in the forums
  • Answered 11 questions
answered
Super Admin

A small reminder.

Quote

We enforce a no support by Private Messages policy as a part of your expected behavior. The support you possibly can receive should be available to everyone and hopefully not repeated to many times. This makes the forums the only natural place for support.

Source CoC 1.1
0 replies
C
Chan
C
Chan 0
Lead Developer of PHP-Fusion
  • Super Admin, joined since
  • Contributed 3,841 posts on the community forums.
  • Started 232 threads in the forums
  • Started this discussions
  • Answered 6 questions
answered
Super Admin

I'm going to show how much PHPFusion 9 can do in the repository.

You need basic PHP knowledge and have basic experience in V7 theme.

Many have wondered if PHPFusion is bootstrapped, can it go Semantic or not? The answer is with Semantic Developers, not us, as we are only integrator. But in my guidance tutorial, I'll show how any framework works with PHPFusion 9. Also part of everyone's experience.

Ok, Semantic has 160 files. Lets do it. Copy everything inside dist folder and copy to our new theme folder.

Lets call it "Tutorial-With-Semantic".

Here, I committed the basic theme folder (exactly same as V7).

This is a git of a basic package that will work in both V7 and V9.

So inside render_page() function in theme.php file, I just go to Semantic Docs website, and view source, copy , paste , save, upload.

view-source:http://semantic-ui.com/examples/fixed.html

That's my first step. Because I am new to whole Semantic UI, and I don't understand a single thing yet, I will just copy a boilerplate and git.

When I activate my this theme, yep, I got it. Full Semantic UI Running on V9.

https://github.com/PHPFusion/PHPFusion/commit/7bfbbfb25ec9ff07c7e5a8886895e54e5ed04da8

I will change the site links later. Just follow this log for all steps in modification and learning process. I'll create an issue and attach.

This is the official log for this tutorial - https://github.com/PHPFusion/PHPFusion/issues/487

For all developers who wants to know what is Semantic UI, please head over to Semantic Website.

Any question, just ask here. When we reach the end of the tutorial, we will delete the theme.

I will not do anything further than this.

Please use this theme when you are asking questions. Make a request of how-to-do, and I will show and reply with the git commit.
0 replies
— 3 months later —
C
Chan
C
Chan 0
Lead Developer of PHP-Fusion
  • Super Admin, joined since
  • Contributed 3,841 posts on the community forums.
  • Started 232 threads in the forums
  • Started this discussions
  • Answered 6 questions
answered
Super Admin

New tutorial to override Site Menu in Version 9 updated.

https://github.com/PHPFusion/PHPFusion/issues/487

Any question or requests to ask me to show you how things are done, please just ask, free of charge.
0 replies
M
MysticFire
M
  • Junior Member, joined since
  • Contributed 24 posts on the community forums.
  • Started 4 threads in the forums
answered
Junior Member

CONVERT A PSD TO RESPONSIVE HTML AND CSS

Would http://exportkit.com/plugin/environme...ml-and-css Be usefull to convert a Psd file to PHPFusion?.
0 replies
— 1 month later —
F
Falk
F
Falk 131
Need help?, Having trouble?
• View our Documentation for Guides, Standards and Functions
• Name and Organize your Topics and Content correctly in the corresponding Forums for best support results
• Attaching Log Files and Screenshots when reporting issues will help
• Provide with an URL to live example if one exists
• Please read the How to Report an Error post
• Please read and comply with the Code of Conduct

(¯·._.·(¯°·._.·°º*[ Project Manager ]*º°·._.·°¯)·._.·¯)
  • Super Admin, joined since
  • Contributed 6,201 posts on the community forums.
  • Started 639 threads in the forums
  • Answered 11 questions
answered
Super Admin

The lack of answers means that we have not tried it, please give it a go and see what you think about the tool, share your experience with us!
0 replies
— 6 years later —
V
VyperPrecisionCorporation
V
  • Junior Member, joined since
  • Contributed 13 posts on the community forums.
  • Started 4 threads in the forums
answered
Junior Member

Is there any actual PHP-Fusion 9 Theme Creation/Update Tutorials out there? This one simply isn't sufficient. An Infusion Development & Update Tutorial would also be FANTASTIC!
0 replies
F
Falk
F
Falk 131
Need help?, Having trouble?
• View our Documentation for Guides, Standards and Functions
• Name and Organize your Topics and Content correctly in the corresponding Forums for best support results
• Attaching Log Files and Screenshots when reporting issues will help
• Provide with an URL to live example if one exists
• Please read the How to Report an Error post
• Please read and comply with the Code of Conduct

(¯·._.·(¯°·._.·°º*[ Project Manager ]*º°·._.·°¯)·._.·¯)
  • Super Admin, joined since
  • Contributed 6,201 posts on the community forums.
  • Started 639 threads in the forums
  • Answered 11 questions
answered
Super Admin

Create a base template for a Theme and see it
https://www.php-fusion.co.uk/addon_ge...generator/
1 reply

Category Forum

Themes Support

Labels

None yet

Statistics

  • Views 0 views
  • Posts 7 posts
  • Votes 0 votes
  • Topic users 4 members

4 participants

F
F
Falk 131
Need help?, Having trouble?
• View our Documentation for Guides, Standards and Functions
• Name and Organize your Topics and Content correctly in the corresponding Forums for best support results
• Attaching Log Files and Screenshots when reporting issues will help
• Provide with an URL to live example if one exists
• Please read the How to Report an Error post
• Please read and comply with the Code of Conduct

(¯·._.·(¯°·._.·°º*[ Project Manager ]*º°·._.·°¯)·._.·¯)
  • Super Admin, joined since
  • Contributed 6,201 posts on the community forums.
  • Started 639 threads in the forums
  • Answered 11 questions
C
C
Chan 0
Lead Developer of PHP-Fusion
  • Super Admin, joined since
  • Contributed 3,841 posts on the community forums.
  • Started 232 threads in the forums
  • Started this discussions
  • Answered 6 questions
M
M
  • Junior Member, joined since
  • Contributed 24 posts on the community forums.
  • Started 4 threads in the forums
V
V
  • Junior Member, joined since
  • Contributed 13 posts on the community forums.
  • Started 4 threads in the forums

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet