Re: CAKEPHP 2.1.x on Pagodabox | foreach multiple items for each slide (bootstrap carousel)
Everything from the source is there, like I said, everything works as expected. If I remove the if($indexValue == 0) exception then I first get a blank slide and then the other Ads in slides. Now I want to change the code to display 3 Ads in each slide. Op 1-jan.-2013, om 21:05 heeft lowpass het volgende geschreven: > But are you only trusting what the browser displays? Are the other > elements there in the source? What do you see when you disable > javascript? What about when you remove the "active" class? > > On Tue, Jan 1, 2013 at 2:10 PM, Sven Pype wrote: >> Hi, >> >> The whole thing works perfectly and shows 1 ad for each slide. >> My goal is to have 3 ads from the db in 1 slide... >> >> I can't find a solution for it whit a foreach loop... >> >> Thanks anyway. >> >> Sven >> >> >> On Tue, Jan 1, 2013 at 8:05 PM, lowpass wrote: >>> >>> Is it possible that the other divs are being generated, but are >>> hidden? What do the item & active class rules look like? Or maybe some >>> JS is keeping the others from displaying? Try disabling the carousel >>> activation code. >>> >>> On Sun, Dec 30, 2012 at 1:55 PM, SvenP wrote: >>>> Yes, >>>> >>>> Each ad relates to a sponsor... works perfect. >>>> >>>> array( >>>> (int) 0 => array( >>>> 'Ad' => array( >>>> 'id' => '2', >>>> 'sponsor_id' => '0', >>>> 'title' => '...', >>>> 'body' => '...', >>>> 'link' => 'wwwcom' >>>> ), >>>> 'Sponsor' => array( >>>> 'id' => '8', >>>> 'name' => ..., >>>> 'contact_first_name' => ..., >>>> 'contact_name' => ..., >>>> 'contact_tel' => ..., >>>> 'contact_email' => ... >>>> ) >>>> ), >>>> >>>> >>>> On Sunday, December 30, 2012 7:20:54 PM UTC+1, cricket wrote: >>>>> >>>>> die(debug($ads)); >>>>> >>>>> Are you certain of the array structure? >>>>> >>>>> On Sat, Dec 29, 2012 at 5:39 PM, SvenP wrote: >>>>>> Hi, >>>>>> >>>>>> I'm looking for a way to show multiple 'Ads' / slide with a foreach >>>>>> loop >>>>>> from the db. ( each client has ads tied to them.) >>>>>> >>>>>> My code now works great but only shows one ad / slide. >>>>>> >>>>>> Thanks for your time! >>>>>> >>>>>> Sven >>>>>> >>>>>> Code: >>>>>> ___ >>>>>> >>>>>> >>>>>> $ad): >>>>>> if($indexValue == 0){?> >>>>>> >>>>>> >>>>> $ad['Ad']['title']?> >>>>>> >>>>>> >>>>> $ad['Ad']['body']?>>>>>> } else { ?> >>>>>> >>>>>> >>>>> $ad['Ad']['title']?> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> Like Us on FaceBook https://www.facebook.com/CakePHP >>>>>> Find us on Twitter http://twitter.com/CakePHP >>>>>> >>>>>> --- >>>>>> You received this message because you are subscribed to the Google >>>>>> Groups >>>>>> "CakePHP" group. >>>>>> To post to this group, send email to cake...@googlegroups.com. >>>>>> To unsubscribe from this group, send email to >>>>>> cake-php+u...@googlegroups.com. >>>>>> Visit this group at http://groups.google.com/group/cake-php?hl=en. >>>>>> >>>>>> >>>> >>>> -- >>>> Like Us on FaceBook https://
Re: CAKEPHP 2.1.x on Pagodabox | foreach multiple items for each slide (bootstrap carousel)
Hi, The whole thing works perfectly and shows 1 ad for each slide. My goal is to have 3 ads from the db in 1 slide... I can't find a solution for it whit a foreach loop... Thanks anyway. Sven On Tue, Jan 1, 2013 at 8:05 PM, lowpass wrote: > Is it possible that the other divs are being generated, but are > hidden? What do the item & active class rules look like? Or maybe some > JS is keeping the others from displaying? Try disabling the carousel > activation code. > > On Sun, Dec 30, 2012 at 1:55 PM, SvenP wrote: > > Yes, > > > > Each ad relates to a sponsor... works perfect. > > > > array( > > (int) 0 => array( > > 'Ad' => array( > > 'id' => '2', > > 'sponsor_id' => '0', > > 'title' => '...', > > 'body' => '...', > > 'link' => 'wwwcom' > > ), > > 'Sponsor' => array( > > 'id' => '8', > > 'name' => ..., > > 'contact_first_name' => ..., > > 'contact_name' => ..., > > 'contact_tel' => ..., > > 'contact_email' => ... > > ) > > ), > > > > > > On Sunday, December 30, 2012 7:20:54 PM UTC+1, cricket wrote: > >> > >> die(debug($ads)); > >> > >> Are you certain of the array structure? > >> > >> On Sat, Dec 29, 2012 at 5:39 PM, SvenP wrote: > >> > Hi, > >> > > >> > I'm looking for a way to show multiple 'Ads' / slide with a foreach > loop > >> > from the db. ( each client has ads tied to them.) > >> > > >> > My code now works great but only shows one ad / slide. > >> > > >> > Thanks for your time! > >> > > >> > Sven > >> > > >> > Code: > >> > ___ > >> > > >> > > >> > $ad): > >> > if($indexValue == 0){?> > >> > > >> > >> > $ad['Ad']['title']?> > >> > > >> > >> > $ad['Ad']['body']?> >> > } else { ?> > >> > > >> > >> > $ad['Ad']['title']?> > >> > > >> > > >> > > >> > > >> > -- > >> > Like Us on FaceBook https://www.facebook.com/CakePHP > >> > Find us on Twitter http://twitter.com/CakePHP > >> > > >> > --- > >> > You received this message because you are subscribed to the Google > >> > Groups > >> > "CakePHP" group. > >> > To post to this group, send email to cake...@googlegroups.com. > >> > To unsubscribe from this group, send email to > >> > cake-php+u...@googlegroups.com. > >> > Visit this group at http://groups.google.com/group/cake-php?hl=en. > >> > > >> > > > > > -- > > Like Us on FaceBook https://www.facebook.com/CakePHP > > Find us on Twitter http://twitter.com/CakePHP > > > > --- > > You received this message because you are subscribed to the Google Groups > > "CakePHP" group. > > To post to this group, send email to cake-php@googlegroups.com. > > To unsubscribe from this group, send email to > > cake-php+unsubscr...@googlegroups.com. > > Visit this group at http://groups.google.com/group/cake-php?hl=en. > > > > > > -- > Like Us on FaceBook https://www.facebook.com/CakePHP > Find us on Twitter http://twitter.com/CakePHP > > --- > You received this message because you are subscribed to the Google Groups > "CakePHP" group. > To post to this group, send email to cake-php@googlegroups.com. > To unsubscribe from this group, send email to > cake-php+unsubscr...@googlegroups.com. > Visit this group at http://groups.google.com/group/cake-php?hl=en. > > > -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en.
RE: Dealing with Image Uploads
My solution alows me to have a form that creates the record andere directly attach the picture to it. Thats how it works with me. I ad a word to the dictionary and in the same form I can select and upload a image for the word to illustrate it. Not sure if this is what you're looking for. Advantage+ schreef: > > >I am using Miles Johnson's Plugin for the uploads which works great now that I >have it working. > >Problem is this client wants to upload images for products which might may >many alternate images but from a user stand point it seems wrong to create the >product record, then go to Image Manager to upload photos. Same with news >section. Images for news and other places thruout the site. > > > >Just need a solution and hoping to find some ideas or suggestions on how to >handle that. > > > >Thanks all and happy new years to all J > > > >Dave > > > >From: cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] On Behalf >Of SvenP >Sent: Sunday, December 30, 2012 10:37 AM >To: cake-php@googlegroups.com >Subject: Re: Dealing with Image Uploads > > > >Hi, > > > >I have this in one of my apps: if I remember correctly I used: >http://github.com/josegonzalez/upload/zipball/master > > > >It's well explained in the readme section. You can set different >thumbnailsizes: > > > >Code in the model: > > > >public $actsAs = array( > > 'Upload.Upload' => array( > > 'foto'=> array( > > 'pathMethod' => 'flat', > > 'path' => '{ROOT}webroot{DS}files{DS}', > > 'thumbnailSizes' => array( > > 'xvga' => '1024x768', > > 'vga' => '640x480', > > 'thumb' => '80x80' > > )), > > 'audio1'=> array( > > 'pathMethod' => 'flat', > > 'path' => '{ROOT}webroot{DS}files{DS}' > > ), > > 'audio2'=> array( > > 'pathMethod' => 'flat', > > 'path' => '{ROOT}webroot{DS}files{DS}' > > ), > ), > ); > > >On Friday, December 28, 2012 6:44:38 AM UTC+1, advantage+ wrote: > >I need to figure out the best way from the backed the admin can upload images, >the tricky part is the site has all different kinds of images (small product >thumbs, large version, they want to be able to upload images into the jquery >slider on the home page, images for a new sections, featured product on index >page to name a few of the different sizes) > > > >And there is no way to know if they are even going to upload the right >dimensions for each type of image. > > > >What is the best way to do this? I cannot seem to think of anything having a >table for each_image how it relates to that page, that seems like the opposite >of what should be done. > > > >Any idea would be great. > > > >Thanks, Dave > >-- >Like Us on FaceBook https://www.facebook.com/CakePHP >Find us on Twitter http://twitter.com/CakePHP > >--- >You received this message because you are subscribed to the Google Groups >"CakePHP" group. >To post to this group, send email to cake-php@googlegroups.com. >To unsubscribe from this group, send email to >cake-php+unsubscr...@googlegroups.com. >Visit this group at http://groups.google.com/group/cake-php?hl=en. > > > >-- >Like Us on FaceBook https://www.facebook.com/CakePHP >Find us on Twitter http://twitter.com/CakePHP > >--- >You received this message because you are subscribed to the Google Groups >"CakePHP" group. >To post to this group, send email to cake-php@googlegroups.com. >To unsubscribe from this group, send email to >cake-php+unsubscr...@googlegroups.com. >Visit this group at http://groups.google.com/group/cake-php?hl=en. > > -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en.