Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Task Manager (Admin)


Recommended Posts

  • Replies 96
  • Created
  • Last Reply

Top Posters In This Topic

So can anyone tell me...

can we install this by just intalling the OLD sql - the new sql - and the modified files?

 

You can use the upgade. sql to make any changes to that database with the new files.

Link to comment
Share on other sites

Okay so I did not want to install all of 1174 so I have installed the bare bones to get this to run.

 

Minor things:

 

TABLE_HEADING_PROJECT_CUSTOMER is not defined in english/admin_tasks.php file

 

HEADING_TITLE and TEXT_DISPLAY_NUMBER_OF_MEMBERS are not defined for admin_tasks_report.php. It does not have a language file?

 

I also got Warning: Division by zero in /home/ozewocom/public_html/admin/admin_tasks_report.php on line 332 when I looked at the reports as I had no taks.

 

When I add a Project there appears to be a missing image for the IMAGE_NEXT.

Link to comment
Share on other sites

There is a problem with the Task Manager Box on the left in admin:

 

When I click the link "Projects Manager", I'm logged off of the admin, but if I click "Projects List" button in Task Manager it is ok. In fact, all links that need more than one parameter logged me off.

 

I've noted that the two links aren't the same:

 

Left box: .../admin/admin_tasks.php?projID=projects?osCAdminID=blahblah...

 

Button: .../admin/admin_tasks.php?projID=projects&osCAdminID=blahblah...

 

Note after "projID=projects", in the left box it is a "?" and with the button it is a "&".

 

I do not have similar problem in the admin. Is this problem concerning this contribution?

 

Thanks in advance!

 

Plascual

Edited by Plascual
Link to comment
Share on other sites

I m working on a new install text file , and also , to add all the missing langauge define, also mmoving all hard coded text in language define variable

 

i got some question before i zip all !

 

Question:

 

Q1.since we need to install adminsitrator , why not use the tep_administrator function int he boxe file ?

 

Request2. in the taks list, see to who the task has been attributed

 

Q2.in the boxes files

 

if ($selected_box == 'task_manager' || $menu_dhtml == true) {

 

seems to be used only for people using admin dhtml menu , like me !

MS2

Link to comment
Share on other sites

If this has to be installed with Admin with Access levels - seems like it would be better to use the new version of that 1359 - posted over a year ago.

 

Would this not work? I am getting SQL errors on sql upload.

Link to comment
Share on other sites

If this has to be installed with Admin with Access levels - seems like it would be better to use the new version of that 1359 - posted over a year ago.

 

Would this not work? I am getting SQL errors on sql upload.

 

The SQL error I was getting relates to inserting the test admin task.

I am not good enought to figure out which column doesn't match the value count at row 1 - but ommitted this line and sql uploaded fine.

 

INSERT INTO `admin_tasks` VALUES (1, 1, 1, 1, 2, 'Test Task', 'This is a Test Task To Ensure that your install went smoothly', '2006-04-04 15:59:10', '2006-04-04 16:58:17, 2006-04-04 16:58:17');

 

Then I had the division by zero error mentioned by azar - which cleared up when I inserted my own test tasks thru admin.

 

I too see some missing (or incorrect) language defines... other than that it seems to be perfectly compatible with the newest Admin with Access levels #1359

 

Thanks for sharing this HUGE contribution! Great work!!!!

Link to comment
Share on other sites

Andr?,

 

Currently this Contribution works directly with the Admin Acess Contribution.

 

I have my ms2 osc with many contribs allready installed. Which version of Admin Acess shoul I install?

 

Best Regards, Andr?.

Link to comment
Share on other sites

Although I have only begun to test, everything seems to work with the newer admin contribution located here as well:

 

http://www.oscommerce.com/community/contributions,1359

 

It is a lot newer

 

Yes, I know the contribution location, but they are all designed for fresh new osc install's.

 

Someone have installed Admin Acess with Step-By-Step instructions? If yes, please give me the link for contribution version.

 

Best Regards, Andre.

Link to comment
Share on other sites

Still in testing phases (technically) - but all preliminary tests are fine. There may have been some tweaking on the merges (I can not quite remember) - but I DO also have the Step-By-Step installed and it works great as well.

 

Yes, I know the contribution location, but they are all designed for fresh new osc install's.

 

Someone have installed Admin Acess with Step-By-Step instructions? If yes, please give me the link for contribution version.

 

Best Regards, Andre.

Link to comment
Share on other sites

Cant go back and edit now... I am sorry - I thought you were referring to step-by-step manual order contribution.

 

Download a comparison program if you need help installing the admin with access levels. I use winmerge, it is a very powerful, easy to use, and free program.

 

Hope that helps.

 

Still in testing phases (technically) - but all preliminary tests are fine. There may have been some tweaking on the merges (I can not quite remember) - but I DO also have the Step-By-Step installed and it works great as well.
Link to comment
Share on other sites

I love so much this contri is here so question and request for future if it can give some ideas

 

Question 1.since we need to install adminsitrator , why not use the tep_administrator function int he boxe file ?

 

Request1. in the taks list, see to who the task has been attributed

 

Question 2.in the boxes files

 

if ($selected_box == 'task_manager' || $menu_dhtml == true) {

 

seems to be used only for people using admin dhtml menu , like me but for other it shoudnt work, so maybe we should change the file inside the zip!

 

Question 3. How to modify the size of the detail box where we can type the details of the task , mine is on extreme right and so small !

 

request 2 : when we are in all task and we change the task to 100% taht was attirbueted to an other admin, it then load the list of the taks for the actual logged admin whereas showing the same page with all the task

 

req 3 : being able to put a comment on a task , one admin give me a task to do , when it s finish , we would want to give a comment for precisions or conclusions like in orders

 

req 4 : being able ot select if we want an email to be snet when we had or modify the task

 

req 5 : make a page with all the task not finished like he one for all task finished

 

Hope it would be usefull

MS2

Link to comment
Share on other sites

Question 4 : Why when i assigned a task to one admin , this is the show owner that received the notification ?

 

Question 5: when i edit a task , an email is sent but it says it s from (unknown user)

 

Request 6: We should move the text to variable and to the language defines folder

 

To do 1 : remove the reference to pet webmaster in the e-mail text !

 

I just try to resume thing , don't think i'm asking other to work on all this and me to only wait :thumbsup:

 

The task manager even at this stage is usefull already

MS2

Link to comment
Share on other sites

Azer:

First off sorry I didn't reply immeidately, i have a lot fo devlopment on my end goign on.

 

Secondly, I do have to fix the email (Since i was the only one using the task manager, and assigning tasks I never noticed if the email was going to antoehr user or not - So that is my mistake)

 

I also agree with your recomondation to move the email message to laguage defines - I just haven't has time to do so yet.

 

Any Help you care to offer in regards to the development of the Task Manager, I would be more than welcome for some assistance!

 

I also like your idea about other Admins bveing able to add comments to tasks. I may add that in the future.

Link to comment
Share on other sites

Any Help you care to offer in regards to the development of the Task Manager, I would be more than welcome for some assistance!

 

I work on release a version with the missing define and try to move to the language the texts.

 

but you should also see the oher point i was talking previously before you release a new version if you want .

 

pm your msn if you want us to work and talk by msn ...

MS2

Link to comment
Share on other sites

Nice contribution. Exactly what i was thinking about creating.

 

Now for some information and questions.

 

This contribution can be installed with parts from Admin Access Control. You don't need to install everything.

http://www.oscommerce.com/community/contributions,1174

 

I solved this by downloading Admin Access contrib and running 2 SQL commands from their install:

CREATE TABLE admin

and

CREATE TABLE admin_groups

more detail in the sql-file for that contrib.

 

Then I moved the file from AAC

originals\admin\includes\account_check.js.php

to my catalog\admin\includes\

 

Last thing to be able to use the taskslist is to edit admin\includes\application_top.php

right before closing ?>

add

 

if(!tep_session_is_registered($login_id)){

$login_id = '1';

tep_session_register('login_id');

}

 

useful if you are using .htaccess for security and don't want the admin levels.

 

Feat req.

When editing a task, the date gets set to todays date by default.

Should be set to the date that was entered when it was created.

 

Bugs?

1. If you are in admin_tasks_all.php and clicking "Add a Task", the date is not in the same format as on the other pages. It's just an input field.

 

2. When listing through Task Manager, all tasks within that project gets listed. even those that are complete.

Here it would be nice if the dropdowns could work togeteher. Like:

View by Status 0% -Not started AND View By Project: ProjectName

 

3. In Due Date, it also shows time. Date should be enough and takes far less space:

2006-07-31 00:00:00

This Task is nearing it's Due Date.

 

4. Tasks that are set to 100% -Complete still get a Due Date and a listing of "This Task is nearing it's Due Date." I also think they can go overdue..

 

5. In the installation instructions:

Anywhere in the filenames.php add the following lines:

define('FILENAME_ADMIN_TASKS_COMP', 'admin_tasks_complete.php');

The file is:

define('FILENAME_ADMIN_TASKS_COMP', 'admin_tasks_completed.php');

 

6. Part 5 in the installation instructions:

"A Cool Tweak to admin/index.php"

Both links should have "?selected_box=task_manager" added

a href="admin_tasks.php?selected_box=task_manager"

It also shows _all_ tasks here. Even those that are completed.

 

7. also noted that in admin_tasks_all.php the "Task Description" wasn't shortened. Can't remember if that also applied to admin_tasks_completed.php

Missing? Code in those (~ line 810:

$words=split(" ",$admin['admin_task_description']);

print join(" ",array_slice($words,0,4));

print "...";?>

 

Thanks for a great contrib. :)

(Some of these errors might come from the fact that I don't have the AAC installed.)

 

rtxs

Link to comment
Share on other sites

THANK SO MUCH rtxs

For all this feedback , i hope the contributor could tell us what are his plan , does he got time to rework the contribution with all our feedback .

 

 

5. In the installation instructions:

Anywhere in the filenames.php add the following lines:

define('FILENAME_ADMIN_TASKS_COMP', 'admin_tasks_complete.php');

The file is:

define('FILENAME_ADMIN_TASKS_COMP', 'admin_tasks_completed.php');

 

Good eyes , we didn't see it because in the boxe , the link are not using the variable but rather the direct link

 

'<a href="' . tep_href_link("admin_tasks_completed.php") . '" class="menuBoxContentLink">'. BOX_HEADING_TASK_MANAGER_REVIEW_COMPLETED_TASKS . '</a><br><br>'.

but it have to be changed

 

7. also noted that in admin_tasks_all.php the "Task Description" wasn't shortened. Can't remember if that also applied to admin_tasks_completed.php

Missing? Code in those (~ line 810:

$words=split(" ",$admin['admin_task_description']);

print join(" ",array_slice($words,0,4));

print "...";?>

 

how would u change the entire line , i couldn't get to do it properly :

<td align="center" class="dataTableContent"><a href="admin_tasks_all.php?tID=<?php echo $admin['admin_task_id']?>&action=edit_task"><?php echo $admin['admin_task_description']; ?></a></td>

MS2

Link to comment
Share on other sites

np, will post if I make some changes and if I find something else.

Any progress on the defines?

 

About this:

how would u change the entire line , i couldn't get to do it properly :

<td align="center" class="dataTableContent"><a href="admin_tasks_all.php?tID=<?php echo $admin['admin_task_id']?>&action=edit_task"><?php echo $admin['admin_task_description']; ?></a></td>

 

this works for me:

<td align="center" class="dataTableContent"><a href="admin_tasks_all.php?tID=<?php echo $admin['admin_task_id']?>&action=edit_task"><?php $admin['admin_task_description'];
$words=split(" ",$admin['admin_task_description']); 
print join(" ",array_slice($words,0,4)); 
print "...";?></a></td>

 

Altough I wouldn't call this the optimal solution, because if you have something in your description that is for example an url, this counts as one word. The result is that it isn't shortened in a nice way.

 

Maybe using the osc function:

tep_break_string($string, $len, $break_char = '-')

would be better?

Link to comment
Share on other sites

<td align="center" class="dataTableContent"><a href="admin_tasks_all.php?tID=<?php echo $admin['admin_task_id']?>&action=edit_task"><?php [b]$admin['admin_task_description'];[/b]
$words=split(" ",$admin['admin_task_description']); 
print join(" ",array_slice($words,0,4)); 
print "...";?></a></td>

 

i dont understand the aim of leaving alone this variable and not delete it : $admin['admin_task_description'];

MS2

Link to comment
Share on other sites

You are right. There is no need to keep that variable there. I just copy and pasted from admin_tasks.php into tasks_all, not giving it more thought since it worked :)

 

So this is tested and also works:

<td align="center" class="dataTableContent"><a href="admin_tasks_all.php?tID=<?php echo $admin['admin_task_id']?>&action=edit_task"><?php
$words=split(" ",$admin['admin_task_description']); 
print join(" ",array_slice($words,0,4)); 
print "...";?></a></td>

 

btw. previos post by me suggesting the tep_break_string wouldn't do it. But maybe this:

   function truncate($substring, $max = 50, $rep = '...') {
   if(strlen($substring) < 1){
	   $string = $rep;
   }else{
	   $string = $substring;
   }

   $leave = $max - strlen ($rep);

   if(strlen($string) > $max){
	   return substr_replace($string, $rep, $leave);
   }else{
	   return $string;
   }

  }

(from php.net)

 

If it is worth the effort. Maybe I should put the energy on fixing some bigger issues (in my opinion) in this contrib :)

Link to comment
Share on other sites

Hi again..

Some minor updates and some more ??

 

In Index.php

For that nice little feature I changed the code:

<?php $admin_tasks_query = tep_db_query("select count(*) as count from " . TABLE_ADMIN_TASKS . " where admin_id='". $login_id."'");
$admin_tasks = tep_db_fetch_array($admin_tasks_query);
//echo $orders_pending['count'];
echo 'You currently have <a href="admin_tasks.php?selected_box=task_manager"><b>' . $admin_tasks['count'] . '</b></a> Tasks Assigned to you.<a href="admin_tasks.php?selected_box=task_manager">Click here to review your Tasks & Projects.</a>';
?>

To:

<?php 
 $admin_tasks_query = tep_db_query("select count(admin_task_id) as count from " . TABLE_ADMIN_TASKS . " where admin_id='". $login_id."' AND admin_task_status != '1'" );
$admin_tasks = tep_db_fetch_array($admin_tasks_query);
echo 'You currently have <a href="admin_tasks.php?selected_box=task_manager"><b>' . $admin_tasks['count'] .'</b></a> Tasks Assigned to you.
<a href="admin_tasks.php?selected_box=task_manager">Click here to review your Tasks & Projects.</a>';
?>

Removed comment. Selected specific row in the table (admin_task_id). No need to select all. Added " AND admin_task_status != '1' " to only display active tasks and not those that are set as completed.

 

To remove those 00-00-00 in the due date run this SQL:

ALTER TABLE `admin_tasks` CHANGE `admin_task_due` `admin_task_due` DATE NULL DEFAULT NULL

Change in the install file?

 

in admin_tasks.php I didn't get the correct listing of number of tasks:

Displaying 0 to 0 (of 0 tasks)

 

At line 1333 i changed:

$db_admin_split = new splitPageResults($HTTP_GET_VARS['page'], MAX_DISPLAY_SEARCH_RESULTS, $db_admin_query_init, $db_admin_query_numrows);

To:

$db_admin_split = new splitPageResults($HTTP_GET_VARS['page'], MAX_DISPLAY_SEARCH_RESULTS, $db_admin_query_raw, $db_admin_query_numrows);

And got:

Displaying 1 to 11 (of 11 tasks)

 

And where is this used and for what? Can't find it used anywhere.

At line 65 in admin_tasks.php & 46 in admin_tasks_all.php

		  function randomize() {
		$salt = "abchefghjkmnpqrstuvwxyz0123456789";
		srand((double)microtime()*1000000); 
		$i = 0;
		while ($i <= 7) {
		$num = rand() % 33;
		$tmp = substr($salt, $num, 1);
		$pass = $pass . $tmp;
		$i++;
	  }
	  return $pass;
	  }
	  $makePassword = randomize();

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...