News:

Wondering if this will always be free?  See why free is better.

Main Menu

Custom Profile Field Mod

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

Previous topic - Next topic

perplexed

Quote from: frodaddy on July 24, 2006, 02:24:35 AM
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: http://www.ctprofiles.net/2930293  < 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

Hi

I just recreated this on my test site using these from your first post:

As you can see there is a field for Alla and CT Profile. If you notice the first post by Inwe has a

CT Profile: 909889
and the second post has

CT Profile: 81221

and got links to two different profiles - one for knight lieutenant I and one for knight captain M, which is want you want to achieve, right?

If so, it seems to work fine :)


clearly

Hey guys,

how can i add a break after

global $sourcedir, $messagevars;
$messagevars = $message;
require_once($sourcedir . '/CustomProfile.php');
DisplayFieldPosts();


?

I does not work on my way lol

Thanks

GJ-tje

Just a curiosity posting...
WinRules, when will the new version be available? ;D
"People cannot gain anything without sacrificing something of equal value.
To obtain, something of equal value must be lost.
That is alchemy's first law of Equivalent Exchange."

"People should not be afraid of their Goverments. Goverments should be afraid of their People."

winrules

Quote from: clearly on July 29, 2006, 05:52:52 PM
Hey guys,

how can i add a break after

global $sourcedir, $messagevars;
$messagevars = $message;
require_once($sourcedir . '/CustomProfile.php');
DisplayFieldPosts();


?

I does not work on my way lol

Thanks
What do you mean by a break?

Quote from: GJ-tje on July 29, 2006, 07:08:38 PM
Just a curiosity posting...
WinRules, when will the new version be available? ;D
When it is ready.


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


frodaddy

perplexed...u think i should recreate the fields then?

perplexed

#425
Quote from: frodaddy on July 31, 2006, 09:29:10 AM
perplexed...u think i should recreate the fields then?

yeah you could try that, :)



Winrules:

hi, I posted over on your site about a strange problem I have, do you want me to post it here instead?

winrules

Quote from: Stüldt Håjt on July 31, 2006, 10:08:49 AM
I removed this mod because I realized that I really don't need it. What info this mod added to the database and how is it safest to remove? Because don't want to keep my database bloated.
Delete all the fields before you uninstall, and then go to the themes table and delete all rows with 'variable' being something you've used as a field ID. Proboally juse CP1, CP2, CP3, etc, unless you changed the Field ID.


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


buRn|

this mod seems to be mad with my forum. Once istalled and configured I filled the profile.

The problem is that the people fills the profile but the first post that they do, the link is wrong.

sample:



all the profiles are mad!!!  :'(



update: the link inside the profile works well

winrules

What are you using for the before the field code and the after the field code?


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


buRn|

[url=http://www.ctprofiles.net/%1]
and
[/url]

I use perplexed post info :S

winrules



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


buRn|

Customprofiles 3.11 and SMF 1.1 RC2

Enders

How do you create a display name field (already available) in the registration form? I don't want to enable "users to edit their display name" and don't no how to create this. Also adding profile fields already available to registration?

winrules

Quote from: buRn| on August 08, 2006, 04:24:54 PM
Customprofiles 3.11 and SMF 1.1 RC2
Hmm.. Can you pm me the contents of your Display.template.php and CustomProfile.php?

Quote from: Enders on August 08, 2006, 04:42:48 PM
How do you create a display name field (already available) in the registration form? I don't want to enable "users to edit their display name" and don't no how to create this. Also adding profile fields already available to registration?
in Register.template.php create a input field with the name "realname".


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


buRn|

thanks for the help winrules  :D

I send you the files.

sorry 4 my crappy english. I cant give u thanks better.


winrules

Quote from: buRn| on August 08, 2006, 06:13:31 PM
thanks for the help winrules  :D

I send you the files.

sorry 4 my crappy english. I cant give u thanks better.


Can you try what I told you to do?


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


buRn|

it doesnt work.

all the url's are the same, the url of the first poster

1st poster: CTprofiles: 027 / url: 027
2nd poster: CTprofiles: 231 / url: 027
XXX post: CTprofiles: XXX / url: 027


really strange    >:(

winrules

Quote from: buRn| on August 08, 2006, 07:19:28 PM
it doesnt work.

all the url's are the same, the url of the first poster

1st poster: CTprofiles: 027 / url: 027
2nd poster: CTprofiles: 231 / url: 027
XXX post: CTprofiles: XXX / url: 027


really strange    >:(
Ah, figured it out. I'll be gone for a few days so I might not have time to update the package, but here's the code for a quick fix:
CustomProfile.php
Find:

$modSettings['CP' . $i . '_data1'] = preg_replace('/%1/', $messagevars['member']['options'][$modSettings['CP' . $i . '_id']], $modSettings['CP' . $i . '_data1']);
$modSettings['CP' . $i . '_data2'] = preg_replace('/%1/', $messagevars['member']['options'][$modSettings['CP' . $i . '_id']], $modSettings['CP' . $i . '_data2']);
if ($modSettings['CP' . $i . '_bbc'])
{
$field = parse_bbc($modSettings['CP' . $i . '_data1'] . $messagevars['member']['options'][$modSettings['CP' . $i . '_id']] . $modSettings['CP' . $i . '_data2']);
}
else
{
$field = $modSettings['CP' . $i . '_data1'] . $messagevars['member']['options'][$modSettings['CP' . $i . '_id']] . $modSettings['CP' . $i . '_data2'];
}

And Replace With:

$before = preg_replace('/%1/', $messagevars['member']['options'][$modSettings['CP' . $i . '_id']], $modSettings['CP' . $i . '_data1']);
$after = preg_replace('/%1/', $messagevars['member']['options'][$modSettings['CP' . $i . '_id']], $modSettings['CP' . $i . '_data2']);
if ($modSettings['CP' . $i . '_bbc'])
{
$field = parse_bbc($before . $messagevars['member']['options'][$modSettings['CP' . $i . '_id']] . $after);
}
else
{
$field = $before . $messagevars['member']['options'][$modSettings['CP' . $i . '_id']] . $after;
}


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


winrules

Version 3.12 has been released! This version fixes some bugs with the before and after the field options.


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


buRn|


Advertisement: