I tryed having to of the code on one page. One in one table for video updates. And one in the other for picture updates. But i received and error in the cpmfetch file?
How do you put two seperate codes in different cells on a page?
thanks
adam
Quote from: farmerjeffe on March 07, 2007, 08:08:30 PM
I tryed having to of the code on one page. One in one table for video updates. And one in the other for picture updates. But i received and error in the cpmfetch file?
How do you put two seperate codes in different cells on a page?
thanks
adam
Based on the information you've provided, I would gather that something is not working right - and needs to be fixed.
With more detailed error messages, I may be able to be more specific.
http://forum.coppermine-gallery.net/index.php?topic=35221.msg197845#msg197845
Ok so The whole page loads, the "video updates" work, but where the "picture updates" should be has this error...
Fatal error: Cannot redeclare class cpm in /home/underoat/public_html/cpmfetch/cpmfetch.php on line 33
I have provided this code for my page, this was just a guess as to how it should be done.
<table align="center" width=" 560" cellpadding="0" cellspacing="0" border="0">
<tr>
<td align="center" background="images/tablebackground.gif">
<strong>
VIDEO UPDATES
</strong>
</td>
</tr>
<tr>
<td align="center">
<br>
<?php
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/gallery");
$options = array( "windowtarget" => "_blank", "subtitle" => "<center>%a<br>%w</center>" );
$objCpm->cpm_viewLastAddedMediaFrom ( 1, 4, "cat=8,12:album=19,21,26,25", $options);
$objCpm->cpm_close();
?>
</td>
</tr>
</table>
<table width="560" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td align="center" background="images/tablebackground.gif">PICTURE UPDATES</td>
</tr>
<tr>
<td align="center">
<?php
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/gallery");
$options = array( "windowtarget" => "_blank", "subtitle" => "<center>%a<br>%w</center>" );
$objCpm->cpm_viewLastAddedMediaFrom ( 1, 4, "cat=7,3,2:album=10,14,20,12,1,2,3,4,5,6", $options);
$objCpm->cpm_close();
?>
</td>
</tr>
</table>
Dont mind the sloppy html btw
Quote from: farmerjeffe on March 07, 2007, 08:25:34 PM
Fatal error: Cannot redeclare class cpm in /home/underoat/public_html/cpmfetch/cpmfetch.php on line 33
<?php
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/gallery");
$options = array( "windowtarget" => "_blank", "subtitle" => "<center>%a<br>%w</center>" );
$objCpm->cpm_viewLastAddedMediaFrom ( 1, 4, "cat=8,12:album=19,21,26,25", $options);
....
$options = array( "windowtarget" => "_blank", "subtitle" => "<center>%a<br>%w</center>" );
$objCpm->cpm_viewLastAddedMediaFrom ( 1, 4, "cat=7,3,2:album=10,14,20,12,1,2,3,4,5,6", $options);
....
$objCpm->cpm_close();
?>
Oh see... that is easy. You are doing the include twice. I've marked up your code (removing HTML) to show you how it should run over the course of your page.
I must be a complete idiot... I attempted to do what you said but it shows up a blank black page!
url= http://www.underoathfans.net <-- then click "media" on nav bar
This is my code including the tables to seperate them...
<?php
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/gallery");
<table align="center" width=" 560" cellpadding="0" cellspacing="0" border="0">
<tr>
<td align="center" background="images/tablebackground.gif">
<strong>
VIDEO UPDATES
</strong>
</td>
</tr>
<tr>
<td align="center">
<br>
$options = array( "windowtarget" => "_blank", "subtitle" => "<center>%a<br>%w</center>" );
$objCpm->cpm_viewLastAddedMediaFrom ( 1, 4, "cat=8,12:album=19,21,26,25", $options);
</td>
</tr>
</table>
<table width="560" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td align="center" background="images/tablebackground.gif">PICTURE UPDATES</td>
</tr>
<tr>
<td align="center">
$options = array( "windowtarget" => "_blank", "subtitle" => "<center>%a<br>%w</center>" );
$objCpm->cpm_viewLastAddedMediaFrom ( 1, 4, "cat=7,3,2:album=10,14,20,12,1,2,3,4,5,6", $options);
</td>
</tr>
</table>
$objCpm->cpm_close();
?>
Ive been trying everything, does it not work when its split up between tables?
So sorry to be a pain and i know your probably busy. But i really can't find what the problem is with my code!
Ok so here is the whole code on the page that is just showing up as a black page when viewed!!
<div align="center"><a href="http://www.underoathfans.net/gallery" target="_blank"><img src="images/gallerypicture.gif" alt="gallery" width="560" height="70" border="0"></a>
<br>
<br>
</div>
<?php
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/gallery");
<table align="center" width=" 560" cellpadding="0" cellspacing="0" border="0">
<tr>
<td align="center" background="images/tablebackground.gif">
<strong>
VIDEO UPDATES
</strong>
</td>
</tr>
<tr>
<td align="center">
<br>
$options = array( "windowtarget" => "_blank", "subtitle" => "<center>%a<br>%w</center>" );
$objCpm->cpm_viewLastAddedMediaFrom ( 1, 4, "cat=8,12:album=19,21,26,25", $options);
</td>
</tr>
</table>
<table width="560" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td align="center" background="images/tablebackground.gif">PICTURE UPDATES</td>
</tr>
<tr>
<td align="center">
$options = array( "windowtarget" => "_blank", "subtitle" => "<center>%a<br>%w</center>" );
$objCpm->cpm_viewLastAddedMediaFrom ( 1, 4, "cat=7,3,2:album=10,14,20,12,1,2,3,4,5,6", $options);
</td>
</tr>
</table>
$objCpm->cpm_close();
?>
Gah help!
That's not even valid php to begin with.
<div align="center"><a href="http://www.underoathfans.net/gallery" target="_blank"><img src="images/gallerypicture.gif" alt="gallery" width="560" height="70" border="0"></a>
<br>
<br>
</div>
<table align="center" width=" 560" cellpadding="0" cellspacing="0" border="0">
<tr>
<td align="center" background="images/tablebackground.gif">
<strong>
VIDEO UPDATES
</strong>
</td>
</tr>
<tr>
<td align="center">
<br>
<?php
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/gallery");
$options = array( "windowtarget" => "_blank", "subtitle" => "<center>%a<br>%w</center>" );
$objCpm->cpm_viewLastAddedMediaFrom ( 1, 4, "cat=8,12:album=19,21,26,25", $options);
?>
</td>
</tr>
</table>
<table width="560" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td align="center" background="images/tablebackground.gif">PICTURE UPDATES</td>
</tr>
<tr>
<td align="center">
<?php
$objCpm->cpm_viewLastAddedMediaFrom ( 1, 4, "cat=7,3,2:album=10,14,20,12,1,2,3,4,5,6", $options);
$objCpm->cpm_close();
?>
</td>
</tr>
</table>
the page is html but i have the php snippet for the cpmfetch i want to use!
it works fine but i wanted to have two sections. one for video updates, and one for picture updates as they are the two main categorys on my forum.
How can you have the spmfetch script so that in one table it has certain categorys for videos, then in anotehr table, certain categorys for pictures??
Quote from: farmerjeffe on March 08, 2007, 12:16:19 AM
the page is html but i have the php snippet for the cpmfetch i want to use!
it works fine but i wanted to have two sections. one for video updates, and one for picture updates as they are the two main categorys on my forum.
How can you have the spmfetch script so that in one table it has certain categorys for videos, then in anotehr table, certain categorys for pictures??
What your doing is correct as far as cpmfetch goes - and there is no reason it should be a problem.
Okay, I just noticed something... when I click on MEDIA on your site, it goes to media.html
Are you putting this in an HTML file? ( as in .html )
ah no sorry, u have to click "gallery" my bad!
which goes to "picturegallery.php"
what am i doing wrong then!?
Quote from: farmerjeffe on March 08, 2007, 01:44:09 AM
ah no sorry, u have to click "gallery" my bad!
which goes to "picturegallery.php"
what am i doing wrong then!?
I don't know. I am looking at the source, and I don't even see your HTML for "PICTURE UPDATES" in there. If you can make that appear, I will bet cpmFetch will start showing up also.
Ok the source shows the picture part now. But still black page for me!
Could you check the source again. Sorry the FTP client was stuck on "overwirte this file or not"
Quote from: farmerjeffe on March 08, 2007, 02:20:33 AM
Ok the source shows the picture part now. But still black page for me!
Could you check the source again. Sorry the FTP client was stuck on "overwirte this file or not"
You need to look at the source. There is a syntax error in there.
This is not help with HTML...
<b>Parse error</b>: syntax error, unexpected '<' in <b>/home/underoat/public_html/picturegallery.php</b> on line <b>22</b><br />
Unless the next post is directly relating to CpmFetch and a problem, AND has correct information - I am not responding.
This is not HTML 101... if you are not going to try, I am not going to help.
I did mean for my intention to sound like html help. All i want to know is can you run the script twice on one page? Because i tryed it and it really didnt work.
Ive given you the code for my page. I thought this cpmfetch was alot like say a php news script, where you have a dynamic php page and you can add a php snippet around html.
Obviously not.
At the moment ive resorted back to having just the one section:
http://www.underoathfans.net <--- then click gallery
I know it probably sound slike html help, but im fine with the html! all i want to know is how can i have a 1x4 row of pictures like i already have, but twice, say in a seperate table (not asking for html help)
Or would i have to ask someone about php to help me?
Hope thats cleared it up.
It works if you do it properly. Did you even try the code I posted?
Quote from: farmerjeffe on March 08, 2007, 10:47:41 AM
I did mean for my intention to sound like html help. All i want to know is can you run the script twice on one page? Because i tryed it and it really didnt work.
Ive given you the code for my page. I thought this cpmfetch was alot like say a php news script, where you have a dynamic php page and you can add a php snippet around html.
Obviously not.
At the moment ive resorted back to having just the one section:
http://www.underoathfans.net <--- then click gallery
I know it probably sound slike html help, but im fine with the html! all i want to know is how can i have a 1x4 row of pictures like i already have, but twice, say in a seperate table (not asking for html help)
Or would i have to ask someone about php to help me?
Hope thats cleared it up.
Okay, I don't want to sound callous, but the last post you did had a syntax error... that is PHP and something you did. Nothing to do with CpmFetch... your posts have been wrong, frequent and kneejerk, and not terribly informative at first. The problems you are having are not even getting as far as cpmfetch - they seem to be PHP problems.
Yes, CpmFetch can do multiple things on the same page. Hundreds of things even. When I posted your code back to you I thought that would go without saying.
And remember, this is free support - as in free you don't have to pay, and free as in no one is obligated to help.
And as nibbler posted - he probably already fixed that for you. You'll note the "dev team member" under his name - typically means he has some good experience with code and is worth listening too
Ok, so...
A) I'm blind because i thought the code in the comment nibbler posted was just a quote of my post.
B) I realise it is free support and you dont HAVE to answer.
Thank you for the help.
Ok?
Quote from: farmerjeffe on March 08, 2007, 09:02:01 PM
Ok, so...
A) I'm blind because i thought the code in the comment nibbler posted was just a quote of my post.
B) I realise it is free support and you dont HAVE to answer.
Thank you for the help.
Ok?
Although for "A" I have to admit I thought it was a quote too - he did say there was invalid php in there though - which is what you posted for. I glanced at the code and did not see any problems (but he had fixed it).
So yes, his post would have solved the problem.
Yes i realized that after a while! Unfortunately. But there is know need to say my messages were kneejerk etc etc. Your helping people that are going to be not so aware of every single detail in this forum as you already know very well so i don't understand why it annoys you so much.
But what the hey, officially solved thanks for the help!!
http://www.underoathfans.net <--- then click "gallery".
It works! ha
Great. Please try to use correct english grammar on the boards as there are plenty of supporters that don't have english as their first language and would have difficulty understanding you otherwise.
Quote from: farmerjeffe on March 10, 2007, 12:27:46 AM
Yes i realized that after a while! Unfortunately. But there is know need to say my messages were kneejerk etc etc. Your helping people that are going to be not so aware of every single detail in this forum as you already know very well so i don't understand why it annoys you so much.
But what the hey, officially solved thanks for the help!!
http://www.underoathfans.net <--- then click "gallery".
It works! ha
I think I was confusing you with someone else on the kneejerk comment.
I give people who are having problems lots of patience as it relates to cpmfetch. HTML and PHP syntax issues should be elsewhere though. This is a forum for cpmfetch and how to use it, not a where does the semicolon go in php or why is my HTML not working.
Glad to hear your problem is solved though