Disable Personal Website in Profile

Looking for a MOD? Have a MOD request? Post here for help. (Note: This forum is community supported; phpBB does not have official MOD authors)
Scam Warning
User avatar
kasitzboym
Registered User
Posts: 9
Joined: Thu Aug 05, 2010 2:44 am
Contact:

Disable Personal Website in Profile

Post by kasitzboym » Sun Jan 09, 2011 6:44 pm

Hey im wondering if anyone knows a mod that will allow me to disable personal websites in the personal profiles.

Thanks in advance

King Rhyono
Registered User
Posts: 74
Joined: Fri Dec 31, 2010 9:42 pm
Contact:

Re: Disable Personal Website in Profile

Post by King Rhyono » Mon Jan 10, 2011 12:59 am

I believe it'd be better not to delete the column from the database. If there are already websites entered in your board, I could come up with a SQl code to clear it out. In order to stop it from being entered would require a simple modification to the UPC template. Do you just not want it showing and possible to enter or do you want every piece of the code removed? Removing all of the code would require edits to: upc, viewtopic, and memberlist.
PM me if you want me to do some work for hire (can do: support, maintenance, and mod requests).

User avatar
AmigoJack
Registered User
Posts: 5354
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン
Contact:

Re: Disable Personal Website in Profile

Post by AmigoJack » Mon Jan 10, 2011 9:29 am

Least intrusive method is to ignore user changes to that.

Open /includes/ucp/ucp_profile.php and find:

Code: Select all

                    'website'        => request_var('website', $user->data['user_website']), 
Change to:

Code: Select all

                    'website'        => /*request_var('website', $user->data['user_website'])*/ '', 
(If you also want to forbid changes in the ACP) Open /includes/acp/acp_users.php and find:

Code: Select all

                    'website'        => request_var('website', $user_row['user_website']), 
Change to:

Code: Select all

                    'website'        => /*request_var('website', $user_row['user_website'])*/ '', 
Finally, execute this SQL statement (assuming your table prefix is phpbb_) to erase existing entries:

Code: Select all

UPDATE phpbb_users SET user_website= ''
The worst thing about censorship is ███████████

User avatar
Sinom
Translator
Posts: 1682
Joined: Thu Oct 28, 2010 9:53 am
Contact:

Re: Disable Personal Website in Profile

Post by Sinom » Mon Jan 10, 2011 5:32 pm

Hello kasit!

It seems everyone has their own way to accomplish this ;)

A quick way to remove the website:
(Assuming you don't want to execute any SQL-commands or edit .php-files)

Go to \styles\prosilver\template and open ucp_profile_profile_info.html

Find:

Code: Select all

	</dl>
	<dl>
		<dt><label for="website">{L_WEBSITE}:</label></dt>
		<dd><input type="text" name="website" id="website" maxlength="255" value="{WEBSITE}" class="inputbox" /></dd>
	</dl>
Replace with:

Code: Select all

	<!-- <dl>
		<dt><label for="website">{L_WEBSITE}:</label></dt>
		<dd><input type="text" name="website" id="website" maxlength="255" value="{WEBSITE}" class="inputbox" /></dd>
	</dl> -->
All done!

Hugs :ugeek:

User avatar
AmigoJack
Registered User
Posts: 5354
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン
Contact:

Re: Disable Personal Website in Profile

Post by AmigoJack » Tue Jan 11, 2011 6:58 am

Sinom wrote:All done!
No. This will leave the memberlist and the public profile untouched. On top, your solution isn't style independant.
The worst thing about censorship is ███████████

User avatar
Sinom
Translator
Posts: 1682
Joined: Thu Oct 28, 2010 9:53 am
Contact:

Re: Disable Personal Website in Profile

Post by Sinom » Tue Jan 11, 2011 6:36 pm

AmigoJack wrote:No. This will leave the memberlist and the public profile untouched. On top, your solution isn't style independant.
Assuming your board isn't started, (no members who have entered their website information) and then make my modification, you still would say "No"? ;)

Sounds like you're bashing on my idea here.

No, of course my style isn't style independat :? (Haven't stated other wise)

I made the assumption he would rather edit .html-files than .php-files and on top of that, execute an SQL-statement. ;)

Hugs :ugeek:

User avatar
AmigoJack
Registered User
Posts: 5354
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン
Contact:

Re: Disable Personal Website in Profile

Post by AmigoJack » Wed Jan 12, 2011 6:48 am

Sinom wrote:Assuming your board isn't started
I think it's a good idea to also list your requirements to make your modifications work. If the board has yet no members (and administrators still should be able to set a homepage) it might work. However, (spam) bots are intelligent enough to register themself automatically and also change their profile. And mostly they don't care which INPUTs each FORM has (thus they'd also set a value for name="website" and it would be accepted, since it's only not visible in the HTML page but still interpreted by the target).
Sinom wrote:Sounds like you're bashing on my idea here
Sounds like you're not caring for details.
Sinom wrote:(Haven't stated other wise)
You also didn't exclude it.

I'm always interested in the most bullet-proof, versatile and efficient solution. That's why I come up with my own if I see another one with flaws. I'm used to the fact that most coders and even more users don't care for such a precision, so yeah - call it bashing. ;)
The worst thing about censorship is ███████████

User avatar
Sinom
Translator
Posts: 1682
Joined: Thu Oct 28, 2010 9:53 am
Contact:

Re: Disable Personal Website in Profile

Post by Sinom » Wed Jan 12, 2011 3:39 pm

You're absolutely right, I didn't consider bots. Nor already registered users who might have used this field.
AmigoJack wrote:I'm always interested in the most bullet-proof, versatile and efficient solution. That's why I come up with my own if I see another one with flaws. I'm used to the fact that most coders and even more users don't care for such a precision, so yeah - call it bashing.
I thought it would be good to provide an easier solution whereas the user might not want to do such troublesome modifications.

But indeed, it's better to provide a more bullet-proof solution. My bad.

I meant no offense with my post, and I'm sure you didn't either ;)

Best of luck to the topic starter.

Hugs :ugeek:

User avatar
AmigoJack
Registered User
Posts: 5354
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン
Contact:

Re: Disable Personal Website in Profile

Post by AmigoJack » Wed Jan 12, 2011 4:34 pm

Sinom wrote:I meant no offense with my post, and I'm sure you didn't either ;)
Definitly! People tend to react emotionally, so I'm glad you can see this impartially. :)
The worst thing about censorship is ███████████

Syxguns
Registered User
Posts: 27
Joined: Tue Dec 28, 2010 9:57 pm

Re: Disable Personal Website in Profile

Post by Syxguns » Sun Apr 03, 2011 10:23 pm

AmigoJack,
I know this topic is from January but I was wondering if you had code to expand upon your original code?

In other words,
New Members may not post website information, but Users may. In other words to have New Members using the website variable to post links to sites that sell stuff, I don't want. However, once you have made the required post count to become an active member of the community then the option would be available for you.

Thanks if anyone has the changes to do this. I use two different styles, so I'm sure the change would have to be made in both styles.
Image

User avatar
AmigoJack
Registered User
Posts: 5354
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン
Contact:

Re: Disable Personal Website in Profile

Post by AmigoJack » Mon Apr 04, 2011 5:44 am

Then you can reject changes upon their post count:

Open /includes/ucp/ucp_profile.php and find:

Code: Select all

                    'website'        => request_var('website', $user->data['user_website']), 
Change to:

Code: Select all

                    'website'        => $user-> data['user_posts']>= 30? request_var('website', $user->data['user_website']): '', 
(If you also want to forbid changes in the ACP) Open /includes/acp/acp_users.php and find:

Code: Select all

                    'website'        => request_var('website', $user_row['user_website']), 
Change to:

Code: Select all

                    'website'        => $user_row['user_posts']>= 30? request_var('website', $user_row['user_website']): '', 
...whereas 30 is the minimum of your choice, of course.
The worst thing about censorship is ███████████

Syxguns
Registered User
Posts: 27
Joined: Tue Dec 28, 2010 9:57 pm

Re: Disable Personal Website in Profile

Post by Syxguns » Tue Apr 05, 2011 8:51 am

Thank you AmigoJack!
Do I need the "?" after the number of post counts? I'm going to give it a try out and see what happens.
Last edited by Syxguns on Tue Apr 05, 2011 9:18 am, edited 1 time in total.
Image

User avatar
Oyabun1
Former Team Member
Posts: 23162
Joined: Sun May 17, 2009 1:05 pm
Location: Australia
Name: Bill

Re: Disable Personal Website in Profile

Post by Oyabun1 » Tue Apr 05, 2011 9:04 am

The second lot of code, this Post, adds a check for post count, and is a replacement for the code in the earlier Post.

If you also want to prevent links being included in posts by new members this MOD may be useful, Disallow links before x posts.
                      Support Request Template
3.0.x: Knowledge Base Styles Support MOD Requests
3.1.x: Knowledge BaseStyles SupportExtension Requests

Syxguns
Registered User
Posts: 27
Joined: Tue Dec 28, 2010 9:57 pm

Re: Disable Personal Website in Profile

Post by Syxguns » Tue Apr 05, 2011 9:25 am

Oyabun1,
Thank you for the information. Do you know if I need the ? after the post count in the code?

BTW- I'm using XSilver and XiPhone as my site located here: http://www.place4musicians.com The site is still under construction, but I'm an Admin at a couple of other places and see a ton of crud from new people registering. That is why I was wanting this info! Do I need to submit that Mod to the developers to be reconfigured?
Image

User avatar
AmigoJack
Registered User
Posts: 5354
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン
Contact:

Re: Disable Personal Website in Profile

Post by AmigoJack » Tue Apr 05, 2011 10:39 am

Syxguns wrote:Do I need the "?" after the number of post counts
It belongs to the PHP code and thus is not optional. You have to use it literally - there's no point to put single fragments of it (in this case an operator) in question. As this shows your inexperience with PHP I advise you to read and operate precisely when performing MODs in general.

Both of my code posts instruct you to change existing code - the second one can't depend on the first one, because
  1. both target to modify the same positions and
  2. if you already modified your files with the instructions from the first code post you wouldn't be able to find the required positions of the second code post at all.
The worst thing about censorship is ███████████

Locked

Return to “[3.0.x] MOD Requests”

Who is online

Users browsing this forum: Majestic-12 [Bot] and 15 guests