PaypalDonations

Started by snork13, February 06, 2006, 11:36:58 PM

Previous topic - Next topic

snork13

Quote from: snork13 on December 20, 2006, 03:56:13 PM
in file sources/ModSettings.php
   
  find:

   require_once($sourcedir . '/ManageServer.php');

   $context['page_title'] = $txt['modSettings_title'];
   $context['sub_template'] = 'show_settings';

   $subActions = array(
      'basic' => 'ModifyBasicSettings',
      'layout' => 'ModifyLayoutSettings',
      'karma' => 'ModifyKarmaSettings',


  replace with:


require_once($sourcedir . '/ManageServer.php');

   $context['page_title'] = $txt['modSettings_title'];
   $context['sub_template'] = 'show_settings';

   $subActions = array(
      'basic' => 'ModifyBasicSettings',
      'layout' => 'ModifyLayoutSettings',
      'karma' => 'ModifyKarmaSettings',
      'paypal' => 'ModifypayPalSettings',

 

find:

function ModifyFeatureSettings2()
{
   global $context, $txt, $scripturl, $modSettings, $sourcedir;

   isAllowedTo('admin_forum');
   loadLanguage('ModSettings');

   // Quick session check...
   checkSession();

   require_once($sourcedir . '/ManageServer.php');

   $subActions = array(
      'basic' => 'ModifyBasicSettings',
      'layout' => 'ModifyLayoutSettings',
      'karma' => 'ModifyKarmaSettings',
   );

   // Default to core (I assume)
   $_REQUEST['sa'] = isset($_REQUEST['sa']) && isset($subActions[$_REQUEST['sa']]) ? $_REQUEST['sa'] : 'basic';
   // Actually call the saving function.
   $subActions[$_REQUEST['sa']]();
}


   replace with:

function ModifyFeatureSettings2()
{
   global $context, $txt, $scripturl, $modSettings, $sourcedir;

   isAllowedTo('admin_forum');
   loadLanguage('ModSettings');

   // Quick session check...
   checkSession();

   require_once($sourcedir . '/ManageServer.php');

   $subActions = array(
      'basic' => 'ModifyBasicSettings',
      'layout' => 'ModifyLayoutSettings',
      'karma' => 'ModifyKarmaSettings',
      'paypal' => 'ModifypayPalSettings',
   );

   // Default to core (I assume)
   $_REQUEST['sa'] = isset($_REQUEST['sa']) && isset($subActions[$_REQUEST['sa']]) ? $_REQUEST['sa'] : 'basic';

   // Actually call the saving function.
   $subActions[$_REQUEST['sa']]();
}

find:


         'karma' => array(
            'title' => $txt['smf293'],
            'href' => $scripturl . '?action=featuresettings;sa=karma;sesc=' . $context['session_id'],
            'is_last' => true,
         ),


replace with:


         'karma' => array(
            'title' => $txt['smf293'],
            'href' => $scripturl . '?action=featuresettings;sa=karma;sesc=' . $context['session_id'],
         ),
         'paypal' => array(
            'title' => $txt['payPalFO'],
            'href' => $scripturl . '?action=featuresettings;sa=paypal;sesc=' . $context['session_id'],
            'is_last' => true,
         ),

find:

   $context['post_url'] = $scripturl . '?action=featuresettings2;save;sa=karma';
   $context['settings_title'] = $txt['smf293'];

   prepareDBSettingContext($config_vars);
}


add after:


function ModifypayPalSettings()
{
   global $txt, $scripturl, $context, $settings, $sc;

   $config_vars = array(
         // Paypal Donations - On or off?
         array('check', 'payPalEnable'),
      '',
         // Paypal key and Reason
         array('large_text', 'payPalReason','10'),
         array('large_text', 'payPalKey','8'),
           
   );

   // Saving?
   if (isset($_GET['save']))
   {
      saveDBSettings($config_vars);
      redirectexit('action=featuresettings;sa=paypal');
   }

   $context['post_url'] = $scripturl . '?action=featuresettings2;save;sa=paypal';
   $context['settings_title'] = $txt['payPalFO'];

   prepareDBSettingContext($config_vars);
}


-snork13

Mods
Please DO NOT PM me with requests for individual support, but post your questions and concerns in the appropriate section of the forum where other users can benefit from them as well. Thank you.
I have been super busy as of late. Working on updates to all my modifications for 2.0.1

GPGrieco

all of the "replace with" and "add after" was already done. I had to manually edit it to get the mod to work. as seen in the original post I was getting errors, that was because other mods already edited those files. What now?

snork13

Quote from: GPGrieco on April 05, 2007, 09:50:15 PM
all of the "replace with" and "add after" was already done. I had to manually edit it to get the mod to work. as seen in the original post I was getting errors, that was because other mods already edited those files. What now?

Did you run through the package manager and then make the manual edits? Do you have access to check the database has been populated?
Mods
Please DO NOT PM me with requests for individual support, but post your questions and concerns in the appropriate section of the forum where other users can benefit from them as well. Thank you.
I have been super busy as of late. Working on updates to all my modifications for 2.0.1

GPGrieco

when you say to check if the database has been populated, do you mean ftp access? If so yes. What would I be looking for?

snork13

Quote from: GPGrieco on April 06, 2007, 12:08:48 AM
when you say to check if the database has been populated, do you mean ftp access? If so yes. What would I be looking for?

You would need access to the database maybe via phpmyadmin if your host offers such a program?

Your looking for the database entrys that hold the info that is missing.  If you ran through the package manager then it should have run the querys needed. If you edited manually then you'll need to run add_settings.php from the package.
Mods
Please DO NOT PM me with requests for individual support, but post your questions and concerns in the appropriate section of the forum where other users can benefit from them as well. Thank you.
I have been super busy as of late. Working on updates to all my modifications for 2.0.1

GPGrieco

I ran it through the package manager, then manually made the modifications to the ones that had a problem.

snork13

Quote from: GPGrieco on April 06, 2007, 12:25:24 PM
I ran it through the package manager, then manually made the modifications to the ones that had a problem.


ok, that should have added the database settings. Can you post your modSettings.php file with the changes made. I'll take a look.
Mods
Please DO NOT PM me with requests for individual support, but post your questions and concerns in the appropriate section of the forum where other users can benefit from them as well. Thank you.
I have been super busy as of late. Working on updates to all my modifications for 2.0.1

GPGrieco

Ok, I attached the file for you.

snork13

Quote from: GPGrieco on April 06, 2007, 02:03:19 PM
Ok, I attached the file for you.
ok, the file looks good. do you have access to the database? Can you check smf_settings for the modsetting array:

$mod_settings = array(
   'payPalEnable'
   'payPalKey'
   'payPalReason'
Mods
Please DO NOT PM me with requests for individual support, but post your questions and concerns in the appropriate section of the forum where other users can benefit from them as well. Thank you.
I have been super busy as of late. Working on updates to all my modifications for 2.0.1

GPGrieco

when I go into the database it is showing them as variables and the values are

paypalenable          0
paypalkey              the string of code that I got from paypal for the button
paypalreason          the reason that I entered in the settings for this mod.


   

snork13

Quote from: GPGrieco on April 06, 2007, 02:50:00 PM
when I go into the database it is showing them as variables and the values are

paypalenable          0
paypalkey              the string of code that I got from paypal for the button
paypalreason          the reason that I entered in the settings for this mod.


  

enable the mod in the admin panel and make sure you are using the default theme.
Mods
Please DO NOT PM me with requests for individual support, but post your questions and concerns in the appropriate section of the forum where other users can benefit from them as well. Thank you.
I have been super busy as of late. Working on updates to all my modifications for 2.0.1

GPGrieco

OK I enabled it, now I see it. I am not sure if it was there before, but I didn't realize that it just put a button on the menu. Is there any way to get it to display below the menu on the homepage?

snork13

Quote from: GPGrieco on April 06, 2007, 03:13:55 PM
OK I enabled it, now I see it. I am not sure if it was there before, but I didn't realize that it just put a button on the menu. Is there any way to get it to display below the menu on the homepage?

homepage? you could you the ssi function?
Mods
Please DO NOT PM me with requests for individual support, but post your questions and concerns in the appropriate section of the forum where other users can benefit from them as well. Thank you.
I have been super busy as of late. Working on updates to all my modifications for 2.0.1

GPGrieco

what do you mean ssi function. I have used that before, but when I go to the ssi_examples page, there is no code for the paypal donations. Is there a code for it?

snork13

Quote from: GPGrieco on April 06, 2007, 03:30:14 PM
what do you mean ssi function. I have used that before, but when I go to the ssi_examples page, there is no code for the paypal donations. Is there a code for it?


no, but you can call the menu
Mods
Please DO NOT PM me with requests for individual support, but post your questions and concerns in the appropriate section of the forum where other users can benefit from them as well. Thank you.
I have been super busy as of late. Working on updates to all my modifications for 2.0.1

GPGrieco

oh, no thats not what I was thinking of. I was thinking of having the button on the homepage. I guess this is ok.


Thank you for your help. I really appriacate it.

snork13

Quote from: GPGrieco on April 06, 2007, 04:39:18 PM
oh, no thats not what I was thinking of. I was thinking of having the button on the homepage. I guess this is ok.


Thank you for your help. I really appriacate it.

you could always use <a href="link to your donation">Donate</a>

hope you get the idea :)
Mods
Please DO NOT PM me with requests for individual support, but post your questions and concerns in the appropriate section of the forum where other users can benefit from them as well. Thank you.
I have been super busy as of late. Working on updates to all my modifications for 2.0.1

Benan

I installed this mod sucessfully (as SMF said) but i dont get no Donate thing any where and i dont get the 2 text boxes,



im using... SMF 1.1.2

snork13

Quote from: Benan on April 10, 2007, 05:41:50 AM
I installed this mod sucessfully (as SMF said) but i dont get no Donate thing any where and i dont get the 2 text boxes,



im using... SMF 1.1.2

Can you check the default theme?
Mods
Please DO NOT PM me with requests for individual support, but post your questions and concerns in the appropriate section of the forum where other users can benefit from them as well. Thank you.
I have been super busy as of late. Working on updates to all my modifications for 2.0.1

Advertisement: