Skip to:
Content
Pages
Categories
Search
Top
Bottom

execute php code in bbpages editor. fast help

  • 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

Viewing 12 replies - 1 through 12 (of 12 total)

  • Michael
    Member

    @michael888

    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.”

    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


    Michael
    Member

    @michael888

    That should do okay – if it works and doesn’t reduce server-load times, then it should work. :)


    Michael
    Member

    @michael888

    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.

    Good Michael…..

    I’ll tell u abt it… after using ur scipt

    stay connect :-)

    script not working….. Michael are you sure you tell me right thing……………………………….think about it


    Michael
    Member

    @michael888

    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. :)


    Ben L.
    Member

    @nightgunner5

    Instead of <?php require_once('my-templates/xxxxxx/page1.php ?>, use <?php require_once( 'bb-load.php' ); bb_load_template( 'page1.php' ); ?>


    Michael
    Member

    @michael888

    I thought there was something wrong with my ever-so-simple code. Would that page1.php be stored in the root?


    Ben L.
    Member

    @nightgunner5

    No, it would go in the template folder.


    cNc
    Member

    @cnc

    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?


    kevinjohngallagher
    Member

    @kevinjohngallagher

    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

Viewing 12 replies - 1 through 12 (of 12 total)

You must be logged in to reply to this topic.