vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=236)
-   -   End-User Options - UKBL ~ "Buy Me a Beer" Hack (https://vborg.vbsupport.ru/showthread.php?t=205166)

unicorn2433 02-13-2009 12:57 PM

Silly question. When they buy the item who are they paying?
The message board owner. Just curious. I am slow...lol

TimberFloorAu 02-13-2009 01:04 PM

Quote:

Originally Posted by unicorn2433 (Post 1742843)
Silly question. When they buy the item who are they paying?
The message board owner. Just curious. I am slow...lol

If member a clicks on member b's BUY ME A BEER graphic, then member a donates via paypal 3 quid ( or whatever ) to member b's paypal account.

The boasrd gets nothing, this is an INTER MEMBER THINGY ;)

Reycer 02-13-2009 01:09 PM

Hey Gene, all my members are getting this message when they click on the icon

"We cannot process this transaction because there is a problem with the PayPal email address supplied by the seller. Please contact the seller to resolve the problem. If this payment is for an eBay listing, you can contact the seller via the "Ask Seller a Question" link on the listing page. When you have the correct email address, payment can be made at www.paypal.com."

TimberFloorAu 02-13-2009 01:16 PM

Quote:

Originally Posted by mdelcour (Post 1742848)
Hey Gene, all my members are getting this message when they click on the icon

"We cannot process this transaction because there is a problem with the PayPal email address supplied by the seller. Please contact the seller to resolve the problem. If this payment is for an eBay listing, you can contact the seller via the "Ask Seller a Question" link on the listing page. When you have the correct email address, payment can be made at www.paypal.com."

Sounds like you have mistaken field number to id number in your user profile fields. Check again

Reycer 02-13-2009 01:26 PM

I checked them again, they are right. I am using Field 5.

scottct1 02-13-2009 04:06 PM

I love it but may have to remove it as my users don't like having their email address displayed in the status bar of the browser.

If we can figure out a solution to this, this could be MOTM.

UKBusinessLive 02-13-2009 04:08 PM

Quote:

Originally Posted by scottct1 (Post 1743014)
I love it but may have to remove it as my users don't like having their email address displayed in the status bar of the browser.

If we can figure out a solution to this, this could be MOTM.

I'm looking into that at the moment ;)

scottct1 02-13-2009 04:34 PM

Ok I got the bright idea to make the icon show on the postbit but when you click on it have it take you to the user profile.

I wanted to put the code for the button in the profile so this way the bots can't harvest users email addresses since user profiles are blocked from bots in the .htaccess file.

However when I put the code in the user profile the fields are not being pulled. I can't figure out why its not parsing the fields in the user profile. But as an example the working code in the postbit for the picture is http://www.yourforum.com/images/drinks/beer.png however when the page is being displayed its not parsing and coming up with http://www.yourforum.com/images/drinks/.png

UKBusinessLive 02-13-2009 04:51 PM

Quote:

Originally Posted by scottct1 (Post 1743039)
Ok I got the bright idea to make the icon show on the postbit but when you click on it have it take you to the user profile.

I wanted to put the code for the button in the profile so this way the bots can't harvest users email addresses since user profiles are blocked from bots in the .htaccess file.

However when I put the code in the user profile the fields are not being pulled. I can't figure out why its not parsing the fields in the user profile. But as an example the working code in the postbit for the picture is http://www.yourforum.com/images/drinks/beer.png however when the page is being displayed its not parsing and coming up with http://www.yourforum.com/images/drinks/.png

I'm working out a hack to disable the status bar at the moment, this could solve the problem of the status bar showing details ;)

ArnyVee 02-13-2009 04:54 PM

Can we have it work so that the person is paying the forum for the purchase? Sort of like how Facebook gets the cash on a 'buy me a gift' deal?

UKBusinessLive 02-13-2009 05:07 PM

Quote:

Originally Posted by ArnyVee (Post 1743062)
Can we have it work so that the person is paying the forum for the purchase? Sort of like how Facebook gets the cash on a 'buy me a gift' deal?

I'll write up a new code for you Arny ;) I'll do it after i post another update :eek:

To stop the status bar from showing the members details when you hover over the icon.

Bear with me mate ;)

ArnyVee 02-13-2009 05:15 PM

That's great Gerry! Thank you! :up:

Great job on getting some very useful mods out! These are the type of mods that increase interactivity on our forums (which is absolutely vital! :) ) and create a more cohesive community! :D

UKBusinessLive 02-13-2009 05:21 PM

Quote:

Originally Posted by scottct1 (Post 1743039)
Ok I got the bright idea to make the icon show on the postbit but when you click on it have it take you to the user profile.

I wanted to put the code for the button in the profile so this way the bots can't harvest users email addresses since user profiles are blocked from bots in the .htaccess file.

However when I put the code in the user profile the fields are not being pulled. I can't figure out why its not parsing the fields in the user profile. But as an example the working code in the postbit for the picture is http://www.yourforum.com/images/drinks/beer.png however when the page is being displayed its not parsing and coming up with http://www.yourforum.com/images/drinks/.png

Scott

I have made a security patch which will disable the status bar. Several Members have expressed concerns with the fact that when you hover with your cursor over the drinks icon the members paypal add is displayed in the Status Bar.

Concerns were made about email harvesters and spammers, and as a responsible Developer Please Find below a security patch which you will need to add at the bottom of the Postbit template that your using, Just copy and paste, right at the bottom.

Code:

<script>

function hidestatus(){
window.status=''
return true
}

if (document.layers)
document.captureEvents(Event.MOUSEOVER | Event.MOUSEOUT)

document.onmouseover=hidestatus
document.onmouseout=hidestatus
</script>

This will disable the Staus bar and prevent anyone viewing details, however once the Beer icon has been clicked and the page reverts to the paypal payment page, then the link will be shown.

Please continue reporting any bugs and we'll fix them accordindly ;)

Thanks buddy

Gerry ;)

UKBusinessLive 02-13-2009 05:31 PM

Quote:

Originally Posted by ArnyVee (Post 1743078)
That's great Gerry! Thank you! :up:

Great job on getting some very useful mods out! These are the type of mods that increase interactivity on our forums (which is absolutely vital! :) ) and create a more cohesive community! :D


No Worries Mate,

Glad to help where i can, But could do with a rest after this one ;)

Arny, I take it you have a Forum paypal account already??? Then what you'll have to do is if you don't want members to buy beers for each other but just pay the forum then you need to delete the part about custom user fields and simply add your paypal address in the code as opposed to the field attribute

Works along the lines of something like this...

Code:

<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=admin@mickeymouse.com&item_name=Buy me a Beer&amount=3%2e00&no_shipping=0&no_note=1&tax=0&currency_code=GBP&lc=GB&bn=PP%2dDonationsBF&charset=UTF%2d8" target="_blank" rel="nofollow" title="Click to buy me a Beer">
<img alt="Buy me a Beer?" border="0" src="http://www.yourforum.com/images/misc/beer.png" border="0"/>
</if>

You can see where you need to add your email addy, its in red ;)

Then you can change the other bits, Buy me a Beer to Buy us a Gift or something along those lines, Don't forget to change the graphic :D

Hope that helps

Gerry

PS a little something for you for St Patricks Day ;)

https://vborg.vbsupport.ru/external/2009/02/64.png

R-D 02-13-2009 05:41 PM

Just to let you know, that won't stop harvesters and/or spammers in the slightest.

It'll hide the status bar link for users with javascript enabled, it won't however remove the link from the page's source code or hide the status bar link for anyone with javascript disabled.

At best, it'll just stop most regular (human) members from seeing the status bar link. The majority (if not all) automated spammers and harvesters will still be able to get the link with no problems at all.

Your best bet would be to use a template condition to hide the entire modification (and the actual link itself) from guests. That's probably the only reliable way to hide the link(s) from spammers and harvesters.

UKBusinessLive 02-13-2009 05:43 PM

Quote:

Originally Posted by R-D (Post 1743108)
Just to let you know, that won't stop harvesters and/or spammers in the slightest.

It'll hide the status bar link for users with javascript enabled, it won't however remove the link from the page's source code or hide the status bar link for anyone with javascript disabled.

At best, it'll just stop most regular (human) members from seeing the status bar link. The majority (if not all) automated spammers and harvesters will still be able to get the link with no problems at all.

Your best bet would be to use a template condition to hide the entire modification (and the actual link itself) from guests. That's probably the only reliable way to hide the link(s) from spammers and harvesters.

Thanks for the tip, I'm onto that now ;) Just added the template condition to the first post, so now you have to be logged in and a member to even be able to view the buy me a beer hack, Funny enough i'd already thought of this in an earlier post, but i forgot to add it to the first post :rolleyes:

Thanks again for reminding me ;)

UKBusinessLive 02-13-2009 06:57 PM

Quote:

Originally Posted by scottct1 (Post 1743014)
I love it but may have to remove it as my users don't like having their email address displayed in the status bar of the browser.

If we can figure out a solution to this, this could be MOTM.

Don't forget to add the template conditional on the first post, That way only members and staff will be able to view the hack, together with the code to disable the staus bar, That should prevent any sercurity issues, with non members and guests.

Let me know if i can help further ;)

TandyServices 02-13-2009 07:18 PM

I can not get the new images to show?? here is what I have and my field is 32 and only .png..
Code:

<img alt="Buy me a Drink?" border="0" src="/images/misc/donate/$post[field32].png" border="0"/>

UKBusinessLive 02-13-2009 07:54 PM

Quote:

Originally Posted by TandyServices (Post 1743183)
I can not get the new images to show?? here is what I have and my field is 32 and only .png..
Code:

<img alt="Buy me a Drink?" border="0" src="http://www.yourforum.com/images/misc/donate/$post[field32].png" border="0"/>

Try adding the full URL to the graphics http://www.yourforum.com/images/misc/donate/$post[field32].png ;)

let me know how you got on James

TandyServices 02-13-2009 07:58 PM

Yea we tried that too.. Didn't work either though... Any other suggestions? Thanks for the fast reply :)

UKBusinessLive 02-13-2009 08:01 PM

Quote:

Originally Posted by TandyServices (Post 1743210)
Yea we tried that too.. Didn't work either though... Any other suggestions? Thanks for the fast reply :)

Are you installing the Multichoice add on??? Have you already added the first one (Buy me a Beer) ? for it to work in multichoice you need to install both zip files ;)

TandyServices 02-13-2009 08:05 PM

Yes we did that. The first one worked perfect, but when we added the multiple choice the images didnt show anymore. We went through all your directions twice and everything is as it should be...

UKBusinessLive 02-13-2009 08:06 PM

Quote:

Originally Posted by TandyServices (Post 1743219)
Yes we did that. The first one worked perfect, but when we added the multiple choice the images didnt show anymore. We went through all your directions twice and everything is as it should be...

bear with me i'll check the code :confused:

TandyServices 02-13-2009 08:08 PM

Thanks :) We did too though lol.. Two of us on it for over an hour now :p
Should it be of any help, this is the full part of what we had.. maybe we overlooked something.


Code:


<if condition="is_member_of($bbuserinfo, 2, 5, 6, 7, 9, 10, 11, 13)">
<if condition="$post['field31']">
<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=$post[field31] &item_name=Buy me a Beer&amount=2%2e00&no_shipping=0&no_note=1&tax=0&currency_code=USD&lc=US&bn=PP%2dDonationsBF&charset=UTF%2d8" target="_blank" rel="nofollow" title="Click to donate to my post">
<img alt="Donate to my Post" border="0" src="http://www.mysite.com/images/donate/$post[field32]" border="0"/>
</if></if>


UKBusinessLive 02-13-2009 08:19 PM

Quote:

Originally Posted by TandyServices (Post 1743222)
Thanks :) We did too though lol.. Two of us on it for over an hour now :p

Try this James

you have the condition at the start which looks like this

Code:

<if condition="$post['fieldX']">
Thats the Custom field attribute for where the user adds their Paypal Address the X will be the number of that field

Try also adding the condition for the Multichoice menu ;) That should make the Images show so, below that and with the FieldZ attribute change the Z to the number of the field which controls the images, so both conditions should look like this

Code:

<if condition="$post['fieldX']">
<if condition="$post['fieldZ']">

don't forget to ad the other end tag, just below the other one at the end of the code

Code:

</if>
Try that and let me know :)

Make it like this one below

Code:

<if condition="is_member_of($bbuserinfo, 2, 5, 6, 7, 9, 10, 11, 13)">
<if condition="$post['field31']">
<if condition="$post['field32']">
<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=$post[field31] &item_name=Buy me a Beer&amount=2%2e00&no_shipping=0&no_note=1&tax=0&currency_code=USD&lc=US&bn=PP%2dDonationsBF&charset=UTF%2d8" target="_blank" rel="nofollow" title="Click to donate to my post">
<img alt="Donate to my Post" border="0" src="http://www.mysite.com/images/donate/$post[field32].png" border="0"/></if></if></if>

Copy this code and try again ;)

You also left off the end of the $post[field32] it should be $post[field32].png"

Also is Mysite.com your forum's url?? or is it where you have the pictures hosted??? i got a funny feeling your not adding the pictures right

TandyServices 02-13-2009 08:32 PM

Quote:

Originally Posted by UKBusinessLive (Post 1743231)
Try this James

you have the condition at the start which looks like this

Code:

<if condition="$post['fieldX']">
Thats the Custom field attribute for where the user adds their Paypal Address the X will be the number of that field

Try also adding the condition for the Multichoice menu ;) That should make the Images show so, below that and with the FieldZ attribute change the Z to the number of the field which controls the images, so both conditions should look like this

Code:

<if condition="$post['fieldX']">
<if condition="$post['fieldZ']">

don't forget to ad the other end tag, just below the other one at the end of the code

Code:

</if>
Try that and let me know :)

Make it like this one below

Code:

<if condition="is_member_of($bbuserinfo, 2, 5, 6, 7, 9, 10, 11, 13)">
<if condition="$post['field31']">
<if condition="$post['field32']">
<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=$post[field31] &item_name=Buy me a Beer&amount=2%2e00&no_shipping=0&no_note=1&tax=0&currency_code=USD&lc=US&bn=PP%2dDonationsBF&charset=UTF%2d8" target="_blank" rel="nofollow" title="Click to donate to my post">
<img alt="Donate to my Post" border="0" src="http://www.mysite.com/images/donate/$post[field32].png" border="0"/></if></if></if>

Copy this code and try again ;)

You also left off the end of the $post[field32] it should be $post[field32].png"

Thanks but didn't work... Still have red x's. :confused:

UKBusinessLive 02-13-2009 08:34 PM

type me out an url to one of your images, if it works it will show me the image ;)

Reycer 02-13-2009 10:33 PM

UK LIVE: Any thoughts on my problem?

UKBusinessLive 02-14-2009 12:27 AM

Quote:

Originally Posted by mdelcour (Post 1743317)
UK LIVE: Any thoughts on my problem?

Its important to make su
rte that the urls of your images are valid ;) I'm still looking at his problem

Jeff G 02-14-2009 02:35 AM

very cool mod!! Installed nice & easy, might have to install the multi one :)

TimberFloorAu 02-14-2009 03:23 AM

Quote:

Originally Posted by TandyServices (Post 1743241)
Thanks but didn't work... Still have red x's. :confused:

Either your path is incorrect or you are not inserting the field value in BOTH places for each choice.

TimberFloorAu 02-14-2009 04:03 AM

No cannot get this working neither. ( on multi choice )

Weird one.

Will look at the code.

Ste

UKBusinessLive 02-14-2009 05:26 AM

May have to delete the multichoice until we can get it to work, Could it be that its not working with the two fields in the same code???

strange it looked pretty striaghtforward to me :confused:

Let me know steve what you come up with ;)

TimberFloorAu 02-14-2009 05:51 AM

Quote:

Originally Posted by UKBusinessLive (Post 1743580)
May have to delete the multichoice until we can get it to work, Could it be that its not working with the two fields in the same code???

strange it looked pretty striaghtforward to me :confused:

Let me know steve what you come up with ;)

I reckon its the fact we are containing 2 fields within 2 if's

Perhaps a text link which is good for the paypal.
Then directly below the image file.

Each wrapped in their own if statements, but this would mean the image is just an image and not a hyperlink.

Let me know if you think this could be the issue. I will have a test now.

Ste

TimberFloorAu 02-14-2009 06:07 AM

Okies I have a fix.

The multi selection version, change to single selection drop down menu. Without blank as first choice.

Then the code I have is thus:

Code:

<!--buy me a beer -->
<center>

<if condition="$post['field22']"><div class="info">
<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=$post[field22]&item_name=Buy me a Beer&amount=3%2e00&no_shipping=0&no_note=1&tax=0&currency_code=GBP&lc=GB&bn=PP%2dDonationsBF&charset=UTF%2d8" target="_blank" rel="nofollow" title="Click to buy me a Beer">
Buy Me a Drink</a></if><if condition="$post['field24']"><img alt="Buy me a Beer?" border="0" src="http://www.mysite.com/images/drinks/$post[field24].png" border="0"/></div></if></center>

<!--end buy me a beer -->

This works fine.

TimberFloorAu 02-14-2009 06:11 AM

1 Attachment(s)
This is what she looks like :)

code with specific usergroup permission is:

Code:

<!--buy me a beer -->
<center>
<if condition="is_member_of($bbuserinfo, 2, 5, 6, 7)">
<if condition="$post['field22']"><div class="info">
<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=$post[field22]&item_name=Buy me a Beer&amount=3%2e00&no_shipping=0&no_note=1&tax=0&currency_code=GBP&lc=GB&bn=PP%2dDonationsBF&charset=UTF%2d8" target="_blank" rel="nofollow" title="Click to buy me a Beer">
Buy Me a Drink</a></if><if condition="$post['field24']"><img alt="Buy me a Beer?" border="0" src="http://www.mysite.com/images/drinks/$post[field24].png" border="0"/></div></if></center>
</if>
<!--end buy me a beer -->


UKBusinessLive 02-14-2009 12:47 PM

Thanks for that Steve, i've updated the first post and added the zip files again ;)

Multichoice is back on the menu ;) :D

Reycer 02-14-2009 01:16 PM

UKBL: I have pictures. I can see them. But, when the users click on them, they are getting that weird message.

http://www.lacledeforum.com/forums/showthread.php?t=252

Look at some of the coke bottles there. Click on them and see what you get.

UKBusinessLive 02-14-2009 01:22 PM

Quote:

Originally Posted by mdelcour (Post 1743833)
UKBL: I have pictures. I can see them. But, when the users click on them, they are getting that weird message.

http://www.lacledeforum.com/forums/showthread.php?t=252

Look at some of the coke bottles there. Click on them and see what you get.

post the code your using here so i can see ;)

Edit ...

well for a start i can't imagine why you have 2 coke tins showing?? plus i can't see your paypal email address??? Thats the problem.

Viewing your code this is what you have

Code:

<!-- /By me a Beer start-->
<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=&item_name=Buy me a Drink&amount=3%2e00&no_shipping=0&no_note=1&tax=0&currency_code=USD&lc=US&bn=PP%2dDonationsBF&charset=UTF%2d8" target="_blank" rel="nofollow" title="Click to buy me a Drink">
<img alt="Buy me a Coke?" border="0" src="http://www.lacledeforum.com/forums/images/misc/Coke_Classic_woops-32.png" border="0"/>
<!-- /By me a Beer End-->

for this to work you need to add a custom user field, You havn't got that showing at all, so its going to the paypal site without a Paypal email address, Plus you want to add the condition which i added yesterday as i was able to view your code from the View Source :eek:

if you get stuck on what to do, make me a temp admin account and i'll add it for you ;)

Gerry :D

Reycer 02-14-2009 02:41 PM

Quote:

<if condition="$post['field5']">
<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=$post[fieldX]&item_name=Buy me a Drink&amount=3%2e00&no_shipping=0&no_note=1&tax=0& currency_code=USD&lc=US&bn=PP%2dDonationsBF&charse t=UTF%2d8" target="_blank" rel="nofollow" title="Click to buy me a Drink">
<img alt="Buy me a Coke?" border="0" src="http://www.lacledeforum.com/forums/images/misc/Coke_Classic_woops-32.png" border="0"/>
</if>
<!-- /By me a Beer start-->
<if condition="$post['field5']">
<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=$post[fieldX]&item_name=Buy me a Drink&amount=3%2e00&no_shipping=0&no_note=1&tax=0& currency_code=USD&lc=US&bn=PP%2dDonationsBF&charse t=UTF%2d8" target="_blank" rel="nofollow" title="Click to buy me a Drink">
<img alt="Buy me a Coke?" border="0" src="http://www.lacledeforum.com/forums/images/misc/Coke_Classic_woops-32.png" border="0"/>
</if><!-- /By me a Beer End-->
<if condition="$post['field5']">
<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=$post[fieldX]&item_name=Buy me a Drink&amount=3%2e00&no_shipping=0&no_note=1&tax=0& currency_code=USD&lc=US&bn=PP%2dDonationsBF&charse t=UTF%2d8" target="_blank" rel="nofollow" title="Click to buy me a Drink">
<img alt="Buy me a Coke?" border="0" src="http://www.lacledeforum.com/forums/images/misc/Coke_Classic_woops-32.png" border="0"/>
</if>
<!-- /By me a Beer start-->
<if condition="$post['field5']">
<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=$post[fieldX]&item_name=Buy me a Drink&amount=3%2e00&no_shipping=0&no_note=1&tax=0& currency_code=USD&lc=US&bn=PP%2dDonationsBF&charse t=UTF%2d8" target="_blank" rel="nofollow" title="Click to buy me a Drink">
<img alt="Buy me a Coke?" border="0" src="http://www.lacledeforum.com/forums/images/misc/Coke_Classic_woops-32.png" border="0"/>
</if><!-- /By me a Beer End-->
I have added the custom fields. It's in the UserCP under Edit Details.


All times are GMT. The time now is 01:33 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01574 seconds
  • Memory Usage 1,896KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (16)bbcode_code_printable
  • (19)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete