Skip to Content Skip to Menu

Plugin User Edit Page & Customization

17 years 1 week ago #47508 by Miro Dietiker
Plugin User Edit Page & Customization was created by Miro Dietiker
Hi

I'm developing a Desktop Messenger tab with extensive functionality. It should cover most known desktop messengers and show online status - as long as user properties and services allow.

Output tab is already implemented, but i still use default generated User Edit Tab. The problems are:
1. The Tab contains a description which is not displayed by CB. How do i add description to the edit tab?
2. Shall i change completely implement a custom property edit page? Any sample for Events, Hooks?
3. Global params (like pbStatRating from profilebook): is there no possibility to use consts from plugin language file? At this time i seem unable to use a hook to load the language file.

EDIT 4. My tab has position "right" type "html" to show on profile. I need to specify fields with profile=0 for them. Else they are outputted with a plaintext line (in addition to my output). But in fact, the edit tab should display "fields shown in profile" since the content entered is "displayed somehow" - but not the standard way. How to specify this correctly?

Thanks for any input.

Post edited by: Miro Dietiker, at: 2007/10/09 12:34

Please Log in or Create an account to join the conversation.

17 years 1 week ago #47516 by blackice2999
Replied by blackice2999 on topic Re:Plugin User Edit Page & Customization
Hi Miro,

i began for a few days my first plugin project, so i think (hope) that i can help you. ;)

1. i have implemented the description with:
[code:1] if($tab->description != null) {
$return .= "\t\t<div class=\"tab_Description\">";
$return .= unHtmlspecialchars(getLangDefinition($tab->description));
$return .= "</div>\n";
}
[/code:1]

2. The editpage was called by the function "getEditTab" like this...

[code:1] function getEditTab($tab,$user,$ui) {
global $database,$mosConfig_live_site,$my,$ueConfig,$mainframe,$mosConfig_lang;

$return = null;
$lists = array();.......[/code:1]

3. I have write a own Plugin Language file with constants. First i create a function:

[code:1] function _getLanguageFile() {
global $mainframe,$mosConfig_lang;
$UGlanguagePath=$mainframe->getCfg( 'absolute_path' ).'/components/com_comprofiler/plugin/user/plug_usergames';
if (file_exists($UGlanguagePath.'/language/'.$mosConfig_lang.'.php')) {
include_once($UGlanguagePath.'/language/'.$mosConfig_lang.'.php');
} else {
include_once($UGlanguagePath.'/language/english.php');
}
}[/code:1] The base if this function comes from the Plugin profilegallery...

Next when i need in my Tab the constants of my language file i call at the begin the function with:

[code:1]$this->_getLanguageFile();[/code:1]

I hope i help you a little.

Greets from Germany says Blackice

Please Log in or Create an account to join the conversation.

17 years 1 week ago #47520 by Miro Dietiker
Replied by Miro Dietiker on topic Re:Plugin User Edit Page & Customization
Thanks blackice...

So you're implementing the full getEditTab completely (including post functions?) or calling super for that only?

The language thing is already done like that.
My question related to global params (like pbStatRating from profilebook) where i see no possible hook to load that early the individual language file. Consts are not available when e.g. editing the module properties.

PS: could be you missed my 4. thing... since it was a edit

Thanks again :-)

Please Log in or Create an account to join the conversation.

17 years 1 week ago #47522 by blackice2999
Replied by blackice2999 on topic Re:Plugin User Edit Page & Customization
Hi Miro,

the biggest problem are my bad english...
ok i try it.

In first i go over the "getEditTab" and give the values over the function "_getPagingParamName" to the function after update profile (saveEditTab) in the saveEditTab i request the value with: _getReqParam (or so...)

To your 4. Post ... sorry i dont understand it. Try to explain it other for me. Or talk over ICQ with me.

Greets from Germany

ICQ: 338-791-102

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum