View Single Post
Old 07-15-2004, 10:17 PM   #23
Destroyer X
Green Mole
 
Join Date: Jun 2004
Location: Oklahoma, U.S.A.
Posts: 19
Well, after who knows how long with messing with this, all I can say is......hallelujah!

PhpDig is parsing the poll.inc.php include almost exactly the way I wanted it to. Before I forget, here is what I did.

As suggested, I made the changes in search_function.php. Then in poll.inc.php, I did a few modifications to the coding. Instead of the code looking like this:

PHP Code:
<?php 

$include_path 
"/home/destroyerx/public_html/poll"

if (!isset(
$PHP_SELF)) { 
    global 
$HTTP_GET_VARS$HTTP_POST_VARS$HTTP_SERVER_VARS
    
$PHP_SELF $HTTP_SERVER_VARS["PHP_SELF"]; 
    if (isset(
$HTTP_GET_VARS)) { 
        while (list(
$name$value)=each($HTTP_GET_VARS)) { 
            $
$name=$value
        } 
    } 
    if (isset(
$HTTP_POST_VARS)) { 
        while (list(
$name$value)=each($HTTP_POST_VARS)) { 
            $
$name=$value
        } 
    } 
    if(isset(
$HTTP_COOKIE_VARS)){ 
        while (list(
$name$value)=each($HTTP_COOKIE_VARS)){ 
            $
$name=$value
        } 
    } 


require 
$include_path."/include/config.inc.php"
require 
$include_path."/include/class_poll.php"

$php_poll = new poll(); 
echo 
$php_poll->set_include_path($include_path); 

?>
I modified it slightly to make it look like this so it'll grab my poll template and display the latest poll:

PHP Code:
<?php 

/*path*/
$include_path "/home/destroyerx/public_html/poll"

if (!isset(
$PHP_SELF)) { 
    global 
$HTTP_GET_VARS$HTTP_POST_VARS$HTTP_SERVER_VARS
    
$PHP_SELF $HTTP_SERVER_VARS["PHP_SELF"]; 
    if (isset(
$HTTP_GET_VARS)) { 
        while (list(
$name$value)=each($HTTP_GET_VARS)) { 
            $
$name=$value
        } 
    } 
    if (isset(
$HTTP_POST_VARS)) { 
        while (list(
$name$value)=each($HTTP_POST_VARS)) { 
            $
$name=$value
        } 
    } 
    if(isset(
$HTTP_COOKIE_VARS)){ 
        while (list(
$name$value)=each($HTTP_COOKIE_VARS)){ 
            $
$name=$value
        } 
    } 


require 
$include_path."/include/config.inc.php"
require 
$include_path."/include/class_poll.php"

$php_poll = new poll(); 

/*template*/
$php_poll->set_template_set("Destroyer X Template"); // Destroyer X Template = template name

/*newest poll*/ 
echo $php_poll->poll_process("newest");

?>
Now, my poll is displaying at http://www.destroyerx.net/search/search.php

However, I ran into a very small problem (which I hope is very very simple to fix). While it's not in the realm of PhpDig, it's something I hope it'll be easily fixed. At http://www.destroyerx.net/sample.php, it displays the Website Poll near the bottom as the following:

----------------
Website Poll
----------------

Which OS is your Web site running on?

BSD
Linux
Solaris
FreeBSD
MacOSX
Windows NT
others

Vote Button

View Results

Advanced Poll v2.02

However, at http://www.destroyerx.net/search/search.php, it shows almost all of the poll content above, except it reduces the Vote Button to a very small textless button, the View Results link is completely gone, and where it says Advanced Poll v2.02, it now says Advanced Poll v.

I know it seems kind of stupid of me to worry about such a thing, but I don't understand why it would do that though. Does anyone have any suggestions or comments I'm thinking it may have something to do with how I ordered the contents of php.inc.php, because on sample.php where the poll code is displayed on that page, here's all that's there:

PHP Code:
<?php
include_once "/home/destroyerx/public_html/poll/booth.php";
$php_poll->set_template_set("Destroyer X Template"); // Destroyer X Template = template name 
echo $php_poll->poll_process("newest");
?>
Now if I can get the poll on http://www.destroyerx.net/search/search.php, to display like it is at http://www.destroyerx.net/sample.php, http://www.destroyerx.net/feedback.php, or whereever, that would really make me jump for joy.

Once again Charter and vinyl-junkie, thank you two so much for all of your help This is you two's victory!

Ciao for now!
__________________
Visit the Destroyer X Network at http://www.destroyerx.net/
Destroyer X is offline   Reply With Quote