Frank Vèssia Posted February 15, 2011 Share Posted February 15, 2011 I have an old website running with drupal. I want install PW in a subdir for a new blog section. In home page of main site it could be nice to show a block like "latest from the blog" and show some links to pages of PW. Is there a way to access to some functions of PW maybe calling some files in my home page or i have to do it manually? Link to comment Share on other sites More sharing options...
apeisa Posted February 15, 2011 Share Posted February 15, 2011 Sevarf: you are probably looking for this: http://processwire.com/api/include/ Link to comment Share on other sites More sharing options...
Frank Vèssia Posted February 15, 2011 Author Share Posted February 15, 2011 wow, yes, thanks i didn't noticed this in the guide... Link to comment Share on other sites More sharing options...
ryan Posted February 15, 2011 Share Posted February 15, 2011 Let me know if that solution doesn't work... I haven't tried including ProcessWire from Drupal. Because many ProcessWire's class names are fairly generic, like "Page" and "User" and "Session", etc., there is a possibility for class name conflicts. This will be a non-issue once we standardize on PHP 5.3 which has built-in namespace support. But it is a possible issue right now when including ProcessWire from other apps. Another approach is to setup a template in ProcessWire to act as a web service, outputting an RSS feed, HTML snippet or JSON feed, and have your other CMS (or just javascript) pull in the data that way. This is the approach I have used in the past, though admittedly to pull data from WordPress into ProcessWire. Link to comment Share on other sites More sharing options...
Frank Vèssia Posted February 25, 2011 Author Share Posted February 25, 2011 Ryan, i got this error : Unknown User:/?/:Error:Undefined class constant 'guestUserID' (line 69 of /home/hdps/domains/ioaffiliato.com/public_html/fp/wire/core/Users.php) Link to comment Share on other sites More sharing options...
ryan Posted February 25, 2011 Share Posted February 25, 2011 What is the context of where that error occurred? Are you trying to load ProcessWire from Drupal? If so, it sounds to me like Drupal probably has it's own "User" class that is conflicting with ProcessWire's. You may be better off using ProcessWire as a web service in this case. That RSS feed module I posted yesterday would be a great way to pull the data into Drupal. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now