Advertisement:

Author Topic: Integrating the forum into your site...  (Read 271139 times)

Offline manolain

  • Semi-Newbie
  • *
  • Posts: 41
    • Web Oficial Cádiz CF
Re: Integrating the forum into your site...
« Reply #20 on: April 07, 2005, 04:50:45 AM »
Hello everyone

I followed steps of not so cool method to integrate forum into my website. Almost everything looks OK, but I have one problem with avatars, as system ones cannot be shown (it seems to be a javascript problem, although I copied all script.js content on my own one)

Here is the URL if you want to try:

http://www.fundacioncadizcf.com/index.php

Offline shutiri

  • Semi-Newbie
  • *
  • Posts: 60
Re: Integrating the forum into your site...
« Reply #21 on: April 10, 2005, 04:11:28 AM »
Hi,

I did everything you wrote on the cooler way and it works perfectly, THANK YOU.

but I'm still not able to add the left column.

I know you told us:

Quote
Table, float, etc - basic HTML and CSS.  Just because it's named "above" doesn't mean it can't be to the right - look at the admin layer.

Could you please post an example ?

Thank you again,
Shutiri.

Offline [Unknown]

  • SMF Friend
  • SMF Master
  • *
  • Posts: 36,102
  • Gender: Male
Re: Integrating the forum into your site...
« Reply #22 on: April 10, 2005, 04:14:07 AM »
I followed steps of not so cool method to integrate forum into my website. Almost everything looks OK, but I have one problem with avatars, as system ones cannot be shown (it seems to be a javascript problem, although I copied all script.js content on my own one)

I'm not sure what or where exactly you mean; can you clarify?

Could you please post an example ?

You could just make a basic table:

<table>
  <tr>
      <td width="200">left</td>
      <td>content</td>
      <td width="200">right</td>
  </tr>
</table>

And then, take that "content" and break it right there, putting everything before it in "above" and every after in "below".  Of course, tables aren't the right way to do it, but they're often easier to use to explain.

Like I said, basic HTML.

http://www.w3schools.com/

-[Unknown]

Offline shutiri

  • Semi-Newbie
  • *
  • Posts: 60
Re: Integrating the forum into your site...
« Reply #23 on: April 10, 2005, 05:09:45 AM »
mmm...   I don't really understand, sorry   ::).  I know HTML a little more than basic, so I understand the table thing.  I would like to have a structure like this:

<table width="100%">
  <tr>
    <td>header</td>
  </tr>
  <tr>
    <td width="20%">left menu</td>
    <td width="80%">forum</td>
  </tr>
  <tr>
    <td>footer</td>
  </tr>
</table>

How can I get this, based on the example you gave ?  In other words, what should I put instead of "header", "left menu", "forum" and "footer" ?

BTW, I know HTML, but no php, so please be kind  ;).

Thank you,
Shutiri.

Offline [Unknown]

  • SMF Friend
  • SMF Master
  • *
  • Posts: 36,102
  • Gender: Male
Re: Integrating the forum into your site...
« Reply #24 on: April 10, 2005, 05:47:42 AM »
Whatever you'd like!  Here's an example.  Find:

Code: [Select]
// The main content should go here.  A table is used because IE 6 just can't handle a div.
echo '
<table width="100%" cellpadding="0" cellspacing="0" border="0"><tr>
<td id="bodyarea" style="padding: 1ex 20px 2ex 20px;">';
}

function template_main_below()
{
global $context, $settings, $options, $scripturl, $txt;

echo '</td>
</tr></table>';

Replace:

Code: [Select]
// The main content should go here.  A table is used because IE 6 just can't handle a div.
echo '
<table width="100%" cellpadding="0" cellspacing="0" border="0"><tr>
<td width="20%">left menu</td>
<td id="bodyarea" width="80%" style="padding: 1ex 20px 2ex 20px;">';
}

function template_main_below()
{
global $context, $settings, $options, $scripturl, $txt;

echo '</td>
</tr></table>';

I didn't even touch the PHP, I just added your HTML.  Of course, this isn't exactly what you suggested, but that's because it's really the same anyway and changes less of the HTML (which makes for a shorter and easier to understand post.)

-[Unknown]

Offline guppy

  • Full Member
  • ***
  • Posts: 400
Re: Integrating the forum into your site...
« Reply #25 on: May 05, 2005, 04:45:08 AM »
Is this tutorial to make the forum look like the main site?

How can I do it the other way round, i.e. make the main site look like the forum? I wish to base my main site (basically just an index page with some SSI.php functions..) on index.template.php. Which file(s) do I include so that the variables in index.template.php will work?

Offline londonhogfan

  • Semi-Newbie
  • *
  • Posts: 99
  • Gender: Male
  • GO HOGS!
    • @HogDatabase on Twitter
    • HogDatabase
Re: Integrating the forum into your site...
« Reply #26 on: May 05, 2005, 01:36:29 PM »
Hi,

I know very little about php, but I'm trying to integrate my message board to look like my website.  I'm using the defaultXT theme found HERE.  So somehow I need this around the forum. 

Header
Code: [Select]
<center>
<table border="0" cellpadding="0" cellspacing="0" width="767">
<tr><td>
<img src="themes/new/images/theme.png" width="767" height="1" border="0" alt="">
</td></tr>
<tr><td>
<table align="left" border="0" cellpadding="0" cellspacing="0" width="767">
<tr><td><img src="themes/new/images/theme_r2_c1.png" width="2" height="110" border="0" alt=""></td>
<td><CENTER>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
   codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0"
   width="756" height="110">
   <param name="movie" value="themes/new/images/title.swf">
   <param name="quality" value="high">
   <embed src="themes/new/images/title.swf" quality="high"
    pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"
    width="756" height="110">
   </embed>
 </object>
</CENTER></td>
<td><img name="theme_r2_c8_2" src="themes/new/images/theme_r2_c8.png" width="9" height="110" border="0" alt=""></td></tr></table>
</td></tr><tr><td width="767" height="40" background="themes/new/images/legacy.gif"><div align="center">
<font size="5" face="verdana, arial" color="#000000">
T H E <font size="5" face="verdana, arial" color="#8d0b0b"><b>R A Z O R B A C K</b> <font size="5" face="verdana, arial" color="#000000">L E G A C Y
</font>
</tr><tr><td>
<table align="left" border="0" cellpadding="0" cellspacing="0" width="767" height="34">
<tr><td><img name="theme_r3_c1_2" src="themes/new/images/1.gif" width="154" height="34" border="0" alt=""></td>
<td><img name="theme_r3_c3" src="themes/new/images/3.gif" width="147" height="34" border="0" alt=""></td>
<td><img name="theme_r3_c4" src="themes/new/images/4.gif" width="153" height="34" border="0" alt=""></td>
<td><img name="theme_r3_c5" src="themes/new/images/5.gif" width="136" height="34" border="0" alt=""></td>
<td><img name="theme_r3_c7" src="themes/new/images/7.gif" width="177" height="34" border="0" alt=""></a></td></tr></table>
</td></tr>
<tr><td width="767" height="19" background="themes/new/images/theme_r4_c1.png"><div align="cent<font size="1" face="verdana, arial">
<br>
</font>  </font>
</tr><tr><td width="767" background="themes/new/images/theme_r6_c1.png" style="padding: 0 15px 0 10px; background-repeat:repeat-y ">
<table width="735" cellpadding="0" cellspacing="0" border="0">
<tr><td width="100%" bgcolor="#FFFFFF">
<center>
<table border="0" width="735" bgcolor="#FFFFFF"><tr><td>


Footer
Code: [Select]
</td></tr></table>
</td></tr><tr><td><img src="themes/new/images/theme_r7_c1.png" width="767" height="15" border="0" alt=""></td></tr><tr><td width="767" align="center" background="themes/new/images/theme_r8_c1.png"><img src="themes/new/images/theme_r9_c1.png" width="767" height="13" border="0" alt=""></td></tr></table><br><center>
<font face="arial" color="#E0E0E0" size="3"><b><a href="#top">TOP OF PAGE</a></b></center><br><br><br>
<font size="1" face="arial" color="#CCCCCC">
<a href="http://www.razorbacklegacy.com/hog_archive/login.php?referer=%2Fhog_archive%2F">LOGIN</a> | <a href="http://www.razorbacklegacy.com/hog_archive/logout.php?referer=%2Fhog_archive%2F">LOGOUT</a> | <a href="http://www.razorbacklegacy.com/hog_archive/admin.php?admin_mode=1&referer=%2Fhog_archive%2Findex.php">ADMIN</a> | <a href="http://www.razorbacklegacy.com/hog_archive/admin.php?admin_mode=0&referer=%2Fhog_archive%2Findex.php">USER</a>
</center>
</body>

</html>
HogDatabase - hogdb.com

Offline Dan1984

  • Newbie
  • *
  • Posts: 6
Re: Integrating the forum into your site...
« Reply #27 on: May 05, 2005, 02:09:29 PM »
I'm getting loads of errors. I followed the simple way the best I could, I'm sure I got it all right.

Please have a look at the errors and see if you can work out where I've got wrong.

hxxp:www.sussexforums.co.uk/BBS [nonactive]

Offline londonhogfan

  • Semi-Newbie
  • *
  • Posts: 99
  • Gender: Male
  • GO HOGS!
    • @HogDatabase on Twitter
    • HogDatabase
Re: Integrating the forum into your site...
« Reply #28 on: May 05, 2005, 02:49:08 PM »
I'm getting loads of errors. I followed the simple way the best I could, I'm sure I got it all right.

Please have a look at the errors and see if you can work out where I've got wrong.

http://www.sussexforums.co.uk/BBS

I was getting the same thing.
HogDatabase - hogdb.com

Offline Dan1984

  • Newbie
  • *
  • Posts: 6
Re: Integrating the forum into your site...
« Reply #29 on: May 05, 2005, 04:38:59 PM »
Okay I've sorted it except now when I click a link my header and fotter disapear and I'm left with just the forum on its own again. Anyone know why this is?

Thanks in advance

Offline Dan1984

  • Newbie
  • *
  • Posts: 6
Re: Integrating the forum into your site...
« Reply #30 on: May 06, 2005, 08:26:29 AM »
Now I've sorted all the out its working great except all the top buttons and text fields I cant click them or anything it doesn't make any sense. Please look at the url to see what I mean.

hxxp:www.sussexforums.co.uk/BBS [nonactive]

I Didn't get any help before so not sure I will now but please do if you why I'm having this problem.

Offline HEB XI 1

  • Jr. Member
  • **
  • Posts: 199
  • Gender: Female
    • HEB XI 1
Re: Integrating the forum into your site...
« Reply #31 on: May 06, 2005, 09:08:09 AM »
at first glance ... frames.  Ew.  After looking around some more, I don't see the rest of the site (header and footer stuff).  I checked out your base domain and saw what I was looking for there, but it didn't show on the forums.  I was able to click on the buttons and links just fine, but below the forum I saw some what I think is some of the graphics from the wrapper.

If you're interested, take a look at http://www.raven-flight.com.  I have put in some of the SSI stuff and have gotten my forum to accept the includes for my header, menu, and footer.  I used includes so that I would only have to change one file and it would update on the entire site (rather than having to change 10 pages).  I'm sure it's not the cleanest way to do it, and probably not the simplest ... but it does validate HTML and CSS, so I'm satisfied.

Anyway,  if that's something similar to what you're looking to do, I can send you the basic files that I used - you won't be able to see much by viewing the source since I used PHP and includes to build the pages.

Offline Dan1984

  • Newbie
  • *
  • Posts: 6
Re: Integrating the forum into your site...
« Reply #32 on: May 06, 2005, 11:19:22 AM »
Sorry my mistake I had changed it after I posted, Please look now to see what I mean and BTW there is no frames.

hxxp:www.sussexforums.co.uk/BBS [nonactive]

Offline HEB XI 1

  • Jr. Member
  • **
  • Posts: 199
  • Gender: Female
    • HEB XI 1
Re: Integrating the forum into your site...
« Reply #33 on: May 06, 2005, 09:29:29 PM »
Ok now I see the site wrapper and what you mentioned about the buttons and links.  Without being a programmer (I'm really just a troll on these boards) my first thought is that the forum is not loading completely.  The base URL for the links that do work on the menu seems to be wrong as well, since I got a "Not Found" error on all of them.

As for why the forum is not loading ... I think the frameset is probably a big part of it.  I say there are frames because when I view the source code, I get this:

Code: [Select]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
<html lang="en"><head><title>Sussex Forums - A community website for the whole of sussex...</title><meta name="Keywords" content="Sussex, Brighton,Eastbourne,South East,Newhaven,Dieppe,Seahaven,The Grand,England,East Sussex,West Sussex,Sussex Community,Chat,Meet Friends, Find Old Friends In Sussex,Search Sussex, Map of Sussex"><meta name="Description" content="Meet new friends that live in Sussex or just find your old friends. This is one of the largest communities for Sussex online. Find out tourist information and much much more!"></head>
<frameset rows='100%,*' border='0' frameborder='0' framespacing='0'>
<frame title='http://www.paltrivia.co.uk/SussexForums/BBS' src='http://www.paltrivia.co.uk/SussexForums/BBS' name='mainframe' frameborder='0' noresize='noresize' scrolling='auto'>
<frame title='empty frame' frameborder='0' scrolling='no' noresize='noresize'>
<noframes><body> Sorry, you don't appear to have frame support.
Go here instead - <a href="http://www.paltrivia.co.uk/SussexForums/BBS">Sussex Forums - A community website for the whole of sussex...</a> </body> </noframes> </frameset> </html>

I know personally I had a site that I didn't know had frames ... it was actually frame forwarding.  Once I got that changed by my webhost, a lot of the Session and cookie errors I was having cleared up.  So whether you coded them in or not, you do indeed have frames, and that might be part of the problems that you are having.

Offline WTFBA

  • Newbie
  • *
  • Posts: 6
Re: Integrating the forum into your site...
« Reply #34 on: June 11, 2005, 09:12:37 PM »
How can I do it the other way round, i.e. make the main site look like the forum? I wish to base my main site (basically just an index page with some SSI.php functions..) on index.template.php. Which file(s) do I include so that the variables in index.template.php will work?

I'd also like to know this... could someone help?

Offline [Unknown]

  • SMF Friend
  • SMF Master
  • *
  • Posts: 36,102
  • Gender: Male
Re: Integrating the forum into your site...
« Reply #35 on: June 11, 2005, 09:21:41 PM »
This is covered in the post as well.  Just look at the example that mentions SSI.php.

-[Unknown]

Offline WTFBA

  • Newbie
  • *
  • Posts: 6
Re: Integrating the forum into your site...
« Reply #36 on: June 11, 2005, 09:33:22 PM »
D'oh! :o  Can't beleive I missed that!!  Thanks!

I try to use the example (changing the $ssi_theme value) and I get this on the resulting PHP.
Quote
Unable to load the 'site_above' template.

Does the $ssi_layers variable need to change too?

Offline [Unknown]

  • SMF Friend
  • SMF Master
  • *
  • Posts: 36,102
  • Gender: Male
Re: Integrating the forum into your site...
« Reply #37 on: June 11, 2005, 09:35:09 PM »
Instead of array('site'), use array('main').

The idea is, you want the "main" layer wrapped around your content.

-[Unknown]

Offline WTFBA

  • Newbie
  • *
  • Posts: 6
Re: Integrating the forum into your site...
« Reply #38 on: June 11, 2005, 09:37:14 PM »
Awesome! :D  Thanks for the clarification!! ;D

Offline Caedmon Michael

  • Semi-Newbie
  • *
  • Posts: 14
Re: Integrating the forum into your site...
« Reply #39 on: June 19, 2005, 02:13:31 PM »
I've searched the forums and the 'net. My apologies if this has been covered and I missed it, in which case a helpful point in the right direction is appreciated.

I'm using SSI successfully on 2 sites to create static pages following the forum templates, using the following basic code:

Code: [Select]
<?php
$ssi_layers 
= array(&#39;main&#39;);
$pagetitle "Sakamuyo Christian Fellowship";
ob_start();
include(&
#39;/home2/sakamuyo/public_html/community/SSI.php&#39;);

// CONTENT

// END CONTENT

ssi_shutdown(); ?>


The only problem is that the >title< isn't set so the URL to the page is displaying where the browser would otherwise place the title. Is there an easy variable I could add to my pages so the title would set? And/Or, if that doesn't work, could you help me add the right "if" statement to my index.template.php to display a generic title if the page does not include a title?

Thanks!