News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Mod_akodonate in User Greeting?

Started by Bunny07, September 20, 2006, 08:12:03 PM

Previous topic - Next topic

Bunny07

Hey, I have an interesting request.

www.hostile-minds.com

Do you see the Donation module in the middle of the homepage?  Well I'd like to get that to show up in in the area where it displays your avatar and greeting in the forums, below the place where it says "Hello Your Name"

http://www.hostile-minds.com/index.php?option=com_smf&Itemid=55

Here's the code:

<?php
/**
* AkoDonate - A Mambo Paypal Donate Module
* @version 1.0
* @package AkoDonate
* @copyright (C) 2004 by Arthur Konze - All rights reserved!
* @license http://www.konze.de/content/view/8/26/ Copyrighted Commercial Software
*/

# Don't allow direct acces to the file
  
defined'_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );

# Get the right language if it exists
  
if (file_exists($mosConfig_absolute_path.'/modules/mod_akodonate/'.$mosConfig_lang.'.php')) {
    include(
$mosConfig_absolute_path.'/modules/mod_akodonate/'.$mosConfig_lang.'.php');
  } else {
    include(
$mosConfig_absolute_path.'/modules/mod_akodonate/english.php');
  }

# Setup the module standard parameter settings
  
$business       $params->def'business''[email protected]);
  
$itemname       $params->def'itemname''Donation' );
  
$itemnumber     $params->def'itemnumber''0001' );
  
$introduction   $params->get'introduction' );
  
$target         $params->def'target''_blank' );
  
$usernote       $params->def'usernote');
  
$buttontext     $params->def'buttontext''Donate' );
  
$onceamount     $params->def'onceamount''5' );

#Bring it all to the screen
  
?>

  <!-- AkoDonate - Copyright 2004 by Arthur Konze -->
  <!-- Visit:  www.mamboportal.com & www.konze.de -->
  <!-- The REMOVAL of this note is NOT allowed!!! -->
  <!-- Contact me through my websites for details -->
  <script language="JavaScript">
    <!--
    function ShowHide(id, visibility, displaystyle) {
        obj = document.getElementsByTagName("div");
        obj[id].style.visibility = visibility;
        obj[id].style.display = displaystyle;
    }
    //-->
  </script>
  <style type="text/css">
  #sub1Div {
    visibility       : show;
    display          : block;
  }
  #sub2Div {
    visibility       : hidden;
    display          : none;
  }
  </style>
  <?php
  
if ($introduction)
    echo 
"<p>$introduction</p>";
  
?>

  <b><?php echo _AKODONATE_DONATE?></b>
  <img src="<?php echo $mosConfig_live_site;?>/modules/mod_akodonate/donate_once.png" align="absmiddle" alt="" />
  <a href="javascript:ShowHide('sub2Div','hidden', 'none');ShowHide('sub1Div','visible','block');"><?php echo _AKODONATE_ONCE?></a>
  <img src="<?php echo $mosConfig_live_site;?>/modules/mod_akodonate/donate_monthly.png" align="absmiddle" alt="" />
  <a href="javascript:ShowHide('sub1Div','hidden','none');ShowHide('sub2Div','visible','block');"><?php echo _AKODONATE_MONTHLY?></a>
  <div id="sub1Div">
    <form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="<?php echo $target?>">
      <input type="hidden" name="cmd" value="_xclick" />
      <input type="hidden" name="business" value="<?php echo $business?>" />
      <input type="hidden" name="item_name" value="<?php echo $itemname?>" />
      <input type="hidden" name="item_number" value="<?php echo $itemnumber?>" />
      <input type="hidden" name="no_note" value="<?php echo $usernote?>" />
      <p class="small"><?php echo _AKODONATE_CURRENCY?><br />
      <select class="inputbox" name="currency_code">
        <option value="EUR" selected="selected">Euro</option>
        <option value="USD">US Dollar</option>
        <option value="GBP">Pounds Sterling</option>
        <option value="CAD">Canadian Dollars</option>
        <option value="JPY">Yen</option>
      </select></p>
      <p class="small"><?php echo _AKODONATE_AMOUNT?><br />
      <input class="inputbox" type="text" name="amount" size="15" style="text-align:right;" value="<?php echo $onceamount?>" /></p>
      <input type="hidden" name="tax" value="0" />
      <input class="button" type="submit" value="<?php echo $buttontext?>" style="float:right;" /></form>
    </form>
  </div>
  <div id="sub2Div">
    <form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="<?php echo $target?>">
      <input type="hidden" name="cmd" value="_xclick-subscriptions" />
      <input type="hidden" name="business" value="<?php echo $business?>" />
      <input type="hidden" name="item_name" value="<?php echo $itemname?>" />
      <input type="hidden" name="item_number" value="<?php echo $itemnumber?>" />
      <input type="hidden" name="no_note" value="<?php echo $usernote?>" />
      <p class="small"><?php echo _AKODONATE_CURRENCY?><br />
      <select class="inputbox" name="currency_code">
        <option value="EUR" selected="selected">Euro</option>
        <option value="USD">US Dollar</option>
        <option value="GBP">Pounds Sterling</option>
        <option value="CAD">Canadian Dollars</option>
        <option value="JPY">Yen</option>
      </select></p>
      <p class="small"><?php echo _AKODONATE_AMOUNT?><br />
      <select class="inputbox" name="a3">
        <option value="5.00" selected="selected">5 <?php echo _AKODONATE_MONTH?></option>
        <option value="10.00">10 <?php echo _AKODONATE_MONTH?></option>
        <option value="20.00">20 <?php echo _AKODONATE_MONTH?></option>
        <option value="35.00">35 <?php echo _AKODONATE_MONTH?></option>
        <option value="50.00">50 <?php echo _AKODONATE_MONTH?></option>
        <option value="100.00">100 <?php echo _AKODONATE_MONTH?></option>
      </select></p>
      <input type="hidden" name="p3" value="1" />
      <input type="hidden" name="t3" value="M" />
      <input type="hidden" name="src" value="1" />
      <input type="hidden" name="sra" value="1" />
      <input class="button" type="submit" value="<?php echo $buttontext?>" style="float:right;" /></form>
    </form>
  </div>

Bunny07


Advertisement: