[27/12/06] Paypal Link in Profile

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in here. No new MODs will be accepted into the MOD Database for phpBB2
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.

Rating:

Excellent!
1
20%
Very Good
1
20%
Good
2
40%
Fair
1
20%
Poor
0
No votes
 
Total votes: 5

User avatar
RMcGirr83
Recognised Extension Developer
Posts: 21160
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Post by RMcGirr83 »

eviL<3 wrote: RexxCrow, can you give me more info on that form info? Where do you get it? I've never really used paypal, so i don't really know :P

RMcGirr83, i don't quite understand what you mean :( Please try explain it to me again... sorry :(


What is the link that is added in a users profile to get it to send the clickee to paypal to make a donation?
In times of change, learners inherit the earth, while the learned find themselves beautifully equipped to deal with a world that no longer exists - Eric Hoffer
Former Modifications/Extensions Team Member | My extensions | My extensions are updated regularly on github
Appreciate the extensions/mods/support then buy me a beer
All requests for support via PM will be ignored
User avatar
igorw
Former Team Member
Posts: 8024
Joined: Fri Dec 16, 2005 12:23 pm
Location: {postrow.POSTER_FROM}
Name: Igor Wiedler

Post by igorw »

Aaah, now i get what you mean! So you basicly just enter the email adress, right?
Igor Wiedler | area51 | GitHub | trashbin | Formerly known as evil less than three
User avatar
RMcGirr83
Recognised Extension Developer
Posts: 21160
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Post by RMcGirr83 »

BINGO!!

:D
In times of change, learners inherit the earth, while the learned find themselves beautifully equipped to deal with a world that no longer exists - Eric Hoffer
Former Modifications/Extensions Team Member | My extensions | My extensions are updated regularly on github
Appreciate the extensions/mods/support then buy me a beer
All requests for support via PM will be ignored
DynoGT
Registered User
Posts: 397
Joined: Fri Jan 13, 2006 10:06 pm
Location: Jacksonville, Fl

Post by DynoGT »

Hey RMcGirr83, maybe it's just me but the code you posted here
http://www.phpbb.com/phpBB/viewtopic.ph ... 84#2877884

isn't showing up anymore. Could you post it again please?
User avatar
igorw
Former Team Member
Posts: 8024
Joined: Fri Dec 16, 2005 12:23 pm
Location: {postrow.POSTER_FROM}
Name: Igor Wiedler

Post by igorw »

Okay, i think i could do it as an addon or something. :) DynoGT, it's there, but the page is streched, because somebody posted an oversized image (i think). Just scroll to the right, and you'll see it ;)
Igor Wiedler | area51 | GitHub | trashbin | Formerly known as evil less than three
DynoGT
Registered User
Posts: 397
Joined: Fri Jan 13, 2006 10:06 pm
Location: Jacksonville, Fl

Post by DynoGT »

Thanks Evil, well here's what I've got now.

Image

How can I get the Donation link to show up below the location and is there any way to put some space between the donation link and the location?

And one more thing. How can I put brackets around the link? I'm trying to make it look more like this picture.

Image
User avatar
igorw
Former Team Member
Posts: 8024
Joined: Fri Dec 16, 2005 12:23 pm
Location: {postrow.POSTER_FROM}
Name: Igor Wiedler

Post by igorw »

I think you should understand that minimal ammount of html. If you REALLY don't manage to do it i'll help you. But it'd be nice if you'd try. The file is viewtopic_body.tpl. You have many placeholders, they all have logical names. You should be able to figure it out ;)
Igor Wiedler | area51 | GitHub | trashbin | Formerly known as evil less than three
User avatar
RMcGirr83
Recognised Extension Developer
Posts: 21160
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Post by RMcGirr83 »

I would be interested to know what the link is that DynoGT inserted into the paypal info part of his profile.
In times of change, learners inherit the earth, while the learned find themselves beautifully equipped to deal with a world that no longer exists - Eric Hoffer
Former Modifications/Extensions Team Member | My extensions | My extensions are updated regularly on github
Appreciate the extensions/mods/support then buy me a beer
All requests for support via PM will be ignored
DynoGT
Registered User
Posts: 397
Joined: Fri Jan 13, 2006 10:06 pm
Location: Jacksonville, Fl

Post by DynoGT »

I don't really know much about html. So I don't know what to look for.

As for the link, I haven't put one in yet. I sent paypal an email asking what to use for the link but haven't gotten a response yet.
User avatar
RMcGirr83
Recognised Extension Developer
Posts: 21160
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Post by RMcGirr83 »

For the link visit paypal and click on "member Services". Then choose "PayPal Website Payments Standard -> Learn More"
In times of change, learners inherit the earth, while the learned find themselves beautifully equipped to deal with a world that no longer exists - Eric Hoffer
Former Modifications/Extensions Team Member | My extensions | My extensions are updated regularly on github
Appreciate the extensions/mods/support then buy me a beer
All requests for support via PM will be ignored
DynoGT
Registered User
Posts: 397
Joined: Fri Jan 13, 2006 10:06 pm
Location: Jacksonville, Fl

Post by DynoGT »

Thanks RMcGirr83, I'll look into it.

Evil, I could still use some help if you ever get the chance.
User avatar
jsarber
Registered User
Posts: 28
Joined: Thu Jan 25, 2007 10:32 am
Location: Nappanee, Indiana
Contact:

Re: [27/12/06] Paypal Link in Profile

Post by jsarber »

Any way to only allow members in a certain usergroup to have the donate link?
User avatar
igorw
Former Team Member
Posts: 8024
Joined: Fri Dec 16, 2005 12:23 pm
Location: {postrow.POSTER_FROM}
Name: Igor Wiedler

Re: [27/12/06] Paypal Link in Profile

Post by igorw »

Yes, but unfortunateley i don't have the time to code it :(
Igor Wiedler | area51 | GitHub | trashbin | Formerly known as evil less than three
User avatar
jsarber
Registered User
Posts: 28
Joined: Thu Jan 25, 2007 10:32 am
Location: Nappanee, Indiana
Contact:

Re: [27/12/06] Paypal Link in Profile

Post by jsarber »

Sure, I can understand that. If you ever do though, I'd love to see it posted here. I'll keep my eye on it. I'm not really that advanced in PHP and SQL but I have generally been able to figure things out. I might be able to figure this out too. We'll see. Thanks for the response!
Xondio
Registered User
Posts: 9
Joined: Fri Dec 28, 2007 11:59 pm

Re: [27/12/06] Paypal Link in Profile

Post by Xondio »

Just a headsup (took me a while to figure out what was going wrong!!!)

This mod tries to validate the Paypal entry as if it were a website. So if your users don't include http://, www and a .com it will return blank.

What is much more useful (IMO) is validating it as if it were an e-mail.

Instead of this

Code: Select all

#
#-----[ FIND ]------------------------------------------
#
	if ($website != "")
	{
		if (!preg_match('#^http[s]?:\/\/#i', $website))
		{
			$website = 'http://' . $website;
		}

		if (!preg_match('#^http[s]?\\:\\/\\/[a-z0-9\-]+\.([a-z0-9\-]+\.)?[a-z]+#i', $website))
		{
			$website = '';
		}
	}
#
#-----[ AFTER, ADD ]------------------------------------------
#

//-- mod : Paypal Link in Profile ------------------------------------------------------------
//-- add
	if ( $paypal != '' )
	{
		if (!preg_match('#^http[s]?:\/\/#i', $paypal))
		{
			$paypal = 'http://' . $paypal;
		}

		if (!preg_match('#^http[s]?\\:\\/\\/[a-z0-9\-]+\.([a-z0-9\-]+\.)?[a-z]+#i', $paypal))
		{
			$paypal = '';
		}
	}
//-- fin mod : Paypal Link in Profile --------------------------------------------------------
Use This

Code: Select all

#
#-----[ FIND ]------------------------------------------
#
	if ($website != "")
	{
		if (!preg_match('#^http[s]?:\/\/#i', $website))
		{
			$website = 'http://' . $website;
		}

		if (!preg_match('#^http[s]?\\:\\/\\/[a-z0-9\-]+\.([a-z0-9\-]+\.)?[a-z]+#i', $website))
		{
			$website = '';
		}
	}
#
#-----[ AFTER, ADD ]------------------------------------------
#

        //-- mod : Paypal Link in Profile ------------------------------------------------------------
		if ( $paypal != '' )
		{
			if (!preg_match('/^[a-z0-9&\'\.\-_\+]+@[a-z0-9\-]+\.([a-z0-9\-]+\.)*?[a-z]+$/is', $paypal))
			{
				$paypal = 'Sorry Not A Valid E-mail';
			}
	
		}
	//-- fin mod : Paypal Link in Profile --------------------------------------------------------
I know this is sloppy, as it doesn't actually return an error to the user, but if you look up at the "validate_email" function, you can see how to do it better there.
Post Reply

Return to “[2.0.x] MOD Database Releases”