Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Nuke Treasury
Author Message
Susann
Moderator



Joined: Dec 19, 2004
Posts: 3191
Location: Germany:Moderator German NukeSentinel Support

PostPosted: Wed Sep 16, 2009 7:58 am Reply with quote

I have never used this in the past but I installed the US version without issues and now I need to think again which currency I should use.
Facts: I have two sites and one PayPal account.

Site A: People will only donate in Euro
Site:B They will prefer US Dollar.

So how should I handle this ? Would it be cheaper to use only the DE version because of the currency conversion ?


What url should I prefer ?

http://www.paypal.com/en_US/i/btn/x-click-but04.gif

or

http://www.paypal.de/en_US/i/btn/x-click-but04.gif

Also I have fixed all notices exept for 3. Does it matter in any way if I don´t fix these ?

Notice: Undefined variable: PP_IMAGE in /modules/Donations/index.php(169) : eval()'d code on line

Notice: Undefined offset: 1 in /modules/Donations/index.php on line 37

and

Notice: Undefined variable: dentry in /modules/Donations/index.php
on line 172
 
View user's profile Send private message
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Fri Sep 18, 2009 12:21 am Reply with quote

<bump>
 
View user's profile Send private message
duck
Involved
Involved



Joined: Jul 03, 2006
Posts: 273

PostPosted: Fri Sep 18, 2009 8:05 am Reply with quote

Since I am using a different set of files from you I cannot be sure of the issues you are talking about but I believe I can answer 2 of them the 3rd I would need to see your file to solve.


As for

PP_IMAGE look for the line and change it to PP_IMAGE_URL as I believe that is what it should be but looking through mine I also noticed there is a redundant or unnecessary duplicate form element declared.

Notice in this section of code the form has two hidden "iimage_url" inputs

Code:
echo "<input type=\"hidden\" name=\"image_url\" value=\"$PP_IMAGE\">";

echo "<input type=\"hidden\" name=\"custom\" value=\"$USERNAME\">";
echo "<input type=\"hidden\" name=\"cancel_return\" value=\"$PP_CANCEL_URL\">";
echo "<input type=\"hidden\" name=\"return\" value=\"$PP_TY_URL\">";
echo "<input type=\"hidden\" name=\"image_url\" value=\"$PP_IMAGE_URL\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type=\"image\" src=\"$DON_BUTTON_SUBMIT\" border=\"0\" name=\"I1\" $DON_SUB_IMG_DIMS>";
echo "</form>";


I would delete the first on that says PP_IMAGE

As for $dentry that comes down near the bottom of the form and I believe you could just delete that line all together.


Code:
echo "<br><br>$dentry<br>";
 
View user's profile Send private message
Susann







PostPosted: Fri Sep 18, 2009 3:17 pm Reply with quote

Duck thanks! I don´t know what dentry is but I have commented out the line.

The first PP_IMAGE is indeed not required. Therefore I will correct this how I think it´s the best.

3. Notice: Undefined offset: 1 in /modules/Donations/index.php on line 37


Code:
 $username = $cookie[1];

if ($username == "") {
   $username = "Anonymous";


I know this means I would need to change the code just couldn´t figure out how.
 
Palbin
Site Admin



Joined: Mar 30, 2006
Posts: 2583
Location: Pittsburgh, Pennsylvania

PostPosted: Fri Sep 18, 2009 3:52 pm Reply with quote

Make sure $cookie is a global.

global $cookie;

_________________
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan. 
View user's profile Send private message
Susann







PostPosted: Fri Sep 18, 2009 4:03 pm Reply with quote

$cookie; is already in the line global above.
 
Palbin







PostPosted: Fri Sep 18, 2009 5:10 pm Reply with quote

Add $anonymous to the globals and change it to this.

Code:


if (isset($cookie[1])) {
   $username = $cookie[1];
} else {
   $username = $anonymous;
}
 
Susann







PostPosted: Fri Sep 18, 2009 5:35 pm Reply with quote

Thanky you ! This notice is also solved Smile
Should I upload my US version in Mantis ?
I´m working on the DE version too if I can find the time.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Nuke Treasury

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©