Member Awards (2.0 Compatible!)

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

Previous topic - Next topic

Kimmie

#700
Quote from: YodaOfDarkness on July 27, 2008, 01:06:56 PM
Kimmie - here's the fixed file.


Thanks but unfortunately now when I click on the awards link in the admin panel I get this:

Parse error: syntax error, unexpected T_IF in /home/patriotg/public_html/Sources/ManageAwards.php on line 1

Would the fact that when I opened that file (after getting the error), its all garbled together now be whats causing the error? (see image)

Edit: If you cant get it fixed thats ok.. the previous error I posted is the only error I am getting now and I only get that error when I upload an image. Since I wont be uploading images that often, I can probably live with it :)

Fustrate

It's because I'm on a mac - here's a fixed one...
Steven Hoffman
Former Team Member, 2009-2012

Kimmie

Quote from: YodaOfDarkness on July 27, 2008, 09:15:38 PM
It's because I'm on a mac - here's a fixed one...

that one seemed to work. No errors when I upload.. :) :) :)

I will assume the fact that I dont have that awardsDir table, that its ok? I will let you know if I encounter any more errors.

Thanks again for all the help :)

Fustrate

it's not a table - it's a row in a table.

And it's actually supposed to be pa_awardsDir in the code, so I think everyone who is using this mod is going to have that error.
Steven Hoffman
Former Team Member, 2009-2012

bubs

when i go to award menu, i got this:

QuoteDatabase Error
Unknown column 'awardName' in 'field list'
File: /home/xxxx/public_html/forum/Sources/ManageAwards.php
Line: 193

Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 1.1.2, while your database is at version 1.1.1. The above error might possibly go away if you execute the latest version of upgrade.php.

can anyone help me with this?

Fustrate

Can you do two things for me? The last person who had this error never replied, so I'm going to need to try a few different things.

1. Open your database (usually with phpMyAdmin) and check for a table name ending in 'awards'.

2. Attach your ManageAwards.php file to a reply here.
Steven Hoffman
Former Team Member, 2009-2012

bubs

#706
1. im checking, and then what to do?
2. i attach the manage awards


Fustrate

I don't see any problems with the file... but I did a few things to it anyways, and it's worth a shot.

Is there an _awards table? If not, then I can give you a php script that'll fix that for you. Hopefully you don't need it though...
Steven Hoffman
Former Team Member, 2009-2012

bubs

yes there is smf_awards database, does it need to be fixed?

bubs

#709
YodaOfDarkness, it's working when i click on AWards menu...
but when i try to assign, the error appear:

Database Error
Unknown column 'awardName' in 'field list'
File: /home/fairyfly/public_html/forum/Sources/ManageAwards.php
Line: 594

Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 1.1.2, while your database is at version 1.1.1. The above error might possibly go away if you execute the latest version of upgrade.php.

Fustrate

Sounds like the table needs to be fixed.

Click 'Browse' along the top row of buttons, and tell me what field names show up (like 'gameName', 'ID_AWARD', 'filename', etc.). Is 'awardName' there?
Steven Hoffman
Former Team Member, 2009-2012

bubs

#711
this is the fields name:
ID_AWARD    ID_AWARDED_MEMBER    title    givenDate    ID_MEMBER    memberName

also when i open my profile and other's profile, this is appear:

QuoteFatal error: Cannot redeclare awards() (previously declared in /home/fairyfly/public_html/forum/Sources/Profile.php:2904) in /home/fairyfly/public_html/forum/Sources/Profile.php on line 3063

Fustrate

Sounds like you're actually using a different mod... those aren't rows in any of the tables that this mod uses. Did you install "Member Awards" or "Simple Awards"?
Steven Hoffman
Former Team Member, 2009-2012

bubs

well, i installed simple awards, but then i decided to use member awards, when i want to uninstall the simple award, it says i shouldn't do it or it will give me an error...im really confuse

Fustrate

Hmm... that's sort of tricky. Best thing I can think of is to ignore the error and uninstall both mods, and then delete all tables that have anything to do with 'awards' from your database. Then install this mod again, and it should (hopefully) work.
Steven Hoffman
Former Team Member, 2009-2012

bubs

yes, it's working...thank you so much for your help YodaOfDarkness :)

tk2012

#716
v2.0 b3.1  (fresh install, upgrade done, no other mods present, sticking with default theme)

-was able to install the mod without any problems
-was able to edit the ManageAwards.php file without any problems
-was able to add categories without any problems




The Error:

When I go to upload an award, I fill out all the info, browse for my file (.gif), and then submit.  I get the following error:

Undefined type used in the database query

When I go to my error log, I see the following:
(NOTE: I "XXX" out my folder name because I'd rather not have that show,yet)

http://www.motorstorm-rpms.org/XXXXXXXXX/index.php?action=admin;area=awards;sa=modify
Undefined type used in the database query
Function: AwardsSave
File: /var/www/html/community/Sources/ManageAwards.php
Line: 299


When I pull up that file, I get this result on Line 299:

// Clean the values
$_REQUEST['award_name'] = strtr($smcFunc['htmlspecialchars']($_REQUEST['award_name'], ENT_QUOTES), array("\r" => '', "\n" => '', "\t" => ''));
$_REQUEST['description'] = strtr($smcFunc['htmlspecialchars']($_REQUEST['description'], ENT_QUOTES), array("\r" => '', "\n" => '', "\t" => ''));
$category = (int) $_REQUEST['id_category'];
$time_added = time();

// Now to insert the data for this new award.
if ($_REQUEST['id'] == 0){
$smcFunc['db_insert']('replace',
'{db_prefix}awards',
array('award_name' => 'string', 'description' => 'string', 'time_added' => 'int', 'id_category'),
array($_POST['award_name'], $_POST['description'], $time_added, $category),
array('id_award')
);


Line 299 is the last line      );

I didn't do any manual edits.  Everything tested fine when uploading/installing. 


(Just being overly detailed here, but the file you gave me in the link is titled differently than the one that is on the Mod Link... not sure if there is a difference, but I used the file from the link you sent me.)

Fustrate

I had fixed that in my personal test forum, but not in the package itself ;) sorry 'bout that

replace
         array('award_name' => 'string', 'description' => 'string', 'time_added' => 'int', 'id_category'),
with
         array('award_name' => 'string', 'description' => 'string', 'time_added' => 'int', 'id_category' => 'int'),
Steven Hoffman
Former Team Member, 2009-2012

Kimmie

#718
I dont see anything on mine regarding categories. Is it supposed to have them?

These are the 3 that I have: Award Name:  Game Name:  Upload Award:

If I could add them to specific categories and then be able to sort them by category that would be GREAT!

Mother Goose

Just stopping by.. pay no attention... 


Yoda Yoda Yoda!!!
   

Advertisement: