Posts: 3,218
Threads: 489
Joined: Oct 2007
Reputation:
26
2007-11-10, 06:09 AM
saw this on another post, but the topic was closed so I couldn't reply to it =(
Anyhow, I'd like to integrate this code into my forums, at the top, next to where the search, member list, calendar and buttons are, if it's possible and make it so it'll look like the other text styles so it's not a big blurb!
This is the code and link from paypal.
<form name="_xclick" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="[email protected]">
<input type="hidden" name="item_name" value="Team In Training">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="amount" value="25.00">
<input type="image" src="http://www.paypal.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
</form>
https://www.paypal.com/cgi-bin/webscr?cm...ew_outside
Posts: 4,639
Threads: 68
Joined: Mar 2007
Reputation:
42
2007-11-10, 06:28 AM
You can place it in the header template.
Did you want it to be displayed as a button, or as a text link, like those at the top of the page?
Posts: 3,218
Threads: 489
Joined: Oct 2007
Reputation:
26
2007-11-10, 06:38 AM
I guess text like you see with "Search, Members list, Calendar, etc"
Posts: 3,218
Threads: 489
Joined: Oct 2007
Reputation:
26
2007-11-10, 06:22 PM
Posts: 4,639
Threads: 68
Joined: Mar 2007
Reputation:
42
2007-11-11, 12:05 AM
There is no particularly easy solution. This is because POST forms are not designed to be usable through text links.
There are some alternatives:
1) Remove src="http://www.paypal.com/en_US/i/btn/btn_donate_LG.gif" in your above code
2) Use a Javascript link to submit the form.
Posts: 3,218
Threads: 489
Joined: Oct 2007
Reputation:
26
2007-11-11, 02:52 AM
Ok, then what file would I open and where in the code would I add the link to the button to line it up with the "search, memberlist, calendar and help" buttons?
Posts: 4,639
Threads: 68
Joined: Mar 2007
Reputation:
42
2007-11-11, 03:17 AM
(This post was last modified: 2007-11-11, 03:17 AM by Yumi.)
AdminCP -> Templates -> Modify -> <your templateset> -> header
If you look there, there should be some code like:
<li><a href="{$mybb->settings['bburl']}/search.php"><img src="{$mybb->settings['bburl']}/{$theme['imgdir']}/toplinks/search.gif" alt="" valign="middle" style="vertical-align: middle" />{$lang->toplinks_search}</a></li>
<li><a href="{$mybb->settings['bburl']}/memberlist.php"><img src="{$mybb->settings['bburl']}/{$theme['imgdir']}/toplinks/memberlist.gif" alt="" valign="middle" style="vertical-align: middle" />{$lang->toplinks_memberlist}</a></li>
<li><a href="{$mybb->settings['bburl']}/calendar.php"><img src="{$mybb->settings['bburl']}/{$theme['imgdir']}/toplinks/calendar.gif" alt="" valign="middle" style="vertical-align: middle" />{$lang->toplinks_calendar}</a></li>
<li><a href="{$mybb->settings['bburl']}/misc.php?action=help"><img src="{$mybb->settings['bburl']}/{$theme['imgdir']}/toplinks/help.gif" alt="" valign="middle" style="vertical-align: middle" />{$lang->toplinks_help}</a></li>
After that, add a <li> tag, and place your code in there, ie:
<li><form name="_xclick" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="[email protected]">
<input type="hidden" name="item_name" value="Team In Training">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="amount" value="25.00">
<input type="image" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
</form></li>
Posts: 3,218
Threads: 489
Joined: Oct 2007
Reputation:
26
2007-11-12, 08:19 PM
Ty, that worked, but 2 of my templates are setup differently. where would I place the above code in these 2 theme headers?
<div id="topheader"><img name="main_nav" src="images/lagniappe/main_nav.gif" width="878" height="126" border="0" id="main_nav" usemap="#m_main_nav" alt="" /><map name="m_main_nav" id="m_main_nav">
<area shape="rect" coords="646,29,723,126" href="{$mybb->settings['bburl']}/misc.php?action=syndication" alt="RSS" />
<area shape="rect" coords="549,29,626,126" href="{$mybb->settings['bburl']}/misc.php?action=help" alt="Help" />
<area shape="rect" coords="445,29,522,126" href="{$mybb->settings['bburl']}/search.php" alt="Search" />
<area shape="rect" coords="340,29,417,126" href="{$mybb->settings['bburl']}/memberlist.php" alt="Members List" />
<area shape="rect" coords="240,29,317,126" href="{$mybb->settings['bburl']}/calendar.php" alt="Calendar" />
<area shape="rect" coords="141,29,218,126" href="{$mybb->settings['bburl']}/index.php" alt="Home" />
</map></div>
<div id="board">
<a name="top" id="top"></a>
<div id="container">
<div id="padding">
<div id="header">
<hr class="hidden" />
<div id="panel">
{$welcomeblock}
</div>
</div>
<hr class="hidden" />
<br class="clear" />
<!--QUOTES-->
<div id="content">
{$bannedwarning}
{$bbclosedwarning}
{$unreadreports}
<navigation><br />$boardmessage<br />
<br class="clear" />
<a name="top" id="top"></a>
<div id="left_img">
<div id="right_img">
<div id="container">
<div id="header">
<table width=100% border=0 cellpadding=0 cellspacing=0> <td rowspan=4 width=100% height=105 background="{$mybb->settings['bburl']}/{$theme['imgdir']}/logorepeat.gif">
</td>
</tr>
<td colspan=4>
<a href="{$mybb->settings['bburl']}/index.php"><img src="{$mybb->settings['bburl']}/{$theme['imgdir']}/logo.gif" width=350 height=110 alt=""></td>
</tr>
</table>
<table border="0" cellspacing=0 cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td class="toplinks" align="center" width="5"></td>
<td class="toplinks" align="center" width="50"><span class="smalltext"><strong><a href="{$mybb->settings['bburl']}/portal.php">Home</a></strong></span></td>
<td class="toplinks" align="center" width="55"><span class="smalltext"><strong><a
href="{$mybb->settings['bburl']}/index.php">Forum</a></strong></span></td>
<td style="background-image: url({$theme['imgdir']}/tlrepeat.gif); padding: 8px;" align="center" colspan="8"><span class="smalltext"></span></td>
<td class="toplinks" align="center" width="55"><span class="smalltext"><strong><a
href="{$mybb->settings['bburl']}/search.php">{$lang->toplinks_search}</a></strong></span></td>
<td class="toplinks" align="center" width="80"><span class="smalltext"><strong><a
href="{$mybb->settings['bburl']}/memberlist.php">{$lang->toplinks_memberlist}</a></strong></span></td>
<td class="toplinks" align="center" width="60"><span class="smalltext"><strong><a
href="{$mybb->settings['bburl']}/calendar.php">{$lang->toplinks_calendar}</a></strong></span></td>
<td class="toplinks" align="center" width="40"><span class="smalltext"><strong><a
href="{$mybb->settings['bburl']}/misc.php?action=help">{$lang->toplinks_help}</a></strong></span></td>
<td class="toplinks" align="center" width="5"></td>
</tr>
</table>
</td></tr></table>
<br>
<div class="menu">
</div>
<hr class="hidden" />
<div id="panel">
{$welcomeblock}
</div>
</div>
<hr class="hidden" />
<br class="clear" />
<!--QUOTES-->
<div id="content">
{$bannedwarning}
{$bbclosedwarning}
{$unreadreports}
<navigation><br />$boardmessage
<br class="clear" />
Posts: 3,218
Threads: 489
Joined: Oct 2007
Reputation:
26
2007-11-14, 05:29 AM
Posts: 4,639
Threads: 68
Joined: Mar 2007
Reputation:
42
2007-11-14, 05:49 AM
1st one: probably only possible through Javascript.
2nd one:
<a name="top" id="top"></a>
<div id="left_img">
<div id="right_img">
<div id="container">
<div id="header">
<table width=100% border=0 cellpadding=0 cellspacing=0> <td rowspan=4 width=100% height=105 background="{$mybb->settings['bburl']}/{$theme['imgdir']}/logorepeat.gif">
</td>
</tr>
<td colspan=4>
<a href="{$mybb->settings['bburl']}/index.php"><img src="{$mybb->settings['bburl']}/{$theme['imgdir']}/logo.gif" width=350 height=110 alt=""></td>
</tr>
</table>
<table border="0" cellspacing=0 cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td class="toplinks" align="center" width="5"></td>
<td class="toplinks" align="center" width="50"><span class="smalltext"><strong><a href="{$mybb->settings['bburl']}/portal.php">Home</a></strong></span></td>
<td class="toplinks" align="center" width="55"><span class="smalltext"><strong><a
href="{$mybb->settings['bburl']}/index.php">Forum</a></strong></span></td>
<td style="background-image: url({$theme['imgdir']}/tlrepeat.gif); padding: 8px;" align="center" colspan="8"><span class="smalltext"></span></td>
<td class="toplinks" align="center" width="55"><span class="smalltext"><strong><a
href="{$mybb->settings['bburl']}/search.php">{$lang->toplinks_search}</a></strong></span></td>
<td class="toplinks" align="center" width="80"><span class="smalltext"><strong><a
href="{$mybb->settings['bburl']}/memberlist.php">{$lang->toplinks_memberlist}</a></strong></span></td>
<td class="toplinks" align="center" width="60"><span class="smalltext"><strong><a
href="{$mybb->settings['bburl']}/calendar.php">{$lang->toplinks_calendar}</a></strong></span></td>
<td class="toplinks" align="center" width="40"><span class="smalltext"><strong><a
href="{$mybb->settings['bburl']}/misc.php?action=help">{$lang->toplinks_help}</a></strong></span></td>
<td class="toplinks" align="center" width="40"><span class="smalltext"><strong><form name="_xclick" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="[email protected]">
<input type="hidden" name="item_name" value="Team In Training">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="amount" value="25.00">
<input type="image" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
</form></strong></span></td>
<td class="toplinks" align="center" width="5"></td>
</tr>
</table>
</td></tr></table>
<br>
<div class="menu">
</div>
<hr class="hidden" />
<div id="panel">
{$welcomeblock}
</div>
</div>
<hr class="hidden" />
<br class="clear" />
<!--QUOTES-->
<div id="content">
{$bannedwarning}
{$bbclosedwarning}
{$unreadreports}
<navigation><br />$boardmessage
<br class="clear" />
|