forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 cpmFetch by vuud => Topic started by: tsnewsdotcom on September 11, 2016, 09:05:52 am

Title: cpmfetch installed... html code needed
Post by: tsnewsdotcom on September 11, 2016, 09:05:52 am
I've successfully installed cpmfetch onto my gallery but now I want to add a latest photos section onto a tumblr blog (that doesn't support .php)


I tried using this code:
<iframe width="310" height="290" frameborder="no" scrolling="no" src="http://swift-photos.com/cpmfetch.php" title="swift-photos.com"></iframe>

but it still doesn't work.

is there something that I'm doing wrong?
Title: Re: cpmfetch installed... html code needed
Post by: gmc on September 12, 2016, 01:59:15 am
I assume you are using CPG 1.5... You opened this thread in the 1.4 forum.

The easiest way to use cpmfetch on an html page is to call cfimageget.php from an IMG tag:
Code: [Select]
<img src="yourcpgpath/cpmfetch/cfimageget.phpYou can add to the img tag qualifiers for category or album.
If you put more than one on a page - add some unique parm to the tag so that your browser sees them as different tags, and will actually call cpmfetch each time. (in example below - variable 'i' is not used by cpmfetch - but makes the tag appear unique to your browser.

Code: [Select]
<img src="yourcpgpath/cpmfetch/cfimageget.php?category=2&i=1
<img src="yourcpgpath/cpmfetch/cfimageget.php?category=2&i=2
<img src="yourcpgpath/cpmfetch/cfimageget.php?category=2&i=3

You can also call cfig_random.php from an IMG tag - customize it to your preferences.
(It uses/extends cfimageget)

Under CPG1.5.x, you must be using cpmfetch 2.1.1...
Available in the main cpmfetch thread: http://forum.coppermine-gallery.net/index.php/topic,65412.msg324838.html#msg324838 (http://forum.coppermine-gallery.net/index.php/topic,65412.msg324838.html#msg324838)
cfimageget/cfig_random do not work with CPG 1.5 at V2.0.0 level.

More examples are in the source for cfimageget and cfig_random.php... Have a look and ask if you need more info.