Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Kinda OT. Need HTML help


wizardsandwars

Recommended Posts

Posted

Hey,

 

I'm working in integrating a poll from my phpBB forum into one of my inforboxes, so that users can see and vote on the poll from my catalog home, and when they view the poll results, or after they vote, they would be directed to the forum which would allow them to post a comment on the poll and view previous comments made. I feel that this would help me get my forums jumpstarted, because alot of prople like to use my former poll both that I got in a contribution here.

 

Anyways, I having some HTML trouble, and I thought someone might be able to help.

 

I have the poll in an infobox. Normally, when the 'submit vote' button is selected, it calls a 'posting.php' script using a setof 'form' tags and an 'input' tag like this:

 

 

<form method="POST" action="posting.php?t=14">

 

<input type="hidden" name="topic_id" value="14"><input type="hidden" name="mode" value="vote">

</form>

 

 

Between the form tags are the radio buttons with options to vote for, and all of that.

 

However, I am using iframes to view my forum, so that my shop header, and colums are around the forum, so what I need to be able to do is put 'posting.php', with all of the required parameters inside of an <iframe> tag, kind of like this:

 

 

 

<iframe src="http://wizardsandwars.com/forum2/posting.php?t=14" name="BB" frameborder="0" id="BB"style="possition:absolute; border: 0px; left:2px; top:0px; width:100%; height:2000px"></iframe>

 

 

 

Except that I don't know how to pass all of the other parameters along for it to work properly. From the looks of it, the parameters that I need are in here

 

 

 

<input type="hidden" name="topic_id" value="14"><input type="hidden" name="mode" value="vote">

 

 

 

Anyone know how I can do this?

-------------------------------------------------------------------------------------------------------------------------

NOTE: As of Oct 2006, I'm not as active in this forum as I used to be, but I still work with osC quite a bit.

If you have a question about any of my posts here, your best bet is to contact me though either Email or PM in my profile, and I'll be happy to help.

Posted

BTW, you can check out what I'm trying to do here

 

www.wizardsandwars.com/test_poll.html

 

Look at the left colum about halfway down. If you view the poll results, it works perfectly, however, if you try to vote, it is missing parameters.

-------------------------------------------------------------------------------------------------------------------------

NOTE: As of Oct 2006, I'm not as active in this forum as I used to be, but I still work with osC quite a bit.

If you have a question about any of my posts here, your best bet is to contact me though either Email or PM in my profile, and I'll be happy to help.

Posted
BTW, you can check out what I'm trying to do here

 

www.wizardsandwars.com/test_poll.html

 

Look at the left colum about halfway down. If you view the poll results, it works perfectly, however, if you try to vote, it is missing parameters.

 

Chris-

 

Can you post the receiving code side of things? From viewing source, it looks like things are set up nice on the front end, anyway.

 

Aodhan

Posted

Sure. Here is what to me looks like it receives the parameters in the posting.php script. If you need more, please let me know.

 

//

// Check and set various parameters

//

$params = array('submit' => 'post', 'confirm' => 'confirm', 'preview' => 'preview', 'delete' => 'delete', 'poll_delete' => 'poll_delete', 'poll_add' => 'add_poll_option', 'poll_edit' => 'edit_poll_option', 'mode' => 'mode');

while( list($var, $param) = @each($params) )

{

if ( !empty($HTTP_POST_VARS[$param]) || !empty($HTTP_GET_VARS[$param]) )

{

 $$var = ( !empty($HTTP_POST_VARS[$param]) ) ? $HTTP_POST_VARS[$param] : $HTTP_GET_VARS[$param];

}

else

{

 $$var = '';

}

}



$params = array('forum_id' => POST_FORUM_URL, 'topic_id' => POST_TOPIC_URL, 'post_id' => POST_POST_URL);

while( list($var, $param) = @each($params) )

{

if ( !empty($HTTP_POST_VARS[$param]) || !empty($HTTP_GET_VARS[$param]) )

{

 $$var = ( !empty($HTTP_POST_VARS[$param]) ) ? intval($HTTP_POST_VARS[$param]) : intval($HTTP_GET_VARS[$param]);

}

else

{

 $$var = '';

}

}

-------------------------------------------------------------------------------------------------------------------------

NOTE: As of Oct 2006, I'm not as active in this forum as I used to be, but I still work with osC quite a bit.

If you have a question about any of my posts here, your best bet is to contact me though either Email or PM in my profile, and I'll be happy to help.

Posted

Chris-

 

Maybe it's something I'm missing, but I don't see where you request the value of "vote_id"? That's what you show as the name of your radio buttons, but you never request that specific value?

 

Aodhan

Posted

Hmmn. Yes, it appears that I din't give you engough of the scripts. There are several "if" constructs towards the top of the 'posting.php' script.

They look like this:

 

if ( $result = $db->sql_query($sql) )

{

$post_info = $db->sql_fetchrow($result);



$forum_id = $post_info['forum_id'];

$forum_name = $post_info['forum_name'];



$is_auth = auth(AUTH_ALL, $forum_id, $userdata, $post_info);

...

...

...

 

 

 

If you want to see the whole thing, I can send it to you via email. It's rather lengthy, and I don't want to waste bandwidth.


-------------------------------------------------------------------------------------------------------------------------

NOTE: As of Oct 2006, I'm not as active in this forum as I used to be, but I still work with osC quite a bit.

If you have a question about any of my posts here, your best bet is to contact me though either Email or PM in my profile, and I'll be happy to help.

Posted

Whups.

 

Looks like I don't know what the hell I'm talking about. Obviously, the code I posted has nothing to do with what you asked.

Like I saidd, maybe I should email you the posting script. I don't know exactly how it passes all of the variables.

 

I do know that if I call it in a form, this is all I need.

 

<form method="POST" action="posting.php?t=14"> 



<input type="hidden" name="topic_id" value="14"><input type="hidden" name="mode" value="vote"> 

</form>

 

However, I'm not sure how to put this into an iframe.

-------------------------------------------------------------------------------------------------------------------------

NOTE: As of Oct 2006, I'm not as active in this forum as I used to be, but I still work with osC quite a bit.

If you have a question about any of my posts here, your best bet is to contact me though either Email or PM in my profile, and I'll be happy to help.

Posted
Whups.

 

Looks like I don't know what the hell I'm talking about. Obviously, the code I posted has nothing to do with what you asked.

Like I saidd, maybe I should email you the posting script. I don't know exactly how it passes all of the variables.  

 

I do know that if I call it in a form, this is all I need.

 

<form method="POST" action="posting.php?t=14"> 



<input type="hidden" name="topic_id" value="14"><input type="hidden" name="mode" value="vote"> 

</form>

 

However, I'm not sure how to put this into an iframe.

 

Chris-

 

Go ahead and send me the page(s). I'll send you an email address privately. However, I don't see where you call posting.php. Your submit and links go to poll_window_vote.php, and poll_window.php

 

Aodhan

Posted

Ah, now you are getting the jist of what I am asking.

 

'poll_window_vote.php', and 'poll_window.php' contain code that creates frames for my to embed my forum into my shop.

 

I've sent both of these as well as the posting.php script.

-------------------------------------------------------------------------------------------------------------------------

NOTE: As of Oct 2006, I'm not as active in this forum as I used to be, but I still work with osC quite a bit.

If you have a question about any of my posts here, your best bet is to contact me though either Email or PM in my profile, and I'll be happy to help.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...