Deprecated: Joomla\Input\Input implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in /homepages/13/d380392445/htdocs/Jlive/libraries/vendor/joomla/input/src/Input.php on line 41

Deprecated: Return type of Joomla\Input\Input::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /homepages/13/d380392445/htdocs/Jlive/libraries/vendor/joomla/input/src/Input.php on line 170
Resolved: issue by project - Macrotone Forum

Unknown Error 8192: KunenaControllerApplicationDisplay implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in libraries/kunena/controller/application/display.php on line 21


Unknown Error 8192: Automatic conversion of false to array is deprecated in libraries/kunena/route/route.php on line 437


Unknown Error 8192: ComponentKunenaControllerWidgetAnnouncementDisplay implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in components/com_kunena/controller/widget/announcement/display.php on line 18


Unknown Error 8192: ComponentKunenaControllerTopicItemDisplay implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in components/com_kunena/controller/topic/item/display.php on line 25


Unknown Error 8192: Automatic conversion of false to array is deprecated in libraries/kunena/forum/category/category.php on line 415


Unknown Error 8192: Automatic conversion of false to array is deprecated in libraries/kunena/bbcode/bbcode.php on line 107

Resolved: issue by project


Unknown Error 8192: ComponentKunenaControllerTopicItemActionsDisplay implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in components/com_kunena/controller/topic/item/actions/display.php on line 23


Unknown Error 8192: ComponentKunenaControllerTopicPollDisplay implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in components/com_kunena/controller/topic/poll/display.php on line 21


Unknown Error 8192: ComponentKunenaControllerTopicItemMessageDisplay implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in components/com_kunena/controller/topic/item/message/display.php on line 23

11 years 7 months ago - 11 years 7 months ago #1 by clovis802
Hello,

hello I would like to create a menu with a question by project.
So how can we eliminate the dropdown and have a project menu?
Thanks:)

Unknown Error 8192: ComponentKunenaControllerMessageItemActionsDisplay implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in components/com_kunena/controller/message/item/actions/display.php on line 25

The topic has been locked.
11 years 7 months ago #2 by geoffc
Replied by geoffc on topic Re: issue by project
I am not quite sure that I understand your question. Could I please ask you to expand upon what you would like to achieve?

It is possible already to only list issues for any one or more given projects, by using the menu options to select one or more projects, but I am not sure that that is what you mean.

Regards
Geoff
The topic has been locked.
11 years 7 months ago #3 by clovis802
Replied by clovis802 on topic Re: issue by project
Hi,

Oki, create the menu for example by choosing "Create An Issue" in the "issue detail legend" there are the "Project Id", in fact I do not want to leave the possibility of choice and still have several, am I understand?

The idea is to remove the dropdown "project id" and make several projects related to menus

Thanks :)
The topic has been locked.
11 years 7 months ago #4 by geoffc
Replied by geoffc on topic Re: issue by project
I think I understand.

Instead of having the drop down on the 'Create an Issue Form', you desire an option in the 'menu creation for the form', where you specify one or more projects for which they can create the issue. Only those projects choosen in the menu creation would be available for that specific 'create an issue' form.

This implies that you would create more than one menu item if you have more than one project for which you want users to raise an issue.

Also if there were more than one project choosen for a specific 'form' the user would still be able to choose which one.

I will have a look to see what I can do, if you could confirm my analysis.

Regards
Geoff
The topic has been locked.
11 years 7 months ago #5 by clovis802
Replied by clovis802 on topic Re: issue by project
Thank you for your patience my english is bad :)
Yes actually I want a menu by project and of course the questions go directly to the project concerned.
The topic has been locked.
11 years 7 months ago #6 by geoffc
Replied by geoffc on topic Re: issue by project
The following changes will achieve what you desire, however the topic is complicated if you desire the registered users to be able to edit their own issues. I will explain more after the code changes.

In the site end in the file: components/com_issuetracker/views/form/tmpl/edit.xml

Add the following before the last line. (/metadata) [IMPORTANT: Change the leading ! for a less than sign - this editor strips out the symbol preventing posting otherwise!]

!fields name="params">
!fieldset name="basic" addfieldpath="/administrator/components/com_issuetracker/models/fields">
!field name="projects"
type="issuetrackerproject"
section="com_issuetracker" default="0" multiple="multiple"
label="COM_ISSUETRACKER_FIELD_PROJECT_LIST_LABEL"
description="COM_ISSUETRACKER_FIELD_PROJECT_LIST_DESC"
required="true" />
!/fieldset>
!/fields>

In the back end replace the file administrator/components/com_issuetracker/models/fields/issuetrackerprojectfe.php with the following: [Again change the first character to a less than sign on the first line.]

!?php
/*
*
* @Version $Id: issuetrackerprojectfe.php 309 2012-09-20 10:31:49Z geoffc $
* @Package Joomla Issue Tracker
* @Subpackage com_issuetracker
* @Release 1.2.3
* @Copyright Copyright (C) 2011 - 2012 Macrotone Consulting Ltd. All rights reserved.
* @License GNU General Public License version 3 or later; see LICENSE.txt
* @Contact This email address is being protected from spambots. You need JavaScript enabled to view it.
* @Lastrevision $Date: 2012-09-20 11:31:49 +0100 (Mon, 20 Sep 2012) $
*
*/
defined('_JEXEC') or die('Restricted access');

if (! class_exists('IssueTrackerHelper')) {
require_once( JPATH_ADMINISTRATOR.DS.'components'.DS.'com_issuetracker'.DS.'helpers'.DS.'issuetracker.php');
}

class JFormFieldIssueTrackerProjectfe extends JFormField
{
protected $type = 'IssueTrackerProjectfe';

protected function getInput()
{

$user = JFactory::getUser();
if ( IssueTrackerHelper::isIssueAdmin($user->id) ) {
$isadmin = 1;
} else {
$isadmin = 0;
}

if ( $isadmin == 0 ) {
// Get the Menu parameters to determine which projects have been selected.
// Unless we are a Issue Administrator since we may be editing the issue.
$minput = JFactory::getApplication()->input;
$menuitemid = $minput->getInt( 'Itemid' ); // this returns the menu id number so weu can reference parameters
$menu = JSite::getMenu();
if ($menuitemid) {
$menuparams = $menu->getParams( $menuitemid );
$projects = $menuparams->get('projects');
}
}

$db = JFactory::getDBO();

// Build the list of projects. Cannot filter in the query since we need to expand out the full project name.
$query = 'SELECT a.project_name AS text, a.id AS value, a.parent_id as parentid';
$query .= ' FROM #__it_projects AS a';
$query .= ' WHERE a.state = 1 ';
$query .= ' ORDER BY a.ordering';
$db->setQuery( $query );
$data = $db->loadObjectList();

$catId = -1;
$required = ((string) $this->element == 'true') ? TRUE : FALSE;

$tree = array();
$text = '';
$tree = IssueTrackerHelper::ProjectTreeOption($data, $tree, 0, $text, $catId);

// Now filter out the rows we do not want.
if ( $isadmin == 0 && ! empty($projects) && $projects[0] != 0 )
$tree = $this->array_keep($tree, $projects);

if (count($tree) > 1)
array_unshift($tree, JHTML::_('select.option', '', '- '.JText::_('COM_ISSUETRACKER_SELECT_PROJECT').' -', 'value', 'text'));
return JHTML::_('select.genericlist', $tree, $this->name, 'class="inputbox"', 'value', 'text', $this->value);
}

/*
* Function to filter the project tree retaining only the projects we desire.
*/
function array_keep($array, $projects)
{
if ( empty($projects) || $projects[0] == 0 ) return $array;

$thisarray = array ();
foreach($array as $key) {
$k = $key->value;
foreach ( $projects as $item)
if ( $k == $item)
$thisarray[] = $key;
}
return $thisarray;
}
}
?>

The above will create the issue with the desired project associated.

Now the caveat. When a user is given the ability to edit their own issues, they are effectively using the same form, however the menu item is NOT neccessarily the same menu item they used to create the issue. Hence they would still be presented with the list of published projects to select from.
This ability is obviously required IF the person editing the issue is an 'issue administrator'.

IF you desire the registered users to be able to edit their raised issues AND you want to restrict them from being able to change the project we would need to add a lot more code.
If all registered users are not allowed to change the assigned issue project then we could make the form a display only item.
If however some we to be able to change the project and other couldn't then there would need to be an option on the user themselves. There is a request on the todo list to be able to restrict users to a specific subset of projects.

Regards
Geoff
The topic has been locked.
Time to create page: 0.144 seconds
Go To Top

Joomla! Debug Console

Session

Profile Information

Memory Usage

Database Queries