[REL] - Next Raids Block (Raidplanner|EQDKP+)

Forum rules
This forum is not for support requests.

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

Topic author
ahmiquilena
Active Member
Active Member
Posts: 11
Joined: 8. July 2009 23:21
phpBB.com User: amiquilena

[REL] - Next Raids Block (Raidplanner|EQDKP+)

Post by ahmiquilena »

MOD: Next Raids Block V.1.

Description: Fetch data from EQDKP+ database and the raidplanner plugin, so it displays the next 5 upcoming events in a portal block. Clickable link on the event name, that takes you into the raidplanner page for that particular event, plus it shows how many confirmed members that particular raid has.

Version: 1.0.0

Installation Level: Easy

Installation Time: ~15 minutes

Author Notes: This is the first release, and I currently have it working both on my kin's live website, and my test portal. So it should work granted you change everything I tell you to change. This is a custom script that we made from scratch, so the code is mostly tailored to our website, but a quick modification here and there, could get it to work in any website.

Must Have:
- Board3 Portal 1.0.3
- EQDKP+ Installation & RaidPlanner Plugin Active

Download:
http://www.lotro-latino.com/NextRaids.rar

Demo:
Image
http://prueba.lotro-latino.com/portal.php

Installation Steps:
Files to Modify:
.../portal.php
.../styles/yourstyle/template/portal/portal_body.html
.../portal/block/db.php
.../portal/block/list_raid.php

New Files to Add:
.../portal/block/db.php
.../portal/block/list_raid.php
.../styles/yourstyle/template/portal/block/list_raid.html

==== Modifications ====

Open: .../portal.php
Find:

Code: Select all

include($phpbb_root_path . 'portal/block/additional_blocks.'.$phpEx);
Add Before:

Code: Select all

//Listado de raids.
include($phpbb_root_path . 'portal/block/list_raid.'.$phpEx);
Open: .../styles/yourstyle/template/portal/portal_body.html
Add anywhere you want (whether right, left, or center section the include of the new block):

Code: Select all

<!-- INCLUDE portal/block/list_raid.html -->
Special Notes:
- Before or after uploading the file "Db.php" you should edit it, and input the correct information for your database, the one that EQDKP+ uses.

Code: Select all

    function ejequery ($consulta)
    {
        $serverSql="db host address here";
        $usuario="db username";
        $contrasena="db password";
        $base="db name";
- Open: .../portal/block/list_raid.php
Find:

Code: Select all

http://www.lotro-latino.com/dkp/plugins/raidplan/viewraid.php?r=
In-Line Replace:

Code: Select all

http://www.lotro-latino.com/dkp
[With the address to your EQDKP installation - Have to do it in 2 places]
===================
Find:

Code: Select all

http://www.lotro-latino.com/dkp/games/LOTRO/events/
Replace:
[With the address where your event ICONS are stored in your server.]
==================
- The file "list_raid.php" queries a particular prefix in the database (ours is lotroeqdkp_), so if you have a different one, you should open the file, and replace every instance of lotroeqdkp_ with whatever prefix your EQDKP+ database uses.

- Myself and my Kin are latinamericans, hence we speak spanish, so a few things in the script are in spanish, but the code is really so simple, that it shouldn't take people too much time to figure out what to change :)

If you have any questions, let me know.

Next on the list, is pulling a TOP 10 DKP list (Current Standings) and display it on a custom block such as this. I'll post it once it's done. Enjoy.

Swinder
Active Member
Active Member
Posts: 18
Joined: 25. July 2009 16:43

Re: [REL] - Next Raids Block (Raidplanner|EQDKP+)

Post by Swinder »

Nice modification, I will be looking at adding this to my board as soon as possible.

Also I noticed you are looking at doing a top10 list which is interesting.
I assume you would pull the list into a custom block for the portal page but I was wondering whether you would do a quick version where it pulls the entire list to its own page on the portal?

Topic author
ahmiquilena
Active Member
Active Member
Posts: 11
Joined: 8. July 2009 23:21
phpBB.com User: amiquilena

Re: [REL] - Next Raids Block (Raidplanner|EQDKP+)

Post by ahmiquilena »

Swinder wrote:Nice modification, I will be looking at adding this to my board as soon as possible.

Also I noticed you are looking at doing a top10 list which is interesting.
I assume you would pull the list into a custom block for the portal page but I was wondering whether you would do a quick version where it pulls the entire list to its own page on the portal?
Yeah. Right now, I'm working on the quick top 10 dkp list, with sorting from highest to lowest, something simple and quick.

The longterm plan, is a bit more extensive and complicated. I want to use 2 portal.php pages, the main one, with the quick info, and when people click "DKP System" on the menu, they will be taken to a portal2.php, which is basically going to be the same original portal, but everything in the middle will change, and pull custom made pages of EQDKP, the entire standing pages, raidplanner and whatnot.

My ultimate goal is to reduce the need of my members to check the EQDKP page itself, I want them to be able to access anything from the main portal. But work on that is still on early stages. When we have something workable, I'll post it :)

Ypselon
Active Member
Active Member
Posts: 24
Joined: 16. July 2008 18:36

Re: [REL] - Next Raids Block (Raidplanner|EQDKP+)

Post by Ypselon »

Will this working when i have EQDKP+ on an other Domain with new Database ?

Xorakk
Active Member
Active Member
Posts: 9
Joined: 6. September 2009 12:31

Re: [REL] - Next Raids Block (Raidplanner|EQDKP+)

Post by Xorakk »

Hello

At first, sry for my bad english. Im german. :)

That block doesn't work for me. It always shows that there isn't any Raid.
I tryed to translate the .php, perhaps the problem is there, but i'm a totaly noob.
Can someone help me pls? thx

here ist the db.php:

Code: Select all

<?php

    function jquery ($request)
    {
        $dbhost="host";
        $dbuser="user";
        $dbpasswd="password";
        $dbname="name";

      $conn=mysql_connect($dbhost, $dbuser, $dbpasswd) or die("Unable to connect to SQl Server");
        mysql_select_db($dbname) or die("Unable to connect to Database");

       $result = mysql_query($request);

        mysql_close($conn);
        return $result;
    }
?>
and here the list_raid.php:

Code: Select all

<?php

        include ("db.php");
        $result = jquery("SELECT raid.raid_id as raidId, raid_name , raid_date, event_icon, count( attendees_subscribed ) AS confirmed " .
        "FROM eqdkp_raidplan_raids raid, eqdkp_events event, eqdkp_raidplan_raid_attendees att " .
        "WHERE raid.raid_id = att.raid_id " .
        "AND att.attendees_subscribed =0 " .
        "AND raid.raid_name = event.event_name " .
        "AND DATEDIFF( FROM_UNIXTIME( raid_date ) , NOW( ) ) >=0 " .
        "AND DATEDIFF( FROM_UNIXTIME( raid_date ) , NOW( ) ) <= 7 " .
        "GROUP BY raid.raid_id, raid_name, raid_date, event_icon " .
        "ORDER BY raid_date " .
        "LIMIT 0,5");

        $prox_raids = '';

        while ($record = mysql_fetch_assoc($result))
        {

                $prox_raids .= "<table width=\"170\" border=\"1\" bordercolor=\"#000000\" bgcolor=\"#2E2E31\">";
                $prox_raids .= "<tr>";
                $prox_raids .= "<td colspan=\"2\" background=\"images/cellpic1.png\"><div align=\"center\" ><a href=\"http://domain.de/eqdkp/plugins/raidplan/viewraid.php?r=" . $record['raidId'] . "\" target=\"_blank\"><font color=white size=2 face=\"Arial\"><B>" . $record['raid_name'] . "</B></font></a></div></td>";
                $prox_raids .= "</tr>";
                $prox_raids .= "<tr>";
                $prox_raids .= "<td width=\"45\" height=\"45\" rowspan=\"3\"><a href=\"http://domain.de/eqdkp/plugins/raidplan/viewraid.php?r=" . $record['raidId'] . "\" target=\"_blank\"><img height=45 width=45 src=\"http://freizeit-helden.de/eqdkp/games/WoW/events/" . $record['event_icon'] . "\" /></a></td>";
                $prox_raids .= "<td width=\"108\" height=\"23\"><span><font color=white size=1 face=\"Arial\">" . date("d/m/Y h:i a", $record['raid_date']) . "</font></span></td>";
                $prox_raids .= "</tr>";
                $prox_raids .= "<tr>";
                $prox_raids .= "<td height=\"23\"><span><font color=#00FF00 size=1 face=\"Arial\">Bestätigt: " . $record['confirmation'] . "</font></span></td>";
                $prox_raids .= "</tr>";
                $prox_raids .= "</table>";
        }

        $template->assign_vars(array(
                'WOW_RAIDS' => $prox_raids,
                'WOW_RAIDS_NO' => "Keine kommenden Raids"));
?>
and here the list_raid.html:

Code: Select all

{$LR_BLOCK_H_L}&nbsp;Kommende Raids{$LR_BLOCK_H_R}
<table class="tablebg" cellspacing="1" width="100%">
        <tr class="row1">
                <td>
                        <!-- IF WOW_RAIDS -->
                        {WOW_RAIDS}
                        <!-- ELSE -->
                        {WOW_RAIDS_NO}
                        <!-- ENDIF -->
                </td>
        </tr>
</table>
{$LR_BLOCK_F_L}{$LR_BLOCK_F_R}

Xorakk
Active Member
Active Member
Posts: 9
Joined: 6. September 2009 12:31

Re: [REL] - Next Raids Block (Raidplanner|EQDKP+)

Post by Xorakk »

I have 2 DB's on my webspace.
1 for the phpbb3 with board3 portal an 1 for the eqdkp.
Both DB's are in uft8 bin. Everything works fine.

On my webspace i have 2 folders.
portal = there is my phpbb3 with board3 portal
eqdkp = there is my dkp system.

I filled in all correctly. i checked it 3 times.
But even with the original script it won't work.

Pls help.

PS: Link to my page: http://freizeit-helden.de

Xorakk
Active Member
Active Member
Posts: 9
Joined: 6. September 2009 12:31

Re: [REL] - Next Raids Block (Raidplanner|EQDKP+)

Post by Xorakk »

/push

Xorakk
Active Member
Active Member
Posts: 9
Joined: 6. September 2009 12:31

Re: [REL] - Next Raids Block (Raidplanner|EQDKP+)

Post by Xorakk »

It seems there's no one who can help.
I deleted it.

Selfarian
Active Member
Active Member
Posts: 3
Joined: 21. January 2009 12:21

Re: [REL] - Next Raids Block (Raidplanner|EQDKP+)

Post by Selfarian »

Hello Xorakk,

i am not really shure about this. I had the same Problem and i made some experiments with the SQL Statement.

When you look at line 7, you see

Code: Select all

 "AND att.attendees_subscribed =0 " .
This line should be deleted, i think.

I am not really shure, what this statement does. I think it is not needed. If you delete only this line, the SQL Query works. But the Block doesn't... have to search further :/

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