Home · Links · Contact Us
Home arrow Forums
Home
Features
FAQ
Screen Shots
Modules
Demos
Documentation
Forums
Contact Us
Download
Purchase
Quotes

" ... I want to tell you that your thyme product is functional and valuable beyond words. I cannot imagine why any portal would be without it. It is the cornerstone of our new project ..."

" ... Thanks for such a complete project, its making my job much easier. ..."

" ... I have now deployed 4 different calendars and our users love them ... "

" ... Easy to install and use and a great look/design. ..."

" ... This has to be the easiest to use program I think I've had to deal with at all this year. ..."


  FAQFAQ    SearchSearch  RegisterRegister   Log inLog in 
Adding Email Event/Tell A Friend To Customized Event View
Goto page 1, 2  Next
 
Post new topic   Reply to topic     Forum Index -> Web site integration
View previous topic :: View next topic  
Author Message
adawson



Joined: 02 Jun 2008
Posts: 85

PostPosted: Tue Jun 10, 2008 10:26 pm    Post subject: Adding Email Event/Tell A Friend To Customized Event View Reply with quote

I would lke to add a "Tell A Friend" button to my customized event view page/template, but can't seem to figure out the code for it.

Is this possible?
Back to top
View user's profile Send private message
esoft_ian



Joined: 12 Sep 2005
Posts: 5160

PostPosted: Wed Jun 11, 2008 3:42 pm    Post subject: Reply with quote

Hi,

You should be able to include() _CAL_BASE_PATH_."include/event_email.php" in your template.
Back to top
View user's profile Send private message Visit poster's website
adawson



Joined: 02 Jun 2008
Posts: 85

PostPosted: Fri Jun 13, 2008 12:21 am    Post subject: Reply with quote

Where would this go? In the head of the event view template?
Back to top
View user's profile Send private message
esoft_ian



Joined: 12 Sep 2005
Posts: 5160

PostPosted: Fri Jun 13, 2008 4:24 pm    Post subject: Reply with quote

Hi,

Err... are you using Joomla Studio or is this a PHP page that you have created on your own?
Back to top
View user's profile Send private message Visit poster's website
adawson



Joined: 02 Jun 2008
Posts: 85

PostPosted: Fri Jun 13, 2008 7:16 pm    Post subject: Reply with quote

It's a page I've created using Dreamweaver. Anything I create in Joomla, I'm having an issue displaying. I imagine whatever is preventing me from viewing the files within Joomla as well as using the direct urls is causing a problem with the code generated.
Back to top
View user's profile Send private message
esoft_ian



Joined: 12 Sep 2005
Posts: 5160

PostPosted: Mon Jun 16, 2008 4:06 pm    Post subject: Reply with quote

This would go anywhere after the event is created inside your event view template.

include(_CAL_BASE_PATH_."include/event_email.php");
Back to top
View user's profile Send private message Visit poster's website
adawson



Joined: 02 Jun 2008
Posts: 85

PostPosted: Mon Jun 16, 2008 5:28 pm    Post subject: Reply with quote

It's returning this error:

Fatal error: Call to a member function can_view() on a non-object in /home/dbriefs/public_html/calendar/thyme/thyme/include/event_email.php on line 31
Back to top
View user's profile Send private message
esoft_ian



Joined: 12 Sep 2005
Posts: 5160

PostPosted: Mon Jun 16, 2008 5:29 pm    Post subject: Reply with quote

Hi,

At the top of your page, you will have to do:

global $_cal_event;

Then $_cal_event = new _cal_event(...)
Back to top
View user's profile Send private message Visit poster's website
adawson



Joined: 02 Jun 2008
Posts: 85

PostPosted: Mon Jun 16, 2008 5:36 pm    Post subject: Reply with quote

Is this at the top of the Event view page or the event_email.php page?

What does "(...)" represent?
Back to top
View user's profile Send private message
esoft_ian



Joined: 12 Sep 2005
Posts: 5160

PostPosted: Mon Jun 16, 2008 5:57 pm    Post subject: Reply with quote

Hi,

At the top of your customized event view page.

The (..) represents the event id and instance. It would help if I could see your customized event view code. Could you e-mail this to me please? ian@extros...
Back to top
View user's profile Send private message Visit poster's website
adawson



Joined: 02 Jun 2008
Posts: 85

PostPosted: Mon Jun 16, 2008 6:07 pm    Post subject: Reply with quote

I have sent this.
Back to top
View user's profile Send private message
esoft_ian



Joined: 12 Sep 2005
Posts: 5160

PostPosted: Mon Jun 16, 2008 6:18 pm    Post subject: Reply with quote

I see. In your case, this would be easier. Just after this line:

$e = $cal->get_event($_REQUEST['eid'], $_REQUEST['inst']);

add this ..

Code:
global $_cal_event;

$_cal_event =& $e;
Back to top
View user's profile Send private message Visit poster's website
adawson



Joined: 02 Jun 2008
Posts: 85

PostPosted: Mon Jun 16, 2008 6:33 pm    Post subject: Reply with quote

Hmmm....well.....

That seems to have added the Send to form directly into my event view. Is there a way to get just the button linked to that form?
Back to top
View user's profile Send private message
adawson



Joined: 02 Jun 2008
Posts: 85

PostPosted: Mon Jun 16, 2008 6:34 pm    Post subject: Reply with quote

Hmmm....well.....

That seems to have added the Send to form directly into my event view. Is there a way to get just the button linked to that form?
Back to top
View user's profile Send private message
esoft_ian



Joined: 12 Sep 2005
Posts: 5160

PostPosted: Tue Jun 17, 2008 4:06 pm    Post subject: Reply with quote

Hi,

At the bottom of the page, add this code:

Code:
$_cal_form = new _cal_form();

$_cal_form->print_header();
$_cal_form->print_hidden("eid", $_REQUEST['eid']);
$_cal_form->print_hidden("instance", $_REQUEST['inst']);

echo($_cal_form->submit("event_action", _TELL_A_FRIEND_));

$_cal_form->print_footer();


This will give you the button. In place of the include() line, add this:

Code:

if($_REQUEST['event_action'] == _TELL_A_FRIEND_) {
   include(_CAL_BASE_PATH_."include/event_email.php");
   return;
}
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Web site integration All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
© 2005 eXtrovert software unless otherwise noted. All rights reserved.
Portions © 2004 Ben Brown. All rights reserved.
Trademarks are property of their respective owners.