Advanced search  

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

Pages: [1] 2   Go Down

Author Topic: Two on one page!?!?  (Read 16329 times)

0 Members and 1 Guest are viewing this topic.

farmerjeffe

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 52
Two on one page!?!?
« 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
« Last Edit: March 10, 2007, 12:34:06 am by Nibbler »
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: Two on one page!?!?
« Reply #1 on: March 07, 2007, 08:19:28 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
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

farmerjeffe

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 52
Re: Two on one page!?!?
« Reply #2 on: March 07, 2007, 08:25:34 pm »

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.

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

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: Two on one page!?!?
« Reply #3 on: March 07, 2007, 08:38:46 pm »

Fatal error: Cannot redeclare class cpm in /home/underoat/public_html/cpmfetch/cpmfetch.php on line 33

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


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

farmerjeffe

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 52
Re: Two on one page!?!?
« Reply #4 on: March 07, 2007, 08:46:25 pm »

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


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

Logged

farmerjeffe

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 52
Re: Two on one page!?!?
« Reply #5 on: March 07, 2007, 09:15:03 pm »

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

farmerjeffe

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 52
Re: Two on one page!?!?
« Reply #6 on: March 07, 2007, 11:30:51 pm »

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


Code: [Select]

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

Nibbler

  • Guest
Re: Two on one page!?!?
« Reply #7 on: March 07, 2007, 11:39:08 pm »

That's not even valid php to begin with.

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

farmerjeffe

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 52
Re: Two on one page!?!?
« Reply #8 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??
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: Two on one page!?!?
« Reply #9 on: March 08, 2007, 12:53:58 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 )

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

farmerjeffe

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 52
Re: Two on one page!?!?
« Reply #10 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!?
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: Two on one page!?!?
« Reply #11 on: March 08, 2007, 01:54:36 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.



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

farmerjeffe

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 52
Re: Two on one page!?!?
« Reply #12 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"
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: Two on one page!?!?
« Reply #13 on: March 08, 2007, 03:39:29 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.



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

farmerjeffe

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 52
Re: Two on one page!?!?
« Reply #14 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.
Logged

Nibbler

  • Guest
Re: Two on one page!?!?
« Reply #15 on: March 08, 2007, 02:05:18 pm »

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

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: Two on one page!?!?
« Reply #16 on: March 08, 2007, 03:33:20 pm »

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

farmerjeffe

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 52
Re: Two on one page!?!?
« Reply #17 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?
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: Two on one page!?!?
« Reply #18 on: March 08, 2007, 10:41:43 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.




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

farmerjeffe

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 52
Re: Two on one page!?!?
« Reply #19 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
Logged
Pages: [1] 2   Go Up
 

Page created in 0.029 seconds with 20 queries.