vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   New Posting Features - Easy Forms v4.x - Create a form or multiple forms without php or html knowledge (https://vborg.vbsupport.ru/showthread.php?t=234385)

Cadellin 02-10-2010 09:37 AM

Has anyone else come across the problem with image verification? I've never seen anything about image verification in any of the forms whether I'm logged in or not!

EDIT: After adding the verification question to the form it submits ok for admins however for other users it still returns the "The string you entered for the image verification did not match what was displayed." message even when the image does match exactly.

bananalive 02-11-2010 11:47 AM

1 Attachment(s)
Quote:

Originally Posted by Cadellin (Post 1978985)
Has anyone else come across the problem with image verification? I've never seen anything about image verification in any of the forms whether I'm logged in or not!

EDIT: After adding the verification question to the form it submits ok for admins however for other users it still returns the "The string you entered for the image verification did not match what was displayed." message even when the image does match exactly.

Fixed in attached product. This issue would only incur for guests.

bananalive 02-11-2010 11:53 AM

1 Attachment(s)
Quote:

Originally Posted by Cadellin (Post 1976874)
Fantastic mod - this is exactly what I've been hoping for!

Two queries though:

1. Guests get the following message "The string you entered for the image verification did not match what was displayed." - however no image verification is displayed.

2. I have a lot of questions in my form so could you add the option to have horizontal scrolling of the results table?

Thanks

1 fixed in attached file
2 also implemented

bananalive 02-11-2010 12:05 PM

Quote:

Originally Posted by Sarcoth (Post 1976438)
That didn't work either. It's still removing the user from all membergroups and it didn't successfully set the user to the new displaygroup either. My goal is to have them removed only from one group (17).

Is there a way to use one of the questions as a variable for this? I'd like to enter an userID in one of the questions, let's say question 1. When I enter that userID and submit, it will specifically remove that user from group 17 and and them to 18. As well as update their displaygroup to 18.

PHP Code:

if ($complete)  
{
/*replace 45 with appropriate question hash*/
$userinfo=fetch_userinfo($qo[45]);
$user=$userinfo;
/*replace 18 with choosen usergroupid you want to add them to*/
$newmembergroupid '18';
$user['membergroupids']=explode(',',$user['membergroupids']);
foreach(
$user['membergroupids'] AS $mi => $mii)
{
/*replace 17 with usergroupid you want to remove them from*/
if ($mii=='17')
{
unset(
$user['membergroupids']['$mi']);
}
}
$display_usergroup $newmembergroupid;
$user['membergroupids']=implode(',',$user['membergroupids']);
$userdata =& datamanager_init('User'$vbulletinERRTYPE_STANDARD);
$userdata->set_existing($userinfo);
$userdata->set('membergroupids'$user['membergroupids']);
$userdata->set_usertitle($user['customtitle'] ? $user['usertitle'] : ''false$display_usergrouptruetrue); 
$userdata->save(); 


Sarcoth 02-11-2010 01:04 PM

Quote:

Originally Posted by bananalive (Post 1979933)
PHP Code:

if ($complete)  
{
/*replace 45 with appropriate question hash*/
$userinfo=fetch_userinfo($qo[45]);
$user=$userinfo;
/*replace 18 with choosen usergroupid you want to add them to*/
$newmembergroupid '18';
$user['membergroupids']=explode(',',$user['membergroupids']);
foreach(
$user['membergroupids'] AS $mi => $mii)
{
/*replace 17 with usergroupid you want to remove them from*/
if ($mii=='17')
{
unset(
$user['membergroupids']['$mi']);
}
}
$display_usergroup $newmembergroupid;
$user['membergroupids']=implode(',',$user['membergroupids']);
$userdata =& datamanager_init('User'$vbulletinERRTYPE_STANDARD);
$userdata->set_existing($userinfo);
$userdata->set('membergroupids'$user['membergroupids']);
$userdata->set_usertitle($user['customtitle'] ? $user['usertitle'] : ''false$display_usergrouptruetrue); 
$userdata->save(); 


Hey Banana, I appreciate your time and effort on this. Still not working though. I did add the missing } at the end, so that wasn't my issue. Did it work for you? I changed the 45 to 1 and nothing. The form gets submitted, but the user doesn't get removed or added to anything. On a side note, don't enter anything but a number into the question you choose for this code. I tried that and WOW. The magnitude of data returned was never ending.

bananalive 02-11-2010 01:29 PM

Quote:

Originally Posted by Sarcoth (Post 1979970)
Hey Banana, I appreciate your time and effort on this. Still not working though. I did add the missing } at the end, so that wasn't my issue. Did it work for you? I changed the 45 to 1 and nothing. The form gets submitted, but the user doesn't get removed or added to anything. On a side note, don't enter anything but a number into the question you choose for this code. I tried that and WOW. The magnitude of data returned was never ending.

Just tested this following code, it works:
PHP Code:

if ($complete)  
{
/*replace 45 with appropriate question hash*/
$userinfo=fetch_userinfo($qo[45]);
$user=$userinfo;
/*replace 18 with choosen usergroupid you want to add them to*/
$newmembergroupid '18';
$user['membergroupids']=explode(',',$user['membergroupids']);
foreach(
$user['membergroupids'] AS $mi => $mii)
{
/*replace 17 with usergroupid you want to remove them from*/
if ($mii==17)
{
unset(
$user['membergroupids'][$mi]);
}
}
$user['membergroupids'][]=$newmembergroupid;
$display_usergroup $newmembergroupid;
$user['membergroupids']=implode(',',$user['membergroupids']);
$userdata =& datamanager_init('User'$vbulletinERRTYPE_STANDARD);
$userdata->set_existing($userinfo);
$userdata->set('membergroupids'$user['membergroupids']);
$userdata->set_usertitle(
        
$userinfo['usertitle'],
        
true,
        
$vbulletin->usergroupcache["$newmembergroupid"],
        
false,
        
true
);
$userdata->save(); 



Sarcoth 02-11-2010 02:05 PM

Awesome stuff Banana, I love this mod. That definitely removes the selected userid from the selected usergroup and adds them to the other one. The display title still isn't changing. Did that part work for you?

Cadellin 02-11-2010 05:30 PM

Quote:

Originally Posted by bananalive (Post 1979923)
1 fixed in attached file
2 also implemented

That is amazing! Thanks bananalive!

One small glitch I've spotted is the time collumn in the table results is too narrow for it to fit (ends up on 7 lines). Apart from that super job!

ascott 02-12-2010 04:30 PM

Installed, thanks again :D

rfsforums 02-12-2010 11:50 PM

Installed - works great!

I would like to display a user profile field (field7) in the title. I tried {field7} but no such luck. Is it possible and if so do you have any suggestions?

Many Thanks!!!!


All times are GMT. The time now is 01:25 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.02433 seconds
  • Memory Usage 1,785KB
  • 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
  • (3)bbcode_php_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (4)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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