 |
|
| View previous topic :: View next topic |
| Author |
Message |
clam729 Warrant Officer

Joined: 08 Oct 2002 Posts: 73
|
Posted: Tue Jan 14, 2003 9:41 pm Post subject: |
|
|
hey all,
this is a line in contacts block:
$content .= "<div align="right"><a href="mailto:me@mydomain.com?subject=blah">click me</a><strong><big> ·</big></strong></div>n";
this is the code that i would like to incorporate into it instead:
<script type="text/javascript">
<!--
var first = 'ma';
var second = 'il';
var third = 'to:';
var address = 'me';
var domain = 'mydomain.com';
document.write('<a href="');
document.write(first+second+third);
document.write(address);
document.write('@');
document.write(domain);
document.write('" title="click me">');
document.write('click me</a>');
// -->
</script>
is this possible ? i cant squat to show up "inside" the block, it always shows up above and to the right.
thanks.
[ This Message was edited by: clam729 on 2003-01-15 17:56 ]
[ This Message was edited by: clam729 on 2003-01-15 17:58 ] |
|
| Back to top |
|
 |
|
|
 |
chris President


Joined: 06 Nov 2002 Posts: 1047 Location: Outer Space
|
Posted: Wed Jan 15, 2003 6:10 am Post subject: |
|
|
Sure it is. Write:
| Code: |
$content .= "<script type="text/javascript"> "
$content .= "<!-- "
$content .= "var first = 'ma'; "
$content .= "var second = 'il'; "
$content .= "var third = 'to:'; "
$content .= "var address = 'me'; "
$content .= "var domain = 'mydomain.com'; "
$content .= "document.write('<a href="'); "
$content .= "document.write(first+second+third); "
$content .= "document.write(address); "
$content .= "document.write('@'); "
$content .= "document.write(domain); "
$content .= "document.write('" title="click me">'); "
$content .= "document.write('click me</a>'); "
$content .= "// --> "
$content .= "</script> "
|
I have included the code in "", escaped any other " and assigned it to the $content variable. That's how you create blocks in PHPNuke, see blocks/readme.txt in your installation.
Regards
Chris
|
|
| Back to top |
|
 |
chris President


Joined: 06 Nov 2002 Posts: 1047 Location: Outer Space
|
Posted: Wed Jan 15, 2003 6:14 am Post subject: |
|
|
By the way, if you are using vi and you have a HTML file you want to transform to a PHPNuke block code, here's how to do it:
In vi, do:
| Code: |
1,$s/"/"/g (escape all ")
1,$s/^/$content .= "/ (add $content .= " at the start of every line)
1,$s/$/"/ (add " at the end of every line)
|
You don't think I did my previous post by hand, do you?
Regards
Chris
|
|
| Back to top |
|
 |
Humpa President

Joined: 23 Apr 2002 Posts: 3429
|
Posted: Wed Jan 15, 2003 6:44 am Post subject: |
|
|
I think those document.write's will still show up above the block.
You might have to use this:
| Code: | ob_start();
echo "<script type="text/javascript">n"
."<!--n"
."var first = 'ma';n"
."var second = 'il';n"
."var third = 'to:';n"
."var address = 'me';n"
."var domain = 'mydomain.com';n"
."document.write('<a href="');n"
."document.write(first+second+third);n"
."document.write(address);n"
."document.write('@');n"
."document.write(domain);n"
."document.write('" title="click me">');n"
."document.write('click me</a>');n"
."// -->n"
."</script>n";
$output = ob_get_contents();
ob_end_clean();
$content .= $output;
|
|
|
| Back to top |
|
 |
jeffvato Private

Joined: 18 Jul 2004 Posts: 2
|
Posted: Sun Jul 18, 2004 8:36 am Post subject: |
|
|
Here is the code I need to place on my site. I'm not getting it right. I tried changing it but it still wont work.
Can anyone help?
<!-- Begin Team FishHoo! Banner Exchange Code -->
<P><CENTER><A HREF="http://www.fishhoo.com/exchange.htm" TARGET="_blank"><IMG SRC="http://www.fishhoo.com/but-fishhoo-team.gif" WIDTH=40 HEIGHT=40 ALT="Team FishHoo! Banner Exchange" BORDER=2></A><IFRAME SRC="http://www.fishhoo.com/cgi-bin/exchange/ads.pl?iframe;member=jeffvato" MARGINWIDTH=0 MARGINHEIGHT=0 HSPACE=0 VSPACE=0 FRAMEBORDER=0 SCROLLING=NO WIDTH=404 HEIGHT=44><SCRIPT LANGUAGE="JavaScript" SRC="http://www.fishhoo.com/cgi-bin/exchange/ads.pl?jscript;member=jeffvato"></SCRIPT><NOSCRIPT><A HREF="http://www.fishhoo.com/cgi-bin/exchange/ads.pl?member=jeffvato;banner=NonSSI;page=01" TARGET="_blank"><IMG SRC="http://www.fishhoo.com/cgi-bin/exchange/ads.pl?member=jeffvato;page=01" WIDTH=400 HEIGHT=40 ALT="Team FishHoo! Banner Exchange" BORDER=2></A></NOSCRIPT></IFRAME></CENTER>
<!-- End Team FishHoo! Banner Exchange Code -->
Jeffvato |
|
| Back to top |
|
 |
|
|
 |
|
|
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
|
Powered by phpBB © 2001, 2005 phpBB Group
|
|