Externalpages with spotlight v1.02

Release Notes

Basically this adds a spotlight editing function to externalpages (which is a great plugin)

To install, just unpack and enable.

 

Changes:

1.02 Added a "Spotlight public" for non-loggedin users

1.01 Some title code was missing when editing the spotlight.

1.0 Added spotlight function. Also there was a bug if you uploaded a blank page then you were redirected to a nonexistant page.

 

:)

~Johno

  • good!

    but I've a prb... I use themesimpleblewhite and in external pages I wrote some words but in the start (when I'm not leggedin) e cant see the public spotlight. Maybe I wrong?

     

  • i use that theme too, make sure this plugin is after it on the list. And make sure that "site access" if your running it. Is at the very bottom.

  • mmm my last plugin is this lastexpag.... before I've themesimp.....

    I cant find "site access" in my admin tools

    I've only activate "custom index"

     

  • @Luca. Was a spotlight there previously? The actual display of the spotlight is not handled by this plugin - this will simply overwrite what is displayed. So if your theme doesn't display a frontpage spotlight then neither will this plugin.

    To get my frontpage spotlight I had to hack canvas_menu

    canvas_menu/views/default/pageshells/pageshell.php:

    Look for the lines like

           <!-- spotlight -->
            <?php echo elgg_view('page_elements/spotlight', $vars); ?>

    Above and below is code to check login status, just comment these out and spotlight will display on the frontpage (hopefully)

  • In my pageshell.php I have:

    <!-- canvas -->
    <div id="layout_canvas">

    <?php echo $vars['body']; ?>

    <div class="clearfloat"></div>
    </div><!-- /#layout_canvas -->

    <?php
        if(isloggedin()){
    ?>
            <!-- spotlight -->
            <?php echo elgg_view('page_elements/spotlight', $vars); ?>
    <?php
        }
    ?>

    <!-- footer -->
    <?php echo elgg_view('page_elements/footer', $vars); ?>

     

  • @Luca. You are in the right place, follow the logic in the following code:

    ======================

    <?php
        if(isloggedin()){
    ?>
            <!-- spotlight -->
            <?php echo elgg_view('page_elements/spotlight', $vars); ?>   
    <?php
        }
    ?>

    =======================

    Firstly a conditional statement to test if the person is logged in, then displys spotlight if they are - not what we want, so  comment out the conditional statement like this:

    =======================

    // <?php
    //    if(isloggedin()){
    // ?>
            <!-- spotlight -->
            <?php echo elgg_view('page_elements/spotlight', $vars); ?>   
    // <?php
    //    }
    // ?>

    ========================

    Now the spotlight should display regardless of logged in status :)

     

  • ok, I try this afternoon

    ;) thank u again

  • I tried your code and I can see the spotlight before loggin ;)

    but the right code is this:

    <?php
    //     if(isloggedin()){
    // ?>
            <!-- spotlight -->
            <?php echo elgg_view('page_elements/spotlight', $vars); ?>
     <?php
    //     }
    // ?>

    ... without // // (as u see) (because with // // I see "//" before and after the spotlight in my home page, before loggin).

    But there is an other problem: when I loggedin I see a whitepage with nothing!!! So, only if I use the back page of my browser, I can see the normal display. (I dont know why but is strange).

     

     

  • @ Luca Your are right, sorry the // only works within php code, should have used <!-- -->.. Actually I just deleted the lines.

    del <?php
    del //     if(isloggedin()){
    del // ?>
            <!-- spotlight -->
            <?php echo elgg_view('page_elements/spotlight', $vars); ?>
    del <?php
    del //     }
    del // ?>

    ===================

    Your code:

    <?php
    //     if(isloggedin()){
    // ?>
            <!-- spotlight -->
            <?php echo elgg_view('page_elements/spotlight', $vars); ?>
     <?php
    //     }
    // ?>

    Has two <?php which are not closed by ?>

  • @ johno and for the other problem? Have u an idea?

     

  • Is the plug in working properly? I can't work out if there's a problem from the above.

  • Yes, it works. Here's how I configured it to workon 1.5:

    1. Make sure the External Sites plugin is after the theme plugin.
    (Otherwise you'll see the original spotlight and this new spotlight.)

    2. Make sure that "site access", if your running it, is at the very bottom.
    (I'm currently not using this mod.)

    3. Edit /var/www/html/mod/theme_sitename/views/default/pageshells
    if you use a custom theme
    (I use http://community.elgg.org/pg/plugins/pete/read/33206/elgg-example-theme-framework)

    OR if you use the default elgg installation,
    /var/www/html/views/default/pageshells
    (It is recommended to use a theme so you don't modify(break) the original elgg pages.)

    4. Replace

    <?php
        if(isloggedin()){
    ?>
            <!-- spotlight -->
            <?php echo elgg_view('page_elements/spotlight', $vars); ?>
    <?php
        }
    ?>

    with this code if you want the Spotlight and Public Spotlight to show:

    <!-- Spotlight logged in only
    <?php
        if(isloggedin()){
    ?>
            <!-- spotlight -->
            <?php echo elgg_view('page_elements/spotlight', $vars); ?>
    <?php
        }
    ?> -->

    <!-- spotlight everyone -->
            <?php echo elgg_view('page_elements/spotlight', $vars); ?>


    5. Enter your content into the Spotlight and Spotlight public page in Administration/External pages.

    If you want to maintain the original 2 column look, use this html in External Pages and replace the placeholder content.

    <div id="spotlight_table"><!-- spotlight RHS content -->
    <div class="spotlightRHS">
    <h2>Information</h2>
    Enter Additional Information here.
    <ul>
    </ul>
    </div>
    <!-- spotlight RHS content --> <!-- spotlight LHS content -->
    <div class="spotlightLHS">
    <h2>Welcome to SiteName<br /></h2>
    <p>Enter your site overview here.</p>
    </div>
    <!-- /spotlight LHS content --></div>

    The plug-in works beautifully. Thanks!

  • @dbchicago Good on you for perservering and thanks for sharing how you got it to work. Actually can I add this to a readme file? I esp like your code for the two column layout.

    @everyone The critical file is the pageshells (which handles layout, and spotlight display), for me I am using the canvas_menu plugin which handles this for me, hence the hack above.

    I don't plan on over-riding pageshells, as this tends to break to much on my setup, so this plugin will ONLY change the CONTENT of spotlight, and leave the display to other plugins (or the default).

     

     

  • I already have a Plugin named externalpages in the Mod folder, using v1.5, is this the same one as the original external pages that is currently on my site, as when I drop your version in to /mod it asks to overwrite the current externalpages plugin that came with v1.5?

    Regards,

  • @Rob. This plugin replaces the existing externalpages. So you can overwrite the folder ok.

  • Cheers for the reply Johno, I see what you're saying and I would do that no problem but when I download your above zip file, it's got the filename "externalpages_spotlight.tar-1.gz" so when you place it in the /mod folder, it isn't like a normal elgg plugin / mod folder I have unzipped and hence I am stuck wondering why this is the first once that once unzipped, it's just one solitary file that is confusing me compared to all the dozens of plugins i've been busy installing as a newbie this past 24hrs?

  • Hi johno, I have got much more used to elgg, amazing thing isn't it, never ceases to keep me awake, thinking of oh soooo much more I could do with my new site... no doubt everybody else has the elgg bugg too! ;)

    I am struggling in just one area with this plugin, have done everything that was talked through above, however I just can't get to locate the;

    "spotlight editing function to externalpages"

    Which I presume should be in the external pages via admin, and next to the about, privacy and terms pages that we can make... but as mentioned I can't seem to get that side of this plugin activated, could you guide me to getting the final few steps done.

    Regards,

  • Hi All,

    I have managed to fumble my way through the above pointers but you have to go in to 4 seperate pages and make additions before you get a new page you create to show up in the External Pages feature through admin.

    I will put up a topic on exactly how I achieved my new contact page, for those newbies who want to add new additional admin content pages, for their end users.

    However, until I finish the very last thing that I am struggling with a little and not previously knowing what the elgg coding is to include a wrapper in content pages, could somebody please advise me if you know what the coding should be.

    As mentioned once I have the item I need to show in my new Contact Us page showing up via the wrapper, I will make a " How To Add Extra External Content Pages" and post it and show in the post the new finished content page too.

    Regards,

  • Can anybody advise / help with my last post above at all?

  • @Rob, Do you want to extent the plugin further, or are having issues getting it to work at all? If you are just trying to get it to work then it should show up in the admin menu under external pages.

    image

     

    If you don't see the above, then the plugin is not installed correctly.

  • I have two instances no. How do I manage to get the old one switched off?

  • Solved, I read the bellow stuff :)

  • @ Johno - I managed to get a new external page in, as mentioned above making some changes to 4 pages of the external page coding, I now have a new "Contact Us" page added.

    However I am trying to get an iframe / wrapper to show an external Contact Us script within the new external pages Contact Us page created, it just doesn't show the iframe with the external content in and that's the issue I am struggling with to complete it?

    Regards,

  • I've looked further in to my above problem and if I navigate to my newly created "Contact Us" page, in to the tinymce editor and then select the "Html" option, I enter the following iframe code;

    <div id="content">
        <iframe src="http://www.ecomarketingstrategies.com/contact" width=725 height=620 marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0 scrolling=no></iframe>
      </div>

    I then select save and it returns me back to the "Contact Us" page but it never seems to save the actual iframe content and show it. As then when I go back to the "HTML Source Editor" it's either blank or just shows the <div id="content"></div> tags which I assume are placed in the HTML Source Editor as standard?

    I have the same iframe code working on another website just fi but that's a standard xhtml / css website versus an actual platform like elgg is.

    Could it be an error maybe I am not noticing in either of the 4 pages I had to make some minor adjustments to, to create the new "Contact Us" within external pages plugin etc?

    Regards,

  • My site only show "latest activity" as default .Nothing changes after I upload to mod.I using ELGG 1.5 core

Stats

  • Category: Uncategorized
  • License: GNU General Public License (GPL) version 3
  • Updated: 2014-11-17
  • Downloads: 3547
  • Recommendations: 3

Other Projects

View johno's plugins