Line From CPG to display on SMF Line From CPG to display on SMF
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Line From CPG to display on SMF

Started by yazeft, July 15, 2007, 05:12:49 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

yazeft

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

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

Joachim Müller

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

jacci

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)

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


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