Jump to content
Sign in to follow this  
rdoylelmt

Define Mainpage v 1.2 problems

Recommended Posts

I have a problem which I suspect is because the contribution used is based on the snapshot-20020729.

 

After the install, I go to the Administration>Catalog and in the left side box in the listings are:

 

Categories/Products

Products Attributes

Manufacturers

Reviews

Specials

Products Expected

BOX_CATALOG_DEFINE_MAINPAGE

 

When I <click on> BOX_CATALOG_DEFINE_MAINPAGE there is an error message:

 

ERROR_FILE_NOT_WRITEABLE

 

The only button underneath the page?s textbox is a ?back? button.

 

My osCommerce is a snapshot-20030209 install.

 

I have double-checked that I have followed the instructions of both the install.txt and manualhack.txt.

 

Does anyone have any idea on what the solution is?

 

Thanks in advance,

Robb


robb(at)buckheadbodyworks.com

 

www.buckheadbodyworks.com-Atlanta's advanced massage therapy

 

www.amtaga.org-Georgia's Professional Massage Therapists

Share this post


Link to post
Share on other sites

You have not included the defines in application_top.php.

Furthermore your mainpage.php file(s) in your language(s) directory

isn't writable by the webserver, you'll have to change the permissions on that.

 

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

I changed the permissions on mainpage.php from 755 to 777 and the error message is gone and the "send" button is displayed.

 

Actually I had included the defines in both application_top.php files.

 

BOX_CATALOG_DEFINE_MAINPAGE is still displayed in the left side box when I go to Admin>Catalog. I can live with that even though it "ain't pretty";-)

 

Thank you Mattice and Steven for making the usage of this contribution possible!

 

Robb


robb(at)buckheadbodyworks.com

 

www.buckheadbodyworks.com-Atlanta's advanced massage therapy

 

www.amtaga.org-Georgia's Professional Massage Therapists

Share this post


Link to post
Share on other sites

So you have in application_top.php on Admin side:

define('BOX_CATALOG_DEFINE_MAINPAGE', 'Define Mainpage');

 

Might be a spelling error, or perhaps the define is called different in app_top...

 

Otherwise just hardcode it in the box.

 

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

Hello Mattice,

 

I did not have that define in the file. I have included it and now it displays properly in the Admin left side box.

 

However, it appears that the install.txt in Define Mainpage v1.2 needs to be corrected.

 

Thanks,

Robb

 

I have copied the instructions that are in the install.txt file below:

 

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

define_mainpage v1.2 OSC CVS 2.2 Addon

 

Description: This minor hack lets you define

the contents of the main catalog page through

the Admin side of OSC. It supports the editing

of the different languages/pages.

 

Its basically a copy of define_languages.php

so all credit for this thing should go to the

OSC development team. I didn't write it,  

I just recycled it in a creative way ;)

 

This release includes 3 mainpage examples  

(one for each distro language) so you can get

an idea of what this code can do. Obviously

you can do all this without this hack but this

makes your editing and life in general a lot

easier. Install it and you'll see what I mean.

 

This addon is released under the GNU licence.

If you find any bugs, improvements or valueable  

loot you'd like to share drop me a line at  

 

             mattice@xs4all.nl

         steven_joseph_p@yahoo.com

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

 

Installation notes:

_________________________________________________________

1) Backup your catalog/admin php files (optional but wise)

_________________________________________________________

2) Copy the mainpage.php files into place:

 

catalog/includes/language/english/mainpage.php

catalog/includes/language/german/mainpage.php

catalog/includes/language/espanol/mainpage.php

 

Make sure the permissions are set correctly!!

In unix/linux:  

 

 chown -R nobody.nobody catalog/includes/languages/*

 chmod -R 700 catalog/includes/languages/*

 

(Do the same for other installed languages if desired)

_________________________________________________________

3) Edit admin/includes/languages/english.php and add:

 

define('BOX_CATALOG_DEFINE_MAINPAGE', 'Define Main page');

 

(Do the same for other installed languages if desired)

_________________________________________________________

4) Edit admin/includes/application_top.php and add:

 

define('FILENAME_DEFINE_MAINPAGE', 'define_mainpage.php');

_________________________________________________________

5) Edit catalog/includes/application_top.php and add:

 

define('FILENAME_MAINPAGE', 'mainpage.php');

_________________________________________________________

6) Files that need to be replaced / altered are:

 

catalog/default.php

admin/includes/boxes/catalog.php

 

If you have made modifications to these files yourself  

already you can read how to change them manually in

the MANUALHACK file. Otherwise just copy them in place.

_________________________________________________________

7) If you've finished step 6 point your browser to your

catalog tadaaa... next check the admin and play around!

 

_________________________________________________________

 

 

 

PLEASE NOTE THAT SOME ERRORS ARE CAUSED BY A MISSING TRAILING  

SLASH (/) IN admin/includes/configure.php FOR THE DEFINITION,

IT SHOULD LOOK LIKE THIS:

 

define('DIR_FS_CATALOG', /path/to/your/catalog/');

 

THIS IS CAUSED BY WRONG INPUT ON INSTALL OR A CVS BUG.

IT WILL ALSO PREVENT THE LANGUAGE DEFINE TOOL FROM  

WORKING.

 

 

© //attice 06-April-2002 DTPM  

 

File have all been corrected and also there are examples of the  

application top and the english.php....i have encluded Define Main

page ins all the php files so that confusion may not occur if you  

wish to manaul edit this files....which is strongly suggested

 

All files have been edited and test on the current snapshot

 

Steven Pignataro

(steven_joseph_p@yahoo.com)

 

July 29, 2002


robb(at)buckheadbodyworks.com

 

www.buckheadbodyworks.com-Atlanta's advanced massage therapy

 

www.amtaga.org-Georgia's Professional Massage Therapists

Share this post


Link to post
Share on other sites

Hello Mattice,

I'm using 2.2MS1 and have changed the mainpage.php permissions to 777 but when I try to open the admin link to edit, all I get is the /forbidden.php file in the URL and the page displays

HEADING_TITLE

NAVBAR_TITLE

TEXT_MAIN

and a back button. I'm stumped. Can you offer any suggestions? I really want this mod working.

Thanks!

You have not included the defines in application_top.php.

Furthermore your mainpage.php file(s) in your language(s) directory

isn't writable by the webserver, you'll have to change the permissions on that.

 

Mattice


"It's a small world...

But I wouldn't want to paint it!"

Stephen Wright

Share this post


Link to post
Share on other sites

Hmmm.. that's odd.

I've succesfully installed it on MS1 the other day.

 

Does your system allow you to change the regular languages through

define_languages?

 

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

I had only English installed and I've temporarily removed the mod while I try to figure out what happened. I looked through all the posts for your mod on here and hadn't seen the 'forbidden.php' problem before so I thought I'd start by asking you.

 

I've been coding for many hours straight so it's also possible that I made some error along the way, I suppose. When I get time I'll give it another go.

 

Cheers!

 

 

Hmmm.. that's odd.

I've succesfully installed it on MS1 the other day.

 

Does your system allow you to change the regular languages through

define_languages?

 

Mattice


"It's a small world...

But I wouldn't want to paint it!"

Stephen Wright

Share this post


Link to post
Share on other sites

I have never seen the forbidden.php - that's not in my mod - or am I missing something here?

 

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

I had to search to remember where it came from. It's from Admin Account w/Access level 1.2. The original author misspelled the file as forbiden.php.

 

Being an english major it drove me crazy having a misspelled file so I changed everything to forbidden.php. Of course when I searched for the file in my archive area I couldn't find it because all the archives are unmodified files. :oops:

 

At any rate, that's where the it comes from. Now that you bring that up, I should probably look into what effect that mod may be having. Thanks for the reply.

 

Cheers,

 

I have never seen the forbidden.php - that's not in my mod - or am I missing something here?

 

Mattice


"It's a small world...

But I wouldn't want to paint it!"

Stephen Wright

Share this post


Link to post
Share on other sites

It will be in some way - not sure but I think you have to set permissions (through the DB) on each file in the Admin dir - mine being a "new" and unknown file could cause it to deny you the permission to execute it.

 

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

That's possible I guess. I did try to execute the file directly using hte URL but I got denied. When I CHMOD 777 I think I got some kind of error but I can't remember what it was right now. As I said, I'd been coding all day so I may also be guilty of making a mistake in the install. It's an excellent mod so I'm definately going to try again.

 

Thanks for the replies!

 

Cheers,


"It's a small world...

But I wouldn't want to paint it!"

Stephen Wright

Share this post


Link to post
Share on other sites

OK, can anyone help me with this problem?

 

The default mainpage won't appear on my oscommerce site when I initially log on to it like this:

 

"www.mywebpage.com/osc/catalog"

 

though the default mainpage *will* appear if I follow the "catalog" link in

the header navigation bar (where the link specifically requests ../osc/catalog/default.php)

 

hope that makes sense. any ideas?

thanks! i'd be lost without the forums here!

Share this post


Link to post
Share on other sites
OK, can anyone help me with this problem?

 

The default mainpage won't appear on my oscommerce site when I initially log on to it like this:

 

"www.mywebpage.com/osc/catalog"

 

though the default mainpage *will* appear if I follow the "catalog" link in

the header navigation bar (where the link specifically requests ../osc/catalog/default.php)

 

hope that makes sense. any ideas?

thanks! i'd be lost without the forums here!

 

I understand this may be fixed in MS2 where index.php replaces default.php

 

What you need is redirection. There are 3-4 ways to do this.

A search engine friendly way, but not elegant way to do this is.

 

 

1. create a file called .htaccess at your document root.(e.g.

/httpdocs/.htaccess) if not already there.

 

2. In .htaccess add this at the top of the file.

# go directly to this file. when www.mywebpage.com is accessed.

DirectoryIndex ./osc/catalog/default.php

 

3. Set appropiate file permissions. i.e., from

FTP or another utility set permissions of .htaccess

to 755 if it is not already set.

 

 

4. Test. This is one of may ways to do it.

 

-ib


ibandyop

Share this post


Link to post
Share on other sites

Hello !

 

I have a problem with mainpage and ssl.

 

My files are on 2 differents server

one on http://www.bleu-lavande.com

another on https://www.bleu-lavande.com (ssl server)

 

When i try to change a text via my administration panel with mainpage. The update text is on https://www.bleu-lavande.com

and no on http://www.bleu-lavande.com

 

You can have the difference on this page

http://www.bleu-lavande.com.eu/catalog/

https://www.bleu-lavande.com/eu/catalog/

 

The diffrence between the two is '.' after 'directeur'

 

 

Could you help me solve this problem. Is it a bug on mainpage on just a little pb to solve ?

 

How to save the text in the same time at NONSSL and SSL ?



Regards
-----------------------------------------
Loïc

Contact me by skype for business
Contact me @gyakutsuki for an answer on the forum

 

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  

×