Show Events Calendar on Member Account Page

All the topics other than the two goes here.
  • Ads

Show Events Calendar on Member Account Page

Postby gracey » Mon Oct 20, 2008 2:10 pm

Hi,

I have added a HTML block to my member account page and I would like to show the calendar in this block.

Currently to view events, a member has to click on Events (in the top menu) and then Calendar (This opens in a new page). Ive checked in the Menu Builder and the code for this is "events.php?action=calendar".

I will also need to adjust the display settiings so the calendar shows a smaller version in the HTML block.

Any help at all will be greatly appreciated.
gracey
Newbie
Newbie
 
Posts: 11
Joined: Mon Oct 20, 2008 2:06 pm

Re: Show Events Calendar on Member Account Page

Postby Administrator » Tue Oct 21, 2008 1:20 pm

Add the code in php not in HTML block. Because that would give a good result.

You can try the same thing here. But you have to add code for calender.

http://www.dolphinpros.com/index.php/topic,21.0.html
Regards,
Praveen
Administrator
Administrator
Administrator
 
Posts: 1069
Joined: Mon Aug 25, 2008 7:18 am
Location: India

Re: Show Events Calendar on Member Account Page

Postby gracey » Wed Oct 22, 2008 11:56 am

Hi

Thanks for your suggestion I added the following code to the member.php file:

function getBlockCode_GYCalendar() {
$oEvents = new BxDolEvents();
$oEvents->bAdminMode = FALSE;
$ret = '';

$ret .= $oEvents->PageSDatingCalendar();
return $ret;
}

And it  is now showing the calendar but it is returning a designbox within the designbox I have on my sheet,  so in my HTML block, I also have another block with the name "Calendar". How can I get the calendar to show in the main HTML block.

Also I am having the following errors:
1. If I try to view a month that has any events (in the new HTML block), I get a blank page and the error message:

Fatal error: Call to undefined function getThumbNameByPictureName() in home/public_html/Dolphin/inc/classes/BXDolEvents.php on line 1647

2. Also in Admin panel, in the page builder section I am getting the Errors on the page and this is the message:

Line: 66
Char: 1
Error: 'version' is undefined
Code: 0
URL: http://www.gracey.com/Dolphin/admin/pag ... age=member

Any help will be greatly appreciated!

Thanks
gracey
Newbie
Newbie
 
Posts: 11
Joined: Mon Oct 20, 2008 2:06 pm

Re: Show Events Calendar on Member Account Page

Postby Administrator » Wed Oct 22, 2008 1:01 pm

For the designbox inside the designbox, you have add a new method in the file
inc/classes/BxDolEvents.php

It should be same as PageSDatingCalendar but should return the calender without creating a box.

For the errors.

You should use the require_once() to include the file in which the function getThumbNameByPictureName() is defined.

For the error in admin panel I have to take a look at it.
Regards,
Praveen
Administrator
Administrator
Administrator
 
Posts: 1069
Joined: Mon Aug 25, 2008 7:18 am
Location: India

Re: Show Events Calendar on Member Account Page

Postby gracey » Wed Oct 22, 2008 2:12 pm

Solved first two errors but still need help with the last one.



For anyones interest:



I solved the problem of the designbox showing within another designbox  by setting "DesignBox=0" for the new HTML block in PageCompose Table in the database.



For the fatal error which was caused by viewing a month with events, I included the ff line in member.php:



require_once( BX_DIRECTORY_PATH_INC . 'sdating.inc.php' ); <--This is where the missing function is defined.



Hope this helps someone:



I still need help with :



2. Also in Admin panel, in the page builder section I am getting the Errors on the page and this is the message:

Line: 66
Char: 1
Error: 'version' is undefined
Code: 0
URL: ...../Dolphin/admin/pageBuilder.php?Page=member
gracey
Newbie
Newbie
 
Posts: 11
Joined: Mon Oct 20, 2008 2:06 pm

Re: Show Events Calendar on Member Account Page

Postby Administrator » Thu Oct 23, 2008 11:22 am

Hello,

I need to take a look at it to give a solution.
Regards,
Praveen
Administrator
Administrator
Administrator
 
Posts: 1069
Joined: Mon Aug 25, 2008 7:18 am
Location: India

Re: Show Events Calendar on Member Account Page

Postby rashidm1 » Sat Jul 10, 2010 6:50 am

This function not working
Plz help me how to add Event Calendar in Index page

and anybody know how to make top menu multi colours.


I m w8 ur reply thx
rashidm1
Newbie
Newbie
 
Posts: 3
Joined: Sat Jul 10, 2010 6:32 am

Re: Show Events Calendar on Index Page

Postby rashidm1 » Sun Jul 11, 2010 2:06 am

Plz anybody help me how to add event calendar in index page.

thx.
rashidm1
Newbie
Newbie
 
Posts: 3
Joined: Sat Jul 10, 2010 6:32 am

Re: Show Events Calendar on Member Account Page

Postby Administrator » Thu Jul 15, 2010 10:00 am

What version of dolphin are you using?
Regards,
Praveen
Administrator
Administrator
Administrator
 
Posts: 1069
Joined: Mon Aug 25, 2008 7:18 am
Location: India

Re: Show Events Calendar on Member Account Page

Postby rashidm1 » Sat Jul 17, 2010 2:17 am

I am using dolphin 7.0.2 but anyway i done that calendar job.thx to rep me
rashidm1
Newbie
Newbie
 
Posts: 3
Joined: Sat Jul 10, 2010 6:32 am

Re: Show Events Calendar on Member Account Page

Postby Administrator » Thu Aug 26, 2010 5:54 am

Calendar on Member Page
------------------------
This will allow you to display the calendar in the member page of your dolphin based website.

Instructions:
-----------------

1. Open "inc/classes/BxDolTwigModule.php"

Find the folling lines:
Code: Select all
    function _actionCalendar ($iYear, $iMonth, $sTitle) {

        $iYear = (int)$iYear;
        $iMonth = (int)$iMonth;

        if (!$this->isAllowedBrowse()) {
            $this->_oTemplate->displayAccessDenied ();
            return;
        }

        $this->_oTemplate->pageStart();

        bx_import ('Calendar', $this->_aModule);
        $oCalendar = bx_instance ($this->_aModule['class_prefix'] . 'Calendar', array ($iYear, $iMonth, $this->_oDb, $this->_oTemplate, $this->_oConfig));

        echo $oCalendar->display();
        $this->_oTemplate->addCss ('main.css');
        $this->_oTemplate->pageCode($sTitle . $oCalendar->getTitle(), true, false);
    }


Replace it with:
Code: Select all
    function _actionCalendar ($iYear, $iMonth, $sTitle, $bEcho = true) {

        $iYear = (int)$iYear;
        $iMonth = (int)$iMonth;

        if (!$this->isAllowedBrowse()) {
            $this->_oTemplate->displayAccessDenied ();
            return;
        }

        $this->_oTemplate->pageStart();

        bx_import ('Calendar', $this->_aModule);
        $oCalendar = bx_instance ($this->_aModule['class_prefix'] . 'Calendar', array ($iYear, $iMonth, $this->_oDb, $this->_oTemplate, $this->_oConfig));
       
        if(!$bEcho)
            return $oCalendar->display();
        echo $oCalendar->display();
        $this->_oTemplate->addCss ('main.css');
        $this->_oTemplate->pageCode($sTitle . $oCalendar->getTitle(), true, false);
    }


2. Open the file "modules/boonex/events/classes/BxEventsModule.php"

Find the following:

Code: Select all
    function actionCalendar ($iYear = '', $iMonth = '') {
        parent::_actionCalendar ($iYear, $iMonth, _t('_bx_events_calendar'));
    }

Below it, add:
Code: Select all
    function serviceCalendar ($iYear = '', $iMonth = '') {
        return parent::_actionCalendar ($iYear, $iMonth, _t('_bx_events_calendar'), false);
    }


3. Now Goto your PHPMyAdmin and execute the following query.

Code: Select all
INSERT INTO `sys_page_compose` (`Page`, `PageWidth`, `Desc`, `Caption`, `Column`, `Order`, `Func`, `Content`, `DesignBox`, `ColWidth`, `Visible`, `MinWidth`) VALUES
('member', '998px', 'Event Calender', '_bx_events_calendar', 0, 0, 'PHP', 'bx_import(''BxDolService''); return BxDolService::call(''events'', ''calendar'', array());', 1, 66, 'memb', 0);



Thats it. Now you can add the block from "Account" page builder.
Regards,
Praveen
Administrator
Administrator
Administrator
 
Posts: 1069
Joined: Mon Aug 25, 2008 7:18 am
Location: India

  • Ads

Return to Dolphin General Help

Who is online

Users browsing this forum: No registered users and 1 guest

cron