The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
make existing users display age by default
I want all my users to have their age displayed on the forum. So I've gone ahead and already removed "hide age and date of birth" as a privacy option by editing the modifyprofile_birthday template.
New users have to select 1 of the 3 remaining options that will display their age at registration. Great! But now, all the previously registered users who had selected "hide age and DOB" at registration still have their ages hidden. How do I unhide all their ages and change their privacy setting to "display only age" (without editing each individual profile)? Is there any way to do this? --------------- Added [DATE]1374088727[/DATE] at [TIME]1374088727[/TIME] --------------- Nevermind, figured it out! Go to Maintenance > Execute SQL Query UPDATE user SET showbirthday=1 Everyone's age is now displayed on the forum. |
#2
|
|||
|
|||
Okay, so even though the "hide age" option is gone from the registration page... members are still having their ages go back into hiding. There ages will be displayed in their profiles and postbit and then it will randomly disappear (for just a few random members) and gone until I execute the SQL query to have everyone's ages show again.
What am I missing? How do I make everyone's ages show and stay that way? I don't know what is happening that people's accounts are being reset to hide their age. |
#3
|
|||
|
|||
See if you cannot start narrowing down the problem a bit. Is it localized to certain user-groups maybe? Is the bit being reset in the database when this happens?
I am trying to decide if it is a permissions problem or a caching problem when you run the query? In this kind of situation, I try to log the users actions in this section of the code, gathering data so I can narrow the problem down. Sincerely, good luck and post if you find anymore clues -- so we can help. |
#4
|
|||
|
|||
Thank you for your reply!
It seems to be happening to all user groups. The users that are affected seem very random. It also doesn't seem to matter if they originally chose to display their age at registration or hide it. I've had members tell me that they were sure they chose to display their age when they registered. I don't know why their age would suddenly become hidden. It doesn't seem to be a cache problem. |
#5
|
|||
|
|||
So I am still having this problem. Ages disappear from postbits and profiles for random members across all usergroups. Even those that did not choose "hide age" at registration. I even tried removing the "hide age" option from the registration page but still this issue persists.
I have been regularly doing the manual sql query I mentioned in my first post which makes everyone's ages display temporarily. Since I cannot figure out the root of the disappearing age problem, I would like to somehow make this sql query a scheduled task so it happens automatically once per week. Does anyone know how to schedule sql queries? |
#6
|
|||
|
|||
Hmm...can't think why this would happen. Can you make it happen by editing something else in your profile?
As for scheduling a query, if you do it in php you can create a plugin using one of the cron_script_cleanup hooks (either daily or hourly, depending how often you want to run it). In case you're not in to php, the code for what you posted above would be: PHP Code:
but I would suggest this instead: PHP Code:
that way if someone has chosen 2 or 3 it won't change back to 1. |
#7
|
|||
|
|||
Thank you for your help!
Do I just paste in the code in cleanup.php? And how do I make it run daily, weekly, etc? |
#8
|
|||
|
|||
You could edit the file and paste it in, but I was thinking about creating a plugin. You go to Plugins & Products > Add New Plugin, paste that code in the big box, select the hook location (either cron_script_cleanup_daily or cron_script_cleanup_hourly), enter a title (something so that you'll remember what it is in the future), check "Yes" to make it active. The other fields you can leave as default. Then press "Save" when you're done.
|
Благодарность от: | ||
michelle86 |
#9
|
|||
|
|||
Thank you!
|
#10
|
|||
|
|||
Maybe members are hiding their age after they see it being showen after you run that query
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|