phpBB3 - Displaying post on external pages

All web design discussion, including Ultimate Quiz MOD support.

Moderator: CricketMX Forum Moderators

Post Reply
crysis
Greenhorn
Greenhorn
Posts: 4
Joined: Tue Feb 16, 2010 5:12 am
Location: Auckland, New Zealand
Contact:

Hi all,

I was wondering if someone can help explain/solve a php related question.

I have followed this tutorial at http://blog.phpbb.com/2009/11/09/how-to ... nal-pages/ by battye

My site is made in html and css, as I dont know any php.
It took a while to work, But got it working perfectly UNTILL, I went to put a footer on the page in html under the php which I had to insert, and nothing displays below the last bit of php,
Which in this case is ..

page_footer();
?>

And if I delete it, then the posts from the forum dont display.

Do you know what I mean?
How can I get around this?

Any help or a point in the right direction would make my day.

Thanks in advance.
Last edited by crysis on Fri Dec 10, 2010 12:08 am, edited 1 time in total.
User avatar
battye
Site Admin
Site Admin
Posts: 14391
Joined: Sun Jan 11, 2004 8:26 am
Location: Australia
Contact:

Hi,

I understand what you are saying.

Try this:

OPEN style/prosilver/templates/overall_footer.html (if you don't use prosilver, open the footer file of whichever template you use).

now FIND

Code: Select all

<div>
	<a id="bottom" name="bottom" accesskey="z"></a>
	<!-- IF not S_IS_BOT -->{RUN_CRON_TASK}<!-- ENDIF -->
</div>
AFTER ADD

Code: Select all

<!-- IF S_SHOW_CUSTOM_FOOTER -->enter your HTML/CSS code for your footer here<!-- ENDIF -->
Now, in whatever PHP file you add my tutorial code in before the page_footer() call (so the line before) add this:

Code: Select all

	$template->assign_vars(array(
		'S_SHOW_CUSTOM_FOOTER'			=> true,
	));
Re-upload and purge the cache in the ACP.

Does that make it work correctly?
CricketMX.com in 2022: Still the home of bat's, rat's and other farmyard animals!

"OK, life [as you chose to define it] repeats until there are no more lessons to be learned." - nrnoble (June 12, 2005)
"the new forum looks awesome, it's getting bigger & better" - p2p-sharing-rules (11 Jan, 2008)
"Looks like CMX is not only getting bigger...but, also getting better!!" - moongirl (14 Dec, 2007)
crysis
Greenhorn
Greenhorn
Posts: 4
Joined: Tue Feb 16, 2010 5:12 am
Location: Auckland, New Zealand
Contact:

Thanks for that, But It's still not displaying, Should it look like this....

overall_footer.html

Code: Select all

<div>
	<a id="bottom" name="bottom" accesskey="z"></a>
	<!-- IF not S_IS_BOT -->{RUN_CRON_TASK}<!-- ENDIF -->
        <!-- IF S_SHOW_CUSTOM_FOOTER --><h1>Hi, this is testing the new php footer</h1><!-- ENDIF -->

</div>

And the page with your php tutorial done on...

Code: Select all

<?php
 $template->assign_vars(array(
      'S_SHOW_CUSTOM_FOOTER'         => true,
   ));
page_footer();
?>
User avatar
battye
Site Admin
Site Admin
Posts: 14391
Joined: Sun Jan 11, 2004 8:26 am
Location: Australia
Contact:

Hi,

Add the " <!-- IF S_SHOW_CUSTOM_FOOTER --><h1>Hi, this is testing the new php footer</h1><!-- ENDIF -->" after the </div>

And don't forget to go into the ACP index and press Purge Cache.
CricketMX.com in 2022: Still the home of bat's, rat's and other farmyard animals!

"OK, life [as you chose to define it] repeats until there are no more lessons to be learned." - nrnoble (June 12, 2005)
"the new forum looks awesome, it's getting bigger & better" - p2p-sharing-rules (11 Jan, 2008)
"Looks like CMX is not only getting bigger...but, also getting better!!" - moongirl (14 Dec, 2007)
crysis
Greenhorn
Greenhorn
Posts: 4
Joined: Tue Feb 16, 2010 5:12 am
Location: Auckland, New Zealand
Contact:

It's still not working :cry:

I must be doing something wrong, or haven't added something in, Can you think of what I've missed?
User avatar
battye
Site Admin
Site Admin
Posts: 14391
Joined: Sun Jan 11, 2004 8:26 am
Location: Australia
Contact:

What happens if after the </div> you add:

Code: Select all

<h1>Show: {S_SHOW_CUSTOM_FOOTER}</h1>
If it is working, hopefully you will see Show: 1
CricketMX.com in 2022: Still the home of bat's, rat's and other farmyard animals!

"OK, life [as you chose to define it] repeats until there are no more lessons to be learned." - nrnoble (June 12, 2005)
"the new forum looks awesome, it's getting bigger & better" - p2p-sharing-rules (11 Jan, 2008)
"Looks like CMX is not only getting bigger...but, also getting better!!" - moongirl (14 Dec, 2007)
radiofranky
Greenhorn
Greenhorn
Posts: 1
Joined: Sun Mar 07, 2010 6:55 am

the external pages display write up was nice. however, I was wondering if is possible to display "text" as the link to the topic itself.

For example, I would like the "last post text" to be truncated and become the like to the post link.
Also, i was wondering is possible to display "viewed number"

thanks
crysis
Greenhorn
Greenhorn
Posts: 4
Joined: Tue Feb 16, 2010 5:12 am
Location: Auckland, New Zealand
Contact:

Hi battye,

I gave up on this problem and made do before.

Now im re-designing the site and I must get this solution working. Its doing my head in :lol:
I gone through all of your steps above carefully, and yet still its not working.
Can you think of anything it might be? I have no mods installed, its just a simple phpbb installation and the style is called 'static'.


Regards


Ps.

This works. It only displays at the bottom of the forum.

battye wrote:What happens if after the </div> you add:

Code: Select all

<h1>Show: {S_SHOW_CUSTOM_FOOTER}</h1>
If it is working, hopefully you will see Show: 1
Post Reply