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: $options -> What?  (Read 7376 times)

0 Members and 1 Guest are viewing this topic.

miloukuh

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
$options -> What?
« 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)
Code: [Select]
<?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!
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: $options -> What?
« Reply #1 on: August 23, 2007, 03:27:59 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)
Code: [Select]
<?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"



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

miloukuh

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: $options -> What?
« Reply #2 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:

Code: [Select]
<?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
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: $options -> What?
« Reply #3 on: August 24, 2007, 06:54:34 pm »

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

Code: [Select]
<?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
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

miloukuh

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: $options -> What?
« Reply #4 on: August 24, 2007, 07:39:40 pm »

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?
Logged

miloukuh

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: $options -> What?
« Reply #5 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:
Code: [Select]
<?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!
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: $options -> What?
« Reply #6 on: September 01, 2007, 09:17:38 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:
Code: [Select]
<?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.
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]   Go Up
 

Page created in 0.019 seconds with 19 queries.