vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Location 'Undisclosed'. (https://vborg.vbsupport.ru/showthread.php?t=48826)

Davey 02-12-2003 01:36 AM

Location 'Undisclosed'.
 
I couldn't find this within about 6 pages of the request forum.
Basically, I'm using a table in the postbit now, and the location field is sometimes left blank, which means the table is not complete.
I was wondering how to make the location as 'Undisclosed' by default.
Sorry if this has already been requested but I'm in a foul mood tonight and I didn't want to search further than 2 pages.

Dave.

mr e 02-12-2003 01:52 AM

use phpMyAdmin to change the field's default to "Undisclosed"

Davey 02-12-2003 01:56 AM

Which gives me an idea, I'll just add value="Undisclosed" in the registration templates and set the field to "must be completed" thanks mr e.

Dave.

Erwin 02-12-2003 02:33 AM

Better yet, do this:

Open functions.php -

Find:

PHP Code:

    if ($post[avatarid]!=0) {
            
$avatarurl=$post[avatarpath];
        } else {
            if (
$post[hascustomavatar] and $avatarenabled) {
                
$avatarurl="avatar.php?userid=$post[userid]&dateline=$post[avatardateline]";
            } else {
                
$avatarurl="";
            }
        } 

Below add:

PHP Code:

            if ($post[field2]=="") {
            
$post[field2] = "Undisclosed";
            } 


Xenon 02-12-2003 04:50 PM

i'd use this:
PHP Code:

if (trim($post[field2])=="") {
            
$post[field2] = "Undisclosed";
            } 


Rose 02-12-2003 05:09 PM

*lol @ the many different ways to do the same(ish) thing*

;)

Xenon 02-12-2003 05:13 PM

it's not the same thing.

if a user has entered a space the string is " " and so there wouldn't be undisclosed....
with trim() it would show undisclosed

Erwin 02-13-2003 04:27 AM

LOL! True, Stefan, very classy. :)

trim is better than (!$post[field2]) as well then. Still, for most users ! or "" would work.

Davey 02-13-2003 07:26 PM

I used Xenon's since he had a good point about the leaving the field blank.
Thanks both of you :).
BTW@Rose I would suggest a new host for your banner because not only did it take about 3 minutes to load on ADSL (........), but it also didn't load - it was a red x.
That might lag 56k surfers (:().

Dave.

Rose 02-13-2003 08:43 PM

Quote:

Originally posted by Davey

BTW@Rose I would suggest a new host for your banner because not only did it take about 3 minutes to load on ADSL (........), but it also didn't load - it was a red x.
That might lag 56k surfers (:().

Dave.


Yeah, I'll update that - thanks! I am cancelling the host it's currently located on, and since I've alreadys witched the domain addy, it's not pointing right.


All times are GMT. The time now is 04:25 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.02153 seconds
  • Memory Usage 1,733KB
  • 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
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete