Kryptronic Software Support Forum

You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.

#1 08-25-2012 11:35:11

nigel
Member
From: Peterborough, UK
Registered: 04-27-2008
Posts: 418
Website

How do you develop a new skin?

On previous versions I would develop/test a new skin by setting up a new webpage that was only visible to backend users. I would then associate the new skin with that particular page. How in version 8 do you associate a skin with just one particular webpage?

Nigel

Offline

 

#2 08-26-2012 13:10:40

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19898
Website

Re: How do you develop a new skin?

Skin overrides were removed in v8.  You can do this now by including the following at the top of your active skin's skin.php file:

Code:

$userid = $this->globals('core_user.id');

if ($userid == 'YOUR_USER_ID') {
     return include($this->globals('core.path_public') . '/skins/YOUR_TEST_SKIN/skin.php');
}

As long as you're logged in, you will get your test skin displayed instead of the active skin.


Nick Hendler

Offline

 

#3 08-26-2012 13:17:16

nigel
Member
From: Peterborough, UK
Registered: 04-27-2008
Posts: 418
Website

Re: How do you develop a new skin?

thank you!!

Offline

 

#4 08-26-2012 13:19:52

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19898
Website

Re: How do you develop a new skin?

No prob.


Nick Hendler

Offline

 

#5 08-26-2012 13:56:35

nigel
Member
From: Peterborough, UK
Registered: 04-27-2008
Posts: 418
Website

Re: How do you develop a new skin?

do I need to put any tags round the code? I can't seem to get it working.

Nigel

Offline

 

#6 08-27-2012 06:53:41

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19898
Website

Re: How do you develop a new skin?

Yes, put PHP tags around that.  And make sure it's the first line of your skin.


Nick Hendler

Offline

 

#7 08-27-2012 07:04:55

nigel
Member
From: Peterborough, UK
Registered: 04-27-2008
Posts: 418
Website

Re: How do you develop a new skin?

Hi Nick,

still having problems. This is my code, first line of skin.php

<?php $userid = $this->globals('core_user.id');

if ($userid == 'test') {
     return include($this->globals('core.path_public') . /skins/uk1/skin.php'); }?>

I get this error:

Parse error: syntax error, unexpected '/' in /home/xxxxxx/public_html/skins/test1/skin.php on line 4


Nigel

Offline

 

#8 08-27-2012 07:10:45

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19898
Website

Re: How do you develop a new skin?

Here is exactly what you need to add, as concise as possible:

Code:

<?php if ($this->globals('core_user.id') == 'YOUR_USER_ID') {return include($this->globals('core.path_public') . '/skins/YOUR_TEST_SKIN/skin.php');} ?>

Nick Hendler

Offline

 

#9 08-27-2012 07:19:39

nigel
Member
From: Peterborough, UK
Registered: 04-27-2008
Posts: 418
Website

Re: How do you develop a new skin?

got it working now, thanks!!

Offline

 

#10 08-27-2012 08:50:29

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19898
Website

Re: How do you develop a new skin?

Cool.  Thanks for the update.


Nick Hendler

Offline

 

#11 09-01-2012 10:20:19

Aircut
Member
Registered: 09-22-2003
Posts: 235
Website

Re: How do you develop a new skin?

Is YOUR_USER_ID the same as username ?

Offline

 

#12 09-01-2012 10:23:43

zanart
Member
From: bedford
Registered: 04-02-2008
Posts: 1716

Re: How do you develop a new skin?

I would expect so, try it to see if it works.


Rob

Offline

 

#13 09-01-2012 11:34:41

Aircut
Member
Registered: 09-22-2003
Posts: 235
Website

Re: How do you develop a new skin?

it did not that why i am asking

Offline

 

#14 09-02-2012 07:02:23

nigel
Member
From: Peterborough, UK
Registered: 04-27-2008
Posts: 418
Website

Re: How do you develop a new skin?

I would suggest you place your email address there as opposed to your username, and make sure the code is the first line of your skin.php file.

Nigel

Last edited by nigel (09-02-2012 07:06:45)

Offline

 

#15 09-02-2012 10:04:57

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19898
Website

Re: How do you develop a new skin?

Your user id is actually your email address.


Nick Hendler

Offline

 

#16 10-28-2012 08:24:48

121NetDesign
Member
From: Surrey, UK
Registered: 05-10-2007
Posts: 427

Re: How do you develop a new skin?

Hi Nick,

One of the things we loved abour CCP was the ability to have different variations of a skin for different web pages.

Is there no way we can assign a different skin to a web page we create???

Thanks in advance


Tommy Lee

Offline

 

#17 10-29-2012 12:22:15

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19898
Website

Re: How do you develop a new skin?

You can do that with PHP code at the top of your page:

Code:

<?php $this->globals('core_display.skin','skin.XXX'); ?>

Nick Hendler

Offline

 

#18 10-29-2012 13:56:02

121NetDesign
Member
From: Surrey, UK
Registered: 05-10-2007
Posts: 427

Re: How do you develop a new skin?

Fantastic Nick!

Exactly what we needed and confirms why we prefer to use Click Cart Pro!


Tommy Lee

Offline

 

#19 03-18-2014 23:26:36

mdowning
Member
From: California
Registered: 11-05-2010
Posts: 725
Website

Re: How do you develop a new skin?

webmaster wrote:

Skin overrides were removed in v8.  You can do this now by including the following at the top of your active skin's skin.php file:

Code:

$userid = $this->globals('core_user.id');

if ($userid == 'YOUR_USER_ID') {
     return include($this->globals('core.path_public') . '/skins/YOUR_TEST_SKIN/skin.php');
}

As long as you're logged in, you will get your test skin displayed instead of the active skin.

Nick,

Are you saying this code goes BEFORE everything else?

I'm getting this error when I go to the storefront and click on any links


Parse error: syntax error, unexpected '$userid' (T_VARIABLE) in /home4/koolcom1/public_html/store/skins/TEST/skin.php on line 2


http://tuxedothemes.org/
Wordpress Themes for business, blogs and personal use.

Offline

 

#20 03-19-2014 03:38:23

nigel
Member
From: Peterborough, UK
Registered: 04-27-2008
Posts: 418
Website

Re: How do you develop a new skin?

try this at the very top of your skin.php file:

Code:

<?php if ($this->globals('core_user.id') == 'username@yoursite.com') {return include($this->globals('core.path_public') . '/skins/SKINNAME/skin.php');} ?>

change the username and skin to the ones you require.

Offline

 

#21 03-19-2014 09:58:04

mdowning
Member
From: California
Registered: 11-05-2010
Posts: 725
Website

Re: How do you develop a new skin?

nigel wrote:

try this at the very top of your skin.php file:

Code:

<?php if ($this->globals('core_user.id') == 'username@yoursite.com') {return include($this->globals('core.path_public') . '/skins/SKINNAME/skin.php');} ?>

change the username and skin to the ones you require.

I musta been really tired last night. I mispelled my email address. tongue

New Edit: It's still not working right. Does the skin name have to be ALL CAPS?

Last edited by mdowning (03-19-2014 10:15:50)


http://tuxedothemes.org/
Wordpress Themes for business, blogs and personal use.

Offline

 

Board footer