Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter miguelsaddress

    (@miguelsaddress)

    By the way:

    I did hack it already, i just wanted to know if that can be achieved via configuration…

    Ffgrf

    (@grouchyturtle)

    Have you figured out a way to disable click entirely?

    Thread Starter miguelsaddress

    (@miguelsaddress)

    Hello,

    I just had to modify a couple of lines… but no option provided.

    inc/show-event.php – lines 134-145 aprox… adding the else, to give value to the link just in case…

    if (!empty($event->link)) {
    	if ($adjust < 1) {
    		$adjust = 1;
    	}
    	$out .= str_repeat("<br>", $adjust);
    	$link  = "<a href='{$event->link}' class='link round5 cat{$event->category_id}'>";
    	$link .= __('Ver en Rolling Stone', AEC_NAME);
    	$link .= "</a>\n";
    	$out .= "{$link}";
    }else{
    	$event->link = "";
    }

    js/jquery.init_show_calendar.js – line 185 aprox. If i have a link, i redirect to it, otherwise, event dialog

    eventClick: function (e) {
    
    	$.post(custom.ajaxurl, { action: 'get_event', 'id': e.id, 'start': toUnixDate(e.start), 'end': toUnixDate(e.end)}, function (data) {
    	if( data.link != "" ){
    		window.location = data.link;
    	}else{
    		eventDialog(e);
    	}
    });

    I hope it helps 🙂

    Miguel

    Hey Miguel,

    This almost seems to work for me. However, the data.link value returned is “undefined”, which also sends me to url.com/undefined. Do you have any idea on how to resolve that? (Unfortunately I can’t seem to fix it myself.)

    I’d like to know how you got your hack to work for you.

    I copied the exact code stated above here. I did change one thing though, which is the ending of it (because not doing so broke the script). (So that’s that last bit with “});” etc.)

    So here’s what I have now (with an extra alert):

    eventClick: function (e) {
      $.post(custom.ajaxurl, { action: 'get_event', 'id': e.id, 'start': toUnixDate(e.start), 'end': toUnixDate(e.end)}, function (data) {
      if(data.link != "") {
        alert(data.link);
        window.location = data.link;
      }
      else {
        eventDialog(e);
      }
    });
    }, eventRender: [...continues]

    Thread Starter miguelsaddress

    (@miguelsaddress)

    Hej!

    Did you add the php part?

    $event->link = "";

    I did not add anything else 🙁

    Yeah the else statement. See the code below. I know that works because the text on the event link has succesfully changed to “Meer informatie” (where you had “Ver en Rolling Stone”).

    if (!empty($event->link)) {
    		if ($adjust < 1) {
    			$adjust = 1;
    		}
    		$out .= str_repeat("<br>", $adjust);
    		$link  = "<a href='{$event->link}' class='link round5 cat{$event->category_id}'>";
    		$link .= __('Meer informatie', AEC_NAME);
    		$link .= "</a>\n";
    		$out .= "{$link}";
    	}else{
    		$event->link = "";
    	}

    Could you perhaps paste your JS code from eventClick: function (e) {[…] up to […] filter = function (active)?

    So that includes eventRender etcetera.

    Thread Starter miguelsaddress

    (@miguelsaddress)

    uff you are lucky! 😀

    i deleted the plugin but i could rescue it from the trash

    this is what i had

    https://www.dropbox.com/s/xj8ige7sy70o0ts/ajax-event-calendar-modified.zip

    in case it doesnt work… i cannot help anymore, sorry, because that is the code i had running

    try that plugin or check those files 😀

    Thanks a bunch, I guess I am yeah. Copying only those bits didn’t work, copying your original plug-in files entirely did though. It seems to work now. So again; thanks a bunch for sending it all over!

    Thread Starter miguelsaddress

    (@miguelsaddress)

    I am really glad I could help!

    Anyway, people who see this should know the plugin is not mine and I just uploaded it to help 🙂 (avoiding problems)

    They should always get the original code and try to fix it personally or talk to the creator 🙂

    You are welcome!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Prevent Event info dialog’ is closed to new replies.