$options -> What? $options -> What?
 

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

Main Menu

$options -> What?

Started by miloukuh, August 23, 2007, 02:06:40 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

miloukuh

Hey,

I've just installed the CPMfetch and everythings working accept the fact that I don't wat the image title to show and that's exactly what it's doing no matter what I do to the code. I would like to know how to a: change the imageheight and width and b: how to show views only (no title).

My code now (example code)
<?php
  
include "./gallery/cpmfetch/cpmfetch.php";
  
$objCpm = new cpm("./gallery/cpmfetch/cpmfetch_config.php");
  
$objCpm->cpm_viewLastAddedMedia(1,4);
  
$objCpm->cpm_close();
?>


I left the $option out since that doesn't work for me...

Any thoughts? Yes I read the manaul and I still don't get it...

Thanks!

vuud

Quote from: miloukuh on August 23, 2007, 02:06:40 PM
Hey,

I've just installed the CPMfetch and everythings working accept the fact that I don't wat the image title to show and that's exactly what it's doing no matter what I do to the code. I would like to know how to a: change the imageheight and width and b: how to show views only (no title).

My code now (example code)
<?php
  
include "./gallery/cpmfetch/cpmfetch.php";
  
$objCpm = new cpm("./gallery/cpmfetch/cpmfetch_config.php");
  
$objCpm->cpm_viewLastAddedMedia(1,4);
  
$objCpm->cpm_close();
?>


I left the $option out since that doesn't work for me...

Any thoughts? Yes I read the manaul and I still don't get it...

Thanks!


Read the doc section on the "using the options array effectively"



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

miloukuh

I have read that part and this is the error I get when I use your example code:

<?php
  
include "./gallery/cpmfetch/cpmfetch.php";
  
$objCpm = new cpm("./gallery/cpmfetch/cpmfetch_config.php");
  
$options = array( 'subtitle' => 'Image {{pTitle}} is {{pFilesizeKB}} KB' ,   'imagewidth' => '200'"tablestyle" => "cssfortables" );
  
$objCpm->viewRandomMediaFrom("",1,1,$options);
  
$objCpm->cpm_close();
?>


Error: Fatal error: Call to undefined method cpm::viewRandomMediaFrom() in /home/cameron/public_html/test.php on line 5

vuud

Quote from: miloukuh on August 24, 2007, 06:07:44 PM
I have read that part and this is the error I get when I use your example code:

<?php
  
include "./gallery/cpmfetch/cpmfetch.php";
  
$objCpm = new cpm("./gallery/cpmfetch/cpmfetch_config.php");
  
$options = array( 'subtitle' => 'Image {{pTitle}} is {{pFilesizeKB}} KB' ,   'imagewidth' => '200'"tablestyle" => "cssfortables" );
  
$objCpm->viewRandomMediaFrom("",1,1,$options);
  
$objCpm->cpm_close();
?>


Error: Fatal error: Call to undefined method cpm::viewRandomMediaFrom() in /home/cameron/public_html/test.php on line 5


Apparently I have an error...

try replaceing

viewRandomMediaFrom

with

cpm_viewRandomMediaFrom

Let me know if that helps

Sorry about that
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

miloukuh

Okay now that works fine! But I only want the amount of views to show and I'd like to adjust imageheight and width. How do I do this?

miloukuh

Okay so now I got the height and width right. New problem: What's the right code to get the pHits to work? This is my code now:
<?php
  
include "./gallery/cpmfetch/cpmfetch.php";
  
$objCpm = new cpm("./gallery/cpmfetch/cpmfetch_config.php");
  
$options = array( 'pHits' => 'Views: {{pHits}}''imagewidth' => '45''imageheight' => '45');
  
$objCpm->cpm_viewLastAddedMedia(14$options);
  
$objCpm->cpm_close();
?>


Help please!

vuud

Quote from: miloukuh on August 26, 2007, 11:56:26 AM
Okay so now I got the height and width right. New problem: What's the right code to get the pHits to work? This is my code now:
<?php
  
include "./gallery/cpmfetch/cpmfetch.php";
  
$objCpm = new cpm("./gallery/cpmfetch/cpmfetch_config.php");
  
$options = array( 'pHits' => 'Views: {{pHits}}''imagewidth' => '45''imageheight' => '45');
  
$objCpm->cpm_viewLastAddedMedia(14$options);
  
$objCpm->cpm_close();
?>


Help please!


Read up on titles and subtitles...  pHits will not do anything with what you are doing.
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