Please See the FusionBB End Of Life Announcement

FusionBB Review (large)
FusionBB SWAG!

FusionBB golf shirts, t-shirts, mousepads and more.

Username Post: Including external php in post        (Topic#12015)
FusionBB Neophyte
Total Posts: 40
Average Post Ranks%:                       
01-11-12 02:17 PM - Post#85899    

I have a simple rating script outside of my forums (same domain) that I want to include inside the forums.

I have a series of topics and in the "article" at the top i'd like to call the ratings

on my non forum html pages I use


then for each photo I assign one of these
<?php show_ratings_control("photo1"); ?>
<?php show_ratings_control("photo2"); ?>
<?php show_ratings_control("photo3"); ?>

I would like to show one of these in the topic/article but I can't get it to work.

tried including ratings.php in inserts, header, showtopic.php, body of post
but can't get it going.

any ideas?

FusionBB Neophyte
Total Posts: 40
Average Post Ranks%:                       
01-11-12 02:19 PM - Post#85900    

    In response to carbmonkey

i did adjust the include path as well but no luck


FusionBB Developer
Total Posts: 6727
Birthday: 02-08 
Location: Charlotte, NC
Average Post Ranks%:                       
01-12-12 12:56 AM - Post#85901    

    In response to carbmonkey

Sadly, due to the nature of FusionBB it's not possible to execute PHP from within a post or insert. You can execute PHP from within particle boxes which can appear on your portal or in your sidebar, so placing something like


in the code section of a particle box would allow it to execute.

You might be able to get this to work by modifing scripts, would just depend on exactly how you needed it to appear. For example, appearing on all forum posts, would be pretty easy, because you could execute the code in the script and assign the output to a variable used in the template, however it gets kinda hard if it only needed to appear in a certain post or article.

The only other way I can think to get around it, would be to include the content via an iFrame, then you're essentially displaying another page (where you can execute your script).

Feel Better, Feel Younger, Sleep Better - Trans-D Tropin
Visit www.BuyTransD.com - use coupon code 1004 to save $20

FusionBB Neophyte
Total Posts: 40
Average Post Ranks%:                       
01-12-12 01:51 PM - Post#85903    

    In response to JoshPet

thanks. iframe works well
Icon Legend Permissions & Sharing Options Topic Options
Print Topic

Current Quote
"This private topics idea... Genius! It already seems better than most of the competitors."
~ Jason
FusionBB™ Version 3.2 | ©2003-2014 InteractivePHP, Inc.
Execution time: 0.097 seconds.   Total Queries: 107   Zlib Compression is on.
All times are (GMT-4). Current time is 10:20 AM