The Serendipity Handbook

You can now read the (german) handbook here: PDF - https://github.com/s9y/Book (LaTeX source).

Forum-Information

Before posting about errors, make sure that the answer cannot already be found in our FAQ or by searching this forum!
Posting is restricted to registered users (registering is free and simple!) due to recent spam attacks. When having trouble with this board, contact garvin(-at)s9y(-dot)org.

Board index Plugins my_calendar plugin with target="_blank"

Creating and modifying plugins.
ju
Regular
 
Posts: 50
Joined: Wed Oct 01, 2008 4:27 pm

Postby ju » Mon Dec 12, 2011 3:14 pm

I use the "My calendar" plugin (serendipity_event_mycalendar, serendipity_plugin_mycalendar) in my blog with a Bullet Proof template. And I would like to have all links in "My calendar" open a new page (i.e. target="_blank"). What would I have to change to achieve this?

//edited the typo in the subject
Last edited by ju on Tue Dec 13, 2011 9:07 am, edited 1 time in total.

User avatar
yellowled
Regular
 
Posts: 5541
Joined: Fri Jan 13, 2006 12:46 pm
Location: Eutin, Germany

Postby yellowled » Mon Dec 12, 2011 3:25 pm

ju wrote:And I would like to have all links in "My calendar" open a new page (i.e. target="_blank"). What would I have to change to achieve this?

target="_blank" is obsolete. Please consider letting your visitors choose how to open links.

YL

User avatar
garvinhicking
Core Developer
 
Posts: 29476
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany

Postby garvinhicking » Mon Dec 12, 2011 3:28 pm

Hi!

Let me start with: I don't really like target=blank. I believe the user should have control over where links open, not the website.

Having said that: The plugin is not templated, so you'd have to edit the PHP code and change the <a> tags accordingly.

Another option is to use Jquery like this:

Code: Select all
jQuery('.container_serendipity_plugin_mycalendar a').attr('target', 'blank');


(Untested, though)

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/

ju
Regular
 
Posts: 50
Joined: Wed Oct 01, 2008 4:27 pm

Postby ju » Mon Dec 12, 2011 4:09 pm

Let me clarify: some links from my calendar lead to other websites. This is confusing for the users, as they don't know why they don't see my blog any more. Doesn't happen to advanced users, because they know how to handle their browswers and mice, but normal users just click and get lost.

//ps: Thank you Garvin! I'll make a backup-copy and try to edit.

User avatar
onli
Regular
 
Posts: 1373
Joined: Tue Sep 09, 2008 10:04 pm

Postby onli » Mon Dec 12, 2011 7:54 pm

How do you come to that assumption? See http://www.useit.com/alertbox/990530.html, it's the other way around (according to usability-experts who tested this).

User avatar
yellowled
Regular
 
Posts: 5541
Joined: Fri Jan 13, 2006 12:46 pm
Location: Eutin, Germany

Postby yellowled » Mon Dec 12, 2011 9:50 pm

onli wrote:How do you come to that assumption? See http://www.useit.com/alertbox/990530.html, it's the other way around (according to usability-experts who tested this).

First of all (personal opinion), not everything Jacob Nielsen posts is automagically right. :)

Second, and yes, I am aware that this can be twisted and is kind of subjectiv, target is a relict from the web stone age which was originally intended to be used with frame(set)s. It was not actually intended to open new browser windows or tabs. The same functionality (if one wants to use it) can be achieved using JS.

Third, and again that's basically a personal opinion (but one a lot people share), I think the user should have control about what happens in the browser according to his individual settings, even if a minority of users could be confused by that behaviour.

(And fourth, it's friggin' annoying if a browser does not behave as expected, but that hardly counts as an argument. :mrgreen:)

YL

ju
Regular
 
Posts: 50
Joined: Wed Oct 01, 2008 4:27 pm

Postby ju » Tue Dec 13, 2011 9:41 am

onli wrote:How do you come to that assumption?

because they told me.

I remember that back in the days of Netscape 2.x or 3.x I was sometimes annoyed about websites opening new pages because the browsers tended to crash when more than a few windows were open. (And I also remember those javascript "jokes" that opened many new windows and crashed not only the browser but also the OS).

Today browsers have tabs and users can chose if they perfer new tabs or new windows.

The problem with the my_calendar plugin is special. When users click on links like www.example.com/archives/1234 or /categories/ they can read the article and continue reading the next article afterwords or navigate to another part of the website using the site's navigation. Users expect the same behaviour when the click on the items in "my calendar". Their expectation will be met if every item of "my calendar" links to an article within the archives but it will not be met, when the link leads to another site.

When I put links under my articles I always show where they lead to, so people are aware that they will see the New York Times or Google or whatever, when they click it. In "my calendar" they see the text but not the link. (Only few users look into the status bar.)

So, ideally, there would be different solutions for links within the same site and links to other sites, maybe even with an alert "If you click on this link you leave www.example.com. Please, use your browser's back button to return"



Return to Plugins

Who is online

Users browsing this forum: No registered users and 4 guests