Skip to main content
Topic: Wrapping up ElkArte (Read 1961 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Wrapping up ElkArte

I'm very old school with forums, probably stuck 10 years ago, sorry!!!

I'm looking to wrap the ElkArte forum with my own website, but cutting the webpage into a header/footer and putting the forum within a container div and centered. Hope I am making sense there!

It always seemed quite straight forward with Invision and vBulletin, I could understand their templating structure a lot easier. However here, it's a different ballgame. No bad thing, I guess I have more learning to do after a break from the www for so many years.

Can I get a little headstart on which templates I need to start with to wrap up the forum in some form?

I don't want to dive in as I will no doubt start hitting the dreaded parse errors! I am a php novice by the way but know my way around css and xhtml.

Thank you.

Ps. I this similar to SMF, in that would use includes to call up a separate header.php and footer.php which would contain my website html?
Last Edit: April 06, 2016, 06:12:19 pm by maritimesbob

Re: Wrapping up ElkArte

Reply #1

It's all in the index.template.php file.

Re: Wrapping up ElkArte

Reply #2

If you mean like this sites home page, thats all done with SSI calls which "wrap" the forum around your content.

Re: Wrapping up ElkArte

Reply #3

I think he wants the other way around: have the header/footer of his site around the forum (sort of the old-style iframe thingy).
Likely index.template.php is the place to go. Depends a bit what you exactly need, but in general, you could have a look at the functions:
template_html_above (insert new stylesheets or javascript)
template_body_above (for code between the very top of the page to just after the linktree)
* template_body_below (for the footer)

On how avoid the syntax errors... weeeell that really is a php issue, if you can provide some actual examples of how you change things we can give you hints on how to fix the errors. ;)
There are several reasons for the syntax to break, a general suggestion is to always put code inside (existing) functions, and if you really don't like escaping, try with opening and closing the php tags (but outside strings), something like:
Code: (syntax errors) [Select]
echo '
   some html'; <your> html here</your>
--------------------------
echo '
   some html<your>html here with 'single quotes</your>';

Code: (correct versions) [Select]
echo '
   some html <your> html here</your>';
--------------------------
echo '
   some html<your>html here with \'single quotes</your>';

Or:
Code: (syntax errors) [Select]
echo '
   some html';?> <your> html here</your><?php
--------------------------
echo '
   some html';?><your>html here with 'single quotes</your><?php

Just a general hint, though.

Quote from: maritimesbob – Ps. I this similar to SMF, in that would use includes to call up a separate header.php and footer.php which would contain my website html?
That could work as well, depending how much you want to change.
Bugs creator.
Features destroyer.
Template killer.

 

Re: Wrapping up ElkArte

Reply #4

Ok, so tried the following, the first guide, created the header and footer.php files and used php includes as described in the guide but it throws up parse errors.
http://wiki.simplemachines.org/smf/Integrating_SMF_with_your_website

Can I get some guidance on where to place the header and footer includes or is the smf guide the correct way?

Below will give you some idea what I am after...

Code: [Select]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html>

  <head>
  <meta info bla bla>
<link rel="stylesheet" type="text/css" href="style.css" title="style" />
    </head>
<body>
  <div id="wrap">



<div id="header">

</div>

<div id="nav">
     
<ul>
Menu info
</ul>
    </div>

<div id="forumcontainer">

Wrap forum in here


</div> <!-- End forumcontainer-->

<div class="footer">
<b>

Links and all that crap here

</div> <!-- End subContainer-->
</div>
</body>

</html>
Last Edit: April 07, 2016, 04:36:24 pm by maritimesbob