Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

RobAnderson

Article Manager v1.0

Recommended Posts

Hello all,

 

I imagine this one should be an easy one for the sql+php pros out there...but that's not me so...lol

 

Anyway - on displaying an article, I get this Xsell error down at the bottom of the page. Any ideas?

 

1064 - You have an error in your SQL syntax near 'Maximum number of products to display in the articles Cross-Sell listing.' at line 1

 

select distinct a.products_id, a.products_image, ad.products_name from articles_xsell ax, products a, products_description ad where ax.articles_id = '1' and ax.xsell_id = a.products_id and a.products_id = ad.products_id and ad.language_id = '1' and a.products_status = '1' order by ax.sort_order asc limit Maximum number of products to display in the articles Cross-Sell listing.

 

[TEP STOP]

 

That part ", ad where " looks suspicious to me, as I can't think of what the ad is but then again I maybe totally wrong. Please someone let me know.

Share this post


Link to post
Share on other sites

Ok, well, last week I decided to tackle the project of writing a search function for this articles contribution.

 

If someone has already done this and I just don't know it...please someone tell me so I can quit fussing with it.

 

Otherwise, I could really use some help :D

 

I have alreayd written a post in the development forum with my problem, including code, it is at this url: http://forums.oscommerce.com/index.php?showtopic=107904

 

Basically, I have the search written, and it counts the number of results correctly, but I cannot get the results to show up.

 

The search is located at http://altdr.com and is the box titled "Search the Knowledge Base". A search for "Aloe" should bring up 12 results.

 

can anyone help please? I know this is a contribution quite a few of us could use.

Share this post


Link to post
Share on other sites
Guest

Hi folks.. I have a funny problem with this contribution. Everything seems to be working fine, the problem is in the articles.php file. Every time I want to show all articles, the page only shows:

 

HEADING_TITLE

 

TEXT_CURRENT_ARTICLES

 

TEXT_ALL_ARTICLES

 

TEXT_TOPIC

 

TEXT_DATE_ADDED

 

Instead of the title itself, the text topic, etc... I mean, it's like there was no language file defined, but it is... I have double checked this before posting. The best proof is that articles_new.php is working fine, it shows both english and spanish text.

 

Any idea? The only weird thing I saw is that the code line:

 

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_ARTICLES);

 

Was not at the top of the admin.php file, I already moved it, but problem remains.

 

Oh, also... it would be nice if you could see on the admin and on the article itself on catalog (with an admin config, maybe), the visits that each article has, showing the "article_views" data from the database... I guess this is easy to do, haven't tried it yet.

 

Please help me with the "define" problem, thanks!!!

Share this post


Link to post
Share on other sites
Guest

Got it!

 

This is only a problem with the spanish translation... a word from the code is translated.

 

Change line 35 of the language file for articles.php:

 

From:

} elseif ($topic_depth == 'arriba') {

 

To:

} elseif ($topic_depth == 'top') {

 

 

Oh, and don't move the:

 

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_ARTICLES);

 

code line, this one must be below the declaration of the topic depths in articles.php file.

 

Oh, also... line 40 of the language articles.php file must be:

 

define('TEXT_NO_ARTICLES', 'No hay noticias disponibles.');

 

There's an extra "T" at the beginning of the translation...

:rolleyes:

 

I hope this helps all folks using spahisn translation of the contrib.

 

Oh, I almost forgot, how about the article views modification? Someone has any code already done for this?

Share this post


Link to post
Share on other sites

Hi folks,

It's me again.

 

I really hope you have some luck with that articles search feature. Do let us know when u get it working, as I think we would all love to have it - especially for those of us who are really using the articles for articles, if you know what I mean.

 

Also, if someone could look into that sql error I am having that I posted just previously, I surely would appreciate it. It's regarding the cross sell feature. Having difficulty with it.

Sure, I could just put descriptive links in the article itself, but I think the cross-selling box, etc. is much better (actually I'd probably want to do both).

Share this post


Link to post
Share on other sites

Hi everyone,

 

I have installed the Article Manager, but I have a problem.

 

I have the Coolmenu installed, and when I go to the articles or to the categories (for articles Box), the page show corectly, but the Coolmenu is not there anymore, only an empty Categories (for products), Any solution?

 

Second: The Articles Box in my store front page, show 3 things: Last articles; All articles; and the category I have add, but do not show any article title, is this a problem, it is possible to show the article's titles???

 

Thanks in advance for your help

Share this post


Link to post
Share on other sites

As I said before, I am trying to write a search function for the articles. I have changed it quite a bit from before and think I am pretty close.

 

I have having trouble with this query:

 

  $search_result_query = tep_db_query("select articles_name, articles_id from " . TABLE_ARTICLES_DESCRIPTION . " where articles_name like '%" . tep_db_input($keyword) . "%' or articles_description like '%" . tep_db_input($keyword) . "%'");

 

I am getting this error:

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/jalterna/public_html/catalog/includes/functions/database.php on line 99

 

Can anyone see what's wrong with it?

Share this post


Link to post
Share on other sites

Ok Everyone! I have uploaded the article search function - Please Enjoy!

 

This contribution will add a search box that will allow you to search

articles using Article Manager v 1.2. Article Results will give the

Article Title with a link to the article and a 300 character

truncation of the article. Sorry, I did not write an advanced search

to go with this.

 

Contribution Located at: http://www.oscommerce.com/community/contributions,2393

Share this post


Link to post
Share on other sites
Guest

Hi aldaffodil,

 

I think I may be the first person to try out your great contribution. :)

 

 

 

If anyone wants to see it in action, go here

 

 

(Bear in mind that I've configured it just to only show ARTICLE TITLES in the Article Search Results page. The original contrib also displays a truncated part of the article text in the results.)

Edited by mikeyj

Share this post


Link to post
Share on other sites
Guest

Hi Rob

its a nice contribution an it works good.

But my problem is " where can user write a article?"

Only i can write an article in the admininterface. Its there no userinterface to login an write an article.

This is important.

Sorry for my bad english

Share this post


Link to post
Share on other sites
Guest

Only store admins can write articles.

 

 

It's a shame that users can't write articles.....that would make a great addition to the contrib.

Share this post


Link to post
Share on other sites
Hi Rob

its a nice contribution an it works good.

But my problem is " where can user write a article?"

Only i can write an article in the admininterface. Its there no userinterface to login an write an article.

This is important.

my guess is that you want a separate content management system then - try http://www.mamboserver.com/.

Share this post


Link to post
Share on other sites
Guest
Hi Rob

its a nice contribution an it works good.

But my problem is " where can user write a article?"

Only i can write an article in the admininterface. Its there no userinterface to login an write an article.

This is important.

my guess is that you want a separate content management system then - try http://www.mamboserver.com/.

I am testing Mambo a lot of time but it works not with OScommerce.

A symbiose of oscommerce and mambo is fine but the aktually contribs of mambo with os are shit. Sorry.

To many bugs.

Share this post


Link to post
Share on other sites

Hi all

 

it works very well with the new additions: THANKS to the contributor

 

I have modified the search box a little. if someone is interested its here:

 

Line 37 change it to the 1 below:

 

'text' => $hide . $param . '<input type="text" name="akeywords" size="15" maxlength="30" value="' . htmlspecialchars(StripSlashes(@$HTTP_GET_VARS["akeywords"])) . '"> ' . '<input type="submit" class="search" value="Go">'. tep_draw_hidden_field('description', '1'));

 

I Have taken off the search image and also added the fact the the search into the text is in the search field... (code taken from a code for the products search) I didn't do it..

 

PS: It would be nice to have a up to 10 articles in the first page (PAGE BREAK) LIKE: Displaying 1 to 10 (of 37 articles) etc

Edited by Salvo

Share this post


Link to post
Share on other sites

I have just installed the Contribution. But I get some kind of error with the infobox:

 

1146 - Table 'moob_dk.TABLE_AUTHORS' doesn't exist

 

select authors_id, authors_name from TABLE_AUTHORS order by authors_name

 

[TEP STOP]

 

 

What have I done wrong or missed?

Share this post


Link to post
Share on other sites

I installed AM smoothly, however when i use them, i cant find out how to display upcoming articles! where will them be placed? please help me, thx

Share this post


Link to post
Share on other sites

Just installed this great contribution, wary nice, there is though some small things I would like to add and correct, but do not know how to do just that, I hope some one here can help me:

 

1. I would like to insert a small image before the text, example an small image before "New Articles" (and of course the rest topics), just like I have on my information box. But the codes of the Article box is wary difference then what I am used to, and don't know how to insert an image in that code. Is there some one here there are willing to help with that?

 

2. A simple thing, how to put the New Articles, and All Articles link at the bottom of the box? or maybe just put an space between the ?Alle Articles? and the Tipics I have created.

 

3. in the Admin under Article Manager/Configuration. Everything is doubled, two of Display New Articles Link, Number of Days Display New Articles, and so on, maybe I have inserted the same code twice, but I do not think so. But where is it most likely this error is to be found?

Share this post


Link to post
Share on other sites

Thw 2 major features I'd like to see the Article Manager grow is;

 

1. ability to put set number on home page. If you use this as easy way for webmaster to add news/content/etc then having it appear on the home page would be a huge benefit.

 

2. ability for pre-approved users to post/add content.

Share this post


Link to post
Share on other sites

I'm having an issue with a SQL query error that I cannot find.

It only comes up when you choose a topic or an author (author_id or tpath) ..

 

1109 - Unknown table 'p' in field list

select count(p.articles_id) as total from articles a, articles_description ad left join authors au on a.authors_id = au.authors_id, articles_to_topics a2t left join topics_description td on a2t.topics_id = td.topics_id where (a.articles_date_available IS NULL or to_days(a.articles_date_available) <= to_days(now())) and a.articles_status = '1' and au.authors_id = '1' and a.articles_id = a2t.articles_id and ad.articles_id = a2t.articles_id and ad.language_id = '1' and td.language_id = '1'

[TEP STOP]

 

I just cannot find where this is being built. Obviously the p needs to be changed.. but where is it???

Share this post


Link to post
Share on other sites

Hi,

 

I just installed Article Manager, but get this error when I click in Admin on "Topics/Articles":

 

Fatal error: Call to undefined function: tep_get_topic_tree() in /home/xxxxxx/public_html/store/admin/articles.php on line 963

 

Everything else seems to be ok.

As the error comes from a file out of the installation-zip, I don't think it has anything to do with something I did wrong (I hope). Anybody any idea what could be wrong?

 

Also, is it possible to replace OSC's standard Product/Category function with this Article/Topics mod or is it more for someone that sells articles, lectures and books rather than physical goods?

 

Any help is truly appreciated!

Thanks

C?cile

Share this post


Link to post
Share on other sites

Ok, I figured it out. It was a tiny installation mistake. But because of the way the installation file is worded, it can be easily overlooked and other people may run into the same problem:

 

Installation readme.txt:

In admin/includes/application_top.php add the following (at the very end before the last ?>)

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

// Article Manager
 if (isset($HTTP_GET_VARS['tPath'])) {...

 

I think it should rather be:

In admin/includes/application_top.php add the following (at the very end before the last ?>)

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

 if (isset($HTTP_GET_VARS['tPath'])) {...

 

Otherwise this part can be overlooked very easily (this is what happened to me):

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

 

 

Another tiny mistake in the readme file:

In includes/languages/english/english.php add the following

 

Should be:

In includes/languages/english.php add the following

 

 

I have just posted the German language files in the Contribs.

Thanks for the excellent mod.

Share this post


Link to post
Share on other sites

Hi all!

 

First of all, thanks to all involved in a great contrib. But....

 

...Help!!

 

I'm getting the old "clean_html_comments" fault;

 

1. Click on a main topic, I get:

Fatal error: Call to undefined function: clean_html_comments() in /home/xmkzpjcn/public_html/includes/article_header_tags.php on line 134

2. Click on a main topic with articles in it, I get text for the topic, the article name, no formatting, styling, etc., and at the bottom of it all:

Fatal error: Call to undefined function: clean_html_comments() in /home/xmkzpjcn/public_html/includes/modules/article_listing.php on line 66

3. Clicking on an article itself gives me:

Fatal error: Call to undefined function: clean_html_comments() in /home/xmkzpjcn/public_html/includes/article_header_tags.php on line 104

 

Now, I've had Article Manager v1.2 working perfectly before. I've since installed STS v2.01. I do not have HTC installed.

 

I've looked through this thread trying to find answers but the closest there is deals with installations with HTC. I've tried those solutions and it hasn't worked.

 

If anyone can help, I'd be very thankful.

 

Thanks,

 

Schneckster

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

×