Jump to content

Download: (inv) Awards


Gunnar94

Recommended Posts

Posted

I believe I have found a solution for your problem. When you have the auto resizing of award icons enabled, sometimes the width or height may end up as a decimal. I do not know if this will fix this problem, seeing as I do not have Internet Explorer, but it is worth a try.

Open the following hook files:

awardsPostView.php
awardsSigView.php

* NOTE * these files will have a string of random characters following following the file's name, and preceding the ".php" extension.

To the following for both files, the code you are looking is near the bottom of both files.

Change:


function getThumb($url, $name)

{

  list($width, $height) = getimagesize($url);


  $split = split("x", MAX_POST_IMG_SIZE);

  $maxW  = $split[0];

  $maxH  = $split[1];


  if($width > $maxW)

  {

   $lgr = $maxW / $width;


   $width  = $width * $lgr;

   $height = $height * $lgr;

  }


  if($height > $maxH)

  {

   $lgr = $maxH / $height;


   $width  = $width * $lgr;

   $height = $height * $lgr;

  }


  return "<img src='{$url}' width='{$width}' height='{$height}' alt='{$name}' title='{$name}' /> ";

}

To:


function getThumb($url, $name)

{

  list($width, $height) = getimagesize($url);


  $split = split("x", MAX_POST_IMG_SIZE);

  $maxW  = $split[0];

  $maxH  = $split[1];


  if($width > $maxW)

  {

   $lgr = $maxW / $width;


   $width  = $width * $lgr;

   $height = $height * $lgr;

  }


  if($height > $maxH)

  {

   $lgr = $maxH / $height;


   $width  = $width * $lgr;

   $height = $height * $lgr;

  }


  $width  = ceil($width);

  $height = ceil($height);


  return "<img src='{$url}' width='{$width}' height='{$height}' alt='{$name}' title='{$name}' /> ";

}

  • Replies 494
  • Created
  • Last Reply
Posted

Hmmm that's weird, as it works fine for me, and auto resizing is turned off! Glad it's working for you anyway.

Edit:- This is because I made my awards match the maximum size dimensions I stated. Obviously if your images are greater than that, the auto resize needs to be switched on :)

  • 2 weeks later...
Posted

Can I make a recommendation? I know you have the bulk award, where you still have to Comma separate the users. Could you also add that you can award a specific award to a member group? That would be awesome :smile:

Basically I'm in a gaming clan, and would like to give Clan members a certain award, but that is some 600 people!!!

Posted

Hello, topthrillkid
is it normal that after the upgrade I still have the green advice that the application is available for the upgrade? In addition, after the 1st attempt the post system wasn't working anymore, and after the repair table everything went better. Now I still have the green string (in the admincp) that the application is ready for the upgrade: the problem that I did already it.

Posted

topthrillkid I have another suggestion for your next release (sorry!). I've had many requests to be able to add an award for a certain time limit, probably in days. An example, we would like to award a donation medal to those who donate to our monthly target. So as people donate, we can give them the donate medal for the remaining number of days within that month, then it would automatically get deleted.

Posted

When it's ready!



Hopefully though, by Christmas. I have to get a plan for what I am going to do, and then do it. It is just that I have school and work too.
Posted

So here's the plan: That's what I was able to find by going through this topic, and ones on my website. Please tell me if I left something out. ---------------- Another idea I had was to create something called an "Award Key", it could be used by other applications to refer to a specific award to give, instead of having to know specific ID's. An application author then could add an option to their application which says, "create an award with the key name 'testing'". The administrator would then, while creating/editing an award, type "testing" into the key name field. If the administrator had enabled the award option in the other application, that application could just tell (inv) Awards "award some member the award with the key name 'testing'". Of course it wouldn't literally say that, it would call a function such as: $award->awardByKeyName("testing", '21'); 21 being the user's member id. Tell me what you think.

[*]Award links (A user will receive an award when they click a specified link) [*]Bulk award by groups [*]Awards to show next to username in posts (requested by users on my website) [*]Fix Bugs


[*]The upgrade button which appears when to upgrade is available



[*]Time on forums (since registration, not the time spend browsing/using forums) [*]Reputation












[*]Add Auto Awards Functions

Posted

The ability to specify whether the award is a profile or signature award.

Posted

Admin or user option?




Admin I reckon it should be defined as part of the award setup information.
Posted

That's what I was able to find by going through this topic, and ones on my website. Please tell me if I left something out.





*raises hand*

Auto award according to downloads and uploads. Downloaded X amount congrats, uploaded X amount congrats.
Award description shown in the profile awards tab.
When on the forums and you put your cursor over an award it says 'This is the award name bla bla this is the award description you got this for bla bla' Is there any way to neaten this up? I could do a mock up idea in photoshop of what I mean if you like?


(Auto award for time since registration was going to be one that I was actually going to ask for :tongue:)


P.S Seriously sexual stuff here topthrillkid ;) This is seriously one of the best addons to get for IPB
Posted

Does this mod limit the number of awards that display? And if so can a user that has more awards than the limit choose which ones get displayed?

Posted

That's what I was able to find by going through this topic, and ones on my website. Please tell me if I left something out.




Some suggestions from my side. You are free to leave them out. :P

Most no. of posts in a month
Most posts in specified sections (total posts - total threads started)
Most likes for a [period]
Posted

Does this mod limit the number of awards that display? And if so can a user that has more awards than the limit choose which ones get displayed?





I'm guessing you mean display as in awards display in the forum profile side or signature right? If so, then yes there is a custom limit that the admin sets. A user can't choose what awards are shown, the latest awards are shown.

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...