I tried some searching and just looking thru the forum but could just find a straight forward anwser (although i doubt this question hasn't been asked before)
I have a coppermine running with a custom template (just to show what i mean)
http://greetoz.nl/ts/
and a site (also just to show what i mean)
http://greetoz.nl/JWB/
as you see on the site i have a poll and nieuws on the left hand side on the index.php page i just put in this code:
<?php
include('nieuws.php');
?>
and
<?php
if (!isset($_COOKIE['voted1'])){
include('poll_entry1.inc.php'); }
else {
include('poll_results1.inc.php'); }
?>
how do i use this code in the coppermine template? obviosly just adding it doesn't work. i tried putting a function in theme.php but that gives me all kinds of errors :P
thanks in advance
Here's a post from today that I think deals with your question: http://forum.coppermine-gallery.net/index.php?topic=33267.0 (http://forum.coppermine-gallery.net/index.php?topic=33267.0).
Quote from: Gizmo on June 30, 2006, 03:17:01 AM
Here's a post from today that I think deals with your question: http://forum.coppermine-gallery.net/index.php?topic=33267.0 (http://forum.coppermine-gallery.net/index.php?topic=33267.0).
I editted the template.html to look like my other files (like index.php) the post you reffer to doesn't do it that way i think..? the code on that link is:
<?php
define('IN_COPPERMINE', true);
require('include/init.inc.php');
pageheader('Your title');
/* insert php code here */
pagefooter();
?>
should i put that in nieuws.php? i don't quite understand how to use that piece of code. i just want a poll and some news to show up within the coppermine template but because the template is html and not php it does not show php code.
i just want a small include script to show some dynamic content on every page (also on the coppermine page) like a poll and some news
if you want to be able to include php code to coppermines template file (template.html) you can either use the anycontent block or the custom header/ footer
anycontent block... serach or check the docs,
the custom header/ footer.. create a php file and include it using the config. As header, it appeares before coppermine outputs, footer... below coppermine
Quote from: Stramm on June 30, 2006, 12:51:16 PM
if you want to be able to include php code to coppermines template file (template.html) you can either use the anycontent block or the custom header/ footer
anycontent block... serach or check the docs,
the custom header/ footer.. create a php file and include it using the config. As header, it appeares before coppermine outputs, footer... below coppermine
is there a way to change the placement of the anycontentblock? now it just shows up before the categories.. and i want it in the left site bar.. like i have in the second link i gave. http://greetoz.nl/JWB/ on the left hand side you see the poll (under agenda lol:P) i want that to show up in that place in coppermine.
not easy, I'd say you need some core code changes