Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Multiple CPMFetch calls to different galleries in one Page?  (Read 22357 times)

0 Members and 1 Guest are viewing this topic.

cgc0202

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 199
Multiple CPMFetch calls to different galleries in one Page?
« on: August 30, 2006, 09:22:51 pm »

Hi,

I can do the CPMFetch now -- to display specific albums, different sizes of photos, etc., all over a page.  Thanks to vuud.  The basic format I use is:

  • Opening CPMFetch statement at the top of the page (I will call this simply as "Open CPMFetch"
  • Random image statements (RIS) -- all over the page, flanked by the "Open CPMFetch" and "Close CPMFetch"
  • Closing CPMFetch statement at the bottom of the page (I will call this simply as "Close CPMFetch"

There are reasons why I decided to have multiple PhotoGalleries  (CPGs), for focused topics.  [That is not the issue here, let us just accept that as a given.]  Let us call them CPG01,  CPG02, etc.  I have already tried specific CPMFetch for each of such galleries, and applied them in separate (non-CPG pages) to display focused images in individual pages.

I think the one I outline below is doable, although I have not tried it yet because I do not know the ramifications.  So, I am just asking for comments here on the best layout strategy if this is possible.  On the same page, can I have more than  one CPMFetch to display the images randomly?

For example:
CPMFetch01 -> for images from CPG01
CPMFetch02 -> for images from CPG02
etc.

In terms of the layout, basically, it would be either like these:

Layout 1
(On the same single page):

"Open CPMFetch01"
RIS (CPMFetch01)
"Close CPMFetch01"

and

"Open CPMFetch02"
RIS (CPMFetch02)
"Close CPMFetch02"

The point is to ensure that each CPMFetch is closed before the other is opened.

Layout 2 (On the same single page):  If the above is possible, is this valid?

"Open CPMFetch01" --> top of page

RIS (CPMFetch01)

******************
"Open CPMFetch02"
RIS (CPMFetch02)
"Close CPMFetch02"
******************

more RIS (CPMFetch01)

"Close CPMFetch01"  --> bottom of page

In layout 2, the images controlled by CPMFetch02 is sandwiched between images controlled by CPMFetch01.  Basically, CPG01 is a more general photogallery, while CPG02 is a more focused photogallery.  The images displayed by   CPMFetch01 would be common in a number of pages.  In contrast, the  images displayed by   CPMFetch02, CPMFetch03,  etc. would be unique for specific focused non-CPG pages.

Thanks.

CGC


« Last Edit: November 11, 2006, 05:39:42 am by GauGau »
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: Multiple CPMFetch calls to different galleries in one Page?
« Reply #1 on: August 31, 2006, 12:31:27 am »


This should be pretty easy to do in both the stable and in the dev version.  I am going to assume you are using the stable version (1.6.x) of cpmfetch.

Lets assume you have the stable version.

Here is how a normal session with cpmfetch looks.

Code: [Select]
<?php 
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/gallery");
$objCpm->cpm_viewRandomMedia(3,3);
$objCpm->cpm_close();
?>



Here is one marked up for how you could do it.  You can break up the PHP into blocks to scatter around your html.  You don't have to worry about closing one before the other either. 
Code: [Select]
<?php 
include "./cpmfetch/cpmfetch.php";

$objCpm = new cpm("/gallery");
$objCpm2 = new cpm("/gallery_other");
$objCpm3 = new cpm("/gallery_something");

$objCpm->cpm_viewRandomMedia(3,3);

$objCpm2->cpm_viewRandomMedia(3,3);

$objCpm3->cpm_viewRandomMedia(3,3);

$objCpm->cpm_close();
$objCpm2->cpm_close();
$objCpm3->cpm_close();

?>


Now the downside to all of this is that cpmfetch is going to open a db connection for each.   Very inefficent as making the dbconnection is the most time consuming part of using a database (generally speaking).

There is a work around in the development releases, but they are still development releases.   If you are not bridging your galleries with anything and want to try it out, grab one and install it for one and I will help you work through the issues of making it for multiple galleries.

Otherwise, you probably wont even notice the multiple connections.

Vuud



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

cgc0202

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 199
Re: Multiple CPMFetch calls to different galleries in one Page?
« Reply #2 on: August 31, 2006, 01:45:39 am »

Thanks Vuud,

Yeah, I am using the previous stable version, I believe 1.6.3 and has just downloaded the latest last night.  I have not tried it yet. But, with your previous help, I was able to create "test" php pages that integrates the previous CPMFetch  version.  It should work with the latest version also.

However, while trying the CPMFetch in actual applications, I realized that in some applications, the multiple CPMFetch may prove useful.  I am glad that you confirmed the feasibility of such strategy. 

Obviously, your scripting is more elegant and economical  -- to achieve the same goal.

Yes, I realize that multiple  CPMFetch in one page may slow the presentation.  Most likely, what I will do is have  two at most three per page, and group the various pages, so that each group will have a unique top and bottom sections.

I just read about the the dev version 1.9.4(?) last night.  In reading the dev version, I found out something in the brief instruction that may explain what blocked my integration of CPMFetch in some softwares.   It may actually  be just a simple issue of specifying the "album path" in relation to how the CPMFetch directory is placed in these softwares. I will read more about it and ask you questions about the dev version in a separate post.

It may take me a few days to set up the other photogallery, since I want to use actual galleries now rather than just test galleries.  Once I can make it to work, would you be interested to see how I am applying the CPMFetch.  I cannot post it publicly yet because I have to ask permission from the actual photographers  whose photos I included in the albums. Most have "Creative Commons" copyright notice but it is still nice and the proper thing to do to inform them first, before they are made public. Also, it is still a very raw "demo" format right now, not the best layout.

I am glad that this is doable.  Thanks again.

CGC
Logged

cgc0202

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 199
Common stylesheet for multiple CPMFetch
« Reply #3 on: August 31, 2006, 01:57:21 am »

A related issue Vuud,

Right now, based from the examples I read from your website, I placed the "style" script format of the presentation used by CPMFetch  in each page -- partly because I am still experimenting with the visual appearance of the "random" photo cells.  Once I am satisfied with a basic set of formats, is it possible to integrate the "style" script format in the stylesheet of the various themes?  And, how can this be recognized?

Alternatively, in the heading of the page I create, I generally have this:

<link rel="StyleSheet"  href="/styles/toti1.css"  type="text/css" title="toti Style Sheet">

which is my generic stylesheet, on top of the one specified by the various programs I use.

CGC
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: Multiple CPMFetch calls to different galleries in one Page?
« Reply #4 on: August 31, 2006, 05:02:44 am »

Thanks Vuud,

Yeah, I am using the previous stable version, I believe 1.6.3 and has just downloaded the latest last night.  I have not tried it yet. But, with your previous help, I was able to create "test" php pages that integrates the previous CPMFetch  version.  It should work with the latest version also.

However, while trying the CPMFetch in actual applications, I realized that in some applications, the multiple CPMFetch may prove useful.  I am glad that you confirmed the feasibility of such strategy. 

Obviously, your scripting is more elegant and economical  -- to achieve the same goal.

Yes, I realize that multiple  CPMFetch in one page may slow the presentation.  Most likely, what I will do is have  two at most three per page, and group the various pages, so that each group will have a unique top and bottom sections.

I just read about the the dev version 1.9.4(?) last night.  In reading the dev version, I found out something in the brief instruction that may explain what blocked my integration of CPMFetch in some softwares.   It may actually  be just a simple issue of specifying the "album path" in relation to how the CPMFetch directory is placed in these softwares. I will read more about it and ask you questions about the dev version in a separate post.

It may take me a few days to set up the other photogallery, since I want to use actual galleries now rather than just test galleries.  Once I can make it to work, would you be interested to see how I am applying the CPMFetch.  I cannot post it publicly yet because I have to ask permission from the actual photographers  whose photos I included in the albums. Most have "Creative Commons" copyright notice but it is still nice and the proper thing to do to inform them first, before they are made public. Also, it is still a very raw "demo" format right now, not the best layout.

I am glad that this is doable.  Thanks again.

CGC

If it comes to it, I can tell you how to modify cpmfetch_dao to reduce the overhead of multiple connections - if you have a delay in there.

I'd love to see it - in fact, I am starting a collection of cool sites using for later publishment.

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

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: Common stylesheet for multiple CPMFetch
« Reply #5 on: August 31, 2006, 05:04:33 am »

Right now, based from the examples I read from your website, I placed the "style" script format of the presentation used by CPMFetch  in each page -- partly because I am still experimenting with the visual appearance of the "random" photo cells.  Once I am satisfied with a basic set of formats, is it possible to integrate the "style" script format in the stylesheet of the various themes?  And, how can this be recognized?

Eh?

Do you mean can you set a class="" on elements generated by cpmfetch then yes.

otherwise rephrase your question for simple folk like me :D
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

cgc0202

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 199
Re: Multiple CPMFetch calls to different galleries in one Page?
« Reply #6 on: October 25, 2006, 10:49:41 pm »

Hi Vuud,

I finally had a chance to try the MultiGallery Fetch, using the procedure you suggested above -- it worked quite well.  I only tried  fetching 4 different galleries, and it was quite fast.  Not sure if it will be as fast when I have tens of thousands of photos, or when I include  all the 15 different galleries, but so far so good, as shown here, in this very rough example: 

Multiple CPMFetch calls to different galleries in one Page

to illustrate that it works.  The example is just a pilot test and a more presentable one will be created later.  However, there are some issues that I hope you can clarify.  Here is how I fetch images right now -- using set parameters for the table and the imagestyle, used by a number of the images shown in the different sections (the open and close php scripts are placed at the top and bottom of the page, respectively):

Example 1: Random images
<?php
$objCpm02->cpm_viewRandomMedia (1,5,array("tablestyle" => "test4","imagestyle" => "test1"));
?>
Example 2: Images from a specific album
<?php
$objCpm->cpm_viewRandomMediaFromAlbum(1,6,203,array("tablestyle" => "test1","imagestyle" => "test3"));
?>

Are the above "statements" consistent with the latest "command" syntax of CPMFetch? 


I understand intuitively how  the above  will look and how each section are formatted, by varying the styles  (compare for example: test2 vs. test3 , that is why I use this format. However, in the case of Categories, I tried to mimic the examples I found in the "Fist Full of Code":

Example 3: Images from a Category

<?php
$objCpm007->cpm_viewRandomMediaFromCategory(1,6,40,array("tablestyle" => "test2","imagestyle" => "test1"));
?>

but I could not get it to work.   No image was showing in Cordillera Autonomous Region (CAR): (please see bottom of the aforementioned link)

How is the above done? as well as the other example below:

Example 4: Images from a multiple categories and albums

// Would include categories 2 and 3 along with albums 10, 12 and 13.
$source = "cat=2,3:album=12,13,10";

Thanks, in advance.

CGC

************************************************
Sample style (part of a more lengthy variations of styles:
************************************************
.test1 { 
          border-style:solid;
          border-width:3px;
          border-color: #999999;
          width: 100px;
          padding: 1px;
          margin: 1px; }


img.test1 { 
          border-style:solid;
          border-width:3px;
          border-color: #999999;
          width: 100px;
          padding: 1px;
          margin: 1px; }
**************************************
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: Multiple CPMFetch calls to different galleries in one Page?
« Reply #7 on: October 26, 2006, 06:09:56 am »


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"

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.







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

cgc0202

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 199
Fetching multiple galleries.
« Reply #8 on: November 05, 2006, 10:25:04 pm »

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
Logged

cgc0202

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 199
Creating the option array
« Reply #9 on: November 06, 2006, 04:13:00 am »

Hi Vuud,

This  Demo Page2, uses the same set of images as  Demo Page 1, except for a different focus. It is intended as a non-profit, non-commercial outreach project:

"A Gift of the Filipino People to the Pupils, Parents and Teachers of Apperson Street School "

in response to a request by the parents and teachers of the school to teach their pupils about peoples of the world. Apperson Street School chose the Philippines and specific school to help and for their pupils to communicate with.

In regard to CPMFetch, I am trying to get its "option array features" to make the site even more educational.  More specifically, if a large image shows up, where indicated in Demo Page2, the large image will be accompanied by the following information, just below the image:

  • Title of the image
  • Album Name, Category 1, Category 2  => (Town, Province, Region)
  • Short Caption
  • by Photographer
  • Photographer's Address

and in a different section of the page, an associated article linked dynamically to the image, with the following information:

  • Title of the image
  • Album Name, Category 1, Category 2 => (Town, Province, Region)
  • by Author
  • Author's Address


  • Article: Detailed Description of the Place or Related Story

Notes: 

  • The Photographer, Uploader of the image, and Author of the article may not be the same person.

Some of the information will come from the following:
          
  • Custom fields for image description (leave blank if unused)
    - Field 1 name       
    - Field 2 name       
    - Field 3 name       
    - Field 4 name

Is there a way to add more "field names" for the additional unique sets of information?


From the fistfulofcode page, I tried to follow the "option array" and added it to the middle script:
<?php
$objCpm006->cpm_viewRandomMediaFrom (1,1,'album=3,4,5,6,7,8,9,10',array('title' => '%t' , 'album_name' => '%a' , 'message_author' => '%A' , 'tablestyle' => 'test2','imagestyle' => 'test6', 'imagesize' => 'int'));
?>

to extract some information (like the album name, at least), but nothing showed below the large image.

I hope I explained it well enough, and I would be very grateful if you can help me on this.

CGC
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: Creating the option array
« Reply #10 on: November 06, 2006, 06:05:45 am »

Hi Vuud,

This  Demo Page2, uses the same set of images as  Demo Page 1, except for a different focus. It is intended as a non-profit, non-commercial outreach project:

"A Gift of the Filipino People to the Pupils, Parents and Teachers of Apperson Street School "

in response to a request by the parents and teachers of the school to teach their pupils about peoples of the world. Apperson Street School chose the Philippines and specific school to help and for their pupils to communicate with.

In regard to CPMFetch, I am trying to get its "option array features" to make the site even more educational.  More specifically, if a large image shows up, where indicated in Demo Page2, the large image will be accompanied by the following information, just below the image:

  • Title of the image
  • Album Name, Category 1, Category 2  => (Town, Province, Region)
  • Short Caption
  • by Photographer
  • Photographer's Address

and in a different section of the page, an associated article linked dynamically to the image, with the following information:

  • Title of the image
  • Album Name, Category 1, Category 2 => (Town, Province, Region)
  • by Author
  • Author's Address


  • Article: Detailed Description of the Place or Related Story

Notes: 

  • The Photographer, Uploader of the image, and Author of the article may not be the same person.

Some of the information will come from the following:
          
  • Custom fields for image description (leave blank if unused)
    - Field 1 name       
    - Field 2 name       
    - Field 3 name       
    - Field 4 name

Is there a way to add more "field names" for the additional unique sets of information?


From the fistfulofcode page, I tried to follow the "option array" and added it to the middle script:
<?php
$objCpm006->cpm_viewRandomMediaFrom (1,1,'album=3,4,5,6,7,8,9,10',array('title' => '%t' , 'album_name' => '%a' , 'message_author' => '%A' , 'tablestyle' => 'test2','imagestyle' => 'test6', 'imagesize' => 'int'));
?>

to extract some information (like the album name, at least), but nothing showed below the large image.

I hope I explained it well enough, and I would be very grateful if you can help me on this.

CGC

I think you are looking for the subtitle attribute...  It goes in the option array.  You can do some of what you are asking in there...



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

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: Fetching multiple galleries.
« Reply #11 on: November 06, 2006, 07:05:48 pm »

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.

What is the error?  CpmFetch will not open a database connection until it needs one, but it should not give you an error if you issue a close.

I am not saying you are crazy, I am saying that is bad behavior and in my eyes a bug, so I will fix that if the error is what I think it is.  So don't try to program around it, I will fix it as a bug and you should not get any more errors.

Just post the error message


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

cgc0202

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 199
Re: Fetching multiple galleries.
« Reply #12 on: November 09, 2006, 06:11:34 am »

What is the error?  CpmFetch will not open a database connection until it needs one, but it should not give you an error if you issue a close.

I am not saying you are crazy, I am saying that is bad behavior and in my eyes a bug, so I will fix that if the error is what I think it is.  So don't try to program around it, I will fix it as a bug and you should not get any more errors.

Just post the error message


Thanks for responding Vuud,

Sorry for the delay.  I had to create a new gallery to re-create the error. Here is an abbreviation of the php script:

Open script
<?php
include "./cpmfetch/cpmfetch.php";
$objCpm001 = new cpm('/gal001');
.
.
.
$objCpm815 = new cpm('/gal815');
?>


middle script

All the galleries has been used, i.e.,

<?php
$objCpm001->cpm_viewRandomMediaFrom (1,1,'cat=3,37,38:album=1,2,3,4,5,6,7,8,9,10,17',array( 'tablestyle' => 'test2','imagestyle' => 'test6', 'imagesize' => 'int'));
?>

except gal815 -- (no mid php script to call any category or album in  gal815)


and the close php script

<?php
$objCpm001->cpm_close();
.
.
.
$objCpm815->cpm_close();
?>

Here is the error message I got:
Warning: mysql_close(): supplied argument is not a valid MySQL-Link resource in /home/.../.../cpmfetch/cpmfetch_dao.php on line 668

the number of times the error message is repeated depended on the number of galleries without the corresponding "middle script".  As each gallery is called (i.e., with middle script), the number of error message decreased by one -- until all error messages disappeared once they are all called.

CGC
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: Fetching multiple galleries.
« Reply #13 on: November 09, 2006, 03:34:51 pm »


Here is the error message I got:
Warning: mysql_close(): supplied argument is not a valid MySQL-Link resource in /home/.../.../cpmfetch/cpmfetch_dao.php on line 668

the number of times the error message is repeated depended on the number of galleries without the corresponding "middle script".  As each gallery is called (i.e., with middle script), the number of error message decreased by one -- until all error messages disappeared once they are all called.

Are these all using the same mysql database?

Vuud
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

cgc0202

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 199
Re: Fetching multiple galleries.
« Reply #14 on: November 10, 2006, 07:30:09 am »

Are these all using the same mysql database?

Vuud


Hi Vuud,

Each cpg installed -> has its own MySQL -> one gallery 

cpg (001) -> db-gal001 -> one gallery (e.g., gal001)
cpg (002) -> db-gal002-> one gallery (e.g., gal002)
etc.

CGC


Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: Fetching multiple galleries.
« Reply #15 on: November 10, 2006, 03:28:19 pm »

Hi Vuud,

Each cpg installed -> has its own MySQL -> one gallery 

cpg (001) -> db-gal001 -> one gallery (e.g., gal001)
cpg (002) -> db-gal002-> one gallery (e.g., gal002)
etc.

CGC


Something is getting confused in there... the simple answer is to leave off the close statements entirely and let php clean up any open mysql connections.

I will look and see what could be going wrong though... not sure why it would grip about that


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

cgc0202

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 199
Re: Fetching multiple galleries.
« Reply #16 on: November 11, 2006, 02:17:07 am »


Something is getting confused in there... the simple answer is to leave off the close statements entirely and let php clean up any open mysql connections.

I will look and see what could be going wrong though... not sure why it would grip about that



Thanks Vuud,

As I stated in an earlier post, I solved it by calling at least one album from each independent gallery.   If there is a better solution, that would be much appreciated.

However, there is another issue that I could not resolve.  I think the solution is quite simple, it just eludes me. I would request sending you the actual site URL though because I do not want to post URL online since the CPG is still 1.4.9.  I will post the errors I was getting as a separate  post.

Thanks again.

CGC
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: Fetching multiple galleries.
« Reply #17 on: November 11, 2006, 03:54:52 pm »


Thanks Vuud,

As I stated in an earlier post, I solved it by calling at least one album from each independent gallery.   If there is a better solution, that would be much appreciated.

However, there is another issue that I could not resolve.  I think the solution is quite simple, it just eludes me. I would request sending you the actual site URL though because I do not want to post URL online since the CPG is still 1.4.9.  I will post the errors I was getting as a separate  post.

Thanks again.

CGC

Oh that is even wierder... so you only get the message when you don't call the database?  Hmmm.  When you PM me the link to the site, also send me the version of php you are running.

Strange

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

cgc0202

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 199
Re: Fetching multiple galleries.
« Reply #18 on: November 12, 2006, 06:06:18 pm »

Oh that is even wierder... so you only get the message when you don't call the database?  Hmmm.  When you PM me the link to the site, also send me the version of php you are running.

Strange

Hi Vuud,

I just sent you an email:

"Re: Fetching multiple galleries. Added info sent"

that provides a link that includes details of the actual scripts used in creating the "CPMFetch generated images shown in example dynamic pages.  It also included the PHP version used in the webserver.

Thanks.

CGC
Logged
Pages: [1]   Go Up
 

Page created in 0.035 seconds with 20 queries.