collapse collapse

* User Info

 
 
Welcome, Guest. Please login or register.
Did you miss your activation email?

* Who's Online

  • Dot Guests: 240
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

* Shoutbox

Refresh History
  • Shoutbox is not for support!
  • {OCS}MasterSeal: STILL love SP :)
    November 24, 2018, 05:05:50 AM
  • ♦ Ninja ZX-10RR ♦: <3 aegersz
    September 13, 2018, 03:36:09 PM
  • aegersz: I STILL <3 LOVE SimplePortal
    September 13, 2018, 07:11:39 AM
  • aegersz: o LOVE you guys - Simple Portal rocks !
    May 09, 2018, 05:18:59 AM
  • Chen Zhen: our apologies for the site being down.. please read server issues topic
    March 22, 2018, 05:32:38 AM
  • {OCS}MasterSeal: LOL PLEASE forget I just posted that. I found the answer in my own dang post back in 2015. lol sorry!
    July 04, 2017, 10:47:55 PM
  • {OCS}MasterSeal: I know this SB isnt' for support, but I just have a general question. Who would I contact to find out where SP stores its block info? Is it DB driven or files? I searched the site but came up with nothing. probably my fault any insight is appreciated.
    July 04, 2017, 10:43:36 PM
  • ♦ Ninja ZX-10RR ♦: Excuse me but what does Simpleportal have to deal with that?
    February 05, 2017, 08:21:14 PM
  • WhiteEagle: of course IMHO that site appears to be dead :(
    February 04, 2017, 01:08:05 PM
  • WhiteEagle: If I can get that, then I'll use it for that site...
    February 04, 2017, 01:07:35 PM
  • WhiteEagle: decided to not use SMF for any projects, unless I can get a copy of the premium version of the fanfiction archive plugin
    February 04, 2017, 01:06:54 PM
  • expertdecisions: cloudflare
    January 28, 2017, 08:01:47 AM
  • aegersz: SM release 2.0.13 !
    January 12, 2017, 06:00:13 AM
  • raffo: Tks Emanuele, even if I didn't understand the fix :D
    November 07, 2016, 02:01:20 AM
  • emanuele: [link]
    November 01, 2016, 12:43:50 PM
  • emanuele: raffo: the English support board is a good place. ;)
    November 01, 2016, 12:43:38 PM
  • raffo: Where can I find the fix for the shoutbox?
    November 01, 2016, 05:06:09 AM
  • {OCS}MasterSeal: To the SP team, I make a point to come here and thank you as much as possible for your work.  so again, THANK YOU!
    October 28, 2016, 10:38:05 AM
  • emanuele: That's indeed funny, the limit is present only in the patch and not the full install.
    October 22, 2016, 06:14:58 PM
  • phantomm: and from what I see only patch is broken, full install package is fine
    October 21, 2016, 03:44:44 PM

* Recent Posts

NEED HELP? If you're looking for support with Simple Portal, look no further than the Support Board!

Author Topic: Project Tools Block  (Read 6411 times)

0 Members and 1 Guest are viewing this topic.

Offline α¢αηѕ

  • Semi Newbie
  • *
  • Posts: 8
  • SMF Version: 2 RC1.2
  • SP Version: 2.3
Project Tools Block
« on: May 25, 2010, 03:42:40 AM »
I was looking over the most boards here as well as the search feature and i cannot find a topic about the Project Tools block on the front page.

Will this block be released? or only for SP.net

Masterd

  • Guest
Re: Project Tools Block
« Reply #1 on: May 19, 2011, 01:05:27 PM »
I'm also interested in it.

Offline [SiNaN]

  • Mr. SimplePortal
  • Developer
  • *
  • Posts: 6782
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
Re: Project Tools Block
« Reply #2 on: May 20, 2011, 06:41:41 AM »
It was posted in the Blocks and Modifications board but here is the latest code:

Code: [Select]
global $context, $settings, $project, $txt;

$block_parameters = array();

if ($return_parameters)
return $block_parameters;

loadLanguage('Project');

$project = 1;
$num_issues = 5;
$order = 'i.updated DESC';

$issues = getIssueList(0, $num_issues, $order, '1 = 1');

echo '
<table class="bordercolor issuetable" cellspacing="0">';

foreach ($issues as $issue)
{
echo '
<tr>
<td class="windowbg sp_center issue_', $issue['status']['name'], '" style="width: 24px; border-bottom: 1px solid #FFF;">
<img src="', $settings['images_url'], '/', $issue['tracker']['image'], '" alt="', $issue['tracker']['name'], '" />
</td>
<td class="info issue_', $issue['status']['name'], '" style="border-bottom: 1px solid #FFF;">
', !empty($issue['category']['link']) ? '[' . $issue['category']['link'] . '] ' : '', $issue['link'], ' ';

if ($issue['new'] && $context['user']['is_logged'])
echo '
<a href="', $issue['new_href'], '"><img src="', $settings['lang_images_url'], '/new.gif" alt="', $txt['new'], '" /></a>';

echo '
<br /><span class="smalltext">', !empty($issue['version']['link']) ? '[' . $issue['version']['link'] . '] ' : '', $txt['issue_status_' . $issue['status']['name']], $issue['is_assigned'] ? ' (' . $issue['assigned']['link'] . ')' : '', '</span>
</td>
</tr>';
}

echo '
</table>';
And slowly, you come to realize... It's all as it should be...

Masterd

  • Guest
Re: Project Tools Block
« Reply #3 on: May 20, 2011, 12:34:03 PM »
Thanks, [SiNaN]!

Masterd

  • Guest
Re: Project Tools Block
« Reply #4 on: May 27, 2011, 01:11:25 PM »
It's not working.

Offline [SiNaN]

  • Mr. SimplePortal
  • Developer
  • *
  • Posts: 6782
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
Re: Project Tools Block
« Reply #5 on: May 27, 2011, 02:33:01 PM »
I know some people think I'm an amazing person. But still I can't figure out what the problem is only with that single unexplanatory sentence. I'm sure that is the exact code we are using here, since I directly copied from that block.
And slowly, you come to realize... It's all as it should be...

Offline grafitus

  • Comrade
  • *
  • Posts: 1554
  • Gender: Male
  • just looking for own old energy
  • SMF Version: None
  • SP Version: None
Re: Project Tools Block
« Reply #6 on: May 27, 2011, 02:48:05 PM »
The code works perfectly. But you can use the following for a better view:
Code: [Select]
global $context, $settings, $project, $txt;

loadLanguage('Project');

$project = 1;
$num_issues = 5;
$order = 'i.updated DESC';

$issues = getIssueList(0, $num_issues, $order, '1 = 1');

echo '
<table class="bordercolor" style="width: 100%;" cellspacing="0">';

foreach ($issues as $issue)
{
echo '
<tr>
<td class="windowbg sp_center issue_', $issue['status']['name'], '" style="width: 24px; border-bottom: 1px solid #FFF;">
<img src="', $settings['images_url'], '/', $issue['tracker']['image'], '" alt="', $issue['tracker']['name'], '" />
</td>
<td class="info issue_', $issue['status']['name'], '" style="border-bottom: 1px solid #FFF;">
', !empty($issue['category']['link']) ? '[' . $issue['category']['link'] . '] ' : '', $issue['link'], ' ';

if ($issue['new'] && $context['user']['is_logged'])
echo '
<a href="', $issue['new_href'], '"><img src="', $settings['lang_images_url'], '/new.gif" alt="', $txt['new'], '" /></a>';

echo '
<br /><span class="smalltext">', !empty($issue['version']['link']) ? '[' . $issue['version']['link'] . '] ' : '', $txt['issue_status_' . $issue['status']['name']], $issue['is_assigned'] ? ' (' . $issue['assigned']['link'] . ')' : '', '</span>
</td>
</tr>';
}

echo '
</table>';

And copy this code to your the end of your index.css file:
Code: [Select]
.issue_new
{
background-color: #FFCCCC;
}
.issue_feedback
{
background-color: #FF50A8;
}
.issue_confirmed
{
background-color: #FFFFB0;
}
.issue_assigned
{
background-color: #C8C8FF;
}
.issue_resolved
{
background-color: #CCFFCC;
}
.issue_closed
{
background-color: #E8E8E8;
}
my mods
I don't reply support PMs. Please use support forums.

Masterd

  • Guest
Re: Project Tools Block
« Reply #7 on: May 28, 2011, 08:43:59 AM »
My bad. Now it's working perfectly. How can I add more than just one project?

Offline grafitus

  • Comrade
  • *
  • Posts: 1554
  • Gender: Male
  • just looking for own old energy
  • SMF Version: None
  • SP Version: None
Re: Project Tools Block
« Reply #8 on: May 28, 2011, 04:13:49 PM »
Sorry, getIssueList() does not support fetching multi-projects at a time. Or you can use this:
Code: [Select]
global $context, $settings, $project, $txt;

loadLanguage('Project');

$projects = array(1, 2); // blah, blah, blah
$num_issues = 5;
$order = 'i.updated DESC';

echo '
<table class="bordercolor" style="width: 100%;" cellspacing="0">';
foreach ($projects as $project)
{
$issues = getIssueList(0, $num_issues, $order, '1 = 1');

foreach ($issues as $issue)
{
echo '
<tr>
<td class="windowbg sp_center issue_', $issue['status']['name'], '" style="width: 24px; border-bottom: 1px solid #FFF;">
<img src="', $settings['images_url'], '/', $issue['tracker']['image'], '" alt="', $issue['tracker']['name'], '" />
</td>
<td class="info issue_', $issue['status']['name'], '" style="border-bottom: 1px solid #FFF;">
', !empty($issue['category']['link']) ? '[' . $issue['category']['link'] . '] ' : '', $issue['link'], ' ';

if ($issue['new'] && $context['user']['is_logged'])
echo '
<a href="', $issue['new_href'], '"><img src="', $settings['lang_images_url'], '/new.gif" alt="', $txt['new'], '" /></a>';

echo '
<br /><span class="smalltext">', !empty($issue['version']['link']) ? '[' . $issue['version']['link'] . '] ' : '', $txt['issue_status_' . $issue['status']['name']], $issue['is_assigned'] ? ' (' . $issue['assigned']['link'] . ')' : '', '</span>
</td>
</tr>';
}
}
echo '
</table>';
my mods
I don't reply support PMs. Please use support forums.

Offline Alpay

  • Semi Newbie
  • *
  • Posts: 19
  • SMF Version: 2.0.11
  • SP Version: 2.3.6
Re: Project Tools Block
« Reply #9 on: December 06, 2012, 10:44:07 AM »
Hi guys ;

I need your help a subject

Code: [Select]
<a href="', $issue['new_href'], '"><span><img src="', $settings['images_url'], '/', $issue['tracker']['image'], '" alt="', $issue['tracker']['name'], '" />[ ', $issue['category']['name'], ' ] - [ ', $issue['version']['name'], ' ] -', $issue['name'], '';echo'</span></a>
[ ScTr ] - [ ] -Footer

 ', $issue['version']['name'], '
 ', $issue['version']['link'], '


The version number does not seem to result ?

Sample :
[ ScTr ] - [ 2.1.9 ] -Footer

Offline ѕησω

  • Comrade
  • *
  • Posts: 5
  • Gender: Male
  • SMF Version: 2 RC4
  • SP Version: 2.3.3
Re: Project Tools Block
« Reply #10 on: August 19, 2013, 10:32:16 AM »
I've checked back after all these years... It works great!

However there's one issue, the number of issues listed is multiplied by the number of projects. Having two projects listed with 5 issues makes a total of 10 that show, 3 p x 5 i = 15, etc.

Anybody know a quick fix for this?

Offline [SiNaN]

  • Mr. SimplePortal
  • Developer
  • *
  • Posts: 6782
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
Re: Project Tools Block
« Reply #11 on: August 19, 2013, 10:49:05 AM »
Which code are you using? You can use the code I pasted in the third post changing the $project variable to 0 make it list issues from all projects.
And slowly, you come to realize... It's all as it should be...

Offline ѕησω

  • Comrade
  • *
  • Posts: 5
  • Gender: Male
  • SMF Version: 2 RC4
  • SP Version: 2.3.3
Re: Project Tools Block
« Reply #12 on: August 19, 2013, 11:36:04 AM »
Winnah, Was using Grafitus last post.

Thank's Sinan!

Offline [SiNaN]

  • Mr. SimplePortal
  • Developer
  • *
  • Posts: 6782
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
Re: Project Tools Block
« Reply #13 on: August 19, 2013, 01:08:05 PM »
You're welcome! ;)
And slowly, you come to realize... It's all as it should be...