Jump to content


Photo

Need help in Modifying a Wordpress Plugin

php wordpress dropdown phpmyadmin mysql

  • Please log in to reply
1 reply to this topic

#1 Shalabh

Shalabh

    Newbie

  • New Members
  • Pip
  • 1 posts

Posted 16 March 2014 - 08:50 AM

Hi Everyone,

I am fairly new in PHP Development but have used Wordpress for the last 2 years. I am currently modifying a plugin to suit the client's requirements. It is a Custom To-DO list plugin. You may check out my progress here : [Page on meshfun.com]

The plugin I am modifying is WordPress › TaskFreak! Free " WordPress Plugins

It is almost all the required features, just the feature of Creating Groups and assigning is absent.

When a new task is created,an option of assigned to is present but that can assign task to ONLY ONE Person. It should be able to assign to multiple users. 

 

 

The whole data is stored in the database in 8-9 tables. The main table DO has a field called as user_ID as you can see in the image below. It is updated when a new task is created. It contains a number (User ID of person who is assigned the task) or left blank in case the task is not assigned to anyone. : 
 

 

I would like the ability to assign to multiple users instead of one. What would be the ideal way ? Create new table or store the number of people assigned as array ? If a new table is created, what will be the fields to be created ?

 

Note I was not able to add images so please check out here to see couple of images I wanted to show you : http://www.quora.com...ordpress-Plugin

 

I understand that you guys are quite busy but if you guys can atleast guide me on how to proceed, it would be great !

Thanks, 
Shalabh



Here is the code which displays dropdown menu in the front end (taskfreak/inc/views/front/edit.php) 

 <li>
<label for="tfk_user_id"><?php _e('Assigned to', 'taskfreak') ?></label>
<select name="user_id" id="tfk_user_id">
<option value="">&mdash;</option>
<?php foreach ($this->users as $user): ?>
<option value="<?php echo $user->ID ?>"<?php if ($this->pid && $this->data->get('user_id') == $user->ID) { echo " selected"; } ?>><?php echo $user->display_name ?></option>
<?php endforeach; ?>
</select>
<?php echo $this->data->errors['user_id'] ?>
</li>

UPDATE : One gentleman suggested me to create a table with the following SQL COde :

 

 
CREATE TABLE `task_user` (
  `task_id` int(11) unsigned NOT NULL,
  `user_id` int(11) unsigned NOT NULL,
  `status` tinyint(4) NOT NULL DEFAULT '1' COMMENT 'status field is optional',
  UNIQUE KEY `task_user` (`task_id`,`user_id`,`type`) USING BTREE,
   KEY `task_id` (`task_id`),
)  CHARSET=utf8
But I am still not able to convert the display into multiple checkboxes. 

Edited by Shalabh, 16 March 2014 - 08:53 AM.


#2 sKunKbad

sKunKbad

    Advanced Member

  • Members
  • PipPipPip
  • 1,676 posts
  • LocationTemecula, CA, USA

Posted 18 March 2014 - 01:45 AM

It looks like the plugin is active in development. Have you considered messaging the plugin authors to see if they would implement the feature?


Brian's Web Design - Temecula

Freedom is only available through death.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Cheap Linux VPS from $5
SSD Storage, 30 day Guarantee
1 TB of BW, 100% Network Uptime

AlphaBit.com