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)
-   -   Force Current Members To Fill Out Required Profile Field (https://vborg.vbsupport.ru/showthread.php?t=82756)

phonexpo 10-13-2005 08:08 PM

Installed, good one. ;)

patsalko 10-13-2005 08:21 PM

thanks mate. this is a nice one!

futureye 10-14-2005 06:54 AM

thanks man i was looking for it

Devii 10-14-2005 05:06 PM

Very nice product, thank you for developing!

JagFan 10-17-2005 08:42 PM

Thank you! Nice! Installed - working great :)

bobs409 10-22-2005 01:04 PM

When I click the download link, I just get a page with code. Shouldn't I be getting an xml file?

Bob

TYorke 10-22-2005 08:51 PM

sorry for asking a dumb question here but what do I have to do to make an already-existing field required? like the MSN field for example?

calorie 10-26-2005 02:09 AM

@bobs409: try right click, save as, or left click, save to disk.

@TYorke: this mod is for ACP -> User Profile Fields where both 'Field Required' and 'Field Editable by User' are set to the 'Yes' option.

SpanishHarlem 10-26-2005 02:26 AM

Quote:

Originally Posted by bobs409
When I click the download link, I just get a page with code. Shouldn't I be getting an xml file?

Bob



If you haven't figured this out yet. Right click on the file and save target as.

lionslair 11-06-2005 12:30 PM

Just what I needed thank you very much

akanevsky 11-12-2005 07:06 PM

Nice hack, but there is a "BIT" more code than required for this hack. Just about 21 extra lines of code that could be eliminated :)

calorie 11-12-2005 09:01 PM

@Dark Visor: sure, take out the three rows dealing with num_rows if you want, but for this hook location, try taking out the other eighteen rows and see what you get onscreen. ;)

akanevsky 11-12-2005 09:10 PM

Does it have to be in that hook location? :P

calorie 11-12-2005 09:26 PM

How many rows of vB code would be processed if it were in a different hook location? ;)

akanevsky 11-12-2005 09:31 PM

LOL. You're right. However, a lot of standard code is better than a little custom code :) Besides, it could be done as a code mod, then you would be able to choose the most appropriate place :) (do we always have to sacrifice performance for easiness of installation? hmm...).

cmiller1014 11-13-2005 04:11 AM

Quote:

Originally Posted by Psionic Vision
LOL. You're right. However, a lot of standard code is better than a little custom code :) Besides, it could be done as a code mod, then you would be able to choose the most appropriate place :) (do we always have to sacrifice performance for easiness of installation? hmm...).

Yes if you want our "friends" over at VB to support it. It's unfortunate, but they are such babies about hacks that I wont install anything unless its mod free.

akanevsky 11-13-2005 11:39 AM

Quote:

Yes if you want our "friends" over at VB to support it. It's unfortunate, but they are such babies about hacks that I wont install anything unless its mod free.
How did we survive before 3.5.0 came out then?

banjolawyer 12-06-2005 07:28 PM

works great for me so far. Thanks.

fyjpm 12-12-2005 09:44 PM

Id like to see the users that decide to test how "required" this message really is by clicking around other links on the page to keep getting the same message screen instead of a blank html page. Can someone suggest a how-to?

Thanks,

John

ConqSoft 12-12-2005 09:45 PM

They should get the message no matter what part of vBulletin they try to browse to. They do on mine.

fyjpm 12-12-2005 09:47 PM

Quote:

Originally Posted by ConqSoft
They should get the message no matter what part of vBulletin they try to browse to. They do on mine.

You know what I almost cross posted you because I was looking at the code and it does seem that they should keep getting it...I'm thinking its because I'm using CMPS that a blank screen is happening? I'll post back my findings, anyone else have an idea please reply.

Thanks guys!

-John

P.S. Obviously I clicked *INSTALL* and I love this hack. nuff said.

fyjpm 12-12-2005 10:00 PM

How can I get the members username in the error message like this:

"Dear so-and-so, you need to fill in the required field blah blah blah..."

Anyone?

Thanks,

John

fyjpm 12-12-2005 10:45 PM

Quote:

Originally Posted by fyjpm
post back my findings, anyone else have an idea please reply.

Ok I found ok that if you are running CMPS by vBAdvanced that you will not continue to get the errror message on anything besides the CMPS homepage if you have the following enabled in your other php files:

define('VBA_PORTAL', true);
define('VBA_PAGE', 'include');

meaning that you are running vB inside of the CMPS system. I'm suprised no one has run across this yet as I thought lots of ppl used the CMPS product. Any how I still haven't figure out the solution, but I know that if I comment out those lines in all the .php files I edited it works.

Again, if anyone has any further insight that would save me some time, please reply. And thank you very much!

-John

Kuimera 12-12-2005 11:28 PM

I know this should be kind of hard request, but sometimes we get that kind of dumb users who dont know the hell what is a profile, and when that message shows, they tend to go to the profile and leave without changing anything...
Is there a way to show in the msg what are the new profile fields or something?

fyjpm 12-12-2005 11:46 PM

Quote:

Originally Posted by Kuimera
I know this should be kind of hard request, but sometimes we get that kind of dumb users who dont know the hell what is a profile, and when that message shows, they tend to go to the profile and leave without changing anything...
Is there a way to show in the msg what are the new profile fields or something?

Go to:

vB Control Panel > Languages & Phrases > Search in Phrases >

Search for Text :"zzz_update_profile" and tick the "Phrase Variable Name Only" box.

Now you can click "Edit", then click "Copy Default Text", and edit what you want to say to your users on the screen before they click "Edit Profile".

Worked for me!

-John

(P.S. LoL now I wish someone could answer my Q's too!~)

cbr929rrerion 12-13-2005 12:25 AM

I tried the install on 3.5 and get this message after login,

Code:


Fatal error: Call to undefined function: print_portal_output() in /hsphere/local/home/crotchro/crotchrocketracing.com/includes/functions.php on line 4175

anyone have a fix?

Does it not add the phrase? Instrustion here seem vague? I installed the product and get the above error.. how do we fix this?

fyjpm 12-13-2005 12:29 AM

Looks like you are running vBAdvanced CMPS...make sure in your ./includes/functions.php file you have the code required from it...it looks like this:

Code:

        if (defined('VBA_PORTAL') AND !defined('SKIP_OUTPUT') AND !defined('VBA_SCRIPT'))
        {
                define('SKIP_OUTPUT', true);
 
                global $home;
 
                print_portal_output($home, $vartext);
        }

Quote:

Originally Posted by cbr929rrerion
I tried the install on 3.5 and get this message after login,

Code:


Fatal error: Call to undefined function: print_portal_output() in /hsphere/local/home/crotchro/crotchrocketracing.com/includes/functions.php on line 4175

anyone have a fix?

Does it not add the phrase? Instrustion here seem vague? I installed the product and get the above error.. how do we fix this?


cbr929rrerion 12-13-2005 12:37 AM

yes I have that

Code:


if (defined('VBA_PORTAL') AND !defined('SKIP_OUTPUT') AND !defined('VBA_SCRIPT'))
        {
                define('SKIP_OUTPUT', true);

                global $home;

                print_portal_output($home, $vartext);
        }

thats is in includes/functions.php

now what?

thanks for the quick reply also.

fyjpm 12-13-2005 12:41 AM

Do you have this at the top of your main forum homepage? (either forum.php or whatever you renamed it to...if you are not using CMPS as your homepage then look in index.php)

Code:

<?php
define('VBA_PORTAL', true);
define('VBA_PAGE', 'include

I think you need to just really go through the CMPS installation instructions and make sure everything is as it should be...this seems to be your trouble.

FWIW,

John

Quote:

Originally Posted by cbr929rrerion
yes I have that

Code:


if (defined('VBA_PORTAL') AND !defined('SKIP_OUTPUT') AND !defined('VBA_SCRIPT'))
        {
                define('SKIP_OUTPUT', true);

                global $home;

                print_portal_output($home, $vartext);
        }

thats is in includes/functions.php

now what?

thanks for the quick reply also.


cbr929rrerion 12-13-2005 12:46 AM

I have this

Code:

<?php
define('VBA_PORTAL', true);
define('VBA_PAGE', 'forum');


fyjpm 12-13-2005 12:50 AM

Well if you named your CMPS page that displays all of Vbulletins pages to "forum" then you are ok with this part. You can check by going into Admin Control Panel > vBa CMPS > Edit Pages and look for "forum" if you don't see it then this is your problem and change that to what you do see there and see if that works. IF you do see it, then I'm getting at a loss for why its doing this for you...

-John

Quote:

Originally Posted by cbr929rrerion
I have this

Code:

<?php
define('VBA_PORTAL', true);
define('VBA_PAGE', 'forum');



cbr929rrerion 12-13-2005 01:04 AM

ok... what should be named what?

it was named default, I renamed it to forum, still not work but the identifier is still default...

what where do I need to check?

Kuimera 12-13-2005 01:41 AM

So you have to change it manualy, every time I add a new profile field I go there and change in the text what I added, that a good idea.
Tks a lot, now plz ppl, anwser is questions :P

fyjpm 12-13-2005 03:18 AM

Quote:

Originally Posted by cbr929rrerion
ok... what should be named what?

it was named default, I renamed it to forum, still not work but the identifier is still default...

what where do I need to check?

before we continue on, please make sure you've followed the instructions carefully at:

http://www.vbadvanced.com/membersare...tid=4&pageid=6

Then you just have to make sure that the :

<?php
define('VBA_PORTAL', true);
define('VBA_PAGE', 'include');

is the same as the module's identifier you created.

fyjpm 12-13-2005 04:26 AM

Quote:

Originally Posted by fyjpm
How can I get the members username in the error message like this:

"Dear so-and-so, you need to fill in the required field blah blah blah..."

Anyone?

Thanks,

John

"There's no help like self help" so in case anybody else wants get fancy like me find this line in the hook for this mod:

Code:

                                eval(standard_error(fetch_error('zzz_update_profile',$vbulletin->options['bburl'],$vbulletin->session->vars['sessionurl'])));
change to this:

Code:

                                eval(standard_error(fetch_error('zzz_update_profile',$vbulletin->options['bburl'],$vbulletin->session->vars['sessionurl'],$vbulletin->userinfo['username'])));
Now in your Phrase manager search for : zzz_update_profile

change to

Code:

Dear {3}, there are new required profile field(s) since your last visit: click <a href="{1}/profile.php?{2}do=editprofile">Edit Profile</a> to update.
There. Personalized error message. ;)

-John

EDIT: see next post for combined features: https://vborg.vbsupport.ru/showthrea...554#post847554

fyjpm 12-13-2005 05:29 AM

Quote:

Originally Posted by Kuimera
I know this should be kind of hard request, but sometimes we get that kind of dumb users who dont know the hell what is a profile, and when that message shows, they tend to go to the profile and leave without changing anything...
Is there a way to show in the msg what are the new profile fields or something?

I modified the code to expose 2 additional parameters you can use in the zzz_update_profile phrase "{3}" (username) and "{4}" (list of required fields needing attention). So one could do something like this:

Code:

Dear {3} there are new required profile field(s) since your last visit: {4}. Click <a href="{1}/profile.php?{2}do=editprofile">Edit Profile</a> to update.
Here's the modified "Force Profile Update" hook code: ( Plugin System > Plugin Manager > Hook Location: global_start )

Code:

// #### Force Current Members To Fill Out Required Profile Field ####
$zzz_showmessage = false;
$zzz_multiplefields = false;
if ($vbulletin->userinfo['userid'] > 1)
{
        if (THIS_SCRIPT != 'profile' AND THIS_SCRIPT != 'usercp')
        {
                $zzz_reqfields = $db->query_read("SELECT profilefieldid, title ".
                                "FROM ".TABLE_PREFIX."profilefield ".
                                "WHERE required = 1 AND editable = 1");
                if ($db->num_rows($zzz_reqfields))
                {
                        while ($zzz_reqfield = $db->fetch_array($zzz_reqfields))
                        {
                                $zzz_fieldname = "field".$zzz_reqfield['profilefieldid'];
                                $zzz_userfield = $vbulletin->userinfo["$zzz_fieldname"];
                                if (empty($zzz_userfield) && $zzz_userfield != "0")
                                {
                                        $zzz_multiplefields ? $zzz_fieldnamelist .= ", " . $zzz_reqfield['title'] : $zzz_fieldnamelist .= $zzz_reqfield['title'] ;
                                        $zzz_multiplefields = true;
                                        $zzz_showmessage = true;
                                }
                        }
                }
                if ($zzz_showmessage)
                {
                        eval('$gobutton = "' . fetch_template('gobutton') . '";');
                        eval('$spacer_open = "' . fetch_template('spacer_open') . '";');
                        eval('$spacer_close = "' . fetch_template('spacer_close') . '";');
                        $show['pmstats'] = true;
                        if ($vbulletin->options['usepopups'] != 0)
                        {
                                $show['popups'] = true;
                        }
                        $show['member'] = true;
                        $show['searchbuttons'] = true;
                        $pmbox['lastvisitdate'] = vbdate($vbulletin->options['dateformat'], $vbulletin->userinfo['lastvisit'], 1);
                        $pmbox['lastvisittime'] = vbdate($vbulletin->options['timeformat'], $vbulletin->userinfo['lastvisit']);
                        $pmunread_html = iif($vbulletin->userinfo['pmunread'], '<strong>' . $vbulletin->userinfo['pmunread'] . '</strong>', $vbulletin->userinfo['pmunread']);
                        $vbphrase['unread_x_nav_compiled'] = construct_phrase($vbphrase['unread_x_nav'], $pmunread_html);
                        $vbphrase['total_x_nav_compiled'] = construct_phrase($vbphrase['total_x_nav'], $vbulletin->userinfo['pmtotal']);
                        eval('$headinclude = "' . fetch_template('headinclude') . '";');
                        eval('$header = "' . fetch_template('header') . '";');
                        eval('$footer = "' . fetch_template('footer') . '";');
                        eval(standard_error(fetch_error('zzz_update_profile',$vbulletin->options['bburl'],$vbulletin->session->vars['sessionurl'],$vbulletin->userinfo['username'],$zzz_fieldnamelist)));
                }
        }
}
// #### Force Current Members To Fill Out Required Profile Field ####


fyjpm 12-13-2005 07:15 AM

Quote:

Originally Posted by fyjpm
You know what I almost cross posted you because I was looking at the code and it does seem that they should keep getting it...I'm thinking its because I'm using CMPS that a blank screen is happening? I'll post back my findings, anyone else have an idea please reply.

Thanks guys!

-John

P.S. Obviously I clicked *INSTALL* and I love this hack. nuff said.

FIXED this issue with vBA CMPS: see my self-answering thread here:
http://www.vbadvanced.com/forum/showthread.php?p=74589

But here's the quick fix:

add:
PHP Code:

            if (defined('VBA_PORTAL') AND !defined('SKIP_OUTPUT') AND !defined('VBA_SCRIPT'))
            {
                
define('SKIP_OUTPUT'true);
            } 

right before:

PHP Code:

            eval('$headinclude = "' fetch_template('headinclude') . '";');
            eval(
'$header = "' fetch_template('header') . '";');
            eval(
'$footer = "' fetch_template('footer') . '";'); 


cbr929rrerion 12-13-2005 09:24 PM

Im sad to say I wish I could get it to work but I cant, I named the part in the index.php file the same as the identifier and all else checks out.. I guess I cant use this

fyjpm 12-13-2005 10:09 PM

Quote:

Originally Posted by cbr929rrerion
Im sad to say I wish I could get it to work but I cant, I named the part in the index.php file the same as the identifier and all else checks out.. I guess I cant use this

PM me with your login info, I'll take a look for you... we can finish this in instant messenger or PM.

ConKien 12-19-2005 08:14 AM

Is there a way to force users to pick their avatar OR upload their profile's picture?

*Click Install*


All times are GMT. The time now is 01:01 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.01667 seconds
  • Memory Usage 1,859KB
  • 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
  • (13)bbcode_code_printable
  • (2)bbcode_php_printable
  • (14)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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