Yii Framework Forum: AD Gallery Wrapper Extension - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

AD Gallery Wrapper Extension A Yii extension that exposes all functionality of jQuery AD-Gallery Rate Topic: -----

#1 User is offline   MadSkillsTisdale 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 101
  • Joined: 15-February 09
  • Location:New Orleans, LA

Posted 26 December 2010 - 09:15 PM

This extension allows you to transform a list of images into an attractive gallery with scrollable thumbnails. Features include:

  • Events that accept javascript callbacks
  • Optional separation of thumb and big image for bandwidth optimization
  • Extremely customizable


http://www.yiiframew...sion/adgallery/

Please comment with recommendations, problems, etc!
0

#2 User is offline   saiful 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 15
  • Joined: 27-May 09
  • Location:Indonesia

Posted 27 December 2010 - 05:34 AM

I got problem with ad-image-wrapper height when using adgallery package from your extension download. So I try to download js and css package from http://coffeescripte...ode/ad-gallery/ then it works great.
Thanks for your great job.
Thanks for the conversation,

Saiful
0

#3 User is offline   MadSkillsTisdale 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 101
  • Joined: 15-February 09
  • Location:New Orleans, LA

Posted 27 December 2010 - 12:27 PM

View Postsaiful, on 27 December 2010 - 05:34 AM, said:

I got problem with ad-image-wrapper height when using adgallery package from your extension download. So I try to download js and css package from http://coffeescripte...ode/ad-gallery/ then it works great.
Thanks for your great job.


Thanks for helping me test! I think I know the reason for this: in the ad-gallery sample code, some dimensions are set in the HTML, some are set by javascript, and some are set by CSS. I set all sizes with javascript in the onready section so that all of these sizes can be passed to the widget in one place (instead of some to the widget, some to css, etc). I did not explicitly set the size of the wrapper properly, nor did I explicitly set the size of the div containing the thumbs. However, the css included in the ad-gallery source does set these, which is why (I think) it worked after you re-downloaded CSS.

In version 1.0.1 (just uploaded) I set the size of the iamge wrapper specifically and set the size of the thumb container to the outerHieght(true) of the thumbnail images after the widget resizes them (if specified), so that it will be as big as the thumb, any borders, margins, and paddings.

Please try it out (with the widget stylesheet instead of the ad-gallery stylesheet) and tell me what you think! Please let me know if it doesn't work for you, and what browser/os you use.

I tested the widget in:

Firefox 3.6.13
Chrome 8.0.552.231
Safari 5.0.3 (6533.19.4)

And it works fine in all of these.
0

#4 User is offline   atachi 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 7
  • Joined: 12-March 11

Posted 15 June 2011 - 09:36 AM

how to use this extention.....????

sorry I am a beginner in Yii, how do I use this extension, because it is less clear explanation on the site, and also help in the path configurations include

above code is written in what files and directories

thank you
0

#5 User is offline   MadSkillsTisdale 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 101
  • Joined: 15-February 09
  • Location:New Orleans, LA

Posted 15 June 2011 - 12:05 PM

View Postatachi, on 15 June 2011 - 09:36 AM, said:

how to use this extention.....????

sorry I am a beginner in Yii, how do I use this extension, because it is less clear explanation on the site, and also help in the path configurations include

above code is written in what files and directories

thank you



You would put the code in your template file. The code should look something like this (as an example):

$this->widget('ext.adGallery.AdGallery',
        array(
            'imageList' => array(
                array(
                    'image_url' => 'images/1.jpg',
                    'thumb_url' => 'images/thumbs/t1.jpg',
                    'title' => 'Test tile',
                    'link' => 'http://www.google.com/',
                    'alt' => 'Something something',
                ),
                array(
                    'image_url' => 'images/2.jpg',
                    'title' => 'Test tile sdfjaskdf',
                    'link' => 'http://www.msn.com/',
                ),
                'images/3.jpg',
                'images/4.jpg',
                'images/5.jpg',
                'images/6.jpg',
                'images/7.jpg',
                'images/8.jpg',
                'images/9.jpg',
                'images/10.jpg',
                'images/11.jpg',
                'images/12.jpg',
            ),
        )
    );

0

#6 User is offline   atachi 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 7
  • Joined: 12-March 11

Posted 17 June 2011 - 09:35 AM

I have done that step, and the code that I put in protected / views / site / pages / about.php
but the error message is

Alias "ext.adGallery.AdGallery" is invalid. Make sure it points to an existing PHP file.

What should I do
0

#7 User is offline   MadSkillsTisdale 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 101
  • Joined: 15-February 09
  • Location:New Orleans, LA

Posted 29 July 2011 - 09:22 AM

View Postatachi, on 17 June 2011 - 09:35 AM, said:

I have done that step, and the code that I put in protected / views / site / pages / about.php
but the error message is

Alias "ext.adGallery.AdGallery" is invalid. Make sure it points to an existing PHP file.

What should I do



In what folder do you have the extension right now? Please start at the application level and list the path, for example

myapp/protected/extensions/adGallery
0

#8 User is offline   jfelix 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 28-November 09

Posted 03 October 2011 - 12:05 PM

Just copied the example widget code (see above) into protected/views/site/pages/about.php in order to make some first steps. Package 1.0.1 is installed in extensions folder of course.

I expected to see a nice photo gallery, but instead a vertical list of large original sized pictures - given by imageList array - with HTML bullet points in front appears. I'm troubleshooting for a while now trying to understand AdGallery .php and .js files but I don't see any obvious mistake I made.

What went wrong? Any ideas?
0

#9 User is offline   MadSkillsTisdale 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 101
  • Joined: 15-February 09
  • Location:New Orleans, LA

Posted 03 October 2011 - 12:39 PM

View Postjfelix, on 03 October 2011 - 12:05 PM, said:

Just copied the example widget code (see above) into protected/views/site/pages/about.php in order to make some first steps. Package 1.0.1 is installed in extensions folder of course.

I expected to see a nice photo gallery, but instead a vertical list of large original sized pictures - given by imageList array - with HTML bullet points in front appears. I'm troubleshooting for a while now trying to understand AdGallery .php and .js files but I don't see any obvious mistake I made.

What went wrong? Any ideas?



It sounds like it is not properly registering or publishing the CSS files. Are you using the default CSS file? If so, can you check to see if your page is including jquery.ad-gallery.css?
0

#10 User is offline   jfelix 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 28-November 09

Posted 03 October 2011 - 01:48 PM

Thanks for your quick response and helping solve the issue! You are right, the CSS file was not published in the assets folder because of wrong write/read access options for the subfolders under assets.
0

#11 User is offline   MadSkillsTisdale 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 101
  • Joined: 15-February 09
  • Location:New Orleans, LA

Posted 03 October 2011 - 02:04 PM

View Postjfelix, on 03 October 2011 - 01:48 PM, said:

Thanks for your quick response and helping solve the issue! You are right, the CSS file was not published in the assets folder because of wrong write/read access options for the subfolders under assets.


So we are all good? I just want to make surte before I just assume ;)
0

#12 User is offline   frocco 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 227
  • Joined: 17-February 10

Posted 03 October 2011 - 02:34 PM

what if you want to read an unknown number of images in a directory?
Can this be done with this extension?

Thanks
Regards,

Frank
0

#13 User is offline   MadSkillsTisdale 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 101
  • Joined: 15-February 09
  • Location:New Orleans, LA

Posted 03 October 2011 - 04:20 PM

View Postfrocco, on 03 October 2011 - 02:34 PM, said:

what if you want to read an unknown number of images in a directory?
Can this be done with this extension?

Thanks


Yes, but indirectly. You would read in the directory in php, make an array, and pass the array of image names to the extension. The extension does not know your directory structure or how it relates to your assets and the publishing of those assets. This function should help you get there:

http://www.php.net/m...ion.scandir.php
0

#14 User is offline   jfelix 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 28-November 09

Posted 03 October 2011 - 04:30 PM

View PostMadSkillsTisdale, on 03 October 2011 - 02:04 PM, said:

So we are all good? I just want to make surte before I just assume ;)

Yep ;-)
0

#15 User is offline   Bman900 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 47
  • Joined: 27-March 11

Posted 17 December 2011 - 04:50 PM

Is it possible to load information for image url and title from a data provider as I have the file names in a database?
0

#16 User is offline   yiiaddict 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 11-June 12

Posted 11 June 2012 - 05:46 AM

hello, i use this extension and looks fine

i need to get active image name or path from adGallery. how to i get it ?

thanks for any suggestion
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

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