Hi Vuud,
I did as you adviced in the previous post, and here is a further repost:
Whew... I got a bit busy and the forum just piles up
Anyway, you may want to adopt the ...From( calls instead of the ...FromAlbum or ...FromCategory
The ...From uses the $source string to define what to get. The other calls simply take your request and redirect into this one, so its an extra step for the code. Although the performance would be negligable...
Holy crap! The amount of terraced gardens in some of those shots is incredible! The thumbnails could use a bit better resolution, but the images are great in there.
Anyway...
cpm_viewLastAddedMediaFrom ( $rows, $columns, $source, [array $options = ""])
So $source would be something like:
$source = "cat=1"
This worked. Thanks. Here is my middle php ("open" and "close" phps not included):
<?php
$objCpm006->cpm_viewRandomMediaFrom (1,1,'album=3,4,5,6,7,8,9,10',array( 'tablestyle' => 'test2','imagestyle' => 'test6', 'imagesize' => 'int'));
?>
However, it took me sometime to respond to your suggestion because the
Demo Page was based from fifteen (15) multiple galleries. And, what I found is that, I can place the open (top.php) and close (top.php) statements for the 15 multiple CPG galleries on the common pages, only if there is a corresponding middle.php (as shown above) that will make use of the open and close statements for all the multiple galleries. Otherwise, error messages will show when the script is trying to close what was opened. So, I had to add photos in all the 15 galleries, and in key categories and albums to create the
Demo Page.
CpmFetch was designed with speed in mind - which is one of the main reasons that I don't call directly into CPG. Before anyone combusts, I am not saying CPG is slow or anything, just it has to do a lot more to do the forum than I need to display a few photos.
Your bottlenecks are going to be bandwidth and the database. Although the database should be okay with returning 10,000 rows fast - I wonder how cpmfetch will do with the table rendering...
If you run into speed issues, let me know - I'd be interested in helping optimize.
I guess I did not explain myself well in my previous post. I did not mean tens of thousands of rows, but more Fetch sampling tens from tens of thousands images to create a simple page, as shown in the
Demo Page.
The current number of photos must be around high hundreds to a thousand or so. It is not yet intolerable but I have noticed a significant slowing compared to the first demo page I showed previously. This was more evident from the photos not showing almost intantaneously as before. Also, the page width was "resizing" as the images that fills the width of a page showed up, more gradually rather than instantenously, as before. [Although there are times when this is due to internet connection speed.]
I shall report back if I run into problems as more photos get into the database, the goal is as high as 500,000 photos, accessed by the fifteen (15) multiple galleries, showing simple pages like the
Demo Page. At present, during the coming year, the photo database may grown by about 5-10,000 the first year, and perhaps 10-20,000 per year during the next few years. I hope there is a way of optimizing the speed by the time the impact on speed becomes more of an issue..
Finally, instead of including it in this post, the next issue that I wish to consult with you is the option array, or how to add more option features to the script:
<?php
$objCpm006->cpm_viewRandomMediaFrom (1,1,'album=3,4,5,6,7,8,9,10',array( 'tablestyle' => 'test2','imagestyle' => 'test6', 'imagesize' => 'int'));
?>
Thanks again, for the help.
CGC