The Joomla! Forum ™






Post new topic Reply to topic  [ 55 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Tue Dec 04, 2007 12:18 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Nov 30, 2007 3:10 pm
Posts: 20
Update 01/04/2008

TASK COMPLETED.

Final plugin attached to post, should be available on JED in a few days. README available online at:
http://www.robosquid.com/jigglr/jigglr_readme.htm

Cheers!




~~~~

Hey there - I'm Afeique Sheikh and I'll be heading up the Flickr images plugin for Joomla!

Quoting the Original GHOP Issue,

Quote:
Create a Joomla! v 1.5 plugin for Flickr Images.
Description

Using the plugins/content/loadmodule.php and loadmodule.xml files as an
example, create a plugin that will load a Flickr image when the end user
specifies {Flickr}NNNNN{/Flickr}. Translate those values to the embedded
HTML needed to display the image. When complete, create an installation
file for Joomla! v 1.5.


Having never worked with Joomla! before, I'm still reading through docs and playing around with the software, but I should get down to creating the plugin within a few days. Any tips or insights from more experienced coders would be fantastic :)

cheers!

Google Task

[me=AmyStephen]Changed subject slightly for sorting all threads to match against Google resource  :)[/me]

Task claimed: Nov 28 Due: Dec 26


You do not have the required permissions to view the files attached to this post.


Last edited by afq on Fri Jan 04, 2008 7:34 am, edited 1 time in total.

Top
 Profile  
 
PostPosted: Tue Dec 04, 2007 1:19 am 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Thu Mar 02, 2006 8:38 pm
Posts: 200
Location: Baltimore, MD
Hi Afeique. I've done some pretty extensive work integrating Joomla 1.5 and Flickr before so hopefully I can give you some good guidance with this plugin.

Embedding just one Flickr photo in a content item could get tricky. Building the source url requires some integration with the Flickr API to obtain the photo's server location. It is disproportionate with the level of the other development tasks in this contest.

So I would suggest developing a plugin to embed a Flickr slide show in a content item. All it requires to get the slide show from Flickr is a user id and a tag. Here is a blog posting that explains how to embed a Flickr slide show.

http://paulstamatiou.com/2005/11/19/how ... lideshows/


Top
 Profile  
 
PostPosted: Tue Dec 04, 2007 3:15 am 
Joomla! Champion
Joomla! Champion

Joined: Wed Nov 22, 2006 3:35 pm
Posts: 7056
Location: Nebraska
Welcome to Joomla!, Afeique, and thank you for participating in the GHOP contest.

First of all, we need you to return to your Google Task and respond to Comment 16. Thanks!  :)

When you have finished that, take a few months to read the post entitled: GHOP Contestants Please Read: Task Process Start to Finish for important updates on the contest.

kdevine will be your guide on this task and he has a very good concept for you to use in your task. He is also very well qualified to mentor this task and help you be successful. If you have questions or need assistance, do not hesitate to ask.

Good luck and have fun with Joomla!,
Amy :)

_________________
http://Twitter.com/AmyStephen
http://www.alltogetherasawhole.org/


Top
 Profile  
 
PostPosted: Wed Dec 05, 2007 2:03 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Nov 30, 2007 3:10 pm
Posts: 20
Thanks very much for the encouragment Amy.

Kdevine - For now, I'd like to try to use the Flickr API within my plugin to buildup image URLs so users can embed single or multiple images by parameters. If that turns out to be over my head, I'll definitely regress to the more simplified approach of placing an iframe slideshow as you recommended.

Along those lines, I'd like to either utilize either PEAR::HTTP_Request or PEAR::Flickr_API for my plugin, but I'm uncertain about the pros and cons of doing so. What do you think?

I can always integrate a simplified HTTP Request system of my own right into the plugin, but I think for obvious reasons I'd like to avoid that if possible.

I'm currently planning for my plugin to take the following parameters in the {flickr} content tag:

  • username
  • tag
  • photoid - overrides tag
  • limit - number of photos to display, default of four

so an example might be:

{flickr username=afq&tag=red&limit=4}

and if only the username is provided, it defaults to the four most recent public images for that user:

{flickr username=afq}

etc.

Does all this sound feasible to you?


Top
 Profile  
 
PostPosted: Thu Dec 06, 2007 4:24 am 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Thu Mar 02, 2006 8:38 pm
Posts: 200
Location: Baltimore, MD
Your plan for the plugin sounds feasible but In my opinion this is a lot to take on and it isn't necessary for the contest. I think it's great that you want to give it a shot though so I will try to help you along as much as I can.

I prefer using the phpFlickr toolkit for building Joomla extensions. It is PHP4 and PHP5 compatible and has a well developed class with all of the api calls as well as all of the other PEAR packages you will need.
http://phpflickr.com/

I would not recommend using PEAR::Flickr_API - it requires PEAR::XML_Tree which seems to have a bug with PHP 5. In fact I was unable to get this working in my development environment.
http://pear.php.net/bugs/bug.php?id=2653

Good luck with this. I'm here if you need me.


Top
 Profile  
 
PostPosted: Sat Dec 08, 2007 3:13 am 
Joomla! Champion
Joomla! Champion

Joined: Wed Nov 22, 2006 3:35 pm
Posts: 7056
Location: Nebraska
Afeique -

How is your task progressing? We would appreciate people checking in every few days to update the community on progress, and ask questions or request input.

Thanks!
Amy :)

_________________
http://Twitter.com/AmyStephen
http://www.alltogetherasawhole.org/


Top
 Profile  
 
PostPosted: Wed Dec 12, 2007 7:42 am 
Joomla! Champion
Joomla! Champion

Joined: Wed Nov 22, 2006 3:35 pm
Posts: 7056
Location: Nebraska
Afeique -

We would appreciate an update on your task. Is there anything we can do to help you be successful? We are asking all students to please check in every few days so that we know the status of your task, and are able to help, if needed.

Thanks!
Amy :)

_________________
http://Twitter.com/AmyStephen
http://www.alltogetherasawhole.org/


Top
 Profile  
 
PostPosted: Thu Dec 13, 2007 1:10 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Nov 30, 2007 3:10 pm
Posts: 20
Hello!

My project is going along smoothly - the only minor setback is the general lack of time with all the College stuff involved in my senior year.

I've gotten most of the required learning about Joomla! plugin development out of the way, so I'm finally getting down to coding and testing. I should have a beta plugin out by next week, and a stable version a few (4-5) days after that.

As for help...I certainly do have a number of questions, but they're simple things that I'll probably figure out on my own without bothering anybody. If I get stuck for too long, though, I'll definitely start asking around.

Cheers!


Last edited by afq on Fri Dec 14, 2007 2:16 am, edited 1 time in total.

Top
 Profile  
 
PostPosted: Thu Dec 13, 2007 1:13 am 
Joomla! Champion
Joomla! Champion

Joined: Wed Nov 22, 2006 3:35 pm
Posts: 7056
Location: Nebraska
Very good! Thanks so much for the update. Can't wait to start using the Flickr plugin!  8)

Amy :)

_________________
http://Twitter.com/AmyStephen
http://www.alltogetherasawhole.org/


Top
 Profile  
 
PostPosted: Thu Dec 13, 2007 9:54 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Nov 30, 2007 3:10 pm
Posts: 20
I've gotten a rough version of my plugin written up, but there's a packaging nuance that's preventing me from getting down to debugging and finishing it up.

Since I'm using the phpFlickr library in my plugin (a great suggestion from kdevine) and calling it using jimport() I'd like to package phpFlickr with my plugin and have it automatically installed to the joomla/libraries directory. Unfortunately, I can't find any resources detailing how to do this, or whether it's even possible (I'm assuming it is).

So the question is: how do I package libraries with my plugin such that they're automatically installed to the joomla/libraries directory?

Looking forward to hearing from anyone so gracious as to answer my little plea ;P


Last edited by afq on Thu Dec 13, 2007 9:57 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: Thu Dec 13, 2007 10:30 pm 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Thu Mar 02, 2006 8:38 pm
Posts: 200
Location: Baltimore, MD
You won't be able to save files to the libraries directory. The best option if you want an autoloader is to create your own import function to mimic jimport. Check libraries/loader.php for reference.

Code:
function myimport( $path ) {
   return JLoader::import($path, 'full/path/to/your/libraries', null);
}


Then you save your libraries to a directory under plugins/yourplugin and you can load them just like jimport. Make sense?

Edit: had the params in the wrong order in my example.


Last edited by kdevine on Thu Dec 13, 2007 10:43 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: Fri Dec 14, 2007 1:40 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Nov 30, 2007 3:10 pm
Posts: 20
Kdevine - awesome! Thanks so much for that, I got everything working slick and spiffy.

There was one last [minor] thing I wanted to do - create a custom uninstaller script. This is because my plugin utilizes phpFlickr's built-in cache-to-database feature, but I wanted to make it so that if the plugin was uninstalled then phpFlickr's caching table would be automatically dropped.

Buuuut...again, I can't seem to find any resources to learn how custom uninstallers work in Joomla!, so I'm hoping you might be able offer some pearls of wisdom.

Past that, the plugin works really smoothly and seems completely bug-free, so I think it's safe to say the plugin is now in beta. I've attached the current working version of my plugin, and I'd be much obliged for any and all feedback.

Concluding Notes
The plugin does exactly what I stated in my previous post, with some minor differences (details in the README). I've also decided to name the plugin something other than "The Joomla! Flickr Plugin" for sake of self-humor - I've titled it "Jigglr." :)


You do not have the required permissions to view the files attached to this post.


Last edited by afq on Fri Dec 14, 2007 2:17 am, edited 1 time in total.

Top
 Profile  
 
PostPosted: Sun Dec 16, 2007 1:12 am 
Joomla! Champion
Joomla! Champion

Joined: Wed Nov 22, 2006 3:35 pm
Posts: 7056
Location: Nebraska
Quote:
Jigglr lets you use {flickr} tags in your content to display flickr photos. How cool is that?


Hey! That's REAL cool!  8)

I spent about 45 minutes playing with this plugin. It is rich as can be!

#1 - I believe the Flickr API key is the one YOU signed up for - not each of your end users.

That way, there is a record of how much your plugin is used by people all over the world to access Flickr.

Apply for your API Key page in Flickr:
Describe the application you are planning to build:
You should include your product name or affiliation if applicable.

#2 - In the Plugin description - include Usage Instructions

Your readme was pretty helpful. Except - no where did you explain how to string these pieces together into a plugin. It took a little guessing, and then reading the code to realize ampersands, equal signs and keywords strung it all together. Even for some of the keywords, I had to review the code. So, make that really drop dead easy in your plugin description. (Most users will not look at the Readme.)

{flickr user=AmyStephen&size=thumbnail&limit=16&tags=joomlaoscms}


#3 - WOW! That is a mighty fine and powerful plugin - that library is FABULOUS. I think you have opened up nearly anything I can
conceive of wanting to do in flickr - all in one little plugin.
Quote:
This plugin utilizes the (super-awesome) phpFlickr library, available at: http://www.phpflickr.com/


#4 - there is only one thing missing - no ability to style it.

At least, wrap your output in a div for each unique phone stream (ex.
)

Then, add a CSS file with some basics in it - that people could use if they wanted styling.

Quote:
#jigglr img {
float:left;
margin:0 0px 4px 4px;
padding:4px;
}


Example of loading some CSS:
Quote:
      // Load Accordion CSS
      $document =& JFactory::getDocument();
      $document->addStyleSheet( JURI::base() . 'plugins/content/mootoolsaccordion.css', 'text/css', null, array( ' id' => 'StyleSheet' ) );


#5. Do the internationalization. It's not hard. If you are able to integrate that library - and figure out how to install and remove it - you can do the language strings in your sleep.

This will be HUGELY popular. And for good reason - it's is very cool.

I'll look for your response - sorry for the delay. As you might have guessed - we are swamped. Glad I spent some time with this one, though. LOVE it!  :-*
Amy

_________________
http://Twitter.com/AmyStephen
http://www.alltogetherasawhole.org/


Top
 Profile  
 
PostPosted: Sun Dec 16, 2007 9:36 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Nov 30, 2007 3:10 pm
Posts: 20
Awesome! I've integrated everything you requested in the attached build and it's revving to go!

I'm still uncertain about custom uninstaller scripts, though. I'd really like to make one, but I can't seem to find resources on how create one for a plugin, or even if it's possible to do that.


You do not have the required permissions to view the files attached to this post.


Top
 Profile  
 
PostPosted: Sun Dec 16, 2007 4:33 pm 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Thu Mar 02, 2006 8:38 pm
Posts: 200
Location: Baltimore, MD
I have only had time today to take a quick look at this but so far it looks very good. I like the flexibility.

I have PHP error reporting on full in my development environment and I'm getting two notices from you plugin:
Undefined offset Line 73
Undefined variable Line 153

I will add more comments when I have a little more time and try to help with the plugin uninstall (I noticed the files are not removed from the system either).


Top
 Profile  
 
PostPosted: Sun Dec 16, 2007 6:39 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Nov 30, 2007 3:10 pm
Posts: 20
Kdevine - I fixed up the errors you mentioned and made numerous other small tweaks (updated the comments, edited the README a little)

Am looking forward to hearing your thoughts on the uninstaller!


You do not have the required permissions to view the files attached to this post.


Top
 Profile  
 
PostPosted: Thu Dec 20, 2007 1:44 pm 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Thu Mar 02, 2006 8:38 pm
Posts: 200
Location: Baltimore, MD
Hi afeique,
Sorry to take so long getting back to you. I am looking at the code for a plugin uninstall and there is no section to execute an uninstall SQL. So, it looks like this is not possible. I'm not sure what that means for you. Have you considered using a File System cache instead of a DB? It might be more difficult to edit the library you are using but it would save you having to create and remove a database table for this plugin.

As far as the files not being removed when the plugin is uninstalled, it looks like it might be a bug in Joomla. I am going to post a report in the Q&T forum and see what response I get. It looks to me like your setup file is correct so please, if this is a bug, do not wait for it to be resolved. Continue on with the contest.


Top
 Profile  
 
PostPosted: Thu Dec 20, 2007 3:26 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Nov 30, 2007 3:10 pm
Posts: 20
I was afraid of SQL not being supported for plugins. I saw support for SQL on components and assumed incorrectly that it extended to plugins as well. For that reason, I'm actually considering eventually converting Jigglr into a component after the contest is done.

I think you're right that using a file cache would probably be the best alternative; my only minor qualm about that is the possibility that on sites that end up using this plugin heavily, that'll become too inefficient. I think the best method of attack would be to allow either/or, so I'll code in a little option to select specific caching methods but have it default to a file-cache.

As for there being a bug in Joomla! of that nature...well, I was kinda taken aback, but I'll do as you say and plow on. I'm considering writing a small patch of my own for that, but I'm guessing someone with more experience will probably address that before I get anything written up.

Again, thanks a lot!


Top
 Profile  
 
PostPosted: Thu Dec 20, 2007 8:37 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Nov 30, 2007 3:10 pm
Posts: 20
All right - so I was almost done programming the file-cache method for the plugin when I realized it would probably be far more confusing for the end user to have to choose between two caching methods (and that might lead to future issues)

So, I opted to stick with only database caching. The only drawback, mentioned before, is that if the user ends up uninstalling Jigglr, they'll have to manually drop the caching table...but given how simple that task is, I don't think it'll be too much of an issue.

That being said, the uninstall directions point out that it's necessary to delete the Jigglr folder and drop the caching table after uninstallation, so I think I'll go ahead and submit the plugin for review.


You do not have the required permissions to view the files attached to this post.


Last edited by afq on Sun Dec 23, 2007 7:45 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: Thu Dec 20, 2007 8:41 pm 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Thu Mar 02, 2006 8:38 pm
Posts: 200
Location: Baltimore, MD
Make sure to write in the instructions that caching can also be handled by the content component. Since your plugin embeds Flickr images in a content item, I think if caching is enabled for that component it will pick up the output from your plugin as well. (Test that first though)


Top
 Profile  
 
PostPosted: Sat Dec 22, 2007 2:34 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Nov 30, 2007 3:10 pm
Posts: 20
I checked and Joomla's built-in System Cache plugin caches Jigglr outputs just fine.

Updated the README. The updated plugin is attached to the first post, and I'm currently in the midst of adding the project to joomlacode.org.

I wonder, am I doing the "submit for review" part wrong? It doesn't seem like anyone's looked at my plugin, so I'm assuming everyone's REALLY swamped. (I guess it being Christmas doesn't help :P)


Last edited by afq on Sat Dec 22, 2007 2:35 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: Sun Dec 23, 2007 1:03 am 
User avatar
Joomla! Exemplar
Joomla! Exemplar

Joined: Thu Aug 18, 2005 8:43 pm
Posts: 7986
Location: New York
I installed, but when I enabled it it caused warning messages on my front end

Notice: Only variable references should be returned by reference in /home/xxxxxxxxx/public_html/rc4/libraries/joomla/cache/cache.php on line 115


This occurs whether or not i have the plugin caching on.

uninstall works fine.


update:

Also, it's not really right to expect tthe users to read a readme file that is in a zip file that they don't have to unzip. Instead put the instructions in the description. It's fine to do both.

_________________
So we must fix our vision not merely on the negative expulsion of war, but upon the positive affirmation of peace. MLK 1964.
http://officialjoomlabook.com Get it at http://www.joomla.org/joomla-press-official-books.html Buy a book, support Joomla!.


Last edited by mcsmom on Sun Dec 23, 2007 1:05 am, edited 1 time in total.

Top
 Profile  
 
PostPosted: Sun Dec 23, 2007 1:45 am 
Joomla! Champion
Joomla! Champion

Joined: Wed Nov 22, 2006 3:35 pm
Posts: 7056
Location: Nebraska
Ok - last time we talked, this was working great! Was the only change due to caching?

Image

Notice: Undefined variable: user in C:\Documents and Settings\AStephen\Desktop\Projects\websites\fresh\plugins\content\jigglr.php on line 118

I'll try to pay attention to see if you turn around a quick fix. We have been busy, you are right - mainly trying to keep up with over 100 contestants. My sincere apologies to you for the wait.  :P

Amy

_________________
http://Twitter.com/AmyStephen
http://www.alltogetherasawhole.org/


Top
 Profile  
 
PostPosted: Sun Dec 23, 2007 1:53 am 
User avatar
Joomla! Exemplar
Joomla! Exemplar

Joined: Thu Aug 18, 2005 8:43 pm
Posts: 7986
Location: New York
Interestingly, when I tried incuding the plugin in content I got these messages:


Warning: main() [function.main]: open_basedir restriction in effect. File(/usr/lib/php/PEAR.php) is not within the allowed path(s): ('.:/proc/uptime:/tmp:/home:/usr/local/lib/php:/usr/home:/usr/local/bin/') in /home/xxxx/public_html/rc4/plugins/content/jigglr/phpFlickr/PEAR/HTTP/Request.php on line 46

Warning: main(PEAR.php) [function.main]: failed to open stream: Operation not permitted in /home/xxxx/public_html/rc4/plugins/content/jigglr/phpFlickr/PEAR/HTTP/Request.php on line 46

Fatal error: main() [function.require]: Failed opening required 'PEAR.php' (include_path='.:/usr/lib/php:/usr/local/lib/php:/home/xxxx/public_html/rc4/plugins/content/jigglr/phpFlickr/PEAR') in /home/xxxxx/public_html/rc4/plugins/content/jigglr/phpFlickr/PEAR/HTTP/Request.php on line 46

_________________
So we must fix our vision not merely on the negative expulsion of war, but upon the positive affirmation of peace. MLK 1964.
http://officialjoomlabook.com Get it at http://www.joomla.org/joomla-press-official-books.html Buy a book, support Joomla!.


Top
 Profile  
 
PostPosted: Sun Dec 23, 2007 3:59 am 
Joomla! Champion
Joomla! Champion

Joined: Wed Nov 22, 2006 3:35 pm
Posts: 7056
Location: Nebraska
I get two of those errors when I install on my Internet accessible environment:

Quote:
Warning: require_once(PEAR.php) [function.require-once]: failed to open stream: No such file or directory in D:\VirtualWebsites\JoomlaPlace\JoomlaGHOP\plugins\content\jigglr\phpFlickr\PEAR\HTTP\Request.php on line 46

Fatal error: require_once() [function.require]: Failed opening required 'PEAR.php' (include_path='.;C:\php5\pear;D:\VirtualWebsites\JoomlaPlace\JoomlaGHOP\plugins\content\jigglr\phpFlickr/PEAR') in D:\VirtualWebsites\JoomlaPlace\JoomlaGHOP\plugins\content\jigglr\phpFlickr\PEAR\HTTP\Request.php on line 46


Same errors whether I turn caching on or off.

Apache/2.2.3 (Win32) PHP/5.2.

SVN 9734

_________________
http://Twitter.com/AmyStephen
http://www.alltogetherasawhole.org/


Top
 Profile  
 
PostPosted: Sun Dec 23, 2007 4:18 am 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Thu Mar 02, 2006 8:38 pm
Posts: 200
Location: Baltimore, MD
Amy, Elin the errors you are seeing are because the phpFlickr library isn't loading the PEAR packages properly. If you are able to edit the phpFlickr.php file please try the following change and see if it fixes the errors.

plugins/jigglr/phpFlickr/phpFlickr.php
comment out line 36
uncomment line 42


Top
 Profile  
 
PostPosted: Sun Dec 23, 2007 4:28 am 
Joomla! Champion
Joomla! Champion

Joined: Wed Nov 22, 2006 3:35 pm
Posts: 7056
Location: Nebraska
I am still getting the same errors:

Quote:
Warning: require_once(PEAR.php) [function.require-once]: failed to open stream: No such file or directory in D:\VirtualWebsites\JoomlaPlace\JoomlaGHOP\plugins\content\jigglr\phpFlickr\PEAR\HTTP\Request.php on line 46

Fatal error: require_once() [function.require]: Failed opening required 'PEAR.php' (include_path='D:\VirtualWebsites\JoomlaPlace\JoomlaGHOP\plugins\content\jigglr\phpFlickr/PEAR;.;C:\php5\pear') in D:\VirtualWebsites\JoomlaPlace\JoomlaGHOP\plugins\content\jigglr\phpFlickr\PEAR\HTTP\Request.php on line 46


Did I make the changes you suggested, correctly?
Quote:
/* phpFlickr Class 2.1.0
* Written by Dan Coulter (dan@dancoulter.com)
* Sourceforge Project Page: http://www.sourceforge.net/projects/phpflickr/
* Released under GNU Lesser General Public License (http://www.gnu.org/copyleft/lgpl.html)
* For more information about the class and upcoming tools and toys using it,
* visit http://www.phpflickr.com/ or http://phpflickr.sourceforge.net
*
*    For installation instructions, open the README.txt file packaged with this
*    class. If you don't have a copy, you can see it at:
*    http://www.phpflickr.com/README.txt
*
*    Please submit all problems or questions to the Help Forum on my project page:
*        http://sourceforge.net/forum/forum.php?forum_id=469652
*
*/
if (session_id() == "") {
    @session_start();
}

// Decides which include path delimiter to use.  Windows should be using a semi-colon
// and everything else should be using a colon.  If this isn't working on your system,
// comment out this if statement and manually set the correct value into $path_delimiter.
if (strpos(__FILE__, ':') !== false) {
    $path_delimiter = ';';
} else {
    $path_delimiter = ':';
}

// This will add the packaged PEAR files into the include path for PHP, allowing you
// to use them transparently.  This will prefer officially installed PEAR files if you
// have them.  If you want to prefer the packaged files (there shouldn't be any reason
// to), swap the two elements around the $path_delimiter variable.  If you don't have
// the PEAR packages installed, you can leave this like it is and move on.

// ini_set('include_path', ini_get('include_path') . $path_delimiter . dirname(__FILE__) . '/PEAR');

// If you have problems including the default PEAR install (like if your open_basedir
// setting doesn't allow you to include files outside of your web root), comment out
// the line above and uncomment the next line:

ini_set('include_path', dirname(__FILE__) . '/PEAR' . $path_delimiter . ini_get('include_path'));


Thanks Kevin for your help,
Amy :)

_________________
http://Twitter.com/AmyStephen
http://www.alltogetherasawhole.org/


Top
 Profile  
 
PostPosted: Sun Dec 23, 2007 4:41 am 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Thu Mar 02, 2006 8:38 pm
Posts: 200
Location: Baltimore, MD
Yes, you did. I just noticed though, you are on a Windows box? If that's right, then Amy, back out of the changes I asked you to make (because your's is not a problem with open_basedir). Once you are back to default, try changing the $path_delimiter variable in line 36 to the PHP defined var DIRECTORY_SEPARATOR or if that doesn't work maybe the Joomla defined DS will work. Anway, I think the delimiter isn't getting set properly. If all else fails, try setting it manually.

Elin, the change I originally suggested should work for you since you are getting the open_basedir error.


Top
 Profile  
 
PostPosted: Sun Dec 23, 2007 4:59 am 
Joomla! Champion
Joomla! Champion

Joined: Wed Nov 22, 2006 3:35 pm
Posts: 7056
Location: Nebraska
It gets a bit further, put then it doesn't find PEAR.php in this folder.

Quote:
Warning: require_once(PEAR.php) [function.require-once]: failed to open stream: No such file or directory in D:\VirtualWebsites\JoomlaPlace\JoomlaGHOP\plugins\content\jigglr\phpFlickr\PEAR\HTTP\Request.php on line 46

Fatal error: require_once() [function.require]: Failed opening required 'PEAR.php' (include_path='D:/VirtualWebsites/JoomlaPlace/JoomlaGHOP/plugins/content/jigglr/phpFlickr/PEAR') in D:\VirtualWebsites\JoomlaPlace\JoomlaGHOP\plugins\content\jigglr\phpFlickr\PEAR\HTTP\Request.php on line 46


At this point, we are changing the phpFlickr.php program.  I wonder why file caching always requires changes to phpFlickr code? I believe the database caching worked. Would simply adding instructions that a table must be manually delivered be enough?  Just thinking out loud.

Thanks, again, Kevin,
Amy :)

_________________
http://Twitter.com/AmyStephen
http://www.alltogetherasawhole.org/


Top
 Profile  
 
PostPosted: Sun Dec 23, 2007 8:01 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Nov 30, 2007 3:10 pm
Posts: 20
@ mcsmom
Thanks for the suggestion - I modded Jigglr's XML so users get prompted with big juicy formatted README right after installation. If you want to test it out, it's attached to this post.

@ amy
I'm not completely sure I understand what you're saying, but Jigglr uses database caching ONLY. In a previous post, I outlined why I eventually decided not to integrate file caching w/ Jigglr.

Unfortunately, the problem of phpFlickr not being able to properly load the PEAR libraries is a bit out of my experience - but if I were to suggest a solution, wouldn't it be all right just to hack the phpFlickr lib so it ONLY looked for the PEAR libs bundled w/ Jigglr? That way, we could just provide a relative path using PHP's DIRECTORY_SEPARATOR.

Edit:
As for that Notice you pointed out - I know the exact cause of the problem, but fixing it would require a bunch of extra conditionals that would really clutter the flow of the code. Since it's not a security flaw, is it absolutely imperative that I fix that Notice?

Unfortunately, I'm in the middle of reinstalling my test server, so I won't be able to test my idea out until later.

Cheers!


You do not have the required permissions to view the files attached to this post.


Last edited by afq on Mon Dec 24, 2007 12:13 am, edited 1 time in total.

Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 55 posts ]  Go to page 1, 2  Next



Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group