vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Please take a second and help me with this if conditional (https://vborg.vbsupport.ru/showthread.php?t=245087)

noppid 06-23-2010 01:50 AM

Very generous. Thank you.

ChopSuey 06-23-2010 04:12 PM

Quote:

Originally Posted by DieselMinded (Post 2057820)
Thanks Again $ Sent , More people should donate to people who help them and maybe more people would help others on here

Just thinkg about how many people i and other's have helped.

noppid 06-23-2010 04:31 PM

Right on, that's what this site is supposed to be about. I don't post here for the money. It's just something to do to pay it forward. That's not to say I don't do professional work though. I'm picky about who I work with either way. Some appreciate it and you can tell, others, not so much.

DieselMinded 06-23-2010 09:24 PM

Works great but users still have to go to there edit options and hit save for the bar to show , how can i fix that?

noppid 06-23-2010 10:04 PM

We need to look at which of the options is the default. Look in the user profile field editor and check the "Set Default" options for that custom field.

I don't know how it works code wise, hopefully it will update all users to the default when changed. The worse case scenario is having to delete it and create it again with a default which will hopefully set the default in their profile and not just the form.

DieselMinded 06-23-2010 10:06 PM

Default is yes , its showing clicked , all they do is hit save

noppid 06-23-2010 10:09 PM

So it is for the form only and not the actual setting in the DB for each user? It's actually no unless they go click? I didn't mock it up for a test, so I don't know what it's doing code wise.

DieselMinded 06-23-2010 10:15 PM

User Profile Fields in Area: Options: Messaging / Notification

Enable Cometchat Software? Single-Selection Radio Buttons Editable, Searchable field15

--------------- Added [DATE]1277334972[/DATE] at [TIME]1277334972[/TIME] ---------------

Do i need to move if from edit options ? maybe it don't autoupdate or something

Maybe <if condition="$bbuserinfo['field15'] != 'No' ">

noppid 06-23-2010 10:21 PM

I went in the DB with PHPMyAdmin. Seems like it's gonna take a query to pull off. This will opt everyone in as Yes and they will have to go to the cp to turn it to no instead of Yes.

Here's a query you can run in PHPMyAdmin from the SQL tab...

update `userfield` set `field15` = 'Yes' where `field15` = '';

If you have table prefixes, adjust the userfield table name. Take note of backtics and single quote usage in the query.

--------------- Added [DATE]1277335389[/DATE] at [TIME]1277335389[/TIME] ---------------

Quote:

Originally Posted by DieselMinded (Post 2058485)
User Profile Fields in Area: Options: Messaging / Notification

Enable Cometchat Software? Single-Selection Radio Buttons Editable, Searchable field15

--------------- Added [DATE]1277334972[/DATE] at [TIME]1277334972[/TIME] ---------------

Do i need to move if from edit options ? maybe it don't autoupdate or something

Maybe <if condition="$bbuserinfo['field15'] != 'No' ">

Changing the condition to No won't help. The DB has empty fields.

DieselMinded 06-23-2010 10:26 PM

testing

PHP Code:

<if condition="$bbuserinfo[field15] != 'No' AND THIS_SCRIPT != 'addonchat' AND is_member_of($bbuserinfo, 5, 7, 6, 16, 12, 11, 17, 10, 13, 9)">
<!-- 
CometChat Footer Code Start -->
<
link type="text/css" rel="stylesheet" media="all" href="/cometchat/cometchatcss.php" charset="utf-8" />
<
script type="text/javascript" src="/cometchat/cometchatjs.php" charset="utf-8"></script>
<!-- 
CometChat Footer Code End -->
</if> 

--------------- Added [DATE]1277335715[/DATE] at [TIME]1277335715[/TIME] ---------------

Quote:

Originally Posted by noppid (Post 2058489)
I went in the DB with PHPMyAdmin. Seems like it's gonna take a query to pull off. This will opt everyone in as Yes and they will have to go to the cp to turn it to no instead of Yes.

Here's a query you can run in PHPMyAdmin from the SQL tab...

update `userfield` set `field15` = 'Yes' where `field15` = '';

If you have table prefixes, adjust the userfield table name. Take note of backtics and single quote usage in the query.

--------------- Added [DATE]1277335389[/DATE] at [TIME]1277335389[/TIME] ---------------



Changing the condition to No won't help. The DB has empty fields.

what about future members?


All times are GMT. The time now is 03:31 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.01098 seconds
  • Memory Usage 1,747KB
  • 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
  • (1)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (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