Jump to content
RobAnderson

Article Manager v1.0

Recommended Posts

At what point do you get this error in admin? Immediately you try to access the admin area or when you click on something in particular?

 

Have you made any changes at all to the contribution files?

 

Have you tried to reinstall the contribution admin files again?

 

as soon as i try and login.

 

no changes.

 

yes i've reinstalled and looked over the files to make sure i added everything.

Share this post


Link to post
Share on other sites

could it be that you are calling this function twice in code ?

Perhaps the instructions are unclear if you need to add this to the admin or to the catelog side ?

What page are you accessing on the admin site ?

admin/index.php

or admin/customers.php

... do all of these fail, or just ones related to article manager ?

Please be as precise as you can.


KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Share this post


Link to post
Share on other sites

the redeclared functions thing, is it a whitespace issue? Check for whitespace before and after your beginning and ending php tags.

 

I haven't tried installing this yet but the image-per-article thing would be a case of tweaking the image upload code from the categories.php file and adding the image display code to the articles.php and/or the articles_info.php files. Might have a play around with that when I get round to installing this, after adding HTC, and possibly a SEO thingy, and sorting out my own stock control thingy...

Share this post


Link to post
Share on other sites

WRT limiting the length of article pages/automatic page-breaks

 

I was just looking at functions/general.php and there's a function for the search facility that finds the spaces between words in descriptions. Presumably this could be adapted to provide a word-count and then something like split_page_results could be adapted to show the next pages? A starting-point perhaps? Beyond my 'ken' currently though.

Share this post


Link to post
Share on other sites

Help! I can't see any articles. If I go to the the articles page I just see:

 

All Articles

 

Current Articles

 

Displaying 1 to 1 (of 1 articles) Result Pages: 1

 

 

Below is a list of all articles with the most recent ones listed first.

 

 

Published:

 

 

Displaying 1 to 1 (of 1 articles) Result Pages: 1

 

 

but no articles. Am I missing something?

 

Thanks

Share this post


Link to post
Share on other sites
bump. please help

Shervin - it's very simple. Do a search in your includes/application_top.php file for the line

 

require(DIR_WS_FUNCTIONS . '<articles.php>');

 

You've got it declared twice. Delete the second one and all will be fine.

 

-al

Share this post


Link to post
Share on other sites
You've got it declared twice. Delete the second one and all will be fine.

Argh!!! For some reason I can't edit this post...

 

Anyhow, I suspect you've made the mistake of adding both the /catalog/includes/application_top.php and /catalog/admin/includes/application_top.php modification code to the same file -- the first application_top.php.

 

Check to make sure that all your Admin code changes were only done to the /catalog/admin/ files and not /catalog/ files.

 

It's pretty easy to get mixed up when you're in the thick of it.

 

Hope this helps

 

-al

Share this post


Link to post
Share on other sites

anyone got any suggestions as to why I can't see any articles? (post above)

 

Any help would be greatly appreciated. :)

Share this post


Link to post
Share on other sites

Hi all,

 

just an easy question for experienced players (still have my osc/php training wheels on here)...

 

I've added the google adsense contrib to my shop and I only want to show google boxes on my article pages

that way there are no distractions for buyers in the rest of my shop :)

 

Basically I need the 'if..then' code to pop in my column_right.php to do the following...

 

If an article page is currently displayed

then

show-my-info-box

 

also...I need a similar 'if then' to show an infobox only if my shop home page is displayed.

 

If displaying the home page

then

show-my-info-box

 

Any clues most gratefully received :)

 

Many thanks,

Stuart

Share this post


Link to post
Share on other sites

Hi guys,

 

I wanted to show new articles my home page in a module box so I hacked this together with code from earlier posts on this board (thankyou contributors!) and a bit of added html for the box by myself...my html code is not pretty info box wise but it works for me....thought it might be useful for others.

 

Use at your own risk...backup...etc

 

make a new file new_articles.php and pop it in your modules directory

code as follows:

 

<?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);

?>

 

<br>

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

<tr>

<td height="14" class="infoBoxHeading"><img src="/test/images/infobox/corner_left.gif" border="0" alt=""></td>

<td height="14" class="infoBoxHeading" width="100%">Most Recent Articles</td>

<td height="14" class="infoBoxHeading"><img src="/test/images/infobox/corner_right.gif" border="0" alt=""></td>

</tr>

</table>

<table border="0" width="100%" cellspacing="0" cellpadding="1" class="infoBox">

<tr>

<td><table border="0" width="100%" cellspacing="0" cellpadding="4" class="infoBoxContents">

<tr>

 

<?php

while ($articles_new = tep_db_fetch_array($articles_new_query)) {

?>

<tr>

<td class="boxText"><?php echo '  <a href="' . tep_href_link(FILENAME_ARTICLE_INFO, 'articles_id=' . $articles_new['articles_id']) . '">' . $articles_new['articles_name']. '</a>' ?></td>

<td><?php echo 'updated ' . tep_date_long($articles_new['articles_date_added']); ?></td>

</tr>

<?php

} // End of listing loop

 

} else {

?>

<?php

}

?>

 

 

</tr>

</table>

</td>

</tr>

</table>

 

 

then pop a reference to it in your index.php

I put it just above the reference to upcoming products....

my files are quite heavily modded so yours may be different.

 

<TR>

<td>

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

</TD>

</TR>

 

<?php

include(DIR_WS_MODULES . FILENAME_UPCOMING_PRODUCTS);

?>

 

and voila..the titles of new articles appear on the home page for all to see! woohoo!

If someone has created a neater solution for the same thing let me know.. :)

 

Have fun,

Stuart

Share this post


Link to post
Share on other sites

Hi,

 

I have just downloaded and installed the contribution.

 

After installing i can't seem to access my online store and just recieve a 500 Internal Server Error.

 

I can still access my admin panel but not the store front.

 

I have followed the read me instructions from start to finish.

 

Can you suggest what the problem might be?

 

Many Thanks

D4

Share this post


Link to post
Share on other sites

Hi,

 

I have just downloaded and installed the contribution.

 

After installing i can't seem to access my online store from the main www.mywebsite.com/catalog url however if i add www.mywebsite.com/catalog/index.php?cPath=1 it works fine and i can browse through my site no problem.

 

If i select the top level 'catalog' i am presented with a 500 Internal Server Error message.

 

I can still access my admin panel no problems.

 

Also in the right coloumn of the store front where i presume the article manager should be i am receiving the following error message:

 

1054 - Unknown column 'a.authors_id' in 'on clause'

 

select a.articles_id from articles a, articles_to_topics a2t left join topics_description td on a2t.topics_id = td.topics_id left join authors au on a.authors_id = au.authors_id, articles_description ad where (a.articles_date_available IS NULL or to_days(a.articles_date_available) <= to_days(now())) and a.articles_id = a2t.articles_id and a.articles_status = '1' and a.articles_id = ad.articles_id and ad.language_id = '1' and td.language_id = '1' and a.articles_date_added > SUBDATE(now( ), INTERVAL '30' DAY)

 

[TEP STOP]

 

I have followed the read me instructions from start to finish.

 

Can you suggest what the problem might be?

 

Many Thanks

D4

Share this post


Link to post
Share on other sites
Hi,

 

I have just downloaded and installed the contribution.

 

After installing i can't seem to access my online store from the main www.mywebsite.com/catalog url however if i add www.mywebsite.com/catalog/index.php?cPath=1 it works fine and i can browse through my site no problem.

 

If i select the top level 'catalog' i am presented with a 500 Internal Server Error message.

 

I can still access my admin panel no problems.

 

Also in the right coloumn of the store front where i presume the article manager should be i am receiving the following error message:

I have followed the read me instructions from start to finish.

 

Can you suggest what the problem might be?

 

Many Thanks

D4

 

I had that error on my articles.php page and changed the query to:

 

select a.articles_id from (articles a, articles_to_topics a2t) left join topics_description td on a2t.topics_id = td.topics_id left join authors au on a.authors_id = au.authors_id, articles_description ad where (a.articles_date_available IS NULL or to_days(a.articles_date_available) <= to_days(now())) and a.articles_id = a2t.articles_id and a.articles_status = '1' and a.articles_id = ad.articles_id and ad.language_id = '1' and td.language_id = '1' and a.articles_date_added > SUBDATE(now( ), INTERVAL '30' DAY)

 

seems to work for some and not others - so give it a go but back up!

Share this post


Link to post
Share on other sites

hi. I have a problem :( I installed this contribution but I get his is an error I get when I try to log in my admin panel :(

 

1146 - Table 'my_osc_db.TABLE_CONFIGURATION' doesn't exist

select configuration_key as cfgKey, configuration_value as cfgValue from TABLE_CONFIGURATION

 

Please, help me. :(

 

Thank you!

Share this post


Link to post
Share on other sites

Sorry to hear some of you are having probs with my 'articles on home page module' hack. :(

Unfortunately I'm not an expert enough in PHP or OSC to be able to debug problems with other installs...I just literally pieced it together by guesswork from what others had posted before..and my store is heavily modded. It does work for me...but if there is someone out there who has a bit more experience than I do to make this hacked idea into a contrib proper the works for most people that would be great. Seems like there is a demand.

 

As an aside..I just bashed away at it again and made it into a cool info box too.

I'll post the url on this thread when I go live with the store so you can see it in operation and grab it if you want it.

 

Did anyone actually get my contrib to work? I'd love to hear if you did.

 

backup backup backup! :)

 

Cheers,

Stuart

 

hi. I have a problem :( I installed this contribution but I get his is an error I get when I try to log in my admin panel :(

 

1146 - Table 'my_osc_db.TABLE_CONFIGURATION' doesn't exist

select configuration_key as cfgKey, configuration_value as cfgValue from TABLE_CONFIGURATION

 

Please, help me. :(

 

Thank you!

Share this post


Link to post
Share on other sites
Sorry to hear some of you are having probs with my 'articles on home page module' hack. :(

Unfortunately I'm not an expert enough in PHP or OSC to be able to debug problems with other installs...I just literally pieced it together by guesswork from what others had posted before..and my store is heavily modded. It does work for me...but if there is someone out there who has a bit more experience than I do to make this hacked idea into a contrib proper the works for most people that would be great. Seems like there is a demand.

 

As an aside..I just bashed away at it again and made it into a cool info box too.

I'll post the url on this thread when I go live with the store so you can see it in operation and grab it if you want it.

 

Did anyone actually get my contrib to work? I'd love to hear if you did.

 

backup backup backup! :)

 

Cheers,

Stuart

 

Thank you, Stuart! Do you have any idea if this can be caused by the version no of My Sql? My v. is 4.0.16.

:(

 

Thank you!

Share this post


Link to post
Share on other sites
wanted to show new articles my home page in a module box so I hacked this together with code from earlier posts on this board (thankyou contributors!) and a bit of added html for the box by myself...my html code is not pretty info box wise but it works for me....thought it might be useful for others.

 

Use at your own risk...backup...etc

 

make a new file new_articles.php and pop it in your modules directory

 

hi plopstar , i try to use your idea , but to make a more complaint php file using the module boxes constructor, but i can't figure where i did a mistake , the module doestn show, any idea ?

 

 

 

<?php
/*
 $Id: new_articles.php, 2006/06/09 22:49:58 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License

cont rib installed : infobox skin


*/
?>
<!-- new_products //-->
<?php
 $info_box_contents = array();
 $info_box_contents[] = array('text' => 'NEWS');

// new contentBoxHeading($info_box_contents);
 new contentBoxHeading ($info_box_contents, true);

 $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);


 $info_box_contents = array();


while ($articles_new = tep_db_fetch_array($articles_new_query)) {

$info_box_contents[] = array('align' => 'center',
									   'params' => 'class="boxText" ',
'text' => '  <a href="' . tep_href_link(FILENAME_ARTICLE_INFO, 'articles_id=' . $articles_new['articles_id']) . '">' . $articles_new['articles_name']. '</a>');



  } // End of listing loop

} else {
?>
<?php
}

// new contentBox($info_box_contents); // bo 181818
  new contentBox ($info_box_contents, true, 4);  //16dec05 azerc for infobox skin

?>
<!-- new_articles_eof //-->


MS2

Share this post


Link to post
Share on other sites

again plopstar 2 points :

 

1. if the news exist in one language but not another , we still got a blank tiltle but the date is shown on the line

 

2. i don't know why , but without this moudle my page load in 1 s , with it 8 seconds !! :huh:

 

any idea ?


MS2

Share this post


Link to post
Share on other sites

:blush: I have just installed this great contribution and it works very well in my native language english. I did spend some time and Translate the contribution to Dutch for the dutch side of my site. There are no error messages but the articles that show in the english side will not show on the dutch side even though the articles have been translated to dutch. Maybe someone has had this problem and knows of a solution. The best way I can show this problem would be to give my url address www.larrylupole.com/catalog, and then just go to the duch side, the box is in the left column. I have looked around this forum and not yet found a solution.

Share this post


Link to post
Share on other sites

I have found my solution to my language problem. There really wasn't a problem in the first place, What I found out is that if you already have authors listed and articles written and then install a language the pre authors and articles will not show up on the new language side. You also can not edit the pre exsiting Authors and articles for the new language. If you want these authors, topics and articles the appear in the new language you must first remove them and even the topics, and then put them in new. I hope this will help any one who is having this problem. :D

Share this post


Link to post
Share on other sites

I have just added article manager 1.0. I have a template sitewith predetermined fields. I loaded the contib step by step. I have the Article managerin the admin window but nothing on the article.php page or on index page. Can you make any suggestions to help?

 

Thank you

Ocyro

Share this post


Link to post
Share on other sites

Hi,

 

Just curious how I could link to articles from another part of the site and that will let me keep the session id?

 

Thanks,

Jamie

Share this post


Link to post
Share on other sites

you could use the database entries for articles. Once you retrieve an article you call tep_href_link and construct the link. That function will create a session for the article link

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

×