Info
- 13 posts
- 5 voices
- Started 2 years ago by bb-lover
- Latest reply from kevinjohngallagher
- This topic is not resolved
execute php code in bbpages editor. fast help
-
- Posted 2 years ago #
Dear Developers.......... :-)
Recently I've used bbpages plugin .. it works fine... but I need one thing... the bbpages plugin's editor just accept html code... so i want to execute php code .. .how it possible?... i want to include<?php include("filename.php"); ?>
in the editor but it does not accept php code... plz guide me how can I execute my php code in this editor ... love you all
-
- Posted 2 years ago #
Hi :)
I have made a post at my forum, Dev:station:
"The problem with bbPages is that the customized pages are stored in an SQL Table within your bbPress Database. In effect, and based on the way it loads, the PHP code will not execute.
If, however, the plugin saved the custom page as a PHP file, it would work.
Once bbPress starts to mature with a new version, I may create such a plugin."
-
- Posted 2 years ago #
Michael Finally i got it..... :-)
I use the following code... and listen .... wow its works<iframe src ="contact.php" width="500" height="700">
</iframe>I Just want to confirm.....should i continue to use this script or quit.... is this good or bad for me........Thx
-
- Posted 2 years ago #
That should do okay - if it works and doesn't reduce server-load times, then it should work. :)
-
- Posted 2 years ago #
Alternatively, you could make a PHP file that has something like this as content, instead of using iFrames:
<?php bb_get_header(); ?> /* Your PHP script goes here */ <?php bb_get_footer(); ?>This file would be saved in your template folder (with a funky name if you wish - the user will never see the name).
Then you would create a file in the forum root, with the following contents:
<?php require_once('my-templates/xxxxxx/page1.php ?>You would then save that file with the name you want people to access it with, such as information.php.
Much more reliable than iFrames. I, personally, will never use them.
-
- Posted 2 years ago #
Good Michael.....
I'll tell u abt it... after using ur scipt
stay connect :-) -
- Posted 2 years ago #
script not working..... Michael are you sure you tell me right thing.....................................think about it
-
- Posted 2 years ago #
That was really something that came off the top of my head. Does it not do anything? If not, you should keep your iFrames thing going. It must work well. :)
-
- Posted 2 years ago #
Instead of
<?php require_once('my-templates/xxxxxx/page1.php ?>, use<?php require_once( 'bb-load.php' ); bb_load_template( 'page1.php' ); ?> -
- Posted 2 years ago #
I thought there was something wrong with my ever-so-simple code. Would that page1.php be stored in the root?
-
- Posted 2 years ago #
No, it would go in the template folder.
-
- Posted 1 year ago #
it also works for me, but if I want to create multiple pages then?
Can I just add one page in root and include all template pages in this file?
like in root file i want something like this
http://pastebin.com/33EfWn4p
or I'll stick to create multiple pages in root for making multiple template pages?
anyone interested to help? -
- Posted 1 year ago #
it also works for me
Then why the bumping?
Can I just add one page in root and include all template pages in this file?
No.
I'll stick to create multiple pages in root for making multiple template pages?
Yes
-
This topic is
closed