WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: AmR iCal Events List] link events (5 posts)

  1. Shelley Keith
    Member
    Posted 5 years ago #

    I'm trying to find a way to customize the link generated for each event title. Right now it simply links to #. Does anyone know where in the code that specific call is found?

    I'm considering a hardcoded link to my calendar page since refreshing the existing page isn't particularly user friendly.

  2. anmari
    Member
    Posted 5 years ago #

    The event title link will point to the URL of the event if one is provided in the ics file. If it is giving # means that there is no event URL specified. I left it generating the href code as it was a way for the widget (or any shortened version) of the calendar to provide detailed information without using too much space - the event description is provided as the link/href title text. In most browsers it will show up when you hover over the summary (event title) line.

    I'm open to suggestions here, but not keen to lose the detailed info on hover - perhaps we could link to ics file if no event URL?

  3. Shelley Keith
    Member
    Posted 5 years ago #

    Ok, I found a way to alter this in the code. I'd love to see someone make the event URL a variable or something.

    You can see below where I commented out the original code and replaced it with my hardcoded URL (/calendar) in amr-ical-events-list.php

    function amr_derive_summary (&$e) {
    /* If there is a event url, use that as href, else use icsurl, use description as title */
    //	$e['SUMMARY'] = htmlentities(amr_just_flatten_array ($e['SUMMARY'] ));
    //	return('<a href="'
    //	.($e['URL']?(amr_just_flatten_array($e['URL'])):"").'" title="'
    //	.($e['DESCRIPTION']?(str_replace( '\n', '  ', (htmlentities(amr_just_flatten_array($e['DESCRIPTION']))))):"").'">'
    //	.$e['SUMMARY']
    //	.'</a>');
    		$e['SUMMARY'] = htmlentities(amr_just_flatten_array ($e['SUMMARY'] ));
    		return('<a href="/calendar" title="'
    		.($e['DESCRIPTION']?(str_replace( '\n', '  ', (htmlentities(amr_just_flatten_array($e['DESCRIPTION']))))):"").'">'
    		.$e['SUMMARY']
    	.'</a>');
    }
  4. anmari
    Member
    Posted 5 years ago #

    Hi there,
    yes - right place, however version 2.3.6 just uploaded, addresses this.

    You can now choose to have a default url for events that don't have a URL.

    If no URL and not the widget listtype, then NO link will be generated.
    If you still want the link, you can enter a dummy bookmark URL.
    Suitable cursor styling added where necessary (default css only, not hardcoded)

    See more detail in the readme or "other notes".

  5. 1saucygirl
    Member
    Posted 5 years ago #

    Thanks! I was interested in this issue, too.

Topic Closed

This topic has been closed to new replies.

About this Topic