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]   Go Down

Author Topic: cpmfetch & SMF  (Read 7491 times)

0 Members and 1 Guest are viewing this topic.

GP

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
cpmfetch & SMF
« on: February 18, 2007, 07:03:34 pm »

This is probably extremely rookie'ish, but we apparently need someone to walk us through embedding cpmfetch with SMF.  The installation seems to have gone fine because we have the sample images on the installation page.  However, everytime we try to embed cpmfetch, we continue to get template parse errors.  Can someone help us drag us to the answer? My head is getting sore from falling over on the keyboard.   :D

-  cpmfetch 1.9.8 is installed with our coppermine folder

-  Both SMF 1.1.2 and Coppermine are each in the root dir.

We're trying to pull it in just below users online today stats of the index but.....  :'(

index.template.php?

<?php
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/cpg");
$objCpm->cpm_viewRandomMedia(3,3);
$objCpm->cpm_close();
?>
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: cpmfetch & SMF
« Reply #1 on: February 18, 2007, 07:18:24 pm »

This is probably extremely rookie'ish, but we apparently need someone to walk us through embedding cpmfetch with SMF.  The installation seems to have gone fine because we have the sample images on the installation page.  However, everytime we try to embed cpmfetch, we continue to get template parse errors.  Can someone help us drag us to the answer? My head is getting sore from falling over on the keyboard.   :D

-  cpmfetch 1.9.8 is installed with our coppermine folder

-  Both SMF 1.1.2 and Coppermine are each in the root dir.

We're trying to pull it in just below users online today stats of the index but.....  :'(

index.template.php?

<?php
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/cpg");
$objCpm->cpm_viewRandomMedia(3,3);
$objCpm->cpm_close();
?>


What is the exact parse error?


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

GP

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Re: cpmfetch & SMF
« Reply #2 on: February 18, 2007, 07:25:27 pm »

Thanks for the quick response vuud!   I'm sure the problem is with our inexperience with adding something to the SMF files because the cpmfetch seems to do the trick.  Here's just one of the many parse errors that we've gotten with the trial and error of finding a spot for the display.

Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in .../Themes/Alienation/index.template.php on line 387

Any help is appreciated.
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: cpmfetch & SMF
« Reply #3 on: February 18, 2007, 07:36:10 pm »

Thanks for the quick response vuud!   I'm sure the problem is with our inexperience with adding something to the SMF files because the cpmfetch seems to do the trick.  Here's just one of the many parse errors that we've gotten with the trial and error of finding a spot for the display.

Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in .../Themes/Alienation/index.template.php on line 387

Any help is appreciated.



What is line 387?

This typically means you botched something
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

GP

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Re: cpmfetch & SMF
« Reply #4 on: February 18, 2007, 07:42:48 pm »

Yep - I'm sure we've botched something  :D   The parse error varies with each location we've tried in the index template - so it's got to be our ignorance.   ::)   In this particular case it was just the following lines that were erroring because of our insert.

   // Show the load time?
   if ($context['show_load_time'])
      echo '<br />
      <span class="smalltext">', $txt['smf301'], $context['load_time'], $txt['smf302'], $context['load_queries'], $txt['smf302b'], '</span>';


Yeah, I know, that's what you get when a marketing major tries to help work on a site!  :-\

Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: cpmfetch & SMF
« Reply #5 on: February 18, 2007, 09:23:55 pm »

Yep - I'm sure we've botched something  :D   The parse error varies with each location we've tried in the index template - so it's got to be our ignorance.   ::)   In this particular case it was just the following lines that were erroring because of our insert.

   // Show the load time?
   if ($context['show_load_time'])
      echo '<br />
      <span class="smalltext">', $txt['smf301'], $context['load_time'], $txt['smf302'], $context['load_queries'], $txt['smf302b'], '</span>';


Yeah, I know, that's what you get when a marketing major tries to help work on a site!  :-\




Is it becuase the cpmfetch stuff you are inserting is in a <?php block, in a location that is already in a php block in the template?


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

GP

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Re: cpmfetch & SMF
« Reply #6 on: February 18, 2007, 09:32:17 pm »

We removed the php tags, with that in mind, but continue to get parse errors.   :-\
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: cpmfetch & SMF
« Reply #7 on: February 18, 2007, 09:37:29 pm »

We removed the php tags, with that in mind, but continue to get parse errors.   :-\


So when you take out the cpmfetch stuff, the errors go away?

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

GP

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Re: cpmfetch & SMF
« Reply #8 on: February 18, 2007, 09:38:38 pm »

correct
Logged

GP

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Re: cpmfetch & SMF
« Reply #9 on: February 18, 2007, 09:41:30 pm »

vuud - based on the pm that I sent you, do I have the cpmfetch code correct?
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: cpmfetch & SMF
« Reply #10 on: February 18, 2007, 10:12:20 pm »

vuud - based on the pm that I sent you, do I have the cpmfetch code correct?


Probably not now that I look at it...

Your running a dev version without reading the readme that came with it and the installation instructions.

<?php
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/cpg");
$objCpm->cpm_viewRandomMedia(3,3);
$objCpm->cpm_close();
?>

The $objCpm = new cpm("/cpg");  is wrong for the dev series.  The /cpg needs to be a path to the cpmfetch_config.php file.

So it could be something like

$objCpm = new cpm("../cpg132/cpmfetch/cpmfetch_config.php");

But... having that wrong does not give a syntax error.  So while it would be your problem eventually, it would not be it now.

Please post your whole file and I will see if I notice anything.



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.027 seconds with 20 queries.