Jump to content
RobAnderson

Article Manager v1.0

Recommended Posts

My article.php is showing this error:

 

Fatal error: Call to a member function on a non-object in articles.php on line 146

 

The line is:

<span class="pageHeading"></span><span class="main"><span class="smallText"></span>

146 ->>> <?php echo $articles_all_split->display_count(TEXT_DISPLAY_NUMBER_OF_ARTICLES); ?></span>

<span class="main"><?php echo sprintf(TEXT_MORE_INFORMATION, $authors_url); ?></span>

 

Can anyone give a hint?

Thanks

Share this post


Link to post
Share on other sites

For some reason, this line is commented out in the code

  //$articles_all_split = new splitPageResults($articles_all_query_raw, MAX_ARTICLES_PER_PAGE);

Try changing it to

  $articles_all_split = new splitPageResults($articles_all_query_raw, MAX_ARTICLES_PER_PAGE);

It was commented out in an earlier version so there may have been a reason for it but it is, most likely, the reason for the error.

 

Jack

Share this post


Link to post
Share on other sites

Jack-

 

Thanks for setting me in the right direction. I found an error I made when commenting out code during the install. It works! It's great!

 

Jeff

Share this post


Link to post
Share on other sites
For some reason, this line is commented out in the code
  //$articles_all_split = new splitPageResults($articles_all_query_raw, MAX_ARTICLES_PER_PAGE);

Try changing it to

  $articles_all_split = new splitPageResults($articles_all_query_raw, MAX_ARTICLES_PER_PAGE);

It was commented out in an earlier version so there may have been a reason for it but it is, most likely, the reason for the error.

 

Jack

Thanks!

That helped!

 

Any idea where can I cahnge the font color for the article_info?

Share this post


Link to post
Share on other sites
Thanks!

That helped!

 

Any idea where can I cahnge the font color for the article_info?

The code uses the standard oscommerce classes, like pageheading, main and smallText, which are in stylesheet.css..

 

Jack

Share this post


Link to post
Share on other sites

I have a requirement to provide an expire date for each article, similure to the expiry date of a special product. Has anyone done this? And if so, would you share the code?

 

Thanks!

Share this post


Link to post
Share on other sites
Does anyone else have this problem? I catalog/articles.php I played with the "require(DIR_WS_INCLUDES . 'column_left.php');" and other "reqires" and it seems that the problem is in placement of the table that displays articles.

Since I am a newbbie afterall I can not find the solution. I tried for two days to position the table in diferent columns and header and I do see changes. I can put it anywhere but not to the very center of the page...

 

In articles.php and articles_new.php, I replaced

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html <?php echo HTML_PARAMS; ?>>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">

 

with

 

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">

<html <?php echo HTML_PARAMS; ?>>

<head>

Share this post


Link to post
Share on other sites
In the edit articles section there is a place at the bottom to specify the url for the article. When displayed on the site, the code generates a page for the article then there is another link to the full article (see what I mean here: http://enpointeshoes.com/pointe-shoes-a-2.html)

the link says "For more information, please visit this articles web page." and it is supposed to redirect to the permalink url I specified in the edit articles section (its like the last option in edit articles.) You can see when you mouse over the link to the web page it is trying to work but just gives up and redirects to the home page.

 

Ideally, I would like the articles to live only within the category structure I develop for the entire site and not use rewrites/redirects at all. I would prefer 'silo'-ing product pages and related information pages under one folder - like 'red-pointe-shoes/product-name-1.php' and 'red-pointe-shoes/types-of-red-pointe-shoes-article.php' Is there a better contribution for this purpose or maybe a way I can set it up to work like that?

Thanks

Molly

 

 

In redirect.php look for

 

case 'url':

if (isset($HTTP_GET_VARS['goto']) && tep_not_null($HTTP_GET_VARS['goto'])) {

$check_query = tep_db_query("select products_url from " . TABLE_PRODUCTS_DESCRIPTION . " where products_url = '" . tep_db_input($HTTP_GET_VARS['goto']) . "' limit 1");

if (tep_db_num_rows($check_query)) {

tep_redirect('http://' . $HTTP_GET_VARS['goto']);

}

}

break;

 

Add after

 

// BO fix redirect Article Manager

case 'arturl':

if (isset($HTTP_GET_VARS['goto']) && tep_not_null($HTTP_GET_VARS['goto'])) {

$check_query = tep_db_query("select articles_url from " . TABLE_ARTICLES_DESCRIPTION . " where articles_url = '" . tep_db_input($HTTP_GET_VARS['goto']) . "' limit 1");

if (tep_db_num_rows($check_query)) {

tep_redirect('http://' . $HTTP_GET_VARS['goto']);

}

}

break;

// EO fix redirect Article Manager

Share this post


Link to post
Share on other sites

for anyone who wants to use the Latest Version 1.5.7.1 without the header tags contribution do this:

 

add to your catalog/includes/database_tables.php and admin/includes/database_tables.php at the end before ?>

 

/*** Begin Header Tags SEO ***/
 define('TABLE_HEADERTAGS', 'headertags');
 define('TABLE_HEADERTAGS_DEFAULT', 'headertags_default');
 /*** End Header Tags SEO ***/

 

now copy the file

clean_html_comments.php from package dated 03.oct.2008 (the italian one) and drop it into catalog/includes

 

i also found here someone who did this to his article_info.php file

find this

if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) {
 require(DIR_WS_INCLUDES . 'header_tags.php');

 

replace it with

 

if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) {
;// require(DIR_WS_INCLUDES . 'header_tags.php');

 

in application top.php after you add

 

// include the articles functions
 require(DIR_WS_FUNCTIONS . 'articles.php');

// calculate topic path
 if (isset($HTTP_GET_VARS['tPath'])) {
$tPath = $HTTP_GET_VARS['tPath'];
 } elseif (isset($HTTP_GET_VARS['articles_id']) && !isset($HTTP_GET_VARS['authors_id'])) {
$tPath = tep_get_article_path($HTTP_GET_VARS['articles_id']);
 } else {
$tPath = '';
 }

 if (tep_not_null($tPath)) {
$tPath_array = tep_parse_topic_path($tPath);
$tPath = implode('_', $tPath_array);
$current_topic_id = $tPath_array[(sizeof($tPath_array)-1)];
 } else {
$current_topic_id = 0;
 }

 if (isset($_GET['articles_id'])) {
$articlesPage = FILENAME_ARTICLE_INFO . "?articles_id=" . $_GET['articles_id'];
$pageTags_query = tep_db_query("select page_name, page_title from " . TABLE_HEADERTAGS . " where page_name like '" . $articlesPage . "' and language_id = '" . (int)$languages_id . "' LIMIT 1");
if (tep_db_num_rows($pageTags_query) == 1) {
  $pageTags = tep_db_fetch_array($pageTags_query);
  $breadcrumb->add('Articles', tep_href_link(FILENAME_ARTICLES));
  $breadcrumb->add($pageTags['page_title'], tep_href_link($articlesPage));
}  
 }

 

add also

 

// add only if Header Tags not already installed
 require(DIR_WS_FUNCTIONS . 'clean_html_comments.php');

 

it all worked for me..i'm not a php guy so if it doesn't work for you i'm sorry

you're all set an done

this is for RC2.2a

Edited by natashome

Share this post


Link to post
Share on other sites

I am having some trouble installing this contrib. The admin side is working perfectly, but the catalog side is not. I think the answers to these two questions will help me.....

 

1. Are the steps regarding "tell a friend" adjustments needed?

2. I do not have Header Tags SEO installed and do not know where the coding in the application_top should be placed.

 

Any help would be greatly appreciated.

 

Thanks.


Nancy

Share this post


Link to post
Share on other sites
I am having some trouble installing this contrib. The admin side is working perfectly, but the catalog side is not. I think the answers to these two questions will help me.....

 

1. Are the steps regarding "tell a friend" adjustments needed?

2. I do not have Header Tags SEO installed and do not know where the coding in the application_top should be placed.

 

Any help would be greatly appreciated.

 

Thanks.

1 - No.

2 - If you don't have Header Tags SEO installed, don't use version 1.5.7.x. The other versions have the instructions for installing it the old way.

 

Jack

Share this post


Link to post
Share on other sites

i have 2 shops on 2 domains sharing the same database...1 german 1 english

the thing is that on the german side the articles just don't show up..although the language files were updated as well..i can see them in the admin of both sites but not on the german front

Share this post


Link to post
Share on other sites

the articles don't show either if i choose another language from the drop-down menu..although i entered the text and article for that language too...is this working only for the english language?

if i put the whole url of the article it shows..but why not when i click the article.php link?

Edited by natashome

Share this post


Link to post
Share on other sites

I realize that, however I am having a hard time finding the issue. I thought someone here might be able to spot the trouble-causing code.


Nancy

Share this post


Link to post
Share on other sites

Hello to everybody!!!

I really like this contrib but I'm having some problems. What should I do to suscript the rss in a reader? When I try to suscript the "mydomain/catalog/article_rss.php in google reader I get:

 

"Your search did not match any feeds."

 

 

What can I do? Please help.

Share this post


Link to post
Share on other sites
I have a requirement to provide an expire date for each article, similure to the expiry date of a special product. Has anyone done this? And if so, would you share the code?

 

Thanks!

 

Hi All,

 

I am still looking on how to do this correctly. Has anyone done this berfore?

 

Thanks!

Share this post


Link to post
Share on other sites
My article.php is showing this error:

 

Fatal error: Call to a member function on a non-object in articles.php on line 146

 

The line is:

<span class="pageHeading"></span><span class="main"><span class="smallText"></span>

146 ->>> <?php echo $articles_all_split->display_count(TEXT_DISPLAY_NUMBER_OF_ARTICLES); ?></span>

<span class="main"><?php echo sprintf(TEXT_MORE_INFORMATION, $authors_url); ?></span>

 

Can anyone give a hint?

Thanks

 

I'm having the same problem, it is not with something they did "messing" up the code, it is a problem with the admin xsell page included in the latest install. Can anyone suggest a fix?


Most Valuable OsCommerce Contributions:

Also Purchased (AP) Preselection (cuts this resource hogging query down to nothing) -- Contribution 3294

FedEx Automated Labels -- Contribution 2244

RMA Returns system -- Contribution 1136

Sort Products By Dropdown -- Contribution 4312

Ultimate SEO URLs -- Contribution 2823

Credit Class & Gift Voucher -- Contribution 282

Cross-Sell -- Contribution 5347

Share this post


Link to post
Share on other sites

Capital letters in an error, like TEXT_DISPLAY_NUMBER_OF_ARTICLES, mean the contribution was not installed correctly.

 

Jack

Share this post


Link to post
Share on other sites
Capital letters in an error, like TEXT_DISPLAY_NUMBER_OF_ARTICLES, mean the contribution was not installed correctly.

 

Jack

 

 

Found it! The problem is caused by whomever originally coded the script used <? instead of <?php in line 141 in admin/articles_xsell.php

 

You must be using an older version that is compatible with the improper <? tag and my newest version of PHP 5 is not which is why you cannot see it on your end Jack. To fix simply change <? on line 141 to <?php


Most Valuable OsCommerce Contributions:

Also Purchased (AP) Preselection (cuts this resource hogging query down to nothing) -- Contribution 3294

FedEx Automated Labels -- Contribution 2244

RMA Returns system -- Contribution 1136

Sort Products By Dropdown -- Contribution 4312

Ultimate SEO URLs -- Contribution 2823

Credit Class & Gift Voucher -- Contribution 282

Cross-Sell -- Contribution 5347

Share this post


Link to post
Share on other sites
Be sure to remove the header tags code in includes/application_top.php that includes the header tags functions and clean_html lines.

 

Jack

Jack,

 

I'm hitting the same problem - have removed

 

// BOF: Header Tags Controller v2.6.3
 require(DIR_WS_FUNCTIONS . 'header_tags.php');
// Clean out HTML comments from ALT tags etc.
 require(DIR_WS_FUNCTIONS . 'clean_html_comments.php');
// EOF: Added: Header Tags Controller v2.6.3

 

but my site still fails to load with:

 

Fatal error: Cannot redeclare clean_html_comments() (previously declared in /home/nicholas/public_html/catalog/includes/functions/clean_html_comments.php:11) in /home/nicholas/public_html/catalog/includes/functions/clean_html_comments.php on line 11

 

I have STS installed.

Share this post


Link to post
Share on other sites
Jack,

 

I'm hitting the same problem - have removed

 

// BOF: Header Tags Controller v2.6.3
 require(DIR_WS_FUNCTIONS . 'header_tags.php');
// Clean out HTML comments from ALT tags etc.
 require(DIR_WS_FUNCTIONS . 'clean_html_comments.php');
// EOF: Added: Header Tags Controller v2.6.3

 

but my site still fails to load with:

 

 

 

I have STS installed.

The install instructions for Header Tags and STS changed a few versions ago. You need to make sure you are using the latest version and that you have the STS settings as described. Other than that, search your files for require(DIR_WS_FUNCTIONS . 'clean_html_comments.php');. There should only be one instance of it. If you upgraded Articles Manager from a version other than 1.5.7, then there may be another instance of it somewhere.

 

Jack

Share this post


Link to post
Share on other sites
The install instructions for Header Tags and STS changed a few versions ago. You need to make sure you are using the latest version and that you have the STS settings as described. Other than that, search your files for require(DIR_WS_FUNCTIONS . 'clean_html_comments.php');. There should only be one instance of it. If you upgraded Articles Manager from a version other than 1.5.7, then there may be another instance of it somewhere.

 

Jack

 

Jack, super thanks all working again!

Share this post


Link to post
Share on other sites

I am trying to add an article that is a javascript based "calculator". When I go to hit insert, the insert button will not function. Adding any plain text or html does owrk fine...the problems seems to be in adding javascript content.

 

Is there a way around this?


Nancy

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

×