Latest News: (loading..)
RobAnderson

Article Manager v1.0

2,301 posts in this topic

Hi Rob,

 

I just installed Article Manager v1.0 and I have to say it is great. It was also very easy to install. It only took a few minutes.

 

The only problem that I'm having is when you use the "Tell-a-Friend" function, it does not bring the "friend back to the article. What the email link brings me back to is the "Tell-a-Friend" page, with the input box for the email address.

 

This is the link that is in the emails.

 

http://www.xxxxxxxxxx.com/article_info.php?articles_id=1

 

But if you change it to:

 

http://www.xxxxxxxxxx.com/articles.php?articles_id=1

 

It will take you to the correct article.

 

And me not knowing much about PhP, I wouldn't know where to go to change the filename.

 

Do you get this too, or did I goof in my installation?

 

Thanks in advance.

Share this post


Link to post
Share on other sites

Hi Les, thanks for your favourable comments ;-)

 

About your problem with the Tell a Friend feature, the link that appears in the e-mail you received appears correct, i.e. article_info.php?articles_id=X would be the correct way to reference Article X.

 

So I'm not sure why it might be taking you back to the Tell a Friend page (which is tell_a_friend.php).

 

My suggestion would be to go back through the installation instructions for the Tell a Friend page and check that you got them all. The irony is that this page is the most lengthy to modify in the whole contribution and it's only one small aspect of the Article Manager <grrr>.

 

Also, when testing your Tell a Friend link, make sure you close all browser windows first (might help?).

 

Let me know how you get on, someone else may have some ideas too.

 

Rob ;-)

Share this post


Link to post
Share on other sites
Rob, do u have this running somewhere mate, so I can have a peek?

Hi langers, sorry no live site yet.

 

If you go back to the Article Manager v1.0 Contribution page, you'll find a link to download screen captures of my test site. It shows you how the articles look as well as the admin section.

 

This should help ;-) Rob

Share this post


Link to post
Share on other sites
now that is a class contrib!

well done & thank you...

Thanks daithi, my pleasure ;-)

Share this post


Link to post
Share on other sites

playing around with it and noticed i have a couple of issues...maybe my install?

 

when i click on the article name to view the full article, it calls article_info.php?articles_id=1

but the page displays with:

 

This article was published on .

Current Reviews: 0

 

 

ie. no article and no date.

 

also, when i use the tell a friend, the email arrives with:

TEXT_EMAIL_LINK_ARTICLE instead of the link.

 

I have searched all files in the contrib for this define but it is only mentioned in your readme.txt as an addition to tell_a_friend.php - should it be defined somewhere?

Share this post


Link to post
Share on other sites

also just noticed when viewing the New Articles/All Articles/Category page, the Meta Description field is displayed as Article Abstract.

nyone else have this issue?

Share this post


Link to post
Share on other sites

Great contribution! Got it working on my first try!!

 

One question though, any way to sort the articles other than by date?

 

sparks

Share this post


Link to post
Share on other sites

Hi Dave, in response to:

also just noticed when viewing the New Articles/All Articles/Category page, the Meta Description field is displayed as the Article Abstract.

This is by design for a couple of reasons.

 

Firstly, the meta-description should be a succinct description of the article and therefore well suited as an article abstract. Whereas, if I just took the frist few hundred characters or so of the article content (articles_description) as the abstract, it might not mean much as a summary of the entire article.

 

Secondly, because the article content (articles_description) might contain images added in using the WYSIWYG editor, I didn't want these appearing in the abstract (kinda ruined the look!). Hence the need to use a different field and so I decided to use the meta-description one (articles_head_desc_tag).

 

Hope this makes sense?

 

Cheers, Rob

Share this post


Link to post
Share on other sites

Hi Dave, in response to:

also, when i use the tell a friend, the email arrives with:

TEXT_EMAIL_LINK_ARTICLE instead of the link.

TEXT_EMAIL_LINK_ARTICLE should have been added as part of the install, i.e.

 

In includes/languages/english/tell_a_friend.php:

Look for:

define('TEXT_EMAIL_LINK', 'To view the product click on the link below or copy and paste the link into your web browser:' . "\n\n" . '%s');

Add this immediately below:

define('TEXT_EMAIL_LINK_ARTICLE', 'To view the article click on the link below or copy and paste the link into your web browser:' . "\n\n" . '%s');

 

This should fix the e-mail problem (unless it's something else!).

 

Regards, Rob

Share this post


Link to post
Share on other sites

Hi Dave (again ;-), in response to:

when i click on the article name to view the full article, it calls article_info.php?articles_id=1

but the page displays with:

 

This article was published on .

Current Reviews: 0

 

ie. no article and no date.

This sounds like an install or version problem as I can't think why the article content would not display, nor why there would be no date display.

 

Just curious, but what version of OSC are you using (as some functions may have changed)? This contribution has been written for the 2.2MS2 release (Jul 03), so it may not work properly with earlier versions (MS1) or later snapshots.

 

Rob

Share this post


Link to post
Share on other sites

Hi sparks, in response to:

One question though, any way to sort the articles other than by date?

No admin or user control of sorting has been built in (yet...). However, there are three separate listings that can be modified if you wish to change from the default sort option of most recent first.

 

The New Articles listing is set by the query in the articles_new.php page, line 65. At the end of the line, you can modify the order by code and specify a different field to sort by, e.g.

 

order by a.articles_date_added desc, ad.articles_name

could be changed to

 

order by ad.articles_name

to sort by name instead of the most recent article first (that's what the default a.articles_date_added desc does).

 

Similar modifications could be applied to the All Articles listing in the articles.php page, line 309 or to the Authors/Topics listings in the articles.php page on lines 175, 178, 184 and 187.

 

Hope this helps ;-)

 

Rob

Share this post


Link to post
Share on other sites

hi,

 

just one thing, in the install file it has this,

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

4. Post-Installation Tasks

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

 

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.

 

What is it talking about, i dont have any articles_header_tages.php, and i need to do the 2nd thing, but i cant cause i dont have that file.

 

So what do i need to do??

 

Please help,

 

Thanks

 

Kristofor

Share this post


Link to post
Share on other sites
Hi Dave, in response to:
also, when i use the tell a friend, the email arrives with:

TEXT_EMAIL_LINK_ARTICLE instead of the link.

TEXT_EMAIL_LINK_ARTICLE should have been added as part of the install, i.e.

 

In includes/languages/english/tell_a_friend.php:

Look for:

define('TEXT_EMAIL_LINK', 'To view the product click on the link below or copy and paste the link into your web browser:' . "\n\n" . '%s');

Add this immediately below:

define('TEXT_EMAIL_LINK_ARTICLE', 'To view the article click on the link below or copy and paste the link into your web browser:' . "\n\n" . '%s');

 

This should fix the e-mail problem (unless it's something else!).

 

Regards, Rob

sorry, missed that bit in the install instructions....

as the tell_a_friend.php is a rarely modified page, it might be no harm in including your updated version in the contrib as a straight replacement - it would cut down on the install instructions quite a bit...

 

anyway, that bit now works as expected, thank you.

 

still need to sort out why the article and date aren't displaying though - i am also using a fairly stock 2.2MS2 but as i missed that previous step could i have missed something else???? not sure as there is nothing to change in relaton to the article_info.php page.

 

 

    Hi Dave, in response to:

QUOTE

also just noticed when viewing the New Articles/All Articles/Category page, the Meta Description field is displayed as the Article Abstract.

 

This is by design for a couple of reasons.

 

Firstly, the meta-description should be a succinct description of the article and therefore well suited as an article abstract. Whereas, if I just took the frist few hundred characters or so of the article content (articles_description) as the abstract, it might not mean much as a summary of the entire article.

 

Secondly, because the article content (articles_description) might contain images added in using the WYSIWYG editor, I didn't want these appearing in the abstract (kinda ruined the look!). Hence the need to use a different field and so I decided to use the meta-description one (articles_head_desc_tag).

 

Hope this makes sense?

 

Yes, this does now make sense - as it is titled as meta description in admin, i just presumed it was to be hidden text just for search engines...

 

again, thanks for a super contrib,

dave.

Share this post


Link to post
Share on other sites

Hi Kristofor, in response to:

What is it talking about, i dont have any articles_header_tages.php, and i need to do the 2nd thing, but i cant cause i dont have that file.

 

So what do i need to do??

The articles_header_tags.php page should have been added earlier on in the installation. It is included in the catalog/includes/languages/english folder of the install package.

 

As for modifying this page (as mentioned in the Post-Installation instructions), this is only required if you had previously installed Linda McGrath's Header Tags Controller. If you don't have this contribution installed, then ignore this step (but you still need the articles_header_tags.php page!)

 

Hope this helps, Rob

Share this post


Link to post
Share on other sites

Hi Dave

as the tell_a_friend.php is a rarely modified page, it might be no harm in including your updated version in the contrib as a straight replacement - it would cut down on the install instructions quite a bit...

Good idea, I will get this out shortly, it would simplify things a bit ;-)

 

still need to sort out why the article and date aren't displaying though - i am also using a fairly stock 2.2MS2 but as i missed that previous step could i have missed something else???? not sure as there is nothing to change in relaton to the article_info.php page.

Just curious, if you look in the articles table in your database, is the articles_date_added field being filled in? This is what is used in article_info.php to display the expected or published date.

 

Also, when you update an article is it saving the Article Content OK, i.e. in the articles_description table is the articles_description field being populated. If not, it may be a problem with the WYSIWYG Editor install, in which case try turning it off in the Articles manager configuration (Use WYSIWYG HTMLAREA Editor? = Disable) and see if that makes a difference.

 

Let me know how you get on.

 

Regards, Rob

Share this post


Link to post
Share on other sites
  Hi Dave

QUOTE

as the tell_a_friend.php is a rarely modified page, it might be no harm in including your updated version in the contrib as a straight replacement - it would cut down on the install instructions quite a bit...

 

Good idea, I will get this out shortly, it would simplify things a bit ;-)

 

the only mod that i know of that changes this page is the 'also tell admin of tell a friend use' not sure what it is called... but if you find it it could also be good to add this feature to tell a friend about article...

 

Just curious, if you look in the articles table in your database, is the articles_date_added field being filled in? This is what is used in article_info.php to display the expected or published date.

 

yeah, that is filled in.

 

Also, when you update an article is it saving the Article Content OK, i.e. in the articles_description table is the articles_description field being populated. If not, it may be a problem with the WYSIWYG Editor install, in which case try turning it off in the Articles manager configuration (Use WYSIWYG HTMLAREA Editor? = Disable) and see if that makes a difference.

 

Let me know how you get on.

 

Regards, Rob

 

 

yeah, that also seems fine.

I just added an author (previously had no authors) and the page displays fine - so looks like it could be an sql query issue if the article has no author assigned to it?

dave.

Share this post


Link to post
Share on other sites
I just added an author (previously had no authors) and the page displays fine - so looks like it could be an sql query issue if the article has no author assigned to it?

dave.

 

just confirmed that for my install - ie. i removed:

and a.authors_id = au.authors_id

from line 74 of article_info.php and now the articles display as expected - not sure what issues removing this will cause though....

 

 

again, thanks for a super contrib - if anyone following this thread wants a cms for osc or wants to replace the excellent faqdesk & newsdesk with an MS2 compliant easy install - go for this!

dave.

Share this post


Link to post
Share on other sites

Hi Dave, well done, you found a bug ;-)

 

just confirmed that for my install - ie. i removed:

and a.authors_id = au.authors_id

from line 74 of article_info.php and now the articles display as expected - not sure what issues removing this will cause though....

While your fix will display the article (if no author is assigned), you may find that author names do not display for other articles in article_info.php as a consequence. You may also be left with the TEXT_BY entry "by" at the top right-hand corner of your Article Info page.

 

So, you may want to try the fix below, which I will be building into v1.1 (should be posted later today).

 

Article Manager v1.0 bug fix if no Author assigned to article.

 

In catalog/article_info.php replace line 74 with:

     $article_info_query = tep_db_query("select a.articles_id, a.articles_date_added, a.articles_date_available, a.authors_id, ad.articles_name, ad.articles_description, ad.articles_url, au.authors_name from " . TABLE_ARTICLES . " a, " . TABLE_ARTICLES_DESCRIPTION . " ad left join " . TABLE_AUTHORS . " au on a.authors_id = au.authors_id where a.articles_status = '1' and a.articles_id = '" . (int)$HTTP_GET_VARS['articles_id'] . "' and ad.articles_id = a.articles_id and ad.language_id = '" . (int)$languages_id . "'");

also, in the same page, replace line 87 with:

             <td class="main" align="right" valign="bottom"><?php if (tep_not_null($articles_author)) echo TEXT_BY . '<a href="' . tep_href_link(FILENAME_ARTICLES,'authors_id=' . $articles_author_id) . '">' . $articles_author . '</a>'; ?></td>

That should do it!

 

Thanks very much for your feedback Dave, I really appreciate another set of eyes!

 

Regards, Rob

Share this post


Link to post
Share on other sites

Article Manager v1.1 has just been released and includes the following changes:

 

- Bug fix to article_info.php to display article if no author assigned (see previous post)

- Full tell_a_friend.php file and associated language file included to simplify installation

- Updated installation instructions

 

Thanks to Dave (daithi) for these suggestions.

 

Note: If you have installed Version 1.0, you DO NOT need to reinstall. Simply follow the instructions in the following post to fix a minor bug:

 

http://forums.oscommerce.com/index.php?sho...ndpost&p=269972

 

Thanks everybody for your enthusiastic responses, it makes all those late nights worth it ;-)

 

Regards, Rob

Edited by RobAnderson

Share this post


Link to post
Share on other sites

hey, cool,

i couldnt get the previous one to work, but this new verion works perfectly,

 

Great mod, now to get to writing some articles

hehehehe

 

thanks again

 

kristofor

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