Calling my script-knowing friends

Liar said:
Depends on what the file contains.

This:



<?php



/*****************************************************

** Title........: Configuration File

** Filename.....: config.php

** Author.......: Ralf Stadtaus

** Homepage.....: http://www.stadtaus.com/

** Contact......: mailto:info@stadtaus.com

** Version......: 0.4

** Notes........: This file contains the configuration

** Last changed.: 2004-01-19

** Last change..: Vote information

*****************************************************/











/*****************************************************

** Script configuration - for the documentation of

** following variables please take a look at the

** documentation file in folder 'docu'.

*****************************************************/





$vote_title = 'The Half Blood Prince';

$vote_text = 'Who is the Half Blood Prince?';



$vote_option[] = 'Seamus Finnigan';

$vote_option[] = 'Dean Thomas';

$vote_option[] = 'Rubeus Hagrid';

$vote_option[] = 'Someone we have met but whose ancestry we are not familiar with yet';

$vote_option[] = 'Someone we have never met before';



$intern_vote_name = 'half_blood_prince';

$form_field_type = 'radio'; // (radio, select, readio_image)

$bar_image_name = 'blue.gif';

$max_bar_width = '200'; // (pixel)



$check_ip_address = 'yes'; // (yes/no)

$check_cookie = 'yes';





$language = 'en'; // (de, en, hu, nl, no, pl, sv, tr)



$path['templates'] = './templates/';

$path['logfiles'] = './logfiles/';



$tmpl['layout'] = 'voting.tpl.html';



$log['logfile'] = 'log.txt';



$show_error_messages = 'yes';











/*****************************************************

** Add here further words, text, variables and stuff

** that you want to appear in the template.

*****************************************************/

$add_text = array(



'txt_additional' => 'Additional', // {txt_additional}

'txt_more' => 'More', // {txt_more}



'txt_script_name' => 'Voting Script'



);

















/*****************************************************

** Send safety signal to included files

*****************************************************/

define('IN_SCRIPT', 'true');









/*****************************************************

** Include script code

*****************************************************/

$script_root = './';



include($script_root . 'inc/core.inc.php');









?>
 
...and what does
inc/core.inc.php
contain?

:)

What I'm getting at is, if you just go to the index2.php file, does it generate HTML, and how does that HTML look? Does it include HEAD and BODY tags,or is it just an enclosed table?
 
If I open index2.php in Dreamweaver, I see a blank, white page. If I switch over to look at its code, all I see is what I posted in my previous post.
 
Svenskaflicka said:
If I open index2.php in Dreamweaver, I see a blank, white page. If I switch over to look at its code, all I see is what I posted in my previous post.
Yes, you have to upload it to your web server and watch it through there (through a web browser). What you see in Dreamweaver is the php (programming code) that in the end generates HTML when accessed through the server.
 
Edited to delete link. I don't want anyone to sneak a peak at the page before it's completely finished!
 
Last edited:
Svenskaflicka said:
Edit: Those tags around 1 mess things up, I think. When I created a link to that adress on a webpage, it worked.
No worries, I got it. Ok, it looks likr the script generateds a full HTML page with HEAD and BODY and all. I placed my vote and it seems to work. :)

But you wanted to place this poll as a part of another page, no? Then you need to find a way to strip the page header and page footer code from it. Then you can use either the code that looked like this

<!--#include file="index2.php"-->

or if that doesn't work, the php equivalent.

<?php
include('index2.php');
?>

You place the code in the spot on your page (your 'index1'-page, I presume?) where you would had placed the html for the poll.

Oh and one more thing, you must name it index.php, instead of index.htm or html. If you don't do that, the php code in the poll probably won't execute,and it will liik like it did in your Dreamweaver.






EDIT:Or just do it like this... from the script's documentation...
-----------
I-Frame (HTML)

With the HTML tag <iframe> you can include the script in an existing page. Place the <iframe> tag where you want it to appear within the page: Example:

<iframe name="voting" src="./voting.php" width="400" height="300" frameborder="0"></iframe>
-----------

#L
 
Last edited:
Liar said:



EDIT:Or just do it like this... from the script's documentation...
-----------
I-Frame (HTML)

With the HTML tag <iframe> you can include the script in an existing page. Place the <iframe> tag where you want it to appear within the page: Example:

<iframe name="voting" src="./voting.php" width="400" height="300" frameborder="0"></iframe>
-----------

#L


YES!!! Det funkar!:kiss: :kiss: :kiss: :kiss: :kiss: :kiss:
I owe you BIG time for this! And I owe Lou, too, for linking me to this script!:kiss: :kiss: :kiss: :kiss:
 
Svenskaflicka said:
YES!!! Det funkar!:kiss: :kiss: :kiss: :kiss: :kiss: :kiss:
I owe you BIG time for this! And I owe Lou, too, for linking me to this script!:kiss: :kiss: :kiss: :kiss:
Glad I could help.And show off my geek savvy at the same time.

#L
 
Just don't sneak into the site before it's done, pretty please. It's a mess right now, and I don't want to show it off until it's perfect.
 
Back
Top