Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Sign in to follow this  
Guest

Define Mainpage Parse Error

Recommended Posts

Guest

I just installed Define Mainpage. What a GREAT contrib!!

 

Unfortunately, when I edit the example text in the Admin, I hit save and check my store only to see this:

 

Parse error: parse error in /home/user/public_html/catalog/includes/languages/english/define_mainpage.php on line 27

 

The offending line:

 

27   BE AWARE that changes (and possible errors/typo's) are

 

That is the commented out copy that was in the template. It doesn't look like this thing is writing properly... I set the catalog/includes/languages/english/defin?mainpage.php to 777 like the instructions said... and after writing the file is definitely different than the original. I am just getting this parse error.

 

Any clue as to what's happening?

Share this post


Link to post
Share on other sites

Does it do it on other languages too?


"Politics is the art of preventing people from taking part in affairs which properly concern them"

Share this post


Link to post
Share on other sites
Guest

I quickly installed Spanish, and put the define_mainpage.php in the proper places. When I edit the text in the admin and save it, this time there is no error, but there is no change either! I delete all the text and just put in "TEST" and all the graphics etc look normal. I have the file permissions set at 777...

 

Any idea???

Share this post


Link to post
Share on other sites

Does your regular define LANGUAGES work?

Its a strange error - I can't see anything really obvious.

 

And did you change the index.php to actually echo the changes?

(As described in the text file - think its still called default.php there)

 

Mattice


"Politics is the art of preventing people from taking part in affairs which properly concern them"

Share this post


Link to post
Share on other sites
Guest

If by DEFINE LANGUAGES you mean I can switch from one language to another, yes it works fine (although I only use English).

 

I have made the changes to index.php:

 

**CATALOG STEP 1 --> OPEN catalog/index.php:

  ====================================================================

  Look for this around line 307 (near bottom):

  ====================================================================

 

            <td class="main"><br><?php echo TEXT_MAIN; ?></td>

 

  ====================================================================

  And replace that line with this:

  ====================================================================

 

            <td class="main"><?php include(DIR_WS_LANGUAGES . $language . '/' . FILENAME_DEFINE_MAINPAGE); ?></td>

 

  @@@@@@@@@@@@@@@@@@@@  END /CATALOG/INDEX.PHP  @@@@@@@@@@@@@@@@@@@@@@

 

The default one shows up really nice! I was very excited, but when I tried to edit the text for a test, I got the above error.

 

Are you sure you cannot think of anything else? I have a couple of other contribs installed:

 

- Master Products

- Customer Tetimonials

- Article Manager

- Options as Images

- Human Confirmation

- STS

 

But nothing I can think of that would interfere with this...

Share this post


Link to post
Share on other sites

i'm using osco 2.2-ms2 and trying to install: define_mainpage_v1.3.3_MS2

 

i've got problems too.

 

in my admin_section i see the word:

BOX_CATALOG_DEFINE_MAINPAGE

which is clickable and does show a window on the right side into which content can be changed but the word above does not seem to display right.

 

i didn't try to change the content until now because on the catalog-page i have another problem.

 

under the text "Welcome ........." there is suddenly in all three languages a

// --> (closing comment tag)

which does not and will not go away whatever i try.

 

without all the changes made in order to get define_mainpage.php running i do not see the: // -->

 

i checked several times all the files involved and there are no single closing comment tags (// -->) neither are there any single starting tags (<!--) so where is it coming from?

 

The only files where IMO the // --> may come from are index.php and language.php and /admin/define_mainpage.php and they are all three 100% O.K, no single starting <!-- and no single // --> or //-->

 

another problem is that the three language-files all differ compared to each other with regard to html and php (i don't care about the txt inside) so that i do not even know which file is the right one to start with.

 

Mattice as long as you are maybe still reading this thread, is it not possible that you adapt your own version to be compatible with 2.2-MS2 or pls explain what to change in yr version of 6 april 2002 in order to make it work in 2.2-MS2?


"If you're working on something new, then you are necessarily an amateur."

Share this post


Link to post
Share on other sites

6 Apr 2002 was the last version I did - its been a while since I looked at it, but from memory it was a very MINOR change because I used a function in the example text that was no longer available in MS2 - and a text typo (not code) That was it.

 

By the looks of it (all due respect) things haven't improved with the most recent upgrades - I've recently got quite some e-mail requests over it.

 

New version is still on my to do list (also because of the improperly starting PHP tag) but I haven't gotten around to do it.

 

If you look at what I did in version 1 you should be able to figure it out with a crisp define_languages.php from MS2 - it's not complicated at all.

 

If I find the time today I will create an update.

 

Regards

Mattice


"Politics is the art of preventing people from taking part in affairs which properly concern them"

Share this post


Link to post
Share on other sites
If I find the time today I will create an update.

 

:D:D:D

 

would be great, thanks again, meanwhile i will try to get 06apr02 working, but ...


"If you're working on something new, then you are necessarily an amateur."

Share this post


Link to post
Share on other sites

OK the // --> is gone although it's very strange

 

i had (temporarily):

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

<!-- <td class="main"><?php echo TEXT_MAIN; ?></td>// -->

<td class="main"><?php include(DIR_WS_LANGUAGES . $language . '/' . FILENAME_DEFINE_MAINPAGE); ?></td>

 

which is valid IMO.

 

after i changed it to:

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

<td class="main"><?php include(DIR_WS_LANGUAGES . $language . '/' . FILENAME_DEFINE_MAINPAGE); ?></td>

 

after i deleted the commented-out line complety, the // --> error was gone., but why ???????

 

next problem is in admin:

first time i call the the index.php (catalog) the main.php (not: define_mainpage.php) shows nicely.

but after i change something in admin i get the following error in index.php:

Parse error: parse error, unexpected T_STRING in C:\xampp\htdocs\catalog\includes\languages\english\mainpage.php on line 27

and the content of mainpage.php does not show anymore.

 

now how do i repair that one?

 

story to be continued (i hope).


"If you're working on something new, then you are necessarily an amateur."

Share this post


Link to post
Share on other sites

I've decided the mainpage contribution has it's drawbacks (ie no preview, hassle with files etc) so I have started on a new improved version which is a complete re-write (or actually define_mainpage is a cheap hack :) )

The new version will be database based.

That will allow me to do previews and will be a lot easier when you add a language.

 

Since it's a somewhat bigger jobbie it will not be finished tonight but hopefully later this week - I have 20% done right now.

 

Regards

Mattice


"Politics is the art of preventing people from taking part in affairs which properly concern them"

Share this post


Link to post
Share on other sites

tracking and calendar are active :D

thnks a 1.000.000


"If you're working on something new, then you are necessarily an amateur."

Share this post


Link to post
Share on other sites
Guest
Since it's a somewhat bigger jobbie it will not be finished tonight but hopefully later this week - I have 20% done right now.

Great to hear!!!

Share this post


Link to post
Share on other sites
Guest

Mattice,

 

How is that new version of Define Mainpage coming along?

 

Cheerio,

 

R

Share this post


Link to post
Share on other sites

Hi Rusyn

 

I read that Matthijs (Mattice) is attending an osCommerce-conference this weekend in Germany.

I reckon we have to wait a little bit more.

 

greetings

John


"If you're working on something new, then you are necessarily an amateur."

Share this post


Link to post
Share on other sites
Guest

Thanks for the update John!

Share this post


Link to post
Share on other sites

There should be an INSTALL text ...? There is in my version - I am sure of that, perhaps not in an update - try a lower version number.

 

@ John - yes indeed, a lot of stuff happened recently which has prevented me from further working on the new version. Tommorrow Mark and myself will leave for Germany so I think it's safe to say it will be at least another week before I even get the chance to look at the code again.

 

But once finished I promise it will be nice, clean and easy to install :D

 

Regards

Matthijs


"Politics is the art of preventing people from taking part in affairs which properly concern them"

Share this post


Link to post
Share on other sites
in my admin_section i see the word:

BOX_CATALOG_DEFINE_MAINPAGE

which is clickable and does show a window on the right side into which content can be changed but the word above does not seem to display right.

Did you ever find a fix for this? I also have BOX_INFORMATION_MANAGER showing up wrong.


Knowledge is Power!

Share this post


Link to post
Share on other sites

sorry, still waiting for Mattice's brandnew version, hopefully he reads this


"If you're working on something new, then you are necessarily an amateur."

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  

×