Jump to content

Adding new boxes in Index Page


Guest pippopluto

Recommended Posts

Guest pippopluto

Hi all.

I'm trying to set up a new site www.edizionidigitali.com/cubestore/ that is still under construction. Version 3.0.4.

Well, i'd need to add new boxes for inserting:

- News

- Sponsor Banners (not rotating, i saw that mod in this forum), just JPG or rotating GIF

- another free text box

They should be in the central column, in this order:

1. Welcome (Homepage as intended in CC)

2. Sponsor Box

3. Latest Products

4. News

In left and right columns, as well, more boxes for sponsors..

EHM... did i ask too much?? :w00t:

I'm working on Italian language file, it will be ready in approx 1 month, and i'll share in this forum, of course!!

THAKSALOT!

MAx

Link to comment
Share on other sites

Hi Max,

You are asking for what a lot of others asked for and some did :w00t:

I cannot reply to all of these details you need but i suggest you go to Downloads (click here) and you will find a few. Try and modify them to your needs.

Perform a search and you will find a lot of answers to your questions. Search in all CC3 forums and change the date to more than 60 days.

If you dont find all, at least you will narrow down the requests and needs.

In the long run and if even that does not work, there are persons in here that can do this for you with a small pre-agreed fee. (Not me) :lol:

Link to comment
Share on other sites

Guest pippopluto

Hey guys!

Just a reminder for all newbies like me, since Vrakas & others already posted these infos some months ago.

Rif. ver. 3.0.4.

I added static text boxes on index page, i.e. they won't change if you change language, and they are always visible during navigation within the store.

HOWTO:

open index.tpl

...to add a box in 1st or 3rd column

Find:

<tr valign="top">

<td width="175">

{SEARCH_FORM} (for the 1st column) or {MAIL_LIST} (for the 3rd)

Add:

<div class="boxTitleRight">BoxTitle</div>

<div class="boxContentLeft">

YOUR TEXT HERE

<img src="images/uploads/yourimage.gif" border="0" width="210" height="60" alt="" align="center" />

<border="0" >

</div>

<div class="boxFootRight">&nbsp;</div>

*end*

...to add a box in the central column:

Find:

<td style="padding: 0px 5px 0px 5px;">{PAGE_CONTENT}

Add:

<div style="padding: 5px 0px 0px 0px; margin: 0px;">

<div class="boxContent">

YOUR TEXT HERE

<p align="center">

<img src="images/uploads/yourimage.gif" border="0" alt="nameofyourimage" /></p>

<p></p>

<p></p>

</div>

</div>

*end*

Hope it helps.

Now the question... Anyone knows how to make boxes in same places that will change with language?

..maybe someone already posted it, but i couldn't fint it...

BYE

MAx

Link to comment
Share on other sites

pippopluto

You have to write your own box tepmlate file, appropriate php file, additional LANG variable(s).

I suppose, you dont know anything about PHP TEMPLATES.

Principle in practice

-----------------------

Have look to includes/boxes folder. Lot of boxes php files here. Appropriate templates folder is skins/<-your favorite skin->/styleTemplates/boxes.

How the whole parsing works?

----------------------------------

Php files for boxes are included into index.php like this

include("includes/boxes/searchForm.inc.php");

$body->assign("SEARCH_FORM",$box_content);


Just have look at SEARCH_FORM in code above, open the main index template skins/<-your favorite skin->/styleTemplates/global/index.tpl and search for SEARCH_FORM. Here is {SEARCH_FORM} - template variable parsed by $body->assign("SEARCH_FORM",$box_content) command . It means, that whole code for this box just in this position resides.



And what about box code?. Open skins/<-your favorite skin->/styleTemplates/boxes/searchForm.tpl. This is plain html code, except template variables like {LANG_SEARCH_FOR}. This variable is parsed in appropriate php for searchForm.tpl - includes/boxes/searchForm.inc.php just open it and yes, we are right 
$box_content = new XTemplate ("skins/".$config['skinDir']."/styleTemplates/boxes/searchForm.tpl");
Command like
$box_content->assign("LANG_GO",$lang['front']['boxes']['go']);
does already used language assignation for {LANG_GO} and $lang['front']['boxes']['go'] is language variable defined within lang.inc.php.

Finally, all of our variables, which are needed for template must be parsed.


$box_content->parse("search_form");

$box_content = $box_content->text("search_form");

As you see, $box_content contains search box html code.

OK, thats all. You are welocome to PM me, if you have any problem.

Link to comment
Share on other sites

  • 1 year later...
Guest autumn

Hi Max,

You are asking for what a lot of others asked for and some did :P

Vrakas,

I see this in more topics than I see the answer I'm looking for. It's true though, and although I usually end up with way more mods than I was originally looking for, searching the forum helps my learning process. Thanks for you support to us newbies! :)

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...