News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Custom Profile Field Mod

Started by winrules, March 30, 2006, 02:21:25 PM

Previous topic - Next topic

Alan S

winrules , you know how it gives the option to display in a post , would i be able to get it to display a picture instead of text??? like the msn pic or aim??? and could i turn the profile field into a link so when you type in say smithalan2 into the field it links to smithalan2.bebo.com????
Quote from: Eliana Tamerin on August 23, 2008, 04:10:10 PM
SMF 7 is where it gets good. That has time travel. You can go back and post before the guy who flamed you. :P

winrules

Yeah, you can use the "show by pictures" option for that. For what you want to do, you could put <a href="in the before the field spot and .bebo.com"><img src="yourimage.gif" /></a> in the after spot.


winrules
SMF Developer
               
My Mods
Please do not PM me for support.


Alan S

thanks! eveything there works except that when you look at the link then in your profile it says www.theteenzone.net/smithalan2.bebo.com? how would i get rid of the www.theteenzone.net from it?
Quote from: Eliana Tamerin on August 23, 2008, 04:10:10 PM
SMF 7 is where it gets good. That has time travel. You can go back and post before the guy who flamed you. :P

Alan S

never mind got it thanks! i just added a http:// after the <a href='
Quote from: Eliana Tamerin on August 23, 2008, 04:10:10 PM
SMF 7 is where it gets good. That has time travel. You can go back and post before the guy who flamed you. :P

nermeen_elhelw

i was wondering, if i installed the custom profile mod on my board, and then you created another version, will i be able to update?? or will i have to uninstall the mod first, then install the new one?? and would doing this delete the data saved from the custom field??


HOPE THE UPDATE IS UP HERE SOON

winrules

You should be able to just upgrade. But if you are using a really old version, you will need to uninstall and reinstall. You won't lose any data either way though.


winrules
SMF Developer
               
My Mods
Please do not PM me for support.


perplexed

Quote from: winrules on July 12, 2006, 02:23:39 PM
You should be able to just upgrade. But if you are using a really old version, you will need to uninstall and reinstall. You won't lose any data either way though.

I just came here to ask about this too lol

I havent updated for a little while, Im on 2.13 and using joomla/smf bridge, so can I just click on the upgrade option in package manager and everything will be ok?  *nervous*


winrules

Quote from: perplexed on July 15, 2006, 11:33:06 AM
Quote from: winrules on July 12, 2006, 02:23:39 PM
You should be able to just upgrade. But if you are using a really old version, you will need to uninstall and reinstall. You won't lose any data either way though.

I just came here to ask about this too lol

I havent updated for a little while, Im on 2.13 and using joomla/smf bridge, so can I just click on the upgrade option in package manager and everything will be ok?  *nervous*


I don't have an upgrade package from that version. You will have to uninstall your current version, and install the new version. You won't lose any data.


winrules
SMF Developer
               
My Mods
Please do not PM me for support.


perplexed

ok thanks, so will I then have to do that recreate fields thing?  or will it just work straight away?

winrules

Quote from: perplexed on July 15, 2006, 04:31:01 PM
ok thanks, so will I then have to do that recreate fields thing?  or will it just work straight away?
You might have to. If you get errors in your error log or something doesn't work you will have to recreate them.


winrules
SMF Developer
               
My Mods
Please do not PM me for support.


Webrunner

I have a question: I have a theme in which i completely changed the profile using Unknown's tutorial. A lot of members entered information in the fields.
If i use your mod will i be able to see and change the information or convert it in some way?
There is a difference between knowing the path and walking the path.

=========================================
Vrouwen Power! | Sprintweb: No nonsense e-Business consultancy

winrules

Quote from: Webrunner on July 15, 2006, 06:33:14 PM
I have a question: I have a theme in which i completely changed the profile using Unknown's tutorial. A lot of members entered information in the fields.
If i use your mod will i be able to see and change the information or convert it in some way?
Yes, just when you install the mod just add fields for all the fields you are already using and set the field ID for the fields you created to the ID you were using before. So if you were using "default_options[real_name]" you would set the field ID to "real_name".


winrules
SMF Developer
               
My Mods
Please do not PM me for support.


Webrunner

#412
That rocks!
but won't it create duplicate fields in my profile.template.php?
There is a difference between knowing the path and walking the path.

=========================================
Vrouwen Power! | Sprintweb: No nonsense e-Business consultancy

perplexed

I found a little problem when you move fields about, but I will post in detail on your board winrules.  It's something thats easy to fix and nothing to worry about.

RoarinRow

Quote from: winrules on July 12, 2006, 11:12:43 AM
Yeah, you can use the "show by pictures" option for that. For what you want to do, you could put <a href="in the before the field spot and .bebo.com"><img src="yourimage.gif" /></a> in the after spot.

How did you get this to work exactly?  Mine came out empty.

SMF 2.0
TP 1.0 RC1.1
Wordpress 3.1.3

frodaddy

I posted on winrules site a couple of days ago but I thought I'd post here as well to see if anyone else knew:
Hi,

First off, sweet mod. Second I'm having trouble getting the mod to work properly. I saw in the instructions that you can use the code %1 to call the information for linking. I have it so the information put in the field is being parsed into a URL. Unfortunately it seems to not take unique data and the "%1" is just using the first parsed information.

Here is the example:
hxxp:www.azgalor.org/index.php?topic=2.0 [nonactive]

As you can see there is a field for Alla and CT Profile. If you notice the first post by Inwe has a
Alla Profile: 471968
CT Profile: 909889
and the second post has
Alla Profile: 5995
CT Profile: 81221

However both use the same links.

Hope someone can help!

Thanks

perplexed

could you post an example of what exactly you are putting in the before and after fields and what you want to achieve?  ie what you want them to be linking to? :)


Larathiel

What a great mod!

I was actually looking for a MySpace field mod but the one I found left a lot to be desired. This, however, does the job almost perfectly.

I only have two suggestions:

1: When the option to make the field appear in each post is selected, have a drop-down box and an optional text field to specify what is displayed:

  • Contents of the custom field (i.e. the user's MySpace nickname)
  • Name of the custom field (i.e. MySpace)
  • Text (i.e. "MyS" might be entered in the optional text field)
  • Image (i.e. the URL of a user-specified image is entered in the optional text field)
2: Make an option for this field to be displayed as a column in the Memberlist. When You do this, repeat the display options fields I just outlined above in case the forum admin wishes to have an alternate representation here. You'll also want to let them specify whether the contents (and column header) should be left, center or right-justified. Might also allow them to specify what they want as the column header (and perhaps column width) while You're at it.

Continuing the MySpace example, by implementing both of these features, the forums might show a MySpace icon in each post whereas on the member list, there's a left-justified column that shows the MySpace nickname/link for each user.

That would take this mod from being a 9 to a 10 in my book. :)

Thanks for the great mod and keep up the good work!

frodaddy

#418
Quote from: perplexed on July 20, 2006, 04:51:26 PM
could you post an example of what exactly you are putting in the before and after fields and what you want to achieve?  ie what you want them to be linking to? :)



Sorry should have included that.

Anyway here is how it is setup:
Text to display before field (BBC is ok if enabled above): [url=http://www.ctprofiles.net/%1]
Text to display after field (BBC is ok if enabled above): [/url]
Parse BB is checked.

Essentially a person will enter their CTProfle #. It will then parse it so that the link of their profile shows up (the link works a lot like myspace, but instead is just a number) I want to achieve the link: hxxp:www.ctprofiles.net/2930293 [nonactive]  < whatever their number that they inputed into their profile field.

As you can see on that post the link that is generated via BBcode is used for every persons profile. I need it so it parses the right data for the individuals profile.

Thanks

Greycloak

#419
Someone asked about this on page 26 of this thread, so her it is:

I have figured out how to add in permission for moderators as well as admins to edit the custom fields when the field is locked for admin only.

In CustomProfile.php at line 14, replace:

if ($modSettings['CP' . $i . '_edit'] && !$context['user']['is_admin'])

with

if ($modSettings['CP' . $i . '_edit'] && ! in_array(1, $GLOBALS['user_info']['groups']) && ! in_array(2, $GLOBALS['user_info']['groups']) && ! in_array(3, $GLOBALS['user_info']['groups']))


Same change needs to be done on line 266, replacing '_edit' with '_view' (thanks to redline7366 for pointing that out...I would have missed it)

For some reason the is_mod comparison would not work, so it had to be replaced with the above code.


Advertisement: