Two on one page!?!? Two on one page!?!?
 

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

Two on one page!?!?

Started by farmerjeffe, March 07, 2007, 08:08:30 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

farmerjeffe

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

vuud

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

farmerjeffe

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 14"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 14"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

vuud

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 14"cat=8,12:album=19,21,26,25"$options);

....


$options = array( "windowtarget" => "_blank""subtitle" => "<center>%a<br>%w</center>" );
$objCpm->cpm_viewLastAddedMediaFrom 14"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.


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

farmerjeffe

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 14"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 14"cat=7,3,2:album=10,14,20,12,1,2,3,4,5,6"$options);


</td>
  </
tr>
</
table>

$objCpm->cpm_close();
?>


farmerjeffe

Ive been trying everything, does it not work when its split up between tables?

farmerjeffe

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 14"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 14"cat=7,3,2:album=10,14,20,12,1,2,3,4,5,6"$options);


</td>
  </
tr>
</
table>
$objCpm->cpm_close();
?>




Gah help!

Nibbler

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 14"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 14"cat=7,3,2:album=10,14,20,12,1,2,3,4,5,6"$options);
$objCpm->cpm_close();
?>


</td>
  </tr>
</table>

farmerjeffe

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

vuud

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 )

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

farmerjeffe

ah no sorry, u have to click "gallery" my bad!

which goes to "picturegallery.php"

what am i doing wrong then!?

vuud

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.



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

farmerjeffe

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"

vuud

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.



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

farmerjeffe

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.

Nibbler

It works if you do it properly. Did you even try the code I posted?

vuud

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

farmerjeffe

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?

vuud

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.




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

farmerjeffe

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