Monday, 19 February 2018
  31 Replies
  2.6K Visits
0
Votes
Undo
Hi experts,

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

Do I overlook something?

regards,
Berndi
Wednesday, 11 April 2018 14:22
·
#200039
0
Votes
Undo
Hi Berndi,

what are you wanting to change in that? It's quite a complex layout which making changes can have unforeseen issues like you did have...

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!

Wednesday, 11 April 2018 08:06
·
#200010
0
Votes
Undo
Hi experts,

I tried a little bit and now I ask me how to override the template loaded with

echo $this->loadTemplate("datetime");


copied edit_datetime.php to the override folder and renamed it to beach_datetime.php, but it won't be loadet.

it seems the loadTemplate-function still wants to load edit_datetime.php
Sunday, 18 March 2018 11:09
·
#199054
0
Votes
Undo
Many thanks, so far...

regards,
Berndi
Saturday, 17 March 2018 11:15
·
#199037
0
Votes
Undo
Ok I have done the basics and it's working. If you need any more help, do advise on exactly what.

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, 16 March 2018 06:46
·
#198969
0
Votes
Undo
Please setup the access and ftp details attached to this post so I can implement this for you.

Many thanks
Tony


Here it is.
I love your support
Monday, 12 March 2018 14:55
·
#198744
0
Votes
Undo
Please setup the access and ftp details attached to this post so I can implement this for you.

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!

Thursday, 08 March 2018 07:34
·
#198628
0
Votes
Undo
I'm afraid it's too heavy for me. :(

Do you feel like helping me?
Wednesday, 07 March 2018 17:15
·
#198609
0
Votes
Undo
IT's because there is quite a lot missing. The js calls for the forms etc. This is why you need to load the main edit file in and ideally use CSS/JS to simplify it where needed.

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!

Tuesday, 06 March 2018 06:41
·
#198522
0
Votes
Undo
I haven't removed anything.
I added

<div id="beachform">
<div class="row jevtitle">
<div class="span2">
<?php echo $this->replacetags[0]; ?>
</div>
<div class="span10">
<?php echo $this->replacetags[1]; ?>
</div>
</div>

<div class="row jeveditlocation" id="jeveditlocation">
<div class="span2">
<?php echo $this->replacetags[20]; ?>
</div>
<div class="span10">
<?php echo $this->replacetags[21]; ?>
<?php echo $this->replacetags[22]; ?>
</div>
</div>

<div class="jevstartdate" style="margin:10px 20px 0px 0px ;display:inline-block;">
<?php echo $this->replacetags[32]; ?>
<?php echo $this->replacetags[33]; ?>
</div>

<div class="jevstarttime" style="margin:10px 0px 0px 0px ;display:inline-block;">
<?php echo $this->replacetags[34]; ?>
<?php echo $this->replacetags[35]; ?>
</div>

<div class="row jev_description" id="jeveditor">
<div class="span2">
<?php echo $this->replacetags[18]; ?>
</div>
<div class="span10">
<?php echo $this->replacetags[19]; ?>
</div>
</div>
</div>


and hid the tabbed view with

<?php
echo '<div style="visibility:hidden; height:0px; width:0px">';


But so I can't submit the form.
Something's still wrong.
Monday, 05 March 2018 22:16
·
#198498
0
Votes
Undo
Ok so you have removed too much! Ideally you should not be removing fields but instead hiding them with CSS.

Why not.. just set JEvnets to edit in one page and then add the check and inject some CSS into the edit.php page before it includes the file? Since you are hiding them for UX/Input CSS hiding would be best.

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!

Monday, 05 March 2018 17:22
·
#198462
0
Votes
Undo
Well, I just follewed the instructions
Then copy the files with the same names from administrator/components/com_jevents/views/icalevent/tmpl/ to the folder templates/{YOUR TEMPLATE}/html/com_jevents/icalevent then modify these as you wish.


...and played around a little, but that doesn't work.


<?php
/**
* JEvents Component for Joomla! 3.x
*
* @version $Id: edit.php 3543 2012-04-20 08:17:42Z geraintedwards $
* @package JEvents
* @copyright Copyright (C) 2008-2017 GWE Systems Ltd
* @license GNU/GPLv2, see http://www.gnu.org/licenses/gpl-2.0.html
* @link http://www.jevents.net
*/
defined('_JEXEC') or die('Restricted access');

if (defined("EDITING_JEVENT"))
return;
define("EDITING_JEVENT", 1);

$params = JComponentHelper::getParams(JEV_COM_COMPONENT);
// get configuration object
$cfg = JEVConfig::getInstance();
$assoc = false && JLanguageAssociations::isEnabled() && JFactory::getApplication()->isAdmin() ;

// Load Bootstrap
JevHtmlBootstrap::framework();
JHtml::_('behavior.keepalive');
JHtml::_('behavior.calendar');
//JHtml::_('behavior.formvalidation');
if ($params->get("bootstrapchosen", 1))
{
JHtml::_('formbehavior.chosen', '#jevents select:not(.notchosen)');
// Use this as a basis for setting the primary category
/*
JHtml::_('jquery.ui', array("core","sortable"));
$script = <<< SCRIPT
window.setTimeout(function() {
jQuery("#catid").chosen().change(
function() {
if (jQuery("#catid_chzn li.search-choice")) {
jQuery("#catid_chzn li.search-choice").on('mousedown', function() {
alert(this);
return true;
});
}
}
);
}, 1000);
SCRIPT;
JFactory::getDocument()->addScriptDeclaration($script);
*/
}
if ($params->get("bootstrapcss", 1)==1)
{
// This version of bootstrap has maximum compatability with JEvents due to enhanced namespacing
JHTML::stylesheet("com_jevents/bootstrap.css", array(), true);
}
else if ($params->get("bootstrapcss", 1)==2)
{
JHtmlBootstrap::loadCss();
}

// use JRoute to preseve language selection
$action = JFactory::getApplication()->isAdmin() ? "index.php" : JRoute::_("index.php?option=" . JEV_COM_COMPONENT . "&Itemid=" . JEVHelper::getItemid());

$user = JFactory::getUser();
$accesslevels = $user->getAuthorisedViewLevels();
$accesslevels = "jeval".implode(" jeval", array_unique($accesslevels));

?>
<div id="jevents" class="beachform"

<?php
echo (!JFactory::getApplication()->isAdmin() && $params->get("darktemplate", 0)) ? "class='jeventsdark $accesslevels'" : "class='$accesslevels' ";
?> >
<form action="<?php echo $action; ?>" method="post" name="adminForm" enctype='multipart/form-data' id="adminForm" class="form-horizontal jevbootstrap beachform" >
<?php
ob_start();

// these are needed for front end admin
ob_start();
?>
<div class="jev_edit_event_notice">
<?php
if ($this->editCopy)
{
$repeatStyle = "";
echo "<h3>" . JText::_('YOU_ARE_EDITING_A_COPY_ON_AN_ICAL_EVENT') . "</h3>";
}
else if ($this->repeatId == 0)
{
$repeatStyle = "";
// Don't show warning for new events
if ($this->ev_id > 0)
{
if ($this->row->_freq === "none"){
echo JText::_('YOU_ARE_EDITING_AN_ICAL_EVENT_WITH_NO_REPEATS');
}
else {
echo JText::_('YOU_ARE_EDITING_AN_ICAL_EVENT');
}
}
}
else
{
$repeatStyle = "style='display:none;'";
?>
<h3><?php echo JText::_('YOU_ARE_EDITING_AN_ICAL_REPEAT'); ?></h3>
<input type="hidden" name="cid[]" value="<?php echo $this->rp_id; ?>" />
<?php
}
?>
</div>
<?php

if ( $params->get("checkconflicts", 0))
{
?>
<div id='jevoverlapwarning'>
<div><?php echo JText::_("JEV_OVERLAPPING_EVENTS_WARNING"); ?></div>
<?php
// event deletors get the right to override this
if (JEVHelper::isEventDeletor(true) && JText::_("JEV_OVERLAPPING_EVENTS_OVERRIDE")!= "JEV_OVERLAPPING_EVENTS_OVERRIDE"){
?>
<div>
<strong>
<label><?php echo JText::_("JEV_OVERLAPPING_EVENTS_OVERRIDE"); ?>
<!-- not checked by default !!! //-->
<input type="checkbox" name="overlapoverride" value="1" />
</label>
</strong>
</div>
<?php
}
?>
<div id="jevoverlaps"></div>
</div>
<?php
}

$native = true;
if ($this->row->icsid() > 0)
{
$thisCal = $this->dataModel->queryModel->getIcalByIcsid($this->row->icsid());
if (isset($thisCal) && $thisCal->icaltype == 0)
{
// note that icaltype = 0 for imported from URL, 1 for imported from file, 2 for created natively
echo JText::_("JEV_IMPORT_WARNING");
$native = false;
}
else if (isset($thisCal) && $thisCal->icaltype == 1)
{
// note that icaltype = 0 for imported from URL, 1 for imported from file, 2 for created natively
echo JText::_("JEV_IMPORT_WARNING2");
$native = false;
}
}


//var_dump($this->row);

?>

<div id="beachform">
<div class="row jevtitle">
<div class="span2">
<?php echo $this->replacetags[0]; ?>
</div>
<div class="span10">
<?php echo $this->replacetags[1]; ?>
</div>
</div>

<div class="row jeveditlocation" id="jeveditlocation">
<div class="span2">
<?php echo $this->replacetags[20]; ?>
</div>
<div class="span10">
<?php echo $this->replacetags[21]; ?>
<?php echo $this->replacetags[22]; ?>
</div>
</div>

<div class="jevstartdate" style="margin:10px 20px 0px 0px ;display:inline-block;">
<?php echo $this->replacetags[32]; ?>
<?php echo $this->replacetags[33]; ?>
</div>

<div class="jevstarttime" style="margin:10px 0px 0px 0px ;display:inline-block;">
<?php echo $this->replacetags[34]; ?>
<?php echo $this->replacetags[35]; ?>
</div>

<div class="row jev_description" id="jeveditor">
<div class="span2">
<?php echo $this->replacetags[18]; ?>
</div>
<div class="span10">
<?php echo $this->replacetags[19]; ?>
</div>
</div>
</div>

<?php
// echo '<div style="visibility:hidden; height:0px; width:0px">';
$this->searchtags[] = "{{MESSAGE}}";
$output = ob_get_clean();
$this->replacetags[] = $output;
echo $output;
$this->blanktags[] = "";

ob_start();
if (isset($this->row->_uid))
{
?>
<input type="hidden" name="uid" value="<?php echo $this->row->_uid; ?>" />
<?php
}

// need rp_id for front end editing cancel to work note that evid is the repeat id for viewing detail
// I need $year,$month,$day So that I can return to an appropriate date after saving an event (the repetition ids have all changed so I can't go back there!!)
list($year, $month, $day) = JEVHelper::getYMD();
?>
<input type="hidden" name="jevtype" value="icaldb" />
<input type="hidden" name="boxchecked" value="0" />
<input type="hidden" name="updaterepeats" value="0"/>
<input type="hidden" name="task" value="<?php echo JRequest::getCmd("task", "icalevent.edit"); ?>" />
<input type="hidden" name="option" value="<?php echo JEV_COM_COMPONENT; ?>" />
<input type="hidden" name="rp_id" value="<?php echo isset($this->rp_id) ? $this->rp_id : -1; ?>" />
<input type="hidden" name="year" value="<?php echo $year; ?>" />
<input type="hidden" name="month" value="<?php echo $month; ?>" />
<input type="hidden" name="day" value="<?php echo $day; ?>" />
<input type="hidden" name="evid" id="evid" value="<?php echo $this->ev_id; ?>" />
<input type="hidden" name="valid_dates" id="valid_dates" value="1" />
<?php if (!JFactory::getApplication()->isAdmin()) { ?>
<input type="hidden" name="Itemid" id="Itemid" value="<?php echo JEVHelper::getItemid();?>" />
<?php } ?>
<?php
var_dump($this->editCopy);
if ($this->editCopy)
{
?>
<input type="hidden" name="old_evid" id="old_evid" value="<?php echo $this->old_ev_id; ?>" />
<?php
}
?>
<script type="text/javascript" >
<?php
if (!empty($this->requiredtags))
{
foreach ($this->requiredtags as $tag)
{
echo "JevStdRequiredFields.fields.push({'name':'".$tag['id']."', 'default' :'".$tag['default_value']."' ,'reqmsg':'".$tag['alert_message']."'});\n";
}
}
?>

Joomla.submitbutton = function(pressbutton) {
if (pressbutton.substr(0, 6) == 'cancel' || !(pressbutton == 'icalevent.save' || pressbutton == 'icalrepeat.save' || pressbutton == 'icalevent.savenew' || pressbutton == 'icalrepeat.savenew' || pressbutton == 'icalevent.apply' || pressbutton == 'icalrepeat.apply')) {
if (document.adminForm['catid']) {
// restore catid to input value
document.adminForm['catid'].value = 0;
document.adminForm['catid'].disabled = true;
}
submitform(pressbutton);
return;
}
var form = document.adminForm;
var editorElement = jevjq('#jevcontent');
if (editorElement.length)
{
<?php
$editorcontent = $this->editor->save('jevcontent');
echo $editorcontent."\n";
// Tiny MCE has changed what onSave method does so we need to use onGetContent
$getContent = $this->editor->getContent('jevcontent');
if ($getContent){
?>
// tinyMCE chooses a random editor so we have to specify the one we want
if (typeof tinyMCE != 'undefined'){
try {
tinyMCE.EditorManager.setActive(tinyMCE.get("jevcontent"));
}
catch (e) {
}
}
<?php
echo "var getContent =".$getContent."\n";
?>
try {
jevjq('#jevcontent').html(getContent);
}
catch (e) {
}
<?php
}
?>
}
try {
if (!JevStdRequiredFields.verify(document.adminForm)){
return;
}
if (!JevrRequiredFields.verify(document.adminForm)) {
return;
}
}
catch (e) {
var x = e;
}
// do field validation
if (form.catid && form.catid.value == 0 && form.catid.options && form.catid.options.length) {
alert('<?php echo JText::_('JEV_SELECT_CATEGORY', true); ?>');
}
else if (form.ics_id.value == "0") {
alert("<?php echo html_entity_decode(JText::_('JEV_MISSING_ICAL_SELECTION', true)); ?>");
}
else if (form.valid_dates.value == "0") {
alert("<?php echo JText::_("JEV_INVALID_DATES", true); ?>");
}
else {

if (editorElement.length)
{
<?php
// in case editor is toggled off - needed for TinyMCE
echo $this->editor->save('jevcontent');
?>
}
<?php
// Do we have to check for conflicting events i.e. overlapping times etc. BUT ONLY FOR EVENTS INITIALLY
$params = JComponentHelper::getParams(JEV_COM_COMPONENT);
if ( $params->get("checkconflicts", 0) )
{
$checkURL = JURI::root() . "components/com_jevents/libraries/checkconflict.php";
$urlitemid = JEVHelper::getItemid()>0 ? "&Itemid=".JEVHelper::getItemid() : "";
$ttitemid = JEVHelper::getItemid()>0 ? "&ttItemid=".JEVHelper::getItemid() : "";
$checkURL = JRoute::_("index.php?option=com_jevents&ttoption=com_jevents&typeaheadtask=gwejson&file=checkconflict&token=". JSession::getFormToken().$urlitemid.$ttitemid, false);
?>
// reformat start and end dates to Y-m-d format
reformatStartEndDates();
checkConflict('<?php echo $checkURL; ?>', pressbutton, '<?php echo JSession::getFormToken(); ?>', '<?php echo JFactory::getApplication()->isAdmin() ? 'administrator' : 'site'; ?>', <?php echo $this->repeatId; ?>;);
<?php
}
else
{
?>
// reformat start and end dates to Y-m-d format
reformatStartEndDates();
submit2(pressbutton);
<?php
}
?>
}
}

function submit2(pressbutton) {
// sets the date for the page after save
resetYMD();
submitform(pressbutton);
}
//-->
</script>

<?php
$this->searchtags[] = "{{HIDDENINFO}}";
$output = ob_get_clean();
$this->replacetags[] = $output;
echo $output;
$this->blanktags[] = "";
?>


<?php
$output = ob_get_clean();
if (!$this->loadEditFromTemplate('icalevent.edit_page', $this->row, 0, $this->searchtags, $this->replacetags, $this->blanktags))
{
echo $output;
} // if (!$this->loadedFromTemplate('icalevent.edit_page', $this->row, 0)){
?>

</form>
</div>
<?php
$app = JFactory::getApplication();
if ($app->isSite()) {
if ($params->get('com_edit_toolbar', 0) == 1 || $params->get('com_edit_toolbar', 0) == 2 ) {
//Load the toolbar at the bottom!
$bar = JToolBar::getInstance('toolbar');
$barhtml = $bar->render();
echo $barhtml;
}
}


I'm still not able to kill the tabbed view, except of hiding, but the formfields are without functionality.

Am I to stupid?
Monday, 05 March 2018 09:20
·
#198374
0
Votes
Undo
How are you trying to set them?

Can you provide your simple custom override?

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!

Wednesday, 28 February 2018 07:29
·
#198140
0
Votes
Undo
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. :-(
Tuesday, 27 February 2018 15:28
·
#198078
0
Votes
Undo
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;

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!

Sunday, 25 February 2018 03:04
·
#197985
0
Votes
Undo
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
Thursday, 22 February 2018 19:23
·
#197907
0
Votes
Undo
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 15:07
·
#197893
0
Votes
Undo
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

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!

Thursday, 22 February 2018 12:27
·
#197890
0
Votes
Undo
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:18
·
#197888
0
Votes
Undo
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

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!

Thursday, 22 February 2018 06:23
·
#197881
0
Votes
Undo
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.
  • Page :
  • 1
  • 2
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.