If you are not registered or logged in, you may still use these forums but with limited features. Show recent topics
  [Search] Search   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [FAQ]  FAQ 
[Register] Register / 
[Login] Login 
Adv. Poll PopUp Code  XML
Forum Index » General Discussion
Author Message
albatross
Newbie

Joined: 02/11/2002 09:04:52
Messages: 4
Location: Sweden
Offline

Hi,
Have installed Advanced Poll and it works great!

Just one questions:
Wonder if there is someone who has clean PHP code to insert.
My PopUp function will not work

Regards
Nicklas, sweden
ps! proxy2 guestbook is cool

albatross
[WWW]
albatross
Newbie

Joined: 02/11/2002 09:04:52
Messages: 4
Location: Sweden
Offline



Hehe, found solutions myself!
Here is the progress code:

[b]Before html:[/b]
(not sure it´s correct, but it works fine on my site)

<?php
$poll_path = dirname(__FILE__);
if (eregi("WIN",PHP_OS)) {
$poll_path = str_replace("\\","/",$poll_path);
}
require "./poll_cookie.php";
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . "GMT");
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
?>

[b]Somewere into your body html:[/b]

<?php
require $poll_path."/include/config.inc.php";
require $poll_path."/include/$POLLDB[class]";
require $poll_path."/include/class_poll.php";
$CLASS["db"] = new polldb_sql;
$CLASS["db"]->connect();

$php_poll = new poll();

/* the third poll */
$php_poll->set_template_set("popup");
if ($php_poll->is_valid_poll_id(3)) {
echo $php_poll->display_poll(3);
}
?>

albatross
[WWW]
 
Forum Index » General Discussion
Go to:   
Based on the open source JForum