Add new External Pages

Recently, I wrote a tutorial on how to add new external pages to Elgg, other than the three comes by default.

http://ishouvik.tk/add-new-external-pages-elgg-trick

 

Anyone who is interested in expanding the external pages, could go through this.

  • very nice but why don't you post it here ???

  • Was too lazy to post here.

    OK, here you go ...

     

    Here, we are going to add a new page to named ‘FAQ’. You can choose what ever name you want to. Just rename ‘FAQ’ to something else.

    1) Open this directory – \mod\externalpages\languages\en.php\ and seek the following line-
    ‘expages:privacy’ => “Privacy”,
    Add the following code after this line-
    ‘expages:faq’ => “Faq”,

    2) Open this directory – \mod\externalpages\views\default\expages\footer_menu.php\ and seek the following line-
    <a href=”<?php echo $vars['url']; ?>pg/expages/read/Privacy/”><?php echo elgg_echo(‘expages:privacy’); ?></a> |
    Add the following code after this line-
    <a href=”<?php echo $vars['url']; ?>pg/expages/read/Faq/”><?php echo elgg_echo(‘expages:faq’); ?></a> |

     

    3) Open this directory – \mod\externalpages\views\default\expages\menu.php\ and seek the following line-
    <li <?php if($type == ‘privacy’) echo “class = ‘selected’”; ?>><a href=”<?php echo $url; ?>privacy”><?php echo elgg_echo(‘expages:privacy’); ?></a></li>
    Add the following code after this line-
    <li <?php if($type == ‘faq’) echo “class = ‘selected’”; ?>><a href=”<?php echo $url; ?>faq”><?php echo elgg_echo(‘expages:faq’); ?></a></li>

     

    4) Open this directory – \mod\externalpages\views\default\expages\forms\edit.php\ and seek the following line-
    else if($type == ‘privacy’) {
    $external_page_title = elgg_echo(‘expages:privacy’);
    }
    Add the following code after this line-
    else if($type == ‘faq’) {
    $external_page_title = elgg_echo(‘expages:faq’);
    }


    5) Save all files and upload the modified plugin.

     

    6) Then, run the upgrade.php script by hitting http://SITEURL/upgrade.php in address-bar.

  • Nice to see someone put it up. It's not too difficult to do once you have a quick look through the files.

  • Yes, true. But, the new people on Elgg usually find it difficult. Someone had asked me how I did it on my site. So, I thought it could be useful for other people as well.

  • Thanks, I was looking for this and finally found it here... Thanks !!

  • Doesn't work for me.

    Followed all instructions and I just get a single line error message the moment it's uploaded.

  • @Luke can help you only if you post that error message

  • thank you Shouvik Mukherjee

  • Hello, I have created a new external page named "referral" and would like to embed it to the frontpage for logged in users.

    Aso edited the new_index.php to add a <div id="index_welcome"> to host the new external page, it  works if I add any of the two sides of the external frontpage, e.g.:

                <?php
                    //include a view that plugins can extend
                    echo elgg_view("index/lefthandside");
                ?>

    but, it is not working when I try the "referral" word:

                <?php
                    //include a view that plugins can extend
                    echo elgg_view("index/referral");
                ?>

    My lab site is: http://red.gladysgahona.com

    What am I doing wrong?