Follow Us:
Tricked Out Mods: Forums

Best Hosting
 Forum FAQForum FAQ   SearchSearch   UsergroupsUsergroups   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

RavenNuke 2.50.00 - HTML Form Tag - Block
 
 
Post new topic   Reply to topic   print    Tricked Out News Forum Index -> User questions
View previous topic :: View next topic  
Author Message
Mike63740
I might as well work here
I might as well work here


Joined: Jan 07, 2010
Posts: 127
Location: Washington, DC

PostPosted: Mon May 14, 2012 3:27 pm 
Post subject: RavenNuke 2.50.00 - HTML Form Tag - Block
Reply with quote

Is there such a thing, or a way to enter a simple HTML Form Tag into a block. This block will be positioned to the left or right.

I have tried several blocks, but nothing happen.

Thank you.
_________________
Open-source software has been changing lives since 1998.
  
Back to top
View user's profile Send private message
Mike63740
I might as well work here
I might as well work here


Joined: Jan 07, 2010
Posts: 127
Location: Washington, DC

PostPosted: Mon May 14, 2012 5:14 pm 
Post subject:
Reply with quote

I am not sure what I have done, but it works, and it don't work. Very Happy Crying or Very sad

1. I created a basic HTML page.

2. I then Inserted a table with no rows or columns.

3. I then inserted the HTML form tag.

4. I save the HTML file as \blocks\block-Test.php

The form looks as should, when clicked, it carries out the job correctly. There is a block below it that reads, There isn't content right now. The original block.

Why is there two?

Thanks.
_________________
Open-source software has been changing lives since 1998.
  
Back to top
View user's profile Send private message
Mike63740
I might as well work here
I might as well work here


Joined: Jan 07, 2010
Posts: 127
Location: Washington, DC

PostPosted: Mon May 14, 2012 5:46 pm 
Post subject:
Reply with quote

Here is the one problem I notice. The form might be working perfectly, but it is sitting on top of the block instead of being inside of it. Not directly on top.

How can I fix this?
_________________
Open-source software has been changing lives since 1998.
  
Back to top
View user's profile Send private message
bobby
Site Admin
Site Admin


Joined: Jan 20, 2009
Posts: 779
Location: North Carolina

PostPosted: Mon May 14, 2012 6:12 pm 
Post subject:
Reply with quote

Post your code here and I will walk you through it.
_________________
Tricked Out News
  
Back to top
View user's profile Send private message
Mike63740
I might as well work here
I might as well work here


Joined: Jan 07, 2010
Posts: 127
Location: Washington, DC

PostPosted: Mon May 14, 2012 6:21 pm 
Post subject:
Reply with quote

Mike63740 wrote:
4. I save the HTML file as \blocks\block-Test.php

php Code:
<table width="144" height="47" border="0" cellpadding="0" cellspacing="0" bgcolor="#FF0000">

<tr>
<td align="center" valign="middle"><form action="" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="">
<input name="submit" type="image" src="" alt="" align="middle" border="0">
<img alt="" border="0" src="" width="1" height="1">
</form>
</td>
</tr>
</table>

_________________
Open-source software has been changing lives since 1998.
  
Back to top
View user's profile Send private message
bobby
Site Admin
Site Admin


Joined: Jan 20, 2009
Posts: 779
Location: North Carolina

PostPosted: Mon May 14, 2012 6:35 pm 
Post subject:
Reply with quote

The first thing you want to do is to keep people from accessing the file unless it is as a block. Use the opening php tag and this code to secure it.
php Code:
<?php

if ( !defined('BLOCK_FILE') ) {
Header('Location: ../index.php');
die();
}


Than you will add the heart of the code to it. Blocks wrap the content in the variable $content like so.
php Code:


$content='<form action="" method="post">
<input type="hidden" name="cmd" value="_s-xclick" />
<input type="hidden" name="hosted_button_id" value="" />
<input name="submit" type="image" src="" alt="" align="middle" border="0" />
<img alt="" border="0" src="" width="1" height="1" />
</form>';


You only need the form content since the theme takes care of the rest.

The only thing left is to close it with the closing php tag.

The finished block should look like this:

php Code:


<?php
if ( !defined('BLOCK_FILE') ) {
Header('Location: ../index.php');
die();
}
$content='<form action="" method="post">
<input type="hidden" name="cmd" value="_s-xclick" />
<input type="hidden" name="hosted_button_id" value="" />
<input name="submit" type="image" src="" alt="" align="middle" border="0" />
<img alt="" border="0" src="" width="1" height="1" />
</form>';

?>


Some html would need a few structural changes to work in the single quotes. Most will work like this. There are a lot of resources on the Internet about using html in php. Most older ones will show the double quote method which requires a few other changes to the html code.
_________________
Tricked Out News
  
Back to top
View user's profile Send private message
Mike63740
I might as well work here
I might as well work here


Joined: Jan 07, 2010
Posts: 127
Location: Washington, DC

PostPosted: Mon May 14, 2012 7:11 pm 
Post subject:
Reply with quote

Raven body went blank. Nothing in the middle. I can see the blocks that are on and the pull down menu, but when clicked the screen returns blank. I do not see the new block we are working on.

Current: \blocks\block-Test.php
php Code:
<?php

if ( !defined('BLOCK_FILE') ) {
Header('Location: ../index.php');
die();
$content='<form action="" method="post">
<input type="hidden" name="cmd" value="_s-xclick" />
<input type="hidden" name="hosted_button_id" value="" />
<input name="submit" type="image" src="" alt="" align=" align="middle" border="0" />
<img alt="" border="0" src="" width="1" height="1" />
</form>';
?>

_________________
Open-source software has been changing lives since 1998.
  
Back to top
View user's profile Send private message
bobby
Site Admin
Site Admin


Joined: Jan 20, 2009
Posts: 779
Location: North Carolina

PostPosted: Mon May 14, 2012 7:14 pm 
Post subject:
Reply with quote

Look at the code I posted. I had an error in it. there needs to be a } added after the first part.
_________________
Tricked Out News
  
Back to top
View user's profile Send private message
Mike63740
I might as well work here
I might as well work here


Joined: Jan 07, 2010
Posts: 127
Location: Washington, DC

PostPosted: Mon May 14, 2012 7:34 pm 
Post subject:
Reply with quote

DONE!
It looks too good!
Current: \blocks\block-Test.php
php Code:
<?php

if ( !defined('BLOCK_FILE') ) {
Header('Location: ../index.php');
die();
}
$content='<form action="" method="post">
<input type="hidden" name="cmd" value="_s-xclick" />
<input type="hidden" name="hosted_button_id" value="" />
<input name="submit" type="image" src="" alt="" align="middle" border="0" />
<img alt="" border="0" src="" width="1" height="1" />
</form>';
?>
Bobby, as always, THANK YOU! Smile
_________________
Open-source software has been changing lives since 1998.
  
Back to top
View user's profile Send private message
Mike63740
I might as well work here
I might as well work here


Joined: Jan 07, 2010
Posts: 127
Location: Washington, DC

PostPosted: Mon May 14, 2012 7:48 pm 
Post subject:
Reply with quote

I made changes to the code, so when clicked, it will open in a new window.

$content='<form action="" method="post" target="_blank">

Thanks again.
_________________
Open-source software has been changing lives since 1998.
  
Back to top
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic   print    Tricked Out News Forum Index -> User questions All times are GMT - 5 Hours
 
 Page 1 of 1
 
 

Jump to:   
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Powered by phpBB © 2001-2008 phpBB Group
Forums ©