News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Custom Profile Field Mod

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

Previous topic - Next topic

Darkorical

alright Im still stuck I tried adding


global $sourcedir;
require_once($sourcedir . '/CustomProfile.php');
DisplayFieldsProfile();

to the index.template.php thinking it would load the function as it does on the profile page. no luck there Ive examined the mod itself to see what it adds to the profile.template.php file to see if there is a different way of calling up the info that seems to be about the only thing it adds except for the function to edit so Im back at square one

why can't I call custom profile information anywhere aside from the summery page of the profile? (see previous post for the code Im using)

pixelpeter

Sorry  :(
On the Profile-page the custom fields are no longer visible
Opel-GT-Forum [nofollow] - ... und wieder ist nur fliegen schöner
Proudly build with SMF 1.1.4

pixelpeter

Oh my god, what a stupid mistake !!!  :(  :-X

Before updating my board to 1.1.4 I copied the complete forum directory.

I don't know why, but the directory path for the default theme pointed inside the "live" version to the backup directory.
So when updating (to 1.1.4) the backup directory got the new files  :P

That's why the profile fields weren't no longer displayed, because I copied the wrong (outdated) Profile.template.php to my custom theme directory.

Now everything is working fine and as expected.  :D ;D
Opel-GT-Forum [nofollow] - ... und wieder ist nur fliegen schöner
Proudly build with SMF 1.1.4

Kender

Quote from: Kender on February 22, 2008, 08:51:48 AM
Quote from: Kindred on February 22, 2008, 07:18:47 AM
hmmm... yup, I can see that happening. The information is stored in the Themes table....   and is directly tied to the theme that the user has when they answer the questions.
is there a way to correct this?
i dont mind altering some code if necessary

but i am glad i didnt screw up the code when modifying the themes!  thanks for relieving that stress
still looking for a way to resolve where the information is stored, so if a theme is changed the data is not lost
http://chucknorris2012.com  Avoid a roundhouse kick to the head!  Sign the petition

pixelpeter

The information is stored in the theme table "smf_themes".
You'll just need to update the theme_id to the id of the new theme and all information will be available.
Opel-GT-Forum [nofollow] - ... und wieder ist nur fliegen schöner
Proudly build with SMF 1.1.4

danoli

I am on a fresh build of SMF v1.1.4, no mods installed.

I have just installed this mod, it installs fine but I cannot find anywhere to use it, there is noting (that I can see) in the Features and Options section?

I tried uninstalling and re-installing but no luck.

Any ideas?

Jade Elizabeth

Quote from: danoli on February 27, 2008, 10:01:23 PM
I am on a fresh build of SMF v1.1.4, no mods installed.

I have just installed this mod, it installs fine but I cannot find anywhere to use it, there is noting (that I can see) in the Features and Options section?

I tried uninstalling and re-installing but no luck.

Any ideas?

So in the features and options you cannot see "basic features", "layout and options", and then "custom Profile Fields" ("karma" may be in there too)?
Have you tried uninstalling and reinstalling?
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Kender

Quote from: pixelpeter on February 27, 2008, 09:20:27 AM
The information is stored in the theme table "smf_themes".
You'll just need to update the theme_id to the id of the new theme and all information will be available.

i have no idea what you mean :(
http://chucknorris2012.com  Avoid a roundhouse kick to the head!  Sign the petition

pixelpeter

The information the user fills in the CustomProfile field is stored in the database.
The information is stored in the table "smf_themes".
It's saved with the id of the user and the id of the theme.

For example:
To get all entries for all user and the field CP1 you would execute this SQL statement (in phpMyAdmin):

SELECT *
FROM `smf_themes`
WHERE variable = 'CP1'


When you're using the default theme all entries will have the theme_id = 1

When you're installing a new theme and want to use the information stored in the database again
you would execute a SQL statement like this

UPDATE `smf_themes`
SET theme_id = %YOUR_NEW_THEME_ID%
WHERE variable = 'CP1'
AND theme_id = %YOUR_CURRENT_THEME_ID%


For example:

UPDATE `smf_themes`
SET theme_id = 2
WHERE variable = 'CP1'
AND theme_id = 1


This you would have to execute for each of your custom fields.

Does this help you further ?
Opel-GT-Forum [nofollow] - ... und wieder ist nur fliegen schöner
Proudly build with SMF 1.1.4

Kender

thanks for the explination, i will implement it when i have access to that computer again
http://chucknorris2012.com  Avoid a roundhouse kick to the head!  Sign the petition

Kindred

Quote from: Alundra on February 27, 2008, 10:11:11 PM
Quote from: danoli on February 27, 2008, 10:01:23 PM
I am on a fresh build of SMF v1.1.4, no mods installed.

I have just installed this mod, it installs fine but I cannot find anywhere to use it, there is noting (that I can see) in the Features and Options section?

I tried uninstalling and re-installing but no luck.

Any ideas?

So in the features and options you cannot see "basic features", "layout and options", and then "custom Profile Fields" ("karma" may be in there too)?
Have you tried uninstalling and reinstalling?

Sorry, Alundra,  Uninstalling and reinstalling is a bad idea. Computers do not learn from repetition. It will not do  anything different when you have it repeat something. Computers do the same thing over and over.

If he's not seeing the installed stuff, then likely
   a) He is not running in the default theme
   b) he is not using english (and remember, english utf-8 is different form english)
   c) both a and b
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Jade Elizabeth

Quote from: Kindred on February 28, 2008, 08:43:05 AM
Quote from: Alundra on February 27, 2008, 10:11:11 PM
Quote from: danoli on February 27, 2008, 10:01:23 PM
I am on a fresh build of SMF v1.1.4, no mods installed.

I have just installed this mod, it installs fine but I cannot find anywhere to use it, there is noting (that I can see) in the Features and Options section?

I tried uninstalling and re-installing but no luck.

Any ideas?

So in the features and options you cannot see "basic features", "layout and options", and then "custom Profile Fields" ("karma" may be in there too)?
Have you tried uninstalling and reinstalling?

Sorry, Alundra,  Uninstalling and reinstalling is a bad idea. Computers do not learn from repetition. It will not do  anything different when you have it repeat something. Computers do the same thing over and over.

If he's not seeing the installed stuff, then likely
   a) He is not running in the default theme
   b) he is not using english (and remember, english utf-8 is different form english)
   c) both a and b


Oh ok...Thanks for letting me know!
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Kender

Quote from: pixelpeter on February 28, 2008, 03:02:10 AM
The information the user fills in the CustomProfile field is stored in the database.
The information is stored in the table "smf_themes".
It's saved with the id of the user and the id of the theme.

For example:
To get all entries for all user and the field CP1 you would execute this SQL statement (in phpMyAdmin):

SELECT *
FROM `smf_themes`
WHERE variable = 'CP1'


When you're using the default theme all entries will have the theme_id = 1

When you're installing a new theme and want to use the information stored in the database again
you would execute a SQL statement like this

UPDATE `smf_themes`
SET theme_id = %YOUR_NEW_THEME_ID%
WHERE variable = 'CP1'
AND theme_id = %YOUR_CURRENT_THEME_ID%


For example:

UPDATE `smf_themes`
SET theme_id = 2
WHERE variable = 'CP1'
AND theme_id = 1


This you would have to execute for each of your custom fields.

Does this help you further ?

okay, from reading this, it will only change the information to the theme i select?
if i changed theme again, or if a user selects a different them the same problem will occur, wont it?

im looking for a way to have this work, regardless of the theme chosen, regarless of user custom settings (my main theme is graphics intense and i would like to offer a text only theme for users who either cant handle the large graphics nature or dont want to
http://chucknorris2012.com  Avoid a roundhouse kick to the head!  Sign the petition

pixelpeter

Sorry, this question I can't answer.
It looks to me, you have to make changes in the core of SMF.

I hope someone else can give you a better answer
Opel-GT-Forum [nofollow] - ... und wieder ist nur fliegen schöner
Proudly build with SMF 1.1.4

danoli

Quote from: Kindred on February 28, 2008, 08:43:05 AM
Quote from: Alundra on February 27, 2008, 10:11:11 PM
Quote from: danoli on February 27, 2008, 10:01:23 PM
I am on a fresh build of SMF v1.1.4, no mods installed.

I have just installed this mod, it installs fine but I cannot find anywhere to use it, there is noting (that I can see) in the Features and Options section?

I tried uninstalling and re-installing but no luck.

Any ideas?

So in the features and options you cannot see "basic features", "layout and options", and then "custom Profile Fields" ("karma" may be in there too)?
Have you tried uninstalling and reinstalling?

Sorry, Alundra,  Uninstalling and reinstalling is a bad idea. Computers do not learn from repetition. It will not do  anything different when you have it repeat something. Computers do the same thing over and over.

If he's not seeing the installed stuff, then likely
   a) He is not running in the default theme
   b) he is not using english (and remember, english utf-8 is different form english)
   c) both a and b


It is on the default theme, where do I confirm the language setting you mention?

danoli

Just found the setting, it is english utf-8. Any other suggestions?

Jade Elizabeth

Quote from: danoli on March 01, 2008, 11:22:41 AM
Just found the setting, it is english utf-8. Any other suggestions?

Yup!
Are the language strings for this mod inside the themes utf8 language files?
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

danoli

Not really sure what you mean there?

danoli

I just accidentally deleted the mod before uninstalling it. I tried to uninstall it and it said it wasn't there. I uploaded it again and uninstalled it ok. Now when I install it and go to features and options I get the following error...


Fatal error: Cannot redeclare modifyprofilesettings() (previously declared in /home/xxxx/public_html/Sources/ModSettings.php:314) in /home/xxxx/public_html/Sources/ModSettings.php on line 324


If I uninstall it the error goes?

danoli

This looks more like a general error with my SMF rather than this Mod. I tried installing the E-Arcade_2.4.2 mod and it completed fine but noting seemd to have been updated.

Advertisement: