Adding custom popups and links to box header

Ok, this post is a 2 parter, First an explanation, and second a question:

I spent a lil bit of time trying to figure out how to create a custom popup box which utilizes the systems default shading of background page - such as when you click the login link on the home page and the login popup is displayed. But  I wanted this link to be in the upper right corner of the custom php block that I have created.

(I have a problem where the client I am working with will open a popup and forget it is open cause they clicked on the main page thus moving the popup to the back. So he ends up with 50 popups open, or he cant get a link to work cause the popup is already open in the back.)

I have found a 2 step way to do this:

1st Step: Add this to a php block:

________________________________________________________________

// place php connection string here, as well as any javascript coding

return array(
 'Place data to be displayed here',
 
  array(

// this section consists of the links in the upper right of the header of the block
                           _t('Link 1 Name') => array(
                            'href' => 'link-page.php',
                            'dynamic' => true,
// this link will not be clickable as this is the page you are viewing
                            'active' => !$this->isEditable,
                             ),
                             _t('Link 2 Name') => array(
// example of link to non database driven page - such as a simnple html page
                            'href' => 'link-page.html&view=true',
// dynamicPopup is the function used to shade the background for the popup box (I think) - but whetever it is, this is what creates it.
                            'dynamicPopup' => true,
                            'active' => $this->isEditable,
                            ),
                            _t('Link 3 Name') => array(
// example if you are using variables to get info from database
                            'href' => 'link-page.php?db-field=' . $variable,
// dynamic will open the page inside of the current block
                            'dynamic' => true,
                            'active' => $this->isEditable,
                             )
                 )
 );

____________________________________________________________________________

Step 2: create your custom pages using the below code - in my example above, I called it link-page.php and link-page.html.

____________________________________________________________________________

<div id="page_block_536" class="page_block_container bx-def-margin-sec-leftright"><div class="disignBoxFirst bx-def-margin-top bx-def-border">
    <div class="boxFirstHeader bx-def-bh-margin">
        <div class="dbTitle">Header Name on Left</div><div class="dbTopMenu" id="dbTopMenu536" style="width: 552px;">
    <div class="dbTmLeft bx-def-padding-sec-right" style="display: none;">
        <a onmouseout="javascript:moveScrollLeftAuto('dbTmContent536', false)" onmouseover="javascript:moveScrollLeftAuto('dbTmContent536', true)" href="javascript:void(0)">‹</a>
    </div>
    <div class="dbTmCenter" style="width: 552px;">
        <div class="dbTmContent" id="dbTmContent536" style="width: 552px;">
            <table class="dbTmCntLine">
                <tbody><tr>
                            <td class="active">
                                <span>This Page</span>
                            </td> 
                            <td class="bullet"><span>·</span></td>
                            <td class="notActive">
                                <a onclick="loadDynamicPopupBlock(536, this.href); return false;" class="top_members_menu" href="link-page.php?view=true">this link gives you the dynamic popup which shades the background</a>
                            </td>
                            <td class="bullet"><span>·</span></td>
                            <td class="notActive">
                                <a onclick="return !loadDynamicBlock(536, this.href);" class="top_members_menu" href="link-page.php">This link opens page in the current block</a>
                            </td>
                            <td class="bullet"><span>·</span></td>
                            <td class="notActive">
                                <a onclick="return !loadDynamicBlock(536, this.href);" class="top_members_menu" href="link-page.php?db-field=$variable">This link opens page in the current block based on variable</a>
                            </td>
                            </tr>
            </tbody></table>
        </div>
    </div>
    <div class="dbTmRight bx-def-padding-sec-left" style="display: none;">
        <a onmouseout="javascript:moveScrollRightAuto('dbTmContent536', false)" onmouseover="javascript:moveScrollRightAuto('dbTmContent536', true)" href="javascript:void(0)">›</a>
    </div>
    <div class="clear_both">&nbsp;</div>
    <script language="javascript" type="text/javascript">
        $('#dbTopMenu536').addClass('dbTopMenuHidden').parents('.disignBoxFirst').ready(function() {
            dbTopMenuLoad('536');
        });
    </script>
</div>
        <div class="clear_both"></div>
    </div>
    <div class="boxContent"><div class="dbContent bx-def-bc-margin">
 place displayed content here
</div></div>
    </div></div>

________________________________________________________________

Now - heres the trick part though - As you see in blue, there is a number. This number will be different for you, so use something such as firebug on the page that contains the initial php block to see what your number is.

So - this leads to my question: Is there an easier way to do this? I am using Dolphin 7.1. If you are interested in helping resolve this and would like to see an existing working page, let me know and I will send you a url and login.

Thanks in advance.

caredesign.net
Quote · 6 Feb 2013
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.