Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
I've managed to get a dynamic template per user.
It's still very alpha (meaning it are only code hacks nw) but I'm going to try to put it all in a plugin.
What did I do:
First I created a single dropdown field with the name cb_template. This field is populated with three values: dark, osx and webfx (just for testing purposes).
I'm going to put this in a plugin with a template preview.
Next I changed in comprofiler.class.php the function selectTemplate($ui):
Added to globals:
global $database, $my, $_REQUEST;
Right after the globals I added this:
if (ISSET($_REQUEST)) {
$query="SELECT cb_template FROM #__comprofiler WHERE id = ".$_REQUEST;
} else {
$query="SELECT cb_template FROM #__comprofiler WHERE id = ".$my->id;
}
$database->setQuery( $query );
$templates = $database->loadObjectList();
$template = $templates[0];
$templatedir=$template->cb_template;
if ($templatedir) $ueConfig=$templatedir;
Now each user has his own profile template. Users with no profile set get the default profile.
Anybody got an idea how I can add the changes to the selecttemplate function in a plugin ? I don't want to create a plugin that requires code hacks.
Post edited by: Notexa, at: 2006/04/13 12:50
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.