Contributions
Extra pages-info box w/ admin
Do you need an "About Us" page? Maybe a "Company News" page that needs updating?
Now you can make as many as you want with the links in 1 new Information Box.
This contribution allows you to create and manage new pages (like Shipping or Conditions) on the fly.
It also creates a new box that holds the page names which are links to those pages.
In Admin, you click new, enter a title and the page text or HTML.
You can Add, Edit, Delete pages as well as turn them on and off with Status.
When you create a new page, the link in the box appears automatically!
If you delete a page or turn it off with Status, the link in the box disappears automatically!
Very simple to use!
Expand All / Collapse All
Full package with short tab fix in admin and remove type
extra pages on admin site fixed.
bug fix for this page only!
fixed sql php5 error
fixed info pages on admin side
Full package for 2.3
Extra info pages for 2.3 with Full package.
Download:
Autoinstaller 2.14 for Extra pages-info box w-admin 4.6.1.
Apply all the fixed: Update to Autoinstaller 2.14 for Extra pages-info box w-admin 4.6.1
edit:
admin/extra_info_pages.php
Change:
+++++++++++
<?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']). ' '.tep_draw_fckeditor('pages_html_text_'.$languages[$i]['id'],'600','400',$pages_html_text[$languages[$i]['id']]); ?>
+++++++++++
To:
+++++++++++
<?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']). ' '.tep_draw_textarea_field('pages_html_text_'.$languages[$i]['id'],'soft','50','10', $pages_html_text[$languages[$i]['id']],' class="ckeditor"'); ?>
+++++++++++
Did not realize I uploaded ckeditor instead of fckeditor. Please dis-regard error on line 508
This update is in case you find errors in admin/extra_info_pages.php
error on line 367
<td class="main"><?phpecho tep_draw_separator('pixel_trans.gif', '24', '15') . ' '?><select name="page_type" size=1>
change to:
<td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' '?><select name="page_type" size=1>
error on line 508
<td class="main"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']). ' '.tep_draw_ckeditor('pages_html_text_'.$languages[$i]['id'],'600','400',$pages_html_text[$languages[$i]['id']]); ?>
Change to:
<td class="main"><?php //echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']). ' '.tep_draw_ckeditor('pages_html_text_'.$languages[$i]['id'],'600','400',$pages_html_text[$languages[$i]['id']]); ?>
I have replaced all the <? with <?php in the
adminextra_info_pages.php file.
As some servers treat <? as XML tag which cause error.
This package requires FCKeditor (http://addons.oscommerce.com/info/2900) already installed.
Do not start installation without it.
The Auto Installer script requires PHP 5.2.0
Download the package and view the screenshots of what you will get after the installation
The content of the ep_autoinstaller/index.php file was moved to control.php to make the php version check work.
This package requires FCKeditor (http://addons.oscommerce.com/info/2900) already installed.
Do not start installation without it.
The Auto Installer script requires PHP 5.2.0
Download the package and view the screenshots of what you will get after the installation
The "Edit Manually" button fixed
This package requires FCKeditor (http://addons.oscommerce.com/info/2900) already installed.
Do not start installation without it.
The Auto Installer script requires PHP 5.2.0
Download the package and view the screenshots of what you will get after the installation
Few lines of code were added to list all the files that should have 777 permissions.
This package requires FCKeditor (http://addons.oscommerce.com/info/2900) already installed.
Do not start installation without it.
The Auto Installer script requires PHP5
Download the package and view the screenshots of what you will get after the installation
The autoinstaller/index.php file was corrected to use the directory name for the unique session name.
This package requires FCKeditor (http://addons.oscommerce.com/info/2900) already installed.
Do not start installation without it.
The Auto Installer script requires PHP5
Download the package and view the screenshots of what you will get after the installation
This package contains:
Extra pages-info box w/ admin 4.6.1 by sutikah1 (18 Dec 2007)
+ one line in the admin/extra_info_pages.php was modified for FCK Editor
+ the define name FILENAME_PAGE was changed to FILENAME_EXTRA_INFO_PAGES
To make it work with the Header Tags SEO V 3.1.4 contribution
+ was added after installation instructions.
How to make it work with the Ultimate Seo Urls 2.7 contribution
This package requires FCKeditor (http://addons.oscommerce.com/info/2900) already installed.
Do not start installation without it.
The Auto Installer script requires PHP5
Download the package and view the screenshots of what you will get after the installation.
This is a new upload of the news_box addon for extra pages infobox with a fix of language bug.
Only change done:
tep_href_link($link)
To:
tep_href_link($link, 'NONSSL')
This fix can also be used for the language problem with links in the information infobox in some versions of Extra pages-info box w/ admin
Or as a better sollution for the fix represented in version 4.6.1
What this does is put an infobox in the right or left column that shows the title and content of one of your infopages - you can change which one.
I use it as a latest news box
The title of your infopage will be shown in the head of the infobox, and a part of the text will be shown in the content area of the infobox. The text links to the infopage.
screen shot included
No need to pay attention to previous poster- brenwa - That is no bug/error to fix. There
are directions at the end of the install file on how to use this contribution properly.
Open "admin/Extra_info_pages.php"
----------------------------------------------------
Find this line (around 1011)
<td class="main"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']). ' '.tep_draw_textarea_field('pages_html_text_'.$languages[$i]['id'],'soft','50','10', $pages_html_text[$languages[$i]['id']]); ?>
Replace with:
<td class="main"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']). ' '.tep_draw_fckeditor('pages_html_text_'.$languages[$i]['id'], '600','400', $pages_html_text[$languages[$i]['id']]); ?>
----------------------------------------------------
in catalog/index.php
AFTER
require('includes/application_top.php');
ADD
#################
$page_query = tep_db_query("select
p.pages_id,
p.sort_order,
p.status,
s.pages_title,
s.pages_html_text
from
" . TABLE_PAGES . " p LEFT JOIN " .TABLE_PAGES_DESCRIPTION . " s on p.pages_id = s.pages_id
where
p.status = 1
and
s.language_id = '" . (int)$languages_id . "'
and
p.page_type = 1");
$page_check = tep_db_fetch_array($page_query);
$pagetext=stripslashes($page_check[pages_html_text]);
#####################
same file
REPLACE
<?php echo TEXT_MAIN; ?>
WITH
<?php echo $pagetext; ?>
the problem is specifically with the lines
same file
*******source of the problem********
REPLACE
<?php echo TEXT_MAIN; ?>
WITH
<?php echo $pagetext; ?>[
*******source of the problem********
I have undone this edit and everything started working normally again
This mod also seems to be working fine without that specific line edit....
Adding FCK Editor to Extra pages-info box w-admin 4.6.1
I had FCK Editor Installed then added the Extra Pages-Info Box contribution to my website.
The FCK Editor Mod didn't pick up "Extra Pages" Description Box so I looked for a way to connect both contributions.
This worked for me. This is my quick fix:
In admin/extra_info_pages.php - Look
<?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'],
$languages[$i]['name']). ' '.tep_draw_textarea_field('pages_html_text_'.$languages[$i]['id'],'soft','50','10',
$pages_html_text[$languages[$i]['id']]); ?>
Replace with
<?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'],
$languages[$i]['name']). ' '.tep_draw_fckeditor('pages_html_text_'.$languages[$i]['id'],'600','300',
$pages_html_text[$languages[$i]['id']]); ?>
Tah dah!
link on aplication Top FIX!!
Just Replace catalogextra_info_pages.php
Applied MySQL 5 bug fix to catalog/admin/extra_info_pages.php
Moved extra_info_pages.php to inside catalog folder as it was outside folder & I never installed it straight away..... DOH!!
Complete package
This code written by http://gadast.net/ was in response to my request to add the ability to add a link to a product page within my own site. Simply add the attached code to the page/s which "pages_html_text " appears.
- modified admin/extra_info_pages.php to work with register_globals OFF (should work same with globals ON or OFF)
- removed custom "FCKeditor" code from admin/extra_info_pages.php
- created a changelog file
I got errors in Page Manager when using PHP 5 and osCommerce released 051113. This should do it, in page_manager.php around row 590 (mine is modified) change;
$bInfo_array = array_merge($pages, $info);
to
$bInfo_array = array_merge($pages, (array)$info);
beware that the file provided in this zip are the one i got with the modification to use FCK editor wysiwyg editor just given below .
so compare the files with 4.3 version to see if you want to get ride of it
same zip file than 4.5 here
Changes on version 4.5
- empty cart fixed
- because of the osc logic and because it's more difficult to find the files to edit,
I changed all the naming pattern of the php file, now they are all : extra_info_pages.php
so admin page_manager files and catalog info_pages.php all anmed now extra_info_pages.php
- i updated the $infopageid: name on the beggining of all files
- fix for cart losing their content
catalogincludesboxesinfo_pages.php
Think I've cracked the problem. Seems to be in line 76 where the link is created.
$page_list .= '<tr><td class="infoBoxContents"><a target="'.$target.'" href="' . tep_href_link($link) . '">' . $page['pages_title'] . '</a></td></tr>';
I updated link 76 to:
$page_list .= '<tr><td class="infoBoxContents"><a target="'.$target.'" href="' . tep_href_link(FILENAME_PAGES, 'pages_id=' .$page['pages_id'], 'NONSSL') . '">' . $page['pages_title'] . '</a></td></tr>';
For those who are currently using the FCKeditor and would rather use that for the page manager here is an update to make it work here instead of the rather outdated editor that was added earlier. If you dont have the FCKeditor and would like to use it then it should be located in the contributions here: http://www.oscommerce.com/community/contributions,2900/
In Admin/page_manager starting on about line 234 find and remove:
<script language="javascript"><!--
function popupImageWindow(url) {
window.open(url,'popupImageWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,left=150')
}
//--></script>
<SCRIPT language=javascript src="editor/inhtml.js"></SCRIPT>
In Admin/page_manager starting on about line 512 find
<td valign="top" class="main"><?php if ($i == 0) echo TEXT_PAGES_HTML_TEXT; ?>
<br>
<input type="button" value="<? echo RICH_EDIT; ?>" onClick="edit(pages_html_text_<? echo $languages[$i]['id']; ?>)">
</td>
<td class="main"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']). ' '.tep_draw_textarea_field('pages_html_text_'.$languages[$i]['id'], 'soft', '80', '20', $pages_html_text[$languages[$i]['id']]); ?>
</td>
</tr>
Replace with:
<td valign="top" class="main"><br>
<td class="main"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']). ' '.tep_draw_fckeditor('pages_html_text_'.$languages[$i]['id'],'600','300', $pages_html_text[$languages[$i]['id']]); ?>
</td>
</tr>
Thats it.
There is also a lot of white space with in the code that you could clean up too. I went from 693 lines to 583 lines.
This is not a full package.
Changes on version 4.3:
- Expanded capabilities of the contrib, you can now have 9 pages!!!!
- Added more directions on how to use this contrib.
- Fixed hash //// being inserted into code, works fine in normal and html editor mode now (fix by expert May 22 2005, 12:33 PM post #42 incorporated)
TO UPDATE FROM PREVIOUS VERSION:
Overwrite:
admin/page_manager.php
admin/includes/english/page_manager.php
Then check your pages to make sure the page type hasn't changed.
SUPPORT THREAD:
http://forums.oscommerce.com/index.php?showtopic=137141
Only page_manager.php to upload in /admin directry.
Sorry for not uploading full package, just install 4.2 version with all the fixes and overwrite the old page_manager.php file in /admin directory.
The Solution for using WYSIWYG HTMLArea MS2 v2 multilingual in page_manager.php
The solusion is in line 331 :
<script language="JavaScript1.2" defer>
// MaxiDVD Added WYSIWYG HTML Area Box + Admin Function v1.7 - 2.2 MS2 HTML PAGEMANAGER <body>
var config = new Object(); // create new config object
config.width = "<?php echo PAGEMANAGER_WYSIWYG_WIDTH; ?>px";
config.height = "<?php echo PAGEMANAGER_WYSIWYG_HEIGHT; ?>px";
config.bodyStyle = 'background-color: <?php echo HTML_AREA_WYSIWYG_BG_COLOUR; ?>; font-family: "<?php echo HTML_AREA_WYSIWYG_FONT_TYPE; ?>"; color: <?php echo HTML_AREA_WYSIWYG_FONT_COLOUR; ?>; font-size: <?php echo HTML_AREA_WYSIWYG_FONT_SIZE; ?>pt;';
config.debug = <?php echo HTML_AREA_WYSIWYG_DEBUG; ?>;
// Begin Solution multilingual
<?php for ($i = 0, $n = sizeof($languages); $i < $n; $i++) { ?>
editor_generate('pages_html_text[<?php echo $languages[$i]['id']; ?>]',config);
<?php } ?>
// End Solution multilingual
<?php }
// MaxiDVD Added HTML is ON when WYSIWYG BOX Enabled, HTML is OFF when WYSIWYG Disabled
?>
</script>
Regards.
Sorry,
Last pasted result was wrong
it becomes when I edit it once again:
<P>test'test</P>
<P>this is <A href="http://www.testurl.com/" target=_new>url</A></P>
I couldn't find any improvement on slash fix problem with your new package. It doesn't seem fixed slashes.
I think you insist not to use simple 'stripslashes' when posting things to the database.
Just add simple stripslashes() when posting. See my fix below.
---------------------------------------------
I've fully insttaleed your last package again and;
<P>test'test</P>
<P>this is <A href="http://www.testurl.com/" target=_new>url</A></P>
becomes, when I edit it once again:
<P>test'test</P>
<P>this is <A href="http://www.testurl.com/" target=_new>url</A></P>
This is the complete zip file. I have just changed the installation.txt file to fix the bugs on displaying slashes on index.php and contact_us.php.
Is is enough to download this zip file to install the complete contribution with bug fixes...
Easy fix for Slash (/) problem when using ' or URL link in textarea
No matter if you are using HTMLAREA or plain textarea input
Just find (around line #134)
---------------------------------------------
$sql_data_array_pages_description = array('pages_title' => $$pages_titlem,
'pages_html_text' => $$pages_html_textm,
'intorext' => $$intorextm,
'externallink' => $$externallinkm,
'link_target' => $$link_targetm);
Replace with
---------------------------------------------
$sql_data_array_pages_description = array('pages_title' => $$pages_titlem,
'pages_html_text' => stripslashes($$pages_html_textm),
'intorext' => $$intorextm,
'externallink' => $$externallinkm,
'link_target' => $$link_targetm);
------------------------------------------
It worked for me.
You have to re-edit once your current info pages..
Expert
Changed page_manager.php to work with WYSIWYG HTMLArea MS2 v1.7, love both contributions by the way.
Removed existing javascript and replaced with MAXDVD's javascript for using WYSIWYG HTMLArea.
My mod is rudimentary, a quickfix that needs more work for it to be multilingual.
I just fixed a small HTML tag bug on page_manager.php which has been mentioned at:
http://forums.oscommerce.com/index.php?showtopic=137141
Also another bit of the script was conflicting one of the other contributions. So I fixed this too..
This is the complete zip file with 2 bugs fixed.. Any other bugs, please let me know...
Since there was errors when inserting HTML image tags, see http://forums.oscommerce.com/index.php?showtopic=137141
I fixed the page_manager.php file (this download only contains that file).
And finally I managed to re-write the script partly to add multi language support. If you are using an older version, you can NOT upgrade your version with this because the database structures are completely different.
I tidied up some coding and fixed a few tiny bugs and altered readme.txt aswell.
This zip file includes the following:
1) Some of the modules that Tony has done. (as always thanks Tony. this is lovely)
2) Rich edit box addition(by me)
3) External Links functionality addition(by me)
4) Link targets - You can now set to open the target of links. Ex: Open in same page or in new window. Added By me.
5) The Breadcrumb addition (by Hostmistress)
6) Multiple languages support(by me)
7) You can now upload and insert images to your pages by using a simple image manager in the html editor - by me)
It is enough to download this zip file to install the complete contribution if you want to use it with these additions.
This is the first version of the multilingual version so please let me know if you face any bugs as this was a tricky modification on the module.
I have just tidied up some coding and fixed a few tiny bugs and altered readme.txt.
This zip file includes the following:
1) Full version that Tony has developed(thanks for that. This is perfect)
2) Rich edit box addition(by me)
3) External Links functionality addition(by me)
4) Link targets - You can now set to open the target of links. Ex: Open in same page or in new window. Added By me.
5) The Breadcrumb addition (by Hostmistress)
It is enough to download this zip file to install the complete contribution if you want to use it with these additions.
This zip file includes the following:
1) Full version that Tony has developed(thanks for that. This is perfect)
2) Rich edit box addition(by me)
3) External Links functionality addition(by me)
4) Link targets - You can now set to open the target of links. Ex: Open in same page or in new window. Added By me.
5) The Breadcrumb addition (by Hostmistress)
It is enough to download this zip file to install the complete contribution if you want to use it with these additions.
The Extra Pages contribution is a welcome modification to the osCommerce sites I've done. But I always have to add a single line of code to get breadcrumbs to work properly in the navbar trail for any extra info box pages I've added.
So for the PHP-challenged, or those that haven't achieved the Zen-like Oneness with OSC's internals, this contribution might save someone a little time.
Happy coding!
This zip file includes the following:
1) Full version that Tony has developed(thanks for that. This is perfect)
2) Rich edit box addition(by me)
3) External Links functionality addition(by me)
It is enough to download this zip file to install the complete contribution if you want to use it with these additions. For support on THIS zip file please contact me: benan@benan.net (as we do not want to get Tony upset:)
I have added an option to give external or internal links to the extra pages.. You can now put an option to the menu and link it to an external link like: http://www.google.com.
If you have installed HTMLAREA 1.7 replace new file page_manager.php with old file. You will have WYSIWYG for your pages.
Alexandr http://osc-ru.my777.biz/
I have just added a rich edit box to edit the text visually in a frontpage like interface. You can select the text and make it bold, italik or play with the font, insert links or images to the text easily without having to know any HTML.
Thank you for everybody who helped to launch a module like this as it is quite useful.
Error in readme for contact_us.php
You can add extra Contact information that will apear above the normal Contact Us form.
The Contact Us link is no longer at a fixed position at the bottom of the box; it's sort order can be changed.
You can edit your front page on the fly without using Admin -> Tools -> Define languages -> index.php.
New contact email address for me.
Version 2
Added sort order in Admin to allow displaying links in any order in the info box.
Changes explained in the readme.
Sorry for the rush release, I was too excited!
USE THIS FILE!
Fixed - Readme
catalog/admin/includes/boxes/tools.php
NOT
catalog/admin/includes/boxes/column_left.php
Fixed - catalog/info_pages.php
Put original header back - (I had modified my own)
Do you need an "About Us" page? Maybe a "Company News" page that needs updating?
Now you can make as many as you want with the links in 1 new Information Box.
This contribution allows you to create and manage new pages (like Shipping or Conditions) on the fly.
It also creates a new box that holds the page names which are links to those pages.
In Admin, you click new, enter a title and the page text or HTML.
You can Add, Edit, Delete pages as well as turn them on and off with Status.
When you create a new page, the link in the box appears automatically!
If you delete a page or turn it off with Status, the link in the box disappears automatically!
Very simple to use!
Note: Contributions are used at own risk.