Member Awards (2.0 Compatible!)

Started by Spuds, September 18, 2006, 03:14:03 PM

Previous topic - Next topic

Spuds

QuoteHey - thanks for the advice however I have made contact with the person who looks after the servers and they seem willing to turn mod_security off for that domain
Thats cool ... if its mod security V1 they will likely just add those lines for you, if its the more evil mod_security V2 they will have to do something to their server config.  Either way its best to have that off  :)

Michael D. Garcia

Hi everyone:

I have a slight issue with my forums after installing member awards on 2.0.1:

Unknown column 'aw.award_name' in 'field list'
File: /var/www/vhosts/forums.adastrafanfic.com/Sources/Load.php
Line: 1031

It looks like the DB portion didn't install?  But I can't uninstall it because it claims there is no uninstaller.  Can I comment out the code added to Load.php for this?

Thanks,

MDg

Michael D. Garcia

I think I found it.  I backed out the changes manually and restored from a previous version of Load.php.  Should be all good, now :)

Thanks, anyway,

MDg

fullmoonya

i solved now my problem in the award list page. i just change the paragraph tag of the function template_awards_list to div tag. now it works in the way i want. :)
do not mark my topic solve unless it is REALLY SOLVED.
my forum

Visit My Blog:
Google SEO Share

MrCreatoR

Spuds [?]
QuoteThat looks more like you did not save the translation file as UTF8 or the forum is not in UTF8 mode
I did, otherwise the strings like award title/name was displayed incorrectly.

I think the problem is in the database, because this data filled later, after the mod was installed.

Hoodie



There is an error in the install..  Here's the original code:

// Check if there are any awards
if (empty($context['categories']))
echo '
<p class="description>
', $txt['awards_error_no_badges'], '
</p>';



This causes the rest of the page to be broken due to the description class not endquoted..  Here's the fix:

// Check if there are any awards
if (empty($context['categories']))
echo '
<p class="description">
', $txt['awards_error_no_badges'], '
</p>';

amiralib

does the not english members problem solved on new version?

Spuds

Quote from: Hoodie on February 09, 2012, 01:19:13 AM


There is an error in the install..  Here's the original code:

// Check if there are any awards
if (empty($context['categories']))
echo '
<p class="description>
', $txt['awards_error_no_badges'], '
</p>';



This causes the rest of the page to be broken due to the description class not endquoted..  Here's the fix:

// Check if there are any awards
if (empty($context['categories']))
echo '
<p class="description">
', $txt['awards_error_no_badges'], '
</p>';

Thanks!

C4G-TK

Quote from: Spuds on February 09, 2012, 10:32:34 AM
Quote from: Hoodie on February 09, 2012, 01:19:13 AM


There is an error in the install..  Here's the original code:

// Check if there are any awards
if (empty($context['categories']))
echo '
<p class="description>
', $txt['awards_error_no_badges'], '
</p>';



This causes the rest of the page to be broken due to the description class not endquoted..  Here's the fix:

// Check if there are any awards
if (empty($context['categories']))
echo '
<p class="description">
', $txt['awards_error_no_badges'], '
</p>';

Thanks!

Added info for others:

The above change is in the Profile.template.php file.

-img removed-

fullmoonya

Quote from: Hoodie on February 09, 2012, 01:19:13 AM


There is an error in the install..  Here's the original code:

// Check if there are any awards
if (empty($context['categories']))
echo '
<p class="description>
', $txt['awards_error_no_badges'], '
</p>';



This causes the rest of the page to be broken due to the description class not endquoted..  Here's the fix:

// Check if there are any awards
if (empty($context['categories']))
echo '
<p class="description">
', $txt['awards_error_no_badges'], '
</p>';


it doesnt look to have changes in the code.
do not mark my topic solve unless it is REALLY SOLVED.
my forum

Visit My Blog:
Google SEO Share

SD-X

Quote from: fullmoonya on February 12, 2012, 11:54:04 PM
Quote from: Hoodie on February 09, 2012, 01:19:13 AM


There is an error in the install..  Here's the original code:

// Check if there are any awards
if (empty($context['categories']))
echo '
<p class="description>
', $txt['awards_error_no_badges'], '
</p>';



This causes the rest of the page to be broken due to the description class not endquoted..  Here's the fix:

// Check if there are any awards
if (empty($context['categories']))
echo '
<p class="description">
', $txt['awards_error_no_badges'], '
</p>';


it doesnt look to have changes in the code.
I thought so at first too. Look carefully at the "<p class="description>" section in both code quotes. One has an additional quotation mark after the word "description".

fullmoonya

Quote from: SugarD-x on February 13, 2012, 12:00:18 AM
I thought so at first too. Look carefully at the "<p class="description>" section in both code quotes. One has an additional quotation mark after the word "description".
now i see it. thanks for the support sir.
do not mark my topic solve unless it is REALLY SOLVED.
my forum

Visit My Blog:
Google SEO Share

SD-X

Quote from: fullmoonya on February 13, 2012, 03:03:37 AM
Quote from: SugarD-x on February 13, 2012, 12:00:18 AM
I thought so at first too. Look carefully at the "<p class="description>" section in both code quotes. One has an additional quotation mark after the word "description".
now i see it. thanks for the support sir.
No problem! :)

FireDitto

#2693
When I try to edit or delete an Award, I get this;

Quote501 Not Implemented

The requested method is not implemented by the server.

I'm unsure where to even start looking for errors, and I installed ages ago. I assume it was clean, but can't be positive.

EDIT: Asking to run an uninstall crops up no errors at all.
Second Pass Weyr<br />An AU Pernse RPG<br /><br />SMF 2.0.6 with SP 2.3.5

fullmoonya

Quote from: FireDitto on February 13, 2012, 05:26:20 PM
When I try to edit or delete an Award, I get this;

Quote501 Not Implemented

The requested method is not implemented by the server.

I'm unsure where to even start looking for errors, and I installed ages ago. I assume it was clean, but can't be positive.

EDIT: Asking to run an uninstall crops up no errors at all.

try to parse the mod and trace every part where the code was putted.
do not mark my topic solve unless it is REALLY SOLVED.
my forum

Visit My Blog:
Google SEO Share

Spuds

Quote from: FireDitto on February 13, 2012, 05:26:20 PM
When I try to edit or delete an Award, I get this;

Quote501 Not Implemented

The requested method is not implemented by the server.

I'm unsure where to even start looking for errors, and I installed ages ago. I assume it was clean, but can't be positive.

EDIT: Asking to run an uninstall crops up no errors at all.
Thats most likely a mod_security error ... it creates a 501 error when it does not like "something".  There are known issues with this mod and having mod_security enabled on your server, they just don't play well together.

You can try adding the following to the top of your .htaccess file

<IfModule mod_security.c>
  SecFilterEngine Off
  SecFilterScanPOST Off
</IfModule>
or contact your host to see if they have it installed and how you can disable it on your site.

atoast

is there a way to insert a user's favorite award pic below his avatar/signature? this is the current (standard) code:


// Show their awards?
if (!empty($message['member']['awards']) && $modSettings['awards_in_post'] > 0){
echo '
  <div id="description-wrap" style="margin: 20px auto; width: 700px;">
<div class="description">
<div class="description-text">

<fieldset style="border: 1px solid black; padding: 5px;">
<legend>', $txt['awards'], '</legend>';

// Couldn't limit it in Load.php, so let's do it here.
$awards = 0;
foreach ($message['member']['awards'] as $award){
if($awards < $modSettings['awards_in_post'])
echo '
<a href="', $scripturl, $award['more'], '"><img src="', dirname($scripturl), $award['img'], '" alt="', $award['description'], '" title="', $award['description'], '" /></a> ';
$awards++;
}

fullmoonya

#2697
Quote from: atoast on February 21, 2012, 11:07:17 AM
is there a way to insert a user's favorite award pic below his avatar/signature? this is the current (standard) code:


// Show their awards?
if (!empty($message['member']['awards']) && $modSettings['awards_in_post'] > 0){
echo '
  <div id="description-wrap" style="margin: 20px auto; width: 700px;">
<div class="description">
<div class="description-text">

<fieldset style="border: 1px solid black; padding: 5px;">
<legend>', $txt['awards'], '</legend>';

// Couldn't limit it in Load.php, so let's do it here.
$awards = 0;
foreach ($message['member']['awards'] as $award){
if($awards < $modSettings['awards_in_post'])
echo '
<a href="', $scripturl, $award['more'], '"><img src="', dirname($scripturl), $award['img'], '" alt="', $award['description'], '" title="', $award['description'], '" /></a> ';
$awards++;
}


find the comment line: avatar, images, etc.? on display.template.php

and add the award code under the code under this commentline.
do not mark my topic solve unless it is REALLY SOLVED.
my forum

Visit My Blog:
Google SEO Share

atoast

Quote from: fullmoonya on February 21, 2012, 09:21:31 PM
Quote from: atoast on February 21, 2012, 11:07:17 AM
is there a way to insert a user's favorite award pic below his avatar/signature? this is the current (standard) code:


// Show their awards?
if (!empty($message['member']['awards']) && $modSettings['awards_in_post'] > 0){
echo '
  <div id="description-wrap" style="margin: 20px auto; width: 700px;">
<div class="description">
<div class="description-text">

<fieldset style="border: 1px solid black; padding: 5px;">
<legend>', $txt['awards'], '</legend>';

// Couldn't limit it in Load.php, so let's do it here.
$awards = 0;
foreach ($message['member']['awards'] as $award){
if($awards < $modSettings['awards_in_post'])
echo '
<a href="', $scripturl, $award['more'], '"><img src="', dirname($scripturl), $award['img'], '" alt="', $award['description'], '" title="', $award['description'], '" /></a> ';
$awards++;
}


find the comment line: avatar, images, etc.? on display.template.php

and add the award code under the code under this commentline.

Thanks for your reply, but I think I my question wasn't clear enough: My problem isnt related to the award's position.

What I want is to display the large award-image of the member's favorite award.

fullmoonya

Quote from: atoast on February 22, 2012, 10:27:07 AM
Quote from: fullmoonya on February 21, 2012, 09:21:31 PM
Quote from: atoast on February 21, 2012, 11:07:17 AM
is there a way to insert a user's favorite award pic below his avatar/signature? this is the current (standard) code:


// Show their awards?
if (!empty($message['member']['awards']) && $modSettings['awards_in_post'] > 0){
echo '
  <div id="description-wrap" style="margin: 20px auto; width: 700px;">
<div class="description">
<div class="description-text">

<fieldset style="border: 1px solid black; padding: 5px;">
<legend>', $txt['awards'], '</legend>';

// Couldn't limit it in Load.php, so let's do it here.
$awards = 0;
foreach ($message['member']['awards'] as $award){
if($awards < $modSettings['awards_in_post'])
echo '
<a href="', $scripturl, $award['more'], '"><img src="', dirname($scripturl), $award['img'], '" alt="', $award['description'], '" title="', $award['description'], '" /></a> ';
$awards++;
}


find the comment line: avatar, images, etc.? on display.template.php

and add the award code under the code under this commentline.

Thanks for your reply, but I think I my question wasn't clear enough: My problem isnt related to the award's position.

What I want is to display the large award-image of the member's favorite award.
sorry for that. i dont know it either. but i think you should look up for the award variable that holds the large images then put it in the display.template.php
do not mark my topic solve unless it is REALLY SOLVED.
my forum

Visit My Blog:
Google SEO Share

Advertisement: