Showing images by a specific user Showing images by a specific user
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Showing images by a specific user

Started by David McKim, August 23, 2006, 12:29:43 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

David McKim

Now I spoke with Vuud personally on this, he said that currently he doesn't believe that cpmfetch can do this. He recommended that I post here. He said that an experienced php coder may be able to find a way to do this. Basically I would just like to be able to show the latest uploaded piece of art, by a specified user. I would really appreciate it if someone could help me out and code something up.

Thank you,


-D

vuud

#1
Quote from: David McKim on August 23, 2006, 12:29:43 AM
Now I spoke with Vuud personally on this, he said that currently he doesn't believe that cpmfetch can do this.

Heh, Vuud wrote the code... Vuud knows it cannot do this :D

If anyone has a bit of PHP experience and can help David out, I would recommend using the cpmfetch to return the recently added images as a dataset (instead of html) and then iterating over the array to yank a specific user only.  (set the requested number to some insane amount so you are sure to get the user (like 100 rows x 100 columns).

Since you are getting the dataset, you won't be displaying all of these.

Some examples of working with data from cpmfetch are here:
http://www.fistfullofcode.com/projects/copperminefetch/tests/test6.php

Anyway, I am a bit swamped right now - if no one else hits this, I will code something up...  I mostly wanted it posted to share the knowledge so to speak.


So long for now...

Vuud (now returning to his mindless activities)




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

Joachim Müller

Where is that random pic suppossed to appear - on a coppermine page or non-coppermine page?

vuud

Quote from: GauGau on August 23, 2006, 05:56:59 AM
Where is that random pic suppossed to appear - on a coppermine page or non-coppermine page?

He wants it outside of coppermine...  basically the only issue is that I dont have a provision to filter down to a specific user yet...

I did think of a good place in the interface to include it though :)

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

#4
Quote from: vuud on August 23, 2006, 01:07:16 AM
Heh, Vuud wrote the code... Vuud knows it cannot do this :D

Vuud is also, apparently addlebrained.

Yes, the code can do this... its one of those features I must have stuck in, but never documented and then forgot about...

Any of the calls that end in "from" can do this...  So for instance:

$objCpm->cpm_viewRandomMediaFrom(1,2,"owner=vuud,admin");

Works fine.

Any of the calls that take a source parameter supports this - completely forgot.

Even narrowing it down should work:

$objCpm->cpm_viewRandomMediaFrom(1,2,"owner=vuud,admin:cat=1,5");


Sorry I forgot about that... I should make sure it gets documented

:D Vuud


On the bright side, one less thing I need to get done.

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

freesouljah

I kind of have this figured out...but not perfected...

is there a way to have the owner as a variable?

$objCpm->cpm_viewLastAddedMediaFrom(1,2,"owner=$owner",$options)

or (I would prefer this method for .tpl files)

$objCpm->cpm_viewLastAddedMediaFrom(1,2,"owner={OWNER},$options)

I am using it to intergrate with a bridged phpbb database...I kind of have it working...but I have to integrate it directly into my .php file to get it to work..and it doesn't work exactly like I would like it to...

peace
8)


vuud

Quote from: freesouljah on September 19, 2006, 05:14:53 AM
I kind of have this figured out...but not perfected...

is there a way to have the owner as a variable?

$objCpm->cpm_viewLastAddedMediaFrom(1,2,"owner=$owner",$options)

or (I would prefer this method for .tpl files)

$objCpm->cpm_viewLastAddedMediaFrom(1,2,"owner={OWNER},$options)

I am using it to intergrate with a bridged phpbb database...I kind of have it working...but I have to integrate it directly into my .php file to get it to work..and it doesn't work exactly like I would like it to...

peace
8)


Whatzup?

Both of what you are looking to do are a function of the environment you are using cpmfetch in.  I don't know what to say more than that...

In the dharma,

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

freesouljah

Quote from: vuud on September 21, 2006, 09:16:14 PM
Whatzup?

Both of what you are looking to do are a function of the environment you are using cpmfetch in.  I don't know what to say more than that...

In the dharma,

Vuud



I can't get it to work using just the {OWNER} substitute in .tpl files....I can sortof get it playing with core php files of phpbb...but I would like to just use the same placeholder, but I don't know if that is possible...

that is mainly what I am concerned with...

it is also a question involving the username variable for a template inside the php of cpmfetch...

in the karma,
forrest


David McKim

Quote from: freesouljah on September 22, 2006, 10:34:48 AM
I can't get it to work using just the {OWNER} substitute in .tpl files....I can sortof get it playing with core php files of phpbb...but I would like to just use the same placeholder, but I don't know if that is possible...

that is mainly what I am concerned with...

it is also a question involving the username variable for a template inside the php of cpmfetch...

in the karma,
forrest



Yeah that is what I was trying to tell Vuud but he blocked my pms <_< apparently he didnt like my format... Anyways yea this code doesnt work on my site either, what exactly is required for this code to work?

Joachim Müller

So you sent vuud PMs and you wonder why he didn't react >:(?
This is your very last chance: read the board rules extra carefully. Read them now. Then re-read them. Read the section about not sending PMs to supporters once more. Then read all of the other rules. You have the time to read them even once more, because you're banned from posting for three days. Next ban will be permanent. You have been told repeatedly that you're suppossed to respect board rules.