GMTTDAN Posted September 10, 2006 Share Posted September 10, 2006 I've released my first version of wordpress article manager for OSC. It basically allows you to add articles / content to OSC using wordpress, and displays them by category. This is the support / questions topic. Here is the contribution: http://www.oscommerce.com/community/contributions,4522 Here is a demo: http://www.gmtt.co.uk/v5 I anyone can tell me howto put a link to this topic in the contribution description feel free. Also mess around with it as you please. Anyone feel like adding pagination? ;) Quote Link to comment Share on other sites More sharing options...
GMTTDAN Posted September 10, 2006 Author Share Posted September 10, 2006 Final version for a while has been released. It should do everything you want. Quote Link to comment Share on other sites More sharing options...
gty Posted September 10, 2006 Share Posted September 10, 2006 Thanks for the contribution i have been looking for something like this to impliment into my site. after installation all I get is a blank body. Header, footer, column left is all there but it's not pulling anything from the wordpress database. any suggestions? I have a few plugins installed on wordpress WP-Polls,Photopress,Opt-in Front Page, and BAStats. I have tried deactivaitng them but still no go. I also tried switching back to the default theme and still nothing?? I am using wordpress v2.0.3. Quote Link to comment Share on other sites More sharing options...
GMTTDAN Posted September 11, 2006 Author Share Posted September 11, 2006 Have you set the mysql details correctly in both the files? You should see lines looking like this: mysql_connect("localhost","",""); @mysql_select_db("") or die( "Unable to select database"); You need to fill them in with your wrdpress details from wp-config.php The format is mysql_connect("localhost",MYSQL USERNAME"","MYSQL PASSWORD"); @mysql_select_db("MYSQL DATABASE") or die( "Unable to select database"); If it still does not work, i'll be interested as to why, though it sounds as if it might be mysql details, especially if it is not showing the categories. Quote Link to comment Share on other sites More sharing options...
Guest Posted September 16, 2006 Share Posted September 16, 2006 Does/Can this contribution replace the index as per the Wordpress Integration 1.1 contribution? I see from your site that you don't have the blog on your start page. Quote Link to comment Share on other sites More sharing options...
GMTTDAN Posted September 21, 2006 Author Share Posted September 21, 2006 Yeah i'm sure it can. Just go to the language file and where you would put your text put include ("content.php"); Quote Link to comment Share on other sites More sharing options...
Guest Posted September 21, 2006 Share Posted September 21, 2006 (edited) Yeah i'm sure it can. Just go to the language file and where you would put your text put include ("content.php"); I'd like to add the author and date to the posts. How do I do this? Also the content.php still has blog.php listed under the breadcrumbs. Edited September 21, 2006 by mpm Quote Link to comment Share on other sites More sharing options...
Guest Posted September 22, 2006 Share Posted September 22, 2006 Yeah i'm sure it can. Just go to the language file and where you would put your text put include ("content.php"); This didn't work for me. Can you be more specific? I added it to this section of languages/english/index.php: define('TEXT_MAIN', 'include ("content.php")'); Quote Link to comment Share on other sites More sharing options...
Guest Posted September 26, 2006 Share Posted September 26, 2006 I managed to get the blog entry authors showing on the posts but only the user id number is showing. How would I get authors showing properly? Quote Link to comment Share on other sites More sharing options...
Pensive Posted September 24, 2007 Share Posted September 24, 2007 (edited) Thanks for a great contrib- so simple... It almost works for me!!! I get the little box with the articles listed from my wordpres DB (i put them in my column_right.php), but when i click on them content.php displays the foreboding error message -Unable to select database The wierd thing is I have copied and pasted the same database details from the wpcats.php file, which works. I can only think that mysql doesnt like the second access. This leads me to believe I should get wpcats.php to close the db connection once its got its info.....It doesnt appear to do that - can anyoen tell me how to ? Edited September 24, 2007 by Pensive Quote Link to comment Share on other sites More sharing options...
NerioDavid Posted October 4, 2007 Share Posted October 4, 2007 Can anyone upload a new version which support the newest wordpress 2.3? Quote Link to comment Share on other sites More sharing options...
brothermanifest Posted December 12, 2007 Share Posted December 12, 2007 I am getting: Warning: mysql_numrows(): supplied argument is not a valid MySQL result resource in /home/manifest/loveculture/includes/boxes/wpcats.php on line 39 What directory should the content.php file be uploaded to? Maybe this is what I am doing wrong Quote Link to comment Share on other sites More sharing options...
DawnG Posted January 3, 2008 Share Posted January 3, 2008 I am also getting the error mysql_numrows(): supplied argument is not a valid MySQL result resource in .../public_html/shop/includes/boxes/wpcats.php on line 39 - any ideas? Quote Link to comment Share on other sites More sharing options...
runningnaturals Posted January 20, 2008 Share Posted January 20, 2008 I am also getting the same line. I would love to use this contrib if this was fixed! Quote Link to comment Share on other sites More sharing options...
compuskill Posted March 29, 2008 Share Posted March 29, 2008 I am also getting the same line. I would love to use this contrib if this was fixed! Same here. Help ! Quote Link to comment Share on other sites More sharing options...
CLRH2O Posted April 2, 2008 Share Posted April 2, 2008 (edited) I would imagine that GMTTDAN doesn't even use OSC anymore - much less come to this forum. That's the problem with contributions..... they are great if you happen to find one WHILE the developer is actually making it... but anything more than a few weeks after that and your pretty much on your own. I cant tell you HOW MANY TIMES this same thing has happened to me. And of all things that would be useful for OSC to have integrated... WORDPRESS (and news modules in general) is most certainly one of them. Too bad only 2 contributions have ever been made that have anything to do with Wordpress and both are from 2006. And what's more both of creators are seemingly unreachable as well. Prove us WRONG devs - please! :D We would all thank you very much!!! Edited April 2, 2008 by CLRH2O Quote Link to comment Share on other sites More sharing options...
ajbird Posted April 26, 2008 Share Posted April 26, 2008 can I just add to this this would be ideal for our site as well at present the best i can do is to make osc and wp just look the same and it is useful but i could really do with more integration and i cant believe that there are only 2 contribs listed! Quote Link to comment Share on other sites More sharing options...
Guest Posted May 9, 2008 Share Posted May 9, 2008 anyone figure out how to implement this contribution? Quote Link to comment Share on other sites More sharing options...
ssnb Posted August 20, 2008 Share Posted August 20, 2008 anyone figure out how to implement this contribution? I really need a wordpress /blog that integrates with osc. But it seems this is all geared towards an older version - I am using rc2.2a and of course the latest Wordpress version. Have you any idea how to integrate the two? I googled it and once again, everything seems geared to older versions (with instructions that are not relevent to recent versions). Thanks for your suggestion! Sol Quote Link to comment Share on other sites More sharing options...
ssnb Posted August 22, 2008 Share Posted August 22, 2008 OK - I have done the research and got this working. For anyone interested, I have done all the hard work! Here is the solution: 1) There are two types of wordpress blogs: A. web based (restricted functionality, but easier to deal with) the web based wordpress can be found here: www.wordpress.com B. server based - ie you download this programme, then configure, then upload to your webhost and configure to match your website the downloadable version is here: www.wordpress.org You can read about the differences here: http://faq.wordpress.com/2006/05/07/wordpr...s-wordpressorg/ 2) I chose to download and integrate the wordpress feed into my site http://michaelwender.com/2006/10/06/embedd...mmerce-part-ii/ In case the above link doesn't work, here's the info 1. First, you will need to install OSC MS2.2 on your web server. This tutorial will assume that your OSC install is located in the default location for a typical OSC install: http://yourdomain.com/catalog/. 2. Next, install WordPress in the /catalog/ directory (i.e. http://yourdomain.com/catalog/wordpress/). Once you’ve installed WordPress, login to your WordPress admin and set Options > General > Blog address (URI) to “http://yourdomain.com/catalog/blog.php” (Note: If you would prefer to have your blog file named something other than blog.php, be sure to set this value accordingly and rename the file that you upload in step 4). 3. Now, just after the opening comments of the /catalog/includes/application_top.php file, add the following PHP code: // turn off WordPress themes and include the WordPress core: define('WP_USE_THEMES', false); require('./wordpress/wp-blog-header.php'); 4. Next, download these two files (blog.php and stylesheet.blog.css) and place them in the root of your OSC install. Additional Refinement: Displaying Blog Headlines on your Catalog Homepage For added functionality, here are instructions for including a WordPress static page and blog headlines on the homepage of your OSC store: 1. Before making this edit, you’ll want to make a backup of your default OSC homepage by renaming the file /catalog/index.php to index.ORIGINAL.php 2. Now, download this new index.php file and upload it to your /catalog/ directory. This new index file will display your last 4 blog headlines in a column on the right of the page body. Plus, the value for TEXT_MAIN found in /catalog/includes/languages/english/index.php will display in the left column of the page body. 3. In addition, starting on line 292 of this new index file, I have a switch inserted that will check for the presence of Vito Tardia’s Improved Include Page WordPress Plugin. If you install Vito’s plugin in WordPress, you can edit the iinclude_page() function call on line 294 to include the contents of any WordPress static page by simply editing the page ID in the function’s arguments. FYI, I am using OSC RC2.2a, Wordpress 2.6.1, STS, HTC and a number of other contribs www.boomskateboarding.com/store2/mobbblog.php I'm still working on the actual use of the blog, so don't expect too much in the way of instruction on how to use it, or content on the above! I will upload all of this as a contribution when I have chance, but for now the instructions above should be enough. Regards Sol Quote Link to comment Share on other sites More sharing options...
JonnyWalker Posted January 15, 2009 Share Posted January 15, 2009 Anyone have this working for wordpress 2.7?? Thanks Quote Link to comment Share on other sites More sharing options...
lowkey704 Posted January 22, 2009 Share Posted January 22, 2009 Warning: mysql_numrows(): supplied argument is not a valid MySQL result resource in /var/www/vhosts/themancaveoutletstore.com/httpdocs/content.php on line 108 Quote Yeah Yeah I am learning as I go... lol Link to comment Share on other sites More sharing options...
diy Posted February 13, 2009 Share Posted February 13, 2009 Warning: mysql_numrows(): supplied argument is not a valid MySQL result resource in /var/www/vhosts/themancaveoutletstore.com/httpdocs/content.php on line 108 Is it possible that wordpress changed their structure of the db !!! I m getting the error that Table wp_categories does not exist (it doesnt. Should it be there?) ) Quote Link to comment Share on other sites More sharing options...
Guest Posted February 14, 2009 Share Posted February 14, 2009 Is it possible that wordpress changed their structure of the db !!! I m getting the error that Table wp_categories does not exist (it doesnt. Should it be there?) ) I started fiddling with this last night and found the required table was not there. I could not get it to create by making new categories. I am new to wp, so I lot of suck and see is happening. In wp_cats.php, I made some changes that you can just replace the existing code with. They may work for you, as I said, I have only just begun to play with this on my test site. $query="SELECT ID, post_title from wp_posts ORDER BY post_category ASC limit 10"; $result=mysql_query($query); $num=mysql_numrows($result); $result = mysql_query ($query) or die(mysql_error()); $i=0; while ($i < $num) { $artist=mysql_result($result,$i,"ID"); $title=mysql_result($result,$i,"post_title"); $info_box_contents[] = array('text' => "<a href = 'content.php?cat=$artist'>$title</a>"); But I have a lot more fiddling to see it this is what I want. Quote Link to comment Share on other sites More sharing options...
Guest Posted February 14, 2009 Share Posted February 14, 2009 Ignore the above, there are other problems. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.