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)

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:03 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.01248 seconds
  • Memory Usage 1,754KB
  • 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
  • (3)bbcode_code_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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