osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 

WYSIWYG Editor with New Static Pages

This is a discussion on WYSIWYG Editor with New Static Pages within the osCMax v2 Customization/Mods forums, part of the osCMax v2.0 Forums category; I've done several searches in this forum on how to add new static pages and be able to edit them ...


Go Back   osCommerce and osCMax shopping cart software forums > osCMax v2.0 Forums > osCMax v2 Customization/Mods

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Closed Thread

 

LinkBack Thread Tools
  #1  
Old 04-21-2006, 01:06 PM
Member
 
Join Date: Aug 2004
Posts: 43
Thanks: 2
Thanked 4 Times in 3 Posts
Rep Power: 0
jbanda
Default WYSIWYG Editor with New Static Pages

I've done several searches in this forum on how to add new static pages and be able to edit them with the FCKeditor (WYSIWYG) via the admin panel. After sorting through the bits and pieces, I've documented a way to do this. Here's how:

First, copy the shipping.php file in your main catalog directory, and rename it to testpage.php. (testpage.php is an example - you can choose a more suitable name for your new page if you prefer.)

In testpage.php, edit the following variables:

FILENAME_SHIPPING --Change to-- FILENAME_TESTPAGE
CONTENT_SHIPPING --Change to-- CONTENT_TESTPAGE
TEMPLATENAME_SHIPPING --Change to-- TEMPLATENAME_TESTPAGE

There are two instances of FILENAME_TESTPAGE, one instance of CONTENT_TESTPAGE and one instance of TEMPLATENAME_TESTPAGE that need to be changed in total. When you have changed all four definitions, save this file.

Now, if your template is "fallback" or based on the "fallback" directory, go into the "content" folder, copy the shipping.tpl.php and rename it testpage.tpl.php. (I haven't tried this with any template other than "fallback" yet.)

Change this line:

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

to this:

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

Next, open includes/configure_bts.php and add:

define('TEMPLATENAME_TESTPAGE', 'testpage.tpl.php');

around line 17. Save this file.

Open filenames.php, which is in your catalog/includes directory, and create the following variable definitions:

define('CONTENT_TESTPAGE', 'testpage'); define('CONTENT_TESTPAGE_CONTENT', 'testpage_content');

and then:

define('FILENAME_TESTPAGE', CONTENT_TESTPAGE . '.php');
define('FILENAME_TESTPAGE_CONTENT', CONTENT_TESTPAGE_CONTENT . '.php');

Save this file.

Copy the file /catalog/includes/languages/english/shipping.php and rename it to testpage.php.

Edit the code shown in this example:


define('NAVBAR_TITLE', 'New Created Static Page');
define('HEADING_TITLE', 'New Created Static Page');


Don't bother modify the section:

define('TEXT_INFORMATION', 'This page tells you how to add a new static page to OSCMAX using the Template Structure.');

because it doesn't matter. Save the file.

Next, copy the file:

/catalog/includes/languages/english/shipping_content.php

and rename it to:

testpage_content.php.

Don't worry about changing the code in this page, because you'll be able to edit it with the WYSIWYG editor later on.

Now, for the backend.

Go to admin/index.php and find the section that says:

// Added line for Admin w/access levels

around line 27. Add a line to the bottom of the array so it looks like this:

array('title' => BOX_CATALOG_DEFINE_TESTPAGE, 'link' => tep_href_link(FILENAME_DEFINE_TESTPAGE, 'selected_box=catalog')),

)),

Next, open admin/includes/filename.php and around line 80 find the section that says:

// BOF: MOD - wysiwyg content & infobox pages

Add:

define('FILENAME_DEFINE_TESTPAGE', 'define_testpage.php');

Go to admin/includes/languages/english.php and around line 230 find the section that says:

// BOF: Added INFO Pages

and add:

define('BOX_CATALOG_DEFINE_TESTPAGE', 'Test Page');

Now, go to admin/includes/boxes/catalog.php. About line 45 you find:

// Added: info boxes
And change the last line from

tep_admin_files_boxes(FILENAME_DEFINE_SHIPPING, BOX_CATALOG_DEFINE_SHIPPING));

to

tep_admin_files_boxes(FILENAME_DEFINE_SHIPPING, BOX_CATALOG_DEFINE_SHIPPING) .
tep_admin_files_boxes(FILENAME_DEFINE_TESTPAGE, BOX_CATALOG_DEFINE_TESTPAGE));

Now, in the main admin directory, copy the define_shipping.php file and rename it to define_testpage.php. Open this file, and change every instance of "shipping" to "testpage" (about 10 in all).

Finally, give yourself permission to access the file in Administrator > File Access. Once you've done this, the link to the WYSIWYG editor for your new page will show up in the "catalog" info box and you'll be all set to go.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
The Following 2 Users Say Thank You to jbanda For This Useful Post:
altenter (08-01-2007), nicholasbw (03-05-2007)
  #2  
Old 04-25-2006, 03:04 PM
New Member
 
Join Date: Sep 2005
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
shirster
Default RE: WYSIWYG Editor with New Static Pages

Great stuff ! Thanks for sharing !
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #3  
Old 05-21-2006, 03:28 PM
Lurker
 
Join Date: Nov 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
riggs
Default RE: WYSIWYG Editor with New Static Pages

This is excellent, very easy to follow and works a treat. Thanks.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #4  
Old 06-11-2006, 04:18 PM
New Member
 
Join Date: May 2006
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
jonnyl
Default RE: WYSIWYG Editor with New Static Pages

thanks a million for this post..was next to impossible without it.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #5  
Old 06-15-2006, 08:21 PM
New Member
 
Join Date: May 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
emagineitdev
Default RE: WYSIWYG Editor with New Static Pages

yep, pat on the back jbanda, cheers.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #6  
Old 06-25-2006, 11:15 PM
Cisco's Avatar
Member
 
Join Date: Feb 2003
Posts: 85
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
Cisco
Default RE: WYSIWYG Editor with New Static Pages

This is good information. It help very much. What I am having trouble is getting the testpage to link to the left column information box.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #7  
Old 06-26-2006, 02:36 AM
Member
 
Join Date: Aug 2004
Posts: 43
Thanks: 2
Thanked 4 Times in 3 Posts
Rep Power: 0
jbanda
Default RE: WYSIWYG Editor with New Static Pages

Cisco, these instructions were written with the assumption that the reader already knew how to link to the page being created.

To learn how to create a new infobox (or get an idea how to add a new link to the existing information infobox) see this set of instructions.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #8  
Old 06-26-2006, 09:04 AM
Cisco's Avatar
Member
 
Join Date: Feb 2003
Posts: 85
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
Cisco
Default RE: WYSIWYG Editor with New Static Pages

I have been using OSC since about 98, I am a ferm believer in the project. The reason I switched to oscMax is that there are a lot of different functions that I liked about the new set-up. I am not a programmer but I can follow the code. Every once in a while I have problem that I am not able to find. One of the things that I had seen in the oscommerce site and forum is the repetitive items and in the forum. The one thing that makes this seem so hard is that the search functions for finding what you need is almost useless. Thinking that one already knows what to do most instructions are left incomplete, there are a lot of new people that are not programmers or understand the concept but they do try.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Closed Thread

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
Should I use CSS or WYSIWYG Editor? alechhe osCMax v2 Installation issues 1 08-17-2006 09:47 AM
WYSIWYG editor for added pages in catalog section of admin themainebaby osCMax v2 Customization/Mods 6 02-20-2006 12:08 PM
wysiwyg editor not showing techmatters osCMax v1.7 Installation 7 03-15-2005 06:49 PM
WYSIWYG editor problem laurens osCommerce 2.2 Modification Help 2 12-08-2003 07:49 PM
WYSIWYG Editor 1.7 kamel osCMax v1.7 General Mods Discussion 2 11-09-2003 01:19 PM


All times are GMT -8. The time now is 01:54 AM.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO
http://www.oscmax.com/forums/
Copyright 2008 osCMax