Yii Framework Forum: [Extension] jqPrettyPhoto - Yii Framework Forum

Jump to content

  • (2 Pages)
  • +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

[Extension] jqPrettyPhoto jqprettyphoto extension Rate Topic: -----

#1 User is offline   Antonio Ramirez 

  • Elite Member
  • Yii
  • Group: Yii Dev Team
  • Posts: 1,448
  • Joined: 04-October 10

Posted 22 October 2010 - 06:51 AM

Well, as my actual projects require the need to create extensions. Here is another one jqPrettyPhoto from the great lightbox-type jquery plugin prettyPhoto.

The extension in www.yiiframework.com is here

Any problems or suggestions here!
¿How long would it take for you to understand that you own nothing in this world?

www.ramirezcobos.com
www.2amigos.us
www.github.com/tonydspaniard
www.github.com/2amigos


Posted Image
1

#2 User is offline   Deimos 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 18
  • Joined: 27-July 10

Posted 25 November 2010 - 07:12 AM

Hi,
I have problem with load gallery. Single file load properly, but when I set attribute jqPrettyPhoto::PRETTY_GALLERY and set selector to list of links to images, there show only preloader..
Yii::import('ext.jqPrettyPhoto');
jqPrettyPhoto::addPretty('#gallery a',jqPrettyPhoto::PRETTY_GALLERY,jqPrettyPhoto::THEME_DARK_SQUARE);

echo '<div id="gallery">';
echo CHtml::link(URL_TO_MY_THUMBNAIL_1, URL_T0_MY_IMAGE_1);
echo CHtml::link(URL_TO_MY_THUMBNAIL_2, URL_T0_MY_IMAGE_2);
echo '</div>';


0

#3 User is offline   jacmoe 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 2,601
  • Joined: 10-October 10
  • Location:Denmark

Posted 04 December 2010 - 11:42 AM

Works a treat - thanks a lot! I like how non-intrusive it is. ;)
"Less noise - more signal"
0

#4 User is offline   Antonio Ramirez 

  • Elite Member
  • Yii
  • Group: Yii Dev Team
  • Posts: 1,448
  • Joined: 04-October 10

Posted 05 December 2010 - 01:14 PM

View PostDeimos, on 25 November 2010 - 07:12 AM, said:

Hi,
I have problem with load gallery. Single file load properly, but when I set attribute jqPrettyPhoto::PRETTY_GALLERY and set selector to list of links to images, there show only preloader..
Yii::import('ext.jqPrettyPhoto');
jqPrettyPhoto::addPretty('#gallery a',jqPrettyPhoto::PRETTY_GALLERY,jqPrettyPhoto::THEME_DARK_SQUARE);

echo '<div id="gallery">';
echo CHtml::link(URL_TO_MY_THUMBNAIL_1, URL_T0_MY_IMAGE_1);
echo CHtml::link(URL_TO_MY_THUMBNAIL_2, URL_T0_MY_IMAGE_2);
echo '</div>';




Could you please check the URLs? Do you have firebug? Can you check the XHR communication?
¿How long would it take for you to understand that you own nothing in this world?

www.ramirezcobos.com
www.2amigos.us
www.github.com/tonydspaniard
www.github.com/2amigos


Posted Image
0

#5 User is offline   Antonio Ramirez 

  • Elite Member
  • Yii
  • Group: Yii Dev Team
  • Posts: 1,448
  • Joined: 04-October 10

Posted 05 December 2010 - 01:14 PM

View Postjacmoe, on 04 December 2010 - 11:42 AM, said:

Works a treat - thanks a lot! I like how non-intrusive it is. ;)


Thanks Jacmoe!
¿How long would it take for you to understand that you own nothing in this world?

www.ramirezcobos.com
www.2amigos.us
www.github.com/tonydspaniard
www.github.com/2amigos


Posted Image
0

#6 User is offline   tronga 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 13
  • Joined: 29-December 10

Posted 30 December 2010 - 09:32 AM

Hmm that doesn´t work fo me, too.
I get hundreds of "itemSrc is undefined" errors in firebug, if I choose gallery.
A single Image... no problem but gallery won´t work.

Any ideas?

View PostAntonio Ramirez, on 05 December 2010 - 01:14 PM, said:

Could you please check the URLs? Do you have firebug? Can you check the XHR communication?

Posted ImagePosted Image
0

#7 User is offline   Antonio Ramirez 

  • Elite Member
  • Yii
  • Group: Yii Dev Team
  • Posts: 1,448
  • Joined: 04-October 10

Posted 30 December 2010 - 11:21 AM

When you select a gallery, you gotta make sure that the class name you point the gallery to be is correct. Check the inside code of the plugin, it is just a wrapper to easy the tasks of writing javascript functions for the js plugin.

Please, double check the class name. If you still have problems, please drop the html here and your PHP code to initialize the plugin and we try to help you.
¿How long would it take for you to understand that you own nothing in this world?

www.ramirezcobos.com
www.2amigos.us
www.github.com/tonydspaniard
www.github.com/2amigos


Posted Image
0

#8 User is offline   Antonio Ramirez 

  • Elite Member
  • Yii
  • Group: Yii Dev Team
  • Posts: 1,448
  • Joined: 04-October 10

Posted 30 December 2010 - 02:51 PM

View Posttronga, on 30 December 2010 - 09:32 AM, said:

Hmm that doesn´t work fo me, too.
I get hundreds of "itemSrc is undefined" errors in firebug, if I choose gallery.
A single Image... no problem but gallery won´t work.

Any ideas?


I have got now the same problem and it is a jqPrettyPhoto bug... I try to find out what is going on as the settings are in my opinion correct. I get you updated with it.

Thanks for your feedback
¿How long would it take for you to understand that you own nothing in this world?

www.ramirezcobos.com
www.2amigos.us
www.github.com/tonydspaniard
www.github.com/2amigos


Posted Image
0

#9 User is offline   Antonio Ramirez 

  • Elite Member
  • Yii
  • Group: Yii Dev Team
  • Posts: 1,448
  • Joined: 04-October 10

Posted 30 December 2010 - 03:10 PM

I have just checked and the extension as a COMPONENT doesn't work as expected WITH GALLERIES, it has a problem even though is the same script. Widget version works with GALLERIES as expected. Please, use WIDGET version until I figure out where is the problem.
¿How long would it take for you to understand that you own nothing in this world?

www.ramirezcobos.com
www.2amigos.us
www.github.com/tonydspaniard
www.github.com/2amigos


Posted Image
0

#10 User is offline   Antonio Ramirez 

  • Elite Member
  • Yii
  • Group: Yii Dev Team
  • Posts: 1,448
  • Joined: 04-October 10

Posted 30 December 2010 - 03:25 PM

View Posttronga, on 30 December 2010 - 09:32 AM, said:

Hmm that doesn´t work fo me, too.
I get hundreds of "itemSrc is undefined" errors in firebug, if I choose gallery.
A single Image... no problem but gallery won´t work.

Any ideas?


Now it works, I have updated the extension Component (not the widget as it works). It was a version bug of jqPrettyPhoto plugin. Also updated the extension so it allows users to include options (as the widget).

Thank you very much for your feedback to make this extension better.

Cheers
¿How long would it take for you to understand that you own nothing in this world?

www.ramirezcobos.com
www.2amigos.us
www.github.com/tonydspaniard
www.github.com/2amigos


Posted Image
0

#11 User is offline   tronga 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 13
  • Joined: 29-December 10

Posted 31 December 2010 - 03:37 AM

Hi,

thanks for the quick support.
The plugin now works and the gallery is very useful.

Greetings

Jan
Posted ImagePosted Image
0

#12 User is offline   guil182 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 65
  • Joined: 07-January 11

Posted 01 February 2011 - 05:36 AM

Hi Antonio,

I have a probleme with this extension :

in my view, i add this :

<?php
Yii::import('ext.jqPrettyPhoto');

$options = array(
    'slideshow'=>5000,
    'autoplay_slideshow'=>false,
    'show_title'=>false
);
// call addPretty static function
jqPrettyPhoto::addPretty('.gallery a',jqPrettyPhoto::PRETTY_GALLERY,jqPrettyPhoto::THEME_FACEBOOK, $options);


echo '<div id="gallery">';
echo CHtml::link("./images/angelus.jpg", "./images/angelus.jpg");

echo '</div>';

?>


in attachment, i show my project organisation.

And I have this error :

Non-static method jqPrettyPhoto::scriptName() should not be called statically

Thanks a lot for your help

Attached File(s)

  • Attached File  Yii.jpeg (116.69K)
    Number of downloads: 20

0

#13 User is offline   Antonio Ramirez 

  • Elite Member
  • Yii
  • Group: Yii Dev Team
  • Posts: 1,448
  • Joined: 04-October 10

Posted 01 February 2011 - 06:05 AM

Oops! it is a bug!

Thanks for sharing my friend

Can you change the function scriptName to protected static ? that will solve the issue
¿How long would it take for you to understand that you own nothing in this world?

www.ramirezcobos.com
www.2amigos.us
www.github.com/tonydspaniard
www.github.com/2amigos


Posted Image
0

#14 User is offline   Antonio Ramirez 

  • Elite Member
  • Yii
  • Group: Yii Dev Team
  • Posts: 1,448
  • Joined: 04-October 10

Posted 01 February 2011 - 06:17 AM

Bug fixed, you can now download the updated version: http://www.yiiframew.../jqprettyphoto/

Thanks again
¿How long would it take for you to understand that you own nothing in this world?

www.ramirezcobos.com
www.2amigos.us
www.github.com/tonydspaniard
www.github.com/2amigos


Posted Image
0

#15 User is offline   guil182 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 65
  • Joined: 07-January 11

Posted 01 February 2011 - 08:49 AM

Really only one Merit a "thanks" and it's you.
Thanks to spend a lot of time to help the others.

Guillaume
0

#16 User is offline   themroc 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 13-March 11

Posted 13 March 2011 - 05:29 PM

Hey :)

Firt of all... thanks for the component. The single image mode works perfect for me.
But I wonder how to accomplish the gallery mode without having as many links as images?
Trying your example:

echo '<div id="gallery">';
echo CHtml::link(URL_TO_MY_THUMBNAIL_1, URL_T0_MY_IMAGE_1);
echo CHtml::link(URL_TO_MY_THUMBNAIL_2, URL_T0_MY_IMAGE_2);
echo '</div>';


... gives me two images to click on. I'd prefer to have only one appetizer image to click on. Having 50+ images makes it too crowded on my page... did I totally get it wrong?

Thanks in advance
themroc
0

#17 User is offline   View Finder 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 42
  • Joined: 11-December 11

Posted 21 December 2011 - 09:28 PM

View Postthemroc, on 13 March 2011 - 05:29 PM, said:

Hey :)

Firt of all... thanks for the component. The single image mode works perfect for me.
But I wonder how to accomplish the gallery mode without having as many links as images?
Trying your example:

echo '<div id="gallery">';
echo CHtml::link(URL_TO_MY_THUMBNAIL_1, URL_T0_MY_IMAGE_1);
echo CHtml::link(URL_TO_MY_THUMBNAIL_2, URL_T0_MY_IMAGE_2);
echo '</div>';


... gives me two images to click on. I'd prefer to have only one appetizer image to click on. Having 50+ images makes it too crowded on my page... did I totally get it wrong?

Thanks in advance
themroc

I think you can hide the links with css.
0

#18 User is offline   ichigo 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 9
  • Joined: 08-August 11

Posted 23 March 2012 - 04:18 AM

hi , the jqPrettyPhotos light box is not working when i view the second page item…when i click the image, it just go to that image url without lightbox effect.
can you tell me, what i am wrong?

thanks
0

#19 User is offline   bennouna 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 1,166
  • Joined: 05-January 12
  • Location:Morocco

Posted 23 March 2012 - 05:21 AM

View Postichigo, on 23 March 2012 - 04:18 AM, said:

hi , the jqPrettyPhotos light box is not working when i view the second page item…when i click the image, it just go to that image url without lightbox effect.
can you tell me, what i am wrong?

thanks


Hi. Can you post the resulting HTML code containing the images?
0

#20 User is offline   ichigo 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 9
  • Joined: 08-August 11

Posted 23 March 2012 - 08:55 AM

View Postbennouna, on 23 March 2012 - 05:21 AM, said:

Hi. Can you post the resulting HTML code containing the images?


Hi Bennouna, thanks for the reply :),
here the html result of 1st page:
<div class="view">
<div id="gallery">
<a title="" href="/images/Battlefield 3.jpg">
<img width="120" height="100" src="/images/thumbs/COD3.jpg" alt="Battlefield 3" /></a>
</div>Battlefield 3<br /><a href="/index.php/site/contact">Call us</a><br />
</div>


when i click the 2nd page, there is no html result for the item in 2nd page, but it is same as the 1st page html result, i think, it is because of the pagination with ajax...right? i use CListView widget.

have anyone use it with CListView widget?

Regards,
fery
0

Share this topic:


  • (2 Pages)
  • +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users