LuxCal Forum

The place for questions, suggestions and news about the LuxCal Event Calendar

User:   Password:   Remember Me?   
LuxCal Forum / General / Support / Probably a very dumb question regarding links
Posted:  10 May 2011 19:20
Hello everyone,

Firstly thank you for this calendar. I only just discovered it and I'm hoping to use on a small website. I do have one question though.

When a user makes a new event, they fill out various fields such as start date, start time etc etc . They also make a description for the event, and that description can contain a url link yes? My question is, is it possible to have that url link open in the same window rather than opening a new "_blank" window. I took a very quick look at the code but can't see where the link is formed.

So to recap, a user makes a new event and in the event description they put a link to an external page. How can I make that link open in the same window.

Any help would be appreciated. Thanks again.

Posted:  10 May 2011 19:59   Last Edited By: Roel B.
Hi acae,
When it concerns LuxCal, there are no "dumb" questions ;)
The full html link is composed when the event is created/edited.
Assuming you are using LuxCal 2.4.0, this is done on line 200 of the event.php file in the pages directory, which looks as follows:

    $des = preg_replace($link,'<a class="link" href="http://$1$2" target="blank">$3</a>',$des);

Remove the part ' target="blank"' (bold in the line above) and the links will open in the same window (replacing the calendar).
Posted:  10 May 2011 21:31   Last Edited By: acae
Hello Roel, thanks for the reply.

Ok that's odd, I did a text search through all the files for "target=" and it did return that result. I altered it to "target="_self" ... only I didn't make any new events with the new setting. Doh! :D  I'm either getting old or it's been a long day.

I appreciate the reply Roel thank you. Curently I'm just looking at LuxCal because I stumbled on it last night,  but it looks like a nice piece of coding. So thanks for releasing it. I'm more and more tempted to use it. If I do I hope you guys get some traffic from it, I'll be sure to drop a post on here too.