phpBB3 - Displaying post on external pages

All web design discussion, including Ultimate Quiz MOD support.

Moderator: CricketMX Forum Moderators

phpBB3 - Displaying post on external pages

Postby crysis » Tue Feb 16, 2010 5:28 am

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.
crysis
Greenhorn
Greenhorn
 
Posts: 4
Joined: Tue Feb 16, 2010 5:12 am
Location: Auckland, New Zealand

Re: phpBB3 - Displaying post on external pages

Postby battye » Tue Feb 16, 2010 9:14 am

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.. home of bat's, rat's and other farmyard animals...
My articles: view all articles by battye

"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)
User avatar
battye
Site Admin
Site Admin
 
Posts: 14253
Joined: Sun Jan 11, 2004 8:26 am
Location: Victoria Falls, Zimbabwe

Re: phpBB3 - Displaying post on external pages

Postby crysis » Wed Feb 17, 2010 8:12 am

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();
?>
crysis
Greenhorn
Greenhorn
 
Posts: 4
Joined: Tue Feb 16, 2010 5:12 am
Location: Auckland, New Zealand

Re: phpBB3 - Displaying post on external pages

Postby battye » Wed Feb 17, 2010 8:44 am

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.. home of bat's, rat's and other farmyard animals...
My articles: view all articles by battye

"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)
User avatar
battye
Site Admin
Site Admin
 
Posts: 14253
Joined: Sun Jan 11, 2004 8:26 am
Location: Victoria Falls, Zimbabwe

Re: phpBB3 - Displaying post on external pages

Postby crysis » Mon Feb 22, 2010 5:53 am

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?
crysis
Greenhorn
Greenhorn
 
Posts: 4
Joined: Tue Feb 16, 2010 5:12 am
Location: Auckland, New Zealand

Re: phpBB3 - Displaying post on external pages

Postby battye » Mon Feb 22, 2010 5:56 am

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.. home of bat's, rat's and other farmyard animals...
My articles: view all articles by battye

"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)
User avatar
battye
Site Admin
Site Admin
 
Posts: 14253
Joined: Sun Jan 11, 2004 8:26 am
Location: Victoria Falls, Zimbabwe

Re: phpBB3 - Displaying post on external pages

Postby radiofranky » Sun Mar 07, 2010 6:59 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
radiofranky
Greenhorn
Greenhorn
 
Posts: 1
Joined: Sun Mar 07, 2010 6:55 am

Re: phpBB3 - Displaying post on external pages

Postby crysis » Fri Dec 10, 2010 12:48 am

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
crysis
Greenhorn
Greenhorn
 
Posts: 4
Joined: Tue Feb 16, 2010 5:12 am
Location: Auckland, New Zealand


Return to Web Design

Who is online

Users browsing this forum: No registered users and 1 guest

cron