News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

PayPal Donate Button Under Menu

Started by Burke ♞ Knight, October 19, 2013, 06:19:23 PM

Previous topic - Next topic

Burke ♞ Knight

PayPal Donate Button Under Menu

Version: 1.1
Compatibility: SMF 2.0.x

Made by: BurkeKnight - BurkeKnight Enterprises

This modification adds a way for the admin to add a PayPal Donate button to their site.
It will place it below the main menu, above the linktree.

You need to have a PayPal account, and will need to set up your PayPal donate button.

SMF 2.0.x: Admin > Modifications

Support:
If need support for this mod, please go to BurkeKnight Enterprises and register there.

We have a support ticket system for mod support.

We will no longer be supporting this mod here at the SMF site,
as we feel it is easier to keep all support at our site.


Changelog:

Version: 1.1 Date: September 17, 2014
         Fixed issue of not showing in mod settings page.
         Removed the Replace SMF Logo version.

Version: 1.0 Date: September 29, 2013
         Mod initially made.




To all users of my mods and themes. I am happy that you have chosen my work to add to your site.
I now have a support ticket system for support of my mods and themes. It is located at:

http://www.burkeknight.com/index.php?action=helpdesk

You have to be registered at my site, to use the support system.
There are 3 departments in the system as of now:

SMF 2.0.x Mod Support
SMF 2.0.x Theme Support
Web Site Templates Support

I would prefer to handle all support for my mods and themes, including any BK-SMF and BK Modding mods and themes there, as I can do that more efficiently. But, I will, of course, still monitor the support topics, here, as well.
This will make things easier for me and the users of my mods and themes, as most of my updates and changes are put on my main site, first.

Thank you, and I apologize for any inconvenience this may cause.

Burke Knight

BurkeKnight Enterprises
Formerly BK Modding and BK-SMF

johnpaul2k2

Good Mod :)

but if i wanted to place the button any way , apart from these 2 positions mentioned ?

Burke ♞ Knight

Can just modify the index.template.php file.

Just search for the location of the donate_code and should be able to move where ever you want it.
Both types have the same call, so this should work, no matter which you downloaded. :)


fmofmpls

Where are the settings found for this mod?

Burke ♞ Knight

Admin -> Configuration -> Modification Settings -> Miscellaneous

Should see:


Please enter your PayPal Donate Button HTML code:

HusaBob

I installed this mod in my forum, 2.0.6 and went exactly where you said, and there was nothing listed at all under Miscellaneous!

Any help please??

HusaBob

Quote from: HusaBob on December 30, 2013, 01:51:15 PM
I installed this mod in my forum, 2.0.6 and went exactly where you said, and there was nothing listed at all under Miscellaneous!

Any help please??

BUMP

PhuriousGeorge

Quote from: HusaBob on December 30, 2013, 01:51:15 PM
I installed this mod in my forum, 2.0.6 and went exactly where you said, and there was nothing listed at all under Miscellaneous!

Any help please??

Were there any errors showing during your modification install? If you don't remember, either uninstall/reinstall to check, or parse the mod against your SMF version and ensure the code changes are in the files specified. This mod makes relatively simple changes.

margarett

Quote from: HusaBob on December 30, 2013, 01:51:15 PM
I installed this mod in my forum, 2.0.6 and went exactly where you said, and there was nothing listed at all under Miscellaneous!

Any help please??
Sometimes an image is worth a thousand words ;)

I installed this in my test forum (the version that replaces SMF Logo), clean install
Not only nothing shows up in ModSettings, but it broke my layout completely (see attached img1)

The version "under the menu" also shows no Donate button (local connection issue from my test board, maybe) in index, does not break the layout, but also shows nothing in ModSettings...
No errors are reported in Error Log.

The look of "Modification Settings" is as attached img2
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Burke ♞ Knight

I have no idea why those issues came up.
This mod was fully tested, by me, and Cust team, without issues.

Could try removing one of the closing div at end of the index.template.php file in the SMF logo replace one.

As for why not showing up in mod settings, I have no idea.
Make sure this line did get entered:

array('large_text', 'donate_code', '4'),

Then check the Modifications.english.php for this:

$txt['donate_code'] = 'Please enter your PayPal Donate Button HTML code:';

Also, no Donate button will show, until you enter your PayPal button code into the box in the mod settings.

margarett

Quote from: BurkeKnight on January 06, 2014, 05:59:03 PM
Also, no Donate button will show, until you enter your PayPal button code into the box in the mod settings.
This explains a lot :P Sorry, didn't look into it in detail. My bad :(

Quote from: BurkeKnight on January 06, 2014, 05:59:03 PM
array('large_text', 'donate_code', '4'),
This explains it.
This is how it turns out:
$config_vars = array(
// Mod authors, add any settings UNDER this line. Include a comma at the end of the line and don't remove this statement!!                array('large_text', 'donate_code', '4'),

Set it correctly brings the modification settings back ;)
$config_vars = array(
// Mod authors, add any settings UNDER this line. Include a comma at the end of the line and don't remove this statement!!
array('large_text', 'donate_code', '4')


The layout I can't explain...

edit: now I can :P
this is how it should (I think) be in index.template.php
if(!empty($modSettings['donate_code']))
echo '
<br /><div id="donate">', $modSettings['donate_code'], '</div>';
echo '
</div>
<div id="upper_section" class="middletext"', empty($options['collapse_header']) ? '' : ' style="display: none;"', '>
<div class="user">';
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

HusaBob

I installed it exactly the way the author said and nothing appeared under the Misc section....

So I just used a hyperlink to my paypal account in a message.

Burke ♞ Knight

I have recently tested this in full sites with mods and a clean test site.
The settings appear for me.

Somehow, it seems that there may have been a small change in the mod settings.
As Margarett shows above, the comma, which should be there to work, seems to be removed in order to show the settings.
I have no idea how that worked, because I was always sure the comma needed to be there, but if MArgarett says it works, try it. :)

margarett

Oh sorry, it's not the comma. That has to be there, it's a typo from me. What happens is that the new array in modsettings is placed inline with the comment, thus being a comment itself...
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Burke ♞ Knight

Strange that this happens on some, but not others.
I have checked the files I have and they all have the line space.
So, no idea how this is happening.

johnpaul2k2

sorry but after installing , i didn't see anything on  paypal  under  Admin -> Configuration -> Modification Settings -> Miscellaneous  :(

margarett

Did you read the posts above? I said how to fix that...
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

johnpaul2k2

please where can i locate Modifications.english.php  ?


i have forgotten

margarett

Check Sources/ManageSettings.php for this
Quote from: margarett on January 06, 2014, 06:20:58 PM
This is how it turns out:
$config_vars = array(
// Mod authors, add any settings UNDER this line. Include a comma at the end of the line and don't remove this statement!!                array('large_text', 'donate_code', '4'),

Set it correctly brings the modification settings back ;)
$config_vars = array(
// Mod authors, add any settings UNDER this line. Include a comma at the end of the line and don't remove this statement!!
array('large_text', 'donate_code', '4'),

Check Themes/default/languages/Modifications.english.php for this (check if it exists, it should)
Quote from: BurkeKnight on January 06, 2014, 05:59:03 PM
$txt['donate_code'] = 'Please enter your PayPal Donate Button HTML code:';
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Advertisement: