Jump to content

Changes on skin from 5.2.13 to 5.2.14


Big Spender

Recommended Posts

I am just checking out the differences skin-wise in the latest version, what are these new things for and why are they display none?

<div style="display: none" id="val_skin_folder">{$SKIN_FOLDER}</div>
<div style="display: none" id="val_store_url">{$STORE_URL}</div>
{if !empty($SKIN_COMMON)}<div style="display: none" id="val_skin_common_images">{$SKIN_COMMON}</div>{/if}
There are also 2 images (a tick and cross) called 0 and 1 in the images folder - what are they used for?

Maybe there is already a change history which explains on github for the release but although I understand the process of github I struggle to navigate around it and understand the terminalogy.

 

I like CubeCart but I'm not sure if I want to give it a fork :)

Link to comment
Share on other sites

The first two statements appeared in CC5213 (maybe CC5212) as a means to accommodate javascript to know what the admin file and folder are actually called. CC5 allows for a measure of 'security by obscurity' to have the /admin/ folder named something else and the admin.php file named something else. (But don't try it.)

 

I had asked for the third statement because one of the jQuery plugins, FileTree, has the means of indicating item choices using either of two or three images (red-x, green-tick, yellow-star), and I wanted to use this existing functionality on a project I'm developing for the storefront.

 

FileTree has also been tweaked to get the proper path to the various /images/ folder for the admin skin and any storefront skin.

 

The FileTree plugin is able to determine from the inner text of these nodes the URL, the skin name, and whether the skin has a /common/ folder in the /images/ folder, so that the 1/0 images can be used in the javascript.

 

They are not displayed because they are only there so that the information can be had by using the ID of the div.

Link to comment
Share on other sites

Yes sorry I kinda wrote the original reply without thinking about what you were saying - it's all good.

I guess I don't need to really include the 0 and 1 in a skin unless the file manager tree becomes a selectable option for display on the front end - which I don't think it is right now? As things stand at the moment nobody can actually do that without modifying the store right?

Link to comment
Share on other sites

When entering CubeCart's Github repository, make sure you are looking at the code list. (On the right side, < > Code)

 

Click the skins folder, kurouto folder, templates folder. Click main.php. You will be shown the code in that file.

 

At the top of the code window, click History. Feel free to explore.

 

But for this conversation, if you click Implemented Issue, you will see all the changes to all the files for this issue. If you click on #176, you will read the conversation for this issue.

 

To use this enhancement, you will need to make a custom skin or make a copy of an existing skin.

 

(I incorporated this enhancement it, but the customers did not recognize the intent of the red-x, green-tick images. To a store admin, it is evident that these are yes/no controls (as well as simple indicators at a couple of locations). But the customers didn't realize this and did not know to click on them.

 

To solve that, I will use other images that are plainly evident they are selectors, not just indicators.

Link to comment
Share on other sites

Okay I have read through this and I understand what those 3 lines do now - but why is file view loaded on storefront in the first place? I wasn't aware it was used for anything front end? Or is it just picked up as it's a javascript plugin and loaded via js/common.html on both?

Link to comment
Share on other sites

It's just picked up because it's in the plugins folder, and plugins.php doesn't discriminate between admin or storefront. And that's a good thing because then, third-party mods need to simply put their jquery modules in this folder - no code changes required.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...