#52 Re: Developer Help » https links for www_root and static_root links on secure pages » January 8, 2015 2:11pm

I'm still on 4.1 by the way. Maybe this code was not included yet? I don't see it in /core/router.php. Any problems with adding it in there on this version?

#53 Re: Developer Help » https links for www_root and static_root links on secure pages » January 8, 2015 2:06pm

<?
    $cms->makeSecure();
?>

<div class="page">

    <? include "../templates/layouts/_topshelf.php" ?>
   
    <div class="row outercontent">
       
        <div class="desktop-full tablet-full mobile-full">
                   
            <?
                include '../templates/layouts/_breadcrumbs.php';
            ?>
       
            <div class="content">
           
                <? if ($teaser) { ?>
                    <blockquote><?=$teaser?></blockquote>
                <? } ?>
           
                Content
               
                <div class="margin_m"></div>
               
            </div>
           
        </div>
       
    </div>
</div>

#54 Re: Developer Help » https links for www_root and static_root links on secure pages » January 8, 2015 2:04pm

I changed to relative links and it worked, but I've put the shortcodes back in for you to check out:

https://www.kpc.alaska.edu/about/giving/give

#55 Re: Developer Help » https links for www_root and static_root links on secure pages » January 8, 2015 1:41pm

I could just make the resource links in my templates relative links, but then I lose the benefit of using the static_root and www_root shortcodes in my templates.

#56 Re: Developer Help » https links for www_root and static_root links on secure pages » January 8, 2015 1:38pm

I just gave it a try. I was hoping for something that would convert the www_root and static_root references in my templates to https links instead of http links so I don't have insecure content, but it doesn't appear to do that.

#57 Re: Developer Help » https links for www_root and static_root links on secure pages » January 7, 2015 5:57pm

Nevermind, I'll probably just call it on pages that I know need to be secure.

#58 Re: Developer Help » https links for www_root and static_root links on secure pages » January 7, 2015 5:43pm

Thanks Tim. I figured there would be something like that available. Would you recommend checking the URL to see if the page is requested securely, and then call $cms->makeSecure() if that's the case?

#59 Developer Help » https links for www_root and static_root links on secure pages » January 7, 2015 5:38pm

jesse.glaves
Replies: 17

I just installed a secure certificate on our website, and I'm wondering what the recommended method for working with secure pages with static_root and www_root links in the template is? I was hoping that the site would dynamically switch these links to https when a secure page is requested. Hopefully that makes sense. Let me know if I need to clarify. Any help is appreciated, thanks.

#60 Re: Developer Help » Analytics Issue » December 18, 2014 4:54pm

Awesome. I can't wait. We're a little swamped right now; we just launched Monday. Another Bigtree site is in the wild! We're very happy with Bigtree, and everyone is loving the new site. It's no Fastspot site, but you guys definitely influenced many of our decisions. We are all big fans of your work. If you still want to check it out, it's up at www.kpc.alaska.edu. Thank you for all of your help! You got us through quite a few rough patches during development.

#61 Re: Developer Help » Analytics Issue » December 18, 2014 1:04pm

I just made a fake profile in that account, and disconnected. Now I'm back to the authorization page.

#62 Re: Bug Reports » Admin bar missing on cached pages » December 16, 2014 7:33pm

Nope, I doubt we'll ever have spikes like that unless it's a dos attack or something. But I think we have firewall settings in place to deal with requests like that. I just figured it was best practice, but if you don't even use it with your larger sites, I definitely don't think we'll have any issues leaving it off. Thanks.

#63 Bug Reports » Admin bar missing on cached pages » December 16, 2014 4:27pm

jesse.glaves
Replies: 2

We just launched our site and turned on site caching in the environment.php file to help with the full load of the site being in production. It works really well to reduce page load times, but the admin bar seems to be missing on cached pages when users are logged into the site. It's not a huge deal, as I can just click around until I find a page that isn't cached. However I doubt that's the desired performance. To verify, I turned caching off and the bar came back immediately. There ought to be a way to get around this behavior. Any ideas?

#64 Developer Help » Analytics Issue » December 16, 2014 2:16pm

jesse.glaves
Replies: 5

I attempted to connect my Google Analytics account with the analytics module in Bigtree. Unfortunately, I was logged into the wrong Google account when I attempted this, and I ended up copying the incorrect authentication code into Bigtree. There are no profiles attached to the account I used, and now I'm just seeing a message that says "No profiles were found in your Google Analytics account. I've tried pressing the disconnect button, but I cannot seem to get back to the authentication page. It doesn't seem to be disconnecting that account.

#65 Re: General » What Have You Built on BigTree? » December 15, 2014 9:07pm

Well, after about a year of planning, development, and hard work, our new college website is now live. It wouldn't have been possible without Fastspot, Bigtree, and without your amazing support Tim (and other developers.)

http://www.kpc.alaska.edu

As expected, the Google Custom Search is in limbo after we changed DNS to the new server, but the results should be cleared out in the next day or so I imagine.

Thank you!

#66 Re: Developer Help » Menu Ideas » December 13, 2014 3:27am

Thanks Tim, this will definitely come in handy. I think the BigTreeCMS::getHiddenNavByParent function is just what I need. I'll play around with it and see what I can do.

#67 Developer Help » Menu Ideas » December 12, 2014 5:05pm

jesse.glaves
Replies: 2

Hi there, I'm looking for some advice and recommended practices for working with menus in Bigtree. We're developing a college/education site, and we decided early on that the primary menu should be very minimal and student-centric (Academics, Admissions, Student Life, About). We love this approach, but it's making it a little difficult to organize the administrative, faculty and staff content within the site. Currently we've hidden all of this non-student content from the visible menu navigation, and have created collections of links populated in the settings section of admin panel, which we use to populate auxiliary dropdown menus and such. Since these pages are hidden from navigation, they don't show up in our main menu, or submenus in the left side of the content pages like our non-hidden pages do. In other CMS's I could just create a second menu for these links and use similar code to parse the structure of these menus like I do with the primary menu. In Bigtree we're limited to the one main menu. Any thoughts on how to deal with this situation? I'm sure I'm just locked into one way of thinking, and I'm hoping you can get me out of the box. I could just create another settings entry, and loop through it like I do with some of the smaller auxiliary menus. However, it would be great to use the same templating approach for the administrative page submenus as I do with the student-centric page menus, since I put so much work into the code that renders the primary menu in student pages. Thanks!

#68 Re: General » Areas of Study Extension » December 6, 2014 8:32pm

Ok, I think I figured it out. These faculty, degrees/programs, and contact info. pages which are being dynamically inserted into the menu do not have id's. The code is looking for id's to figure out where inside of the menu array the item lives. Since they didn't have id's it was getting confused. I just added some code to check that the current item has an ID before trying to write out its children menus. If not, it just stops recursing.

if (count($subnav2 > 0)) { }
if (count($subnav2 > 0) && isset($item["id"])) { }

#69 Re: General » Areas of Study Extension » December 6, 2014 6:19pm

In case you're wondering, below is the aforementioned hack job. Basically, I wanted to recursively continue drawing out sub-pages, and subs of those, and so on - but, always maintain the top level ancestor in the menu, instead of moving one level deeper into the menu each time I clicked a sub page (I always want the top level ancestor to be at the top of the menu, no matter how deep into it I get). Also, I wanted to be able to add a specific class to each level (i.e. top, second, third, forth, etc.). I'm sure there is a MUCH better and more efficient way to do this, but I played with it quite a bit, and this is the best I could come up with at the time. I'm by no means a PHP master, but I'm trying to get by.

Oddly enough, I did try reverting back to a standard sub-navigation loop, shared at https://gist.github.com/bigtreecms/5205661, just to see if that might change things, and it didn't even draw out the faculty, programs, or contact information at all. I see the departments listed, but nothing below that.

ADAPTED SUBNAVIGATION LOOP
-------------------------------------------------------------------------
<?
    $currentURL = BigTree::currentURL();
    $parent = $cms->getPage($page["parent"]);
   
    while ($parent["id"] > 0) {
        $ancestor = $cms->getPage($parent["parent"]);
       
        if ($ancestor > 0 && $ancestor > 4) {
            $parent = $ancestor;
        }
    }
   
    $subnav = $cms->getNavByParent($parent["id"], 2);
?>
<?
    if ((count($subnav)) > 0) {
?>

<nav class="subnavigation">
    <div class="naver-handle">Additional Navigation</div>
    <div class="naver-wrapper">
        <div class="naver-container">
            <? foreach ($subnav as $item) { ?>
                <?
                    $isActive = $currentURL == $item["link"];
                    $isOpen = (strpos($currentURL, $item["link"]) > -1);
                    $hasChildren = (count($item["children"]) > 0);
                ?>
                <div class="top item<? if ($isActive || $isOpen) { echo ' active'; } else { echo ' inactive'; } ?><? if ($hasChildren) echo ' parent'; ?>">
                    <a href="<?=$item["link"]?>" class="<? if ($isOpen) echo ' open'; ?><? if ($isActive) { echo ' active'; } else { echo ' inactive'; } ?>"> <span></span><?=$item["title"]?></a>
                    <? $subnav2 = $cms->getNavByParent($item["id"], 2); ?>
                    <?
                        if (count($subnav2 > 0)) {
                    ?>
                        <? foreach ($subnav2 as $item2) { ?>
                            <?
                                $isActive = $currentURL == $item2["link"];
                                $isOpen = (strpos($currentURL, $item2["link"]) > -1);
                                $hasChildren = (count($item2["children"]) > 0);
                            ?>
                            <div class="second children item<? if ($isActive || $isOpen) { echo ' active'; } else { echo ' inactive'; } ?><? if ($hasChildren) echo ' parent'; ?>">
                                <a href="<?=$item2["link"]?>" class="<? if ($isOpen) echo ' open'; ?><? if ($isActive) { echo ' active'; } else { echo ' inactive'; } ?>"> <span></span><?=$item2["title"]?></a>
                                <? $subnav3 = $cms->getNavByParent($item2["id"], 2); ?>
                                <?
                                    if (count($subnav3 > 0)) {
                                ?>
                                    <? foreach ($subnav3 as $item3) { ?>
                                        <?
                                            $isActive = $currentURL == $item3["link"];
                                            $isOpen = (strpos($currentURL, $item3["link"]) > -1);
                                            $hasChildren = (count($item3["children"]) > 0);
                                        ?>
                                        <div class="third children item<? if ($isActive || $isOpen) { echo ' active'; } else { echo ' inactive'; } ?><? if ($hasChildren) echo ' parent'; ?>">
                                            <a href="<?=$item3["link"]?>" class="<? if ($isOpen) echo ' open'; ?><? if ($isActive) { echo ' active'; } else { echo ' inactive'; } ?>"> <span></span><?=$item3["title"]?></a>
                                            <? $subnav4 = $cms->getNavByParent($item3["id"], 2); ?>
                                            <?
                                                if (count($subnav4 > 0)) {
                                            ?>
                                                <? foreach ($subnav4 as $item4) { ?>
                                                    <?
                                                        $isActive = $currentURL == $item4["link"];
                                                        $isOpen = (strpos($currentURL, $item4["link"]) > -1);
                                                        $hasChildren = (count($item4["children"]) > 0);
                                                    ?>
                                                    <div class="forth children item<? if ($isActive || $isOpen) { echo ' active'; } else { echo ' inactive'; } ?><? if ($hasChildren) echo ' parent'; ?>">
                                                        <a href="<?=$item4["link"]?>" class="<? if ($isOpen) echo ' open'; ?><? if ($isActive) { echo ' active'; } else { echo ' inactive'; } ?>"> <span></span><?=$item4["title"]?></a>
                                                        <? $subnav5 = $cms->getNavByParent($item4["id"], 2); ?>
                                                        <?
                                                            if (count($subnav5 > 0)) {
                                                        ?>
                                                            <? foreach ($subnav5 as $item5) { ?>
                                                                <?
                                                                    $isActive = $currentURL == $item5["link"];
                                                                    $isOpen = (strpos($currentURL, $item5["link"]) > -1);
                                                                    $hasChildren = (count($item5["children"]) > 0);
                                                                ?>
                                                                <div class="fifth children item<? if ($isActive || $isOpen) { echo ' active'; } else { echo ' inactive'; } ?><? if ($hasChildren) echo ' parent'; ?>"> <a href="<?=$item5["link"]?>" class="<? if ($isOpen) echo ' open'; ?><? if ($isActive) { echo ' active'; } else { echo ' inactive'; } ?>"> <span></span><?=$item5["title"]?></a></div>
                                                            <? } ?>
                                                        <? } ?>
                                                    </div>
                                                <? } ?>
                                            <? } ?>
                                        </div>
                                    <? } ?>
                                <? } ?>
                            </div>
                        <? } ?>
                    <? } ?>
                </div>
            <? } ?>
        </div>
    </div>
</nav>
<?
    }
?>

#70 Re: General » Areas of Study Extension » December 5, 2014 9:02pm

Everything is going great with the areas of study module. Something is weird in the way it's adding the Faculty/Degrees & Programs/Contact Information sub-pages to the menu though. At least with the code I am using to parse the menu array, which is admittedly quite a hack job. For some reason every sub section under the department pages is printing out pages from the parent menu as children, as shown below in the {{{...}}}.

Admissions & Aid
Academics
        Academic Calendar
        Academic Resources
        Areas of Study
                Science
                        Faculty
                                {{{Academics}}}
                        Degrees & Programs
                                {{{Academics}}}
                        Contact Information
                                {{{Academics}}}
        Distance Education
        Library
        Special Programs
        2015 Course Catalog
Student Life
About

Click on any of the Faculty/Degrees & Programs/Contact Information pages reveals the top level menu:

Faculty
        Admissions & Aid
        Academics
        Student Life
        About

I'm guessing is has something to do with the getnav function in the custom > inc > modules > departments.php, but I don't know enough about what that's doing to brainstorm it.

function getNav($page) {
    $base_link = WWW_ROOT.$page["path"]."/";
    return array(
        array("title" => "Faculty", "link" => $base_link."faculty/"),
        array("title" => "Degrees &amp; Programs", "link" => $base_link."programs/"),
        array("title" => "Contact Information", "link" => $base_link."contact/")
    );
}

#71 Re: General » Areas of Study Extension » December 5, 2014 4:51pm

Oh, this is amazing. Thank you very much. Can't wait for you to see the site when we are done.

#73 Re: General » Areas of Study Extension » December 4, 2014 2:56pm

Thanks Tim. Yeah, unfortunately we don't have a catalog management system, so we would probably have to do the static page/elaborate method. Catalog management is definitely on my wishlist. Our organization has been looking at Courseleaf, but who knows if and when that will happen. I haven't heard of Acalog, so I'd be curious to learn more about it. Essentially what we will be doing is using a departmental organization structure in an Areas of Study section of the website, similar to below:

Anthropology
      Faculty
      Degrees/certificates/special programs
            Courses/requirements
      Contact information
      ...
Art
      Faculty
      Degrees/certificates/special programs
            Courses/requirements
      Contact information
      ...
Biology
      Faculty
      Degrees/certificates/special programs
            Courses/requirements
      Contact information
      ...
Business
      ...
Chemistry
      ...
Communication
      ...
Corrections
      ...

We would like to include faculty members, degrees/certificates/special programs, contact information, description, degree requirements, etc. within each of these department sections. I've already set up a module that allows entry for most, if not all of the "departments", but when I start thinking of ways to organize all of the other information underneath the department level, within a module, realizing that much of this will also need to be reflected in some kind of menu system, which is ideally part of the same menu structure as the rest of the website, things get a little shaky. Relating templates, modules, and menus is something I've been wrestling with in Bigtree, even in other sections of the website. Any recommendations, or sample code is very much appreciated. I think I'm on the right track, but always open to ideas for best practices.

#74 General » Areas of Study Extension » December 3, 2014 6:55pm

jesse.glaves
Replies: 11

Hi Tim/Bigtree team. Would you happen to have an Areas of Study / Majors / Minors / Departments extension for a higher education website available to share? I've been working on my own solution for a couple of days, and the more I think about all of the features I'd like to include, the more time intensive this project is becoming. Even if I had a rough framework to work with, that would save a bunch of work on my end. It's a long shot I'm sure, but I figured I'd at least ask smile Thanks.

#75 Re: Developer Help » Email Forms » November 26, 2014 1:44pm

Ok, I've installed the social feed extension. Everything looks like it's set up correctly. Just curious where to enter the credentials for the various feeds. Is there a configuration file for that? Do I need to make come custom settings in the backend?

Board footer

Powered by FluxBB

The Discussion Forum is not available on displays of this size.