Is it necessary to put just an .info file for version 5 of drupal? Or an upgrade is needed?

CommentFileSizeAuthor
#12 flickrstickr5_0.patch7.88 KBalex_b
#10 flickrstickr5.patch7.62 KBemmajane

Comments

mg2020’s picture

I have the same question...

But, I put a .info file in there, and had the image functionality in the post pages, but no way to administer (i.e. no way to enter API key). The access controls were in place, but no admin to be found.

mg2020’s picture

I have the same question...

But, I put a .info file in there, and had the image functionality in the post pages, but no way to administer (i.e. no way to enter API key). The access controls were in place, but no admin to be found.

bw’s picture

Hi,
I've encountered the same problem - created an info file and receive the ability to configure permissions for the module and view it in posts but nowhere can I configure the API key, etc.

We would be happy to pay for sponsorship for backporting this to Drupal 5.

best,
bww

wayfarer_boy’s picture

A rather quick fix (dirty hack) for this is to install the current Flickr module and use it to set up the API key. This will then create a site variable called flickr_api_key. Next, edit the FlickrStickr module, and change line 308 (the flickrstickr_getapikey function) so it returns this variable, and not the flickrstickr one:

Old code:

<?php
/**
 * get current flickr ap key
 * see: http://www.flickr.com/services/api/key.gne
 */
function flickrstickr_getapikey() {
  return variable_get('flickrstickr_flickrkey', '');
}
?>

New code:

<?php
/**
 * get current flickr ap key
 * see: http://www.flickr.com/services/api/key.gne
 */
function flickrstickr_getapikey() {
  return variable_get('flickr_api_key', '');
}
?>
lias’s picture

subscribing...

wessex’s picture

Subscribing
-this looks like it could be a superb user-friendly way of adding Flickr images to content.

toma’s picture

Assigned: Unassigned » toma

anyway to have this module for 5.1

Thanks

emmajane’s picture

I am working on an upgrade. I have the connection to Flickr working correctly (without having to use the flickr.module for the API key -- for that you need to update the flickrstickr_menu function and then make sure your access control is set). I have also changed the module so that the user may ONLY access their own Flickr images. For this part I have hooked into the flickr.module as I see no advantage in redoing the validation script for the flickr username.

While I am slightly embarrassed by how messy my script is, I am happy to distribute it. HOWEVER, it's still not working. Unfortunately when I try to drag and drop an image it is not (1) pasting the URL back to flickr (2) displaying the correct size of image. I assume this is a problem with the javascript functions, but I'm not sure where to start.

If I have TinyMCE enabled and I drag and drop this is the HTML that is pasted into the text area:
<img id="flickrstickrphoto3" style="display: inline" src="http://static.flickr.com/1334/571500480_6f4832f271_s.jpg#left_240_240" alt="" />

If I do not have TinyMCE enabled and I drag and drop this is what I get:
http://static.flickr.com/231/470018726_fb987ae648_s.jpg#left_240_240

Strangely (at least I think it's strange) there does not appear to be any javascript errors when I type, "javascript:" into the address bar in Firefox.

Has anyone else seen this kind of incorrect behaviour in previous versions?

Christefano-oldaccount’s picture

Can you provide a patch so we take a look at your code? The handbook has information on creating patches at http://drupal.org/patch

emmajane’s picture

StatusFileSize
new7.62 KB

flickrstickr.info:
name = FlickrStickr
description = Enable flickr image inserter in your node forms.
dependencies = flickr
package = Flickr

flickrstickr.module patch is attached.
I used the following command to generate it:
diff -up flickrstickr5/flickrstickr.module flickrstickr/flickrstickr.module > flickrstickr5.patch
I hope that's right...

As a reminder: I removed the ability to add anyone's flickr username within the "pop-up" selection tool so there is only one box to type into (the tag). Being able to type in anyone's name was not appropriate for the site I'm working on. (Of course you could still go back to your profile page and change the flickr username to someone else's... every system has its limitations).

Thanks for taking a look!

Anonymous’s picture

Hi, I'm trying to get the module to work – emmajane is there any way you could post the complete version 5 module?
I'm a bit of a n00b to drupal (and PHP), and my head is starting to rotate.

Many thanks

alex_b’s picture

StatusFileSize
new7.88 KB

Please patch with cvs diff -u -N

You can apply this patch easier by going to /flickrstickr directory and entering

patch -p0 < flickrstickr5_0.patch

alex_b’s picture

Sorry, I was too quick on the enter key: Thanks for the upgrade patch!

eagereyes’s picture

Subscribing ... looks like a cool idea

54drupal’s picture

IS there yet working version of this for Drupal 5. Need something very similar

wmostrey’s picture

Version: master » 5.x-1.x-dev
Status: Active » Fixed

The HEAD version has been upgraded to Drupal 5 and there is now a drupal5-dev version. This will be available for download later this day, when the drupal.org cron runs and created a zip from the files.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.