Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #21  
Old 10-11-2005, 02:22 AM
steven s's Avatar
steven s steven s is offline
 
Join Date: Aug 2004
Location: Greenville, SC
Posts: 572
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MarcoH64
I might have a look at it. Bump me again if i forget.
Bumping. Think this will work in 3.5?

Edit: I figured I'd give it a go. It seems to work.
Reply With Quote
  #22  
Old 02-16-2006, 12:25 PM
axi axi is offline
 
Join Date: Jan 2005
Posts: 231
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

works like a dream xcept one of my primary users in that group wont get the message, why is that?? wierdf!
Reply With Quote
  #23  
Old 02-16-2006, 12:46 PM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If only 1 didn't get the message, the problem must be on his side.
Reply With Quote
  #24  
Old 02-16-2006, 02:55 PM
axi axi is offline
 
Join Date: Jan 2005
Posts: 231
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

no no, you know how in vBulletin it shows who has been emailed, well over there.. it didnt list his name... why?? he is primary of that group.
Reply With Quote
  #25  
Old 02-20-2006, 10:54 AM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry i don't understand you.
Reply With Quote
  #26  
Old 04-17-2006, 07:50 PM
Warlock40 Warlock40 is offline
 
Join Date: Mar 2006
Location: Ontario Canada
Posts: 46
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

great hack. thought it was working on 3.5.4
but get this error when try to send out an email

Code:
Database error in vBulletin 3.5.4:

Invalid SQL:

				SELECT user.userid, user.usergroupid, user.username, user.email, user.joindate,
					useractivation.activationid
				FROM user AS user
				LEFT JOIN userfield AS userfield ON (userfield.userid = user.userid)
				LEFT JOIN usertextfield AS usertextfield ON (usertextfield.userid = user.userid)
				LEFT JOIN useractivation AS useractivation ON (useractivation.userid = user.userid AND useractivation.type = 0)
				WHERE 
		1=1 AND (usergroupid = 6 OR usergroupid = 7 OR usergroupid = 50 OR usergroupid = 46 OR usergroupid = 51 OR usergroupid = 2 OR find_in_set(6, membergroupids) OR find_in_set(7, membergroupids) OR find_in_set(50, membergroupids) OR find_in_set(46, membergroupids) OR find_in_set(51, membergroupids) OR find_in_set(2, membergroupids))
		AND user.email <> ''
		
				ORDER BY userid
				LIMIT 0, 500;

MySQL Error  : Column: 'usergroupid' in where clause is ambiguous
Error Number : 1052
Reply With Quote
  #27  
Old 04-19-2006, 06:04 PM
Warlock40 Warlock40 is offline
 
Join Date: Mar 2006
Location: Ontario Canada
Posts: 46
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

no support? No worries. removed the code from my forum. Good idea. Wish I could get it to go with 3.5.4.
Reply With Quote
  #28  
Old 04-25-2006, 02:22 AM
tylneyt tylneyt is offline
 
Join Date: Apr 2006
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MarcoH64
I got a better solution for you

Do the following modifications in your includes/adminfunctions_user.php (2 edits) and you will be able to select your users for the mailing also based on secondary membergroups.

In file includes/adminfunctions_user.php

Find:
PHP Code:
        print_membergroup_row($vbphrase['primary_usergroup'], 'user[usergroupid]'2$userarray); 
Add under:
PHP Code:
        // Start hack MarcoH64
        
print_membergroup_row($vbphrase['additional_usergroups'], 'user[membergroupids]'2$userarray);
        
// End hack MarcoH64 
In the same file find:
PHP Code:
    if (is_array($user['usergroupid']))
    { 
// for emails
        
foreach($user['usergroupid'] AS $id)
        {
            
$u_condition[] = "usergroupid = $id";
        } 
REPLACE by:
PHP Code:
    // Start hack MarcoH64
    
if (is_array($user['usergroupid']) OR is_array($user['membergroupids']))
    { 
// for emails
        
if (is_array($user['usergroupid']))
        {
            foreach(
$user['usergroupid'] AS $id)
            {
                
$u_condition[] = "usergroupid = $id";
            }
        }
        if (
is_array($user['membergroupids']))
        {
            foreach(
$user['membergroupids'] AS $id)
            {
                
$u_condition[] = "find_in_set($id, membergroupids)";
            }
        }
        
// End hack MarcoH64 
As usual test first on a test board, only limited tested by me.
there needs to be a line added for 3.5.4, then it works just fine:

REPLACE by:
PHP Code:
// Start hack MarcoH64 
    
if (is_array($user['usergroupid']) OR is_array($user['membergroupids'])) 
    { 
// for emails
// start addition, by tylneyt
// this line is necessary to create the variable in this scope
//
        
$u_condition = array();
// end addition 
        
if (is_array($user['usergroupid'])) 
        { 
            foreach(
$user['usergroupid'] AS $id
            { 
                
$u_condition[] = "usergroupid = $id"
            } 
        } 
        if (
is_array($user['membergroupids'])) 
        { 
            foreach(
$user['membergroupids'] AS $id
            { 
                
$u_condition[] = "find_in_set($id, membergroupids)"
            } 
        } 
        
// End hack MarcoH64 

hope that helps, should actually be a standard feature of next vB if you ask me!
Reply With Quote
  #29  
Old 06-01-2006, 11:59 AM
smdani smdani is offline
 
Join Date: Nov 2004
Posts: 106
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I’ve same problem https://vborg.vbsupport.ru/showthrea...473#post975473
MySQL Error : Column: 'usergroupid' in where clause is ambiguous
Error Number : 1052

Tylneyt I’d hoped that your add will help me but after the code modification, the problem persists
?Any idea of what I would do?
I’m running vb 3.5.0 with MarcoH64’s modification

I don’t want to undo the MarcoH64’s code edition as it is very useful in my forum, but now I can’t send mails to primarygruop members
Reply With Quote
  #30  
Old 06-09-2006, 01:50 AM
Panzer Max's Avatar
Panzer Max Panzer Max is offline
 
Join Date: May 2006
Posts: 196
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That works beautifully! One would think this would be standard issue with vB.

Thanks!
Reply With Quote
Reply


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 07:11 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.04577 seconds
  • Memory Usage 2,274KB
  • Queries Executed 13 (?)
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
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_code
  • (5)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)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_postinfo_query
  • fetch_postinfo
  • 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
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • 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