Jump to content


Corporate Sponsors


Latest News: (loading..)

* * * * - 8 votes

Article Manager v1.0


2060 replies to this topic

#61 ugottasalsa

  • Community Member
  • 730 posts
  • Real Name:Randy Newman
  • Location:Venice Beach, Ca.

Posted 11 December 2003, 10:06

Okay... I must admit I have been lurking for the last couple of days... while working on further enhancements for Article Manager, as well as the WishList module.

Yes, Rob, your are right, osCommerce is so damn flexible.

Here are the feature enhancements I have accomplished so far...

1. I have created an Main Articles Page which acts as an entry into the Articles system.
2. Main Article Page contains the following...
  • Full Main Topic / Sub-Topic listing
  • You can choose Text or Image display style for the Main Topic / Sub-Topic listing via setting in Admin
  • Most Popular Articles (how many can be set in Admin)
  • Featured Articles (settings in Admin for which Articles and how many are displayed)
  • Author Showcase displaying info about Author and his/her image
  • All above features are moduler and can be turned on and off in Admin
  • Link to list ALL Articles
  • Search Articles Box
3. Added Image field to Topics
4. Added additional fields to the Author
5. Added character limit to the Articles so it will split the pages if the Article happens to be long. This way, if the Article is long, the page won't also get long. A page link has been added to continue the next page of the Article.

We all know how difficult it is as we continue adding infoBoxes to the columns... the page just keeps getting longer and longer and longer. Having a Main Article Page eliminates the need for an additional infoBox to display the Topic and Articles. Now, a single link can be placed anywhere on your site, to direct the user to the Main Articles Page, where they can navigate from there.

To answer your question, yes, I have this all working on a Demo "Super-Store" I am working on, but the site is not completed yet and do not want to allow access until it is completely bulletproof and ready. As soon as its ready, I will post a link to the working version. I appreciate your patience and understanding.

I'm not telling everyone about this so I can tease you with it. I simply wanted to chime in and let everyone know that all of these enhancement suggestions are being worked on, and in some cases, already completed. I will be working with Rob to package all of these new enhancements into the next major release of Article Manager. Again, I appreciate your patience and understanding.

Rob, let me know when you are ready to start work on the next major release.

By the way, I like the idea about having an associated articles listing on the products page. I will add this in tonite.

-R
"Courage is not the absence of fear, but the awareness of fear and the ability to get past it."

It's difficult to diagnose an issue when the patient says, "I have this pain right here Doc, what do you think it is?"

#62 rag

  • Community Member
  • 76 posts
  • Real Name:Rob Glaesemann

Posted 12 December 2003, 12:46

Great Contribution...but I'm still not there.

I'm using MS2 and STS (Simple Template System) with Header Tags already installed.

Admin works fine
Catalog Side bars infoboxes show fine

1. If I click an author in the infobox AUTHORS I get the correct page with text but the page is not wrapped by my theme plus the following error:
Fatal error: Call to undefined function: clean_html_comments() in C:\xampp\htdocs\catalog\includes\modules\article_listing.php on line 66

2. Clicking "New Articles" I get this error:
Fatal error: Call to undefined function: clean_html_comments() in C:\xampp\htdocs\catalog\includes\article_header_tags.php on line 134

3. Clicking "All Articles" I get the same as number 1 above but with this error:
Fatal error: Call to undefined function: clean_html_comments() in C:\xampp\htdocs\catalog\articles.php on line 350

4. Clicking my 1 topics "Practice Tips" I get the same type of page as problem 1 and 3 above but with this error:
Fatal error: Call to undefined function: clean_html_comments() in C:\xampp\htdocs\catalog\includes\modules\article_listing.php on line 66


I remember a clean_html_comments() error when I had STS and header tags both trying to clean_html_comments. Does that ring a bell?

I've uploaded my site to:
http://sirius.mgs.vic.edu.au/~rag/catalog

It's a slow upload to my test server so it may take some time until it can be seen Maybe someone could try it out to see in a few hours?

Thanks,
Rob

#63 rag

  • Community Member
  • 76 posts
  • Real Name:Rob Glaesemann

Posted 12 December 2003, 14:00

GOTCHA!

If you are using STS 1.8 you and Header Tags may be be experiencing the above problem with the function clean_html_comments() . It produces a vcouple of errors like:


Fatal error: Cannot redeclare clean_html_comments() (previously declared in C:\xampp\htdocs\catalog\includes\functions\clean_html_comments.php:13) in C:\xampp\htdocs\catalog\includes\functions\clean_html_comments.php on line 13

or

Fatal error: Call to undefined function: clean_html_comments() in C:\xampp\htdocs\catalog\includes\modules\article_listing.php on line 66

Here is how I fixed it. First of all I searched the whole site for "clean_html_comments" and found it in several files but in 2 files is was actually being included like this:

Quote

require(DIR_WS_FUNCTIONS . 'clean_html_comments.php');

catalog/includes/application_top.php
catalog/includes/sts_display_output.php

in order for this contribution (article manage) to work it needs to look for the function in application_top.php

THE FIX:
open catalog/includes/sts_display_output.php
comment out:
require(DIR_WS_FUNCTIONS . 'clean_html_comments.php');

Hope I'm making sense? It's pretty late.

Cheers,
Rob
:D

#64 Salvo

  • Community Member
  • 1,005 posts
  • Real Name:Salvo
  • Gender:Male

Posted 12 December 2003, 14:09

Hi all...

I have created an addition to the articles manager.
articles tabs . from the contribution categories_tab.
to show the top topics
ied: TOPIC_1 TOPC_2 TOPIC_3 and so on...

I WILL CONTRIBUTE IT SO CAN BE ADDED TO ARTICLES MANAGER if you all like the idea.

However it would be a nice to expand it futher. such as:

TOPIC_1 TOPC_2 TOPIC_3 and so on...
Sub-Topic-1

To show the sub topic if there are any, but I am not able to added under.

Someone interest would like to take it further?

Thanks

#65 Juha

  • Community Member
  • 57 posts
  • Real Name:Juha

Posted 13 December 2003, 12:45

Rob,

continuing with my idea, I made a short bit of code:

<html>
<head>
</head>
<body>
<table>
<?php 

require('includes/application_top.php');
$lauseke=mysql_query("select topics_id, topics_name from topics_description where language_id = '1'");
while ($listaa=mysql_fetch_row($lauseke)) {
$tulos=$listaa[1];
echo "<tr><td>" . $tulos . "</td></tr>";

$klause=mysql_query("select ad.articles_id, ad.articles_name, ad.articles_head_desc_tag , a2t.topics_id from articles_description ad, articles_to_topics a2t where ad.articles_id=a2t.articles_id and a2t.topics_id='" . $listaa[0] . "' and ad.language_id='1'");
while ($artikkelit=mysql_fetch_row($klause)) {
echo "<tr><td><b>".$artikkelit[1] . "</b></td></tr>";
echo "<tr><td>".$artikkelit[2]."<br></td></tr>";
}
}
?>
</table>
</body>
</html>

This seems to do what I want to accomplish but in a very simplified way and using non-OSC code, so to speak.

I have made a few feeble attempts to integrate this into OSC but the OSC structure if a bit too complex for me. Could you guys lend a hand here, please? I am having especially hard time making correct mysql queries, I always end up with an error. Obviously there's something about the functions I don't understand.

As you said, Rob, the finished code should go in place of 'default page' but am I right in assuming that I can also remove most of the main page code before that?

#66 Salvo

  • Community Member
  • 1,005 posts
  • Real Name:Salvo
  • Gender:Male

Posted 05 January 2004, 14:45

Hi all

Has anybody expanded this beautiful contribution to have a search box for the articles?

#67 monstrico

  • Community Member
  • 13 posts
  • Real Name:Robert Wildling

Posted 11 January 2004, 22:06

Hi, I´m new to this and not too familiar with the complex php that is going on in oscommerce. So I wonder what exactely I have to when the install instruction says:

Open catalog/includes/languages/english/article_header_tags.php
IF YOU DO have the Header Tags Controller contribution installed:
- Replicate the global details from header_tags.php into the indented section at the top of the page, e.g. site e-mail address, title, keywords and description.
IF YOU DO NOT have the Header Tags Controller contribution installed:
- Complete the global details in the indented section at the top of the page, e.g. site e-mail address, title, keywords and description.

Can anybody teach me?

And - not being an English-speaker - what are "cross-sell articles"?

Thank you in advance,
Robert

#68 Paz

  • Community Member
  • 3 posts
  • Real Name:Jorg Jansen

Posted 13 January 2004, 11:18

Hi, wonderfull contribution! Just one thing: I found the code to display the latest newsitems but I can't seem to get the code working on the frontpage. I want to show the latest 5 or 10 articles entered on the frontpaga of my store, between the welcome text and the new products. Can someone please help me out (so I can finally throw away postnuke... B) )???

Thanks for this great contribution!

#69 mazza

  • Community Member
  • 222 posts
  • Real Name:Matti
  • Location:Finland

Posted 13 January 2004, 13:29

Something to get you going:

New file (new_articles.php) in modules:

<?php
  $articles_new_array = array();
  $articles_new_query_raw = "select a.articles_id, a.articles_date_added, ad.articles_name, ad.articles_head_desc_tag, au.authors_id, au.authors_name, td.topics_id, td.topics_name from " . TABLE_ARTICLES . " a, " . TABLE_ARTICLES_TO_TOPICS . " a2t left join " . TABLE_TOPICS_DESCRIPTION . " td on a2t.topics_id = td.topics_id left join " . TABLE_AUTHORS . " au on a.authors_id = au.authors_id, " . TABLE_ARTICLES_DESCRIPTION . " ad where a.articles_id = a2t.articles_id and a.articles_status = '1' and a.articles_id = ad.articles_id and ad.language_id = '" . (int)$languages_id . "' and td.language_id = '" . (int)$languages_id . "' order by a.articles_date_added desc, ad.articles_name";

  $articles_new_split = new splitPageResults($articles_new_query_raw, MAX_NEW_ARTICLES_PER_PAGE);
?>
<?php
  if ($articles_new_split->number_of_rows > 0) {
    $articles_new_query = tep_db_query($articles_new_split->sql_query);
?>
<div class="cbox" id="newa">
<h2><?php echo TEXT_NEW_ARTICLES; ?></h2>
<table class="listing">
<?php
    while ($articles_new = tep_db_fetch_array($articles_new_query)) {
?>
<tr>
<td><?php echo '<a href="' . tep_href_link(FILENAME_ARTICLE_INFO, 'name=' . tep_spider_name($articles_new['articles_name']) .'&' . 'articles_id=' . $articles_new['articles_id']) . '">' . $articles_new['articles_name']. '</a>' ?></td>
<td class="c"><?php echo '<a href="' . tep_href_link(FILENAME_ARTICLES,  . 'tPath=' . $articles_new['topics_id']) . '">' . $articles_new['topics_name'] . '</a>'; ?></td>
<td class="r"><?php echo tep_date_long($articles_new['articles_date_added']); ?></td>
</tr>
<?php
  } // End of listing loop
echo '</table></div>';   
} else {
?>
<?php
  }
?>

In index.php:

<?php require(DIR_WS_MODULES . 'new_articles.php');?>

Has some of my own html since I hate the bloat OSC generates.
"Use no way as way, have no limitation as limitation." - Bruce Lee

#70 Paz

  • Community Member
  • 3 posts
  • Real Name:Jorg Jansen

Posted 13 January 2004, 17:31

Mazza, thanks for the tip... I created the file new_articles.php and put it in includes/modules. After that I added the code in the index.php just before:

// needed for the new products module shown below
    $new_products_category_id = $current_category_id;
?>
              </tr>
            </table></td>
          </tr>

But I get the following error.

Parse error: parse error in /home/immersio/public_html/shop/index.php on line 115

Hope you can help. My knowledge about php is very very limited...

#71 Paz

  • Community Member
  • 3 posts
  • Real Name:Jorg Jansen

Posted 15 January 2004, 20:16

Does anybody have any idea how to solve my problem? (And probably someone else his problem too...)

If anyone is interested in the dutch translation files for this contrib... I've made them. Maybe Rob want to include them in his contrib?

#72 mazza

  • Community Member
  • 222 posts
  • Real Name:Matti
  • Location:Finland

Posted 16 January 2004, 16:43

Corrected new_articles.php:

<?php
 $articles_new_array = array();
 $articles_new_query_raw = "select a.articles_id, a.articles_date_added, ad.articles_name, ad.articles_head_desc_tag, au.authors_id, au.authors_name, td.topics_id, td.topics_name from " . TABLE_ARTICLES . " a, " . TABLE_ARTICLES_TO_TOPICS . " a2t left join " . TABLE_TOPICS_DESCRIPTION . " td on a2t.topics_id = td.topics_id left join " . TABLE_AUTHORS . " au on a.authors_id = au.authors_id, " . TABLE_ARTICLES_DESCRIPTION . " ad where a.articles_id = a2t.articles_id and a.articles_status = '1' and a.articles_id = ad.articles_id and ad.language_id = '" . (int)$languages_id . "' and td.language_id = '" . (int)$languages_id . "' order by a.articles_date_added desc, ad.articles_name";

 $articles_new_split = new splitPageResults($articles_new_query_raw, MAX_NEW_ARTICLES_PER_PAGE);
?>
<?php
 if ($articles_new_split->number_of_rows > 0) {
   $articles_new_query = tep_db_query($articles_new_split->sql_query);
?>
<div class="cbox" id="newa">
<h2><?php echo TEXT_NEW_ARTICLES; ?></h2>
<table class="listing">
<?php
   while ($articles_new = tep_db_fetch_array($articles_new_query)) {
?>
<tr>
<td><?php echo '<a href="' . tep_href_link(FILENAME_ARTICLE_INFO, 'articles_id=' . $articles_new['articles_id']) . '">' . $articles_new['articles_name']. '</a>' ?></td>
<td class="c"><?php echo '<a href="' . tep_href_link(FILENAME_ARTICLES, 'tPath=' . $articles_new['topics_id']) . '">' . $articles_new['topics_name'] . '</a>'; ?></td>
<td class="r"><?php echo tep_date_long($articles_new['articles_date_added']); ?></td>
</tr>
<?php
 } // End of listing loop
echo '</table></div>';  
} else {
?>
<?php
 }
?>

"Use no way as way, have no limitation as limitation." - Bruce Lee

#73 Deskdirect

  • Community Member
  • 192 posts
  • Real Name:Shelia and Annette
  • Gender:Female

Posted 16 January 2004, 21:58

First I don't have this file sts_display_output.php, so this fix won't work for me. Any other thoughts?


Quote

in order for this contribution (article manage) to work it needs to look for the function in application_top.php

THE FIX:
open catalog/includes/sts_display_output.php
comment out:
require(DIR_WS_FUNCTIONS . 'clean_html_comments.php');


#74 tammy507

  • Community Member
  • 218 posts
  • Real Name:Tammy OHagan

Posted 21 January 2004, 21:33

Great Contribution! Easy to install..great instructions!!! Thanks

I do however need some assistance, please.

My site is at http://www.nudephotostore.com/store/

My Article box shows up like this:

BOX_HEADING_ARTICLES

BOX_NEW_ARTICLES (0)
BOX_ALL_ARTICLES (0)


Any idea what Ive done wrong & how I can fix it?

thanks
tammy

#75 tammy507

  • Community Member
  • 218 posts
  • Real Name:Tammy OHagan

Posted 22 January 2004, 22:14

Anybody?????

#76 ugottasalsa

  • Community Member
  • 730 posts
  • Real Name:Randy Newman
  • Location:Venice Beach, Ca.

Posted 22 January 2004, 22:23

Looks like you missed the language file defines that belong in catalog/includes/languages/english.php.

define('BOX_HEADING_ARTICLES', 'Articles');

...and so on.

Look in the Readme.txt file that is included with the contrib, for the following line...

Quote

In includes/languages/english/english.php add the following
Below this line, you will fnd all of the language file defines.

-R
"Courage is not the absence of fear, but the awareness of fear and the ability to get past it."

It's difficult to diagnose an issue when the patient says, "I have this pain right here Doc, what do you think it is?"

#77 tammy507

  • Community Member
  • 218 posts
  • Real Name:Tammy OHagan

Posted 22 January 2004, 22:58

I'm not sure how I missed it, but I did.. Thank You very much!
Tammy

#78 tammy507

  • Community Member
  • 218 posts
  • Real Name:Tammy OHagan

Posted 22 January 2004, 23:10

Im wondering if there is a way to get rid of the "Article by Author" box?

#79 ugottasalsa

  • Community Member
  • 730 posts
  • Real Name:Randy Newman
  • Location:Venice Beach, Ca.

Posted 23 January 2004, 01:46

Sure.... just don't add it to either of your columns.

-R
"Courage is not the absence of fear, but the awareness of fear and the ability to get past it."

It's difficult to diagnose an issue when the patient says, "I have this pain right here Doc, what do you think it is?"

#80 tammy507

  • Community Member
  • 218 posts
  • Real Name:Tammy OHagan

Posted 23 January 2004, 15:11

LOL ... That makes sense, thanks
Tammy