Preventing links in profile.

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Ideas Centre
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
User avatar
barryoneoff
Registered User
Posts: 248
Joined: Sat Mar 24, 2007 10:14 pm
Location: East London, England
Contact:

Preventing links in profile.

Post by barryoneoff »

Is there a way to prevent users publishing a link to a website in their profile until they have made a certain number of postings?
Image
Click above to support St. Josephs Hospice.
Barryoneoff's London. ... City of London walks.
mtrs
Registered User
Posts: 2049
Joined: Sat Sep 22, 2007 2:39 pm

Re: Preventing links in profile.

Post by mtrs »

You need to make template edits for this, to limit website UCP acces.

Open
includes/ucp/ucp_profile.php
Find

Code: Select all

					'INTERESTS'	=> $data['interests'],
After add

Code: Select all

					'S_USER_NO_UCP_WEBSITE'	=>($user->data['user_posts'] > 25) ? true : false,
Open
styles/prosilver/template/ucp_profile_profile_info.html

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>
Replace with

Code: Select all

	<!-- IF S_USER_NO_UCP_WEBSITE -->
	<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>
	<!-- ENDIF -->
This way, users having more then 25 post see website entry at UCP profile, change 25 value as you like.
I abandoned all of my mods.
User avatar
barryoneoff
Registered User
Posts: 248
Joined: Sat Mar 24, 2007 10:14 pm
Location: East London, England
Contact:

Re: Preventing links in profile.

Post by barryoneoff »

Thanks for that. :D I'll give it a go.
Image
Click above to support St. Josephs Hospice.
Barryoneoff's London. ... City of London walks.
User avatar
barryoneoff
Registered User
Posts: 248
Joined: Sat Mar 24, 2007 10:14 pm
Location: East London, England
Contact:

Re: Preventing links in profile.

Post by barryoneoff »

I'm afraid that it doesn't seem to work. They are still managing to register with their website showing in the profile.
Image
Click above to support St. Josephs Hospice.
Barryoneoff's London. ... City of London walks.
User avatar
RMcGirr83
Former Team Member
Posts: 22016
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: Preventing links in profile.

Post by RMcGirr83 »

Did you refresh the template/purge the cache after making those changes?
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then buy me a beer Image
mtrs
Registered User
Posts: 2049
Joined: Sat Sep 22, 2007 2:39 pm

Re: Preventing links in profile.

Post by mtrs »

You should also purge cache
I abandoned all of my mods.
User avatar
barryoneoff
Registered User
Posts: 248
Joined: Sat Mar 24, 2007 10:14 pm
Location: East London, England
Contact:

Re: Preventing links in profile.

Post by barryoneoff »

Yes, did all that.
Image
Click above to support St. Josephs Hospice.
Barryoneoff's London. ... City of London walks.
User avatar
barryoneoff
Registered User
Posts: 248
Joined: Sat Mar 24, 2007 10:14 pm
Location: East London, England
Contact:

Re: Preventing links in profile.

Post by barryoneoff »

Any more ideas? :?
Image
Click above to support St. Josephs Hospice.
Barryoneoff's London. ... City of London walks.
User avatar
RMcGirr83
Former Team Member
Posts: 22016
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: Preventing links in profile.

Post by RMcGirr83 »

nvm...nubbed it :roll:
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then buy me a beer Image
User avatar
barryoneoff
Registered User
Posts: 248
Joined: Sat Mar 24, 2007 10:14 pm
Location: East London, England
Contact:

Re: Preventing links in profile.

Post by barryoneoff »

I'll try one more bump, as it's annoying me. :(
Image
Click above to support St. Josephs Hospice.
Barryoneoff's London. ... City of London walks.
User avatar
barryoneoff
Registered User
Posts: 248
Joined: Sat Mar 24, 2007 10:14 pm
Location: East London, England
Contact:

Re: Preventing links in profile.

Post by barryoneoff »

Sorry, the very last try over the weekend. Anyone? :(
Image
Click above to support St. Josephs Hospice.
Barryoneoff's London. ... City of London walks.
User avatar
RMcGirr83
Former Team Member
Posts: 22016
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: Preventing links in profile.

Post by RMcGirr83 »

Barryoneoff, I tried it and it does hide the website input box. Are you sure you made the changes to the correct template? Post a link to your forum to take a look see?
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then buy me a beer Image
User avatar
Mick
Support Team Member
Support Team Member
Posts: 26508
Joined: Fri Aug 29, 2008 9:49 am

Re: Preventing links in profile.

Post by Mick »

Rich,

If the user has ALREADY added his web address pre-mod would it show?
  • "The more connected we get the more alone we become" - Kyle Broflovski©
  • "The good news is hell is just the product of a morbid human imagination.
    The bad news is, whatever humans can imagine, they can usually create.
    " - Harmony Cobel
mtrs
Registered User
Posts: 2049
Joined: Sat Sep 22, 2007 2:39 pm

Re: Preventing links in profile.

Post by mtrs »

barryoneoff wrote:Sorry, the very last try over the weekend. Anyone? :(
What exactly do you want? I have tested the code above at localhost,
it hides the website entry for users profile, http://www.yoursite.com/ucp.php?i=164
but, if a user has already entered website to profile, you need to delete that info at ACP.
I abandoned all of my mods.
User avatar
RMcGirr83
Former Team Member
Posts: 22016
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: Preventing links in profile.

Post by RMcGirr83 »

Mixstar wrote:Rich,

If the user has ALREADY added his web address pre-mod would it show?
Well according to how the mod reads, if the user has already inputted a web address but has less than 25 posts, then the web address will still show in viewtopic and viewing the uses profile...the input box will not show in the users control panel. So the website entries would have to be purged from the database easiest way would be to run a query on the database to do this, eg

Code: Select all

UPDATE phpbb_users SET user_website = ' ' WHERE user_posts < 25;
change phpbb_ to the correct prefix for your user table and make a backup of the database first just in case.

But I thought the OP had stated that upon "registration"...which would lead me to believe that the web address is getting added after registering.

BTW, Barry...I registered at your site, activated my account and went into the user control panel, there is no input box presented for me to enter in a website address.

Could you please delete my account from "The East London Forum"? Thanks.
Last edited by RMcGirr83 on Sat Mar 28, 2009 10:52 am, edited 1 time in total.
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
Appreciate the extensions/mods/support then buy me a beer Image
Locked

Return to “[3.0.x] Support Forum”