Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Aiheen aloitti: darknovember - huhtikuu 27, 2014, 06:04:07 IP

Otsikko: have calender events open in a new tab or window when clicked on
Kirjoitti: darknovember - huhtikuu 27, 2014, 06:04:07 IP
just wondering how i would go about getting this done, im thinking its in the calender.templet.php file but as to what to change im unsure  :(
Otsikko: Re: have calender events open in a new tab or window when clicked on
Kirjoitti: shadow82x - huhtikuu 28, 2014, 12:01:31 IP
What is it you want? o.0
Otsikko: Re: have calender events open in a new tab or window when clicked on
Kirjoitti: darknovember - huhtikuu 28, 2014, 12:23:05 IP
when someone clicks on an event , it will open the events post in a new window or a new tab, it doesnt matter what one.
rather then in the same window

~update~
steps on what i want it to do
1. when a user clicks on the event
2. it will open a new tab to the events posting

3. just a photo of the events posting inside a new tab

Otsikko: Re: have calender events open in a new tab or window when clicked on
Kirjoitti: shadow82x - huhtikuu 28, 2014, 12:38:47 IP
Gotcha. The file you'll actually want to edit is ../Sources/Subs-Calendar.php

Koodi (Find) [Valitse]
'link' => $row['id_board'] == 0 ? $row['title'] : '<a href="' . $scripturl . '?topic=' . $row['id_topic'] . '.0">' . $row['title'] . '</a>',
Koodi (Replace) [Valitse]
'link' => $row['id_board'] == 0 ? $row['title'] : '<a href="' . $scripturl . '?topic=' . $row['id_topic'] . '.0" target="_blank">' . $row['title'] . '</a>',

Hope that helps :)
Otsikko: Re: have calender events open in a new tab or window when clicked on
Kirjoitti: darknovember - huhtikuu 28, 2014, 02:21:24 IP
yup , thank you so much :)
Otsikko: Re: have calender events open in a new tab or window when clicked on
Kirjoitti: shadow82x - huhtikuu 28, 2014, 02:24:32 IP
Glad it worked :)
Otsikko: Re: have calender events open in a new tab or window when clicked on
Kirjoitti: kat - huhtikuu 28, 2014, 02:34:55 IP
Nicely done, Blabs! :)