Jump to content
Sign in to follow this  
equilla

[Contribution] Infobox Skin Manager

Recommended Posts

Hi All,

 

yes, I think we need a way to pull all this work together. Perhaps a library of - if you want to wrap this box, use this file, etc, etc, so people can choose what they want to do and it doesn't all get a little too boxy.

 

I know someone else who has done some work in this area, so to save us all doing everything twice, perhaps I (or someone else) needs to pull all this together into a pack of bolt-on extra page mods as an update to the contribution.

 

Thoughts?

 

 

 

Mark

Share this post


Link to post
Share on other sites

I used the boxes.php that you supplied. I do have a heavily modded site, but the only mod I can think of that has anything to do with the infoboxes is category box enhancenent

Share this post


Link to post
Share on other sites

to make the header

change in catalog/styleshett.css

 

TD.headerNavigation {
 font-family: Verdana, Arial, sans-serif;
 font-size: 10px;
 background: url('images/infobox/top_background.jpg');
 color: #ffffff;
 font-weight : bold;
}

 

to make footer

TD.footer {
 font-family: Verdana, Arial, sans-serif;
 font-size: 10px;
 background: url('images/infobox/top_background.jpg');
 color: #ffffff;
 font-weight: bold;
}

Share this post


Link to post
Share on other sites
Just thought I would show you guys what can be done with a few mods.

Now you can have your content boxes (like the New Products for Month) on the index.php page integrated as well. You can check it out at: http://www.eclyptiq.com/demo if you want to see it.

HTH,

-Chris

To achieve something nice like the above you only have to make one simple change:

background: #ffd url(images/background.jpg) repeat-x;

to your stylesheet if you use the BTSv1-1 (for download url see signature)

 

Only for a quick test it I added the above line like this:

.productListing-heading {
background: #ffd url(images/background.jpg) repeat-x;
}

and this

.infoBoxHeadingLT, .infoBoxHeading {
background: #ffd url(images/background.jpg) repeat-x;
}

Of course it can be done in one if you like.

 

Take a look at http://www.eeweb.nl/osc_tests/less_tables/ to see the test page. One advantage is that is looks the same in IE, Opera, Mozilla and Netscape.

 

Writing this post took me even much more time than the above mod :D (I admitt using the background image from chris speeded it up a bit).

Share this post


Link to post
Share on other sites

If you check my site and tell me what I'm doing wrong...I still only have 2 info boxes that it works on, I tried your suggestion above but it still isn't right....check it out and tell me what you think......

Share this post


Link to post
Share on other sites

Hi,

If you check my site and tell me what I'm doing wrong...I still only have 2 info boxes that it works on, I tried your suggestion above but it still isn't right....check it out and tell me what you think......

not sure who you are talking to but looking at your HTML code:

<!-- information //-->
         <tr>
           <td>
             <table border="0" width="100%" cellspacing="0" cellpadding="0">
               <tbody><tr>
****************************
                 <td height="0" class="infoBoxHeading"><img src="images/infobox/dot_clear.gif" border="0" alt="" width="0" height="0"></td>
                 <td width="100%" height="0" class="infoBoxHeading">Information

<!-- reviews //-->
         <tr>
           <td>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
 <tbody><tr>
****************************
     <td><table cellspacing="0" cellpadding="0" border="0"><tbody><tr><td><img src="images/infobox/top_left.jpg"></td><td class="newinfobox_top" valign="middle" align="center" width="100%">Reviews

It looks like you are using different templates for the different boxes. I don't know anything about this contribution, but it I am almost sure this causes your problems. The part until the dotted line is the same, after that there are impotant differences which obviously make the boxes look different.

Share this post


Link to post
Share on other sites

Hi,

 

Yes Paul is right. Some of your infoboxes are still picking up on code from elsewhere at the moment.

 

The part with with dot_clear.gif, etc, is definitely from another mod - it's not standard osC and it's not part of my contrib - whether it's part of BTS I couldn't say I haven't checked out this contrib as yet.

 

Paul,

 

Skipping the pending intellectual debate for now as it's Monday morning and lots to do.....

 

Cheers,

 

 

 

Mark

Share this post


Link to post
Share on other sites

Just to let you know and update (Version 1.1) has just been posted which does the following:

 

* Includes update to fix problem of colour of centre infobox cell not displaying correctly in browsers other than Internet Explorer

 

* Script updated to provide potential for skinning other boxes (e.g. What's New Box).

 

To upgrade from version 1.0, simply update the following files to the new versions included:

 

/admin/infobox_skin.php

/catalog/includes/classes/boxes.php

 

The demo store has also been updated to show the latest version.

 

Cheers,

Share this post


Link to post
Share on other sites

hi mark,

i have made an upgrade of the files, but now some pages dont look wright :-!

constrib_skin.gif

the background choses the wrong colour!!!

should i just take the old one again?

also your update is much faster then the old one ;-)

 

Regards John :ph34r:

Share this post


Link to post
Share on other sites

Hi again,

 

OK, try removing the background entry for.infoboxcontents in the stylesheet - that should solve this problem as that is what I have set on the demo store.

Share this post


Link to post
Share on other sites

smart ;-) that worked, all pages are back normal... wait......

nope. not all of them, some still have the wrong colour.

i am going to use the old one again. i will compare the files to se what major changes you have made to cause ties problem

 

regard john

Share this post


Link to post
Share on other sites

Hi,

 

Yes, I think I have just spotted the root cause of the problem.

 

Basically, we need to decouple the styles for the skinned boxes from the unskinned boxes in the stylesheet.

 

In /catalog/includes/classes/boxes.php, I have missed one thing. The Line:

 

$this->table_parameters = 'class="infoBoxContents"';

 

in the function contentBoxContents, should have been treated in the same way as the other box functions, i.e, :

 

 

function contentBoxContents($contents, $skin_this='false') {

$this->table_cellpadding = '4';

if ((SKIN_INFOBOX_ACTIVE == 'true') && ($skin_this == true))

$this->table_parameters = 'class="newinfoBoxContents"';

else $this->table_parameters = 'class="infoBoxContents"';

return $this->tableBox($contents);

}

 

and then we need to adjust the line in function contentBox to pass the $skin_this variable:

 

$info_box_contents[] = array('text' => $this->contentBoxContents($contents, $skin_this));

 

That should do the trick. Untested at this stage as I have a lot to do (including getting a new keyboard as my spacebar is playing up!), so proceed with caution, but I will put a further update out in due course to deal with this issue.

 

Cheers,

 

 

 

Mark

Share this post


Link to post
Share on other sites

Hi Again,

 

now tested and that seems to do the trick.

 

You also need to set the following in your stylesheet for newinfoboxcontents:

 

.newinfoboxcontents {

background : transparent;

font-family: Verdana, Arial, sans-serif;

font-size: 10px;

}

 

The files in the /catalog/includes/boxes folder for the shopping cart, manufacturer's info and notifications boxes also need to be edited and every occurence of class="infoboxcontents" replaced with class="newinfoboxcontents" in order for the colour to be correct throughout the box contents. Fortunately, this only takes a couple of minutes to do.

 

Now happily I have a smart new keyboard and back to full speed. A further revision will be published as soon as I can :blink:

 

 

Cheers,

 

 

 

Mark

Share this post


Link to post
Share on other sites

Hi Mark,

 

I would really much appreciate this MS1 modification. Or just a little bit more info.

I read your answer:

In order to make it work with MS1, you would have to make the changes manually. The changes are:

 

1. A new class function called newinfoboxcontents which needs to be added.

 

2. A change to the infobox class which added the following near the beginning of the function:

 

if (SKIN_INFOBOX_ACTIVE == 'true')

 

$info_box_contents[] = array('text' => $this->newinfoBoxContents($contents));

 

else {

 

and a corresponding } near the end.

 

3. Similarly, in infoboxheading class, the following were added near the beginning:

 

if (SKIN_INFOBOX_ACTIVE == 'true'){

 

$infobox_header_text = $contents[0]['text'];

$infobox_header_link = $right_arrow;

}

 

else {

 

and a corresponding } near the end too.

 

If you have any trouble doing this let me know and I will modify an MS1 version of this file for you.

 

But I'm not really getting it. I looked into your modified boxes.php but I don't know were to start with point 1... :unsure:

 

could you give a bit more info on how to make this work on MS1? I get the same error about the tep_output_string() function missing.

 

Thanks for your help. Looks like a great contrib to have!

 

best regards.

DicE


_____.:::.________###__________|/______

:(o o): . (o o) (o o)

ooO--(_)--Ooo-ooO--(_)--Ooo-ooO--(_)--Ooo-

Share this post


Link to post
Share on other sites

Hi DicE,

 

OK, I tell you what, I will take a clean MS1 boxes.php as I'm sure I still have one around here and modify it up to the latest standard for this contribution. I'll then post it somewhere so people with MS1 stores can download it.

 

This should be available later on today (gotta go do the day job now, but I'm taking my laptop with me, so will do the job at lunchtime).

 

Cheers,

 

 

 

Mark

Share this post


Link to post
Share on other sites

You rule Mark!

 

I'll wait for it (with great appreciation :rolleyes: )

Thanks a lot!

 

ps: where will you be putting the file? in the download section?

 

DicE


_____.:::.________###__________|/______

:(o o): . (o o) (o o)

ooO--(_)--Ooo-ooO--(_)--Ooo-ooO--(_)--Ooo-

Share this post


Link to post
Share on other sites

Hi Again,

 

if you have a look at your private messages on this board, you should find that I have sent you a link to a .zip file containing the revised boxes.php file which hopefully should work for you.

 

I won't put it on general release as yet as I want to test it first (you've guessed it - you're the guinea pig :o ).

 

Any problems, just give me a shout.

 

Cheers,

 

 

Mark

Share this post


Link to post
Share on other sites

Hi Mark,

how far are you implementing the STS 1?

and wat are your plans with ties, since have allready implemented the STS in my shop, but as far i can see is its good for the layout of the page but most classe would need to be renamed to match the rest of the site! also as long as its not possible to change the rest of the page matching the boxes i personly think implementing the STS is no gooooooood!

 

Regards John

Share this post


Link to post
Share on other sites

Hi John,

 

well I'm really just beginning to play with the STS as you can see here:

 

contrastwigs dot net slash catalog (don't want this indexed by search engines right now...).

 

OK, so it looks pretty bad because this is just basic experimentation, but it is possible to put a box around any content page this way. If STS were to be modded to make PAGE_HEADING and such like available, then this would also allow that to be put in the top center cell of that skin too. I will be looking at BTS too and then perhaps looking at modifying one or the other to work in the best way possible with the Skin Manager.

 

I'm still not convinced that this is the best we can get out of these tools so I'm canvassing ideas on the way forward right now - any suggestions most welcome either here, or in the forums on my own site.

 

Cheers,

 

 

 

Mark

Share this post


Link to post
Share on other sites

I am pleased to announce that a demo of the proposed new Infobox Skin Manager functionality is now up and running o?n the site.

 

Check it out here (catalog):

 

http://www.oscommerce-templates.net/demoshops/slice_revenge/

 

and here:

 

http://www.oscommerce-templates.net/demosh...d_box=templates

 

Note the new Infobox Skin Mapping page that has been introduced, which allows the multiple skin slices to be attached to individual boxes. There is also a new dropdown box o?n the ISM main page, which allows the skins to be sliced into any of the 10 new slice set locations.

 

This version of ISM is not yet available for download, but is being demonstrated in order to get feedback before a stable and "final" release is made available later next week.

 

Any thoughts on what needs to be added changed, etc, most welcome!

 

Cheers,

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×