vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Miscellaneous Hacks - Gift Subscriptions (https://vborg.vbsupport.ru/showthread.php?t=166121)

Avimelech 08-12-2009 06:10 PM

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?

Shamil. 08-12-2009 07:56 PM

Quote:

Originally Posted by Avimelech (Post 1866025)
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 :)

Avimelech 08-13-2009 01:21 AM

OK, I confess I rechecked and found a wrong insertion point for the subscription template. It works now, with 3.8.4.

klaush 09-24-2009 07:40 AM

Hi,

can You explain what exactly is to do?

Thanks!

Quote:

Originally Posted by Avimelech (Post 1866228)
OK, I confess I rechecked and found a wrong insertion point for the subscription template. It works now, with 3.8.4.


Martin Kiess 11-10-2009 09:50 AM

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

Avimelech 01-14-2010 11:22 PM

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.

Crrrazzzy 02-05-2010 06:43 PM

i would also be interested in this for VB4

sojobo 02-21-2010 09:17 PM

I'd love to see this implemented into vB4 too, I don't know why it's not a core feature tbh.

MrWizard 03-03-2010 06:34 AM

My team updated this for 4.0.2

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

Thanks for the original mod jamoss!

ZERO <ibis> 11-26-2010 08:02 PM

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."'");


All times are GMT. The time now is 03:07 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.01190 seconds
  • Memory Usage 1,739KB
  • 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
  • (2)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
  • (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