Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: EventLink plugin move location

EventLink plugin move location 13 years 6 months ago #14053

  • ameridane
  • ameridane's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 34
  • Thank you received: 0
I'm looking to move the display of the "Register Now" button/text from the bottom of the content to the top (in the JEvents event). I've tried hacking the plugin code and changing the onPrepareContent call to onAfterDisplayTitle and various other tweaks, but nothing seems to accomplish what I'm after.

I know others have asked for the position feature to be added in future versions, but is there any chance you could give a quick guide to how we might alter the plugin code to accomplish the goal of moving the link to the top of content?

Please Log in or Create an account to join the conversation.

EventLink plugin move location 13 years 6 months ago #14068

  • ameridane
  • ameridane's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 34
  • Thank you received: 0
Just to clarify (and bump this a bit): I know I can manually place the {dtregister} tag in the body of the JEvents entry, but I'm specifically looking to move the placement of the links automatically generated by the plugin.

Please Log in or Create an account to join the conversation.

EventLink plugin move location 13 years 6 months ago #14074

  • dthadmin
  • dthadmin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 5470
  • Thank you received: 3
You can modify the JEvents page to address this (based on JEvents version 1.5.5):

/components/com_jevents/views/[template]/icalevent/tmpl/detail_body.php

[template] should be replace with whatever template you are using... default, geraint, ext, etc...

Towards the bottom of the file you'll find:
$results = $dispatcher->trigger( 'onAfterDisplayContent', array( &$row, &$params, $page ) );
            echo trim( implode( "\n", $results ) );

Comment out these lines... copy (without comments) and move them up a bit where you see...
<td colspan="4"><?php 
echo $row->content(); ?></td>

Replace this with:
<td colspan="4"><?php 
				$results = $dispatcher->trigger( 'onAfterDisplayContent', array( &$row, &$params, $page ) );
	            echo trim( implode( "\n", $results ) );
echo $row->content(); ?></td>

This change will get the EventLink plugin buttons displaying above the event details, but under info like the hits counter and such.

Please Log in or Create an account to join the conversation.

EventLink plugin move location 13 years 5 months ago #14081

  • ameridane
  • ameridane's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 34
  • Thank you received: 0
brilliant, thx so much for the response. appreciate it.

Please Log in or Create an account to join the conversation.

EventLink plugin move location 13 years 5 months ago #14085

  • ameridane
  • ameridane's Avatar Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 34
  • Thank you received: 0
Just a follow up for others looking at this thread: the solution does not work with JEvents 2.0.0, at least not in a situation like mine where I'm using a custom layout set up with JEvents' control panel.

Unless there's a way of injecting the dynamic plugin call in that custom layout, the changes outlined above will *not* work. Removing the plugin call from the bottom of detail_body.php does work, but dropping in the code higher up in code does not take.

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Time to create page: 0.116 seconds