Page 1 of 1

phpBB3 - Displaying post on external pages

Posted: Tue Feb 16, 2010 5:28 am
by crysis
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.

Re: phpBB3 - Displaying post on external pages

Posted: Tue Feb 16, 2010 9:14 am
by battye
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?

Re: phpBB3 - Displaying post on external pages

Posted: Wed Feb 17, 2010 8:12 am
by crysis
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();
?>

Re: phpBB3 - Displaying post on external pages

Posted: Wed Feb 17, 2010 8:44 am
by battye
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.

Re: phpBB3 - Displaying post on external pages

Posted: Mon Feb 22, 2010 5:53 am
by crysis
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?

Re: phpBB3 - Displaying post on external pages

Posted: Mon Feb 22, 2010 5:56 am
by battye
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

Re: phpBB3 - Displaying post on external pages

Posted: Sun Mar 07, 2010 6:59 am
by radiofranky
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

Re: phpBB3 - Displaying post on external pages

Posted: Fri Dec 10, 2010 12:48 am
by crysis
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