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
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fpontotoc.today%2Fhelp.jpg&hash=d56f8cac8806473d4ce9d9441b1f6617458facd4)
3. just a photo of the events posting inside a new tab
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fpontotoc.today%2Fhelp2.jpg&hash=51ce245153ac61410200ba6ce2a0f2a16a7e3a0e)
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! :)