News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

One forums latest posts on another forum

Started by yourdailysaver, December 10, 2009, 01:07:06 AM

Previous topic - Next topic

yourdailysaver

it displays following error when i added that code to forums index file,

Fatal error: Cannot redeclare cleanrequest() (previously declared in /homepages/9/d269191381/htdocs/ForumBollychilli/Sources/QueryString.php:95) in /homepages/9/d269191381/htdocs/bf/Sources/QueryString.php on line 93

Arantor

SSI.php is part of your forum.

So, in the portal block for bf forum, you add something like:
<?php require('/homepages/9/d269191381/htdocs/ForumBollychilli/SSI.php');
ssi_recentPosts(); ?>


Then it might work. No guarantee of at all that however.

yourdailysaver

Quote from: Arantor on December 12, 2009, 03:16:28 AM
SSI.php is part of your forum.

So, in the portal block for bf forum, you add something like:
<?php require('/homepages/9/d269191381/htdocs/ForumBollychilli/SSI.php');
ssi_recentPosts(); ?>


Then it might work. No guarantee of at all that however.

it displays following in php block after doing that,

ezBlock unable to run PHP syntax error!

dont i need to put something in any index.php ? i dont know which index.php the one in themes default, the one in theme i am using or the one in root folder

Arantor

No, it's definitely a portal block you will need to change, nothing whatsoever to do with index.php.

Though this makes life more complex, we now get into the fun and games of using iframes :S

You need to create a new file in /homepages/9/d269191381/htdocs/ForumBollychilli/ called recentposts.php and have it contain the above code. Then you can browse to it from www.forumbollychilli.com/recentposts.php, to check it works.

Then you add an iframe to the portal block to show that on the other forum (please do a search for this, it's been covered countless times here, not to mention on numerous other sites)

yourdailysaver

check at www.forum.bollychilli.com/recentposts.php i can see posts there now can you please me what to do to see it in my another forums block ?

Arantor

Well, apart from the page being incorrect, due to which I assume is a space in front of the <?php in the file (has a nice big error on it)

You need to add an <iframe> tag into the portal block. As I said this has been covered many times, so a quick forum search should show you plenty of examples of how to do it.

yourdailysaver

i am able to see posts from forum b to my forum a's portal now. thanks buddy but the issue is its really  bad in appearance. how can i make it match to my forum a's theme >?

yourdailysaver

Quote from: Arantor on December 12, 2009, 04:08:00 AM
Well, apart from the page being incorrect, due to which I assume is a space in front of the <?php in the file (has a nice big error on it)

You need to add an <iframe> tag into the portal block. As I said this has been covered many times, so a quick forum search should show you plenty of examples of how to do it.

hey bro. thanks for all your help but that error message is still there.

Arantor

So can you attach the file you created here so I can take a look at it then please?


Arantor

Your file is:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<?php require('/homepages/9/d269191381/htdocs/ForumBollychilli/SSI.php');
ssi_recentTopics();?>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>

<body>
</body>
</html>


That is the problem.

As I posted, it should contain ONLY what I posted:
<?php require('/homepages/9/d269191381/htdocs/ForumBollychilli/SSI.php');
ssi_recentTopics();?>


Or if you insist on it having an HTML wrapper:
<?php require('/homepages/9/d269191381/htdocs/ForumBollychilli/SSI.php'); ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
<?php ssi_recentTopics();?>
</body>
</html>

yourdailysaver

thanks bro. that is fine now. but when i add it to my forum A using frame tag it looks really worst than ever. isnt there any other way . means i have recent posts block on forum A which displays forum A's recent posts. It might be also using the ssi.php from forum A. And if so than is there a possiblity to change path to forum B's ssi.php ?

Arantor

There isn't any other way without doing LOTS of manual coding which I don't have the time to sit and write for you.

You know, you can actually customise its style with a little work. Less work than writing the alternative.

Thing is, you never actually said how you wanted it to look.

yourdailysaver

i wanted it to match my Forum A's block look i am using curve theme. please let me know how to customise its style ?

Arantor

Considering I have NO IDEA what that forum looks like, how can I customise it?

yourdailysaver

sent you link by pm as its not family friendly forum

Arantor

I would point out that I normally delete unsolicited PMs, it is more polite to ask first. However given that there is no way around this, it's fine in this case only.

yourdailysaver

sorry buddy but replied to your pm again. i want it to look like recent posts block on forum A

yourdailysaver

if you can visit forum A now you can see how that block looks like

yourdailysaver

background and title color are good but no need for topic name "Actresses" and date and time field and also if possible only need 5 recent topics

Advertisement: