PDA

View Full Version : [HTL] & [TXT] One-Time & Free Subscriptions


Andreas
15 Feb 2004, 04:43
One-Time & Free Subscriptions
Version: 0.1
vB-version: 3.0.0 Release Candidate 2
Developer: Kirby
Install difficulty: Easy
File edits: 4
Template edits: 0

Description of the Hack:
This Hack allows you to create One-Time subscriptions which can be purchased only once.
It also allows you to have free subscriptions - when a user orders such a subscription he will be subscribed instantly.

HACK INSTALLATION DETAILS:
Files modified for this Hack:
admincp/subscriptions (1)
includes/functions_subscriptions.php (1)
subscriptions.php (2)

Details on how to install this manually are in the ZIP.

DB Tables modified for this Hack:
subscription

New DB columns for this Hack:
onetime


This post was generated by the Hack Tracking Log (http://www.vbulletin.org/forum/showthread.php?t=60735)

drumsy
15 Feb 2004, 04:52
There is no zip...:confused:

Andreas
15 Feb 2004, 05:03
Now there is. Didn't work at first - keeps saying "in progress"

Dean C
15 Feb 2004, 10:09
Nice to see people expanding on the system. How about buy one subscription get one free offers and such :)?

gmarik
15 Feb 2004, 12:48
Nice idea, Dean ...

gc1
15 Feb 2004, 17:51
Dean, I am kinda green, I don't understand the instructions well and I don't know how to install this hack with xml files.

Give me a nudge and I will send you a small gift via PayPal since this was a hack I have requested.

GC

Andreas
15 Feb 2004, 21:31
@gc1
You don't need the XML file if you don't use HTL (Hack Tracking Log).
Just follow the instrustions for manual installation (file otfsubs.txt in the ZIP).

gc1
16 Feb 2004, 02:20
Anybody wanna tackle this and tell me what I am doing wrong?


Invalid SQL:
### INSERT QUERY GENERATED BY fetch_query_sql() ###
INSERT INTO subscription
(subscriptionid, title, description, active, onetime, length, units, cost, nusergroupid, membergroupids, forums)
VALUES
(NULL, 'bbb', '', '1', '1', '1', 'W', 'a:3:{s:3:\"usd\";s:4:\"0.00\";s:3:\"gbp\";s:4:\"0.00\";s:3:\"eur\";s:4:\"0.00\";}', '-1', '', 'N;')
mysql error: Unknown column 'onetime' in 'field list'

mysql error number: 1054

Date: Sunday 15th of February 2004 06:19:50 PM
Script: http://www.xxxxxxxxx.com/trucking/upload/admincp/subscriptions.php
Referer: http://www.xxxxxxxx.com/trucking/upload/admincp/subscriptions.php?do=add

Andreas
16 Feb 2004, 02:46
Can a person be that dumb like me? I've got an error in the TXT, should be onetime and not foobar in the query :ermm:

Run the following query, this should fix the problem:



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------

gc1
16 Feb 2004, 02:55
Can a person be that dumb like me? I've got an error in the TXT, should be onetime and not foobar in the query :ermm:

Run the following query, this should fix the problem:



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



Thank you very much, if you have PayPal I will send you a small donation for your effort.

Thanks alot

Jeff

memdy
21 Feb 2005, 04:28
I can't run the last two steps, becuase I can't FIND the code sections in my subscriptions.php .... vBulletin version 3.03 Any hints on where these might go in subscriptions.php ?



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------

rjordan
27 Mar 2005, 16:56
I know it has been a month since your question, but are you looking at subscription.php or subscriptions.php? You should be looking at the latter.

rjordan
27 Mar 2005, 19:21
An addition to this would be to display FREE in the cost drop-down instead of being blank. This can be done with the following:

In ./subscriptions.php, find:


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------

and above this:


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------


Save and upload.

This works for me on 3.0.7. Thanks for this modification!