PDA

View Full Version : Help....MS2 Max new page content -how to?.,



whazzy
10-13-2003, 01:33 PM
I am at my wit's end.....I am trying to add new links to the site,and I read the guide for help.....I created the links in the template...(main_page.tpl) and it works fine...Now I would like to know how to add content to these pages....For instance,I need to add content to "privacy/return" which is in privacy.php...There are two files one in /languages/ and one under /catalog.

Which one should I modify.?and how?

Thanks
Whazzy

In-Overtime
10-20-2003, 06:43 PM
/languages/english/

The file will look like this:

<?php
/*
$Id: privacy.php,v 1.4 2002/11/19 01:48:08 dgw_ Exp $

osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com

Copyright (c) 2002 osCommerce

Released under the GNU General Public License
*/

define('NAVBAR_TITLE', 'Privacy Notice');
define('HEADING_TITLE', 'Privacy Notice');

define('TEXT_INFORMATION', 'Put here your Privacy Notice information. WHICH MEANS YOU CAN WRITE ANYTHING IN THIS AREA YOU WANT, just about. If you happen to use any hyphens, make sure to put a backslash \ before it. (i.e., ya\'ll) I learned that the hard way......');
?>

See the above in action for the following week at http://sdscrubs.com/privacy.php[/url]

WebMistress
11-07-2003, 01:49 PM
There are actually Two files.
In order to get the content to show within the box underneath if you have specified a different color for Infoboxes, you need to edit the conditions/privacy/shipping files in the main area.

I found adding my text in on the following line, through trial and error, yielded very nice looking results.

Look for the "infoboxContents" which are on two lines, one right after the other, around line 66 or so.
There is another set of nested tables below the first set, and the text goes in there.


<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
<tr class="infoBoxContents">
<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
<td align="center">ADD ALL YOUR INFOBOX TEXT HERE, and you can even use the <br /> tags as well to make it have spaces where necessary.<?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td>


Now, to get rid of the "Put Info Here" lines, you have to edit the same files in the includes/languages/english or whichever language you are using.
Follow In-Overtime's instructions and that will get that annoying Top part out. Or you can do ONLY that, and get a single color layout.

The choice is yours :)

The reason I added this to this older thread, was because it is good info, and something that had me pulling my hair out for 2 days myself.

Thanks for the start In-Overtime!!

WebMistress
11-07-2003, 08:54 PM
oooooh

I just realized this was for MAX>>

I am not sure if the same file structure applies in that..

blah
Im sorry :<

But... shouldnt this be in the MAX forum tho?

michael_s
11-07-2003, 09:08 PM
Hmmm... people keep forgetting where they are...moved.

Anonymous
12-19-2003, 10:27 PM
In-Overtime,
I want to edit the conditions.php look and feel with html tables, not just drop in text as you mentioned. Do you know how to do this?

Thanks,
Chris

Anonymous
12-20-2003, 07:21 AM
Chris, I have to bow to the wisdom of others on this one. maybe msasek can point you in the right direction.

However, I have been able to modify what appears in the main area of conditions.php with some HTML tags. It might work with tables. I did a sample test on one of the websites I administer, adding the simple <table> elements before and after my main body text and it seemed to work fine.

../catalog/includes/languages/english/conditions.php


<?php

define('NAVBAR_TITLE', 'Conditions of Use');
define('HEADING_TITLE', 'Terms and Conditions of Use');

define('TEXT_INFORMATION', '

<table><tr><td>
<p align="justify">You Must Agree to these Terms and Conditions</p>

<p align="justify">By submitting your request for authorization . . . .
<p align="justify">Legal Disclaimer:
<p align="justify">This website includes visual, audio, . . . .
<p align="justify">If you are . . . .
<p align="justify">All materials, messages, and . . . .
<p align="justify">Any and all unauthorized . . . .
<p align="justify">Viewing this site . . . . .
<p align="justify">All of the performers . . . .. .
</td></tr></table>

');
?>

In-Overtime
12-20-2003, 07:26 AM
I forgot to login when I posted the above......

chrismole
12-20-2003, 09:25 AM
I have tried dropping html into the TEXT_INFORMATION definition, but I'm getting php parsing errors. The parser seems to choke on illegal chars like "-", ".", "/", etc. Any suggestions? As I'm writing this, I'm wondering of there is a char limit on the text that can be inserted into this field and my html is getting cut off and then throwing errors when pulled from the database.

Msasek, do you have any suggestions?

michael_s
12-20-2003, 11:47 AM
chrismole, escape the quotes in the html with \ and you will be fine. This is proper PHP syntax.