|
List Info
Thread: RE: Photo galleries and the Upload API
|
|
| RE: Photo galleries and the Upload API |

|
2007-09-05 07:47:12 |
Megan - you'll need to post your code.
Regards,
Steve Drucker
CEO
Fig Leaf Software
Adobe / Google / Paperthin Premier Consulting and Training
Partners
http://www.figleaf.com
http://training.figleaf.c
om
-----Original Message-----
From: commonspot-bounces chattyfig.figleaf.com
[mailto:commonspot-bounces chattyfig.figleaf.com] On
Behalf Of Megan Smith
Sent: Tuesday, September 04, 2007 3:41 PM
To: Commonspot Mailing List
Subject: RE: [Commonspot] Photo galleries and the Upload
API
Not sure what I'm doing wrong, I'm assuming I'm missing the
obvious or I
messed up the code. But I created the renderhandler and
added it to the
formatted textblock but the element just seems to vanish
once I go to
element properties and select the renderhandler for the
textblock...any
advice?
Thanks,
Megan
-----Original Message-----
From: commonspot-bounces chattyfig.figleaf.com
[mailto:commonspot-bounces chattyfig.figleaf.com] On
Behalf Of Steve Drucker
Sent: Monday, August 13, 2007 3:39 PM
To: Commonspot Mailing List
Subject: RE: [Commonspot] Photo galleries and the Upload
API
Fun functions for creating a photo gallery out of a
formatted text
block:
<cfscript>
function hrefExtract(ctext) {
var found = 1;
var startpos = 1;
var alinks = arraynew(1);
var sturl = "";
var stID = "";
while (found) {
// find anchor tags
st=refindnocase('<(a|A)([
"a-zA-Z0-9_./:?&=-|]+)>',ctext,startpos,
"true");
if (st.pos[1] is 0) {
found = 0;
} else {
// grab full text of tag
cLink = mid(ctext,st.pos[1],st.len[1]);
if (clink does not contain
"javascript:") {
stLink = structnew();
stLink.tag =
mid(ctext,st.pos[1],st.len[1]);
// get URL (if any)
sturl =
refindnocase('href="([a-zA-Z0-9_./:?&=-|]+)&
quot;',stLink.tag,1,"true"
);
if (sturl.pos[1] gt 0) {
stLink.url =
mid(stlink.tag,sturl.pos[2],sturl.len[2]);
} else {
stLink.url="";
}
// get ID (if any)
stID =
refindnocase('id=["]*([a-zA-Z0-9_./:?&=-|]+)
["]*
',stLink.tag,1,"true");
if (stid.pos[1] gt 0) {
stLink.ID =
mid(stlink.tag,
stid.pos[1], stid.len[1]);
} else {
stLink.ID = "";
}
arrayappend(alinks,stlink);
}
startpos= st.pos[1] + st.len[1];
}
}
return alinks;
}
function imgExtract(ctext) {
var found = 1;
var startpos = 1;
var alinks = arraynew(1);
var sturl = "";
var stID = "";
while (found) {
// find anchor tags
st=refindnocase('<img ([
"a-zA-Z0-9_./:?&=-|]+)>',ctext,startpos,
"true");
if (st.pos[1] is 0) {
found = 0;
} else {
// grab full text of tag
cLink = mid(ctext,st.pos[1],st.len[1]);
stLink = structnew();
stLink.tag =
mid(ctext,st.pos[1],st.len[1]);
// get URL (if any)
sturl =
refindnocase('src="([a-zA-Z0-9_./:?&=-|]+)&q
uot;',stLink.tag,1,"true")
;
if (stURL.pos[1] gt 0) {
stLink.url =
mid(stlink.tag,stURL.pos[2],stURL.len[2]);
} else {
stLink.url="";
}
// get ID (if any)
stID =
refindnocase('id=["]*([a-zA-Z0-9_./:?&=-|]+)
["]*
',stLink.tag,1,"true");
if (stid.pos[1] gt 0) {
stLink.ID = mid(stlink.tag,
stid.pos[1], stid.len[1]);
} else {
stLink.ID = "";
}
arrayappend(alinks,stlink);
startpos= st.pos[1] + st.len[1];
}
}
return alinks;
}
</cfscript>
Regards,
Steve Drucker
CEO
Fig Leaf Software
Adobe / Google / Paperthin Premier Consulting and Training
Partners
http://www.figleaf.com
http://training.figleaf.c
om
-----Original Message-----
From: commonspot-bounces chattyfig.figleaf.com
[mailto:commonspot-bounces chattyfig.figleaf.com] On
Behalf Of Steve Drucker
Sent: Monday, August 13, 2007 12:29 PM
To: Commonspot Mailing List
Subject: RE: [Commonspot] Photo galleries and the Upload
API
We came up with an interesting solution...
Post images into a standard formatted text block, Then write
a render
handler that extracts the <IMG SRC> url's, and output
the images any way
that you want.
I'll try and post an example later today...
Regards,
Steve Drucker
CEO
Fig Leaf Software
Adobe / Google / Paperthin Premier Consulting and Training
Partners
http://www.figleaf.com
http://training.figleaf.c
om
-----Original Message-----
From: commonspot-bounces chattyfig.figleaf.com
[mailto:commonspot-bounces chattyfig.figleaf.com] On
Behalf Of Aaron
Goldweber
Sent: Monday, August 13, 2007 11:51 AM
To: Commonspot Mailing List
Subject: Re: [Commonspot] Photo galleries and the Upload
API
Hi, Harold-
That sounds like a great solution. Care to send a URL
showing it off?
Aaron
At 11:31 AM -0400 8/13/07, Harold Jones wrote:
>Hey Glen,
>What I have done in regards to photo galleries is create
a custom
>element that will store the image location using the
image field.
>
>Then i would write a renderhandler that will create an
XML document
>that i can then take into flash and create a flash based
photo gallery.
>
>The great thing about doing it this way is the idea of
having the
>ability to create multiple instances of the gallery
throughout your
>site.
>
>Hope this helps.
>
>Harold Jones
>Web Developer
>Interactive Services
>Savannah College of Art and Design
>P: 912.525.5244
>F: 912.525.4871
>hjones scad.edu
>
>
>
>
>On Aug 13, 2007, at 11:21 AM, Glenn Yonemitsu wrote:
>
>>Hi again. I am still in need of some guidance on
creating photo
>>galleries in Commonspot.
>>
>>Please share your experiences with creating one in
CS. Resources about
>>the Upload API would be appreciated as well.
>>
>>I have done my due diligence with searching online
for this info.
>>But it ended up nowhere and am hoping somebody here
has something to
>>get me on my way. Anyone?
>>
>>--
>>Glenn Yonemitsu
>>Technology Developer
>>
>>Krate
>>43-40 34th Street, Floor 2
>>Long Island City, NY 11101
>>T 718.729.7552
>>F 718.228.6229
>>http://www.kratedesign.com
>>
>>_______________________________________________
>>Commonspot chattyfig.figleaf.com
>>To change your subscription options or search the
archive:
>>http://chattyfig.figleaf.com/mailman/listinfo/commonspot
>>
>>Brought to you by Fig Leaf Software
>>Premier Authorized Paperthin Consulting and Training
>>http://www.figleaf.com http://training.figleaf.c
om
>
>
>
>
>_______________________________________________
>Commonspot chattyfig.figleaf.com
>To change your subscription options or search the
archive:
>http://chattyfig.figleaf.com/mailman/listinfo/commonspot
>
>Brought to you by Fig Leaf Software
>Premier Authorized Paperthin Consulting and Training
>http://www.figleaf.com http://training.figleaf.c
om
_______________________________________________
Commonspot chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/commonspot
Brought to you by Fig Leaf Software
Premier Authorized Paperthin Consulting and Training http://www.figleaf.com
http://training.figleaf.c
om
_______________________________________________
Commonspot chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/commonspot
Brought to you by Fig Leaf Software
Premier Authorized Paperthin Consulting and Training http://www.figleaf.com
http://training.figleaf.c
om
_______________________________________________
Commonspot chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/commonspot
Brought to you by Fig Leaf Software
Premier Authorized Paperthin Consulting and Training http://www.figleaf.com
http://training.figleaf.c
om _______________________________________________
Commonspot chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/commonspot
Brought to you by Fig Leaf Software
Premier Authorized Paperthin Consulting and Training http://www.figleaf.com
http://training.figleaf.c
om
_______________________________________________
Commonspot chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/commonspot
Brought to you by Fig Leaf Software
Premier Authorized Paperthin Consulting and Training
http://www.figleaf.com
http://training.figleaf.c
om
|
|
| RE: Photo galleries and the Upload API |
  United States |
2007-09-05 09:26:24 |
I'm using the photo gallery example you sent which is why I
replied
directly from that original email (see bottom). I'm not a
programmer so
I just copied it straight from the email. I pasted it into a
blank page
in dreamweaver, saved it as a .cfm in renderhandlers on the
dev site. I
went into the Commonspot admin, added the render handler in
manage
elements. I created a new page in the cms, inserted a
textblock,
inserted some images in the textblock and tried to add the
custom render
handler in element properties. Then the element seems to
disappear.
Megan
-----Original Message-----
From: commonspot-bounces chattyfig.figleaf.com
[mailto:commonspot-bounces chattyfig.figleaf.com] On
Behalf Of Steve
Drucker
Sent: Wednesday, September 05, 2007 8:47 AM
To: Commonspot Mailing List
Subject: RE: [Commonspot] Photo galleries and the Upload
API
Megan - you'll need to post your code.
Regards,
Steve Drucker
CEO
Fig Leaf Software
Adobe / Google / Paperthin Premier Consulting and Training
Partners
http://www.figleaf.com
http://training.figleaf.c
om
-----Original Message-----
From: commonspot-bounces chattyfig.figleaf.com
[mailto:commonspot-bounces chattyfig.figleaf.com] On
Behalf Of Megan
Smith
Sent: Tuesday, September 04, 2007 3:41 PM
To: Commonspot Mailing List
Subject: RE: [Commonspot] Photo galleries and the Upload
API
Not sure what I'm doing wrong, I'm assuming I'm missing the
obvious or I
messed up the code. But I created the renderhandler and
added it to the
formatted textblock but the element just seems to vanish
once I go to
element properties and select the renderhandler for the
textblock...any
advice?
Thanks,
Megan
-----Original Message-----
From: commonspot-bounces chattyfig.figleaf.com
[mailto:commonspot-bounces chattyfig.figleaf.com] On
Behalf Of Steve
Drucker
Sent: Monday, August 13, 2007 3:39 PM
To: Commonspot Mailing List
Subject: RE: [Commonspot] Photo galleries and the Upload
API
Fun functions for creating a photo gallery out of a
formatted text
block:
<cfscript>
function hrefExtract(ctext) {
var found = 1;
var startpos = 1;
var alinks = arraynew(1);
var sturl = "";
var stID = "";
while (found) {
// find anchor tags
st=refindnocase('<(a|A)([
"a-zA-Z0-9_./:?&=-|]+)>',ctext,startpos,
"true");
if (st.pos[1] is 0) {
found = 0;
} else {
// grab full text of tag
cLink = mid(ctext,st.pos[1],st.len[1]);
if (clink does not contain
"javascript:") {
stLink = structnew();
stLink.tag =
mid(ctext,st.pos[1],st.len[1]);
// get URL (if any)
sturl =
refindnocase('href="([a-zA-Z0-9_./:?&=-|]+)&
quot;',stLink.tag,1,"true"
);
if (sturl.pos[1] gt 0) {
stLink.url =
mid(stlink.tag,sturl.pos[2],sturl.len[2]);
} else {
stLink.url="";
}
// get ID (if any)
stID =
refindnocase('id=["]*([a-zA-Z0-9_./:?&=-|]+)
["]*
',stLink.tag,1,"true");
if (stid.pos[1] gt 0) {
stLink.ID =
mid(stlink.tag,
stid.pos[1], stid.len[1]);
} else {
stLink.ID = "";
}
arrayappend(alinks,stlink);
}
startpos= st.pos[1] + st.len[1];
}
}
return alinks;
}
function imgExtract(ctext) {
var found = 1;
var startpos = 1;
var alinks = arraynew(1);
var sturl = "";
var stID = "";
while (found) {
// find anchor tags
st=refindnocase('<img ([
"a-zA-Z0-9_./:?&=-|]+)>',ctext,startpos,
"true");
if (st.pos[1] is 0) {
found = 0;
} else {
// grab full text of tag
cLink = mid(ctext,st.pos[1],st.len[1]);
stLink = structnew();
stLink.tag =
mid(ctext,st.pos[1],st.len[1]);
// get URL (if any)
sturl =
refindnocase('src="([a-zA-Z0-9_./:?&=-|]+)&q
uot;',stLink.tag,1,"true")
;
if (stURL.pos[1] gt 0) {
stLink.url =
mid(stlink.tag,stURL.pos[2],stURL.len[2]);
} else {
stLink.url="";
}
// get ID (if any)
stID =
refindnocase('id=["]*([a-zA-Z0-9_./:?&=-|]+)
["]*
',stLink.tag,1,"true");
if (stid.pos[1] gt 0) {
stLink.ID = mid(stlink.tag,
stid.pos[1], stid.len[1]);
} else {
stLink.ID = "";
}
arrayappend(alinks,stlink);
startpos= st.pos[1] + st.len[1];
}
}
return alinks;
}
</cfscript>
Regards,
Steve Drucker
CEO
Fig Leaf Software
Adobe / Google / Paperthin Premier Consulting and Training
Partners
http://www.figleaf.com
http://training.figleaf.c
om
-----Original Message-----
From: commonspot-bounces chattyfig.figleaf.com
[mailto:commonspot-bounces chattyfig.figleaf.com] On
Behalf Of Steve
Drucker
Sent: Monday, August 13, 2007 12:29 PM
To: Commonspot Mailing List
Subject: RE: [Commonspot] Photo galleries and the Upload
API
We came up with an interesting solution...
Post images into a standard formatted text block, Then write
a render
handler that extracts the <IMG SRC> url's, and output
the images any way
that you want.
I'll try and post an example later today...
Regards,
Steve Drucker
CEO
Fig Leaf Software
Adobe / Google / Paperthin Premier Consulting and Training
Partners
http://www.figleaf.com
http://training.figleaf.c
om
-----Original Message-----
From: commonspot-bounces chattyfig.figleaf.com
[mailto:commonspot-bounces chattyfig.figleaf.com] On
Behalf Of Aaron
Goldweber
Sent: Monday, August 13, 2007 11:51 AM
To: Commonspot Mailing List
Subject: Re: [Commonspot] Photo galleries and the Upload
API
Hi, Harold-
That sounds like a great solution. Care to send a URL
showing it off?
Aaron
At 11:31 AM -0400 8/13/07, Harold Jones wrote:
>Hey Glen,
>What I have done in regards to photo galleries is create
a custom
>element that will store the image location using the
image field.
>
>Then i would write a renderhandler that will create an
XML document
>that i can then take into flash and create a flash based
photo gallery.
>
>The great thing about doing it this way is the idea of
having the
>ability to create multiple instances of the gallery
throughout your
>site.
>
>Hope this helps.
>
>Harold Jones
>Web Developer
>Interactive Services
>Savannah College of Art and Design
>P: 912.525.5244
>F: 912.525.4871
>hjones scad.edu
>
>
>
>
>On Aug 13, 2007, at 11:21 AM, Glenn Yonemitsu wrote:
>
>>Hi again. I am still in need of some guidance on
creating photo
>>galleries in Commonspot.
>>
>>Please share your experiences with creating one in
CS. Resources about
>>the Upload API would be appreciated as well.
>>
>>I have done my due diligence with searching online
for this info.
>>But it ended up nowhere and am hoping somebody here
has something to
>>get me on my way. Anyone?
>>
>>--
>>Glenn Yonemitsu
>>Technology Developer
>>
>>Krate
>>43-40 34th Street, Floor 2
>>Long Island City, NY 11101
>>T 718.729.7552
>>F 718.228.6229
>>http://www.kratedesign.com
>>
>>_______________________________________________
>>Commonspot chattyfig.figleaf.com
>>To change your subscription options or search the
archive:
>>http://chattyfig.figleaf.com/mailman/listinfo/commonspot
>>
>>Brought to you by Fig Leaf Software
>>Premier Authorized Paperthin Consulting and Training
>>http://www.figleaf.com http://training.figleaf.c
om
>
>
>
>
>_______________________________________________
>Commonspot chattyfig.figleaf.com
>To change your subscription options or search the
archive:
>http://chattyfig.figleaf.com/mailman/listinfo/commonspot
>
>Brought to you by Fig Leaf Software
>Premier Authorized Paperthin Consulting and Training
>http://www.figleaf.com http://training.figleaf.c
om
_______________________________________________
Commonspot chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/commonspot
Brought to you by Fig Leaf Software
Premier Authorized Paperthin Consulting and Training
http://www.figleaf.com
http://training.figleaf.c
om
_______________________________________________
Commonspot chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/commonspot
Brought to you by Fig Leaf Software
Premier Authorized Paperthin Consulting and Training
http://www.figleaf.com
http://training.figleaf.c
om
_______________________________________________
Commonspot chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/commonspot
Brought to you by Fig Leaf Software
Premier Authorized Paperthin Consulting and Training
http://www.figleaf.com
http://training.figleaf.c
om
_______________________________________________
Commonspot chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/commonspot
Brought to you by Fig Leaf Software
Premier Authorized Paperthin Consulting and Training
http://www.figleaf.com
http://training.figleaf.c
om
_______________________________________________
Commonspot chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/commonspot
Brought to you by Fig Leaf Software
Premier Authorized Paperthin Consulting and Training
http://www.figleaf.com
http://training.figleaf.c
om
_______________________________________________
Commonspot chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/commonspot
Brought to you by Fig Leaf Software
Premier Authorized Paperthin Consulting and Training
http://www.figleaf.com
http://training.figleaf.c
om
|
|
[1-2]
|
|