Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Article Manager v1.0


RobAnderson

Recommended Posts

Hello, Jack!

 

It is a great release 1.57-6. Does it support multi-lingual?

 

osc2.3.1+HeaderTagsSEO3.2.6+English_Chinese

 

When input article through admin interface for different languages seems fine for all fields, until click [update] NO error prompt. Only English (default tongue) is OK to view and other language fields a blank.

 

After using CMS to inject other language contents for the article to the database tables for this add-on. It views fine for both both languages.

 

crying.gif

YaNotCook !!

Link to comment
Share on other sites

Hello.

 

I am running a 2.2rca shop with

 

- header tags 3.2.6 and

- article manager 1.57.6 successfully installed.

 

I do have the same language problem as stated several times before: articles and topics are only saved in english. However authors can be created and are being displayed in all languages. Also the articles and authors Boxes are displayed in all languages.

 

I am using english and german languages. The misc category is available only in english after installing articles manager. The Problem is that I can not save articles or topics in the second language german. Althoug I have all the fields for the second language on admin side of articles manager.

 

After clicking "insert" all is gone.

 

 

I allready tried the following:

 

 

First I tried the modified articles.php file posted by artful oct 2010 in the addon download section - without any success.

 

Then I tried her sollution posted in this thread (somewhere on page 88):

 

OK the solution : Start over. (1) In mysql delete your Article manager configuration then configuration group entries (2)Be sure that you have Header Tags SEO 3.2.4 (the latest) installed - if not install it ,(3)Then install the latest Article Manager by Jack (1.57.5a) using the full sql file, (4) Before touching your new Article manager go to Header Tags and as Jack said fill in the articles.php and authors.php pages -essential!, (5) Then go to Articles Manager and fill in at least one author, (6)Now go to create a Topic, (7) Once the topic created create your articles for that topic... it works in both languages! In my opinion there was a problem with a corrupt installation, at least in mine so give it a try.

 

... again without any success.

 

 

Then I deleted the english language (in which articles manager worked and showed the article) in configuration/languages. and guess what heappend? => german language articles worked!

 

Then of course I re-added english language again (and filled tags in header tags seo) and as soon as I tried to add the english version for an article I received this message:

 

1062 - Duplicate entry 'article_info.php?articles_id=2-2' for key 1

 

insert into headertags (page_name, page_title, page_description, page_keywords, page_logo, page_logo_1, page_logo_2, page_logo_3, page_logo_4, append_default_title, append_default_description, append_default_keywords, append_default_logo, append_category, append_manufacturer, append_product, append_root, sortorder_title, sortorder_description, sortorder_keywords, sortorder_logo, sortorder_logo_1, sortorder_logo_2, sortorder_logo_3, sortorder_logo_4, sortorder_category, sortorder_manufacturer, sortorder_product, sortorder_root, sortorder_root_1, sortorder_root_2, sortorder_root_3, sortorder_root_4, language_id) values ('article_info.php?articles_id=2', '', '', '', '', '', '', '', '', '0', '0', '0', '0', '0', '0', '0', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '1', '0', '0', '0', '0', '2')

 

[TEP STOP]

 

maybe this helps identifying the problem. Can anyone help to get this contribution work with more languages?

Thank you

Tom

Link to comment
Share on other sites

For the language problem, please edit the admin/includes/modules/articles_pseudo.php file and change the four instances of $i to $a.

 

The above will allow new articles to be created for all languages. But existing articles won't have a language entry so an update to an existing article won't work. You will either need to recreate the article or edit the database and add entries for the missing languages in the articles_description table.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

For the language problem, please edit the admin/includes/modules/articles_pseudo.php file and change the four instances of $i to $a.

 

The above will allow new articles to be created for all languages. But existing articles won't have a language entry so an update to an existing article won't work. You will either need to recreate the article or edit the database and add entries for the missing languages in the articles_description table.

 

 

Thanks a lot! for this quick response. The above really solves the problem!

THX

Tom

Link to comment
Share on other sites

Now as Article Manager is up and running. I have another question, regarding the cross-sell feature.

 

What would I have to do so that Articles that are linked to a product show up on product_info.php (similar to the way linked products show up on the article_info.php?)

 

I hope I haven´t missed anything and this is not a standard feature of the contribution, at least I think I have followed all instructions very carefully.

 

Thank you

Tom

Link to comment
Share on other sites

Now as Article Manager is up and running. I have another question, regarding the cross-sell feature.

 

What would I have to do so that Articles that are linked to a product show up on product_info.php (similar to the way linked products show up on the article_info.php?)

 

I hope I haven´t missed anything and this is not a standard feature of the contribution, at least I think I have followed all instructions very carefully.

 

Thank you

Tom

 

 

Well, I am pretty sure that this part is missing in the original instructions, but everything needed is already there. Just changed the code in product_info.php just a few lines up from <!-- body_text_eof //--> (in my copy that´s around line 490)

 

 

 

    if ((USE_CACHE == 'true') && empty($SID)) {
     echo tep_cache_xsell_products(3600); //added for Xsell
  echo tep_cache_articles_pxsell(3600); // added for articles manager linked articles 
     echo tep_cache_also_purchased(3600);
   } else {
     include(DIR_WS_MODULES . FILENAME_XSELL_PRODUCTS); //added for Xsell
  include(DIR_WS_MODULES . FILENAME_ARTICLES_PXSELL); // added for articles manager linked articles
     include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS);

 

 

So theres one box with linked products on product_info.php and one just under that with linked articles.

Link to comment
Share on other sites

just in case you plan to updated your instructions:

 

in catalog/includes/filenames the define for article_blog.php is missing.

 

Thanks for this great contribution.

rgds

Tom

Thank you for mentioning it. I'll change the instructions.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Hello.

 

I am using Article Manager 1.57.6 together with fck editor and have problems with the picture upload.

 

1. I got several failure messages until I scaled down my test picture, just trying one size after the other. Finaly it worked (At least I did not get the "picture not uploaded message", although I don´t really know why. Can anyone tell me where I can set upload file sizes? If I can at all.

 

2. Whenever I try to submit an article from catalog side I get the "Congratulations! Your article has been successfully submitted." message. The Article - Text - is also there on admin side to edit and check. However any submitted picture is missing.

 

Yes, I have the images/article_manager_uploads Folder in Place with public rights

Yes, this takes place with the standard stock article_supmit.php

 

Can Anyone give some advice where to look at to solve this?

 

 

3. Once it works in general, I´d like to change the uploads directory to catalog/userfiles (as I am using this directory together with the products pictures and fck editor. I already tried to change the article_submit.php in those two instances where it says "//Save the uploaded the file to another location" from 'article_manager_uploads/' to '/catalog/userfiles/article_manager_uploads/'. Obviously this didn´t work.

 

Can anyone advise where to correctly place the upload path?

 

Thank you

Tom.

Link to comment
Share on other sites

1. I got several failure messages until I scaled down my test picture, just trying one size after the other. Finaly it worked (At least I did not get the "picture not uploaded message", although I don´t really know why. Can anyone tell me where I can set upload file sizes? If I can at all.

 

Can anyone advise where to correctly place the upload path?

The size limit is a server setting. You will need to ask your host to change it.

 

The images directory is hard-coded. You will have to search and replace in several of the files t ochange that.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

The size limit is a server setting. You will need to ask your host to change it.

 

The images directory is hard-coded. You will have to search and replace in several of the files t ochange that.

 

ok. Thx, maybe I was not clear enough: my problem is, that after changing the size of my test image only the failure message switched to a success message. The image still had not been uploaded. I can´t find it on the server although the message "Congratulations! Your article has been successfully submitted." was displayed. The Article Text is there - not the image. That´s why I pointed out that upload directoy is there and has acces rights. I know sounds weird, but any ideas where to look at?

Thx.

Tom

 

 

To make it more clear:

 

I can upload images using the 3 picture upload lines on admin side. I (or a user of the site) CAN NOT upload a picture together with a submitted article from catalog (Front End) . This picture (uploaded from catalog side gets lost although the message says "article submitted"

Edited by Tom172
Link to comment
Share on other sites

Me again ;)

 

The size limit is a server setting. You will need to ask your host to change it.

 

The following lines 275-278 in catalog/article-submit.php looks to be responsible, right?

 

<tr>
                 <th class="textSmall" align="left"><?php echo TEXT_ARTICLE_UPLOAD_IMAGE; ?></th>
	         <td class="textSmall"><input type="hidden" name="MAX_FILE_SIZE" value="100000"><input name="uploadedfile" type="file"></td> 
                 </tr>

 

I have no deeper knowledge of php coding, but the phrases "file size" and value=100000 look suspecious ;)

Link to comment
Share on other sites

Me again ;)

 

 

 

The following lines 275-278 in catalog/article-submit.php looks to be responsible, right?

 

<tr>
                 <th class="textSmall" align="left"><?php echo TEXT_ARTICLE_UPLOAD_IMAGE; ?></th>
	         <td class="textSmall"><input type="hidden" name="MAX_FILE_SIZE" value="100000"><input name="uploadedfile" type="file"></td> 
                 </tr>

 

I have no deeper knowledge of php coding, but the phrases "file size" and value=100000 look suspecious ;)

I had forgotten about that size being in there and you can change it if you want.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

I had forgotten about that size being in there and you can change it if you want.

 

Yes, I tried this and the results are a bit strange:

 

It does now upload any picture that fits the new size => I find it on the server in /article_manager_uploads/. However the failure message

Image failed to upload.
comes up and the whole article is not beeing submitted. Thats all very strange. There must be a another problem somewhere. I contacted my host and there should be no limitations to file sizes.

 

 

2. I also had a look into the "update" posted by faaliyet in January 2011 in the download section.

 

For catalog/article_submit.php it says:

 

6. Open the file catalog/article-submit.php

 

6.1)

 

###Find:

 

$imageDir = DIR_WS_ARTICLES_IMAGES . $imgName; //Save the uploaded the file to another location

 

###Replace with:

 

$imageDir = DIR_WS_ARTICLES_IMAGES . $imgName; //Save the uploaded the file to another location

 

6.2)

 

###Find:

 

$imageDir = DIR_WS_AUTHORS_AVATARS . $imgAuthor; //Save the uploaded the file to another location

 

###Replace with:

 

$imageDir = DIR_WS_AUTHORS_AVATARS . $imgAuthor; //Save the uploaded the file to another location

 

with or without using winmerge I don´t see any sense in all this.

Edited by Tom172
Link to comment
Share on other sites

It does now upload any picture that fits the new size => I find it on the server in /article_manager_uploads/. However the failure message comes up and the whole article is not beeing submitted. Thats all very strange. There must be a another problem somewhere. I contacted my host and there should be no limitations to file sizes.

I tested it here and it works fine and other sites I know are using it without any problems so I can only guess it has something to do with your installation and/or version of php and/or server settings. The code in the shop side is pretty much identical to that in the admin side, as far as uploading images are concerned and since you said the admin side is working, it would seem there is a mistake on the shop side, though I don't know what it might be. There are completed files in the package though so I suggest you use those to see if the problem goes away. If it does, then tracing it down should be fairly straightforward.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

The code in the shop side is pretty much identical to that in the admin side, as far as uploading images are concerned and since you said the admin side is working, it would seem there is a mistake on the shop side, though I don't know what it might be. There are completed files in the package though so I suggest you use those to see if the problem goes away. If it does, then tracing it down should be fairly straightforward.

 

That´s what I tried (stock files) and that´s why I was so confused about the strange beahviour. However, I don´t want to be a pain in your neck and as all the rest works just as I need it to work I can easily live with this and just use another CMS System to upload articles with pictures from Frontend users.

Thanks for this great Addon. :D

Tom

Link to comment
Share on other sites

  • 2 weeks later...

A new version has been uploaded with these changes:

 

- Added image type checking to the articles submit page.

- Changed install instructions for 2.3.

- Corrected mistake in install instructions and product_info files where the article cross sale code was missing.

- Corrected various mistakes in the install instructions and files as pointed out my member JohnAtYM.

- Fixed the blog status switching code in admin so the blog status stays set when changed.

- Fixed product in admin Topics where the topic sort order was not displaying correctly.

- Fixed code that prevented languages from working with articles.

- Fixed problem with All Blog Articles link not showing only blog articles.

- Removed MyISAM type declaration from the database tables.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Hello Jack_mcs I tryed to install on 2.3.1 oscommerce ArticlesManager_1.57_6 already succesfully installed Header Tags SEO V 3.2.6 made changes written in updates.php of downlaoded updates_1_2_3_4_5 used in myphpadmin query article_manager_V_1.57.sql in file ArticlesManager_1.57_6 used oscommerce_2.3 at first with WinMerge I inserted from New files directory to my site Catalog and then inserted in catalog folder files to my site on localhost then in Admin installed modules articles and authors and when i opened site in browser such errors appeared:

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 261904 bytes) in Z:\home\localhost\www\catalog\includes\functions\database.php on line 78

the database I changed from MyIsAm to InnoDB as was written in updates.php

my site table authors is:

 

authors_id int(11) No None auto_increment

customers_id int(11) Yes NULL

authors_name varchar(32) cp1251_general_ci No

authors_image varchar(64) cp1251_general_ci Yes NULL

date_added datetime Yes NULL

last_modified datetime Yes NULL

 

my site table article blog is :

 

unique_id int(11) No None auto_increment

articles_id int(11) No 0

customers_id int(11) No 0

commenters_name varchar(54) cp1251_general_ci Yes NULL

comment_date_added datetime No 0000-00-00 00:00:00

comments_status tinyint(1) No 0

comment text cp1251_general_ci Yes NULL

language_id int(11) No 1

 

 

can you help me please? i tryed a lot of times i cant find error

Link to comment
Share on other sites

Hello Jack_mcs I tryed to install on 2.3.1 oscommerce ArticlesManager_1.57_6 already succesfully installed Header Tags SEO V 3.2.6 made changes written in updates.php of downlaoded updates_1_2_3_4_5 used in myphpadmin query article_manager_V_1.57.sql in file ArticlesManager_1.57_6 used oscommerce_2.3 at first with WinMerge I inserted from New files directory to my site Catalog and then inserted in catalog folder files to my site on localhost then in Admin installed modules articles and authors and when i opened site in browser such errors appeared:

I'm sorry but I can't follow the above. What is updates_1_2_3_4_5?

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

updates_1_2_3_4_5 it is this file http://addons.oscommerce.com/info/1709

That's not one of my uploads so I don't support it. You need to use the latest update of mine, which is 1.57_7 and appears to not have been enabled yet.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

can you send 1.57_7 on my mail [email protected] please? because i almost 3 weeks cant solve problem i need it

No, I don't want to open that can of worms. You can contact a team member and ask them to approve it.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Dear Jack,

 

As for test 1.57_6 installed on top of stock OSC 2.3.1. with Header Tags SEO V 3.2.6. The addon appears in admin, it's possible to define authors and configure it. Trying to enter topics/articles however returns the error:

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 24625 bytes) in /home/ur139661/public_html/jackmcs/admin/includes/functions/articles.php on line 53

 

As alexnut mentioned I've changed the database engine from MyISAM to InnoDB, but it doesn't fix it. And it's not a fault of any modification of your code as I've used DOT files for both contributions. Any ideas?

 

Regards

Szymon

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...