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 2 [3] 4 5 6   Go Down

Author Topic: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)  (Read 139284 times)

0 Members and 1 Guest are viewing this topic.

Dagon

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
« Reply #40 on: September 08, 2005, 01:53:50 am »

PHPBB Bridge

A few users in the other forums here have had issues with phpbb bridge and using cpmfetch.

Aparently, and I have no first hand knowledge of this, but phpbb bridge seems to do something where your photos are added in with the wrong user_id, or at least one that does not exist.

If you have phpbb and are using the bridge to it... and you cannot get photos to display on the cftest page, then check the following...

Get the owner_id of the photos from the pictures table and make sure that Id exists in the users table.

If not, create another cpg user... that will be the real owner for the photos and all will work well

If you create another user, only the photos for that user shows up.

What the bridge is doing is creating photos with the phpbb user_id located in the phpbb_users table.  The cpgxxx_users table is not used in bridged mode. 

It would be nice if CpmFetch could be configured to look at the phpbb_users table for the user_id as an option.  Is there any way to do this?

Thanks!
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
« Reply #41 on: September 08, 2005, 05:03:45 am »

PHPBB Bridge

A few users in the other forums here have had issues with phpbb bridge and using cpmfetch.

Aparently, and I have no first hand knowledge of this, but phpbb bridge seems to do something where your photos are added in with the wrong user_id, or at least one that does not exist.

If you have phpbb and are using the bridge to it... and you cannot get photos to display on the cftest page, then check the following...

Get the owner_id of the photos from the pictures table and make sure that Id exists in the users table.

If not, create another cpg user... that will be the real owner for the photos and all will work well

If you create another user, only the photos for that user shows up.

What the bridge is doing is creating photos with the phpbb user_id located in the phpbb_users table.  The cpgxxx_users table is not used in bridged mode. 

It would be nice if CpmFetch could be configured to look at the phpbb_users table for the user_id as an option.  Is there any way to do this?

Thanks!

Nope.  Your best bet may be to do something to read in the phpbb users and write equivalent settings to the cpg forum.

I don't see adding this in the future.  Someone else may do a hack for it... 




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

ohfishing

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 29
Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
« Reply #42 on: October 09, 2005, 09:58:26 pm »

Hello, I am having some rookie trouble. I thought I would also post my problem in this thread becuase it was not awnsered in another. I installed cpmfetch to phpbb 2.0.17 I ran the cftest page and got error 75 ROOT and error 80 config init ... the path to the directory is wrong and i dont know how to fix it ..
Code: [Select]
You set your partial URL to stl-web/bulletin/phpBB5/cpg135/ PASS
10 No dots in partial url PASS
15 coppermine.php not present PASS
20 coppermine_dao.php not present PASS
25 cpmfetch.php found PASS
30 cpmfetch_dao.php found PASS
35 Server OS = FreeBSD st06.startlogic.com 4.9-RELEASE-p11 FreeBSD 4.9-RELEASE-p11 #0: Sat i386 INFO
40 WebServer = Apache/1.3.31 (Unix) mod_log_bytes/0.3 FrontPage/5.0.2.2635 PHP/4.3.10 mod_ssl/2.8.19 OpenSSL/0.9.7c INFO
45 PHP Version = 4.3.10 INFO
55 DOCUMENT_ROOT: /home/ohfishin/public_html INFO
60 C_DOCUMENT_ROOT: [b]Not found [/b] INFO
65 doc_root: Not found (IIS Servers only) INFO
70 SCRIPT_FILENAME: /home/ohfishin/.panel/web/bulletin/phpBB5/cpmfetch/cftest.php INFO
75 DOCUMENT_ROOT is not a good match [b]BAD[/b]
80 CPG Config file not found: /home/ohfishin/public_htmlstl-web/bulletin/phpBB5/cpg135//include/config.inc.php [b]FAIL[/b]
 http://ohfishing.com/stl-web/bulletin/phpBB5/cpmfetch/cftest.php I have my cpm folder inside my PHPBB folder  right next to coppermine if it matters. I dont know how to change to the correct path to congif.init and i have no idea what error 75 is. Plz help!
« Last Edit: October 09, 2005, 10:07:31 pm by ohfishing »
Logged
OHfishing

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
« Reply #43 on: October 10, 2005, 07:32:54 am »

Hello, I am having some rookie trouble. I thought I would also post my problem in this thread becuase it was not awnsered in another. I installed cpmfetch to phpbb 2.0.17 I ran the cftest page and got error 75 ROOT and error 80 config init ... the path to the directory is wrong and i dont know how to fix it ..
Code: [Select]
You set your partial URL to stl-web/bulletin/phpBB5/cpg135/ PASS
10 No dots in partial url PASS
15 coppermine.php not present PASS
20 coppermine_dao.php not present PASS
25 cpmfetch.php found PASS
30 cpmfetch_dao.php found PASS
35 Server OS = FreeBSD st06.startlogic.com 4.9-RELEASE-p11 FreeBSD 4.9-RELEASE-p11 #0: Sat i386 INFO
40 WebServer = Apache/1.3.31 (Unix) mod_log_bytes/0.3 FrontPage/5.0.2.2635 PHP/4.3.10 mod_ssl/2.8.19 OpenSSL/0.9.7c INFO
45 PHP Version = 4.3.10 INFO
55 DOCUMENT_ROOT: /home/ohfishin/public_html INFO
60 C_DOCUMENT_ROOT: [b]Not found [/b] INFO
65 doc_root: Not found (IIS Servers only) INFO
70 SCRIPT_FILENAME: /home/ohfishin/.panel/web/bulletin/phpBB5/cpmfetch/cftest.php INFO
75 DOCUMENT_ROOT is not a good match [b]BAD[/b]
80 CPG Config file not found: /home/ohfishin/public_htmlstl-web/bulletin/phpBB5/cpg135//include/config.inc.php [b]FAIL[/b]
http://ohfishing.com/stl-web/bulletin/phpBB5/cpmfetch/cftest.php I have my cpm folder inside my PHPBB folder  right next to coppermine if it matters. I dont know how to change to the correct path to congif.init and i have no idea what error 75 is. Plz help!

Try adding a slash at the beginning of the partial url you are setting

Are you bridged with phpBB?  If so you have another problem that is going to loom up before you


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

toykilla

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
« Reply #44 on: October 12, 2005, 10:41:49 pm »

using this code on my forums (invision 2.1.1) does not appear to work. I tested the code on a blank html page and it works:

http://www.infinitigtrforums.com/forums/edits.php

however when i place the same code in the Invisionboard skin i get this returned where the pictures should be:

cpm_viewRandomMedia(1,1); $objCpm->cpm_close(); ?>
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
« Reply #45 on: October 13, 2005, 02:13:30 pm »

using this code on my forums (invision 2.1.1) does not appear to work. I tested the code on a blank html page and it works:

http://www.infinitigtrforums.com/forums/edits.php

however when i place the same code in the Invisionboard skin i get this returned where the pictures should be:

cpm_viewRandomMedia(1,1); $objCpm->cpm_close(); ?>



Can invisionboard skins execute PHP?  If so, do you have the " <?php " in front of this? 




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

Bernard

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
« Reply #46 on: October 14, 2005, 11:14:31 pm »

I cannot select specific catgegories.

Here is my source:

      include "./cpmfetch.php";
      $objCpm = "";
      $objCpm = new cpm('/galerie');
      $source = "cat=4";
      $styleguide = array(
         //"TABLESTYLE" => "photoclip",
         //"rowstyle" => "photoclip",
         "cellstyle" => "photoclip",
         "linkstyle" => "photoclip",
         "alttag" => "One of the last photos submitted",
         "subtitle" => "%o<br>%V views",
         "imagestyle" => "photoclip",
         "imagesize" => 'thumb',
         "imagewidth" => '100');      

       //$objCpm->cpm_viewRandomMedia(2,3,$styleguide);
      $objCpm->cpm_viewRandomMediaFrom  ( 2, 3, $source, "");
      print "<p>&nbsp;</p>";
      $objCpm->cpm_close();


Works only with $source="cat=1" ??

I am using the latest cpmfetch 1.6.2 and coppermine 1.3. See my installation here http://www.crostuttgart.de/galerie/

Thanks for your help in foward !


ps: stupid question - i donīt have a "new topic" button here ..
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
« Reply #47 on: October 15, 2005, 08:30:17 am »


Good on the new topic button - last thing we want is a ton of new threads popping up in here :)

Are you sure you have more than one category?  Are you thinking albums?  That could be why cat=1 works, but cat=4 does not.

Just a thought





I cannot select specific catgegories.

Here is my source:

      include "./cpmfetch.php";
      $objCpm = "";
      $objCpm = new cpm('/galerie');
      $source = "cat=4";
      $styleguide = array(
         //"TABLESTYLE" => "photoclip",
         //"rowstyle" => "photoclip",
         "cellstyle" => "photoclip",
         "linkstyle" => "photoclip",
         "alttag" => "One of the last photos submitted",
         "subtitle" => "%o<br>%V views",
         "imagestyle" => "photoclip",
         "imagesize" => 'thumb',
         "imagewidth" => '100');      

       //$objCpm->cpm_viewRandomMedia(2,3,$styleguide);
      $objCpm->cpm_viewRandomMediaFrom  ( 2, 3, $source, "");
      print "<p>&nbsp;</p>";
      $objCpm->cpm_close();


Works only with $source="cat=1" ??

I am using the latest cpmfetch 1.6.2 and coppermine 1.3. See my installation here http://www.crostuttgart.de/galerie/

Thanks for your help in foward !


ps: stupid question - i donīt have a "new topic" button here ..

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: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
« Reply #48 on: October 15, 2005, 08:32:15 am »

Hello, I am having some rookie trouble. I thought I would also post my problem in this thread becuase it was not awnsered in another. I installed cpmfetch to phpbb 2.0.17 I ran the cftest page and got error 75 ROOT and error 80 config init ... the path to the directory is wrong and i dont know how to fix it ..
Code: [Select]
You set your partial URL to stl-web/bulletin/phpBB5/cpg135/ PASS
10 No dots in partial url PASS
15 coppermine.php not present PASS
20 coppermine_dao.php not present PASS
25 cpmfetch.php found PASS
30 cpmfetch_dao.php found PASS
35 Server OS = FreeBSD st06.startlogic.com 4.9-RELEASE-p11 FreeBSD 4.9-RELEASE-p11 #0: Sat i386 INFO
40 WebServer = Apache/1.3.31 (Unix) mod_log_bytes/0.3 FrontPage/5.0.2.2635 PHP/4.3.10 mod_ssl/2.8.19 OpenSSL/0.9.7c INFO
45 PHP Version = 4.3.10 INFO
55 DOCUMENT_ROOT: /home/ohfishin/public_html INFO
60 C_DOCUMENT_ROOT: [b]Not found [/b] INFO
65 doc_root: Not found (IIS Servers only) INFO
70 SCRIPT_FILENAME: /home/ohfishin/.panel/web/bulletin/phpBB5/cpmfetch/cftest.php INFO
75 DOCUMENT_ROOT is not a good match [b]BAD[/b]
80 CPG Config file not found: /home/ohfishin/public_htmlstl-web/bulletin/phpBB5/cpg135//include/config.inc.php [b]FAIL[/b]
http://ohfishing.com/stl-web/bulletin/phpBB5/cpmfetch/cftest.php I have my cpm folder inside my PHPBB folder  right next to coppermine if it matters. I dont know how to change to the correct path to congif.init and i have no idea what error 75 is. Plz help!

Document root means it cannot find your document root variable.  Something the server should set, and a constant source of annoyance for me.  The link there did not work for me either.


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

Bernard

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
« Reply #49 on: October 15, 2005, 01:50:53 pm »


Good on the new topic button - last thing we want is a ton of new threads popping up in here :)

Are you sure you have more than one category?  Are you thinking albums?  That could be why cat=1 works, but cat=4 does not.

Just a thought

>> Yes I have many cats ... displaying a single album also does not work. If you don't mind you can have a look at my gallery structure on http://www.crostuttgart.de/galerie/

Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
« Reply #50 on: October 15, 2005, 08:25:17 pm »


Good on the new topic button - last thing we want is a ton of new threads popping up in here :)

Are you sure you have more than one category?  Are you thinking albums?  That could be why cat=1 works, but cat=4 does not.

Just a thought

>> Yes I have many cats ... displaying a single album also does not work. If you don't mind you can have a look at my gallery structure on http://www.crostuttgart.de/galerie/



Tag,

I will have to look at it better, and having your link there will be a help.   Your syntax seems correct... hmmmm

I'll check it later on

Bye

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

ericmn

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
« Reply #51 on: November 07, 2005, 03:55:33 am »

Hi, seems really cool stuff...
I use coppermine 1.3.5 bridged to SMF 1.0.5 (with tinyportal) a.so latest version of Cpmfetch
 and tried to show random or latest image in block, but all i get is just same image all the time.
Please help....
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
« Reply #52 on: November 07, 2005, 07:12:45 pm »

Hi, seems really cool stuff...
I use coppermine 1.3.5 bridged to SMF 1.0.5 (with tinyportal) a.so latest version of Cpmfetch
 and tried to show random or latest image in block, but all i get is just same image all the time.
Please help....

I am guessing that its the typical user table not populated in coppermine... it causes problems.  If you only have one picture uploaded by a normal coppermine user, that will be the only one available.

You need to somehow create users in the cpg table to match the smf users (or at least pretend to)

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

akime

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
« Reply #53 on: November 07, 2005, 08:28:12 pm »

cpmfetch doesn't work with my coppermine gallery.
The test says that everything is ok http://smv.rbg-langenau.de/cpmfetch/cftest.php
I don't know whats wrong?
Logged

v8central

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 34
Re: cpmFetch image links break out of Mambo wrapper
« Reply #54 on: November 11, 2005, 03:40:23 am »

I successfully got cpmFetch working on Coppermine embedded in Mambo. However, if you click a link it breaks out of the Mambo wrapper. This question was already asked in this thread, but there was no answer (because I think the question was not understood). Here is the problem:

Here is my Coppermine gallery embedded in Mambo:

http://www.clements.on.ca/component/option,com_wrapper/Itemid,41/

If you use the gallery, you will find that it stays embedded in Mambo.

Here is an example of a working cpmFetch page on my site:

http://www.clements.on.ca/content/view/81/105/

You can see that it is working fine, and embedding content inside Mambo. But when you click on one of the thumbnails, it breaks out of Mambo, and goes into an "unwrapped" Coppermine.

I don't want this to happen, since I obviously want to keep visitors inside the site (my mother gets confused enough as it is!).

Is there any way to fix this? I fear it may be a Mambo thing, and unsolvable, because cpmFetch is getting links from Coppermine, not Mambo. If you click the first link (Coppermine embedded), and start clicking around in the gallery, you will notice that the URL never changes.
I see your problem, and I'll be facing the same thing but I can't even get the content displaying like in your example yet - can you give me any tips please ?
Logged

CPG Guru

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Female
  • Posts: 40
  • Cool Buddy
Redeclare error in Gallery
« Reply #55 on: November 13, 2005, 05:25:10 pm »

Hi

Im making one wallpaper site & on top i want to have 5 different random pics from 5 defined categories

Example : Nature, Wildlife, celebs, Love, Hot

I want to know if on same page i want to put cpmfetch code again to display random pics from predefined categories . Is That Possible

Ive simply tried to copy & put code in each block after defineing respected category , Result was the first pic was fine but 2nd pic gives an error 

Fatal error: Cannot redeclare class cpm in /home/SITENAME/public_html/cpmfetch/cpmfetch.php on line 33


This was redeclare error ..

So please recommend what to do now ,

Alternate is i should use iframes to do that but that'll not be search engine friendly

Logged

v8central

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 34
Re: cpmFetch image links break out of Mambo wrapper
« Reply #56 on: November 14, 2005, 09:54:20 pm »

I successfully got cpmFetch working on Coppermine embedded in Mambo. However, if you click a link it breaks out of the Mambo wrapper. This question was already asked in this thread, but there was no answer (because I think the question was not understood). Here is the problem:

Here is my Coppermine gallery embedded in Mambo:

http://www.clements.on.ca/component/option,com_wrapper/Itemid,41/

If you use the gallery, you will find that it stays embedded in Mambo.

Here is an example of a working cpmFetch page on my site:

http://www.clements.on.ca/content/view/81/105/

You can see that it is working fine, and embedding content inside Mambo. But when you click on one of the thumbnails, it breaks out of Mambo, and goes into an "unwrapped" Coppermine.

I don't want this to happen, since I obviously want to keep visitors inside the site (my mother gets confused enough as it is!).

Is there any way to fix this? I fear it may be a Mambo thing, and unsolvable, because cpmFetch is getting links from Coppermine, not Mambo. If you click the first link (Coppermine embedded), and start clicking around in the gallery, you will notice that the URL never changes.
I see your problem, and I'll be facing the same thing but I can't even get the content displaying like in your example yet - can you give me any tips please ?

*BUMP*

Anyone ?
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: Redeclare error in Gallery
« Reply #57 on: November 14, 2005, 09:59:11 pm »

Hi

Im making one wallpaper site & on top i want to have 5 different random pics from 5 defined categories

Example : Nature, Wildlife, celebs, Love, Hot

I want to know if on same page i want to put cpmfetch code again to display random pics from predefined categories . Is That Possible

Ive simply tried to copy & put code in each block after defineing respected category , Result was the first pic was fine but 2nd pic gives an error 

Fatal error: Cannot redeclare class cpm in /home/SITENAME/public_html/cpmfetch/cpmfetch.php on line 33


This was redeclare error ..

So please recommend what to do now ,

Alternate is i should use iframes to do that but that'll not be search engine friendly



You only need to create the cpmfetch object once before all your calls and close it once after.  In between you can do as many calls to get images and stats that you want.

I suspect thats your problem
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

CPG Guru

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Female
  • Posts: 40
  • Cool Buddy
Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
« Reply #58 on: November 15, 2005, 03:33:04 am »


You only need to create the cpmfetch object once before all your calls and close it once after. In between you can do as many calls to get images and stats that you want.

I suspect thats your problem



I agree that we can call it any no. of time , but as i told u i want 1 pic from each category in Horizontal line , but if i used your this code the first category comes in first line 2nd in 2nd line & so on all this executes in vertical manner

<?php   
include "cpmfetch.php";
$objCpm = new cpm('/photos');
$objCpm->cpm_viewRandomMedia (1,4);           
$objCpm->cpm_viewRandomMedia (1,3);
$objCpm->cpm_viewRandomMedia (1,35);
$objCpm->cpm_close();
?>

Again, I want to insert 5 pics in Horizontol way, so please suggest the best way.
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: CpmFetch - Embedding in templates (SMF, Wordpress, PHPBB, etc, ...)
« Reply #59 on: November 15, 2005, 05:38:24 am »


You only need to create the cpmfetch object once before all your calls and close it once after. In between you can do as many calls to get images and stats that you want.

I suspect thats your problem



I agree that we can call it any no. of time , but as i told u i want 1 pic from each category in Horizontal line , but if i used your this code the first category comes in first line 2nd in 2nd line & so on all this executes in vertical manner

<?php   
include "cpmfetch.php";
$objCpm = new cpm('/photos');
$objCpm->cpm_viewRandomMedia (1,4);           
$objCpm->cpm_viewRandomMedia (1,3);
$objCpm->cpm_viewRandomMedia (1,35);
$objCpm->cpm_close();
?>

Again, I want to insert 5 pics in Horizontol way, so please suggest the best way.


A messy way that leaps to mind would be to do it in a table... this would yield tables in tables, but unless you are php-ready and want to code a bit to display the images, you can do:

Code: [Select]
<?php
include "cpmfetch.php";
$objCpm = new cpm('/photos');
?>


<table>
<tr>
<td><?php $objCpm->cpm_viewRandomMediaFrom(1,1,"cat=1");  ?></td>
<td><?php $objCpm->cpm_viewRandomMediaFrom(1,1,"cat=2");  ?></td>
<td><?php $objCpm->cpm_viewRandomMediaFrom(1,1,"cat=3");  ?></td>
<td><?php $objCpm->cpm_viewRandomMediaFrom(1,1,"cat=4");  ?></td>
<td><?php $objCpm->cpm_viewRandomMediaFrom(1,1,"cat=5");  ?></td>
</tr>
</table>
<?php $objCpm->cpm_close(); ?>


I cant remember if the "cat=1" should go before the 1,1 or not.  Hmmmm

Anyway, the other way is to get back result sets and build your own img ref tag from it.

This will make a series of 1 image tables inside the table of 5 cells.

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
Pages: 1 2 [3] 4 5 6   Go Up
 

Page created in 0.039 seconds with 19 queries.