MyBB Central
My Awards 1.3 - Printable Version

+- MyBB Central (http://www.mybbcentral.com)
+-- Forum: Archives (http://www.mybbcentral.com/forum-33.html)
+--- Forum: Mybb 1.4x Series Topics (http://www.mybbcentral.com/forum-26.html)
+---- Forum: Mybb 1.4x Plugins and Hacks (http://www.mybbcentral.com/forum-27.html)
+---- Thread: My Awards 1.3 (/thread-1782.html)



RE: My Awards 1.2 - Trinit - Apr 12, 2009

(Apr 09, 2009, 12:56 AM)labrocca Wrote: Have you checked in Firefox and Opera? Just curious because maybe I will make the change to the package.

Yes in Opera Works fine.. i use it also in Firefox only in IE doesn't work.
Ps. I test it also on my ps3 and it works Wink
I have this:
Code:
    $awards = "<span style=\"white-space:normal; width: 100%;\">";

    while($results = $db->fetch_array($query))
    {
        $awards .= "<a href=\"myawards.php?awid=".$results['awid']."\"><img src=\"uploads/awards/".$results['awimg']."\" border=\"0\" alt=\"".$results['awname']."\" /></a>";

    }

    $awards .= "</span>";


I must replace it with this?

Code:
    $awards = "<span style=\"white-space:normal; width: 100%;\">";

    while($results = $db->fetch_array($query))
    {
        $awards .= "<img src=\"uploads/awards/".$results['awimg']."\" title=\"".$results['awname']."\" alt=\"".$results['awname']."\" />";

    }

    $awards .= "</span>";

I did it but it doesn't work


RE: My Awards 1.2 - FBI - Apr 12, 2009

How to give default image (all member with zero awards) to define this variable
Code:
<!-- AWARDS -->
on postbit_author_user template Smile


RE: My Awards 1.2 - labrocca - Apr 12, 2009

Trinit - What you changed won't effect display. Try changing the span's to div's.

FBI - The functions for postbit display will need a change.

Code:
    }

return $post;

Change to this:


Code:
    }else{

    $awards = "<span style=\"white-space:normal; width: 100%;\"><img src=\"path/to/default.gif\" alt=\"\"></span>";
    $post['user_details'] = str_replace("<!-- AWARDS -->", $awards, $post['user_details']);
           }

return $post;



RE: My Awards 1.2 - Rob1991 - Apr 12, 2009

(Apr 12, 2009, 04:54 PM)labrocca Wrote:
Code:
    }else{

    $awards = "<span style=\"white-space:normal; width: 100%;\"><img src=\"path/to/default.gif\" alt=\"\"></span>";
    $post['user_details'] = str_replace("<!-- AWARDS -->", $awards, $post['user_details']);
           }

return $post;

I was just about to ask for this :o Thank you Big Grin

However i made mine display text
'This user has no awards'

Code:
}else{

    $awards = "<span style=\"white-space:normal; width: 100%;\"><center>This user has no awards</center></span>";
    $post['user_details'] = str_replace("<!-- AWARDS -->", $awards, $post['user_details']);
           }

return $post;

}

I am really pleased with my post bit now Big Grin

[attachment=1234]


RE: My Awards 1.2 - labrocca - Apr 12, 2009

DId you make sure it validates what you have changed? Just curious but it does look nice.


RE: My Awards 1.2 - Rob1991 - Apr 12, 2009

(Apr 12, 2009, 07:45 PM)labrocca Wrote: DId you make sure it validates what you have changed? Just curious but it does look nice.

Erm, sorry you have lost me there,

Do you mean, did i make sure it gives people the 'ELSE' if they dont have any awards?

If so, yes it does Big Grin


RE: My Awards 1.2 - FBI - Apr 12, 2009

Thanks Labrocca for Quick Response, implementing... done!
And Rob, you have nice Post_Bit_Author template. I will implement your idea Smile


RE: My Awards 1.2 - Trinit - Apr 13, 2009

Thanx! Now works perfectly!


RE: My Awards 1.2 - Rob1991 - Apr 13, 2009

(Apr 12, 2009, 09:16 PM)FBI Wrote: Thanks Labrocca for Quick Response, implementing... done!
And Rob, you have nice Post_Bit_Author template. I will implement your idea Smile

Glad you like it Big Grin


RE: My Awards 1.2 - labrocca - Apr 13, 2009

W3C validation...google it.