vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Need a Private Message Mod that work like this (https://vborg.vbsupport.ru/showthread.php?t=300766)

coolbreeze86 08-02-2013 04:26 PM

Need a Private Message Mod that work like this
 
Is there is any mod that works like this,

Minimum Posts needed (say 10 posts in the last 30 days) To read a PM sent by other members or to Send PM to other members.

I had seen some vbulletin board, but doesn't know exactly which mod is doing working like this. Help me friends!

Max Taxable 08-02-2013 04:43 PM

Advanced Permissions Based on Post Count

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

coolbreeze86 08-02-2013 05:14 PM

thanks for your reply. i need for particular x days, just asked there. hope i will get.

Max Taxable 08-02-2013 07:40 PM

This guy:

https://vborg.vbsupport.ru/member.php?u=369511

Created several time based permissioning mods. You might have some luck sending him a PM.

Simon Lloyd 08-02-2013 07:46 PM

I did this one https://vborg.vbsupport.ru/showthread.php?t=274283 does that help?

coolbreeze86 08-03-2013 01:58 PM

no the above said mods doesn't work like what i mean..

still waiting friends...

Max Taxable 08-04-2013 03:31 AM

Quote:

Originally Posted by coolbreeze86 (Post 2436852)
no the above said mods doesn't work like what i mean..

still waiting friends...

This guy I linked you too earlier might happily code this for you and release it to the community. Why don't you PM him?

https://vborg.vbsupport.ru/showpost....83&postcount=4

mokujin 08-04-2013 10:55 AM

Not sure if it's what you need but try this code for hook private_start

PHP Code:

$lastdays 30// count posts from last 30 days
$lastposts 10// need 10 posts from last 30 days to be able to read/send PMs

$time TIMENOW - (86400 $lastdays);

$postcount $vbulletin->db->query_first_slave("SELECT COUNT(*) AS posts 
        FROM " 
TABLE_PREFIX "post
        WHERE userid = " 
$vbulletin->userinfo['userid'] . "
        AND dateline > " 
$time "
    "
);

if (
$postcount['posts'] < $lastposts)
{
    
print_no_permission();



coolbreeze86 08-04-2013 04:32 PM

Quote:

Originally Posted by Max Taxable (Post 2436964)
This guy I linked you too earlier might happily code this for you and release it to the community. Why don't you PM him?

https://vborg.vbsupport.ru/showpost....83&postcount=4

I had asked him, but he told me that, "he won't do coding for vb anymore"

--------------- Added [DATE]1375637677[/DATE] at [TIME]1375637677[/TIME] ---------------

Quote:

Originally Posted by mokujin (Post 2437028)
Not sure if it's what you need but try this code for hook private_start

PHP Code:

$lastdays 30// count posts from last 30 days
$lastposts 10// need 10 posts from last 30 days to be able to read/send PMs

$time TIMENOW - (86400 $lastdays);

$postcount $vbulletin->db->query_first_slave("SELECT COUNT(*) AS posts 
        FROM " 
TABLE_PREFIX "post
        WHERE userid = " 
$vbulletin->userinfo['userid'] . "
        AND dateline > " 
$time "
    "
);

if (
$postcount['posts'] < $lastposts)
{
    
print_no_permission();



Thanks for your reply, Hope you understood my request, may i know how to add this to my coding to get worked.

Max Taxable 08-04-2013 04:49 PM

Quote:

Originally Posted by coolbreeze86 (Post 2437096)
I had asked him, but he told me that, "he won't do coding for vb anymore"

Well, that sucks and it's happening more and more. Hope you find what you need.

coolbreeze86 08-04-2013 05:20 PM

Quote:

Originally Posted by Max Taxable (Post 2437098)
Well, that sucks and it's happening more and more. Hope you find what you need.

Hope i got i think, but don't know where to add it... can you help me..

Max Taxable 08-04-2013 05:25 PM

Quote:

Originally Posted by coolbreeze86 (Post 2437103)
Hope i got i think, but don't know where to add it... can you help me..

You want to go in and create a plugin, AdminCP>Plugins and Products>Add New Plugin and it's self explanatory from there.

If you get hung up private message me, I can install this plugin for you.

coolbreeze86 08-04-2013 06:04 PM

Quote:

Originally Posted by Max Taxable (Post 2437106)
You want to go in and create a plugin, AdminCP>Plugins and Products>Add New Plugin and it's self explanatory from there.

If you get hung up private message me, I can install this plugin for you.

Thank you!!

Installed, Worked like what i said, but need small change.. its not allowing users even to see the inbox or send items.

Is there is any possibilities, that they can just see, inbox or send items but they should not be able to open the message.

mokujin 08-04-2013 06:44 PM

Change the hook location to private_showpm_start

coolbreeze86 08-04-2013 06:59 PM

Quote:

Originally Posted by mokujin (Post 2437114)
Change the hook location to private_showpm_start

changed the hook location, working good while clicking on inbox, but not showing error when i try to send new pm.

it is sending new private message, not showing any error message.

mokujin 08-04-2013 07:25 PM

Add the same PHP code above but with hook location private_newpm_start

Max Taxable 08-04-2013 07:54 PM

Quote:

Originally Posted by coolbreeze86 (Post 2437111)
Thank you!!

Installed, Worked like what i said, but need small change.. its not allowing users even to see the inbox or send items.

Is there is any possibilities, that they can just see, inbox or send items but they should not be able to open the message.

You're making it too complicated now. If you don't want them to have PM capability for X number of days, why do they need to see any of the tools for it?

Apply the KISS principle: Keep It Simple Stupid! :-)

coolbreeze86 08-09-2013 06:25 PM

Quote:

Originally Posted by mokujin (Post 2437121)
Add the same PHP code above but with hook location private_newpm_start

works fine friend.. thanks a lot..

--------------- Added [DATE]1376076421[/DATE] at [TIME]1376076421[/TIME] ---------------

Quote:

Originally Posted by Max Taxable (Post 2437129)
You're making it too complicated now. If you don't want them to have PM capability for X number of days, why do they need to see any of the tools for it?

Apply the KISS principle: Keep It Simple Stupid! :-)

Some users are refrain from posting, so to make them post and use pm effectively i thought this would help.. moreover i had seen the same model like what i told is working with other sites.

anyway got it now from mokujin.


All times are GMT. The time now is 03:28 AM.

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.01141 seconds
  • Memory Usage 1,771KB
  • 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_php_printable
  • (11)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (18)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete