vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Send a Private Message to Public Group Leaders Upon a Join Request (https://vborg.vbsupport.ru/showthread.php?t=83086)

amykhar 11-23-2005 12:44 PM

My hideaway mod gives users a private group and one forum to manage, but it is a very limited application of it.

Vizionz 11-23-2005 12:45 PM

do these works together ? so if you create a hideaway and someone wants to join your hideaway will they recieve the pm from this ?

amykhar 11-23-2005 12:46 PM

Yes.

Vizionz 11-23-2005 12:46 PM

thanks amy :) i will grab that then

EasyTarget 11-28-2005 04:37 AM

nice hack.
how can I get the links to work in the pm system without enabling html?

LamboJay 11-28-2005 06:29 PM

Installed on 3.5.1 and working great. Thanks!

Schwarze Katze 11-28-2005 08:20 PM

Nice!
How do I change the pm title? Stupid me doesn't know... :(

smju 12-08-2005 03:50 PM

If you really want to, it would be this line of code to change:

$pmdm->set('title', $vbulletin->userinfo['username']. " would like to join " . $groupname['title']);


Nice utility. Took me a while to figure out where to put everything but it's now up and running correctly.

For anyone else totally new to this sort of thing here be what I did.
  • you add the Phrase via the Langiages and Phrase Manager
  • Then via the Plugin Manager You copy the
    • Product, Hook Location and Title from the xml code
    • and then copy the xml code from require_once(DIR . '/includes/class_bbcode.php'); to // End of mod Do not include the closing brackes ]] into the plugin php code box

and everything being equal it should work.

NB: I put the actual http:// address inside url /url bbcode tags in the Phrase message.

cynix2 12-19-2005 11:45 PM

i made a slight improvement on this mod
since i dont like hard coding things that are in variables i made it so the phrase uses $vboptions[bburl] as {2} instead of having to hard code the url into the phrase

files are attached, i hope they get put to good use

attachments removed, see below for new ones

Snake 12-20-2005 08:45 AM

Thanks man!

cynix2 02-01-2006 05:54 PM

after a good long while of testing i finally fixed up this hack

the main problem that existed was the bbcode was being parsed in the hack, when it didnt need to be, vb will parse the bbcode when displaying the pm, so i then proceeded to use bbcode to construct the phrase for the pm

the second thing i fixed was the url issue, i was on the right track using {2} in my last post above but i put the wrong variable into the hack, so now it works just fine

anyways here are the new updated files, amykhar you might wanna update the hack so people dont have to come to the last page to see it needed fix'n

EasyTarget 02-01-2006 05:56 PM

thanks cynix

installed and seems to be working good.

Snake 02-01-2006 06:29 PM

Yeah thanks man. That worked now! :)

Eriond 02-19-2006 11:09 AM

excellent plugin :D

*INSTALLED* finally :) very new to all this so took me a few days to learn exactly how to get this working *feels silly*

working perfectly just wondering if there was any news on an auto reply pm accepting the member?

Hornstar 02-21-2006 05:01 AM

Quote:

Originally Posted by cynix2
after a good long while of testing i finally fixed up this hack

the main problem that existed was the bbcode was being parsed in the hack, when it didnt need to be, vb will parse the bbcode when displaying the pm, so i then proceeded to use bbcode to construct the phrase for the pm

the second thing i fixed was the url issue, i was on the right track using {2} in my last post above but i put the wrong variable into the hack, so now it works just fine

anyways here are the new updated files, amykhar you might wanna update the hack so people dont have to come to the last page to see it needed fix'n


Is this the same file that you download from the side bar?




Code:

product - vbulletin
hooklocation - profile_insertjoinreques
title - PM Group Leader on Join Request
Plugin PHP Code -

require_once(DIR . '/includes/class_bbcode.php');
// Find the leaders of the usergroup

        $leaders = $db->query_read("
                                SELECT ugl.userid, username
                                FROM " . TABLE_PREFIX . "usergroupleader AS ugl
                                INNER JOIN " . TABLE_PREFIX . "user AS user USING(userid)
                                WHERE ugl.usergroupid = " . $vbulletin->GPC['usergroupid'] . "
                        ");

        // Get the name of the member group
                        $groupname = $db->query_first("
                        SELECT title
                        FROM " . TABLE_PREFIX . "usergroup
                        WHERE usergroupid = " .  $vbulletin->GPC['usergroupid'] ."
                        ORDER BY usergroupid DESC
                        LIMIT 1
                    ");
        // Create the message:
        $message = construct_phrase($vbphrase['group_memberships_message'], $groupname['title'], $vbulletin->options['bburl']);

    if ($db->num_rows($leaders))
        {
                while ($leader = $db->fetch_array($leaders))
                {
                        // create the DM to do error checking and insert the new PM
                        $pmdm =& datamanager_init('PM', $vbulletin, ERRTYPE_ARRAY);
                        $pmdm->set('fromuserid', $vbulletin->userinfo['userid']);
                        $pmdm->set('fromusername', $vbulletin->userinfo['username']);
                        $pmdm->set('title', $vbulletin->userinfo['username']. " would like to join " . $groupname['title']);
                        $pmdm->set('message', $message);
                        $pmdm->set_recipients($leader[username], $botpermissions);
                        $pmdm->set('dateline', TIMENOW);
                        $pmdm->set_info('savecopy',0);
                        $pmdm->save();
                }
        }

        else {
                eval(standard_error(fetch_error('usergroup_already_member')));
        }

 // End of mod


plugin is active - yes

Edit, I edited this post so it will help other people, I finally got it working, yay!!

axelhols 03-15-2006 11:34 AM

I still sense that this plug-in is buggy.

getting Fatal error: Unable to proceed with save while $errors array is not empty in class vb_datamanager_pm in /includes/class_dm.php on line 758

1. Using VB 3.5.3
2. Using multiple joinable Groups with multiple group leaders for each.
2. Have added the VB phrase group_memberships_message.

The confusing part is that the problem is intermittant. When I remove the plug-in and VB phrase and re-install everything it seems to work for while until a few new user registrations later and join requests to any of the groups bombs out with the error message above. In another case it will work with only one of my 3 joinable groups and bomb out with the other two. In other cases each group leader will get multiple (3) PM messages for the same "join request to one specific group!.

Has anybody else using VB 3.5.3 with multiple joinable groups and group leaders experienced similar intermittant problems with this plug-in?.

amykhar 03-15-2006 11:59 AM

It must be something in the pm settings for some of the group leaders. At some point, I'll look into how to make this more bullet-proof, but for now it suits my needs.

ricker 03-22-2006 04:45 PM

Quote:

Has anybody else using VB 3.5.3 with multiple joinable groups and group leaders experienced similar intermittant problems with this plug-in?.
unfortunately yes, i had to disable this plugin. :(

trackpads 04-01-2006 11:13 AM

I found out how to reproduce the error that happens on line 758, in my case one of my group leaders had a space in his username. Once I removed him as a group leader the bug went away. I am not sure which version of the hack I have but I am going to reinstall and try again.

Thanks again,

-Jason

trackpads 04-01-2006 11:18 AM

Ok, big dummy, should have tested it again "after" I uploaded the new version. It works :) :)

Thanks!!

TypeStaff 04-03-2006 09:09 AM

I'm totally noob installing plugins. Could anyone explain me where's exactly the file that I must edit? thanks!!

MThornback 04-03-2006 02:18 PM

Quote:

Originally Posted by TypeStaff
In totally noob installing plugins. Could anyone explain me where's exactly the file that I must edit? thanks!!

The file is edit is facilitated by the plugin, your only asked to add a phrase here.

Connector 04-24-2006 12:43 AM

how can i send the user that i dany them or accept them message ?

Eriond 04-24-2006 12:05 PM

at the moment i believe it is just a case of you manually sending a pm to them, it would be nice to have an auto reply for accept/deny but to be honest it doesnt take that long to type an accept/deny pm yourself :)

Connector 04-24-2006 05:25 PM

Quote:

Originally Posted by Eriond
at the moment i believe it is just a case of you manually sending a pm to them, it would be nice to have an auto reply for accept/deny but to be honest it doesnt take that long to type an accept/deny pm yourself :)

I have like 30 User join per day it is not hard but take to much time to sending one by one ..:eek:

Hornstar 05-13-2006 10:11 AM

I started to get this error message after it working fine for a few months, $errors array is not empty in class vb_datamanager_pm in /includes/class_dm.php on line 758

That caused me getting heaps and heaps of the same pm from each person joining.

I have now deleted it, and uploaded it again after downloading the latest.

Will see if its working shortly.

Hornstar 05-14-2006 04:46 AM

Yep still get the error message

Fatal error: Unable to proceed with save while $errors array is not empty in class vb_datamanager_pm in /includes/class_dm.php on line 758

The username of the person that got the error was XxNAKdragon5xX

and I think everyone else is getting it as well. Because of that, I have had to disable it until the problem can be fixed.

AndyP 05-16-2006 02:11 AM

I've just installed this and done a quick test. Looks good and I agree that it should be standard (was something I got used to when I was on phpBB).
Thanks.

Princeton 06-05-2006 01:41 PM

excellent plugin :up:

amykhar 06-05-2006 01:47 PM

I am still surprised this isn't a standard option in vbulletin. All kinds of bells and whistles in there, but some real basic stuff isn't there yet.

cynix2 08-09-2006 09:31 PM

has anyone tried this on 3.6? or know if 3.6 has this feature by default?

HMBeaty 08-10-2006 02:59 AM

JUST tried to install on 3.6.0 and doesn't work. Pulls up this error after submitting a join request.....

Quote:

Fatal error: Unable to proceed with save while $errors array is not empty in class vb_datamanager_pm in /includes/class_dm.php on line 763

Quarterbore 08-10-2006 02:55 PM

Group hug time... I really need this for 3.6 or my staff may revolt!

Too bad this didn't get included with the new version...

Cheertobi 08-17-2006 12:11 PM

Does this kind of mod exist, that sends emails to the groupleader instead of a PM!?

Tobi

amykhar 08-17-2006 04:20 PM

you could easily change this to use the email system instead of pm. Just find a mod that sends emails and base your modifcations to this mod off that.

tracylee 08-29-2006 06:54 PM

Quote:

Originally Posted by Quarterbore
Group hug time... I really need this for 3.6 or my staff may revolt!

Too bad this didn't get included with the new version...

Same here, I've been asked for this by my mod team.

ConqSoft 08-29-2006 07:10 PM

Working fine for me in 3.6.0....

FlynnUK 11-23-2006 08:23 AM

Great add-on. Nice one.

I've just installed and tested on 3.6.3 and it works fine.

vbob 02-12-2008 09:37 AM

Very Usefull Mod. Installed and Working Fine...:-)
I Have Vbulletin 3.6.8 PL2 and Vbadvanced 3.00

Thank you for your Mod

AyeCapn 02-29-2008 01:47 PM

Could this be modified to send a message to the person who just joined the group? I have one particular group that has some specific rules and instructions.


All times are GMT. The time now is 04:17 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.01341 seconds
  • Memory Usage 1,819KB
  • 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
  • (1)bbcode_code_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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