Create a static page for Imprint

Alex L

  • Blogger, Webmaster CMS-Fan
  • Posts: 16
Create a static page for Imprint
«  »
Hello Community,
I wanted to ask, how to implement a static page for my imprint at Wedge Forum?

If there were for a plugin or how can I implement a page like this?

Thank you in advance.

CerealGuy

  • Posts: 343

Alex L

  • Blogger, Webmaster CMS-Fan
  • Posts: 16
Re: Create a static page for Imprint
« Reply #2,  »
Hello there,
I first created the file custom.php and uploaded to the root directory. Since I wanted to call them in the browser, but to me this error.

Code: [Select]
Fatal error: Call to undefined function template_header () in line 12 on /www/htdocs/xxxxxxxx/forum/custom.php

The content of this file looks like this:

Code: [Select]
<?php
//Set the banning active
$ssi_ban true;

//Path to SSI.php
require(dirname(__FILE__) . '/core/SSI.php');

//Page title. This will appear in the browser
$context['page_title_html_safe'] = 'Custom Page';

//This is self explanatory
template_header();

//Here we define the link tree
$context['linktree'] = array(
  
'href' => $scripturl,
  );

//Here is the content, such as the title and the body message of the custom page.

echo'
                        <span class="clear upperframe"><span></span></span>
                        <div class="roundframe"><div class="innerframe">'
;
                        echo
'
                        <div class="cat_bar">
                        <h3 class="catbg">Hello everyone</h3>
                        </div>
                    <p>This is a custom page example. pretty cool, huh.</p>'
;
                        echo
'
                   </div></div>
                  <span class="lowerframe"><span></span></span>'
;

//This is self explanatory too.
template_footer();

?>

How can I solve the problem? Can you maybe help me, otherwise I also think that it is possible to create a static page even with Wedge after SMF method. That would be very good.

CerealGuy

  • Posts: 343
Re: Create a static page for Imprint
« Reply #3,  »Last edited
The Problem is that wedge uses a new (and better) template system. Try to remove the template_header() and template_footer() stuff.
I will try it on my own, there are more differnces than i thought first. But anyway give it a try :).

Alex L

  • Blogger, Webmaster CMS-Fan
  • Posts: 16
Re: Create a static page for Imprint
« Reply #4,  »
OK thank you! That helped, and now here's this Page: -> internetblogger.de/forum/custom.php.

But how does one get into CSS to make it look like the Forum itself. You have in the file upload custom.php CSS, but what can you do in PHP?

CerealGuy

  • Posts: 343
Re: Create a static page for Imprint
« Reply #5,  »Last edited
This is working, only problem is, that i don't know how to set the page title yet.
Setting $context['page_title'] or $context['page_title_html_safe'] should work but doesn't...

Code: [Select]
<?php

function template_custom_main(){
  echo
'
                        <span class="clear upperframe"><span></span></span>
                        <div class="roundframe"><div class="innerframe">'
;
                        echo
'
                        <div class="cat_bar">
                        <h3 class="catbg">Hello everyone</h3>
                        </div>
                    <p>This is a custom page example. pretty cool, huh.</p>'
;
                        echo
'
                   </div></div>
                  <span class="lowerframe"><span></span></span>'
;
}
//Path to SSI.php
require(dirname(__FILE__) . '/core/SSI.php');

[
s]$context['page_title'] = "Custom Page";[/s]

//Load (template_)custom_main
wetem::load('custom_main');

//Display theme stuff
wetem::render();

EDIT: Got it working:

Code: [Select]
<?php

function template_custom_main(){
  echo
'
                        <span class="clear upperframe"><span></span></span>
                        <div class="roundframe"><div class="innerframe">'
;
                        echo
'
                        <div class="cat_bar">
                        <h3 class="catbg">Hello everyone</h3>
                        </div>
                    <p>This is a custom page example. pretty cool, huh.</p>'
;
                        echo
'
                   </div></div>
                  <span class="lowerframe"><span></span></span>'
;
}
//Path to SSI.php
require(dirname(__FILE__) . '/core/SSI.php');

//Load (template_)custom_main
wetem::load('custom_main');

//Page title. This will appear in the browser
$context['page_title_html_safe'] = "Custom Page";

//Display theme stuff
wetem::render();

Alex L

  • Blogger, Webmaster CMS-Fan
  • Posts: 16
Re: Create a static page for Imprint
« Reply #6,  »
Yes, thank you, it works. You've done all the work :)

This custom.php so I can create additional sites such as the Privacy Policy and About-Me page. That's very good.

CerealGuy

  • Posts: 343
Re: Create a static page for Imprint
« Reply #7,  »
Quote from Alex L on September 10th, 2015, 03:09 PM
Yes, thank you, it works. You've done all the work :)

This custom.php so I can create additional sites such as the Privacy Policy and About-Me page. That's very good.
The only problem is the integration into the menu. You need to edit the source file, or write a small plugin. If you would write a plugin for this, you could also get rid of the SSI stuff (which is nice, no question but ?action=impressum is even nicer :D). And you wouldn't  need to edit the source after each update ;).

Alex L

  • Blogger, Webmaster CMS-Fan
  • Posts: 16
Re: Create a static page for Imprint
« Reply #8,  »
Yes, it would be nice to have these links in the menu. But ok, so it's all good. And unfortunately I can not write plugins and have now left the "Contacts" and "Privacy Policy" included in the footer. It is important for me that the links can be found on each Forum page. So it wants the German law :-)