including a yabbse forum

Started by Dempeduck, December 15, 2003, 07:51:34 PM

Previous topic - Next topic

Dempeduck

I use the following script to include pages into a table on my website:
<?php
$theString
= $_server['QUERY_STRING'] ;

parse_str($theString, $output);

$thePage = $output['page'];

if (!isset(
$page))
 
$page = 'news.htm';

include
$page;

?>


I recently wanted to be able to have my yabbse forum be able to be viewed in my webpage.  I tried just going

http://www.krants.net/austin/Music/index.php?page=http://www.krants.net/austin/yabbse/index.php

But not only would I have to move all the subfolders for yabb, but I also got an error.
Furthermore none of the links would open in that content table unless I re-wrote yabb for the links to be "/index.php?page=the yabb url" which wouldn't be that convienient.

So now despairing I realize I'll either have to use an i-frame or do without the forum included.  But then I have a genious idea:

<?php
$theString
= $_server['QUERY_STRING'] ;

parse_str($theString, $output);

$thePage = $output['page'];

if (!isset(
$page))
 
$page = 'news.htm';

if (
$page == "http://www.krants.net/austin/yabbse/index.php")
  print
"<iframe url=http://www.krants.net/austin/yabbse/index.php>"

else if (include $page);

?>


I just need someone to tell me
a)will that work
b)how to fix my php so it will work

Any help would be appreciated.
"You thought the leaden winter, would bring you down forever,
But you rode upon a steam to the surface of the Sun"
--Tales of Brave Ulysses, Cream

pulpitfire


Dempeduck

"You thought the leaden winter, would bring you down forever,
But you rode upon a steam to the surface of the Sun"
--Tales of Brave Ulysses, Cream

bostasp

urm... can't you just make your template.php look like your site?

Tyris

if (!isset($page))
   $page = 'news.htm';
elseif ($page == "http://www.krants.net/austin/yabbse/index.php")
   print "<iframe url='http://www.krants.net/austin/yabbse/index.php'>";
else
   include $page;

thats the proper code.. I think... you could do a redirect using headers to go to the forum... really depends on what you want...

Dempeduck

#5
Problem # 1 :
QuoteWarning: main(): stream does not support seeking in /home/binomeha/public_html/austin/Music/index.php on line 151

Problem # 2 : All of the links in yabbse are to themselves so it would open the actual index.php for the forum and forget the actual site.  Unless I can change all the links in yabbse from x to /index.php?page=x then it wouldn't work.

the rest of the problems are easily fixable

<edit> just read tyris's post, thanks </edit>
<edit2> wait but if $page is undiffined then it wont include $page </edit>
"You thought the leaden winter, would bring you down forever,
But you rode upon a steam to the surface of the Sun"
--Tales of Brave Ulysses, Cream

Tyris

dunno what the prob for #1 is...
#2 is un-fixable without changing all the links... so I'd have to suggest what bostasp said... unless you use the iframe :S

Dempeduck

Yea.. I could do that.. I'm too dumb and lazy thought.

Note: read edit2
"You thought the leaden winter, would bring you down forever,
But you rode upon a steam to the surface of the Sun"
--Tales of Brave Ulysses, Cream

[Unknown]

You're going to either have to use chdir or copy in Settings.php at the very least.

-[Unknown]

Tyris


if (!isset($page))
 
$page = 'news.htm';

if (
$page == "http://www.krants.net/austin/yabbse/index.php")
  print
"<iframe url='http://www.krants.net/austin/yabbse/index.php'>";
else
  include
$page;


thats the one... sorry... am tired ;)

pulpitfire

look at this link

www.pege.net/test2.php

and then look at this page

www.rng1.com

the only code in test2.php is

<? include "http://www.rng1.com"; ?>

there.  i included a yabb forum from another server into my web page on pege.net.  what else are you trying to do?

Dempeduck

click on a link on that included page and it will bring you to the origanal forum, that I can't have happen.

I might just use the template.php idea I'm having issues with

if (!isset($page))
   $page = 'news.htm';

if ($page == "http://www.krants.net/austin/yabbse/index.php")
   print "<iframe url='http://www.krants.net/austin/yabbse/index.php'>";
else
   include $page;
"You thought the leaden winter, would bring you down forever,
But you rode upon a steam to the surface of the Sun"
--Tales of Brave Ulysses, Cream

Dempeduck

#12
I decided to use the changing the template idea.

I'm having a problem though with it.

all the table and div tags are thinking they aren't closed now...

HELP
"You thought the leaden winter, would bring you down forever,
But you rode upon a steam to the surface of the Sun"
--Tales of Brave Ulysses, Cream

[Unknown]

That's because YaBB SE is quitting.  It is NOT meant to be in another "box" of html.

-[Unknown]

Tyris

#14
*edit*
read [Unknown]s post.. ok ^.^
(I thought he meant he was changing the template properly or something...)

Dempeduck

#15
<edit>
Quote from: [Unknown] on December 15, 2003, 09:39:14 PM
That's because YaBB SE is quitting.  It is NOT meant to be in another "box" of html.

-[Unknown]

I don't suppose there is anyway i can just controll the width of the table that i put it in..  thats all i need to do.
"You thought the leaden winter, would bring you down forever,
But you rode upon a steam to the surface of the Sun"
--Tales of Brave Ulysses, Cream

Advertisement: