Jump to content
Sign in to follow this  
danieln

new box in sts

Recommended Posts

i asked this on the sts thread but no answer. have tried searching but not gettig the result i need

 

the questions is how do i create a new box? what's the difference in the code with sts compared with the one without sts?

 

i can create a new box in the osc but not sure how with sts as the naming in the template gives me no idea where i should edit to have the box on the columns

 

thanks

Share this post


Link to post
Share on other sites

first you have to add something like this in your includes/column_left.php:

 

example comes from a box that i've added:

 

  require(DIR_WS_BOXES . 'featured.php');
 // STS: ADD
 $sts_block_name = 'featuredbox';
 require(STS_RESTART_CAPTURE);
 // STS: EOADD

 

 

then in includes/sts_display_output.php around line 220 find:

 

  $template['breadcrumbs'] = $breadcrumb->trail(' » ');

 

and after that you should place your box-heading definition somewhere - which should look like this:

 

  $template['featuredboxheading'] = TABLE_HEADING_FEATURED_PRODUCTS;

 

 

 

then find this code around line 250:

 

/////////////////////////////////////////////
////// Create custom boxes
/////////////////////////////////////////////

 

and after that somewhere place your box definistion which should look like that:

 

  $template['featuredbox'] = strip_unwanted_tags($sts_block['featuredbox'], 'featuredbox');

 

 

finally around line 330 find:

 

  // print column_left stuff

 

there you specify in which column you box should appear - so under column left or column right you place your code:

 

 
 echo $sts_block['featuredbox'];

 

 

 

and thats it for the STS - stuff - then just call $featuredbox in your template and it should be there - but don't forget that you have to have the right box in your includes/boxes/ folder !!!

 

 

;) - hope that helps you out

 

 

PS: the heading must be specified in your language --> like in includes/languages/english.php you must have:

 

define('TABLE_HEADING_FEATURED_PRODUCTS', 'Featured Products');

Share this post


Link to post
Share on other sites

what about adding modules?


For my contribution (to society) see my profile link.

--

my new charity store features: STSv4.5.2 and HTCv2.6.3 Bundle, Australian Post Shipping, Paymate, Category Trees Minimum Order Quantity, Enable/Disable Categories, Super Download Store, Paypal IPN, Free Dowloads, Anti-Robot Registration 2.6, Master Products, Lightbox for STS ... the rebuild continues...

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  

×