Skip to Content Skip to Menu

CB RC2 Templates

  • trail
  • trail
  • OFFLINE
  • Posts: 232
  • Thanks: 21
  • Karma: 813
18 years 7 months ago #7418 by trail
Replied by trail on topic Re:CB RC2 Templates
for the record and what its worth: i am sad that this project stopped!!

DJ Trail.
CB Co-Founder & Test-Lead.
Plugins: My Age , Starsign Matchmaking Horoscope , My Visitor , My Highscores , My ProfileID ,
My Components: Import & Invite Karma Casino (Use Test / Test)
My Modules: Many :)

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

18 years 6 months ago #9273 by sephirothVR
Replied by sephirothVR on topic Re:CB RC2 Templates
wow, i didnt notice this post got so many hits. Maybe its good to continue on this. I'll continue creating more templates after CB stable version is released. I afraid if the stable released is different and maybe hoping the stable release got that template changer for each user. If stable released dont have that, then need to create plugin for it but it is best to wait after the stable version is released. BTW, any1 here know when is the stable version is release ? Its been quite some time now waiting for it.

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

18 years 6 months ago #9766 by latinflava31
Replied by latinflava31 on topic Re:CB RC2 Templates
Hey I too think this is a great addition to the CB community. Please don't abandon it. We are all looking forward to your next releases in templates. Thansk for all of your hard work.

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

  • Notexa
  • Notexa
  • OFFLINE
  • Posts: 14
  • Thanks: 0
  • Karma: 3
18 years 6 months ago #10202 by Notexa
Replied by Notexa on topic Re:CB RC2 Templates
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

[url=http://www.notexa.be/[/url]

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

18 years 6 months ago #10211 by sephirothVR
Replied by sephirothVR on topic Re:CB RC2 Templates
Notexa wrote:

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


Thanks 4 da code man...... Helps me alot. But now i hope CB stable release they put this code....... To beat, plzzzzz read this. Its an intresting idea... Then all other users just download template as a plugins....

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

  • beat
  • beat
  • OFFLINE
  • Posts: 2169
  • Thanks: 463
  • Karma: 352
18 years 6 months ago #10246 by beat
Replied by beat on topic Re:CB RC2 Templates
I'm watching this thread, and will read the code, and if needed, try to implement the needed events into 1.0 stable, so that a plugin can handle this :)

Thanks for the appreciated contribution,

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info

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

Moderators: beatnantkrileon
Powered by Kunena Forum