Add the guestbook to a page
Permalink
I am tryin to include the guestbook by default on a page as part of it original structure. I dont want it to be added as block to an area, because it can then be remove if the user "feels like it".
I tried copying the "view" for the basic guest book, but i am having trouble when it calls $controller, and when it needs the bID. without those i am unable to post, but i have gotten the form to appear.
does anyone have any suggestions for what i may be doing wrong? or what i am not doin? or a proper way to do it?
/* custom-comments */
and the original view.php i am working from.
The page can be viewed athttp://xclydes.isa-geek.com/blog/first-blog-post....
A side question. it is only marking an entry in the top menu when i am at that level. is it possible to have it mark for children also?
/*header-area*/
I tried copying the "view" for the basic guest book, but i am having trouble when it calls $controller, and when it needs the bID. without those i am unable to post, but i have gotten the form to appear.
does anyone have any suggestions for what i may be doing wrong? or what i am not doin? or a proper way to do it?
/* custom-comments */
<?php global $c; $commentBlock = BlockType::getByHandle('guestbook'); $controller = $commentBlock->controller; $commentBlock->controller->displayGuestBookForm = 'true'; if($invalidIP) { ?> <div class="ccm-error"><p><?php echo $invalidIP?></p></div> <?php } $u = new User(); $posts = $controller->getEntries(); $bp = $controller->getPermissionsObject(); ?> <?php if($controller->displayGuestBookForm) { ?> <?php
Viewing 15 lines of 87 lines. View entire code block.
The page can be viewed athttp://xclydes.isa-geek.com/blog/first-blog-post....
A side question. it is only marking an entry in the top menu when i am at that level. is it possible to have it mark for children also?
/*header-area*/
<?php build_Site_Nav(); function build_Site_Nav(){ $sitePages = BlockType::getByHandle('autonav'); $sitePages->controller->displayPages = 'top'; $sitePages->controller->orderBy = 'display_asc'; $sitePages->controller->displaySubPages = 'none'; $nh = Loader::helper('navigation'); $aBlocks = $sitePages->controller->generateNav(); global $c; echo("<ul class=\"nav\">"); $nh = Loader::helper('navigation'); foreach($aBlocks as $ni) { $_c = $ni->getCollectionObject(); if (!$_c->getCollectionAttributeValue('exclude_nav')) {
Viewing 15 lines of 54 lines. View entire code block.
that honestly would have been the easiest way to do it. i was considering how ever to package the skin when i was done building it. if i were to add the the comment block thru page defaults, they would have to manually add it when they installed the theme on a seperate c5 setup.
i was jus trying to create a "one click" install for the theme so to speak. the theme contains 5 different page types, so i there are certain sections i want hardcoded to keep uniformity, no matter where it went.
i was jus trying to create a "one click" install for the theme so to speak. the theme contains 5 different page types, so i there are certain sections i want hardcoded to keep uniformity, no matter where it went.
Did you ever resolve this?
I want to do the exact same thing, and am trying to sort it now...
I want to do the exact same thing, and am trying to sort it now...
wouldn't that do what you're asking without writing any code?
or am i missing something..