Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Article Manager v1.0


RobAnderson

Recommended Posts

The view count is recorded but nothing is done with that field. So it could be displayed without too much coding. You just need to read in the articles_viewed field from the articles_description table and add the display code wherever you want it. I'll add this to the next version. Thanks for mentioning 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

I would like to install this but but don't want to install Headertags. So I am using an older version on a new version OSCOMMERCE. I cannot figure out where to put this piece of code as there is no colum left or right on the new version:

 

// Article Manager

require(DIR_WS_BOXES . 'authors.php');

require(DIR_WS_BOXES . 'articles.php');

Link to comment
Share on other sites

I am dealing with hundreds of different people on my website who add products - I don't want to give them all admin access to use the header tags. I need something simple to add articles.

Link to comment
Share on other sites

Hi I am a very basic php coder so please accept my appologise before I start. I am running oscommerce 2.3.3 and I am having trouble installing this addon into the tell a friend page, I cannot find the code to change could someone please help. my tell a friend page is as follows

 

<?php

/*

$Id$

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2010 osCommerce

 

Released under the GNU General Public License

*/

 

require('includes/application_top.php');

 

if (!tep_session_is_registered('customer_id') && (ALLOW_GUEST_TO_TELL_A_FRIEND == 'false')) {

$navigation->set_snapshot();

tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));

}

 

/**** BEGIN ARTICLE MANAGER ****/

$valid_product = false;

if (isset($HTTP_GET_VARS['products_id'])) {

$product_info_query = tep_db_query("select pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "'");

if (tep_db_num_rows($product_info_query)) {

$valid_product = true;

 

$product_info = tep_db_fetch_array($product_info_query);

} else {

tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $HTTP_GET_VARS['products_id']));

}

}

 

$valid_article = false;

if (isset($HTTP_GET_VARS['articles_id'])) {

$article_info_query = tep_db_query("select pd.articles_name from " . TABLE_ARTICLES . " p, " . TABLE_ARTICLES_DESCRIPTION . " pd where p.articles_status = '1' and p.articles_id = '" . (int)$HTTP_GET_VARS['articles_id'] . "' and p.articles_id = pd.articles_id and pd.language_id = '" . (int)$languages_id . "'");

if (tep_db_num_rows($article_info_query)) {

$valid_article = true;

 

$article_info = tep_db_fetch_array($article_info_query);

} else {

tep_redirect(tep_href_link(FILENAME_ARTICLE_INFO, 'articles_id=' . $HTTP_GET_VARS['articles_id']));

}

}

/**** END ARTICLE MANAGER ****/

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

 

if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'process') && isset($HTTP_POST_VARS['formid']) && ($HTTP_POST_VARS['formid'] == $sessiontoken)) {

$error = false;

 

$to_email_address = tep_db_prepare_input($HTTP_POST_VARS['to_email_address']);

$to_name = tep_db_prepare_input($HTTP_POST_VARS['to_name']);

$from_email_address = tep_db_prepare_input($HTTP_POST_VARS['from_email_address']);

$from_name = tep_db_prepare_input($HTTP_POST_VARS['from_name']);

$message = tep_db_prepare_input($HTTP_POST_VARS['message']);

 

if (empty($from_name)) {

$error = true;

 

$messageStack->add('friend', ERROR_FROM_NAME);

}

 

if (!tep_validate_email($from_email_address)) {

$error = true;

 

$messageStack->add('friend', ERROR_FROM_ADDRESS);

}

 

if (empty($to_name)) {

$error = true;

 

$messageStack->add('friend', ERROR_TO_NAME);

}

 

if (!tep_validate_email($to_email_address)) {

$error = true;

 

$messageStack->add('friend', ERROR_TO_ADDRESS);

}

 

$actionRecorder = new actionRecorder('ar_tell_a_friend', (tep_session_is_registered('customer_id') ? $customer_id : null), $from_name);

if (!$actionRecorder->canPerform()) {

$error = true;

 

$actionRecorder->record(false);

 

$messageStack->add('friend', sprintf(ERROR_ACTION_RECORDER, (defined('MODULE_ACTION_RECORDER_TELL_A_FRIEND_EMAIL_MINUTES') ? (int)MODULE_ACTION_RECORDER_TELL_A_FRIEND_EMAIL_MINUTES : 15)));

}

 

/**** BEGIN ARTICLE MANAGER ****/

if ($error == false) {

// Modify e-mail depending on whether prodect or article

// if product

if ($valid_product) {

$email_subject = sprintf(TEXT_EMAIL_SUBJECT, $from_name, STORE_NAME);

$email_body = sprintf(TEXT_EMAIL_INTRO, $to_name, $from_name, $product_info['products_name'], STORE_NAME) . "\n\n";

/**** END ARTICLE MANAGER ****/

if (tep_not_null($message)) {

$email_body .= $message . "\n\n";

}

 

$email_body .= sprintf(TEXT_EMAIL_LINK, tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . (int)$HTTP_GET_VARS['products_id'], 'NONSSL', false)) . "\n\n" .

sprintf(TEXT_EMAIL_SIGNATURE, STORE_NAME . "\n" . HTTP_SERVER . DIR_WS_CATALOG . "\n");

 

tep_mail($to_name, $to_email_address, $email_subject, $email_body, $from_name, $from_email_address);

 

$actionRecorder->record();

 

$messageStack->add_session('header', sprintf(TEXT_EMAIL_SUCCESSFUL_SENT, $product_info['products_name'], tep_output_string_protected($to_name)), 'success');

 

tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $HTTP_GET_VARS['products_id']));

 

/**** BEGIN ARTICLE MANAGER ****/

} else if ($valid_article) {

$email_subject = sprintf(TEXT_EMAIL_SUBJECT, $from_name, STORE_NAME);

$email_body = sprintf(TEXT_EMAIL_INTRO, $to_name, $from_name, $article_info['articles_name'], STORE_NAME) . "\n\n";

 

if (tep_not_null($message)) {

$email_body .= $message . "\n\n";

}

 

$email_body .= sprintf(TEXT_EMAIL_LINK_ARTICLE, tep_href_link(FILENAME_ARTICLE_INFO, 'articles_id=' . $HTTP_GET_VARS['articles_id'])) . "\n\n" .

sprintf(TEXT_EMAIL_SIGNATURE, STORE_NAME . "\n" . HTTP_SERVER . DIR_WS_CATALOG . "\n");

 

tep_mail($to_name, $to_email_address, $email_subject, $email_body, $from_name, $from_email_address);

 

$messageStack->add_session('header', sprintf(TEXT_EMAIL_SUCCESSFUL_SENT, $article_info['articles_name'], tep_output_string_protected($to_name)), 'success');

 

tep_redirect(tep_href_link(FILENAME_ARTICLE_INFO, 'articles_id=' . $HTTP_GET_VARS['articles_id']));

}

/**** END ARTICLE MANAGER ****/

}

} elseif (tep_session_is_registered('customer_id')) {

$account_query = tep_db_query("select customers_firstname, customers_lastname, customers_email_address from " . TABLE_CUSTOMERS . " where customers_id = '" . (int)$customer_id . "'");

$account = tep_db_fetch_array($account_query);

 

$from_name = $account['customers_firstname'] . ' ' . $account['customers_lastname'];

$from_email_address = $account['customers_email_address'];

}

 

/**** BEGIN ARTICLE MANAGER ****/

if ($valid_product) {

$breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_TELL_A_FRIEND, 'products_id=' . $HTTP_GET_VARS['products_id']));

} else if ($valid_article) {

$breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_TELL_A_FRIEND, 'articles_id=' . $HTTP_GET_VARS['articles_id']));

}

/**** END ARTICLE MANAGER ****/

 

 

require(DIR_WS_INCLUDES . 'template_top.php');

?>

 

<h1><?php echo sprintf(HEADING_TITLE, $product_info['products_name']); ?></h1>

 

<?php

if ($messageStack->size('friend') > 0) {

echo $messageStack->output('friend');

}

?>

 

<?php echo tep_draw_form('email_friend', tep_href_link(FILENAME_TELL_A_FRIEND, 'action=process&products_id=' . (int)$HTTP_GET_VARS['products_id']), 'post', '', true); ?>

 

<div class="contentContainer">

<div>

<span class="inputRequirement" style="float: right;"><?php echo FORM_REQUIRED_INFORMATION; ?></span>

<h2><?php echo FORM_TITLE_CUSTOMER_DETAILS; ?></h2>

</div>

 

<div class="contentText">

<table border="0" cellspacing="2" cellpadding="2" width="100%">

<tr>

<td class="fieldKey"><?php echo FORM_FIELD_CUSTOMER_NAME; ?></td>

<td class="fieldValue"><?php echo tep_draw_input_field('from_name'); ?></td>

</tr>

<tr>

<td class="fieldKey"><?php echo FORM_FIELD_CUSTOMER_EMAIL; ?></td>

<td class="fieldValue"><?php echo tep_draw_input_field('from_email_address'); ?></td>

</tr>

</table>

</div>

 

<h2><?php echo FORM_TITLE_FRIEND_DETAILS; ?></h2>

 

<div class="contentText">

<table border="0" cellspacing="2" cellpadding="2" width="100%">

<tr>

<td class="fieldKey"><?php echo FORM_FIELD_FRIEND_NAME; ?></td>

<td class="fieldValue"><?php echo tep_draw_input_field('to_name') . ' <span class="inputRequirement">' . ENTRY_FIRST_NAME_TEXT . '</span>'; ?></td>

</tr>

<tr>

<td class="fieldKey"><?php echo FORM_FIELD_FRIEND_EMAIL; ?></td>

<td class="fieldValue"><?php echo tep_draw_input_field('to_email_address') . ' <span class="inputRequirement">' . ENTRY_EMAIL_ADDRESS_TEXT . '</span>'; ?></td>

</tr>

</table>

</div>

 

<h2><?php echo FORM_TITLE_FRIEND_MESSAGE; ?></h2>

 

<div class="contentText">

<table border="0" cellspacing="2" cellpadding="2" width="100%">

<tr>

<td class="fieldValue"><?php echo tep_draw_textarea_field('message', 'soft', 40, 8); ?></td>

</tr>

</table>

</div>

 

<div class="buttonSet">

<span class="buttonAction"><?php echo tep_draw_button(IMAGE_BUTTON_CONTINUE, 'triangle-1-e', null, 'primary'); ?></span>

 

<?php echo tep_draw_button(IMAGE_BUTTON_BACK, 'triangle-1-w', tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . (int)$HTTP_GET_VARS['products_id'])); ?>

</div>

</div>

 

</form>

 

<?php

require(DIR_WS_INCLUDES . 'template_bottom.php');

require(DIR_WS_INCLUDES . 'application_bottom.php');

?>

 

as you can see I have managed part of it

 

Thank you in advance

Link to comment
Share on other sites

There are several problems with the tell a friend changes for 2.3. This has been fixed in the latest version, assuming you are using my version, but I haven't had a chance to package and upload it yet. There are too many changes to go through them here.

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

No, at least not from me. The improvements and bug fixes made to my version would make for a very long list. It is probably safe to say that the code in the two versions are not very much alike at all at this point. It would take hours to go through and update the other version and that is time I don't have.

 

You mention that you don't want to use Header Tags SEO because someone else might edit it. I would think that would be the case with any meta tag addon you are using. If you are not using one, that really should be your priority since no change you make will matter if the search engines can't find the site.

 

Also, there is an addon that allows you to control what parts of admin someone may see. So, for example, if it were installed, you could give me access to your admin, with my own password, and all I would be able to see would be the Header Tags section, or whatever section(s) you setup for my account.

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 to all ;

I tried installing the contribution , and retouched I uploaded all the files, but when trying to run the file " article_manager_V_1.57.sql " in phpmyadmin on the server, it gives me error . I am a novice and do not know anything about sql , what I do is open the server phpmyadmin , select the SQL tab , hit the text file and give it to the button, do not know if this is done, like what I'm doing wrong . The error that I get the phpmyadmin is as follows ;

error

SQL query :

 

INSERT INTO configuration_group ( configuration_group_id , configuration_group_title , configuration_group_description , sort_order , visible)

VALUES (

 

'456 ',' Article Manager ',' Article Manager site wide options' , '20 ', '1'

) ;

 

 

 

MySQL said :

 

# 1046 - No database selected

 

and the error that I get the page to load is as follows ;

 

1146 - Table ' basename_b.authors ' does not exist

 

select authors_id , authors_name from authors order by authors_name

 

I suspect that the error is to run the sql file but do not know how. By changing the file " tell- a- friend" if I did not know well at all , because the texts do not match . Nor is admin -> Article Manager.

 

The version I have of osocmmerce is 2.3.1 .

Consuelo

Could someone be kind enough to help me please? ?

Link to comment
Share on other sites

No idea. I have some changes I want to get into it before releasing and I need time to run through the instructions for all of the changes. I usually have extra time around the holidays so I'm hoping to get something uploaded this year.

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

Thank you Jack, you were right, did not select the database. If I was not a thousand miles away I'd invite to a cafe, :P

Now, what happens to me is there is no "admin-> Article Manager", it shows only "admin-> settings-> Article Manager"

and the link "Articles RSS Feed" does not work

Regarding Tell_a_friend.php file, I can not find the last word to be replaced, I have looked in the oscommerce version 3.3.3 to see if they were, but neither the game, so I've played and I've uploaded your file original, I say if you have something to do ....

Would you have some important suggestion of yours?

Consuelo

Link to comment
Share on other sites

Darn, and me out of frequent flyer points. :) If the Article Manager section isn't showing in your admin, then you've either made a mistake in the installation or you have one of the addons installed that require files to be activate, like admin access.

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

If it were just the one file I would post it here but there are changes to other files that are needed to make it work correctly and I don't have those written down.

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

I tried to review all the facilities that I have to see what remains to be installed , but can not find the problem. Now I had installed "header tags , SiteMonitor , sitemap seo , theme swither , AUTOBACK up and security pro" . I have two years preparing the web and I have no more energy to start installing everything again. I need a website in oscommerce 2.3.3 with all the facilities of SEO, I have in ten different languages ​​, also want to get the article manager or the closest thing to a blog, and the map to google etc ...

I would install the following, more or less :

sitemap xml google seo

ultimate seo url

SiteMonitor

all products seo

seo sitemap

article manager

seo header tags

dayli specials

Database optimicer

sitesearch plus

Can you suggest other things that you think are important .

The problem is that I have the database with articles category and that cost me a lot of work , and I need to upload the new website.

I wonder how much it would cost me that job and if you could do that job for me.

Thanks Jack , if you are interested please contact me .

Consuelo

Link to comment
Share on other sites

I have solved the problem that was not in admin tab article manager, it was because the first amendment was wrong file, the "inlude" was wrong since.

Now I just solve the problem of "Articles RSS Feed" link does not work it gives me the following error;

"This feed contains code errors."

The fact is that the web is in ten languages​​, and curiously none works except the Russian link in Russian if that works. I've looked at other questions about this issue and have read some problems with the dates of the items. Neither works in the admin drop-down calendar to set the date, but to avoid this case, I deleted all files and folders of items. Did anyone think of any ideas of what can be?

I would appreciate any help. thanks

Link to comment
Share on other sites

Hey Guys,

 

I have been using Article Manager for some time now, and I absoloutly love it. I want to try and make one thing work, and for some reason, I cannot figure our how..

 

Currently when you click an article it reads Home > Articles > Article Title here. I want to change it up, so the article Topic always appears instead of the the word Articles.

 

So it would read like: Home > Article Topic Title > Article Title Here.

 

I am assuming it is done here:

$pageTags = tep_db_fetch_array($pageTags_query);
  $breadcrumb->add('Articles', tep_href_link(FILENAME_ARTICLES));
  $breadcrumb->add($pageTags['page_title'], tep_href_link($articlesPage));

 

But I don't know how to write it. I would sincerely appreciate any help! Thanks so much!

Link to comment
Share on other sites

If you are using version 1_57 with Header Tags SEO installed, that is how it works already. You need to fill in entries in Page Control but that's all.

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've checked several times the installation and I can not find the error.

It seems that everything works except the link "Articles RSS Feed"

 

The web is in several languages ​​and the link only works in the Russian language.

The version I have installed is "article_manager_V_1.57", and the version of Header tags is "Header Tags SEO V 3.2.8". I do not know if influence, but I have installed other things like backups, autobackups, securty Pro, SiteMonitor, ultimate seo url, sitemap seo, theme swicher, all products plus seo and site search, I say if they have anything to do ... .

I find it strange that sfuncione in Russian and in other languages ​​may not work.

Thank you very much for the help, if someone comes up with something, I'd appreciate it. regards

Consuelo

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