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: Line From CPG to display on SMF  (Read 4944 times)

0 Members and 1 Guest are viewing this topic.

yazeft

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 34
Line From CPG to display on SMF
« on: July 15, 2007, 05:12:49 pm »

I've got CPG anf SMF bridged i would like to take this line from CPG homepage and display it on SMF homepage:

Quote
83120 files in 15 albums and 105 categories with 32155 comments viewed 2522154 times

Its the line under the categories and before the albums on CPG homepage.. what code should i use?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Line From CPG to display on SMF
« Reply #1 on: July 16, 2007, 06:58:32 am »

There are several mods that deal with content syndication (displaying content from coppermine on non-coppermine pages). We recommend using cpmFetch. As this requires changing something in SMF (and not in Coppermine), we're not familar with the actual syntax. Moving to cpmFetch sub-board. Read the documentation that comes with it and re-phrease your question if you have further questions with it (after having read the cpmFetch docs and sticky threads).
Logged

jacci

  • Coppermine newbie
  • Offline Offline
  • Posts: 17
  • I don't usually have a clue what is going on....
    • pretendercentre.com
Re: Line From CPG to display on SMF
« Reply #2 on: July 16, 2007, 03:48:17 pm »

An easy way to get it into your SMF without too much hassle hopefully (I am assuming you have cmpfetch successfully installed and working). this is what i did

write the script... should be smt like this i think:  (I am new to cpmfetch so please correct me if this is wrong)

Code: [Select]
<?php
include "./path/cpmfetch/cpmfetch.php";
$objCpm = new cpm("./path/cpmfetch/cpmfetch_config.php");
$objCpm->cpm_formatStats("<b>%a</b> albums with <b>%f</b> images that have recieved <b>%v</b> hits.<br><br>");
$objCpm->cpm_close();
?>

you can mess aroudn with the formatting in the formatStats area
save that into your smf root directory as filename.php  (change to whatever you want)

then in your index.template.php for your skin use this command


Code: [Select]
require('./path/filename.php');
put that where you want the line to show up

i have done smt very similar and got that working. I know it is a bit of double handling with the external file, but it works fine for me and hasnt caused any errors in my smf error log

hope that helps
Logged
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 19 queries.