Add a logo for each payment system.

Discussion in 'Templates customization' started by venrooy, Jan 11, 2011.

  1. venrooy

    venrooy New Member

    Joined:
    Mar 22, 2007
    Messages:
    12
    I've seen several sites that have been able to add payment logo images right after the description on the payment system line, on the signup.php page - Like a paypal logo, right after the PayPal description.

    How can I do this?

    Thanks.
  2. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    You can use html at aMember CP -> Setup -> PayPal PRO -> Payment system description
  3. venrooy

    venrooy New Member

    Joined:
    Mar 22, 2007
    Messages:
    12
    I've tried that, but when I put html in, extra slashes (/) are added when I save. So when I put in <img src="/plugins/payment/swreg/paypal.gif"> and then save, it turns into : <img src=\"/plugins/payment/swreg/paypal.gif\"> It adds an extra slash before and after the url. And the image is not showing up. Any suggestions for me?

    Thanks.
  4. skippybosco

    skippybosco CGI-Central Partner Staff Member

    Joined:
    Aug 22, 2006
    Messages:
    2,526
    @venrooy: That should work just fine.

    1. what version of amember are you running?
    2. logged on as admin, check your "Version Info" and ensure that magic quotes is set to OFF / Disabled.
    3. try using single quote instead of double quote:

    Code:
    <img src='/plugins/payment/swreg/paypal.gif'>
  5. venrooy

    venrooy New Member

    Joined:
    Mar 22, 2007
    Messages:
    12
    I'm using Script Version: 3.2.3PRO - I also tried the single quote, but it's still adding the \ - slash to beginning and end of the url after I save it. - I'm not sure how to enable/disable magic quotes, but on the version page it shows that it's off.
  6. skippybosco

    skippybosco CGI-Central Partner Staff Member

    Joined:
    Aug 22, 2006
    Messages:
    2,526
    Hmmm I'm not seeing that in my test or production servers (the adding of the extra slash)..

    Are you cutting and pasting from a 3rd party app (Word?) or manually typing the URL in?
  7. venrooy

    venrooy New Member

    Joined:
    Mar 22, 2007
    Messages:
    12
    I've pasted from notepad. But the thing is, it's right when I put it in, but then when I save it, it changes. To me it does sound like magic quotes like you said, but I'm not real sure how to know if it's enabled, or how to disable it.

    By the way, thanks for your help so far.
  8. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    Check in aMember CP -> version Info for magic_quotes_* settings
  9. venrooy

    venrooy New Member

    Joined:
    Mar 22, 2007
    Messages:
    12
    This is what it says on that page:

    magic_quotes_gpc Off Off
    magic_quotes_runtime Off Off
    magic_quotes_sybase Off Off

    So I'm not sure what could be causing it.

    I've integrated it w/ a wordpress blog, would anything from wordpress be causing it?
  10. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    May be this is wordpress code then.
    Can you contact me in helpdesk. Will check what can be wrong.
    Also, You can just edit signup.html template and hardcode payment systems select block the way you need. Just keey radio inputs names and values the same.
  11. alexve

    alexve aMember Pro Customer

    Joined:
    Nov 19, 2010
    Messages:
    14
    Also curious, seeing similar behavior

    Just curious if you figured out what is causing Amember to add numerous of backslashes ('\') to code in the editor when you save it?

    I am seeing similar behavior when I edit and save a html e-mail template in my Amember admin (e.g. for the Send Password to Customer template). Numerous backslashes are added to the code and looks something like this:

    <meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html; charset=utf-8\\\">
    <style type=\\\"text/css\\\">

    As a result the html e-mail is not showing properly when a customer receives it.

    My Amember site is also integrated with WordPress (using config.inc.php & site.inc.php method as described here http://bit.ly/g0WtHv).

    Thanks for looking into this.
  12. venrooy

    venrooy New Member

    Joined:
    Mar 22, 2007
    Messages:
    12
    Yes I just noticed the same thing in an email I just sent out. It ads the slashes right next to any quotation marks. I've put in a ticket, so I'll let you know if they find a fix.
  13. skippybosco

    skippybosco CGI-Central Partner Staff Member

    Joined:
    Aug 22, 2006
    Messages:
    2,526
    For folks seeing the \\ are you all integrated with Wordpress using the config.inc.php hack?

    Does the problem go away if you remove it?
  14. venrooy

    venrooy New Member

    Joined:
    Mar 22, 2007
    Messages:
    12
    I did integrate by changing the config.inc.php - I changed some other files too that I'll have to go back and fix to remove it. I tried using the old config.inc.php file, but then amember gets stuck in a loop where it won't let me log in. If I get time today, then I'll do a fresh install, but I have a feeling that my wordpress integration is causing it somewhere, because I'm using a normal hostgator service, and no one else is complaining of this problem.
  15. skippybosco

    skippybosco CGI-Central Partner Staff Member

    Joined:
    Aug 22, 2006
    Messages:
    2,526
    Curious if that is a consistent data point among the users in this thread having the issue.. the version of Wordpress would be useful as well in case it was something recently introduced.
  16. alexve

    alexve aMember Pro Customer

    Joined:
    Nov 19, 2010
    Messages:
    14
    One step closer to a solution

    Yes, I am using the WordPress integration method by @andyb/@kengary that requires a small modification to config.inc.php and the creation of a site.inc.php. I am using the latest WordPress version btw (v3.0.4).

    After renaming my site.inc.php to site.inc.php.old (removing the integration), the issue remains.

    The good news is that after rolling back the config.inc.php file to the original version, the issue goes away. When saving a HTML e-mail template in Amember admin, the slahes are not added to the HTML e-mail template code. When restoring the modified version of config.inc.php, the slashes are added again after saving an e-mail template in the Admin (breaking the HTML).

    Not sure how to actually fix the behavior with the integration enabled...Any ideas on that?

    Thanks all for helping out here.

    P.S. Rolling back the config.inc.php effectively removes the following code:

    /**
    * WordPress Integration
    *
    */
    define('WP_USE_THEMES', false);

    require_once(dirname(__FILE__).'/../wp-config.php'); // as amember is installed to root folder of wp install

    global $wp;

    $wp->init();
    $wp->parse_request();
    $wp->query_posts();
    $wp->register_globals();


    P.P.S. All 'magic quotes' (gpc, runtime & sybase) are turned off on this VPS too.
  17. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    It seems that wordpress filter input variables on the start.
    Try to do backup variables before you include wordpress code and then restore them.
    PHP:
    $__POST $_POST;
    $__GET $_GET;
    $__REQUEST $_REQUEST;

    define('WP_USE_THEMES'false);

    require_once(
    dirname(__FILE__).'/../wp-config.php'); // as amember is installed to root folder of wp install

    global $wp;

    $wp->init();
    $wp->parse_request();
    $wp->query_posts();
    $wp->register_globals();
    $_POST $__POST;
    $_GET $__GET;
    $_REQUEST $__REQUEST;

    Please let me know if this will not help.
  18. alexve

    alexve aMember Pro Customer

    Joined:
    Nov 19, 2010
    Messages:
    14
    It works!

    After using the suggested code in my config.inc.php, I can save HTML e-mail templates without any problems in Amember admin.

    Thanks very much for your support Alexander :).
  19. streetjammer

    streetjammer New Member

    Joined:
    Mar 18, 2009
    Messages:
    5
    why my website unlockuriphonenow.com is mentioned by venrooy ?
  20. skippybosco

    skippybosco CGI-Central Partner Staff Member

    Joined:
    Aug 22, 2006
    Messages:
    2,526
    @streetjammer: hotlinking your paypal logo image perhaps :-?

Share This Page