Jump to content

(VD) My Projects


Wareczek

Recommended Posts

%7Boption%7D



File Name: (VD) My Projects

File Submitter: Wareczek

File Submitted: 19 Aug 2010

File Category: Utilities

Supported Versions: IP.Board 3.1.x, IP.Board 3.2.x



IP.Tracker Hook

Owners of projects now have possibility to modify name, description and version of their projects.


ChangeLog
1.0.1
- Fixed bug with project versions
1.0.0
- Initial release



here to download this file

Link to comment
Share on other sites

  • 2 weeks later...

Also, in your myprojects/view.php file, you can drastically cut down on the number of queries used by changing the code to this:

				$this->DB->build( array(

							'select'	=> '*',

							'from'		=> 'tracker_projects',

							'where'	=> "project_owner_id='{$memberId}'",

						) );

				$query = $this->DB->execute();


				while($row = $this->DB->fetch($query))

				{

					$projects[$row['project_id']] = $row;

					$projects[$row['project_id']]['issues'] = $row['project_num_issues'];

					$projects[$row['project_id']]['project_title_seo'] = IPSText::makeSeoTitle($row['project_title']);

				}


On my site, it went from 18 to 10 queries.

Link to comment
Share on other sites

Made another change, knocked out another query.

		if(!$memberId)

		{

			$this->registry->output->silentRedirect($this->settings['base_url']);

		}

		else

		{

			$this->DB->build( array(

						'select'	=> '*',

						'from'		=> 'tracker_projects',

						'where'	=> "project_owner_id='{$memberId}'",

					) );

			$query = $this->DB->execute();


			if ( $this->DB->getTotalRows() )

			{

				while($row = $this->DB->fetch($query))

				{

					$projects[$row['project_id']] = $row;

					$projects[$row['project_id']]['issues'] = $row['project_num_issues'];

					$projects[$row['project_id']]['project_title_seo'] = IPSText::makeSeoTitle($row['project_title']);

				}


				$this->output = $this->registry->getClass('output')->getTemplate('tracker_myprojects')->mainView($projects);

			}

Link to comment
Share on other sites

  • 5 months later...

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...