Author |
Message |
arames
New Member


Joined: Apr 30, 2006
Posts: 13
|
Posted:
Wed May 17, 2006 7:58 am |
|
I couldnt find help for this issue ...
I wanted to insert a FLASH image on the Right side in a new block.
Of course I tried to add the HTML code in the block, but every time I click on UPDATE the code goes away....
It seems that the block doesnt allow this kind of HTML code or what???
Please please help me
Thank you in advance,
Arames T. |
|
|
|
 |
arames

|
Posted:
Wed May 17, 2006 1:20 pm |
|
still waiting for a reply ...
thank you in advance for your help ... |
|
|
|
 |
arames

|
Posted:
Wed May 17, 2006 1:51 pm |
|
pleeeeeeeeeeeeeease help me |
|
|
|
 |
Nomad
Client

Joined: Jan 21, 2006
Posts: 87
Location: Arizona
|
Posted:
Thu May 18, 2006 1:31 am |
|
Well, I'm definitly not the expert in flash or blocks, but I had to figure out what you ment, by code disappearing when you hit the update. I assume you are using the nuke built in "blocks module" content window.
Have you tried just making a block from scratch (as a seperate file), inserting your html code, and then adding the block?
Also, I had the same problem in the message module. What I did to get around this was to find that table in the mysql, and put the code directly in the mysql using phpadmin.
The WYSIWYG editors chop code out too, try disabling it.
But like I said, I'm not the expert, just trying to be friendly. |
_________________ Nomad!~! |
|
|
 |
arames

|
Posted:
Thu May 18, 2006 2:02 pm |
|
Hello Nomad,
you are one of the nicest and friendliest nomad!
Thank you, actually it did work the way you said it, but now I have a small problem.
The flash files is showing, but it is OUTSIDE or better to say ABOVE the Block.
So I have the block with:
There isn't content right now for this block.
and above this message, as well as above the box, I have my Flash file showing perfectly.
How do I get the flash file INSIDE the box?
Thank you again a million for any help ! |
|
|
|
 |
Nomad

|
Posted:
Thu May 18, 2006 2:09 pm |
|
I'm assuming again that you put the html code right inside of the block? Yes or No?
If you did, did you assign it as $content? |
|
|
|
 |
arames

|
Posted:
Thu May 18, 2006 2:19 pm |
|
I just made a blank copy of a block and inserted the HTML code like this:
Quote: | <p>
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"
WIDTH=160 HEIGHT=160>
<PARAM NAME=movie VALUE="http://mydomain.com/Stars/images/stars.swf">
<PARAM NAME=quality VALUE=High> <PARAM NAME=bgcolor VALUE=#ffffff>
<EMBED src="http://mydomain.com/Stars/images/stars.swf" quality=High bgcolor=#ffffff WIDTH=160 HEIGHT=160 TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED></OBJECT>
</p> |
and then saved the new file above as block-flash.php
No PHP , since I am not good at all in PHP...
How should I insert this above code in PHP buddy? How should the block content look like?
Again thank you for your help! |
|
|
|
 |
Nomad

|
Posted:
Thu May 18, 2006 2:43 pm |
|
First of all, to get anthing to show within the block, you have to assign it to the $content variable. The easiest way I know of is to you the 'heredocs' function. It is a simple way to type raw html into php.
I would do it something like this:
Code:
if (eregi("block-flash.php",$PHP_SELF)) {
Header("Location: index.php");
die();
$html = <<<_showflash_
<table border='0' cellpadding='1' width='100%'>
<tr>
<td align='center'>
<p>
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"
WIDTH=160 HEIGHT=160>
<PARAM NAME=movie VALUE="http://mydomain.com/Stars/images/stars.swf">
<PARAM NAME=quality VALUE=High> <PARAM NAME=bgcolor VALUE=#ffffff>
<EMBED src="http://mydomain.com/Stars/images/stars.swf" quality=High bgcolor=#ffffff WIDTH=160 HEIGHT=160 TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED></OBJECT>
</p>
</td>
</tr>
</table>
_showflash_;
$content = $html;
|
I used the variable $html, but you could call it anything you want.
This part: $html = <<<_showflash_ starts the section where you can use regular html. I named it showflash, but you can also name it whatever you want.
You then must close it with the same name showflash or whatever you want, just dont forget to use the proper format: _somename_
Finally I assigned it to the $content variable, in order for the block to display the code with this: $content = $html;
The table stuff I put in is just extra stuff, not needed, to try and center the content, if desired.
Nomad!~! |
|
|
|
 |
gregexp
The Mouse Is Extension Of Arm

Joined: Feb 21, 2006
Posts: 1497
Location: In front of a screen....HELP! lol
|
Posted:
Fri May 19, 2006 12:16 am |
|
u could always use content=
post ur html code and ill post the block code. |
|
|
 |
 |
arames

|
Posted:
Fri May 19, 2006 9:17 am |
|
Thank you Nomad for your help, as well as darklord.
The File block-flash.php looks now like this:
Quote: | <?php
if (eregi("block-flash.php",$PHP_SELF)) {
Header("Location: index.php");
die();
$html = <<<_showflash_
<table border='0' cellpadding='1' width='100%'>
<tr>
<td align='center'>
<p>
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"
WIDTH=160 HEIGHT=160>
<PARAM NAME=movie VALUE="http://mydomain.com/Stars/images/stars.swf">
<PARAM NAME=quality VALUE=High> <PARAM NAME=bgcolor VALUE=#ffffff>
<EMBED src="http://mydomain.com/Stars/images/stars.swf" quality=High bgcolor=#ffffff WIDTH=160 HEIGHT=160 TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED></OBJECT>
</p>
</td>
</tr>
</table>
_showflash_;
$content = $html;
?>
|
but now the block isnt showing anymore.
As for the HTML code I wanted to insert it is:
Quote: | <p>
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"
WIDTH=160 HEIGHT=160>
<PARAM NAME=movie VALUE="http://mydomain.com/Stars/images/stars.swf">
<PARAM NAME=quality VALUE=High> <PARAM NAME=bgcolor VALUE=#ffffff>
<EMBED src="http://mydomain.com/Stars/images/stars.swf" quality=High bgcolor=#ffffff WIDTH=160 HEIGHT=160 TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED></OBJECT>
</p> |
What did I do wrong? |
|
|
|
 |
Nomad

|
Posted:
Fri May 19, 2006 10:07 am |
|
Nothing, It was me..I left out a closing bracket "}" after the if statement
Try posting it like this:
Code:
<?php
if (eregi("block-flash.php",$PHP_SELF)) {
Header("Location: index.php");
die();
}
$html = <<<_showflash_
<table border='0' cellpadding='1' width='100%'>
<tr>
<td align='center'>
<p>
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"
WIDTH=160 HEIGHT=160>
<PARAM NAME=movie VALUE="http://mydomain.com/Stars/images/stars.swf">
<PARAM NAME=quality VALUE=High> <PARAM NAME=bgcolor VALUE=#ffffff>
<EMBED src="http://mydomain.com/Stars/images/stars.swf" quality=High bgcolor=#ffffff WIDTH=160 HEIGHT=160 TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED></OBJECT>
</p>
</td>
</tr>
</table>
_showflash_;
$content = $html;
?>
|
It goes right after die();
Brackets, you gotta have'em!
Nomad!~! |
|
|
|
 |
gregexp

|
Posted:
Fri May 19, 2006 1:47 pm |
|
Code:<?php
#### Generated by Block Creator by Disipal Site (www.disipal.net) ###
if (eregi("block-Block_Creator.php",$PHP_SELF)) {
Header("Location: index.php");
die();
}
$content = "<p> ";
$content .= "<OBJECT classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" ";
$content .= "codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0\" ";
$content .= "WIDTH=160 HEIGHT=160> ";
$content .= "<PARAM NAME=movie VALUE=\"http://mydomain.com/Stars/images/stars.swf\"> ";
$content .= "<PARAM NAME=quality VALUE=High> <PARAM NAME=bgcolor VALUE=#ffffff> ";
$content .= "<EMBED src=\"http://mydomain.com/Stars/images/stars.swf\" quality=High bgcolor=#ffffff WIDTH=160 HEIGHT=160 TYPE=\"application/x-shockwave-flash\" PLUGINSPAGE=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\"></EMBED></OBJECT> ";
$content .= "</p> ";
$content .= "";
?>
|
this is just incase ud like to use it...i see what no mad is doing...nice way of making a block too
I believe bother ways will work
just a small question here..nomad wont either the $html= "? or the
content = "$html";
Because the content needs to be enclosed in quotes(I may be wrong thats y im askin )
just a thought. |
|
|
|
 |
Nomad

|
Posted:
Fri May 19, 2006 3:33 pm |
|
Thanks!
You dont need to put the qoutes when using 'heredoc'. Heredoc is a special PHP function that is envoked when your code is writen as stated above. Just "Let it do, what it do!"
***********
This is a quote from Tizag.com, a php tutorial site:
PHP Code for heredoc:
$my_string = <<<TEST
Tizag.com
Webmaster Tutorials
Unlock your potential!
TEST;
echo $my_string;
There are a few very important things to remember when using heredoc.
* Use <<< and some identifier that you choose to begin the heredoc. In this example we chose TEST as our identifier.
* Repeat the identifier followed by a semicolon to end the heredoc string creation. In this example that was TEST;
* The closing sequence TEST; must occur on a line by itself and cannot be indented!
Another thing to note is that when you output this multi-line string to a web page, it will not span multiple lines because we did not have any <br /> tags contained inside our string! Here is the output made from the code above.
***********
you can find out about heredoc all over the web by doing a google search, but to give credit due, where credit is due, I first learned about it here on ravenphpscripts.com.
***********
Nomad !~! |
Last edited by Nomad on Mon May 22, 2006 8:54 pm; edited 1 time in total |
|
|
 |
gregexp

|
Posted:
Mon May 22, 2006 8:33 pm |
|
credit to this forum is definatley somethin that almost anyone who deals with nuke would have to give
Expacially me..this forum has shown me a lot of cureousy and tolerance..i know what its like to be frustated because someone new just doesnt quite get it...and now that I have gotten a good grasp(still not quite there) I have chosen to use my knowledge to help others as so many here have...
To be honest i dont really think most of the people who come here and search for their particular problem have any clue what mountain of knowledge is buried in this forum...ive only scratched the surface and i find things new everyday...i make it a poin to come onto certain forums and read EVERY single post in a forum i can find...took my 3 days to finish one forum on this site. But the knowledge i gained went way beyond the time lost and was more then worth the effort..I know others have shown this but to RAVEN Montego evaders Chatserv and all you other ppl on here..I give you my thanks and credit to you for the knowledge ive gained...if ever you feel this is a waste of time..just read this..I am absolutley greatfull to all of you for this forum and more importantly for making it public so i could read it..tutorials are great..but they lack the grasp, the real examples, The things you all cover..
 |
|
|
|
 |
|