Little glitch with awards like the Forum Ribbon that have multiple variants and are likely to be awarded to the same person more than once, the display on the shadowbox looks for the award number in the member's field and apparently when it comes across the first number is just happy with that and stops, so I had to go into the database and remove the first version of the ribbon in Talo and Tundrra's award fields.
Just FYI, I think this is a simple fix I just have to get to it.
Progession Awards
- Tundrra
- Lord
- Posts: 3817
- Joined: Sun Jul 15, 2012 10:05 am
- Realm: Black Desert Online
- House: Griffon
- Record: http://newoutriders.org/wiki/index.php?title=Tundrra
http://newoutriders.org/member/Tundrra
Lord HC 04.06.2014
Squired SWG 03.21.2004
Recruited SWG 12.12.2003 by Baron Brambt - Location: Bloomington, IN
Re: Progession Awards
I have not look at the code or anything so I'm just blowing smoke.
If the award is looking at a recordset and filtering just forum_post_awards, by default it would order by lowest to highest awarded. If that's the case adding a DESC onto the end of the query so it showed you the highest post award first that is currently being assigned to the playerID.
If the award is looking at a recordset and filtering just forum_post_awards, by default it would order by lowest to highest awarded. If that's the case adding a DESC onto the end of the query so it showed you the highest post award first that is currently being assigned to the playerID.
- Lasarian
- Lord
- Posts: 1819
- Joined: Wed Aug 15, 2012 11:38 am
- Realm: TableTop
- House: Griffon
- Location: Holyoke, MA
Re: Progession Awards
Would I accomplish the same objective if I just renumbered the awards to make the most recent one a lower number than the previous?Tundrra wrote:I have not look at the code or anything so I'm just blowing smoke.
If the award is looking at a recordset and filtering just forum_post_awards, by default it would order by lowest to highest awarded. If that's the case adding a DESC onto the end of the query so it showed you the highest post award first that is currently being assigned to the playerID.
- Tundrra
- Lord
- Posts: 3817
- Joined: Sun Jul 15, 2012 10:05 am
- Realm: Black Desert Online
- House: Griffon
- Record: http://newoutriders.org/wiki/index.php?title=Tundrra
http://newoutriders.org/member/Tundrra
Lord HC 04.06.2014
Squired SWG 03.21.2004
Recruited SWG 12.12.2003 by Baron Brambt - Location: Bloomington, IN
Re: Progession Awards
Yes I imagine so:)Lasarian wrote:Would I accomplish the same objective if I just renumbered the awards to make the most recent one a lower number than the previous?Tundrra wrote:I have not look at the code or anything so I'm just blowing smoke.
If the award is looking at a recordset and filtering just forum_post_awards, by default it would order by lowest to highest awarded. If that's the case adding a DESC onto the end of the query so it showed you the highest post award first that is currently being assigned to the playerID.
- Tundrra
- Lord
- Posts: 3817
- Joined: Sun Jul 15, 2012 10:05 am
- Realm: Black Desert Online
- House: Griffon
- Record: http://newoutriders.org/wiki/index.php?title=Tundrra
http://newoutriders.org/member/Tundrra
Lord HC 04.06.2014
Squired SWG 03.21.2004
Recruited SWG 12.12.2003 by Baron Brambt - Location: Bloomington, IN
Re: Progession Awards
How ever if you change the award_id any member who has received one of those award IDs you change could be effected.
- Lasarian
- Lord
- Posts: 1819
- Joined: Wed Aug 15, 2012 11:38 am
- Realm: TableTop
- House: Griffon
- Location: Holyoke, MA
Re: Progession Awards
Code: Select all
<?php if(in_array('9', $awardArray)): ?>
<img src="../modules/image.php?width=75&image=/images/awards/award_1000_Posts.png" align="center" title="Forum Ribbon: 1,000">
<?php elseif(in_array('24', $awardArray)): ?>
<img src="../modules/image.php?width=75&image=/images/awards/award_2500_Posts.png" align="center" title="Forum Ribbon: 2,500">
<?php elseif(in_array('27', $awardArray)): ?>
<img src="../modules/image.php?width=75&image=/images/awards/award_5000_Posts.png" align="center" title="Forum Ribbon: 5,000">
<?php elseif(in_array('28', $awardArray)): ?>
<img src="../modules/image.php?width=75&image=/images/awards/award_10000_Posts.png" align="center" title="Forum Ribbon: 10,000">
<?php endif; ?>
Code: Select all
public function loadAward($id){
global $Database, $Utilities;
//Clean the username
$awardID = $Utilities->clean($id, 'sql');
return $Database->query_first("SELECT * FROM awards WHERE id = '$awardID'");
}
Like this?
Code: Select all
return $Database->query_first("SELECT * FROM awards WHERE id = '$awardID' DESC");
- Tundrra
- Lord
- Posts: 3817
- Joined: Sun Jul 15, 2012 10:05 am
- Realm: Black Desert Online
- House: Griffon
- Record: http://newoutriders.org/wiki/index.php?title=Tundrra
http://newoutriders.org/member/Tundrra
Lord HC 04.06.2014
Squired SWG 03.21.2004
Recruited SWG 12.12.2003 by Baron Brambt - Location: Bloomington, IN
Re: Progession Awards
The DESC syntax is off a bit, you have to tell it which column you are sorting.
Code: Select all
SELECT *
FROM awards
WHERE id = '$award'
ORDER BY awards DESC
- Tundrra
- Lord
- Posts: 3817
- Joined: Sun Jul 15, 2012 10:05 am
- Realm: Black Desert Online
- House: Griffon
- Record: http://newoutriders.org/wiki/index.php?title=Tundrra
http://newoutriders.org/member/Tundrra
Lord HC 04.06.2014
Squired SWG 03.21.2004
Recruited SWG 12.12.2003 by Baron Brambt - Location: Bloomington, IN
Re: Progession Awards
After re reading your if/then statement you might not need to change the query. I think the if/then statement should look for the highest number '28' first then check the lower ones. You want it to stop on the award with the most posts, so it should look for the highest first.
- Lasarian
- Lord
- Posts: 1819
- Joined: Wed Aug 15, 2012 11:38 am
- Realm: TableTop
- House: Griffon
- Location: Holyoke, MA
Re: Progession Awards
That's the problem, it's getting to that '9' and appears to stop there.