Member
Member
edwink   13-06-2011, 18:59
#1

I've tried to understand what has been written on this in other post, but really can'tf figure this out.

// register the scripts needed addPluginScript('');
So, what do I change in the above, so I get the plugin working, if this is at all possible.

Member
Member
micheall   14-06-2011, 02:59
#2

What you'll need to do is take the line you have there and create a function to echo the stylesheet meta data. Then you'll need to use zp_register_filter to call the function to the theme_head filter.

Take a look at the plugin architecture tutorial for some examples and guidance:
http://www.zenphoto.org/news/zenphoto-plugin-architecture

Member
Member
edwink   14-06-2011, 21:31
#3

Ummm.. Guess I need to forget about it. Sounds to difficult

Member
Member
sbillard   14-06-2011, 23:11
#4

You can also enable the deprecated functions plugin and turn off the option to give an error for "addPluginScript".

Member
Member
newbie   13-08-2011, 00:54
#5

Apologies for bumping an old thread, I wanted to post my solution. I did do a search for other Shutterfly extensions, but no luck.

In the Shutterfly.php file:

  • comment out the addPluginScript script

In the image.php file within your theme:

  • add the following before the tag

This will include the css file in the header and allow the Shutterfly code to work.

I wasn't a fan of the existing button (personal preference). I also noticed that if you weren't logged in to Shutterfly first it wouldn't add the photo the cart.

So, I also added the following:
In Shutterfly.php:

  • add the following after the function printShutterfly() line
    echo '
    function submitform()
    {
    document.forms["shutform"].submit();
    }
    ';
  • comment out the
Member
Member
newbie   13-08-2011, 01:55
#6

Since the last 2 echo lines didn't post properly, here is the code again.

echo ' Sign into Shutterfly and click '; echo ' here to get a copy.';

Member
Member
newbie   13-08-2011, 01:55
#7

Since the last 2 echo lines didn't post properly, here is the code again.

echo ' Sign into Shutterfly and click '; echo ' here to get a copy.';

Member
Member
sbillard   13-08-2011, 01:59
#8

So, do you actually read the notice on your posts being monitored? Please do not double post. Give the moderators some time to moderate your submissions. We have lives to live, you know.

Member
Member
newbie   13-08-2011, 02:05
#9

My intention was not to double post. I made an error in the code and was hoping the moderator would delete the first of the duplicates. When it wasn't I corrected it so they were both the same. If I had the option to delete my own post I would, but I do not.

I was simply trying to give back to the community.

Member
Member
kagutsuchi   13-08-2011, 04:38
#10

It's not too much of a problem. We tend to have many people that disregard the notice, and it can get a bit annoying, so we try to point it out to help make everyone's lives a bit easier. By the way, I've gone ahead and deleted one of the duplicates.

We do appreciate any contributions. Keeping extensions up-to-date and providing DIY instructions will certainly help other users looking for the same functionality.

Administrator
Administrator
acrylian   13-08-2011, 09:34
#11

And we give feedback as well. Instead of putting an echo statement for CSS in the head of your theme manually you actually should use the theme_head filter as a replacement for the addPluginScript call. See the plugins article on the user guide about that.

Member
Member
newbie   13-08-2011, 13:18
#12

Alright, based on the feedback, here is a better solution.

In shutterfly.php
replace the addPluginScript line with:
`
zp_register_filter('theme_head','cssadd');

function cssadd() {
echo '';
}
`
No changes are required to image.php

If you wish to replace the button with a link add

echo ' function submitform() { document.forms["shutform"].submit(); } ';
after the function printShutterfly() line

and comment out the

Administrator
Administrator
acrylian   13-08-2011, 15:54
#13

That's better..;-) What do you think of taking this plugin over and creating a page for it so users can download it? See our contributor guidelines on info and suggestions.

Member
Member
newbie   13-08-2011, 16:19
#14

Thanks for the offer, but I'm not ready to take over the plugin. I'm still way to new the tool and its functions.

Administrator
Administrator
acrylian   13-08-2011, 16:34
#15

All right, was actually more of a suggestion since you seem to have direct use for it.

Member
Member
edwink   07-09-2011, 17:12
#16

Going to try it on a bit later this month. Now on a much needed break. Should not even be on a computer

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.