MyBB Community Forums

Full Version: OUGC Awards
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
When you save the message to send when a user is given an award. No matter how long I put it, it ends up cutting off half of what I wrote after saving.

I really love this awards system, but if I can't get the messages to send in full length then I don't want to use it Confused I want the message to look professional.

(2012-08-08, 09:30 PM)Omar G. Wrote: [ -> ]
(2012-08-08, 08:01 PM)Miley Wrote: [ -> ]Whatever I set usually gets cut in half after saving.

Please explain your problem. Saving what?
I doesn't matter how long the message is (100, 200, 400 characters)? Probably I used varchar(255) for that field. Will check but if so, it will be solved till the next version.
Bueno, pues como me has dicho que postee aquí, lo hago.
1.- Cuando los awards se muestran en el postbit, están ordenados por id. Yo no los quiero ordenados. ¿Se puede hacer alguna modificación para que se muestren de forma aleatoria?
2.- ¿Cómo hago para que los awards no me descoloquen el perfil? Ya sé que me has dicho que se haría con un css, pero no tengo ni idea de hacerlo. ¿Me podrías ayudar en eso?

Eso es todo. Conseguí arreglar lo de los perfiles, como me dijiste (:
1. En la próxima versión se podrá hacer una modificación, por ahora no es posible.
2. Seria poniendo un div cubriendo los premios, y ponerle una class, luego en tu css agregas algo como:
.tuclass {
max-width: 300px;
}

Dependiendo de cuanto sea el ancho de tus premios, si fueran de 60px con lo de arriba solo cabrían máximo 5 premios por linea.

Por cierto, no hay necesidad de enviarme mensajes privados de esa forma, siempre reviso estos temas.
Puse lo que dijiste, y ahora el perfil no se deforma, pero los awards siguen saliendo en la misma línea. Yo quiero que "salten" a partir de 5 por línea. ¿Tendría que editar el php o algo?
No, so se hace con css, solo agrega un max-width: 30px; al div que enrolla los premios, y las imagenes de los premios se les agrega un display: inline;.
HTML is not enabled in the plugin description and probably certain other areas as well.

I was porting Labrocca's MyAwards into your's and everything is going well, just HTML is not working.

For example, consider I made a hyperlink, but it doesn't work. I am no good with html enable/disable or parser functions. How would I go on making them enabled in the plugin by itself? I spent a lot of time looking into the code though, but didn't found it. All other things is edited to suit my taste.

Thanks.

edit: Anyway, fixed. I saw htmlspecialchars_uni function and was't too sure about it earlier, though I removed it, but for name field I guess, so it had no changes. But I confirmed it with Paul and made changes to description field.

Also, I had to use function htmlspecialchars_decode to make awards.php description text convert quotes and all to HTML format. You may want to enable it in your future release, just a suggestion.

Hmm, one last area where it is not just getting to work. The award reason on profile and user award page. This is what I have for both:

$award['reason'] = htmlspecialchars_decode(ougc_awards_get_award_info('reason', $award['aid'], $award['reason'], $award['gid']));

$gived['reason'] = htmlspecialchars_decode(ougc_awards_get_award_info('reason', $gived['aid'], $gived['reason'], $gived['gid']));

You can see I'm decoding, though output appears like this only:

<a href="test.com">testing</a>

Any ideas? I'm out of my brain for today, phew!

Btw, very well written plugin...
Quote:HTML is not enabled in the plugin description and probably certain other areas as well.

This was done in purpose. As groups (at your choose) can manage awards directly from the ModCP it could be considered dangerous to allow them to insert HTML, so it gets sanitized. You can use MyCode, IIRC.

It seems to me that data is being inserted into the DB sanitized, I though I had fixed that, will need to check it.
Well, there should be a setting to completely disable it. However, only admins by default can give award at the moment, but there should be a complete setting to disable it. I'm making the edits right now to suit my needs.

And yeah, I too think the sanitized data is being entered, but just for reason column, I've a problem now because despite of using htmlspecialchars_decode function, it's not being converted into full HTML form.
Quote:Well, there should be a setting to completely disable it. However, only admins by default can give award at the moment, but there should be a complete setting to disable it. I'm making the edits right now to suit my needs.

By default no extra groups can manage awards from the ModCP, unless you are using a older version (pretty sure I updated the plugin at the mods site).

Quote:And yeah, I too think the sanitized data is being entered, but just for reason column, I've a problem now because despite of using htmlspecialchars_decode function, it's not being converted into full HTML form.

I will need to release a version that fixes this ASAP then. Are you working on this in a local environment? Otherwise the upgrade may be a pain, as there are other fixes as well.