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)

bananalive 08-05-2010 09:16 AM

Quote:

Originally Posted by TMSBrad (Post 2078297)
I'm working on the custom form output. How would I structure the if statement to check if something is null? What about is not null?

<vb:if condition="$q[2]">not null<vb:else />null</vb:if>
<vb:if condition="$q[2]">Value Entered<vb:else />No Value</vb:if>

bananalive 08-05-2010 09:23 AM

Quote:

Originally Posted by thunderclap82 (Post 2075457)
Can a person filling out the form attach a file?

Yes when the form is creating a new thread

bananalive 08-05-2010 09:29 AM

Quote:

Originally Posted by Nikola Bosnjak (Post 2075171)
If this is not possible, how can I change sub links that I see when I'm using a form? Currently I'm not using a Forum on my site, only a CMS, so when a visitor goes to fill a form, now he see a links that he don't understand (FAQ, Calendar, Forum actions, Quick links) so I would like that I can hide this links or to have the same links like when I'm reading articles (Sections).

Please, and thank you!


Find this line in plugin Easy Forms - Forms Tab:
PHP Code:

$vbulletin->options['selectednavtab'] = 'forms'

Replace with:
PHP Code:

$vbulletin->options['selectednavtab'] = 'vbcms'

or
PHP Code:

$vbulletin->options['selectednavtab'] = 'articles'


bananalive 08-05-2010 09:45 AM

Quote:

Originally Posted by Nikola Bosnjak (Post 2073579)
I can see that other members had a problem with deleting a form, but can not find the answer. I'm having the same problem, when I click on Delete form noting happens, and also when I want to delete a question in this (any) form, nothing happens.

EDIT: Ok, I found my way how to do it. Just put a URL manually ...misc.php?do=deleteform&fid=1. Is there some bug in this script, how to fix it? Becouse when I click some links on Form screen, I get only URL ...misc.php# and obviously nothing happens.

I've changed how it's handled for next release, so it will work for those who don't have javascript browsers.

vap0r-7 08-05-2010 05:01 PM

I would like to say thanks, this is one of the best mods to have available and use.

It is extremely easy and user friendly. It has made a huge difference for our website and allows for even more opportunities without having to worry about having to get a brand new XML form created or revised.

Again, great job and many thanks, this has saved many hours of time and frustration.

Sarcoth 08-05-2010 08:11 PM

Quote:

Originally Posted by Choez (Post 2075531)
For the exact same reason why I asked if it's possible to submit a form to threads 'twice'. I've looked at the code and found the section where the threads are created; but I can't get it modified to a working version, missing comments in the code of what does what :P (understandably).

Any hints or help here would be heavily appreciated.

Search and you shall find: https://vborg.vbsupport.ru/showpost....&postcount=229

bada_bing 08-05-2010 08:49 PM

I am wondering I I setup a forum using Easy Forms if there is any way to intergrate this into vbadvanced?

Sarcoth 08-09-2010 04:47 PM

Hey Banana,

I think I have a good one for you. :)

I am setting up a custom question to ask my moderators to select a name belonging to usergroup 2.

PHP Code:

$answer .= '<select name="'.$formbit[id].'">';
$members $db->query_read("SELECT * FROM " TABLE_PREFIX "user
WHERE usergroupid = 2
ORDER BY username ASC"
);
    while(
$row $db->fetch_array($members)) {
$answer .= '<option value="'.$row[username].'"';
if (
$row[username] == $thisanswer) {
$answer .= 'selected="selected"';
}
$answer .= '>'.$row[username].'</option>';
}
$answer .= '</select>'

That works great; I've given this question the reference of shuser. This will allow my moderators to select the name they want. When they click submit, I want the name selected to have the primary usergroup changed to usergroup 18. Here is what I tried as my first test (Form Hood: Before Submit):

PHP Code:

if ($complete) {
    
$userinfo=fetch_userinfo($qo[shuserid]);
    
$user=$userinfo;
    
    
//$userinfo = $vbulletin->userinfo;
    
$user['usergroupid'] = 18;
    
    if (empty(
$user['usergroupid'])) {
        
$user['usergroupid'] = 2;
    }
    
    
$getusergroupid iif($userinfo['displaygroupid'] != $userinfo['usergroupid'], $userinfo['displaygroupid'], $user['usergroupid']);
    
    
$user_usergroup =& $vbulletin->usergroupcache["$user[usergroupid]"];
    
$display_usergroup =& $vbulletin->usergroupcache["$getusergroupid"];

    
$userdata =& datamanager_init('User'$vbulletinERRTYPE_STANDARD);
    
$userdata->set_existing($userinfo);
    
$userdata->set('usergroupid'$user['usergroupid']);
    
$userdata->set_usertitle(
        
$user['customtitle'] ? $user['usertitle'] : '',
        
false,
        
$display_usergroup,
        (
$user_usergroup['genericpermissions'] & $vbulletin->bf_ugp_genericpermissions['canusecustomtitle']) ? true false,
        (
$user_usergroup['genericpermissions'] & $vbulletin->bf_ugp_genericpermissions['cancontrolpanel']) ? true false
    
);

    require_once(
DIR '/includes/functions_ranks.php');
    
    if (
$user['userid'] == $vbulletin->userinfo['userid']) {
        
$vbulletin->userinfo['usergroupid'] = $user['usergroupid'];
        
$vbulletin->userinfo['displaygroupid'] = $user['usergroupid'];
    }

    
$userdata->save();


Obviously, now I realize that the usergroup update code was meant to use a userid, not the username. So, what do you suggest? I was thinking that I could find a way to use the username for searching for the userid, I need to remember how I did that in the past, and then put that into the code. Do you know how to do that off hand? I'll keep searching.

Thanks.

Sarcoth 08-09-2010 05:09 PM

I tried the following with no luck for the top part. I think this is mostly correct, but I must be doing a variable the wrong way.

PHP Code:

if ($complete) {
    
$shuserid $vbulletin->db->query_first("select userid from vBull_user where username='{$qo['shuser']}'");
    
$userinfo=fetch_userinfo($qo[$shuserid]); 


Dragonsys 08-09-2010 06:23 PM

Quote:

Originally Posted by Sarcoth (Post 2081403)
I tried the following with no luck for the top part. I think this is mostly correct, but I must be doing a variable the wrong way.

PHP Code:

if ($complete) {
    
$shuserid $vbulletin->db->query_first("select userid from vBull_user where username='{$qo['shuser']}'");
    
$userinfo=fetch_userinfo($qo[$shuserid]); 


maybe instead of if ($complete) try using if (isset($qo['shuser']))?
Also make sure that $qo['shuser'] is correct, and it's not actually something like $qo[1]


All times are GMT. The time now is 02:52 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.05120 seconds
  • Memory Usage 1,789KB
  • 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
  • (7)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
  • (5)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