Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Information Pages Unlimited v1.0


chooch

Recommended Posts

Hello all,

 

Has anyone found out how to integrate this into the main header menu? Since the pages are not actual php pages like the Contact_us they can not show in a horizontal menu although in the regular list box they show. Tried everything but they only show up in a list form in the header! Help!!!

 

Angel

Link to comment
Share on other sites

@@lucsangel

 

You would need to hard code the file into the header.php

 

Something like this:

 

<a href="<?php echo tep_href_link(FILENAME_INFORMATION,'info_id=6');?>"><?php echo HEADER_TITLE_SHIPPING; ?></a>

 

 

 

Chris

Link to comment
Share on other sites

@@lucsangel

 

You would need to hard code the file into the header.php

 

Something like this:

 

<a href="<?php echo tep_href_link(FILENAME_INFORMATION,'info_id=6');?>"><?php echo HEADER_TITLE_SHIPPING; ?></a>

 

 

 

Chris

 

So for each page it would need to be done this way inside the main header menu box?

Link to comment
Share on other sites

[Great!

 

A little modification to work:

 

Define the pages (as they are made ) in catalog/includes/languages/english/modules/boxes/main_menu_header.php:

 

define('MODULE_BOXES_MAIN_MENU_BOX_SHIPPING', 'Shipping');

define('MODULE_BOXES_MAIN_MENU_BOX_CONDITIONS', 'Sales Terms');

define('MODULE_BOXES_MAIN_MENU_BOX_ABOUT_US', 'About Us');

 

Then in catalog/includes/modules/boxes/main_menu_header.php (I have it with a style sheet so a bit different):

 

$data = '<div class="menu">' .

// ' <h4 class="Menu_BoxHeading">' . MODULE_BOXES_MAIN_MENU_BOX_TITLE . '</h4>' .

' <ul>' .

' <li class="'.$button_act1.'"><a href="' . tep_href_link(FILENAME_DEFAULT) . '">'. tep_draw_menu_top() . '' . MODULE_BOXES_MAIN_MENU_BOX_DEFAULT . '' . tep_draw_menu_bottom() . '</a></li>' .

' <li class="'.$button_act2.'"><a href="' . tep_href_link(FILENAME_INFORMATION,'info_id=1') . '">' . tep_draw_menu_top() . '' . MODULE_BOXES_MAIN_MENU_BOX_SHIPPING .'' . tep_draw_menu_bottom() . '</a></li>'.

' <li class="'.$button_act3.'"><a href="' . tep_href_link(FILENAME_INFORMATION,'info_id=2') . '">' . tep_draw_menu_top() . '' . MODULE_BOXES_MAIN_MENU_BOX_CONDITIONS .'' . tep_draw_menu_bottom() . '</a></li>'.

' <li class="'.$button_act4.'"><a href="' . tep_href_link(FILENAME_INFORMATION,'info_id=3') . '">' . tep_draw_menu_top() . '' . MODULE_BOXES_MAIN_MENU_BOX_ABOUT_US .'' . tep_draw_menu_bottom() . '</a></li>'.

' <li class="'.$button_act6.'"><a href="' . tep_href_link(FILENAME_CONTACT_US) . '">' . tep_draw_menu_top() . '' . MODULE_BOXES_MAIN_MENU_BOX_CONTACT_US . '' . tep_draw_menu_bottom() . '</a></li>'.

' </ul>' .

'</div>';

$oscTemplate->addBlock($data, $this->group);

 

Thank you soooooo much and this is by far the best add-on for adding information pages easily!

 

Hope this helps someone else.

 

Angel

Link to comment
Share on other sites

  • 3 weeks later...

Hi

 

I installed this addon, it got errors but thanks for GoTTi and Bob, now it looks all right.

 

However there are still something wrong with it.

 

When you open the Box, there are two links there

I had test the Information pages, and made pages without anyproblem!

 

If you click on the 2nd link "Welcome message"

there are five sub link there.

 

1. Heading_title: works fine!

2. Greeting_Personal: not sure if it works, can't find it

3. Greeting_Personal_relogon: not sure if it works, can't find it

5. Text_main: not sure if it works, can't find it

 

the problem is 4

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

Text_Greeting_Guest: even I typed the new message there, when I click save,

it didn't save and change the front page.

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

doesn't anyone has the same problem and know how to make it works?

 

thx in advance.

Link to comment
Share on other sites

Hi,

 

I got another error message after I installed PDF datasheet addon.

 

Notice: Undefined variable: child_information in /includes/functions/information.php on line 48

TCPDF ERROR: Wrong page number on setPage() function: 0

 

and the information.php line 48 is as below:

$count_child = count($child_information);

Any idea how can I fix it?

 

Can anyboy please help? Thanks a lot in advance.

 

Lyn

Link to comment
Share on other sites

  • 4 weeks later...

Anyone seen this error:

Fatal error: Cannot redeclare class bm_information in /home/xxxx/public_html/xxxxx/includes/modules/boxes/bm_information.php on line 13

 

I looked at the original file prior to adding this mod and it has the same line. I thought at first mabe there was a conflict with my other add ons, but the original file gives the same error. I will add that I did not add the additional code in index.ph for changing the welcome text.

 

Tim

Link to comment
Share on other sites

  • 2 months later...

Nice mod, pal!

 

I got a prob, however.

 

I tried to use the SQL query from information.sql, but I got the following error message:

 

 

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TYPE=MyISAM' at line 11

 

At this line:

`parent_id` int( 11 ) default NULL ,

link to webshop: www.imperiumclan.bplaced.de/richard

link to PMA: www.imperiumclan.bplaced.de/pma

Link to comment
Share on other sites

  • 2 months later...

Hi there, this conrtib has been installed on a site I'm working on and I have a few questions which I hope aren't too annoying!

 

Firstly, is there a way I can use a different URL for posts rather than using the page title? It's just that the page titles are long and therefore so are the URLs. If an extra field could be added where I could define a different URL that would be great (or even to take out "stop words") (eg page title "Why I Love Cats So Much and Think They're Great" and URL "Why-Cats-Are-Great-i-12.html")

 

Also, when I've tried making a parent page, and then asigned child pages to it - nothing seems to happen. If I go to the parent page it's just blank. If someone could please point me to an example site to show me how this is supposed to work I would be very greatful. I don't know if it's not working because I don't understand how it functions, or because whoever installed the contrib didn't do so properly.

 

Thank you! Kitty :christmas_tree:

Link to comment
Share on other sites

Hi,

 

I have the add-on information pages unlimited + CKeditor just recently installed on a 2.3.3 install. Both information pages and CK editor appear fin i admin but I have a few problems listed below.

  1. When adding text using CKeditor in an information page such as 'shipping', no text appears on my web page for 'shipping' only the header?
  2. When I delete the text the main text area on the web page re-appears but now I have 'heading_title' and underneath this 'text_information' displayed.
  3. When I create a new page using add-on 'information pages unlimited' such as 'FAQ's'. I don't know where about's this page appears on my web page...I can not see it?
  4. How is possible is it to create and add new pages to the 'main navigation' menu where the home, products, about us links are?

I know I have a few questions but they are all related and any help would be appreciated.

 

Thanks

Link to comment
Share on other sites

  • 3 months later...
  • 3 months later...

I dont know why, I tried several different version of this mod but always got SQL ERROR and dont find the solution for this.

 

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TYPE=MyISAM' at line 11

 

--

-- Table structure for table `information`

--

DROP TABLE IF EXISTS `information`;

CREATE TABLE `information` (

`information_id` tinyint(3) unsigned NOT NULL auto_increment,

`information_group_id` int(11) unsigned NOT NULL default '0',

`information_title` varchar(255) NOT NULL default '',

`information_description` text NOT NULL,

`parent_id` int(11) default NULL,

`sort_order` tinyint(3) unsigned NOT NULL default '0',

`visible` enum('1','0') NOT NULL default '1',

`language_id` int(11) NOT NULL default '0',

PRIMARY KEY (`information_id`,`language_id`)

) TYPE=MyISAM;

 

--

-- Dumping data for table `information`

--

 

-- --------------------------------------------------------

 

--

-- Table structure for table `information_group`

--

 

DROP TABLE IF EXISTS `information_group`;

CREATE TABLE `information_group` (

`information_group_id` int(11) NOT NULL auto_increment,

`information_group_title` varchar(64) NOT NULL default '',

`information_group_description` varchar(255) NOT NULL default '',

`sort_order` int(5) default NULL,

`visible` int(1) default '1',

`locked` varchar(255) NOT NULL default '',

PRIMARY KEY (`information_group_id`)

) TYPE=MyISAM ;

 

--

-- Dumping data for table `information_group`

--

 

INSERT INTO `information_group` (`information_group_id`, `information_group_title`, `information_group_description`, `sort_order`, `visible`, `locked`) VALUES (1, 'Information pages', 'Information pages', 1, 1, '');

Link to comment
Share on other sites

Hi Jim,

 

thanks for the quick reply. Yes that's the reason of the error, but know I got the error in de admin page of the info manager :

Fatal error: Call to undefined function tep_draw_textarea_ckeditor() in..................admin\information_form.php on line 120

l download all the CKE version but nothing;

Why making it so COMPLICATED?

Make an ADDON called it X make a second one with another addon and call it 78.

 

The OSCommerce shop is OK, lot of addons too, but.......................

 

It's time for rules, because lot of people loosing time with problemdons ipo addons

 

thx anyway

Link to comment
Share on other sites

  • 7 months later...

installing package ipuv2.05_for_osc2.3.1_1 27 May 2011 on a clean 2.3.3.4... everything went perfect. Thank you to those that wrote and updated this,

In the instructions everything is accurate, except step 6.D (column left stuff) and I assume can be ignored and should be deleted from instructions for 2.3 installs.

This time I'm being strict as possible about solving E_NOTICES as I build this new site. /includes/functions/information.php was throwing 3 notices. If someone smarter than me could confirm these two line changes are appropriate, I hope it helps others.

 

Line 52

  if ((isset($_GET['info_id'])) && ($child_information[$i]['child_info_id'] == $_GET['info_id'])) {

TO

  if ((isset($_GET['info_id'])) && (isset($child_information[$i]['child_info_id']) == $_GET['info_id'])) {

 

Line 73

	  if ($child_information[$i]['parent_info_id'] == $element['key']) {

TO

	  if (isset($child_information[$i]['parent_info_id']) == $element['key']) {

-Dave

Link to comment
Share on other sites

  • 7 months later...

I've used this add-on in the past to control just the information pages. It had worked well, so I wanted to include it in a new site I'm working on. This time, I also set it up to control the Welcome Messages.

 

I'm using Burt's 234bs version of osC with Burt's SEO Header Tags - Reloaded (which has patches to make Information Pages Unlimited add-on work with SEO Header Tags - Reloaded add-on). I had to do a bit of editing to catalog\includes\modules\boxes\bm_information.php in order to 1) get it to work, and 2) allow the information boxes to be put in the Footer (which both 2334bs and 234bs can do).

 

Once I had everything working, I wanted to see if I could turn certain Welcome Messages on and off. In Admin | Info Manager | Welcome Messages, I see that one can not enable/disable Welcome Messages, nor delete them. Snooping, I find that all of the Welcome Messages are 'Locked' in the information_group table. When I 'unlocked' them, I can now enable/disable them in Admin (I did not try to delete any, though).

 

The Welcome Messages still displayed on the home page. So, I edited catalog/includes/functions/information.php to include a filter on the Visible record:

 

//      $information_query = tep_db_query("select information_title, information_description
//                                         from " . TABLE_INFORMATION . "
//                                         where language_id = '" . (int)$languages_id . "'
//                                         and information_group_id = '" . (int)$information_group_id . "'
//                                         and visible = 1 ");

 

This did indeed disable displaying the Welcome Message, but instead, where the message is supposed to display, for example, the Heading Title, it displays the expression  'HEADING_TITLE'. My error handler also complains that HEADING_TITLE is not defined.

 

I understand what is going on. There is no error checking to see if a particular message is disabled, and there is no default 'blank' message to use instead. I suppose that no-one saw a need to casually enable/disable the Welcome Messages. Plus, one can always go into the Admin area and just delete whatever is in the particular message. I was just seeing if they could be turned on/off without deleting / re-entering a particular message.

 

As I am typing this, it occurred to me that it might be useful to have, say, several TEXT_MAIN messages saved, and be able to switch back and forth quickly. For example, imagine having different TEXT_MAIN messages for different holidays, etc. Yes, you could just cut-and-past into the single message. I was just thinking of this as an additional enhancement ...

 

Anyway, just thinking out loud ...

 

Malcolm

Link to comment
Share on other sites

Actually most of the welcome messages never worked unless they were commented out in the language files it was always a bug

 

when I now install I modify the second extra SQL to only install the TEXT MAIN

 

Now your thought about different messages for holidays is interesting sure it could be done if

 

1: there was a TEXT MAIN/ TEXTMAIN1 / etc and inserted in database and reflected in the index.php.

 

Another thought would be,  I experimented a bit with this with Lambros but forget where the post is

 

is to make a page say Christmas and then edit it and make it a sub category of itself  that way the page is hidden  but you have ready to cut and paste.

 

or also interesting is if you take this code and insert example is page id 60 anywhere it will reflect page id 60 that you created in admin so theoretically  if you pasted that in the right place in the index.php and changed the page id according to season and the pages were hidden sub category pages 

 

just by changing the id you would have your quick seasonal changes

 

Regards

Joli

 

PS: Not really tested but should work :rolleyes: maybe haha

  <?php
$information_query = tep_db_query("SELECT information_title, information_description FROM " . TABLE_INFORMATION . " WHERE visible='1' AND information_id='60' AND language_id='" . (int)$languages_id ."'");
$information = tep_db_fetch_array($information_query);
$title = stripslashes($information['information_title']);
$page_description = stripslashes($information['information_description']);
?>
Edited by joli1811
To improve is to change; to be perfect is to change often.

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...