coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 cpmFetch by vuud => Topic started by: JJB22 on August 30, 2007, 09:15:04 PM

Title: mkportal
Post by: JJB22 on August 30, 2007, 09:15:04 PM
Hi, how can I (or is it even possible?) show random images on an mkportal (http://www.mkportal.it/)?
Title: Re: mkportal
Post by: vuud on September 01, 2007, 09:18:45 AM
Quote from: JJB22 on August 30, 2007, 09:15:04 PM
Hi, how can I (or is it even possible?) show random images on an mkportal (http://www.mkportal.it/)?

I dunno, can you execute PHP inside mkportal?
Title: Re: mkportal
Post by: JJB22 on September 04, 2007, 01:31:28 PM
Um, well, you can make "blocks" (http://www.gd-diskusjon.com - you know, one of those red boxes), and you can choose whether you want to create a html block or a php block. If i choose php i get this:

<?
/*
Skriv koden ved å legge til utgangsresultat inn i
variabelen $content som vist i følgende eksempel.
Du har tilgang til DB, alle globale variabler
og alle Portal and Forum funksjoner står til din disposisjon
*/

$nome = $ibforums->member['name'];
$content="Hi $nome";

?>


... which I don't know if you get since half of is in norwegian. (It says something like Write the code by adding something in the $content thingy as shown in the example. You have access to the DB, all global variables and all Portal and Forum functions are available.)  :-\  But anyway, if I delete all of that and put the cpmfetch code in there instead, the whole thing just disappears again when i save, and if I put the cpmfetch code inside the "$content="Hi $nome";" it just shows up as code when I save...