Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Add-on CMS Widget For VSA Donation Mod Details »»
Add-on CMS Widget For VSA Donation Mod
Version: 1.00, by metalguy639 metalguy639 is offline
Developer Last Online: Jan 2014 Show Printable Version Email this Page

Category: Add-On Releases - Version: 4.1.3 Rating:
Released: 10-28-2011 Last Update: Never Installs: 37
Template Edits
 
No support by the author.

THIS TEMPLATE EDIT BROUGHT TO YOU BY:


www.skinsnstyles.com

I have created a CMS widget that works with Valter's Donation Mod Found here: https://vborg.vbsupport.ru/showthread.php?t=236480

CLICK INSTALLED TO GET SUPPORT FOR THIS ADD-ON. IF YOU DO NOT CLICK INSTALLED I CANNOT HELP YOU.

NOTE: There is one draw back to this donation widget. I could not get the options to work so that a member could choose an pre-determined amount to donate, so if you use this widget you will HAVE to set your VSA Paypal Donate "Allowed donate amounts" to "Custom Only". This is the only way this widget will work properly and not look strange.

Step 1:

1. Login to your admincp and go to vBulletin CMS>Widgets
2. Click "Create New Widget" at the bottom. Use the PHP direct execution widget settings or else this will not work.
3. Give the widget a proper title - this can be whatever you want it to be just keep in mind that it cannot be too long since it will be the widget header.
4. Give the widget a description - again this is up to you.
5. Click the "save" button.

Step 2:

1. Go to Styles & Templates>Style Manager
2. Find the style you want to add the widget to - if you have more than one style and want it to show in each style you will need to do these steps for each style.
3. Click the drop down to the right and choose "Add New Template"
4. In the title box put the following without the quotes: "donate_widget"
5. Now copy and paste the following in the box:

Code:
<div align="center"><form id="vsappd" name="vsappd" action="misc.php?{vb:raw session.sessionurl}do=dodonate" method="post" onsubmit="return Cpp_limitAmo(this);" <vb:if condition="$vboptions[vsapaypal_go_separate]">target="_blank"</vb:if>>
	<input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" />

	<div style="padding:0px;margin:0px;border-top:0px;border-bottom:1px;border-{vb:stylevar left}:1px;border-{vb:stylevar right}:1px;border-color:#000000;border-style:solid;">
		<div class="blocksubhead" id="donform1" style="display:block;">
			{vb:rawphrase vsapaypal_note}
		</div>
		<div class="blocksubhead" id="waitform1" style="display:none;">
			{vb:rawphrase vsapaypal_redirecting}
		</div>

		<div class="blockrow" id="donform2" style="display:block;height:15px;margin-top:15px;margin-bottom:15px" align="center">
			{vb:rawphrase vsapaypal_don}&nbsp;
			<span id="don" style="display:<vb:if condition="($vboptions[vsapaypal_allowed_donamo]=='3')">inline<vb:else />none</vb:if>;">
				&nbsp;<input type="<vb:if condition="($vboptions[vsapaypal_allowed_donamo]=='1')">hidden<vb:else />text</vb:if>" name="amount" value="{vb:raw vsapp_amo_first}" class="primary textbox" style="width:30px" />
			</span>&nbsp;{vb:raw vboptions.vsapaypal_currency}
		</div>

		<div class="blockrow" id="waitform2" style="display:none;height:15px;margin-top:15px;margin-bottom:15px" align="center">
			{vb:rawphrase vsapaypal_redirected}
		</div>

		<div class="blocksubhead" id="donform3" style="display:block;" align="center">
			<input name="vsa_send" class="button" type="submit" value="{vb:rawphrase submit}" />
		</div>

		<div class="blocksubhead" id="waitform3" style="display:none;" align="center">
			{vb:rawphrase vsapaypal_wait}
		</div>
	</div>
	</form></div>
Change the red area #000000 to the color of your choice for your border to match your site.

6. Click the "Save" button.

Step 3:

1. Go to vBulletin CMS>Widgets and find the widget you created above and click on the "Configure" link to the far right.
2. In the box clear what is in it and place this code in it:

Code:
$templater = vB_Template::create('donate_widget');
$output = $templater->render();
3. Click "Save".

Step 4:

1. Go to vBulletin CMS>Layout Manager and find your current layout. Click the "Go" button to edit the layout.
2. Choose from the list on the left the name of your widget and place it in your layout where you would like it to go.
3. Click "Save".

Refresh your page and you should see the widget now.

To change the message above the donation box:

1. Go to Languages & Phrases>Search In Phrases
2. In the "Search For Text" box put "Please choose an option below" without the quotes.
3. Then tick the "Phrase Text and Phrase Variable Name" and click the "Find" button.
4. This will bring up the phrase for this mod. In the bottom box type in what you want to change this to and click the save button.

Refresh your page again and the changes should show soon.


NOTE: There is one draw back to this donation widget. I could not get the options to work so that a member could choose an pre-determined amount to donate, so if you use this widget you will HAVE to set your VSA Paypal Donate "Allowed donate amounts" to "Custom Only". This is the only way this widget will work properly and not look strange.

Screenshots

File Type: png donationwidget.png (36.1 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #32  
Old 09-13-2012, 02:03 PM
hoplomachus hoplomachus is offline
 
Join Date: Aug 2012
Posts: 27
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

lol, not good at code at all. I guess I could try. They do have the list option. Ill take a look. If im successful, I reply back with the updated code.
Reply With Quote
  #33  
Old 09-13-2012, 11:17 PM
metalguy639 metalguy639 is offline
 
Join Date: Dec 2008
Posts: 501
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by hoplomachus View Post
lol, not good at code at all. I guess I could try. They do have the list option. Ill take a look. If im successful, I reply back with the updated code.
Ok let me know. I do not have time to look at it right now I'm busy with work.
Reply With Quote
  #34  
Old 09-16-2012, 11:50 AM
OlijO's Avatar
OlijO OlijO is offline
 
Join Date: Jun 2005
Location: Belgium
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi,
this widget worked before 5.03 update.
Now with 5.03 and vB4.2 we can't specify the amout.
See my site :
http://www.soudeurs.com/site.html
Regards,
Olivier
Reply With Quote
  #35  
Old 09-17-2012, 01:20 AM
metalguy639 metalguy639 is offline
 
Join Date: Dec 2008
Posts: 501
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by OlijO View Post
Hi,
this widget worked before 5.03 update.
Now with 5.03 and vB4.2 we can't specify the amout.
See my site :
http://www.soudeurs.com/site.html
Regards,
Olivier
Mark Installed for support please. You have missed something when you installed it. It works fine on my site. You have to change your setting to only allow people to input the amount they want or else it does not work.
Reply With Quote
Благодарность от:
OlijO
  #36  
Old 09-24-2012, 12:06 AM
OlijO's Avatar
OlijO OlijO is offline
 
Join Date: Jun 2005
Location: Belgium
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by metalguy639 View Post
Mark Installed for support please. You have missed something when you installed it. It works fine on my site. You have to change your setting to only allow people to input the amount they want or else it does not work.
Thank you, it works now.
By the way, mark as installed !
Reply With Quote
  #37  
Old 09-24-2012, 02:56 AM
metalguy639 metalguy639 is offline
 
Join Date: Dec 2008
Posts: 501
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by OlijO View Post
Thank you, it works now.
By the way, mark as installed !
Glad its working for you now.
Reply With Quote
  #38  
Old 11-09-2015, 11:35 AM
ukhostz's Avatar
ukhostz ukhostz is offline
 
Join Date: Oct 2010
Location: Workington, Cumbria
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works great even in a sidebar block
Reply With Quote
  #39  
Old 11-09-2015, 12:07 PM
RafaelDutra89 RafaelDutra89 is offline
 
Join Date: Nov 2015
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks!!!
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:56 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04675 seconds
  • Memory Usage 2,325KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_code
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (9)post_thanks_box
  • (1)post_thanks_box_bit
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (9)post_thanks_postbit_info
  • (8)postbit
  • (1)postbit_attachment
  • (9)postbit_onlinestatus
  • (9)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete