Inserting only {GALLERY} into a I-frame Inserting only {GALLERY} into a I-frame
 

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

Main Menu

Inserting only {GALLERY} into a I-frame

Started by gelaskimgel, August 18, 2006, 12:41:10 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

gelaskimgel

well the subject, is the question... is that possible?

when I use the following code, it won't work:

<iframe src="{GALLERY}" name="iframe" width="100%" frameborder="1" scrolling="no" height="545"></iframe>

Sami

You can,t put that place holder under src of a iframe tag the src properties should be a file , something like index.php or index.html or ....
if you want to only show the gallery content without buttons you should create a custom theme
‍I don't answer to PM with support question
Please post your issue to related board

gelaskimgel

I've created a custum theme... but I want the only the {GALLERY} into a I-frame... How can i make that happen by doing a custom theme?

Sami

Why do you want to have {gallery} under iframe ?
what is the purpose of that !?
Can you explain it more ...
‍I don't answer to PM with support question
Please post your issue to related board

Joachim Müller

That's just wishful thinking - as bmossavari suggested, the {GALLERY} token is just a placeholder for the actual output. An html tag like<iframe src="{GALLERY}" name="iframe" width="100%" frameborder="1" scrolling="no" height="545"></iframe>would then be transfered into something like <iframe src="<!-- Start standard table -->
<table align="center" width="100%" cellspacing="1" cellpadding="0" class="maintable">

        <tr>
                <td class="tableh1" width="80%" align="left"><b>Kategorie</b></td>
[...]" name="iframe" width="100%" frameborder="1" scrolling="no" height="545"></iframe>
, which is of course just bullshit, as the source attribute of an iframe tag is meant to contain reference to a file. It mustn't contain actual HTML.

As bmossavari suggested, you should explain what you're trying to accomplish in a broader sense, with some links and screenshots that illustrate what you want to accomplish. Coming up with pseudo-code that can't work is not a good idea.

Joachim

gelaskimgel

okay, I've just dropped the I-frame Idea... But can you guees soo help me with another thing?

The problem is that I'm using the Modpack from stramm, which great :) and I've install the picture of the week system.. My problem is now that I want to only take the picture of the week out of the code, and set it into my template.php.

The Picture Of the week systems code is:

<?php
/*
+--------------------------------------------------------------------------
|  Image period Mod by Des Hooper 
|  ========================================
|  Web: http://www.pinguish.co.uk
|  Email: mod@pinguish.co.uk
+---------------------------------------------------------------------------
| Do not remove this link data - credit where due please
+--------------------------------------------------------------------------
*/
define('IN_COPPERMINE'true);
define('UPLOAD_PHP'true);

require(
'include/init.inc.php');

if (isset(
$HTTP_GET_VARS['page'])) {
    
$PAGE max((int)$HTTP_GET_VARS['page'], 1);
    
$USER['lap'] = $PAGE;
} elseif (isset(
$USER['lap'])) {
    
$PAGE max((int)$USER['lap'], 1);
} else {
    
$PAGE 1;


if (isset(
$HTTP_GET_VARS['cat'])) {
    
$cat = (int)$HTTP_GET_VARS['cat'];

// Gather data for categories
$breadcrumb '';
$cat_data = array();
$statistics '';
$STATS_IN_ALB_LIST false;

pageheader($BREADCRUMB_TEXT $BREADCRUMB_TEXT $lang_index_php['welcome']);

        
//***Enter Path information here*** 
//***absolute path to main coppermine directory*** 

$copperminepath '../';  //***YOU MUST CHANGE THIS*** 

//This connects to the mysql DB 
//***change username and password below*** 

$MZrandompic = @mysql_connect('xxxxxxxx''xxxxxxxxxx''xxxxxxxxx'); //***YOU MUST CHANGE THIS*** 

if (!$MZrandompic) {  
echo( 
'<p>Unable to connect to the ' .  
'database server at this time.</p>' );  
exit();  
}  

//select photo DB 


if (! @mysql_select_db('xxxxxxxx') ) {//***YOU MUST CHANGE THIS***  
die( '<p>Unable to locate the picture ' .  
'database at this time.</p>' );  
}  
function 
all_ims() {
//This gets a random picture record from the database and 
//the picture's location and displays it 
//***title of the page is here so can me made day/week/month etc**
//***YOU MUST CHANGE THIS*** 
echo "<CENTER><H2>Image Of The Week</H2><CENTER>";
echo 
"<BR>latest winners<BR>";
$MZresult = @mysql_query("SELECT  * 
FROM cpg148_pictures , cpg148_imageperiod
WHERE cpg148_imageperiod.pid = cpg148_pictures .pid AND date < now( ) order by cpg148_imageperiod.powid DESC Limit 10"
);  
if (!
$MZresult) {  
die(
'<p>Error performing query: ' mysql_error() .  
'</p>');  
}  

while ( 
$MZrow mysql_fetch_array($MZresult) ) {  

// $albumid = $MZrow['aid'];  //This gets the picture's associated album name 
$pos $MZrow['pid'];      //This finds the picture's coppermine location 
$ownername =$MZrow['owner_name']; 
$dd=$MZrow['date'];
$uploaded =date("d F Y",strtotime("$dd"));  
echo(
'<P ALIGN=center>');  
//***YOU MUST CHANGE THIS*** note path to the gallery must follow your path convention
echo('<table border = 2><TR><TD><a  href="../displayimage.php?album=' $albumid .  
'&pos=-' $pos '">'); //make thumbnail clickable 
//***YOU MUST CHANGE THIS*** note path to the gallery must follow your path convention
echo('<IMG SRC="../albums/');          //append base dir structure 
echo($MZrow['filepath'].thumb_.$MZrow['filename'] . 
    
'" alt="click HERE to comment or get more info on the image"''border=0 >' '</a>'); //outputs path from /userspics 
echo"</TD><TD>Image of the week from: $uploaded <BR>Photographer: $ownername <BR></TD></TR></TABLE>";

}  
echo(
'<BR><BR><BR> <A HREF="imageweek.php">click here to go back</A><BR>');
}
function 
im() {
//This gets a random picture record from the database and 
//the picture's location and displays it 
echo "<CENTER><H1>Image Of The Week</H1><CENTER><BR><table border = 2><TR><TD>";
$MZresult = @mysql_query("SELECT * 
FROM cpg148_pictures, cpg148_imageperiod
WHERE cpg148_imageperiod.pid = cpg148_pictures.pid AND date < now() order by cpg148_imageperiod.powid DESC LIMIT 1"
);  
if (!
$MZresult) {  
die(
'<p>Error performing query: ' mysql_error() .  
'</p>');  
}  

while ( 
$MZrow mysql_fetch_array($MZresult) ) {  

// $albumid = $MZrow['aid'];  //This gets the picture's associated album name 
$pos $MZrow['pid'];      //This finds the picture's coppermine location 
$ownername =$MZrow['owner_name'];  
$dd=$MZrow['date'];
$uploaded =date("d F Y",strtotime("$dd"));    
echo(
'<P ALIGN=center>');  
$ownerid =$MZrow['owner_id'];  
//***YOU MUST CHANGE THIS*** note path to the gallery must follow your path convention
echo('<a  href="../displayimage.php?album=' $albumid .  
'&pos=-' $pos '">'); //make thumbnail clickable 
//***YOU MUST CHANGE THIS*** note path to the gallery must follow your path convention
echo('<IMG SRC="../albums/');          //append base dir structure 
echo($MZrow['filepath'].$MZrow['filename'] . 
    
'" alt="click HERE to comment or get more info on the image" ''border=0 >' '</a>'); //outputs path from /userspics 
echo "</TD></TR></TABLE><h3><BR>Image of the week since:$uploaded <BR><BR> Photographer : ";
echo(
'<a HREF="../index.php?showuser='.$ownerid.'">'.$ownername.'</A></H3>');
echo(
'<BR><BR><BR> <A HREF="imageweek.php?id=history">click here to see the last 10 winners</A><BR>');
if (!
USER_IS_ADMIN) {
}else{
echo(
'<BR><BR><BR> <A HREF="imageweekadmin.php">click here to enter admin tools</A><BR>');}
}  
}

if (
$_GET['id']== "history") { all_ims();
}
else { 
im();
}

pagefooter();    


?>




You can see the template here: www.rdc.lir.dk .

I've tried to make a copy of the code for Picture of the week, and make a example file, to test... but when I'm trying to load it here from: http://www.rdc.lir.dk/themes/neweb/includer.php .
That gives me the following to errors:
Warning: main(include/debugger.inc.php): failed to open stream: No such file or directory in /home/www/rdc.lir.dk/include/init.inc.php on line 26

Fatal error: main(): Failed opening required 'include/debugger.inc.php' (include_path='.:/usr/share/php:/usr/share/pear') in /home/www/rdc.lir.dk/include/init.inc.php on line 26


And when I'm changing a little bit in theinclude/init.inc.php file on line 26, then everything goes wrong, and the system crashes....


I hope that someone can help me with this problem... Buy the way, is it nesesary to create a new topic, about this problem or is it okay, that I'm writing it here?

gelaskimgel

let my say it like this... How can I modify the gallery, so I can add {PICTURE_OF_THE_WEEK} just like {SUB_MENU} in the theme.php . If that is possible, then I could insert {PICTURE_OF_THE_WEEK} into the template.html file and hope that it will work :)

Nibbler

I think one of the files included in the mod can be called as an image inside an img tag. That would work.

gelaskimgel

Nibbler I don't understand what you mean with that... can you give me an example?

Joachim Müller

Stramm's modpack doesn't get supported here. The POTD mod by Casper goes unsupported but on the thread that deals with it. We have a "one question per thread" policy that you agreed to respect when signing up. Closing.