"MCP info on index" MOD into the Portal

Forum rules
This forum is not for support requests.

Only post Modifications for Board3 Portal 1.0.x in this forum.
User avatar

Topic author
DutchToxophilite
Active Member
Active Member
Posts: 28
Joined: 30. January 2009 13:17
phpBB.com User: DutchToxophilite
Location: Venlo, The Netherlands

"MCP info on index" MOD into the Portal

Post by DutchToxophilite »

Your Portal Version: 1.0.2
Your phpBB Type: Standard phpBB3
MODs installed: Yes
Your knowledge: Advanced Knowledge
Boardlink: http://www.handboogforum.nl

What have you done before the problem was there?
Nothing, question. No issue.

What have you already tryed to solve the problem?
Searching trough this board, and trough phpbb.com

Description and Message
Hi

I have installed the "MCP info on index" MOD.
And me and the Moderators really quiet heavily on it. The reason for this is, that I enabled the "block first posts" feature. To be sure no spammers can spam my board.

But as a result of the NEWS showing the latest posts on the portal, we now tend to forget to go to the board index frequently, thus missing these warnings.

I now want to incorporate the "MCP info on index" MOD into the portal, but my php writing skills are poorly, so I have not a sure clue where to start.

Please advise/help.

thanx.

grtz,
Twan
The joy's of Archery can be found anywhere. Far places only offer exotic ways to suffer.
User avatar

Kevin
Site Admin
Site Admin
Posts: 2893
Joined: 7. January 2006 21:11
phpBB.de User: Saint
phpBB.com User: Saint_hh
Location: Hamburg

Re: Can the "MCP info on index" MOD be incorp. into the Portal?

Post by Kevin »

Original Mod MCP info on index by Derky
Open portal.php

search:

Code: Select all

// output page 
add before:

Code: Select all

// Show amount of reported and queue posts for authenticated users
if ($auth->acl_getf_global('m_report') || $auth->acl_getf_global('m_approve'))
{
    if (!function_exists('get_forum_list'))
    {
        include($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
    }
    $user->add_lang('mcp');
    
    // Reported posts
    $forum_list = get_forum_list('m_report');
    if (!empty($forum_list))
    {
        $sql = 'SELECT COUNT(r.report_id) AS total
            FROM ' . REPORTS_TABLE . ' r, ' . POSTS_TABLE . ' p
            WHERE r.post_id = p.post_id
                AND r.report_closed = 0
                AND ' . $db->sql_in_set('forum_id', $forum_list);
        $result = $db->sql_query($sql);
        $total = (int) $db->sql_fetchfield('total');
        $db->sql_freeresult($result);

        if ($total)
        {            
            $template->assign_vars(array(
                'L_REPORTS_TOTAL'    => ($total == 1) ? $user->lang['REPORT_TOTAL'] : sprintf($user->lang['REPORTS_TOTAL'], $total),
                'U_MCP_REPORTS'        => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports'),
                'S_HAS_REPORTS'        => true)
            );
        }
    }
    
    // Posts in queue
    $forum_list = get_forum_list('m_approve');
    if (!empty($forum_list))
    {
        $sql = 'SELECT COUNT(post_id) AS total
            FROM ' . POSTS_TABLE . '
            WHERE ' . $db->sql_in_set('forum_id', $forum_list) . '
                AND post_approved = 0';
        $result = $db->sql_query($sql);
        $total = (int) $db->sql_fetchfield('total');
        $db->sql_freeresult($result);

        if ($total)
        {
            $template->assign_vars(array(
                'L_UNAPPROVED_TOTAL'        => ($total == 1) ? $user->lang['UNAPPROVED_POST_TOTAL'] : sprintf($user->lang['UNAPPROVED_POSTS_TOTAL'], $total),
                'U_MCP_QUEUE'            => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue'),
                'S_HAS_UNAPPROVED_POSTS'    => true)
            );
        }
    }    
} 

prosilver
open root/styles/prosilver/template/portal/portal_body.html

search:

Code: Select all

<!-- INCLUDE overall_header.html --> 
add after:

Code: Select all

<!-- IF S_HAS_REPORTS or S_HAS_UNAPPROVED_POSTS -->
<div id="message" class="rules">
    <div class="inner"><span class="corners-top"><span></span></span>
        <strong>{L_INFORMATION}:</strong> 
        <!-- IF S_HAS_REPORTS --><a href="{U_MCP_REPORTS}">{L_REPORTS_TOTAL}</a><!-- ENDIF -->
        <!-- IF S_HAS_REPORTS and S_HAS_UNAPPROVED_POSTS --> &bull; <!-- ENDIF -->
        <!-- IF S_HAS_UNAPPROVED_POSTS --><a href="{U_MCP_QUEUE}">{L_UNAPPROVED_TOTAL}</a><!-- ENDIF -->
    <span class="corners-bottom"><span></span></span></div>
</div>
<!-- ENDIF --> 

subsilver2

open root/styles/subsilver2/template/portal/portal_body.html
search:

Code: Select all

<!-- INCLUDE overall_header.html --> 
add after:

Code: Select all

<!-- IF S_HAS_REPORTS or S_HAS_UNAPPROVED_POSTS -->
<div class="forumrules">
    <h3>{L_INFORMATION}</h3><br />
    <!-- IF S_HAS_REPORTS --><a href="{U_MCP_REPORTS}">{L_REPORTS_TOTAL}</a><!-- ENDIF -->
    <!-- IF S_HAS_REPORTS and S_HAS_UNAPPROVED_POSTS --> &bull; <!-- ENDIF -->
    <!-- IF S_HAS_UNAPPROVED_POSTS --><a href="{U_MCP_QUEUE}">{L_UNAPPROVED_TOTAL}</a><!-- ENDIF -->
</div>

<br clear="all" />
<!-- ENDIF --> 
Edited topic title and moved to "Released Blocks"
~~~ They say the definition of madness is doing the same thing and expecting a different result ~~~

Kein Support per PN / No support via PM!
User avatar

Topic author
DutchToxophilite
Active Member
Active Member
Posts: 28
Joined: 30. January 2009 13:17
phpBB.com User: DutchToxophilite
Location: Venlo, The Netherlands

Re: "MCP info on index" MOD into the Portal

Post by DutchToxophilite »

Hi Kevin.

Your Nicks at phpbb.com and phpbb.de are more realistic.

YOU are a true SAINT (and that coming from an atheist!!) ;)

grtz,
Twan
The joy's of Archery can be found anywhere. Far places only offer exotic ways to suffer.
User avatar

Topic author
DutchToxophilite
Active Member
Active Member
Posts: 28
Joined: 30. January 2009 13:17
phpBB.com User: DutchToxophilite
Location: Venlo, The Netherlands

Re: "MCP info on index" MOD into the Portal

Post by DutchToxophilite »

Worked like a charm.

One small remark......

The text to search for contains some blankspaces before and after the "to search" text. Which prefends them to be found automaticcaly.....

Just a small tip for the other users who want to install this.

grtz,
Twan
The joy's of Archery can be found anywhere. Far places only offer exotic ways to suffer.
User avatar

Kevin
Site Admin
Site Admin
Posts: 2893
Joined: 7. January 2006 21:11
phpBB.de User: Saint
phpBB.com User: Saint_hh
Location: Hamburg

Re: "MCP info on index" MOD into the Portal

Post by Kevin »

Thanks, corrected.
~~~ They say the definition of madness is doing the same thing and expecting a different result ~~~

Kein Support per PN / No support via PM!

JeRicHoOL
Valued Contributor
Valued Contributor
Posts: 53
Joined: 8. September 2008 14:02

Re: "MCP info on index" MOD into the Portal

Post by JeRicHoOL »

Wo kann ich die Modifikation downloaden? Der Link hier funktioniert nicht.
Würde nämlich auch gerne so einen Block haben mit den MCP Infos im Portal.
User avatar

Topic author
DutchToxophilite
Active Member
Active Member
Posts: 28
Joined: 30. January 2009 13:17
phpBB.com User: DutchToxophilite
Location: Venlo, The Netherlands

Re: "MCP info on index" MOD into the Portal

Post by DutchToxophilite »

Hi JeRicHoOL

I can read German, but my writing is terrible, so I will keep it in English.

This is one of the official released MODs from phpbb.com

When the site will be up and running again I will post a link to it. (If I don't forget)

grtz,
Twan
The joy's of Archery can be found anywhere. Far places only offer exotic ways to suffer.
User avatar

Christian_N
Former Team Member
Former Team Member
Posts: 2266
Joined: 19. January 2008 02:17
phpBB.de User: Christian_N
phpBB.com User: Christian_N
Location: Frankfurt

Re: Can the "MCP info on index" MOD be incorp. into the Portal?

Post by Christian_N »

Kevin wrote:Original Mod MCP info on index by Derky
Und ich kann Englisch lesen aber nicht gut schreiben. :lol:
Selbst wenn es vergessen solltest, der Link hat Kevin bereits genannt. :D

Sobald phpBB.com wieder Online ist kannst es dir dort runterladen.
Alternative suche mal auf phpBB.de oder bei Google vllt. gibts auch eine Alternativ-Download :roll:

Gruß Chris
Meine Projekte: Chantals - Fanpage .::. phpBB Projekt
No support via PM, email or messenger!
User avatar

Kevin
Site Admin
Site Admin
Posts: 2893
Joined: 7. January 2006 21:11
phpBB.de User: Saint
phpBB.com User: Saint_hh
Location: Hamburg

Re: "MCP info on index" MOD into the Portal

Post by Kevin »

Äh, Moment:
JeRicHoOL wrote:Wo kann ich die Modifikation downloaden? Der Link hier funktioniert nicht.
Würde nämlich auch gerne so einen Block haben mit den MCP Infos im Portal.
Da brauchst du nix runter laden, den Code für das Portal habe ich oben gepostet. :?
~~~ They say the definition of madness is doing the same thing and expecting a different result ~~~

Kein Support per PN / No support via PM!

JeRicHoOL
Valued Contributor
Valued Contributor
Posts: 53
Joined: 8. September 2008 14:02

Re: "MCP info on index" MOD into the Portal

Post by JeRicHoOL »

I did the changes above and nothing on my portal changed. There is no new block. :? Is there a mod I need to install for that block?
User avatar

Kevin
Site Admin
Site Admin
Posts: 2893
Joined: 7. January 2006 21:11
phpBB.de User: Saint
phpBB.com User: Saint_hh
Location: Hamburg

Re: "MCP info on index" MOD into the Portal

Post by Kevin »

JeRicHoOL wrote:I did the changes above and nothing on my portal changed. There is no new block. :?
Already purged your board cache?
And please note: the block will only appear, if at least on post is reported for the admins / moderators. To test it, just report a post. ;)
~~~ They say the definition of madness is doing the same thing and expecting a different result ~~~

Kein Support per PN / No support via PM!

JeRicHoOL
Valued Contributor
Valued Contributor
Posts: 53
Joined: 8. September 2008 14:02

Re: "MCP info on index" MOD into the Portal

Post by JeRicHoOL »

Ok I have done this and then I got some kind of information line.

http://i107.photobucket.com/albums/m287 ... 030009.gif

Is it correctly how it is?
User avatar

Topic author
DutchToxophilite
Active Member
Active Member
Posts: 28
Joined: 30. January 2009 13:17
phpBB.com User: DutchToxophilite
Location: Venlo, The Netherlands

Re: "MCP info on index" MOD into the Portal

Post by DutchToxophilite »

That's would it would look like (I guess, as I see it in ProSilver). But the bar gives the same information.

grtz,
Twan
The joy's of Archery can be found anywhere. Far places only offer exotic ways to suffer.

Return to “board3 Portal v1.0.x - Modifications”