Advanced search  

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

Pages: [1]   Go Down

Author Topic: Can i have 6 differents categorys in one row?  (Read 4398 times)

0 Members and 1 Guest are viewing this topic.

Nefeli

  • Coppermine newbie
  • Offline Offline
  • Gender: Female
  • Posts: 10
    • Nefelokokkygia
Can i have 6 differents categorys in one row?
« on: May 28, 2007, 06:32:20 pm »

In the code:

Code: [Select]
echo "<CENTER>";
  include_once ("./Gallery/cpmfetch/cpmfetch.php");
  $objCpm = new cpm("./Gallery/cpmfetch/cpmfetch_config.php");
  $options = array('align' => 'center', "subtitle" => 'album {{aAid}}' );
  $objCpm-> cpm_viewMostVotedMediaFrom ("album=39,40,41,34,44,50", 1, 6, $options);

the output is:
(https://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fimg502.imageshack.us%2Fimg502%2F6384%2Faldc7.jpg&hash=8dd1b70d4dff930764ac82a9c9b5339d6147a145)

The point is that:
1. the line (40, 50, 41, 34, 41, 39) is not the one that I want (39, 40, 41, 34, 44, 50)
2. they appear two pictures from the album 41 and no one from the album 44

If i split the classes to 6 differents, like  this:
Code: [Select]
$objCpm-> cpm_viewMostVotedMediaFrom ("album=39", 1, 1, $options),
...............................................................................................
$objCpm-> cpm_viewMostVotedMediaFrom ("album=40", 1, 1, $options);
etc

i will receive 6 diferrents rows, something that i don't want.

How can i write the code for 1 row, 6 differents categorys and one output of cpm_viewMostVotedMediaFrom from each one of them?



Also, can you tell me please, if theres is a format parameter for insert the number of comments in a picture, in a  subtitle string?
I don't need the cpm_viewLastCommentedImages.

Thanks a lot.
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: Can i have 6 differents categorys in one row?
« Reply #1 on: May 29, 2007, 07:26:26 pm »

In the code:

Code: [Select]
echo "<CENTER>";
  include_once ("./Gallery/cpmfetch/cpmfetch.php");
  $objCpm = new cpm("./Gallery/cpmfetch/cpmfetch_config.php");
  $options = array('align' => 'center', "subtitle" => 'album {{aAid}}' );
  $objCpm-> cpm_viewMostVotedMediaFrom ("album=39,40,41,34,44,50", 1, 6, $options);

the output is:
(https://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fimg502.imageshack.us%2Fimg502%2F6384%2Faldc7.jpg&hash=8dd1b70d4dff930764ac82a9c9b5339d6147a145)

The point is that:
1. the line (40, 50, 41, 34, 41, 39) is not the one that I want (39, 40, 41, 34, 44, 50)
2. they appear two pictures from the album 41 and no one from the album 44

If i split the classes to 6 differents, like  this:
Code: [Select]
$objCpm-> cpm_viewMostVotedMediaFrom ("album=39", 1, 1, $options),
...............................................................................................
$objCpm-> cpm_viewMostVotedMediaFrom ("album=40", 1, 1, $options);
etc

i will receive 6 diferrents rows, something that i don't want.

How can i write the code for 1 row, 6 differents categorys and one output of cpm_viewMostVotedMediaFrom from each one of them?



Also, can you tell me please, if theres is a format parameter for insert the number of comments in a picture, in a  subtitle string?
I don't need the cpm_viewLastCommentedImages.

Thanks a lot.


There is no direct way to do what you want.

If I had to do it for myself, I would use the resultset return code to get back arrays instead of tables.  Then make the call six times (once for each category), then either invoke the table constructor manually, or use PHP in my pages to make the table I want.

For the last question, I do not believe I put anything in to show a sum of comments.







Logged
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

Nefeli

  • Coppermine newbie
  • Offline Offline
  • Gender: Female
  • Posts: 10
    • Nefelokokkygia
Re: Can i have 6 differents categorys in one row?
« Reply #2 on: May 30, 2007, 12:00:48 am »

Thanks for the answer vuud! :)

I will try and, if i have a good result, i will informe you!
Logged
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 20 queries.