Forums


WoW Raid Manager :: Forums :: Suggestions
<< Previous thread | Next thread >>   

Main Page Signup Status

Author Post
milso
Fri Feb 26 2010, 01:55PM
Registered Member #1521
Joined: Mon Feb 08 2010, 01:05PM
Posts: 22
is it possible to add another sign up status for Queued on the main page
right now its:
green check for signed up
a red circle with a line for canceled
the link Signup for not signed up at all

what i would like to do is break the Green Check in to 2 status maybe a "+" for Queued and keep the check for drafter and if these could cary over to the calendar that right now just shows Queued and Drafted



[ Edited Fri Feb 26 2010, 01:56PM ]
Back to top
milso
Thu Mar 04 2010, 02:59PM
Registered Member #1521
Joined: Mon Feb 08 2010, 01:05PM
Posts: 22
removing bad code

[ Edited Fri Apr 09 2010, 09:44AM ]
Back to top
milso
Thu Mar 04 2010, 03:21PM
Registered Member #1521
Joined: Mon Feb 08 2010, 01:05PM
Posts: 22
removing bad code

[ Edited Fri Apr 09 2010, 09:45AM ]
Back to top
milso
Thu Mar 04 2010, 03:33PM
Registered Member #1521
Joined: Mon Feb 08 2010, 01:05PM
Posts: 22
OK that did not work it just replaced signed up with drafted :(

what I'm trying to mimic is this line from the calendar.php

if (($signups['queue'] == '0') and ($signups['cancel'] == '0'))


[ Edited Thu Mar 04 2010, 04:00PM ]
Back to top
milso
Thu Mar 04 2010, 04:44PM
Registered Member #1521
Joined: Mon Feb 08 2010, 01:05PM
Posts: 22
OK i think i finally got it working sorry about the rambling I'm new to PHP and bumbling through this

Ok added line to lang_main.php
$phprlang['drafted'] = 'You are drafted for this raid';


then added the function to functions_users.php
function is_char_Drafted($profile_id, $raid_id) {
    global $db_raid, $phpraid_config;

    $sql = "SELECT * FROM " . $phpraid_config['db_prefix'] . "signups WHERE profile_id='$profile_id' AND raid_id='$raid_id' AND cancel='0' AND queue='0'";
    $result = $db_raid->sql_query($sql);

    if($db_raid->sql_numrows($result) == 0)
        return 0;
    else
        return 1;
}


and finaly inserted lines into index.php

add
    // attempt to add Drafted Status //
        else if(is_char_Drafted($profile_id, $raids['raid_id']))
            $info = '<img src="templates/' . $phpraid_config['template'] . '/images/icons/signup.gif" border="0" height="14" width="14" onMouseover="ddrivetip(\'' . $phprlang['drafted'] . '\');" onMouseout="hideddrivetip();" alt="check mark">';


Between
    if(is_char_cancel($profile_id, $raids['raid_id']))

And
    else if(is_char_signed($profile_id, $raids['raid_id'])) 

Back to top
Illydth
Thu Mar 11 2010, 03:01PM

Joined: Mon Sep 24 2007, 02:51PM
Posts: 1886
You've got this almost 100% correct.

The original request was to have a DIFFERENT graphic (like a +) in place of the check mark to identify the separate signup (actually that's a hell of an idea as you could then see when you were drafted and not drafted just by looking at the front page).

Now, here's where the trick comes in. is_char_signed = is_drafted. in the signups table there are only 2 marks for status for a character:

Cancelled and Queued. Cancelled = False + Queued = False == Drafted

Thus when you select from signups for the raid ID and profile ID you are checking (in is_char_drafted/is_char_signed) for a character that is in the table with both queue and cancel = false, which means the char is drafted.

What you want to do is as follows (psudeo code)

if is_char_cancelled (checks signups for cancel = 1, queue = 0)
Display CircleSlash
else if is_char_queued (checks signups for cancel = 0, queue = 1)
Display Plus
else if is_char_signed (checks signups for cancel = 0, queue = 0)
Display Check Mark
else if check_frozen (checks for raid frozen)
Display frozen picture
else
display "Signup" link.

So for you, change "is_char_drafted" to "is_char_queued", change the "0" on the AND queue="0" to AND queue="1", and change the graphic that is displayed (you'll have to create a graphic for the queued state) in the $info image (change /images/icons/signup.gif to /images/icons/queued.gif and create a queued.gif image and cop to /images/icons).

BTW if you do create a "queued" image, please zip and post it back to this thread, I think I'll probably add this as a quick enhancement to the next version.

--Illydth

- Douglas Wagner -
Site Admin
Back to top
milso
Thu Mar 18 2010, 09:21AM
Registered Member #1521
Joined: Mon Feb 08 2010, 01:05PM
Posts: 22
I actually used the Check for drafted and added a plus sign for Queued

Image: http://www.wowraidmanager.net/e107_files/public/1268925602_1521_FT4894_screenshot1_.jpg


Below is the png of the Plus sign i used
add_small_normal_hover.zip
Back to top
Le-Thor
Thu Mar 18 2010, 05:55PM

Registered Member #1559
Joined: Sat Mar 06 2010, 01:45PM
Posts: 34
Can you write a summary of your code? Or is it as your 5th post shows?
Back to top
milso
Thu Mar 18 2010, 11:14PM
Registered Member #1521
Joined: Mon Feb 08 2010, 01:05PM
Posts: 22
yea the last post of my code rambling is the changes
if some one could delete my other pointless ones :)

[ Edited Fri Apr 09 2010, 09:44AM ]
Back to top
Le-Thor
Tue Jul 20 2010, 03:57AM

Registered Member #1559
Joined: Sat Mar 06 2010, 01:45PM
Posts: 34
To get it to work with multi signups you have to tjek if you are signed up first, then queued, then cancel, then frozen and the "signup link"

My code look like this in my index file from line 118 (original replaced line 118-130):

    // check if signed up
    // precendence -> cancelled signup, signed up, raid frozen, open for signup
    if($logged_in == 1 && $priv_profile == 1) 
    {
    // attempt to add Drafted Status //
        if(is_char_Drafted($profile_id, $raids['raid_id'])) 
            $info = '<img src="templates/' . $phpraid_config['template'] . '/images/icons/check_mark.gif" border="0" height="14" width="14" onMouseover="ddrivetip(\'' . $phprlang['drafted'] . '\');" onMouseout="hideddrivetip();" alt="plus mark">';
        else if(is_char_queued($profile_id, $raids['raid_id']))
            $info = '<img src="templates/' . $phpraid_config['template'] . '/images/icons/plus.gif" border="0" height="14" width="14" onMouseover="ddrivetip(\'' . $phprlang['signed_up'] . '\');" onMouseout="hideddrivetip();" alt="check mark">';
        else if(is_char_cancel($profile_id, $raids['raid_id']))
            $info = '<img src="templates/' . $phpraid_config['template'] . '/images/icons/cancel.gif" border="0" height="14" width="14" onMouseover="ddrivetip(\'' . $phprlang['cancel_msg'] . '\');" onMouseout="hideddrivetip();" alt="cancel icon">';
        else if(check_frozen($raids['raid_id']) && $phpraid_config['disable_freeze'] == 0)
            $info = '<img src="templates/' . $phpraid_config['template'] . '/images/icons/frozen.gif" border="0" height="14" width="14" onMouseover="ddrivetip(\'' . $phprlang['frozen_msg'] . '\');" onMouseout="hideddrivetip();" alt="frozen">';
        else
            $info = '<a href="view.php?mode=view&raid_id=' . $raids['raid_id'] . '#signup">'. $phprlang['signup'] .'</a>';
    }
Back to top
Illydth
Tue Jul 20 2010, 10:18AM

Joined: Mon Sep 24 2007, 02:51PM
Posts: 1886
As always thanks guys for the contributions. :)

- Douglas Wagner -
Site Admin
Back to top
Moderators: Illydth

Jump:     Back to top

Syndicate this thread: rss 0.92 Syndicate this thread: rss 2.0 Syndicate this thread: RDF
Powered by e107 Forum System