Advertisement:

Author Topic: Custom Profile Field Mod  (Read 947931 times)

Offline winrules

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 5,085
  • Gender: Male
Re: Custom Profile Field Mod
« Reply #60 on: April 09, 2006, 06:14:05 PM »
Quote
Are you sure there are any field enabled? Because if there aern't then nothing will show up. Also you really don't need to copy all those files, just make the changes I specify in the first post of this topic.

Yes I setup a test field and activated it.

Thank you for your help. Just to clarify, do I make the changes you mention in your first post to the display.template within my second theme?
Yeah, make the changes to whatever custom themes you want the mod to work with.
winrules
SMF Developer
               My Mods
Please do not PM me for support.


Offline SamyWeb

  • Semi-Newbie
  • *
  • Posts: 33
  • Gender: Female
  • SamyWeb Design
    • SamyWeb Design
Re: Custom Profile Field Mod
« Reply #61 on: April 09, 2006, 07:44:26 PM »
Edit: I've solved! Thanks very much for thi MOD!


Code: [Select]
$context['member']['options'][fieldID]
So you could do something like
Code: [Select]
if ($context['member']['options']['someoption']=='First Page')
//first page
else
//second page
Thank you for the tip!
But... help me to understand:
I've added the two lines in SSI.php where you're said.
I've added a custon filed to profile with ID 'realm'


Then I've created a PHP block (I'm using Tinyportal as CMS) with this code:
Code: [Select]
if ($context['member']['options']['realm']=='******')
ssi_recentTopics();
// it's only an example

And in my profile I've selected '******' as realm.

What it's wrong?
« Last Edit: April 10, 2006, 07:41:19 AM by SamyWeb »

Offline pyko

  • Semi-Newbie
  • *
  • Posts: 30
  • hello everyone!
    • psychopyko
Re: Custom Profile Field Mod
« Reply #62 on: April 09, 2006, 08:02:44 PM »
><" having problems with this mod...
Ok, the installation was fine - no fails or anything...but the 'Custom Fields' tab didn't show up in the 'Features and Options'...

So I decided, maybe I'll uninstall it, and re-install it...
But when I try to uninstall i get this...
Code: [Select]
Error in Package Installation

At least one error was encountered during a test installation of this package. It is strongly recommended that you do not continue with installation unless you know what you are doing, and have made a backup very recently. This error may be caused by a conflict between the package you're trying to install and another package you have already installed, an error in the package, a package which requires another package that you don't have installed yet, or a package designed for another version of SMF.

Installation Readme
This will uninstall the Custom Profile Mod.

Uninstall Actions
Uninstall Actions "Custom Profile Mod":
Installing this package will perform the following actions:  Type Action Description
1. Execute Modification ./Sources/ModSettings.php Test failed
2. Execute Modification ./Themes/default/Profile.template.php Test failed
3. Execute Modification ./Themes/default/Display.template.php Test failed
4. Execute Modification ./Themes/default/PersonalMessage.template.php Test failed
5. Execute Modification ./Themes/default/Register.template.php Test failed
6. Execute Modification ./Sources/Register.php Test failed 

Any help please!!!
I'm using SMF 1.1RC2 & Joomla 1.08 (bridged and wrapped)

thanks heaps!!
pyko

edit: I don't have any other SMF mods installed
« Last Edit: April 09, 2006, 08:04:18 PM by pyko »

Offline perplexed

  • SMF Hero
  • ******
  • Posts: 2,603
  • It's quite perplexing isn't it
Re: Custom Profile Field Mod
« Reply #63 on: April 09, 2006, 11:30:45 PM »
http://%1.livehournal.com
http://s6.photobucket.com.albums/y245/%1
You can put the %1 where ever you want :)

thats cool, I'm learning new things every day lol

I dont think it will work with photobucket though as their accounts all seem to start with different prefixes   ie one is s6.photo.... but someone else's might be b34.photobucket...   and so on  *stupid photobucket*

thanks for the help though, did you understand my question about the image sizes and why it ignores them when they are set in features and options?


Offline winrules

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 5,085
  • Gender: Male
Re: Custom Profile Field Mod
« Reply #64 on: April 10, 2006, 04:54:46 PM »
><" having problems with this mod...
Ok, the installation was fine - no fails or anything...but the 'Custom Fields' tab didn't show up in the 'Features and Options'...

So I decided, maybe I'll uninstall it, and re-install it...
But when I try to uninstall i get this...
Code: [Select]
Error in Package Installation

At least one error was encountered during a test installation of this package. It is strongly recommended that you do not continue with installation unless you know what you are doing, and have made a backup very recently. This error may be caused by a conflict between the package you're trying to install and another package you have already installed, an error in the package, a package which requires another package that you don't have installed yet, or a package designed for another version of SMF.

Installation Readme
This will uninstall the Custom Profile Mod.

Uninstall Actions
Uninstall Actions "Custom Profile Mod":
Installing this package will perform the following actions:  Type Action Description
1. Execute Modification ./Sources/ModSettings.php Test failed
2. Execute Modification ./Themes/default/Profile.template.php Test failed
3. Execute Modification ./Themes/default/Display.template.php Test failed
4. Execute Modification ./Themes/default/PersonalMessage.template.php Test failed
5. Execute Modification ./Themes/default/Register.template.php Test failed
6. Execute Modification ./Sources/Register.php Test failed 

Any help please!!!
I'm using SMF 1.1RC2 & Joomla 1.08 (bridged and wrapped)

thanks heaps!!
pyko

edit: I don't have any other SMF mods installed
Not sure what happened to you...could you try continuing with the uninstall anyway, and then reuload fresh copies of any files that had errors.


http://%1.livehournal.com
http://s6.photobucket.com.albums/y245/%1
You can put the %1 where ever you want :)

thats cool, I'm learning new things every day lol

I dont think it will work with photobucket though as their accounts all seem to start with different prefixes   ie one is s6.photo.... but someone else's might be b34.photobucket...   and so on  *stupid photobucket*

thanks for the help though, did you understand my question about the image sizes and why it ignores them when they are set in features and options?


Yeah, I might try to make it follow that in next version.
winrules
SMF Developer
               My Mods
Please do not PM me for support.


Offline perplexed

  • SMF Hero
  • ******
  • Posts: 2,603
  • It's quite perplexing isn't it
Re: Custom Profile Field Mod
« Reply #65 on: April 10, 2006, 06:39:54 PM »
thanks I'm really having fun with this one lol

Offline pyko

  • Semi-Newbie
  • *
  • Posts: 30
  • hello everyone!
    • psychopyko
Re: Custom Profile Field Mod
« Reply #66 on: April 10, 2006, 08:28:47 PM »
hmm,  yeah I did that but now every now and then I get this error
Code: [Select]
You cannot download or install new packages because the Packages directory or one of the files in it are not writable! I've made sure the directories I've listed in my prev. post are set to '777' but still get that error (Packages is also set to 777)

help?

Offline winrules

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 5,085
  • Gender: Male
Re: Custom Profile Field Mod
« Reply #67 on: April 10, 2006, 08:43:22 PM »
hmm,  yeah I did that but now every now and then I get this error
Code: [Select]
You cannot download or install new packages because the Packages directory or one of the files in it are not writable! I've made sure the directories I've listed in my prev. post are set to '777' but still get that error (Packages is also set to 777)

help?
Make sure the /pacages directory is also 777.
winrules
SMF Developer
               My Mods
Please do not PM me for support.


Offline pyko

  • Semi-Newbie
  • *
  • Posts: 30
  • hello everyone!
    • psychopyko
Re: Custom Profile Field Mod
« Reply #68 on: April 10, 2006, 10:07:17 PM »
hi winrules,
yes, my Packages directory is also 777 (but the mod zip  file is 755..is that ok?)

are there any other directories/files that I will need to change permission for? Becuase i have a feeling that it is telling me it is "installing" but infact it isn't doing anything (same with the uninstallation process)

thanks!
pyko

Offline john109

  • Semi-Newbie
  • *
  • Posts: 71
Re: Custom Profile Field Mod
« Reply #69 on: April 11, 2006, 03:21:42 AM »
Hi,

I installed the mod without any errors but when I click on Custom Profile Field 1 it sends me to my homepage. 

I'm running Joomla 1.9.8 + SMF 1.1RC2 + CPG1.4.4 all bridged together.  I have no other mods installed on SMF.

Any idea what this is? 

Offline perplexed

  • SMF Hero
  • ******
  • Posts: 2,603
  • It's quite perplexing isn't it
Re: Custom Profile Field Mod
« Reply #70 on: April 11, 2006, 07:24:05 AM »
I was just coming to post the same thing :(

There is probably some kind of redirection that needs to be done but I wouldnt know what to do

If I hold my cursor over a custom profile link ready to click and enter, it says

http://mysite.com/index.php?option=com_smf&Itemid=46&action=featuresettings;sa=profile;cp=1

but when I follow through and click the button, it takes me to my forum homepage and in the address bar is

http://mysite.com/index.php?option=com_smf&Itemid=46&action=featuresettings;sa=profile;sesc=fa5cf59272954aad8d32c151378564a4

If this question should go to the smf joomla board, let me know and I'll ask there

thanks again

Offline winrules

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 5,085
  • Gender: Male
Re: Custom Profile Field Mod
« Reply #71 on: April 11, 2006, 04:10:58 PM »
pyko, try making the mod file 77 too.

john109 and perplexed, I don't use Joomla/Mambo, and I'm not quite sure what's happening to you. What gridge are you using?
winrules
SMF Developer
               My Mods
Please do not PM me for support.


Offline john109

  • Semi-Newbie
  • *
  • Posts: 71
Re: Custom Profile Field Mod
« Reply #72 on: April 11, 2006, 04:29:55 PM »
I'm using Orstio's 1.1.3 bridge.  Also I'm using Joomla 1.0.8 not 1.9.8 like it says in my previous post.  :-[

Offline winrules

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 5,085
  • Gender: Male
Re: Custom Profile Field Mod
« Reply #73 on: April 11, 2006, 04:39:09 PM »
I'm using Orstio's 1.1.3 bridge.  Also I'm using Joomla 1.0.8 not 1.9.8 like it says in my previous post.  :-[
Does it send you to the forum homepage or joomla homepage?
winrules
SMF Developer
               My Mods
Please do not PM me for support.


Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 60,076
  • Gender: Male
    • Kindred-999 on GitHub
Re: Custom Profile Field Mod
« Reply #74 on: April 11, 2006, 04:40:15 PM »
winrules,

How are you coding the page change?   The bridge uses a pregreplace function to replace the normal index.php?action with the index.php?option=com_smf(etc)

It looks like the the bridge thinks it needs to identify the sessionID...
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."

Offline john109

  • Semi-Newbie
  • *
  • Posts: 71
Re: Custom Profile Field Mod
« Reply #75 on: April 11, 2006, 04:42:19 PM »
I'm using Orstio's 1.1.3 bridge.  Also I'm using Joomla 1.0.8 not 1.9.8 like it says in my previous post.  :-[
Does it send you to the forum homepage or joomla homepage?

Sends me to the Joomla homepage.

Offline winrules

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 5,085
  • Gender: Male
Re: Custom Profile Field Mod
« Reply #76 on: April 11, 2006, 04:45:09 PM »
winrules,

How are you coding the page change?   The bridge uses a pregreplace function to replace the normal index.php?action with the index.php?option=com_smf(etc)

It looks like the the bridge thinks it needs to identify the sessionID...
I use
Code: [Select]
<a href=' . $scripturl . '?action=featuresettings;sa=profile;cp=' . $i . '>
where $i is the field number. Do you need to know anything else?
winrules
SMF Developer
               My Mods
Please do not PM me for support.


Offline john109

  • Semi-Newbie
  • *
  • Posts: 71
Re: Custom Profile Field Mod
« Reply #77 on: April 11, 2006, 04:49:48 PM »
I noticed my situation is slightly different from perplexed's.  When I hover my cursor over the Custom Profile Field 1 link it shows this:

http://www.mysite.com/smf/index.php?action=featuresettings;sa=profile;cp=1

and when at my homepage this is in the address bar:

http://www.mysite.com/joomla/index.php?option=com_frontpage&Itemid=1

EDIT - Figured my mistake out.  I had added this code to my .../smf/index.php so people can't access my forums directly but it didn't work.  When I saw where I was redirected I thought this was the problem but I thought I had removed it.  I even went looking to see if I had removed it but I guess it was late last night and my eyes were tired.   ::)    (Why the redirection didn't work when typing www.mysite.com/smf but it does in this case is another question?)

Code: [Select]
// Redirect users who try to access /forum directly
if (strpos($_SERVER['QUERY_STRING'], 'dlattach') === false)
{
        if(!defined('_VALID_MOS')){ header("Location: http://www.mysite.com/joomla/index.php?option=com_frontpage&Itemid=1");}
}

It works now.  Thanks winrules for this great mod.  Good luck perplexed.  I don't think this is the same problem as yours.
« Last Edit: April 11, 2006, 05:19:54 PM by john109 »

Offline winrules

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 5,085
  • Gender: Male
Re: Custom Profile Field Mod
« Reply #78 on: April 11, 2006, 05:20:45 PM »
I noticed my situation is slightly different from perplexed's.  When I hover my cursor over the Custom Profile Field 1 link it shows this:

http://www.mysite.com/smf/index.php?action=featuresettings;sa=profile;cp=1

and when at my homepage this is in the address bar:

http://www.mysite.com/joomla/index.php?option=com_frontpage&Itemid=1

EDIT - Figured my mistake out.  I had added this code so people can't access my forums directly but it didn't work.  When I saw where I was redirected I thought this was the problem but I thought I had removed it.  I even went looking to see if I had removed it but I guess it was late last night and my eyes were tired.   ::)    (Why the redirection didn't work when typing www.mysite.com/smf but it does in this case is another question?)

Code: [Select]
// Redirect users who try to access /forum directly
if (strpos($_SERVER['QUERY_STRING'], 'dlattach') === false)
{
        if(!defined('_VALID_MOS')){ header("Location: http://www.mysite.com/joomla/index.php?option=com_frontpage&Itemid=1");}
}

It works now.  Thanks winrules for this great mod.  Good luck perplexed.  I don't think this is the same problem as yours.
Glad you got it working :) Hope I get get it working for perplexed too :)
winrules
SMF Developer
               My Mods
Please do not PM me for support.


Offline john109

  • Semi-Newbie
  • *
  • Posts: 71
Re: Custom Profile Field Mod
« Reply #79 on: April 11, 2006, 05:33:35 PM »
Ah well another problem pops up.  When I click on Custom Profile Field 1 it goes to the page to set the options for that field but the page is no longer wrapped.  I have my forums wrapped in Joomla.  It throws all the formatting out of whack.