Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons

Reply
 
Thread Tools
Buy Thread: Pay to Post New Thread Details »»
Buy Thread: Pay to Post New Thread
Version: 1.0.0, by calorie calorie is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Version: 3.5.4 Rating:
Released: 05-24-2006 Last Update: Never Installs: 115
DB Changes Uses Plugins Template Edits
Additional Files  
No support by the author.

This mod allows you to require payment from registered users prior to letting them post new threads. This mod also utilizes PayPal so you need to use PayPal's IPN and have your board set to accept PayPal payments.

The mod is good for those of you who want to set up some forums where users are required to pay a fee prior to making a new thread, such as for real estate, job postings, sale items, other types of classified ads, etcetera.

If you make any money from using this mod, I expect a cut. LOL, just kidding, but do click install should you use this mod.

Show Your Support

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

Comments
  #142  
Old 11-14-2011, 03:32 AM
bitwise2000 bitwise2000 is offline
 
Join Date: Apr 2008
Posts: 31
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by N8 View Post
^ this
I wrote a UserCP plug-in that shows all details of ptpnt purchases.
Reply With Quote
  #143  
Old 11-14-2011, 08:29 AM
N8's Avatar
N8 N8 is offline
 
Join Date: Dec 2004
Posts: 146
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by bitwise2000 View Post
I wrote a UserCP plug-in that shows all details of ptpnt purchases.
Mind posting the code?
Reply With Quote
  #144  
Old 11-14-2011, 11:03 PM
bitwise2000 bitwise2000 is offline
 
Join Date: Apr 2008
Posts: 31
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here's you go. Crude, and should be cleaned up, but it works for my purposes.

I sure wish Calorie would update this mod. It's one of very few things holding me back from vB4

Here's what the output looks like:Attachment 134403


Here's the script: (I put a link to this in the misc section of the UserCP sidebar.)
Code:
<?php


// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);

// #################### DEFINE IMPORTANT CONSTANTS #######################
define('THIS_SCRIPT', 'ptpnt_stat');
define('CSRF_PROTECTION', true);

// ################### PRE-CACHE TEMPLATES AND DATA ######################
// get special phrase groups
$phrasegroups = array('user');

// pre-cache templates used by all actions
$globaltemplates = array('USERCP_SHELL','usercp_nav_folderbit');

// ######################### REQUIRE BACK-END ############################
require_once('./global.php');

// ######################## START MAIN SCRIPT ############################
if ($vbulletin->userinfo['userid'] == 0)
{
	print_no_permission();
}

$userid = intval($vbulletin->userinfo['userid']);
$threadstatus = "";

$result=$db->query_read("SELECT f.title AS forum, sum(p.totalthreads) AS 'threads',
sum(p.totalpaid) AS cost, sum(p.livethreads) AS live FROM ptpnt_buythread p left join forum f
on p.forumid=f.forumid where p.userid=" . $userid . " GROUP BY f.forumid");

If (mysql_num_rows($result)){

   	while( $buy = $db->fetch_array( $result ) ) {
		$threadstatus .= "<tr><td>$buy[forum]</td><td>$buy[threads]</td><td>$buy[cost]</td><td>$buy[live]</td></tr></tr>";
}
	$result=$db->query_read("SELECT f.title AS forum, p.totalthreads AS 'threads',
	p.totalpaid AS cost, From_Unixtime(p.dateline, '%b %d %Y %r') AS purchased
	FROM ptpnt_buythread p left join forum f ON p.forumid=f.forumid
	WHERE p.userid=" . $userid . " ORDER BY p.dateline desc");

	$history = "";
		while( $buy = $db->fetch_array( $result ) ) {
		$history .= "<tr><td>$buy[forum]</td><td>$buy[threads]</td><td>$buy[cost]</td><td>$buy[purchased]</td></tr></tr>";
}
}

eval('$ptpnt_stat = "' . fetch_template('ptpnt_stat') . '";');

// start the navbar
$navbits = array('usercp.php' . $vbulletin->session->vars['sessionurl_q'] => $vbphrase['user_control_panel']);
$navbits['ptpnt_stat.php' . $vbulletin->session->vars['sessionurl_q']] = 'Purchased Thread Status';
$navbits[''] = 'Purchased Thread Status';

// build the cp nav
require_once(DIR . '/includes/functions_user.php');
construct_usercp_nav();

$navbits = construct_navbits($navbits);
eval('$navbar = "' . fetch_template('navbar') . '";');
//	eval('$HTML = "' . fetch_template($ptpnt_stat) . '";');
$HTML = $ptpnt_stat;
eval('print_output("' . fetch_template('USERCP_SHELL') . '");');

?>
Here's the template:

Code:
<div align="center">
<if condition="$history">
<h2>Thread Credit Status</h2>
<table class='ptpnt'>
<tr>
<th>Forum</th>
<th>Total Credits</th>
<th>Total Cost</th>
<th>Balance</th>
</tr>
$threadstatus
</table>

<h3>Thread Credit Purchase History</h3>

<table class='ptpnt'>
<tr>
<th>Forum</th>
<th>Credits Purchased</th>
<th>Total Cost</th>
<th>Purchase Date</th>
</tr>
$history
</table>

<else />

<h3>You have not purchased any threads.</h3>

</if>
</div>

Here's the query I execute directly when I need to know monthly totals:
Code:
SELECT DISTINCT FROM_UNIXTIME(dateline,"%M, %Y") 
AS month, sum(totalpaid) as TotalPaid
FROM ptpnt_buythread
GROUP BY month
ORDER BY dateline
Reply With Quote
  #145  
Old 11-14-2011, 11:36 PM
N8's Avatar
N8 N8 is offline
 
Join Date: Dec 2004
Posts: 146
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks a lot man, I didn't feel like writing that out myself


I'm thinking I may hire someone to port this over to VB4 within the next couple months, I'll post the updated code when I have that done.
Reply With Quote
  #146  
Old 02-06-2012, 10:25 PM
dcg dcg is offline
 
Join Date: Jul 2003
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If anyone can update this hack for 4.0 please email me at adam@dcg.com, I will gladly pay for it. I will also pay very well as I need this updated.
Reply With Quote
  #147  
Old 02-07-2012, 12:52 AM
bitwise2000 bitwise2000 is offline
 
Join Date: Apr 2008
Posts: 31
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'd contribute as well. It's the last thing keeping me from vB4.
Reply With Quote
  #148  
Old 02-07-2012, 07:00 PM
digweb11 digweb11 is offline
 
Join Date: Nov 2011
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Anyone try this using vb4 ? Does it work?
Reply With Quote
  #149  
Old 02-07-2012, 07:15 PM
dcg dcg is offline
 
Join Date: Jul 2003
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by digweb11 View Post
Anyone try this using vb4 ? Does it work?
I had it modified and it is working perfectly for me on vb4.
Reply With Quote
  #150  
Old 02-08-2012, 05:41 PM
bchertov's Avatar
bchertov bchertov is offline
 
Join Date: Dec 2004
Location: Sonoma County, CA
Posts: 259
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Very Nice Site, dcg!
Reply With Quote
  #151  
Old 02-14-2012, 06:05 PM
ibwt's Avatar
ibwt ibwt is offline
 
Join Date: Feb 2012
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

can someone please post it for 4X
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 12:12 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.04474 seconds
  • Memory Usage 2,306KB
  • 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
  • (3)bbcode_code
  • (3)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
  • (1)pagenav_pagelinkrel
  • (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