return an array -or some type of list (<ul> <li> etc) return an array -or some type of list (<ul> <li> etc)
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

return an array -or some type of list (<ul> <li> etc)

Started by amyg, June 17, 2007, 11:12:27 PM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

amyg


CPMfetch + CPG seems to be a great solution for a gallery project I'm working on. (So - THANKS Vuud!)
Thanks to the documentation and helpful posts on this board - I've been able to figure out how to pull what I need from my Coppermine install  onto a webpage.
My issue is that I need the images to be list items rather than tables. ( I do understand how to add css classes to the <tr> and <td> tags - but I really need them to be <ul> and <li> tags.
From what I've figure out, my best bet is to use cpmfetch to return an array.
I gather that I need to use cpm::$returntype and print_r - but I can't seem to make it work. (maybe there's a better solution - rss?)

I'd be most appreciative if someone could point me in the right direction  - I have to image that I'm not the only designer that needs the images to be list items rather than tables.
Thanks in advance.

vuud

Quote from: amyg on June 17, 2007, 11:12:27 PM
CPMfetch + CPG seems to be a great solution for a gallery project I'm working on. (So - THANKS Vuud!)
Thanks to the documentation and helpful posts on this board - I've been able to figure out how to pull what I need from my Coppermine install  onto a webpage.
My issue is that I need the images to be list items rather than tables. ( I do understand how to add css classes to the <tr> and <td> tags - but I really need them to be <ul> and <li> tags.
From what I've figure out, my best bet is to use cpmfetch to return an array.
I gather that I need to use cpm::$returntype and print_r - but I can't seem to make it work. (maybe there's a better solution - rss?)

I'd be most appreciative if someone could point me in the right direction  - I have to image that I'm not the only designer that needs the images to be list items rather than tables.
Thanks in advance.


Yes, you are on the right track.

What you want to do is set the returntype to resultset 

The print_r just dumps the array, it makes it easy to see what you are working with - so its useful to see what you are getting back, but not useful for building your list.

You want to do a foreach over the array (see php.net) and print out all your <LI> stuff that way.

If you get stuck, post the code you have and maybe someone will poke it with a sharp object or something

Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

vuud

Quote from: amyg on June 17, 2007, 11:12:27 PM
I'd be most appreciative if someone could point me in the right direction  - I have to image that I'm not the only designer that needs the images to be list items rather than tables.

Actually, AFAIK, you are.  :D
Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

amyg

Thanks, I'll give it a shot - hopefully, I can make this work, but I suspect that I'm going to have to go another direction (other than CPG)

I do know that there are other designers who don't use coppermine specifically due to the tables  - as we like to design with css rather than tables. (layout of course, not DB tables - those we need ;)
I had hoped to use CPG to make file management easier for my client, and I thought this might work...
I love the amount of control that cpmFetch gives me in all the other areas - if only I could get those <ul> and <li> tags.

Thanks again for your help


vuud

Quote from: amyg on June 18, 2007, 11:42:21 PM
Thanks, I'll give it a shot - hopefully, I can make this work, but I suspect that I'm going to have to go another direction (other than CPG)

I do know that there are other designers who don't use coppermine specifically due to the tables  - as we like to design with css rather than tables. (layout of course, not DB tables - those we need ;)
I had hoped to use CPG to make file management easier for my client, and I thought this might work...
I love the amount of control that cpmFetch gives me in all the other areas - if only I could get those <ul> and <li> tags.

Thanks again for your help

I actually do that quite a bit for clients of mine (http://www.explosivo.com).  Its a great thought.  I've done everything from pure CSS layouts to hybrids and integration of other stuff.

The whole header at http://cpmfetch.fistfullofcode.com/ is css layout.  And on the body of the page, its html tables in a css layout design.

It's actually on my long list of things to do, provide different outputs.   I would say a lot of designer do like CSS, but from my experience only about half of them really embrace it.  Others get pithy over the "tiny little things" :)   At least the two guys that work for me are that way.  Funny that the biggest push to use CSS is from clients who are not sure why they want that - but its the cutting edge of technology and my cousins, friends, roommates, ex-girlfriends adopted simian told them it was a must for a web site. ;)

Anyway, bigger parts like this I tend to wait until I have a customer that is willing to pay for the development and allow the code to go back to the community.  Either that, or when I myself develop a need for it.  I know about enough CSS to make the cpmfetch site, and some dynamic rendering for AJAX and such, but not enough to make good decisions on how a css layout would work best.

If you learn the littleist bit of php, you can make it output whatever you want.

Vuud





Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

amyg

Yep - there's a lot to learn!
There are so many reasons to move beyond tables for layout - but that's another discussion ;-)
For my current project - I'm sticking with Photostack (pure css layout and very simple templating system.)
I will be keeping my eye on this project though and perhaps when I have a bit more time to figure out how to ditch the tables, I'll come back.
-Or maybe when I can budget a php developer in - I'll look you up.

Thanks again for all your work on this project.
best of luck to you
a

vuud

Quote from: amyg on June 19, 2007, 11:02:12 PM
Yep - there's a lot to learn!
There are so many reasons to move beyond tables for layout - but that's another discussion ;-)
For my current project - I'm sticking with Photostack (pure css layout and very simple templating system.)
I will be keeping my eye on this project though and perhaps when I have a bit more time to figure out how to ditch the tables, I'll come back.
-Or maybe when I can budget a php developer in - I'll look you up.

Thanks again for all your work on this project.
best of luck to you
a

Okay.  Like I said, its on my wish list - but I barely have time to get the stuff that really needs to be done here done.

If you try it and run into problems, post here and I can help.

Bye for now

Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco