By Berndi on Monday, 19 February 2018
Replies 31
Likes 0
Views 2.6K
Votes 0
Hi experts,

I wonder why I can't create different icalevent.edit_pages for different categories.

Do I overlook something?

regards,
Berndi
Hello Berndi,

No you didn't. But the issue is more complicated, because you don't know what category the edit page is until you load the event edit page which has the category selector to select the category...

Many thanks
Tony
·
Monday, 19 February 2018 13:29
·
0 Likes
·
0 Votes
·
0 Comments
·
Aaaargh!

How can I solve this problem.
I just need it for one category.

regards,
Berndi
·
Monday, 19 February 2018 13:46
·
0 Likes
·
0 Votes
·
0 Comments
·
You could have a page class and create a menu item for this 1 category and style it with CSS?
·
Monday, 19 February 2018 21:05
·
0 Likes
·
0 Votes
·
0 Comments
·
Well, that sounds great, but I haven't understood yet how it works with jevents.
Will it be possible too, to create an alternative adminpanel where I can call this menuitem?
·
Tuesday, 20 February 2018 07:36
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Berndi,

If you create a JEvents Event Edit Page Menu item, under page display I think it is you can set a Page class. Then you can use some custom CSS to re-style it.

But you haven't said exactly what you want to do apart from edit it?

Many thanks
Tony
·
Tuesday, 20 February 2018 14:20
·
0 Likes
·
0 Votes
·
0 Comments
·
I just want to have some parameters set by default without the possibility to edit them.
And just four editable fields on one simple formular

title, startdate an -time and description
all the other parameters should set to defaultvalues without showing them.

regards,
Berndi
·
Tuesday, 20 February 2018 17:32
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Berndi,

Ahh ok so that is not possible with some CSS that's a bit more complicated.

Are you familiar with php? You could create a template overrides?

Many thanks
Tony
·
Wednesday, 21 February 2018 09:02
·
0 Likes
·
0 Votes
·
0 Comments
·
Well yes,
I allready created an Override for the calendarvie nur can't find the icalevent.edit to created an override.

It seems that it is a little more tricky

regards,
Berndi
·
Wednesday, 21 February 2018 12:06
·
0 Likes
·
0 Votes
·
0 Comments
·
Ok so see:

https://www.jevents.net/docs/jevents/item/template-overrides-for-event-editing

You will probably need to get the filters passed in by the menu item for the category, if it exists Run X else Run Y.

Many thanks
Tony
·
Wednesday, 21 February 2018 12:47
·
0 Likes
·
0 Votes
·
0 Comments
·
How can I create a own menuitem for this override?
·
Wednesday, 21 February 2018 13:32
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Berndi,

The same way you create any menu item? Joomla -> Menus -> New Menu Item -> Select JEvents Create

Many thanks
Tony
·
Wednesday, 21 February 2018 21:58
·
0 Likes
·
0 Votes
·
0 Comments
·
Well, I know that.

What I mean is, how kan I make the override appear in the selection?
To do this with standard-joomla-overrides (for example com_content/form) I have a XML-file to let the new menuitem be shown in the selectionlist.

How can I do this with com_jevents?
There are no XML-files.
·
Thursday, 22 February 2018 06:23
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Berndi,

You can't which is why I said about fetching the menu item id and using this as a condition. Then you can have sub layout say original and simplified which depending on wether the itemid matches it loads simplified or original if you follow?

Many thanks
Tony
·
Thursday, 22 February 2018 12:18
·
0 Likes
·
0 Votes
·
0 Comments
·
can't follow.

I can't call the sublayout of the edit-page.

There must be a possibility to call it by a menu-item with a new entry in the menu-item-manager.

For exmple:
I created an alternative layout for article-editing at com_content by copying and renamig the template-file of com_content/views/form/ to the template-folder with a specific name.

edit.php --> something.php
edit.xml --> something.xml

Then doing some changes at the XML-file.


...and so I got a new selection for content-edit with my special layout in menu-item-manager.


All I want to do ist the same with the JEvents icalevent.edit-page

But don't know how to do that.
·
Thursday, 22 February 2018 12:27
·
0 Likes
·
0 Votes
·
0 Comments
·
This is ideally why you need a developer, this is intermediate PHP.

If you open up edit.php
You can add in a query:


$app = JFactory::getApplication();
$menuId = $app->getMenu()->getActive()->id;


Then you can do:


if ($menuId == 229) {
include_once('mylayout.php');
} else {
include_once('mydefaultlayout.php');
}


Many thanks
Tony
·
Thursday, 22 February 2018 15:07
·
0 Likes
·
0 Votes
·
0 Comments
·
Okay.
So far, so good.

Now I try to writ emy own editpage.
The problem is, that the original page builds the form with the content of $this->replacetags

$output = ob_get_clean();
$this->replacetags[] = $output;
echo $output;


How can I modify this?
I just need a few of them.
·
Thursday, 22 February 2018 19:23
·
0 Likes
·
0 Votes
·
0 Comments
·
I'm totally confused.

I can't edit the frontend form.
I can't set default values.

I did everything told in this article.


<?php
defined('_JEXEC') or die('Restricted access');

$app = JFactory::getApplication();
$menuId = $app->getMenu()->getActive()->id;

if (!isset($this->jevviewdone)){
$this->loadModules("jevpreeditevent");

if ($menuId == 1687) {
if ($this->row->title()==""){
$this->row->title("BlaBlaBlubber");
$this->row->icsid(3);
$this->row->catid(119);
$this->row->noendtime(1);
$this->row->location("Jahnturnhalle (JTH)");
}
var_dump($this->row);
$this->setupEditForm();
include_once('beach.php');
} else {
include_once(JEV_ADMINPATH."/views/icalevent/tmpl/".basename(__FILE__));
}
/*
$bar = JToolBar::getInstance('toolbar');
$barhtml = $bar->render();
$barhtml = str_replace('id="','id="x', $barhtml);
echo $barhtml;
*/
$this->jevviewdone = true;

$this->loadModules("jevposteditevent");

}


The call of beach.php works, but I don't have any idea to customize the form.
Everything I do results in the same - god dammned - tabbed form.

The defaults doesn't work either except of the noendtime

please help
·
Sunday, 25 February 2018 03:04
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello,

Did you include the raw file from:

include_once(JEV_ADMINPATH."/views/icalevent/tmpl/".basename(__FILE__));

Is beach.php definitely loading?

change:

$menuId = $app->getMenu()->getActive()->id;

to:

$menuId = (int) $app->getMenu()->getActive()->id;
·
Tuesday, 27 February 2018 15:28
·
0 Likes
·
0 Votes
·
0 Comments
·
Yes, I included the edit.php from the right path and renamed it to beach.php
I made some changes to ensure that it loads.
All the changes I made are loaded till line 153.
Everything I change after this line will not be considered.

now to the defaults...
to set the defaults of row->location it is necessary to use the location id and not the name.
to set the default value of "row->title" doesn't work.
to set the default value of "row->catid" isn't becessary anymore but doesn't work either.
to set the default valoe of "row->noendtime" works perfect.

But how can I get rid of this tabbed view?

I just want to have a simple form with
title
loaction
startdate and time
and the description

everything else should be hidden with default values.

I don't get it. :-(
·
Wednesday, 28 February 2018 07:29
·
0 Likes
·
0 Votes
·
0 Comments
·
How are you trying to set them?

Can you provide your simple custom override?

Many thanks
Tony
·
Monday, 05 March 2018 09:20
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post