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

Reply
 
Thread Tools
Gift Subscriptions Details »»
Gift Subscriptions
Version: 1.00, by jamoss jamoss is offline
Developer Last Online: Jan 2021 Show Printable Version Email this Page

Category: Miscellaneous Hacks - Version: 3.6.8 Rating:
Released: 12-24-2007 Last Update: 12-26-2007 Installs: 52
Uses Plugins Template Edits
Code Changes  
No support by the author.

Looks like there was a huge need for a gift subscription hack, so I created one, attached. It allows users to extend or purchase board subscriptions for other users.

This has been implemented and tested on our boards, but it is in EARLY ALPHA! Please provide me with feedback/questions after you implement it.

Should take about 15 minutes to complete.

1. Create 1 plugin
2. Modify 2 templates
3. modify 1 script (payments.php) -- PLEASE backup and save your old script for upgrade purposes.

Let me know how it goes!
~ Jennifer

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Благодарность от:
MikeJDance

Comments
  #32  
Old 08-12-2009, 06:10 PM
Avimelech Avimelech is offline
 
Join Date: Jul 2006
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks, good point. Except when I did the search and replace, the code that I found matched exactly what was supposed to be there.

Can you recommend how to handle this? I really want this plugin. Shall I ask the original poster if they have this working still on their forums and using 3.8 now?
Reply With Quote
  #33  
Old 08-12-2009, 07:56 PM
Shamil. Shamil. is offline
 
Join Date: Sep 2008
Posts: 196
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Avimelech View Post
Thanks, good point. Except when I did the search and replace, the code that I found matched exactly what was supposed to be there.

Can you recommend how to handle this? I really want this plugin. Shall I ask the original poster if they have this working still on their forums and using 3.8 now?
Yep, that's the cuase of action
Reply With Quote
  #34  
Old 08-13-2009, 01:21 AM
Avimelech Avimelech is offline
 
Join Date: Jul 2006
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OK, I confess I rechecked and found a wrong insertion point for the subscription template. It works now, with 3.8.4.
Reply With Quote
  #35  
Old 09-24-2009, 07:40 AM
klaush klaush is offline
 
Join Date: Oct 2005
Posts: 340
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi,

can You explain what exactly is to do?

Thanks!

Quote:
Originally Posted by Avimelech View Post
OK, I confess I rechecked and found a wrong insertion point for the subscription template. It works now, with 3.8.4.
Reply With Quote
  #36  
Old 11-10-2009, 09:50 AM
Martin Kiess Martin Kiess is offline
 
Join Date: Sep 2009
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello,

i installed this AddOn in version 3.8.4.

There was 1 thing wrong in the payments.php

do NOT add after:
($hook = vBulletinHook::fetch_hook('paidsub_order_start')) ? eval($hook) : false;

i added it after:
if ($_POST['do'] == 'order')
{

//=== HACK: GIFT SUBSCRIPTIONS ===//
if ($_POST['giftname'] != $vbulletin->userinfo['username'])
{
$goo=$db->query_read_slave("SELECT userid from ". TABLE_PREFIX ."user where username='".$_POST['giftname']."'");

if ($giftee = $db->fetch_array($goo))
{
$subid = $giftee['userid'];
$subusername = $_POST['giftname'];
}
else
{
eval(standard_error(fetch_error('pminvalidrecipien t')));
}
}
else
{
$subid = $vbulletin->userinfo['userid'];
$subusername = $vbulletin->userinfo['username'];
}
//=== HACK: GIFT SUBSCRIPTIONS ===//

Then i modified the template: subscription_payment

locate: <td class="panelsurround" align="center">
<div class="panel">
<div align="$stylevar[left]">

AFTER that, add:
<div class="fieldset">
Subscription for: <strong>$subusername</strong>
</div>

Ok, so it works

Martin
Reply With Quote
  #37  
Old 01-14-2010, 11:22 PM
Avimelech Avimelech is offline
 
Join Date: Jul 2006
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Anyone got the updated instructions to get this working for VB4? Many of the code syntax is now changed for the variables manipulated for the GIFTNAME...but I have not learned the new syntax yet.
Reply With Quote
  #38  
Old 02-05-2010, 06:43 PM
Crrrazzzy Crrrazzzy is offline
 
Join Date: Sep 2005
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i would also be interested in this for VB4
Reply With Quote
  #39  
Old 02-21-2010, 09:17 PM
sojobo sojobo is offline
 
Join Date: Apr 2006
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'd love to see this implemented into vB4 too, I don't know why it's not a core feature tbh.
Reply With Quote
  #40  
Old 03-03-2010, 06:34 AM
MrWizard MrWizard is offline
 
Join Date: Jun 2003
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

My team updated this for 4.0.2

https://vborg.vbsupport.ru/showthread.php?t=237351

Thanks for the original mod jamoss!
Reply With Quote
  #41  
Old 11-26-2010, 08:02 PM
ZERO <ibis> ZERO <ibis> is offline
 
Join Date: Dec 2007
Posts: 33
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Any ideas how to fix it so that "special" names work?

For example: <[X]> will not work as an accepted username.

What do I need to edit in order for this mod to support special characters?

Fixed:

Replace:
$goo=$db->query_read_slave("SELECT userid from ". TABLE_PREFIX ."user where username='".$_POST['giftname']."'");

With:
$sqlname = htmlspecialchars($_POST['giftname']);
$goo=$db->query_read_slave("SELECT userid from ". TABLE_PREFIX ."user where username='".$sqlname."'");
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 02:09 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.04935 seconds
  • Memory Usage 2,311KB
  • Queries Executed 25 (?)
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_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (1)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • 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
  • 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