Go Back   vb.org Archive > vBulletin Modifications > Archive > Modification Graveyard

Reply
 
Thread Tools
Pig's Subscription Gift Details »»
Pig's Subscription Gift
Version: 1.00, by boozehound boozehound is offline
Developer Last Online: Sep 2007 Show Printable Version Email this Page

Version: 3.5.3 Rating:
Released: 01-16-2006 Last Update: Never Installs: 58
Template Edits
 
No support by the author.

Description

Allows users to pay for a paid subscription for another user.
  • Five plugins
  • One new template
  • Three new phrases
  • Three template edits

Installation
  • Install the product XML through the product manager.
  • Edit template 'subscription' in 'Paid Subscriptions Templates'.

    Find:
    Code:
    <if condition="$show['activesubscriptions']">
    Insert before that, this code:
    Code:
    $giftbits
    Find:
    Code:
    <input type="hidden" name="do" value="order" />
    Insert after that, this code:
    Code:
    <if condition="$giftuser != null">
    <input type="hidden" name="gift" value="$giftuser[userid]" />
    </if>
  • This step may be altered according to taste. I chose to insert the link that userA would click to pay for userB into userB's profile, i.e. MEMBERINFO, but it could just as easily be put in 'postbit'. Anyway...

    Edit template 'MEMBERINFO' in 'Member Info Templates'.

    Find:
    Code:
    	<td class="vbmenu_control">
    		<if condition="$show['addbuddylist']">
    Add before that, this code:
    Code:
    	<td class="vbmenu_control">
            <a href="payments.php?$session[sessionurl]gift=true&userid=$userinfo[userid]"><phrase 1="$userinfo[username]">$vbphrase[buy_x_a_sub]</phrase></a>
            </td>
And you're done.

Notes
  • Active subscriptions are never shown on the paid subscriptions page, either for the donor or the recipient, when visiting the paid subscriptions page through the gift subscription link.
  • The identity of the donor is not revealed to the recipient. An admin will have to check out the payment info if the recipient wants to know who gave them the subscription.

Screenshots
  • screen1.png: Member profile page containing link to subscription gift page
  • screen2.png: Subscription page showing that the user is about to pay for someone else

Supporters / CoAuthors

Show Your Support

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

Comments
  #12  
Old 01-17-2006, 05:52 PM
boozehound's Avatar
boozehound boozehound is offline
 
Join Date: Feb 2005
Posts: 66
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by bashy
Hi

I have installed and clicked install...

I get this error now when i got my donations page????

Warning: Division by zero in /includes/functions.php(4320) : eval()'d code on line 10

Any ideas please?
Hmm line 4320 says...
Code:
($hook = vBulletinHook::fetch_hook('global_complete')) ? eval($hook) : false;
... so what code is in your global_complete hooks?
Reply With Quote
  #13  
Old 01-17-2006, 06:11 PM
bashy bashy is offline
 
Join Date: Nov 2005
Posts: 2,544
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi...

the only 1 that is enabled is the Realtime Template Compressor
and this is the code for it, the other 2 are disabled so i have not mentioned them....

Code:
//Logician Hack: 
$page_byte=strlen($output); 
$output=preg_replace ('/\r\n(\s*)/', "\r\n", $output); 

$pagenew_byte=strlen($output); 
$page_kilobyte=number_format(($page_byte/1024),2); 
$pagenew_kilobyte=number_format(($pagenew_byte/1024),2); 
$pagesaved_byte=$page_byte-$pagenew_byte; 
$pagesaved_kilobyte=number_format((($pagesaved_byte)/1024),2); 
$pagesaved_perc=number_format(((100*$pagesaved_byte)/$page_byte),2); 

$output = str_replace('</body>', '<center><span class="smallfont">[Output: ' . $page_kilobyte . ' Kb. compressed to <b>' . $pagenew_kilobyte . '</b> Kb. by saving <b>' . $pagesaved_kilobyte . '</b> Kb. (' . $pagesaved_perc . '%)]</span></center></body>', $output); 
//Logician Hack:
Reply With Quote
  #14  
Old 01-17-2006, 06:13 PM
bashy bashy is offline
 
Join Date: Nov 2005
Posts: 2,544
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have just disabled this compressor and i dont get the error any more, although my donations page still does not show.....
Reply With Quote
  #15  
Old 01-17-2006, 06:14 PM
boozehound's Avatar
boozehound boozehound is offline
 
Join Date: Feb 2005
Posts: 66
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Does this error go away when you disable or uninstall my product?
Reply With Quote
  #16  
Old 01-17-2006, 06:23 PM
bashy bashy is offline
 
Join Date: Nov 2005
Posts: 2,544
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I think i have resolved it, I had upgraded VB earlier last week and i need to redo a few things
Reply With Quote
  #17  
Old 01-17-2006, 06:42 PM
bashy bashy is offline
 
Join Date: Nov 2005
Posts: 2,544
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry about that m8, I panicked thinking it was when i installed you hack as i had not checked the donations page latley and once i had installed yours i then checked the page and obviously it was not working as i had upgraded VB, hence i assumed it was your hack....

My oplogies m8...Yours is installed and working well...
Great hack, keep up the good work..

Sorry again for the false alarm
Reply With Quote
  #18  
Old 03-05-2006, 01:21 AM
bigmonay2k bigmonay2k is offline
 
Join Date: May 2004
Posts: 169
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

great hack, will it work for 3.5.1?
Reply With Quote
  #19  
Old 03-05-2006, 03:52 AM
Josh1 Josh1 is offline
 
Join Date: Mar 2006
Posts: 68
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Will this work in 3.5.4?
Reply With Quote
  #20  
Old 03-08-2006, 08:09 PM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is this working for people with 3.5.4 as it is? My members when they use this seem to get the subscription go back to their own accounts.
Reply With Quote
  #21  
Old 03-08-2006, 08:56 PM
dsotmoon dsotmoon is offline
 
Join Date: Jun 2003
Location: VA - USA
Posts: 194
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i'd like add this too if its 3.5.4 ready ? ? ?
Reply With Quote
Reply

Thread Tools

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 07:04 AM.


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.04938 seconds
  • Memory Usage 2,303KB
  • 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
  • (8)bbcode_code
  • (1)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
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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_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
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete