Ive done some digging. Appears the Support already given was related to older versions of cpmfetch and they did not resolve my issue.
Okay, the code below shows me Last added media and works fine.
Quote<h3>Last Added</h3>
<?php
include "/usr/www/users/severegg/gallery/cpmfetch/cpmfetch.php";
$objCpm = new cpm("/usr/www/users/severegg/gallery/cpmfetch/cpmfetch_config.php");
$objCpm->cpm_viewLastAddedMedia(2,1);
$objCpm->cpm_close();
?>
I tried The code Like This
<h3>Last Added</h3>
<?php
include "/usr/www/users/severegg/gallery/cpmfetch/cpmfetch.php";
$objCpm = new cpm("/usr/www/users/severegg/gallery/cpmfetch/cpmfetch_config.php");
$objCpm->cpm_viewLastAddedMedia(2,1);
<h3>Test<h3>
$objCpm->cpm_viewLastAddedMedia(2,1);
$objCpm->cpm_close();
?>
With the following Error Received
Parse error: parse error, unexpected '<' in /usr/www/users/severegg/latest/wp-content/themes/sosuechtig_orange/sidebar.php on line 47
My website http://www.severeidaho.com/gallery shows the last 2 added and then Top Photo below it is directly linked since I cant figure out whats wrong.
I also have the latest Coppermine install running (i believe).
My Goal is to have the following
LastAddedMedia 2,1
MostViewedMedia 2,1
RandomMedia 2,1
Can you show me an example of wat I need to add to get this figured out. I know the problem with using cpmfetch multiple times it to avoid the Include all three times, yet I get a parse error and would like your feedback.
Thanks...
-gerrit
Couldnt find the edit button. I wanted to add that with
LastAddedMedia 2,1
MostViewedMedia 2,1
RandomMedia 2,1
Can you add the Function to call the Author for each Call?
Thanks.
-gerrit
I tried the following which appeared t fix someone elses problem. Im still gettting an error
Quote<h3>Last Added</h3>
<?php
include "/usr/www/users/severegg/gallery/cpmfetch/cpmfetch.php";
$objCpm = new cpm("/usr/www/users/severegg/gallery/cpmfetch/cpmfetch_config.php");
$objCpm->cpm_viewLastAddedMedia(2,1);
<h4>Top Rated<h4>
$objCpm->cpm_viewTopRatedMediaFrom("",2,1);
<h4>Most Viewed<h4>
$objCpm->cpm_viewRandomMostViewedMediaFrom("",2,1);
<h4>Random Media<h4>
$objCpm->cpm_viewRandomMediaFrom("",2,1);
$objCpm->cpm_close();
?>
QuoteParse error: parse error, unexpected '<' in /usr/www/users/severegg/latest/wp-content/themes/sosuechtig_orange/sidebar.php on line 44
Quote<h3>Last Added</h3>
<?php
include "/usr/www/users/severegg/gallery/cpmfetch/cpmfetch.php";
$objCpm = new cpm("/usr/www/users/severegg/gallery/cpmfetch/cpmfetch_config.php");
$objCpm->cpm_viewLastAddedMedia(2,1);
$objCpm->cpm_viewRandomMostViewedMediaFrom("",2,1);
$objCpm->cpm_viewRandomMediaFrom("",2,1);
$objCpm->cpm_close();
?>
adding this it will definetely work. So I figured that out Now I want to add Titles for Each 2 Images that will show and then the author below each picture.
Is this possible?
For Example
<?php
include "/usr/www/users/severegg/gallery/cpmfetch/cpmfetch.php";
$objCpm = new cpm("/usr/www/users/severegg/gallery/cpmfetch/cpmfetch_config.php");
Ttitle= Last Added
$objCpm->cpm_viewLastAddedMedia(2,1);
Author= Person Who Uploaded, ETC
and that will be for each Call.
-gerrit
Quote from: severeidaho on June 22, 2007, 02:46:16 AM
adding this it will definetely work. So I figured that out Now I want to add Titles for Each 2 Images that will show and then the author below each picture.
Is this possible?
For Example
<?php
include "/usr/www/users/severegg/gallery/cpmfetch/cpmfetch.php";
$objCpm = new cpm("/usr/www/users/severegg/gallery/cpmfetch/cpmfetch_config.php");
Ttitle= Last Added
$objCpm->cpm_viewLastAddedMedia(2,1);
Author= Person Who Uploaded, ETC
and that will be for each Call.
-gerrit
Yes, take a look at the explanations section in the documentation. It is all discussed in great detail there.
The documention... whoddathunkit
<h3>Last Added</h3>
<?php
include "/usr/www/users/severegg/gallery/cpmfetch/cpmfetch.php";
$objCpm = new cpm("/usr/www/users/severegg/gallery/cpmfetch/cpmfetch_config.php");
$objCpm->cpm_viewLastAddedMedia(2,1);
$objCpm->cpm_viewRandomMostViewedMediaFrom("",2,1);
$objCpm->cpm_viewRandomMediaFrom("",2,1);
$objCpm->cpm_close();
?>
The code works 100%, No Errors. The explanation Documentation reffered to errors.
What I am trying to do is add the Options Array, this way each Thumbnail displayed with cpmfetch will have
"Picture Title"
"authors name"
The person on The Top Post of this forum that you showed made a real attempt has done what I want to do. I didnt copy his code cause you mentioned the code needs to be "option array" yet he didnt show the finalized code which he is using for his website now, which looks amazing.
I checked the documentation but didnt seem to find options for "title" & "author".
Hopefully you can show me an example. Ive been searching for awhile now, have a headache from the quick reading. hehe.
-gerrit
Quote from: severeidaho on June 22, 2007, 04:30:32 AM
<h3>Last Added</h3>
<?php
include "/usr/www/users/severegg/gallery/cpmfetch/cpmfetch.php";
$objCpm = new cpm("/usr/www/users/severegg/gallery/cpmfetch/cpmfetch_config.php");
$objCpm->cpm_viewLastAddedMedia(2,1);
$objCpm->cpm_viewRandomMostViewedMediaFrom("",2,1);
$objCpm->cpm_viewRandomMediaFrom("",2,1);
$objCpm->cpm_close();
?>
The code works 100%, No Errors. The explanation Documentation reffered to errors.
What I am trying to do is add the Options Array, this way each Thumbnail displayed with cpmfetch will have
"Picture Title"
"authors name"
The person on The Top Post of this forum that you showed made a real attempt has done what I want to do. I didnt copy his code cause you mentioned the code needs to be "option array" yet he didnt show the finalized code which he is using for his website now, which looks amazing.
I checked the documentation but didnt seem to find options for "title" & "author".
Hopefully you can show me an example. Ive been searching for awhile now, have a headache from the quick reading. hehe.
-gerrit
First, there is an example in the documentation... see the section on "Using the $format parameter effectively. I am not going to retype it here. Read that.
Second, you mentioned looking for: "title" & "author".
Instead look for pCaption and pOwner_name - I think those are the tags you want.
I believe the quickstart also covers using the option array.
Hopefully they will help you.
Okay, I got it figured out finally. Took about 4 hours, lol. Thanks Vuud for pointing me to the documentation. Luckily from all the posts I read and examples I was able to get what I wanted. I know I will eventually add more options. But here is the code that works currently.....
Quote<h4>Latest Uploads</h4>
<?php
include "/usr/www/users/severegg/gallery/cpmfetch/cpmfetch.php";
$objCpm = new cpm("/usr/www/users/severegg/gallery/cpmfetch/cpmfetch_config.php");
$options = array("subtitle" => "By: {{pOwner_name}}");
$objCpm->cpm_viewLastAddedMedia(2,1, $options);
?>
<h4>Most Viewed</h4>
<?php
$objCpm->cpm_viewRandomMostViewedMediaFrom("",2,1, $options);
?>
<h4>Random Photos</h4>
<?php
$objCpm->cpm_viewRandomMediaFrom("",2,1, $options);
$objCpm->cpm_close();
?>
I know all Ive got to do is try it. But some quick questions before I go to bed.
would = $options = array("subtitle" => "By: {{pOwner_name}}"),("subtitle" => "Current Rating: {{pPic_RatingStars}}");
work?
I want to eventually add 3 options, just want to clarify the proper code.
Once again Thanks Vuud for all the help. I know you dont get paid for support yet you do your best to get people to learn things themselves. Its all greatly appreciated..
-gerrit
QuoteI know all Ive got to do is try it. But some quick questions before I go to bed.
would = $options = array("subtitle" => "By: {{pOwner_name}}"),("subtitle" => "Current Rating: {{pPic_RatingStars}}");
work?
Nevermind, I found an example, duh. lol
-gerrit
For those Looking to get CPMfetch working in your sidebar add the following
Quote<h4>Latest Uploads</h4>
<?php
include "/usr/www/users/severegg/gallery/cpmfetch/cpmfetch.php";
$objCpm = new cpm("/usr/www/users/severegg/gallery/cpmfetch/cpmfetch_config.php");
$options = array("subtitle" => "By: {{pOwner_name}} , Views: {{pHits}} ");
$objCpm->cpm_viewLastAddedMedia(2,1, $options);
?>
<h4>Most Viewed</h4>
<?php
$objCpm->cpm_viewRandomMostViewedMediaFrom("",2,1, $options);
?>
<h4>Random Photos</h4>
<?php
$objCpm->cpm_viewRandomMediaFrom("",2,1, $options);
$objCpm->cpm_close();
?>
As you can see the code calls for
1. Last Uploaded 2 pictures one row
2. Most Viewed 2 pictures one row
3. Random Photos 2 pictures one row
The options ARRAY calls for the Uploaders Name (author) and View Total.
This has been tested and works with cpmfetch 2.0.0 on the Latest Wordpress Blog using the sidebar.
Hope this helps you all.
-gerrit
View the example at
http://www.severeidaho.com/latest
The Sidebar column on the very Right. The Column to the left closest to My Posts are images linked directly from Gallery without Cpmfetch. I will eventually replace those with more cpmfetch calls.
-gerrit