Support

Home Forums Event Espresso Premium Alternate registration page – open in new tab

Alternate registration page – open in new tab

Posted: August 28, 2013 at 5:32 am

Viewing 8 reply threads


geektastic

August 28, 2013 at 5:32 am

Hi,

I want the alternate registration page on the calendar to open a new tab when clicked. I thought this was the solution but the pastebin is no longer available. Can you advise exactly how to do this please? Is it the event_list_display.php page?

https://eventespresso.com/topic/alternative-registration-page/


Josh

  • Support Staff

August 28, 2013 at 12:03 pm

The other solution was for the event_list_display.php template. With the calendar it will likely be a bit cleaner to add a bit of jQuery to the manipulate the links within the calendar div to accomplish what you’re looking for.

http://stackoverflow.com/questions/6673473/jquery-go-to-url-with-target-blank


geektastic

August 28, 2013 at 12:12 pm

Hi Josh,

Thanks for your response. I’m sorry to ask, but can you tell me exactly where I should apply it? I’m unfamiliar with jQuery.

Thanks.


geektastic

August 28, 2013 at 5:26 pm

Hi,

Can someone help me? I’m happy to pay for a priority ticket. Help please! I need to deliver this website to client within next 6 hours.


Sidney Harrell

August 28, 2013 at 6:29 pm

Open up plugins/espresso-calendar/espresso-calendar.php and find line 710, which should read:

},

add in the following, so that it then reads:

},
eventClick: function(event) {
 if (event.url) {
 window.open(event.url);
  return false;
 }
},

That should take care of the link in the day itself. For the link in the tooltip, go up to line 642 and change it to:

text: event.description + '<div class="qtip_info">' + '<a class="reg_now" href="' + event.url + '" target="_blank">' + event.regButtonText + '</a>'  <?php if (isset($espresso_calendar['show_attendee_limit']) && $espresso_calendar['show_attendee_limit'] == true) {?>+' <span class="attendee_limit">' + event.attendee_limit + '</span>' <?php }?> <?php if ($espresso_calendar['show_time'] == true) {?> +(event.startTime != '' ? '<span class="time_cal_qtip">' + event.startTime + ' - ' + event.endTime + '</span>' : '')<?php }?> + '</div>',


Sidney Harrell

August 28, 2013 at 6:33 pm

Sorry, I can’t get that first code quote to render correctly in the forum software. It should be
},


geektastic

August 28, 2013 at 6:38 pm

Hi,

Thanks so much!!! That worked for the normal calendar. What should I do for the widget calendar? Should I do the same thing?


geektastic

August 28, 2013 at 6:43 pm

Also, can you show me how to make the same changes for the event list please? Thanks so much in advance!


Josh

  • Support Staff

August 29, 2013 at 8:40 am

If you look in event_list_display.php, which is the template that displays the event list, you’ll find where it builds the links near the bottom of the file.

In each case where it builds the registration url:

href="<?php echo $registration_url; ?>"

You can add something like this following the registration url:

<?php if ($externalURL != '') echo 'target="blank"'; ?>

Viewing 8 reply threads

The support post ‘Alternate registration page – open in new tab’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso