Thursday, 09 March 2017
  10 Replies
  1.3K Visits
0
Votes
Undo
Hi experts,

I'd like to put some php code to my icalevent.detail_body

...but I configured it with the layout-editor

where do I find the php file?

regards,
Berndi
Thursday, 09 March 2017 19:20
·
#184977
0
Votes
Undo
Okay okay... I made a template override of the icalevent/detail_body.php

The only thing I am looking for is the code snippet for the jcomment_plugin.
Thursday, 09 March 2017 21:35
·
#184983
0
Votes
Undo
Hello,

What PHP code exactly? You could use a plugin to insert PHP.

You can use:https://www.jevents.net/products-new/addons/free-addons/item/jcomments-plugin-2

Then the code snippet is shown in the layout editor.

Many thanks
Tony

JEvents Club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits. Join the JEvents club today!Join the JEvents club today!

Friday, 10 March 2017 01:59
·
#184990
0
Votes
Undo
I dont think that I simple can put {{JComments:JEV_JCOMMENTS_ENABLE}} into my template override...

It isn't that easy.

This is the code I wrote to the icaevent/detail_body.php (override)

$user =& JFactory::getUser();
$user_ag = $user->getAuthorisedGroups();

$row=$this->data['row'];
$catid = $row->_catid;

$show_jcomments = (in_array('15', $user_ag) AND ($catid == "113" OR $catid == "119")) ? true : false;
$show_jcomments = (in_array('7', $user_ag) OR in_array('8', $user_ag)) ? true : false;

echo ($show_jcomments == true) ? "<div class='tgs_row jcomments'>" . $jcomments_code . "</div>" : "";


...and I'm lookicg for $jcomments_code.

regards, Berndi
Friday, 10 March 2017 07:07
·
#184996
0
Votes
Undo
Hello,

So is the template override only used to have conditional php code to show jcomments?

Many thanks
Tony

JEvents Club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits. Join the JEvents club today!Join the JEvents club today!

Friday, 10 March 2017 08:56
·
#185013
0
Votes
Undo
Alternative approach.
1. Set the jcomments plugin access level to only allow the relevant groups
2. Use the JEvents layout editor to create category specific layouts to include the JComments code.

No need for any coding or template overrides.

JEvents Club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits. Join the JEvents club today!

Friday, 10 March 2017 12:12
·
#185043
0
Votes
Undo
The Problem is, that I want to handle the rights to comment events in a special way...

For example:
Usergroup 1 is able to comment category 1 and 2
Usergroup 2 is able to comment category 3 and 4
Usergroup 3 is able to comment all of them

...and so on ...

When I set the jcomments plugin access level to only allow one relevant group, they are able to comment all categories, where the JComments box appears.
Monday, 13 March 2017 09:27
·
#185097
0
Votes
Undo
Are these comments to be viewed by other users? We do have a special field type (user notes) in the custom fields addon that MAY be able to do what you need. But its not a full commenting system, more of a way for authorised users to add notes to an event.

JEvents Club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits. Join the JEvents club today!

Monday, 13 March 2017 11:08
·
#185121
0
Votes
Undo
Comments from Usergroup1 should be seen only by Usergroup 1, ...

and so on
Monday, 13 March 2017 12:19
·
#185143
0
Votes
Undo
just created a notes field but it won't appear in the custom fields list at the layout editor
Monday, 13 March 2017 14:41
·
#185158
0
Votes
Undo
The notes field is output during the event creation process - what you need is the updatable field which is visible to event editors and can be updated by them when viewing the event.

I could extend this to allow certain usergroups to update the field content.

JEvents Club members can get priority forum support at the Support Forum. As well as access to a variety of custom JEvents addons and benefits. Join the JEvents club today!

  • Page :
  • 1
There are no replies made for this post yet.

Members Area

Show your support

Unlike many Joomla calendars we do not charge to download JEvents - please show your support for this project by becoming a member of the JEvents Club Club members get access to early releases, exclusive member support forums, and Silver and Gold members can use many exciting JEvents addons

Your membership will ensure that JEvents continues to be the best events calendar for Joomla.